text stringlengths 0 1.05M | meta dict |
|---|---|
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016-2021 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy_examples/predefined_tickers_example.py",
"copies": "1",
"size": "5627",
"license": "apache-2.0",
"hash": -8282153100098503000,
"line_mean": 46.2857142857,
"line_max": 169,
"alpha_frac": 0.70499378,
"autogenerated": false,
"ratio": 3.600127959... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/market/datavendorbbg.py",
"copies": "1",
"size": "51372",
"license": "apache-2.0",
"hash": 3856525366152594000,
"line_mean": 36.7742647059,
"line_max": 135,
"alpha_frac": 0.5882581951,
"autogenerated": false,
"ratio": 4.3289795230471055,
"c... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/util/swimpool.py",
"copies": "1",
"size": "3564",
"license": "apache-2.0",
"hash": -8166614325653906000,
"line_mean": 39.9770114943,
"line_max": 128,
"alpha_frac": 0.6372053872,
"autogenerated": false,
"ratio": 4.777479892761394,
"config_te... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/market/market.py",
"copies": "1",
"size": "55204",
"license": "apache-2.0",
"hash": 8071978100457173000,
"line_mean": 41.269525268,
"line_max": 150,
"alpha_frac": 0.5299797116,
"autogenerated": false,
"ratio": 4.311801921424666,
"config_tes... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/util/loggermanager.py",
"copies": "1",
"size": "1764",
"license": "apache-2.0",
"hash": -6952729266007814000,
"line_mean": 28.4166666667,
"line_max": 121,
"alpha_frac": 0.664399093,
"autogenerated": false,
"ratio": 4.312958435207824,
"confi... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/market/ioengine.py",
"copies": "1",
"size": "44510",
"license": "apache-2.0",
"hash": 7667442279897928000,
"line_mean": 33.7191887676,
"line_max": 146,
"alpha_frac": 0.5129184453,
"autogenerated": false,
"ratio": 4.325138470508211,
"config_... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/timeseries/timezone.py",
"copies": "1",
"size": "5031",
"license": "apache-2.0",
"hash": 3498166045690023400,
"line_mean": 29.125748503,
"line_max": 121,
"alpha_frac": 0.6428145498,
"autogenerated": false,
"ratio": 3.7600896860986546,
"conf... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/chartpy",
"path": "chartpy/engine.py",
"copies": "1",
"size": "96504",
"license": "apache-2.0",
"hash": 3440831432397549000,
"line_mean": 36.8150470219,
"line_max": 131,
"alpha_frac": 0.485596452,
"autogenerated": false,
"ratio": 4.229107322844998,
"config_test": false,
... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "kalaytan/findatapy",
"path": "findatapy/timeseries/filter.py",
"copies": "1",
"size": "25593",
"license": "apache-2.0",
"hash": 6807414649792112000,
"line_mean": 30.9114713217,
"line_max": 122,
"alpha_frac": 0.5743367327,
"autogenerated": false,
"ratio": 4.046324110671937,
"confi... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/chartpy",
"path": "chartpy_examples/chart_demo.py",
"copies": "1",
"size": "3745",
"license": "apache-2.0",
"hash": 2578312426580400000,
"line_mean": 35.7156862745,
"line_max": 121,
"alpha_frac": 0.6913217623,
"autogenerated": false,
"ratio": 3.4138559708295353,
"config_... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "kalaytan/findatapy",
"path": "findatapy/market/indices/indicesfx.py",
"copies": "1",
"size": "4223",
"license": "apache-2.0",
"hash": -182524500605584740,
"line_mean": 38.8490566038,
"line_max": 121,
"alpha_frac": 0.611413687,
"autogenerated": false,
"ratio": 3.860146252285192,
"... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/chartpy",
"path": "chartpy_examples/vispy_demo.py",
"copies": "1",
"size": "4296",
"license": "apache-2.0",
"hash": 4787698340134211000,
"line_mean": 32.8267716535,
"line_max": 123,
"alpha_frac": 0.6608472998,
"autogenerated": false,
"ratio": 3.565145228215768,
"config_t... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "kalaytan/findatapy",
"path": "findatapy/util/tickerfactory.py",
"copies": "1",
"size": "4087",
"license": "apache-2.0",
"hash": 7675743449367945000,
"line_mean": 39.068627451,
"line_max": 139,
"alpha_frac": 0.510888182,
"autogenerated": false,
"ratio": 4.380493033226152,
"config_... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/chartpy",
"path": "chartpy_examples/canvas_demo.py",
"copies": "1",
"size": "2428",
"license": "apache-2.0",
"hash": 8319405301758619000,
"line_mean": 37.5555555556,
"line_max": 140,
"alpha_frac": 0.6927512356,
"autogenerated": false,
"ratio": 3.3910614525139664,
"config... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | {
"repo_name": "cuemacro/findatapy",
"path": "findatapy/timeseries/dataquality.py",
"copies": "1",
"size": "6783",
"license": "apache-2.0",
"hash": 8804738768483597000,
"line_mean": 33.6071428571,
"line_max": 142,
"alpha_frac": 0.6180156273,
"autogenerated": false,
"ratio": 4.515978695073236,
"c... |
__author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2021 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | {
"repo_name": "cuemacro/chartpy",
"path": "chartpy/dashboard/layoutcanvas.py",
"copies": "1",
"size": "4179",
"license": "apache-2.0",
"hash": -5906992580265423000,
"line_mean": 26.1428571429,
"line_max": 121,
"alpha_frac": 0.5776501555,
"autogenerated": false,
"ratio": 4.057281553398059,
"conf... |
__author__ = 'saeedamen' # Saeed Amen / saeed@pythalesians.com
#
# Copyright 2015 Thalesians Ltd. - http//www.pythalesians.com / @pythalesians
#
# 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 h... | {
"repo_name": "poeticcapybara/pythalesians",
"path": "pythalesians/util/constants.py",
"copies": "1",
"size": "14012",
"license": "apache-2.0",
"hash": -837401321216659200,
"line_mean": 40.3362831858,
"line_max": 159,
"alpha_frac": 0.4742363688,
"autogenerated": false,
"ratio": 3.3322235434007133... |
__author__ = 'saeedamen' # Saeed Amen / saeed@thalesians.com
#
# Copyright 2015 Thalesians Ltd. - http//www.thalesians.com / @thalesians
#
# 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://... | {
"repo_name": "poeticcapybara/pythalesians",
"path": "pythalesians/util/cachemanager.py",
"copies": "1",
"size": "1516",
"license": "apache-2.0",
"hash": -5561813446926434000,
"line_mean": 29.9591836735,
"line_max": 121,
"alpha_frac": 0.6721635884,
"autogenerated": false,
"ratio": 3.8575063613231... |
__author__ = 'saftophobia'
import numpy as np
import logging
from util.helper import *
import theano
import theano.tensor as T
from theano.tensor.signal import downsample
from theano.tensor.nnet import conv2d
class LeNetConvPoolLayer(object):
"""Pool Layer of a convolutional network """
def __init__(self, rn... | {
"repo_name": "Saftophobia/shunting",
"path": "layers.py",
"copies": "1",
"size": "10627",
"license": "mit",
"hash": 314132368297079100,
"line_mean": 36.6879432624,
"line_max": 116,
"alpha_frac": 0.5765502964,
"autogenerated": false,
"ratio": 3.9682598954443615,
"config_test": true,
"has_no_k... |
__author__ = 'saftophobia'
import os, cPickle, logging
import numpy as np
from time import time
class CIFAR10:
TAGS = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
def __init__(self, data_batches_count, dir = "/data/cifar-10-batches-py"):
logging.info("Loa... | {
"repo_name": "Saftophobia/shunting",
"path": "data/CIFAR10.py",
"copies": "1",
"size": "1518",
"license": "mit",
"hash": 4466006988784481300,
"line_mean": 31.2978723404,
"line_max": 101,
"alpha_frac": 0.5783926219,
"autogenerated": false,
"ratio": 3.2297872340425533,
"config_test": false,
"h... |
__author__ = 'saftophobia'
import os, inspect, math
from collections import Counter
from random import random
import optparse
"""
This script transforms the raw data from its standard format to JSON.
Hence, JSON to XML libraries can be used.
More features are implemented for the project such as the number of edges pe... | {
"repo_name": "Saftophobia/graph-viz-eye-tracker",
"path": "unityproject/wikipedia_data/process_data.py",
"copies": "1",
"size": "2789",
"license": "mit",
"hash": -2145591376917076200,
"line_mean": 38.8428571429,
"line_max": 128,
"alpha_frac": 0.6346360703,
"autogenerated": false,
"ratio": 3.2773... |
__author__ = 'Safyre'
# http://doc.scrapy.org/en/latest/intro/tutorial.html
# to use go to project's top level directory and run:
# scrapy crawl tcgaSP
import scrapy, urlparse
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from test_tcga_scrape.item... | {
"repo_name": "gunnarklee/DataStoreRetrieval",
"path": "test_tcga_scrape/test_tcga_scrape/spiders/TCGA_spider.py",
"copies": "1",
"size": "1888",
"license": "mit",
"hash": -1644858046320545800,
"line_mean": 40.9777777778,
"line_max": 134,
"alpha_frac": 0.6106991525,
"autogenerated": false,
"ratio... |
__author__ = 'Safyre'
'''
Part 1.1 Grab files from S3 and store in collection titled db_tweets
'''
import os, pymongo, json, gzip
from boto.s3.key import Key
from boto.s3.connection import S3Connection
print "Paste your own AWS keys before using\n"
print "connecting to S3 via boto \n"
conn = S3Connection('', '')
#b... | {
"repo_name": "gunnarklee/DataStoreRetrieval",
"path": "1000genomestest.py",
"copies": "1",
"size": "1476",
"license": "mit",
"hash": -8240597114474201000,
"line_mean": 28.54,
"line_max": 109,
"alpha_frac": 0.7012195122,
"autogenerated": false,
"ratio": 3.100840336134454,
"config_test": false,
... |
import sys
import json
import os
import argparse
# Set arguments for the tool
def setArgParse():
# Setting the parser arguments
parser = argparse.ArgumentParser(prog="ansible-check-builder",
description="This script builds a check json file for the Sensu monitoring system.\n" ... | {
"repo_name": "sagyos/sensu-scripts",
"path": "ansible-check-builder.py",
"copies": "1",
"size": "6683",
"license": "mit",
"hash": 1132964835751599200,
"line_mean": 35.9226519337,
"line_max": 132,
"alpha_frac": 0.6848720634,
"autogenerated": false,
"ratio": 3.8786999419616945,
"config_test": fa... |
import json
import os
# Check if the OS is Windows or Linux
if (os.name == 'nt'):
CHECK_PATH="C:\\etc\\sensu\\conf.d\\checks\\"
else:
CHECK_PATH="/etc/sensu/conf.d/checks/"
CHECK_EXTENSION=".json"
# Check if directory exists and creates it if not
if not os.path.exists(CHECK_PATH):
os.makedirs(CHECK_PATH)
#... | {
"repo_name": "sagyos/sensu-scripts",
"path": "Check-builder.py",
"copies": "1",
"size": "2684",
"license": "mit",
"hash": -5040839401855797000,
"line_mean": 26.6804123711,
"line_max": 103,
"alpha_frac": 0.6784649776,
"autogenerated": false,
"ratio": 3.5502645502645502,
"config_test": false,
... |
import json
import os
# Check if the OS is Windows or Linux
if (os.name == 'nt'):
CHECK_PATH="C:\\etc\\sensu\\conf.d\\checks\\"
else:
CHECK_PATH="/etc/sensu/conf.d/checks/"
CHECK_EXTENSION=".json"
# Check if directory exists and creates it if not
if not os.path.exists(CHECK_PATH):
os.makedirs(CHECK_PATH)
# C... | {
"repo_name": "sagyos/sensu-scripts",
"path": "check-json-builder-standalone.py",
"copies": "1",
"size": "2418",
"license": "mit",
"hash": 6031648521046114000,
"line_mean": 27.1279069767,
"line_max": 103,
"alpha_frac": 0.6869313482,
"autogenerated": false,
"ratio": 3.582222222222222,
"config_te... |
__author__ = 'sagonzal'
from sacm import *
import math as mymath
import itertools
class AsdmCheck:
#uid = ''
#asdmDict = dict()
#check = dict()
#toc = ''
#main = ''
#antennas = ''
#source = ''
#scan = ''
#field = ''
#syscal = ''
def __init__(self):
self.uid = ''
... | {
"repo_name": "SDK/metadatachecker",
"path": "metadatachecker.py",
"copies": "1",
"size": "7846",
"license": "mit",
"hash": -3489259671561633000,
"line_mean": 37.6502463054,
"line_max": 169,
"alpha_frac": 0.5110884527,
"autogenerated": false,
"ratio": 3.8329262335124574,
"config_test": false,
... |
__author__ = 'saguas'
import frappe
from jnius import PythonJavaClass, java_method
class JasperCustomDataSourceDefault(object):
""" Get fields for each id default ignore data and cols.
params: data an cols have meaning when used with Table DataSource and are here for custom implementation.
"""
def __init__(self,... | {
"repo_name": "saguas/jasper_erpnext_report",
"path": "jasper_erpnext_report/jasper_reports/FrappeDataSource.py",
"copies": "1",
"size": "2152",
"license": "mit",
"hash": 5235794858946650000,
"line_mean": 21.8936170213,
"line_max": 107,
"alpha_frac": 0.6538104089,
"autogenerated": false,
"ratio":... |
__author__ = 'saguas'
import frappe
from jnius import PythonJavaClass, java_method
class JasperCustomScripletDefault(object):
""" Jasperreports Scriptlet
Methods to call in JasperScriplet Object bellow:
java.lang.Object getFieldValue(java.lang.String fieldName)
java.lang.Object getParameterValue(java.lang.Strin... | {
"repo_name": "saguas/jasper_erpnext_report",
"path": "jasper_erpnext_report/jasper_reports/ScriptletDefault.py",
"copies": "1",
"size": "3885",
"license": "mit",
"hash": -819969823203130400,
"line_mean": 27.1594202899,
"line_max": 196,
"alpha_frac": 0.7487773488,
"autogenerated": false,
"ratio":... |
__author__ = 'saguinag' + '@' + 'nd.edu'
__version__ = "0.1.0"
##
## fname
##
## TODO: some todo list
# I do a mapping of nodes in one direction, but do I need to do it on
# on the ohter way?
## VersionLog:
import argparse, traceback
import os, sys, time
import networkx as nx
from datetime import datetime
impor... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/tdec/sampled_edglst_dimacs.py",
"copies": "1",
"size": "3725",
"license": "mit",
"hash": -7487597597668367000,
"line_mean": 30.0416666667,
"line_max": 89,
"alpha_frac": 0.6040268456,
"autogenerated": false,
"ratio": 2.765404602821084,
"conf... |
__author__ = 'saguinag' + '@' + 'nd.edu'
__version__ = "0.1.0"
##
## fname
##
## TODO: some todo list
## VersionLog:
import argparse, traceback
import os, sys
from glob import glob
from a1_hrg_cliq_tree import load_edgelist
from collections import deque, defaultdict, Counter
import PHRG as phrg
import tree_decompos... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/tdec/sampled.subgraphs.cliquetree.py",
"copies": "1",
"size": "4196",
"license": "mit",
"hash": 429263219025563100,
"line_mean": 30.3208955224,
"line_max": 120,
"alpha_frac": 0.5662535748,
"autogenerated": false,
"ratio": 3.3275178429817607,
... |
__author__ = 'saguinag' + '@' + 'nd.edu'
__version__ = "0.1.0"
##
## fname
##
## TODO: some todo list
## VersionLog:
import argparse, traceback
import os, sys, time
import networkx as nx
from datetime import datetime
import pandas as pd
import pprint as pp
from PHRG import graph_checks
def nx_edges_to_nddgo_graph... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/tdec/trde.edgelist_inddgo_graph.py",
"copies": "1",
"size": "3371",
"license": "mit",
"hash": 6653937187927645000,
"line_mean": 27.5677966102,
"line_max": 89,
"alpha_frac": 0.6027884901,
"autogenerated": false,
"ratio": 2.818561872909699,
"... |
__author__ = 'saguinag'+'@'+'nd.edu'
__version__ = "0.1.0"
##
## fname
##
## TODO: some todo list
## VersionLog:
import argparse,traceback,optparse
import os, sys, time
import matplotlib
matplotlib.use('pdf')
import matplotlib.pyplot as plt
plt.style.use('ggplot')
import comp_metrics as nm
def get_parser():
par... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/tdec/netprops.py",
"copies": "1",
"size": "2223",
"license": "mit",
"hash": 4464220826097611000,
"line_mean": 27.5,
"line_max": 98,
"alpha_frac": 0.669365722,
"autogenerated": false,
"ratio": 3,
"config_test": false,
"has_no_keywords": fa... |
__author__ = 'saguinag'+'@'+'nd.edu'
__version__ = "0.1.0"
##
## fname
##
## TODO: some todo list
## VersionLog:
import argparse,traceback,optparse
import os, sys, time
import networkx as nx
import numpy as np
import pandas as pd
import comp_metrics as cm
import probabilistic_cfg as pcfg
def gen_nx_graph_obj (fnam... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/tdec/gen_hrg.py",
"copies": "1",
"size": "1613",
"license": "mit",
"hash": 6591590074107481000,
"line_mean": 27.298245614,
"line_max": 98,
"alpha_frac": 0.6714197148,
"autogenerated": false,
"ratio": 3.026266416510319,
"config_test": false,... |
__author__ = 'saguinag' + '@' + 'nd.edu'
__version__ = "0.1.0"
##
## gen_cliquetree
##
## TODO: some todo list
## VersionLog:
import argparse, traceback
import os, sys, pprint
import networkx as nx
import graph_sampler as gs
import tree_decomposition as td
import PHRG as phrg
import walk_ct as wct
import numpy as n... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/tdec/gen_cliquetree.py",
"copies": "1",
"size": "2895",
"license": "mit",
"hash": -3434615453142087000,
"line_mean": 24.3947368421,
"line_max": 99,
"alpha_frac": 0.5962003454,
"autogenerated": false,
"ratio": 3.0634920634920637,
"config_tes... |
__author__ = 'saguinag'+'@'+'nd.edu'
__version__ = "0.1.0"
##
## hrgm = hyperedge replacement grammars model
##
## TODO: some todo list
#
## VersionLog:
# 0.0.1 Initial commit
#
import argparse,traceback,optparse
import time, tweepy, sys, csv, json
from LocStrmListener import StdOutListener
from HTMLParser import ... | {
"repo_name": "abitofalchemy/ScientificImpactPrediction",
"path": "qrytw_time.py",
"copies": "1",
"size": "3407",
"license": "mit",
"hash": 5282653854705612000,
"line_mean": 26.9262295082,
"line_max": 102,
"alpha_frac": 0.6011153507,
"autogenerated": false,
"ratio": 3.4241206030150755,
"config_... |
__author__ = 'saguinag'+'@'+'nd.edu'
__version__ = "0.1.0"
##
## json_dataset_tograph = convert twitter (json format) dataset to a graph object
## arguments: input file (json)
##
## VersionLog:
# 0.0.1 Initial commit
#
import argparse,traceback,optparse
import urllib, json
import sys
def json_load_byteified(fi... | {
"repo_name": "abitofalchemy/ScientificImpactPrediction",
"path": "json_dataset_tograph.py",
"copies": "1",
"size": "2398",
"license": "mit",
"hash": 3842952083991179300,
"line_mean": 26.8837209302,
"line_max": 82,
"alpha_frac": 0.6505421184,
"autogenerated": false,
"ratio": 3.358543417366947,
... |
__author__ = 'saguinag' + '@' + 'nd.edu'
__version__ = "0.1.0"
##
## net_proc network process
##
## TODO: some todo list
#
## VersionLog:
# 0.0.1 Initial commit
# Notes:
# http://scipy.github.io/old-wiki/pages/Cookbook/Matplotlib/Show_colormaps
import argparse, traceback, optparse
import time, os, sys, csv
impor... | {
"repo_name": "abitofalchemy/ScientificImpactPrediction",
"path": "NetAnalysis/netproc.py",
"copies": "1",
"size": "9635",
"license": "mit",
"hash": 463104913220175740,
"line_mean": 30.4869281046,
"line_max": 112,
"alpha_frac": 0.59159315,
"autogenerated": false,
"ratio": 2.8363261701501323,
"c... |
__author__ = 'saguinag'+'@'+'nd.edu'
__version__ = "0.1.0"
##
## spip 'scientific publication impact potential'
##
## TODO: some todo list
#
## VersionLog:
# 0.0.1 Initial commit
# Notes:
# http://scipy.github.io/old-wiki/pages/Cookbook/Matplotlib/Show_colormaps
import argparse,traceback
import time, os, sys, cs... | {
"repo_name": "abitofalchemy/ScientificImpactPrediction",
"path": "NetAnalysis/spip.py",
"copies": "1",
"size": "5207",
"license": "mit",
"hash": -2781654392180562400,
"line_mean": 26.7021276596,
"line_max": 92,
"alpha_frac": 0.6535433071,
"autogenerated": false,
"ratio": 2.5562101129111436,
"c... |
__author__ = 'saguinag' + '@' + 'nd.edu'
__version__ = "0.1.0"
##
## tree_to_clique_tree
##
## TODO: some todo list
## VersionLog:
import tdec.net_metrics as metrics
import argparse, traceback
import os, sys
import networkx as nx
import re
from collections import deque, defaultdict, Counter
import tdec.tree_decomp... | {
"repo_name": "nddsg/TreeDecomps",
"path": "xplodnTree/core/tree_to_clique_tree.py",
"copies": "1",
"size": "4784",
"license": "mit",
"hash": 4121804020893732400,
"line_mean": 25.8764044944,
"line_max": 100,
"alpha_frac": 0.6126672241,
"autogenerated": false,
"ratio": 2.7669172932330826,
"confi... |
__author__ = 'saintdragon2'
#http://www.tutorialspoint.com/python/python_gui_programming.htm
from tkinter import Tk, Menu, Toplevel, Button
from tkinter.filedialog import askopenfilename, asksaveasfile
def donothing():
filewin = Toplevel(root)
button = Button(filewin, text="do nothing")
button.pack()
de... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "gui_practice/tkinter_01_sinsojae.py",
"copies": "1",
"size": "1592",
"license": "mit",
"hash": 3173655431961084400,
"line_mean": 25.55,
"line_max": 68,
"alpha_frac": 0.6551507538,
"autogenerated": false,
"ratio": 3.190380761523046,
"c... |
__author__ = 'saintdragon2'
# http://www.tutorialspoint.com/python/python_gui_programming.htm
from tkinter import Tk,Menu, Toplevel, Button
from tkinter.filedialog import askopenfilename, asksaveasfile
root = Tk()
def donothing():
filewin = Toplevel(root)
button = Button(filewin, text='Haha')
button.pac... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "gui_practice/civil_gui.py",
"copies": "1",
"size": "1437",
"license": "mit",
"hash": 992567334675801100,
"line_mean": 22.9666666667,
"line_max": 69,
"alpha_frac": 0.6903270703,
"autogenerated": false,
"ratio": 3.0836909871244633,
"con... |
__author__ = 'saintdragon2'
#http://www.tutorialspoint.com/python/tk_menu.htm
from tkinter import Tk, Menu, Toplevel, Button
from tkinter.filedialog import askopenfilename, asksaveasfile
from tkinter.messagebox import showerror
def donothing():
filewin = Toplevel(root)
button = Button(filewin, text="Do nothi... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "gui_practice/tkinter_03.py",
"copies": "1",
"size": "2480",
"license": "mit",
"hash": 1744487680431497700,
"line_mean": 33.4444444444,
"line_max": 91,
"alpha_frac": 0.6673387097,
"autogenerated": false,
"ratio": 3.2934926958831343,
"c... |
__author__ = 'saintdragon2'
#http://www.tutorialspoint.com/python/tk_menu.htm
from tkinter import Tk, Menu, Toplevel, Button
from tkinter.filedialog import askopenfilename
from tkinter.messagebox import showerror
def donothing():
filewin = Toplevel(root)
button = Button(filewin, text="Do nothing button")
... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "gui_practice/tkinter_02.py",
"copies": "1",
"size": "2021",
"license": "mit",
"hash": -443248091811062340,
"line_mean": 33.8448275862,
"line_max": 78,
"alpha_frac": 0.6833250866,
"autogenerated": false,
"ratio": 3.3240131578947367,
"c... |
__author__ = 'saintdragon2'
#http://www.tutorialspoint.com/python/tk_menu.htm
from tkinter import Tk, Menu, Toplevel, Button
def donothing():
filewin = Toplevel(root)
button = Button(filewin, text="Do nothing button")
button.pack()
root = Tk()
menubar = Menu(root)
filemenu = Menu(menubar, tearoff=0)
fi... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "gui_practice/tkinter_01.py",
"copies": "1",
"size": "1416",
"license": "mit",
"hash": 7325685626867536000,
"line_mean": 31.9302325581,
"line_max": 60,
"alpha_frac": 0.761299435,
"autogenerated": false,
"ratio": 2.9810526315789474,
"co... |
__author__ = 'saintdragon2'
import math
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return '(' + str(self.x) + ', ' + str(self.y) + ')'
def distance(self, other):
return ((other.x - self.x)**2 + (other.y - self.y)**2)**0.5
class Shape... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "shape_class_civil/Shape.py",
"copies": "1",
"size": "2511",
"license": "mit",
"hash": 1049906599129441300,
"line_mean": 19.5901639344,
"line_max": 67,
"alpha_frac": 0.5161290323,
"autogenerated": false,
"ratio": 2.8697142857142857,
"c... |
__author__ = 'saintdragon2'
import pygame
from player import Player
from levels import Ground, Level
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
white = (255, 255, 255)
def main():
pygame.init()
size = [SCREEN_WIDTH, SCREEN_HEIGHT]
screen = pygame.display.set_mode(size)
pygame.display.set_caption('Croc... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "platform_practice_01/crocman_main.py",
"copies": "1",
"size": "1896",
"license": "mit",
"hash": 4236334064242550300,
"line_mean": 21.0581395349,
"line_max": 116,
"alpha_frac": 0.5654008439,
"autogenerated": false,
"ratio": 3.66023166023... |
__author__ = 'saintdragon2'
import pygame
import constants
import levels
from player import Player
def main():
pygame.init()
size = [constants.SCREEN_WIDTH, constants.SCREEN_HEIGHT]
screen = pygame.display.set_mode(size)
pygame.display.set_caption('Platformer with sprite sheets')
player = Play... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "platform_with_spritesheets/platform_scroller.py",
"copies": "1",
"size": "2399",
"license": "mit",
"hash": -8676523906314922000,
"line_mean": 26.2727272727,
"line_max": 71,
"alpha_frac": 0.5660691955,
"autogenerated": false,
"ratio": 3.... |
__author__ = 'saintdragon2'
import pygame
import constants
from platforms import MovingPlatform
from spritesheet_functions import SpriteSheet
class Player(pygame.sprite.Sprite):
change_x = 0
change_y = 0
walking_frames_l = []
walking_frames_r = []
direction = 'R'
level = None
def __in... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "platform_with_spritesheets/player.py",
"copies": "1",
"size": "4551",
"license": "mit",
"hash": 6027121630413750000,
"line_mean": 33.2255639098,
"line_max": 94,
"alpha_frac": 0.5860250494,
"autogenerated": false,
"ratio": 3.408988764044... |
__author__ = 'saintdragon2'
import pygame
import random
black = (0, 0, 0)
white = (255, 255, 255)
red = (255, 0, 0)
class Block(pygame.sprite.Sprite):
def __init__(self, color, width, height):
super().__init__()
self.image = pygame.Surface([width, height])
self.image.fill(color)
... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "pygame_study/sprite_study/sprite_study.py",
"copies": "1",
"size": "1879",
"license": "mit",
"hash": -1839056331010334200,
"line_mean": 18.8936170213,
"line_max": 74,
"alpha_frac": 0.6115569823,
"autogenerated": false,
"ratio": 3.115,
... |
__author__ = 'saintdragon2'
import pygame
import time
import random
pygame.init()
display_width = 800
display_height = 600
black = (0, 0, 0)
white = (255, 255, 255)
red = (255, 0, 0)
green = (0, 255, 0)
block_color = (53, 115, 255)
carImg = pygame.image.load('car.png')
car_width = carImg.get_rect().size[0]
game... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "pygame_study/first_race_game.py",
"copies": "1",
"size": "3830",
"license": "mit",
"hash": -6212981942200138000,
"line_mean": 23.4935897436,
"line_max": 150,
"alpha_frac": 0.5790575916,
"autogenerated": false,
"ratio": 3.315972222222222... |
__author__ = 'saintdragon2'
import pygame
from spritesheet_functions import SpriteSheet
GRASS_LEFT = (576, 720, 70, 70)
GRASS_RIGHT = (576, 576, 70, 70)
GRASS_MIDDLE = (504, 576, 70, 70)
STONE_PLATFORM_LEFT = (432, 720, 70, 40)
STONE_PLATFORM_MIDDLE = (648, 648, 70, 40)
STONE_PLATFORM_RIGHT = (792, 648, 70, 40)
cl... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "platform_with_spritesheets/platforms.py",
"copies": "1",
"size": "1847",
"license": "mit",
"hash": 6373861336165131000,
"line_mean": 27.875,
"line_max": 88,
"alpha_frac": 0.5533297239,
"autogenerated": false,
"ratio": 3.511406844106464,... |
__author__ = 'saintdragon2'
import pygame
class Player(pygame.sprite.Sprite):
def __init__(self):
super().__init__()
idle_images = []
idle_images.append(pygame.image.load('images/croc_man/idle_0.png'))
idle_images.append(pygame.image.load('images/croc_man/idle_1.png'))
s... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "platform_practice_01/player.py",
"copies": "1",
"size": "1983",
"license": "mit",
"hash": -3122182494083666400,
"line_mean": 22.3411764706,
"line_max": 96,
"alpha_frac": 0.537065053,
"autogenerated": false,
"ratio": 3.3955479452054793,
... |
__author__ = 'saintdragon2'
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def distance(self, other_point):
return ((other_point.x - self.x)**2 + (other_point.y - self.y)**2)**0.5
def __str__(self):
return '(' + str(self.x) + ', ' + str(self.y) + ')'
class... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "class_example_study/shape.py",
"copies": "1",
"size": "1355",
"license": "mit",
"hash": -2535712682597353500,
"line_mean": 18.3714285714,
"line_max": 79,
"alpha_frac": 0.4664206642,
"autogenerated": false,
"ratio": 2.8891257995735606,
... |
__author__ = 'saintdragon2'
import pygame
import constants
import platforms
class Level():
platform_list = None
enemy_list = None
background = None
world_shift = 0
level_limit = -1000
def __init__(self, player):
self.platform_list = pygame.sprite.Group()
self.enemy_list = p... | {
"repo_name": "saintdragon2/python-3-lecture-2015",
"path": "platform_with_spritesheets/levels.py",
"copies": "1",
"size": "4442",
"license": "mit",
"hash": -306899886850890430,
"line_mean": 32.1567164179,
"line_max": 74,
"alpha_frac": 0.5677622692,
"autogenerated": false,
"ratio": 3.869337979094... |
# Gaussian Mixture class inspired from scikit-learn GaussianMixture module to
# sample and compute density of a Gaussian mixture model.
import numpy as np
from scipy.stats import multivariate_normal
class GaussianMixture(object):
""" Gaussian mixture.
Parameters
----------
weights : array, shape (... | {
"repo_name": "albertcthomas/fujitsu-ws",
"path": "utils.py",
"copies": "1",
"size": "1906",
"license": "bsd-3-clause",
"hash": 2683597051623039000,
"line_mean": 27.0294117647,
"line_max": 77,
"alpha_frac": 0.6227701994,
"autogenerated": false,
"ratio": 4.072649572649572,
"config_test": false,
... |
import numpy as np
from scipy import linalg
from .. import EvokedArray, Evoked
from ..cov import Covariance, _regularized_covariance
from ..decoding import TransformerMixin, BaseEstimator
from ..epochs import BaseEpochs
from ..io import BaseRaw
from ..io.pick import _pick_data_channels, pick_info
from ..utils import ... | {
"repo_name": "larsoner/mne-python",
"path": "mne/preprocessing/xdawn.py",
"copies": "4",
"size": "25039",
"license": "bsd-3-clause",
"hash": 4150025375672969000,
"line_mean": 37.5808936826,
"line_max": 81,
"alpha_frac": 0.599185271,
"autogenerated": false,
"ratio": 3.9443919344675487,
"config_... |
import numpy as np
import copy as cp
from scipy import linalg
from .ica import _get_fast_dot
from .. import EvokedArray, Evoked
from ..cov import Covariance, _regularized_covariance
from ..decoding import TransformerMixin, BaseEstimator
from ..epochs import BaseEpochs, EpochsArray
from ..io import BaseRaw
from ..io.pi... | {
"repo_name": "nicproulx/mne-python",
"path": "mne/preprocessing/xdawn.py",
"copies": "2",
"size": "24050",
"license": "bsd-3-clause",
"hash": -1052837821998981100,
"line_mean": 37.3572567783,
"line_max": 79,
"alpha_frac": 0.604033264,
"autogenerated": false,
"ratio": 3.910569105691057,
"config... |
import numpy as np
import copy as cp
from scipy import linalg
from .. import EvokedArray, Evoked
from ..cov import Covariance, _regularized_covariance
from ..decoding import TransformerMixin, BaseEstimator
from ..epochs import BaseEpochs, EpochsArray
from ..io import BaseRaw
from ..io.pick import _pick_data_channels
f... | {
"repo_name": "jaeilepp/mne-python",
"path": "mne/preprocessing/xdawn.py",
"copies": "1",
"size": "23960",
"license": "bsd-3-clause",
"hash": 4333271271549888000,
"line_mean": 37.4590690209,
"line_max": 79,
"alpha_frac": 0.6042988314,
"autogenerated": false,
"ratio": 3.9137536752695197,
"config... |
import numpy as np
from .. import EvokedArray, Evoked
from ..cov import Covariance, _regularized_covariance
from ..decoding import TransformerMixin, BaseEstimator
from ..epochs import BaseEpochs
from ..io import BaseRaw
from ..io.pick import _pick_data_channels, pick_info
from ..utils import logger, _check_option
d... | {
"repo_name": "wmvanvliet/mne-python",
"path": "mne/preprocessing/xdawn.py",
"copies": "8",
"size": "24565",
"license": "bsd-3-clause",
"hash": -4424322371641207300,
"line_mean": 37.2632398754,
"line_max": 81,
"alpha_frac": 0.5992672502,
"autogenerated": false,
"ratio": 3.9640148458931743,
"con... |
import numpy as np
import os.path as op
import sys
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_allclose)
import pytest
from scipy import linalg, stats
from mne import (Epochs, read_events, pick_types, compute_raw_covariance,
create_info... | {
"repo_name": "cjayb/mne-python",
"path": "mne/preprocessing/tests/test_xdawn.py",
"copies": "2",
"size": "12906",
"license": "bsd-3-clause",
"hash": 4714110974019135000,
"line_mean": 35.0502793296,
"line_max": 77,
"alpha_frac": 0.6300170463,
"autogenerated": false,
"ratio": 3.2748033494037045,
... |
import numpy as np
import os.path as op
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_allclose)
import pytest
from scipy import linalg, stats
from mne import (Epochs, read_events, pick_types, compute_raw_covariance,
create_info, EpochsArr... | {
"repo_name": "larsoner/mne-python",
"path": "mne/preprocessing/tests/test_xdawn.py",
"copies": "12",
"size": "12711",
"license": "bsd-3-clause",
"hash": 2742471655143441000,
"line_mean": 35.2136752137,
"line_max": 77,
"alpha_frac": 0.6300841791,
"autogenerated": false,
"ratio": 3.274343122102009... |
import numpy as np
import os.path as op
from numpy.testing import assert_array_equal, assert_array_almost_equal
import pytest
from mne import (Epochs, read_events, pick_types, compute_raw_covariance,
create_info, EpochsArray)
from mne.io import read_raw_fif
from mne.utils import requires_sklearn, ru... | {
"repo_name": "teonlamont/mne-python",
"path": "mne/preprocessing/tests/test_xdawn.py",
"copies": "4",
"size": "9263",
"license": "bsd-3-clause",
"hash": -8123568188286342000,
"line_mean": 34.9031007752,
"line_max": 77,
"alpha_frac": 0.6373745007,
"autogenerated": false,
"ratio": 3.24562018220042... |
import numpy as np
import os.path as op
from nose.tools import (assert_equal, assert_raises)
from numpy.testing import assert_array_equal
from mne import (io, Epochs, read_events, pick_types,
compute_raw_covariance)
from mne.utils import requires_sklearn, run_tests_if_main
from mne.preprocessing.xdawn... | {
"repo_name": "rajegannathan/grasp-lift-eeg-cat-dog-solution-updated",
"path": "python-packages/mne-python-0.10/mne/preprocessing/tests/test_xdawn.py",
"copies": "7",
"size": "5119",
"license": "bsd-3-clause",
"hash": -5406211505410505000,
"line_mean": 34.3034482759,
"line_max": 76,
"alpha_frac": 0.6... |
from functools import partial
import numpy as np
from ..parallel import parallel_func
from ..io.pick import _picks_to_idx
from ..utils import logger, verbose, _time_mask, _check_option
from .multitaper import psd_array_multitaper
def _decomp_aggregate_mask(epoch, func, average, freq_sl):
_, _, spect = func(epoc... | {
"repo_name": "rkmaddox/mne-python",
"path": "mne/time_frequency/psd.py",
"copies": "3",
"size": "12203",
"license": "bsd-3-clause",
"hash": 1125427525504660700,
"line_mean": 36.0911854103,
"line_max": 79,
"alpha_frac": 0.602065066,
"autogenerated": false,
"ratio": 3.5350521436848203,
"config_t... |
import math
import numpy as np
from ..cov import compute_whitener
from ..io.pick import pick_info
from ..forward import apply_forward
from ..utils import (logger, verbose, check_random_state, _check_preload,
_validate_type)
@verbose
def simulate_evoked(fwd, stc, info, cov, nave=30, iir_filter=N... | {
"repo_name": "wmvanvliet/mne-python",
"path": "mne/simulation/evoked.py",
"copies": "13",
"size": "5535",
"license": "bsd-3-clause",
"hash": 4018428514219388400,
"line_mean": 31.1802325581,
"line_max": 79,
"alpha_frac": 0.6072267389,
"autogenerated": false,
"ratio": 3.5277246653919696,
"config... |
from copy import deepcopy
DEFAULTS = dict(
color=dict(mag='darkblue', grad='b', eeg='k', eog='k', ecg='m', emg='k',
ref_meg='steelblue', misc='k', stim='k', resp='k', chpi='k',
exci='k', ias='k', syst='k', seeg='saddlebrown', dbs='seagreen',
dipole='k', gof='k', bio='k... | {
"repo_name": "mne-tools/mne-python",
"path": "mne/defaults.py",
"copies": "1",
"size": "5996",
"license": "bsd-3-clause",
"hash": 3246599432956493300,
"line_mean": 43.992481203,
"line_max": 79,
"alpha_frac": 0.5165441176,
"autogenerated": false,
"ratio": 2.6930693069306932,
"config_test": fals... |
import numpy as np
from ..annotations import _annotations_starts_stops
from ..utils import logger, verbose, sum_squared, warn
from ..filter import filter_data
from ..epochs import Epochs, BaseEpochs
from ..io.base import BaseRaw
from ..evoked import Evoked
from ..io import RawArray
from ..io.meas_info import create_i... | {
"repo_name": "Eric89GXL/mne-python",
"path": "mne/preprocessing/ecg.py",
"copies": "4",
"size": "13372",
"license": "bsd-3-clause",
"hash": 3921621859306722300,
"line_mean": 34.3756613757,
"line_max": 79,
"alpha_frac": 0.5762787915,
"autogenerated": false,
"ratio": 3.474149129644063,
"config_t... |
import numpy as np
from ._peak_finder import peak_finder
from .. import pick_types, pick_channels
from ..utils import logger, verbose, _pl
from ..filter import filter_data
from ..epochs import Epochs
@verbose
def find_eog_events(raw, event_id=998, l_freq=1, h_freq=10,
filter_length='10s', ch_nam... | {
"repo_name": "pravsripad/mne-python",
"path": "mne/preprocessing/eog.py",
"copies": "4",
"size": "9746",
"license": "bsd-3-clause",
"hash": -708202795352149100,
"line_mean": 36.6293436293,
"line_max": 79,
"alpha_frac": 0.5761337985,
"autogenerated": false,
"ratio": 3.7298124760811326,
"config_... |
import numpy as np
from ._peak_finder import peak_finder
from .. import pick_types, pick_channels
from ..utils import logger, verbose, _pl, warn, _validate_type
from ..filter import filter_data
from ..epochs import Epochs
@verbose
def find_eog_events(raw, event_id=998, l_freq=1, h_freq=10,
filte... | {
"repo_name": "rkmaddox/mne-python",
"path": "mne/preprocessing/eog.py",
"copies": "4",
"size": "9841",
"license": "bsd-3-clause",
"hash": -5767267788240983000,
"line_mean": 37.1434108527,
"line_max": 79,
"alpha_frac": 0.5779900417,
"autogenerated": false,
"ratio": 3.694069069069069,
"config_te... |
import os.path as op
import numpy as np
from numpy.testing import assert_allclose
import pytest
import matplotlib.pyplot as plt
from matplotlib import gridspec
from matplotlib.cm import get_cmap
import mne
from mne import (read_events, Epochs, read_cov, compute_covariance,
make_fixed_length_events, ... | {
"repo_name": "cjayb/mne-python",
"path": "mne/viz/tests/test_evoked.py",
"copies": "2",
"size": "20480",
"license": "bsd-3-clause",
"hash": 984194182765178500,
"line_mean": 41.9350104822,
"line_max": 79,
"alpha_frac": 0.6158203125,
"autogenerated": false,
"ratio": 3.1205241505409114,
"config_t... |
import os.path as op
import numpy as np
import pytest
import matplotlib.pyplot as plt
from mne import (read_events, read_cov, read_source_spaces, read_evokeds,
read_dipole, SourceEstimate, pick_events)
from mne.datasets import testing
from mne.filter import create_filter
from mne.io import read_raw_... | {
"repo_name": "bloyl/mne-python",
"path": "mne/viz/tests/test_misc.py",
"copies": "4",
"size": "10490",
"license": "bsd-3-clause",
"hash": 6789686757098178000,
"line_mean": 40.4624505929,
"line_max": 79,
"alpha_frac": 0.6128693994,
"autogenerated": false,
"ratio": 3.2679127725856696,
"config_te... |
import os.path as op
import numpy as np
import pytest
import matplotlib.pyplot as plt
from mne import (read_events, Epochs, pick_types, read_cov, create_info,
EpochsArray)
from mne.channels import read_layout
from mne.io import read_raw_fif, read_raw_ctf
from mne.utils import run_tests_if_main, _cli... | {
"repo_name": "Eric89GXL/mne-python",
"path": "mne/viz/tests/test_epochs.py",
"copies": "3",
"size": "17956",
"license": "bsd-3-clause",
"hash": 2370788399082171000,
"line_mean": 40.9322429907,
"line_max": 79,
"alpha_frac": 0.628071544,
"autogenerated": false,
"ratio": 3.205966416577349,
"confi... |
import os.path as op
from pathlib import Path
import sys
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
import pytest
import matplotlib.pyplot as plt
from matplotlib.colors import Colormap
from mne import (make_field_map, pick_channels_evoked, read_evokeds,
read_tra... | {
"repo_name": "rkmaddox/mne-python",
"path": "mne/viz/tests/test_3d.py",
"copies": "4",
"size": "36270",
"license": "bsd-3-clause",
"hash": 2781554980208545300,
"line_mean": 42.3827751196,
"line_max": 79,
"alpha_frac": 0.6070089335,
"autogenerated": false,
"ratio": 3.338672558225168,
"config_te... |
import os.path as op
import numpy as np
import pytest
from mne import (read_forward_solution, VolSourceEstimate, SourceEstimate,
VolVectorSourceEstimate, compute_source_morph)
from mne.datasets import testing
from mne.utils import (requires_dipy, requires_nibabel, requires_version,
... | {
"repo_name": "larsoner/mne-python",
"path": "mne/viz/tests/test_3d_mpl.py",
"copies": "12",
"size": "4910",
"license": "bsd-3-clause",
"hash": -2882074012672637000,
"line_mean": 41.6956521739,
"line_max": 79,
"alpha_frac": 0.6132382892,
"autogenerated": false,
"ratio": 3.1135066582117945,
"con... |
from collections import OrderedDict
from copy import deepcopy
from functools import partial
import os.path as op
import re
import numpy as np
from ..defaults import HEAD_SIZE_DEFAULT
from ..source_space import get_mni_fiducials
from ..viz import plot_montage
from ..transforms import (apply_trans, get_ras_to_neuromag... | {
"repo_name": "kambysese/mne-python",
"path": "mne/channels/montage.py",
"copies": "3",
"size": "47501",
"license": "bsd-3-clause",
"hash": -8233804157382751000,
"line_mean": 33.4960058097,
"line_max": 79,
"alpha_frac": 0.5719037494,
"autogenerated": false,
"ratio": 3.519113942806342,
"config_t... |
from collections import OrderedDict
from copy import deepcopy
from functools import partial
import os.path as op
import re
import numpy as np
from ..defaults import HEAD_SIZE_DEFAULT
from ..viz import plot_montage
from ..transforms import (apply_trans, get_ras_to_neuromag_trans, _sph_to_cart,
... | {
"repo_name": "cjayb/mne-python",
"path": "mne/channels/montage.py",
"copies": "1",
"size": "41279",
"license": "bsd-3-clause",
"hash": 7078422319586289000,
"line_mean": 32.7522485691,
"line_max": 79,
"alpha_frac": 0.5794956273,
"autogenerated": false,
"ratio": 3.494666440907552,
"config_test":... |
from collections import OrderedDict
from copy import deepcopy
import os.path as op
import re
import numpy as np
from ..defaults import HEAD_SIZE_DEFAULT
from ..source_space import get_mni_fiducials
from ..viz import plot_montage
from ..transforms import (apply_trans, get_ras_to_neuromag_trans, _sph_to_cart,
... | {
"repo_name": "rkmaddox/mne-python",
"path": "mne/channels/montage.py",
"copies": "1",
"size": "49018",
"license": "bsd-3-clause",
"hash": 8200921379285641000,
"line_mean": 33.446943078,
"line_max": 79,
"alpha_frac": 0.5789301889,
"autogenerated": false,
"ratio": 3.4774404086265607,
"config_tes... |
import xml.etree.ElementTree as ElementTree
import numpy as np
from ..utils import _check_fname, Bunch, warn
def _read_dig_montage_egi(
fname,
_scaling,
_all_data_kwargs_are_none,
):
if not _all_data_kwargs_are_none:
raise ValueError('hsp, hpi, elp, point_names, fif must all b... | {
"repo_name": "bloyl/mne-python",
"path": "mne/channels/_dig_montage_utils.py",
"copies": "4",
"size": "3178",
"license": "bsd-3-clause",
"hash": 7326778370010531000,
"line_mean": 30.78,
"line_max": 71,
"alpha_frac": 0.5462555066,
"autogenerated": false,
"ratio": 3.1496531219028743,
"config_tes... |
import xml.etree.ElementTree as ElementTree
import numpy as np
from ..utils import _check_fname, Bunch, warn
# XXX: to split as _parse like bvct
def _read_dig_montage_egi(
fname,
_scaling,
_all_data_kwargs_are_none,
):
if not _all_data_kwargs_are_none:
raise ValueError('hsp, h... | {
"repo_name": "kambysese/mne-python",
"path": "mne/channels/_dig_montage_utils.py",
"copies": "10",
"size": "3543",
"license": "bsd-3-clause",
"hash": -5107006308174334000,
"line_mean": 31.8055555556,
"line_max": 72,
"alpha_frac": 0.5515100198,
"autogenerated": false,
"ratio": 3.191891891891892,
... |
import logging
from collections import defaultdict
from itertools import combinations
import os.path as op
import numpy as np
from ..transforms import _pol_to_cart, _cart_to_sph
from ..io.pick import pick_types, _picks_to_idx, _FNIRS_CH_TYPES_SPLIT
from ..io.constants import FIFF
from ..io.meas_info import Info
from... | {
"repo_name": "olafhauk/mne-python",
"path": "mne/channels/layout.py",
"copies": "4",
"size": "36277",
"license": "bsd-3-clause",
"hash": 389587344575572160,
"line_mean": 32.8720821662,
"line_max": 79,
"alpha_frac": 0.5719326295,
"autogenerated": false,
"ratio": 3.650332058764339,
"config_test"... |
import copy
import os.path as op
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_allclose, assert_equal)
import pytest
import matplotlib.pyplot as plt
from mne.channels import (make_eeg_layout, make_grid_layout, read_layout,
... | {
"repo_name": "kambysese/mne-python",
"path": "mne/channels/tests/test_layout.py",
"copies": "8",
"size": "14482",
"license": "bsd-3-clause",
"hash": -2630535587476640000,
"line_mean": 37.9301075269,
"line_max": 79,
"alpha_frac": 0.62346361,
"autogenerated": false,
"ratio": 3.002072968490879,
"... |
import os.path as op
from collections import namedtuple
import numpy as np
import pytest
import matplotlib
import matplotlib.pyplot as plt
from mne import (read_events, Epochs, pick_channels_evoked, read_cov,
compute_proj_evoked)
from mne.channels import read_layout
from mne.io import read_raw_fif
f... | {
"repo_name": "kambysese/mne-python",
"path": "mne/viz/tests/test_topo.py",
"copies": "4",
"size": "12219",
"license": "bsd-3-clause",
"hash": -4769081443509096000,
"line_mean": 38.5436893204,
"line_max": 79,
"alpha_frac": 0.6069236435,
"autogenerated": false,
"ratio": 3.1467937161988155,
"conf... |
from ...utils import logger
class TimeCallBack(object):
"""Callback to update the time."""
def __init__(self, brain=None, callback=None):
self.brain = brain
self.callback = callback
self.widget = None
self.label = None
if self.brain is not None and callable(self.brain.... | {
"repo_name": "kambysese/mne-python",
"path": "mne/viz/_brain/callback.py",
"copies": "8",
"size": "3670",
"license": "bsd-3-clause",
"hash": 6619146925150753000,
"line_mean": 31.7678571429,
"line_max": 79,
"alpha_frac": 0.5760217984,
"autogenerated": false,
"ratio": 3.710819009100101,
"config_... |
import numpy as np
from ...utils import warn
class _LinkViewer(object):
"""Class to link multiple Brain objects."""
def __init__(self, brains, time=True, camera=False, colorbar=True,
picking=False):
self.brains = brains
self.leader = self.brains[0] # select a brain as leader... | {
"repo_name": "olafhauk/mne-python",
"path": "mne/viz/_brain/_linkviewer.py",
"copies": "1",
"size": "5424",
"license": "bsd-3-clause",
"hash": -7991061405514021000,
"line_mean": 33.7692307692,
"line_max": 72,
"alpha_frac": 0.5282079646,
"autogenerated": false,
"ratio": 4.011834319526627,
"conf... |
import numpy as np
from ...utils import warn
class _LinkViewer(object):
"""Class to link multiple _TimeViewer objects."""
def __init__(self, brains, time=True, camera=False, colorbar=True,
picking=False):
self.brains = brains
self.time_viewers = [brain.time_viewer for brain i... | {
"repo_name": "cjayb/mne-python",
"path": "mne/viz/_brain/_linkviewer.py",
"copies": "1",
"size": "6097",
"license": "bsd-3-clause",
"hash": 4912603595838474000,
"line_mean": 37.10625,
"line_max": 78,
"alpha_frac": 0.5527308512,
"autogenerated": false,
"ratio": 4.021767810026385,
"config_test":... |
import time
class IntSlider(object):
"""Class to set a integer slider."""
def __init__(self, plotter=None, callback=None, first_call=True):
self.plotter = plotter
self.callback = callback
self.slider_rep = None
self.first_call = first_call
self._first_time = True
... | {
"repo_name": "cjayb/mne-python",
"path": "mne/viz/_brain/callback.py",
"copies": "2",
"size": "6642",
"license": "bsd-3-clause",
"hash": -7909190215607484000,
"line_mean": 34.9027027027,
"line_max": 79,
"alpha_frac": 0.5596205962,
"autogenerated": false,
"ratio": 3.725182277061133,
"config_tes... |
import warnings
from ..utils import tight_layout
from ...fixes import nullcontext
class MplCanvas(object):
"""Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.)."""
def __init__(self, brain, width, height, dpi):
from PyQt5 import QtWidgets
from matplotlib import rc_context
... | {
"repo_name": "olafhauk/mne-python",
"path": "mne/viz/_brain/mplcanvas.py",
"copies": "4",
"size": "4113",
"license": "bsd-3-clause",
"hash": 3271264634933192700,
"line_mean": 34.4568965517,
"line_max": 77,
"alpha_frac": 0.5920252857,
"autogenerated": false,
"ratio": 3.7977839335180055,
"config... |
import pytest
from mne.viz.backends._utils import _get_colormap_from_array, _check_color
def test_get_colormap_from_array():
"""Test setting a colormap."""
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
cmap = _get_colormap_from_array()
assert isinstance(cmap, LinearSegmentedCo... | {
"repo_name": "drammock/mne-python",
"path": "mne/viz/backends/tests/test_utils.py",
"copies": "14",
"size": "1696",
"license": "bsd-3-clause",
"hash": -1647778924543880700,
"line_mean": 40.3658536585,
"line_max": 74,
"alpha_frac": 0.6326650943,
"autogenerated": false,
"ratio": 3.3451676528599608... |
import pytest
import warnings
def has_pyvista():
"""Check that pyvista is installed."""
try:
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
import pyvista # noqa: F401
return True
except ImportError:
return F... | {
"repo_name": "mne-tools/mne-python",
"path": "mne/viz/backends/tests/_utils.py",
"copies": "14",
"size": "1360",
"license": "bsd-3-clause",
"hash": 3828611227701893600,
"line_mean": 24.1851851852,
"line_max": 74,
"alpha_frac": 0.6345588235,
"autogenerated": false,
"ratio": 3.7158469945355193,
... |
import contextlib
from functools import partial
from io import BytesIO
import os
import os.path as op
import sys
import time
import copy
import traceback
import warnings
import numpy as np
from collections import OrderedDict
from .colormap import calculate_lut
from .surface import _Surface
from .view import views_di... | {
"repo_name": "kambysese/mne-python",
"path": "mne/viz/_brain/_brain.py",
"copies": "3",
"size": "135345",
"license": "bsd-3-clause",
"hash": 7461171128382669000,
"line_mean": 38.8994100295,
"line_max": 79,
"alpha_frac": 0.5166532356,
"autogenerated": false,
"ratio": 4.126014276127143,
"config_... |
import contextlib
from functools import partial
import os
import os.path as op
import sys
import time
import traceback
import warnings
import numpy as np
from scipy import sparse
from collections import OrderedDict
from .colormap import calculate_lut
from .surface import Surface
from .view import views_dicts, _lh_vi... | {
"repo_name": "olafhauk/mne-python",
"path": "mne/viz/_brain/_brain.py",
"copies": "1",
"size": "124138",
"license": "bsd-3-clause",
"hash": -949234620953247100,
"line_mean": 38.9555555556,
"line_max": 79,
"alpha_frac": 0.517120472,
"autogenerated": false,
"ratio": 4.164971296203041,
"config_te... |
import os
import os.path as op
import numpy as np
from scipy import sparse
from .colormap import calculate_lut
from .surface import Surface
from .view import views_dicts
from .._3d import _process_clim, _handle_time, _check_views
from ...defaults import _handle_default
from ...surface import mesh_edges
from ...sou... | {
"repo_name": "cjayb/mne-python",
"path": "mne/viz/_brain/_brain.py",
"copies": "1",
"size": "72764",
"license": "bsd-3-clause",
"hash": -5216350835268853000,
"line_mean": 41.4095682614,
"line_max": 79,
"alpha_frac": 0.5052414362,
"autogenerated": false,
"ratio": 4.259346068205789,
"config_test... |
from os import path as path
import numpy as np
from ...utils import _check_option, get_subjects_dir, _check_fname
from ...surface import (complete_surface_info, read_surface, read_curvature,
_read_patch)
class Surface(object):
"""Container for a brain surface.
It is used for storing... | {
"repo_name": "Eric89GXL/mne-python",
"path": "mne/viz/_brain/surface.py",
"copies": "4",
"size": "5652",
"license": "bsd-3-clause",
"hash": -245781541497509860,
"line_mean": 33.4634146341,
"line_max": 78,
"alpha_frac": 0.5633404105,
"autogenerated": false,
"ratio": 3.795836131631968,
"config_t... |
from os import path as path
import numpy as np
from ...utils import (_check_option, get_subjects_dir, _check_fname,
_validate_type)
from ...surface import (complete_surface_info, read_surface, read_curvature,
_read_patch)
class _Surface(object):
"""Container for a b... | {
"repo_name": "pravsripad/mne-python",
"path": "mne/viz/_brain/surface.py",
"copies": "4",
"size": "5638",
"license": "bsd-3-clause",
"hash": -7925885811843590000,
"line_mean": 33.3780487805,
"line_max": 78,
"alpha_frac": 0.5693508336,
"autogenerated": false,
"ratio": 3.6777560339204176,
"confi... |
ORIGIN = (0., 0., 0.)
_lh_views_dict = {
'lateral': dict(azimuth=180., elevation=90., focalpoint=ORIGIN),
'medial': dict(azimuth=0., elevation=90.0, focalpoint=ORIGIN),
'rostral': dict(azimuth=90., elevation=90., focalpoint=ORIGIN),
'caudal': dict(azimuth=270., elevation=90., focalpoint=ORIGIN),
'... | {
"repo_name": "cjayb/mne-python",
"path": "mne/viz/_brain/view.py",
"copies": "1",
"size": "2460",
"license": "bsd-3-clause",
"hash": 5092091875669264000,
"line_mean": 48.2,
"line_max": 77,
"alpha_frac": 0.6634146341,
"autogenerated": false,
"ratio": 2.8018223234624147,
"config_test": false,
... |
ORIGIN = 'auto'
_lh_views_dict = {
'lateral': dict(azimuth=180., elevation=90., focalpoint=ORIGIN),
'medial': dict(azimuth=0., elevation=90.0, focalpoint=ORIGIN),
'rostral': dict(azimuth=90., elevation=90., focalpoint=ORIGIN),
'caudal': dict(azimuth=270., elevation=90., focalpoint=ORIGIN),
'dorsal... | {
"repo_name": "rkmaddox/mne-python",
"path": "mne/viz/_brain/view.py",
"copies": "4",
"size": "2444",
"license": "bsd-3-clause",
"hash": 130792210452457100,
"line_mean": 47.88,
"line_max": 75,
"alpha_frac": 0.6693944354,
"autogenerated": false,
"ratio": 2.7709750566893425,
"config_test": false,... |
import numpy as np
def create_lut(cmap, n_colors=256, center=None):
"""Return a colormap suitable for setting as a LUT."""
from .._3d import _get_cmap
assert not (isinstance(cmap, str) and cmap == 'auto')
cmap = _get_cmap(cmap)
lut = np.round(cmap(np.linspace(0, 1, n_colors)) * 255.0).astype(np.i... | {
"repo_name": "larsoner/mne-python",
"path": "mne/viz/_brain/colormap.py",
"copies": "10",
"size": "6336",
"license": "bsd-3-clause",
"hash": -4906017524813142000,
"line_mean": 35.4137931034,
"line_max": 78,
"alpha_frac": 0.5473484848,
"autogenerated": false,
"ratio": 3.3918629550321198,
"confi... |
import numpy as np
def create_lut(cmap, n_colors=256, center=None):
"""Return a colormap suitable for setting as a LUT."""
from matplotlib import cm
assert not (isinstance(cmap, str) and cmap == 'auto')
cmap = cm.get_cmap(cmap)
lut = np.round(cmap(np.linspace(0, 1, n_colors)) * 255.0).astype(np.i... | {
"repo_name": "cjayb/mne-python",
"path": "mne/viz/_brain/colormap.py",
"copies": "3",
"size": "6336",
"license": "bsd-3-clause",
"hash": -7826436246835470000,
"line_mean": 35.4137931034,
"line_max": 78,
"alpha_frac": 0.5481376263,
"autogenerated": false,
"ratio": 3.4009661835748792,
"config_te... |
from tempfile import mkdtemp
import shutil
import numpy as np
from scipy import sparse
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_raises_regex
from sklearn.utils.testing im... | {
"repo_name": "herilalaina/scikit-learn",
"path": "sklearn/linear_model/tests/test_randomized_l1.py",
"copies": "30",
"size": "8448",
"license": "bsd-3-clause",
"hash": -7266434552057381000,
"line_mean": 37.930875576,
"line_max": 79,
"alpha_frac": 0.5963541667,
"autogenerated": false,
"ratio": 3.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.