text stringlengths 0 1.05M | meta dict |
|---|---|
'''Analog to Digital sensor (in ADC0) for the esp8266 microcontroller'''
# author: Daniel Mizyrycki
# license: MIT
# repository: https://github.com/mzdaniel/micropython-iot
from machine import ADC
class ADCSensor:
def __init__(self, sensor_id='adc', min_rd=0, max_rd=1024,
min_val=0, ma... | {
"repo_name": "mpi-sws-rse/thingflow-python",
"path": "micropython/sensors/adc_esp8266.py",
"copies": "1",
"size": "1236",
"license": "apache-2.0",
"hash": 2465018510559578600,
"line_mean": 29.1463414634,
"line_max": 72,
"alpha_frac": 0.5768608414,
"autogenerated": false,
"ratio": 3.4049586776859... |
# anal.py
import os
import sys
import pickle
import json
import yaml
import h5py
import itertools
import numpy as np
import matplotlib.pyplot as plt
from collections import defaultdict as ddict
from sklearn.metrics import confusion_matrix
from sklearn.metrics import roc_auc_score
from sklearn.metrics import average_pre... | {
"repo_name": "tttor/csipb-jamu-prj",
"path": "predictor/connectivity/classifier/imbalance/anal.py",
"copies": "1",
"size": "5452",
"license": "mit",
"hash": 1040749159826671000,
"line_mean": 34.6339869281,
"line_max": 92,
"alpha_frac": 0.6320616288,
"autogenerated": false,
"ratio": 3.00385674931... |
# anal.py
import os
import sys
import pickle
import yaml
import matplotlib.pyplot as plt
metrics = ['calinskiharabaz','silhouette']
def main():
if len(sys.argv)!=2:
print 'USAGE:'
print 'python anal.py [targetClusterDir]'
return
tdir = sys.argv[1]
odir = os.path.join(tdir,'anal')
if not... | {
"repo_name": "tttor/csipb-jamu-prj",
"path": "predictor/connectivity/cluster/anal.py",
"copies": "1",
"size": "2736",
"license": "mit",
"hash": 2969728882767532500,
"line_mean": 35.972972973,
"line_max": 103,
"alpha_frac": 0.5372807018,
"autogenerated": false,
"ratio": 3,
"config_test": false,... |
# an alternative approach
from SimpleCV import Color, Display, Image, Line
from util import dist, show_img, timer, cart_to_polar
import PIL
import numpy as np
from math import sqrt, ceil, pi, atan2
class ParsedFrame:
def __init__(self, img, bimg, arr, rot_arr, rot_img, cursor_r, cursor_angle):
w,h = img... | {
"repo_name": "david-crespo/py-super-hexagon",
"path": "parse.py",
"copies": "1",
"size": "4827",
"license": "mit",
"hash": -8301702377197169000,
"line_mean": 27.0697674419,
"line_max": 104,
"alpha_frac": 0.5825564533,
"autogenerated": false,
"ratio": 3.116204002582311,
"config_test": false,
... |
# An alternative formulation of namedtuples
import operator
import types
import sys
def named_tuple(classname, fieldnames):
# Populate a dictionary of field property accessors
cls_dict = { name: property(operator.itemgetter(n))
for n, name in enumerate(fieldnames) }
# Make a __new__ func... | {
"repo_name": "tuanavu/python-cookbook-3rd",
"path": "src/9/defining_classes_programmatically/example2.py",
"copies": "2",
"size": "1050",
"license": "mit",
"hash": -1651122735494921700,
"line_mean": 27.3783783784,
"line_max": 76,
"alpha_frac": 0.5666666667,
"autogenerated": false,
"ratio": 3.583... |
"""An alternative Rasterio raster calculator."""
__version__ = '0.1'
__author__ = 'Kevin Wurster'
__email__ = 'wursterk@gmail.com'
__source__ = 'https://github.com/geowurster/rio-eval-calc'
__license__ = """
New BSD License
Copyright (c) 2015-2016, Kevin D. Wurster
All rights reserved.
Redistribution and use in sou... | {
"repo_name": "geowurster/rio-eval-calc",
"path": "rio_eval_calc/__init__.py",
"copies": "1",
"size": "1703",
"license": "bsd-3-clause",
"hash": 265939180232381980,
"line_mean": 43.8157894737,
"line_max": 78,
"alpha_frac": 0.7856723429,
"autogenerated": false,
"ratio": 4.344387755102041,
"confi... |
# analy_mod_.py
# revised version
# A python program to analyze the SUS weighting function in order to reach the following goals:
# 1. plot the weight function
# 2. generate the normalized distribution for Z=1
# 3. extrapolate the N distribution for different Zs given by the user.
# Author: Yuding Ai
# Date: 2015 Nov 1... | {
"repo_name": "Aieener/SUS_3D",
"path": "DATA/8_32_32_128_1E7/analy_mod_.py",
"copies": "1",
"size": "2457",
"license": "mit",
"hash": 2260506233576298500,
"line_mean": 21.9626168224,
"line_max": 95,
"alpha_frac": 0.6308506309,
"autogenerated": false,
"ratio": 2.418307086614173,
"config_test": ... |
# analy.py
# A python program to analyze the SUS weighting function in order to reach the following goals:
# 1. plot the weight function
# 2. generate the normalized distribution for Z=1
# 3. extrapolate the N distribution for different Zs given by the user.
# Author: Yuding Ai
# Date: 2015 Oct 23
import math
import n... | {
"repo_name": "Aieener/SUS_on_S",
"path": "Data/1E6/Z=1/analy.py",
"copies": "1",
"size": "2480",
"license": "mit",
"hash": 8014293537017971000,
"line_mean": 21.3423423423,
"line_max": 95,
"alpha_frac": 0.6120967742,
"autogenerated": false,
"ratio": 2.373205741626794,
"config_test": false,
"h... |
"""Analyse popular nuget packages."""
from bs4 import BeautifulSoup
from re import compile as re_compile
from requests import get
from .base import AnalysesBaseHandler
from f8a_worker.solver import NugetReleasesFetcher
class NugetPopularAnalyses(AnalysesBaseHandler):
"""Analyse popular nuget packages."""
_... | {
"repo_name": "fabric8-analytics/fabric8-analytics-jobs",
"path": "f8a_jobs/handlers/nuget_popular_analyses.py",
"copies": "1",
"size": "3058",
"license": "apache-2.0",
"hash": 8572497280540400000,
"line_mean": 45.3333333333,
"line_max": 99,
"alpha_frac": 0.5696533682,
"autogenerated": false,
"ra... |
"""Analyser class for running analysis on columns depending on the column type"""
import re
from statistics import mode, StatisticsError
from math import floor, log10, pow, ceil
threshold = 0.9
max_Outliers = 100
standardDeviations = 3
re_date = re.compile('^((31(\/|-)(0?[13578]|1[02]))(\/|-)|((29|30)(\/|-)(0?[1,3-... | {
"repo_name": "lilfolr/CITS4406-Assignment2",
"path": "analyser.py",
"copies": "1",
"size": "18929",
"license": "mit",
"hash": -2797921422660496400,
"line_mean": 34.6384180791,
"line_max": 310,
"alpha_frac": 0.5282460498,
"autogenerated": false,
"ratio": 3.9234916027368856,
"config_test": false... |
"""Analyser of Assembly code that recognizes standard macros of the
compiler."""
import logging
import collections
from . import instructions
Push = collections.namedtuple('Push', ['arg', 'tmp'])
Pop = collections.namedtuple('Pop', ['arg', 'tmp'])
class Analyzer:
def __init__(self, program):
self.progra... | {
"repo_name": "ProgVal/pydigmips",
"path": "pydigmips/assembly_analysis.py",
"copies": "1",
"size": "1383",
"license": "mit",
"hash": -5587019729106984000,
"line_mean": 26.66,
"line_max": 67,
"alpha_frac": 0.5444685466,
"autogenerated": false,
"ratio": 4.055718475073314,
"config_test": false,
... |
"""Analyses datasets"""
from csv import reader
def parse_bus_stops(filename, suburb_filter=""):
"""Parses a csv file of bus stops
Returns a list of bus stops
"""
bus_stops = []
with open(filename, "rb") as bus_stop_file:
bus_csv_reader = reader(bus_stop_file)
header = bus_csv_reade... | {
"repo_name": "r-portas/brisbane-bus-stops",
"path": "analyse.py",
"copies": "1",
"size": "2506",
"license": "mit",
"hash": -4975846715688513000,
"line_mean": 26.5494505495,
"line_max": 104,
"alpha_frac": 0.5139664804,
"autogenerated": false,
"ratio": 3.5246132208157523,
"config_test": false,
... |
"""Analyse the polarity of cells using tensors."""
import os
import os.path
import argparse
import logging
import warnings
import PIL
import numpy as np
import skimage.draw
from jicbioimage.core.util.array import pretty_color_array
from jicbioimage.core.io import (
AutoName,
AutoWrite,
)
from jicbioimage.ill... | {
"repo_name": "JIC-Image-Analysis/leaf-cell-polarisation-tensors",
"path": "scripts/automated_analysis.py",
"copies": "1",
"size": "4679",
"license": "mit",
"hash": -2390279877104362500,
"line_mean": 32.6618705036,
"line_max": 93,
"alpha_frac": 0.6633896132,
"autogenerated": false,
"ratio": 3.681... |
"""Analyse the polarity of cells using tensors.
This script makes use of a Gaussian projection as a pre-processing step prior
to segmentation of the cell wall and marker channels.
"""
import os
import os.path
import argparse
import logging
import PIL
import numpy as np
import skimage.feature
from jicbioimage.core.u... | {
"repo_name": "JIC-Image-Analysis/leaf-cell-polarisation-tensors",
"path": "scripts/automated_gaussproj_analysis.py",
"copies": "1",
"size": "5901",
"license": "mit",
"hash": -3817863702827571000,
"line_mean": 33.3081395349,
"line_max": 77,
"alpha_frac": 0.6609049314,
"autogenerated": false,
"rat... |
"""Analyse top maven popular projects."""
import bs4
from collections import OrderedDict
import os
import re
import requests
import tempfile
from selinon import StoragePool
from shutil import rmtree
from .base import AnalysesBaseHandler
from f8a_worker.utils import cwd, TimedCommand
from f8a_worker.errors import Task... | {
"repo_name": "fabric8-analytics/fabric8-analytics-jobs",
"path": "f8a_jobs/handlers/maven_popular_analyses.py",
"copies": "1",
"size": "10306",
"license": "apache-2.0",
"hash": -9137589073530232000,
"line_mean": 46.9348837209,
"line_max": 100,
"alpha_frac": 0.5356103241,
"autogenerated": false,
... |
"""Analyse top npm popular packages."""
import bs4
import requests
from .base import AnalysesBaseHandler
try:
import xmlrpclib
except ImportError:
import xmlrpc.client as xmlrpclib
class PythonPopularAnalyses(AnalysesBaseHandler):
"""Analyse top npm popular packages."""
_URL = 'http://pypi-ranking.i... | {
"repo_name": "fabric8-analytics/fabric8-analytics-jobs",
"path": "f8a_jobs/handlers/python_popular_analyses.py",
"copies": "1",
"size": "4111",
"license": "apache-2.0",
"hash": 8720407663141008000,
"line_mean": 38.5288461538,
"line_max": 92,
"alpha_frac": 0.5789345658,
"autogenerated": false,
"r... |
"""Analysis and modification of structural data exported from GeoModeller
All structural data from an entire GeoModeller project can be exported into ASCII
files using the function in the GUI:
Export -> 3D Structural Data
This method generates files for defined geological parameters:
"Points" (i.e. formation contact... | {
"repo_name": "Leguark/pygeomod",
"path": "pygeomod/struct_data.py",
"copies": "3",
"size": "17593",
"license": "mit",
"hash": 3902953201581329000,
"line_mean": 36.6723768737,
"line_max": 115,
"alpha_frac": 0.5279372478,
"autogenerated": false,
"ratio": 4.061172668513389,
"config_test": false,
... |
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import math
from matplotlib import rc
rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)
def his():
N1 = [] # Ver
N2 = [] # Hor
N3 = [] # Up
N = [] # Total number
with open("dataplot.dat","r") as file:
... | {
"repo_name": "Aieener/SUS_3D",
"path": "DATA/GCMC_data_one_specie_model/1E11L_8_64_9.65_2nd_coex/his.py",
"copies": "1",
"size": "4276",
"license": "mit",
"hash": -562595815348245000,
"line_mean": 29.1197183099,
"line_max": 121,
"alpha_frac": 0.6426566885,
"autogenerated": false,
"ratio": 2.4267... |
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
def his():
N1 = [] # Ver
N2 = [] # Hor
N = [] # tot
with open("dataplot.dat","r") as file:
for line in file:
words = line.split()
n1 = float(words[2]) # Ver
n2 = float(words[3]) # Hor
ntot = n1 + n2
N1.append(n1);
... | {
"repo_name": "Aieener/HRE",
"path": "his.py",
"copies": "1",
"size": "2398",
"license": "mit",
"hash": -3927022510344414700,
"line_mean": 26.8837209302,
"line_max": 86,
"alpha_frac": 0.6743119266,
"autogenerated": false,
"ratio": 2.436991869918699,
"config_test": false,
"has_no_keywords": fa... |
"""Analysis engine service."""
import dacite
import pandas as pd
from math import log, pi
from CoolProp.CoolProp import PropsSI
from CoolProp.HumidAirProp import HAPropsSI
from scipy.stats import chi2
from uncertainties import ufloat
from coimbra_chamber.access.experiment.service import ExperimentAccess
from coimbr... | {
"repo_name": "rinman24/ucsd_ch",
"path": "coimbra_chamber/engine/analysis/service.py",
"copies": "1",
"size": "24723",
"license": "mit",
"hash": -7547856592103409000,
"line_mean": 32.5,
"line_max": 82,
"alpha_frac": 0.4255551511,
"autogenerated": false,
"ratio": 3.636804942630185,
"config_test... |
# Analysis Example
# Minimum, maximum, and average
# Get the minimum, maximum, and the average value of the variable temperature from your device,
# and save these values in new variables
# Instructions
# To run this analysis you need to add a device token to the environment variables,
# To do that, go to your device... | {
"repo_name": "tago-io/tago-python",
"path": "!example/min_max_avg.py",
"copies": "1",
"size": "3616",
"license": "mit",
"hash": -7336758297467804000,
"line_mean": 30.1724137931,
"line_max": 110,
"alpha_frac": 0.6725663717,
"autogenerated": false,
"ratio": 3.842720510095643,
"config_test": fals... |
#analysis files
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QFileDialog
from analysis_gui import Ui_Analysis
import numpy as np
import matplotlib,math,csv
matplotlib.use('Qt5Agg')
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backen... | {
"repo_name": "ElectronicNose/Electronic-Nose",
"path": "analysis.py",
"copies": "1",
"size": "27688",
"license": "mit",
"hash": -6801433839231590000,
"line_mean": 42.3717948718,
"line_max": 435,
"alpha_frac": 0.5419676394,
"autogenerated": false,
"ratio": 3.1103122893731747,
"config_test": fal... |
"""Analysis functions for place field data."""
import numpy as np
import math
import pandas as pd
from mpl_toolkits.axes_grid1 import make_axes_locatable
import matplotlib.pyplot as plt
try:
from bottleneck import nanmean
except ImportError:
from numpy import nanmean
from pycircstat.descriptive import _complex... | {
"repo_name": "losonczylab/Zaremba_NatNeurosci_2017",
"path": "losonczy_analysis_bundle/lab/analysis/place_cell_analysis.py",
"copies": "1",
"size": "137809",
"license": "mit",
"hash": 5799012853106272000,
"line_mean": 37.7975788288,
"line_max": 119,
"alpha_frac": 0.5528739052,
"autogenerated": fal... |
"""Analysis functions (mostly for psychophysics data).
"""
from collections import namedtuple
import warnings
import numpy as np
import scipy.stats as ss
from scipy.optimize import curve_fit
from .._utils import string_types
def press_times_to_hmfc(presses, targets, foils, tmin, tmax,
retur... | {
"repo_name": "rkmaddox/expyfun",
"path": "expyfun/analyze/_analyze.py",
"copies": "1",
"size": "13837",
"license": "bsd-3-clause",
"hash": -8320991507887767000,
"line_mean": 33.9419191919,
"line_max": 79,
"alpha_frac": 0.5913131459,
"autogenerated": false,
"ratio": 3.527147591129238,
"config_t... |
"""Analysis functions (mostly for psychophysics data).
"""
import numpy as np
from ..visual import FixationDot
from ..analyze import sigmoid
from .._utils import logger, verbose_dec
from ..stimuli import window_edges
def _check_pyeparse():
"""Helper to ensure package is available"""
try:
import pyep... | {
"repo_name": "LABSN/expyfun",
"path": "expyfun/codeblocks/_pupillometry.py",
"copies": "2",
"size": "10207",
"license": "bsd-3-clause",
"hash": 7489609465371853000,
"line_mean": 34.6888111888,
"line_max": 79,
"alpha_frac": 0.5716665034,
"autogenerated": false,
"ratio": 3.4576558265582658,
"con... |
"""Analysis functions (mostly for psychophysics data).
"""
import warnings
import numpy as np
import scipy.stats as ss
from scipy.optimize import curve_fit
from functools import partial
from collections import namedtuple
def press_times_to_hmfc(presses, targets, foils, tmin, tmax,
return_type... | {
"repo_name": "lkishline/expyfun",
"path": "expyfun/analyze/_analyze.py",
"copies": "1",
"size": "11928",
"license": "bsd-3-clause",
"hash": -5782529164248100000,
"line_mean": 33.1776504298,
"line_max": 79,
"alpha_frac": 0.5885311871,
"autogenerated": false,
"ratio": 3.4795799299883314,
"config... |
"""analysis grouping
Revision ID: 591a97d42d42
Revises: 33af744196bc
Create Date: 2014-02-11 13:40:07.664778
"""
# revision identifiers, used by Alembic.
revision = '591a97d42d42'
down_revision = '33af744196bc'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('proc_AnalysisGroupTa... | {
"repo_name": "USGSDenverPychron/pychron",
"path": "migration/versions/591a97d42d42_analysis_grouping.py",
"copies": "1",
"size": "1267",
"license": "apache-2.0",
"hash": -423161281346383940,
"line_mean": 35.2,
"line_max": 107,
"alpha_frac": 0.6140489345,
"autogenerated": false,
"ratio": 3.759643... |
"""analysismanager URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
... | {
"repo_name": "CARPEM/GalaxyDocker",
"path": "data-manager-hegp/analysisManager/analysismanager/analysismanager/urls.py",
"copies": "1",
"size": "1158",
"license": "mit",
"hash": -2101165795094498600,
"line_mean": 40.3571428571,
"line_max": 130,
"alpha_frac": 0.7176165803,
"autogenerated": false,
... |
"""Analysis methods for TACA."""
import glob
import logging
import os
import subprocess
from shutil import copyfile
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.illumina.HiSeq_Runs import HiSeq_Run
from taca.illumina.MiSeq_Runs import MiSeq_Run
from taca.illumina.NextSeq_Runs import NextSeq_Run
from taca... | {
"repo_name": "SciLifeLab/TACA",
"path": "taca/analysis/analysis.py",
"copies": "1",
"size": "18011",
"license": "mit",
"hash": -195847128657923900,
"line_mean": 46.9015957447,
"line_max": 125,
"alpha_frac": 0.5901393593,
"autogenerated": false,
"ratio": 4.081350555177884,
"config_test": true,
... |
"""Analysis module for Databench."""
from __future__ import absolute_import, unicode_literals, division
from . import utils
from .datastore import Datastore
import inspect
import logging
import random
import string
import tornado.gen
import wrapt
log = logging.getLogger(__name__)
class ActionHandler(object):
"... | {
"repo_name": "svenkreiss/databench",
"path": "databench/analysis.py",
"copies": "1",
"size": "7591",
"license": "mit",
"hash": -5552864817687256000,
"line_mean": 28.8858267717,
"line_max": 79,
"alpha_frac": 0.6346989856,
"autogenerated": false,
"ratio": 4.1255434782608695,
"config_test": false... |
"""Analysis module for Databench."""
from __future__ import absolute_import, unicode_literals, division
from . import __version__ as DATABENCH_VERSION
from .analysis import ActionHandler
from .readme import Readme
from .utils import json_encoder_default
from collections import defaultdict
import functools
import glob... | {
"repo_name": "svenkreiss/databench",
"path": "databench/meta.py",
"copies": "1",
"size": "9388",
"license": "mit",
"hash": 1934442513545567200,
"line_mean": 33.5147058824,
"line_max": 79,
"alpha_frac": 0.5597571368,
"autogenerated": false,
"ratio": 4.391019644527596,
"config_test": false,
"h... |
# ANALYSIS MODULE FOR NFL PREDICT
import nfldb, nfldbc, nflgame
import json
dbc = nfldbc.dbc
def get_team(team_name):
with nfldb.Tx(dbc) as cursor:
cursor.execute('SELECT * FROM team WHERE team_id = %s', [team_name,])
return cursor.fetchone()
def get_all_teams():
with nfldb.Tx(dbc) as cursor... | {
"repo_name": "strandx/nflpredict",
"path": "predict/nflanalyze.py",
"copies": "1",
"size": "3169",
"license": "mit",
"hash": 3040591709024404500,
"line_mean": 34.2111111111,
"line_max": 105,
"alpha_frac": 0.6481539918,
"autogenerated": false,
"ratio": 3.3498942917547567,
"config_test": false,
... |
""" Analysis Module for Pyneal Real-time Scan
These tools will set up and apply the specified analysis steps to incoming
volume data during a real-time scan
"""
import os
import sys
import logging
import importlib
import numpy as np
import nibabel as nib
class Analyzer:
""" Analysis Class
This is the mai... | {
"repo_name": "jeffmacinnes/pyneal",
"path": "src/pynealAnalysis.py",
"copies": "1",
"size": "6539",
"license": "mit",
"hash": -8028475021501976000,
"line_mean": 36.7976878613,
"line_max": 105,
"alpha_frac": 0.5996329714,
"autogenerated": false,
"ratio": 4.6607270135424095,
"config_test": false... |
"""analysis module."""
import datetime
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Sum
from apps.managers.log_mgr.models import MakahikiLog
from apps.managers.player_mgr import player_mgr
from apps.managers.player_mgr.models import Prof... | {
"repo_name": "justinslee/Wai-Not-Makahiki",
"path": "makahiki/apps/widgets/status/analysis.py",
"copies": "2",
"size": "10332",
"license": "mit",
"hash": 8380279694374474000,
"line_mean": 30.2145015106,
"line_max": 97,
"alpha_frac": 0.5857530004,
"autogenerated": false,
"ratio": 3.74483508517578... |
"""analysis module."""
import datetime
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Sum, Q
from apps.managers.log_mgr.models import MakahikiLog
from apps.managers.player_mgr import player_mgr
from apps.managers.player_mgr.models import P... | {
"repo_name": "jtakayama/makahiki-draft",
"path": "makahiki/apps/widgets/status/analysis.py",
"copies": "2",
"size": "13096",
"license": "mit",
"hash": -3547825688593700400,
"line_mean": 32.5794871795,
"line_max": 97,
"alpha_frac": 0.5633781307,
"autogenerated": false,
"ratio": 3.8699763593380614... |
""" Analysis module provides general functions used for examining the results
of running feature detection on a dataset of images.
"""
import functools
import logging
import re
import random
import numpy as np
import pandas as pd
from sklearn import manifold, preprocessing
from mia.features.blobs import blob_props
fr... | {
"repo_name": "samueljackson92/major-project",
"path": "src/mia/analysis.py",
"copies": "1",
"size": "10346",
"license": "mit",
"hash": 8828946646216008000,
"line_mean": 33.602006689,
"line_max": 80,
"alpha_frac": 0.694567949,
"autogenerated": false,
"ratio": 3.7814327485380117,
"config_test": ... |
"""analysis nature issues
Revision ID: 57f1d2b5c2b1
Revises: 3421025b5e5e
Create Date: 2015-08-12 18:02:34.537329
"""
# revision identifiers, used by Alembic.
revision = '57f1d2b5c2b1'
down_revision = '3421025b5e5e'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by A... | {
"repo_name": "Code4SA/mma-dexter",
"path": "migrations/versions/57f1d2b5c2b1_analysis_nature_issues.py",
"copies": "1",
"size": "1418",
"license": "apache-2.0",
"hash": 2588920971233580500,
"line_mean": 33.5853658537,
"line_max": 97,
"alpha_frac": 0.6868829337,
"autogenerated": false,
"ratio": 3... |
"""analysis nature topics
Revision ID: 44ec193d1661
Revises: 57f1d2b5c2b1
Create Date: 2015-08-13 13:07:26.025968
"""
# revision identifiers, used by Alembic.
revision = '44ec193d1661'
down_revision = '57f1d2b5c2b1'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():... | {
"repo_name": "Code4SA/mma-dexter",
"path": "migrations/versions/44ec193d1661_analysis_nature_topics.py",
"copies": "1",
"size": "1455",
"license": "apache-2.0",
"hash": -8611658522346166000,
"line_mean": 34.487804878,
"line_max": 97,
"alpha_frac": 0.6920962199,
"autogenerated": false,
"ratio": 3... |
"""Analysis of an fMRI dataset with a Finite Impule Response (FIR) model
=====================================================================
FIR models are used to estimate the hemodyamic response non-parametrically.
The example below shows that they're good to do statistical inference
even on fast event-related fMR... | {
"repo_name": "nistats/nistats",
"path": "examples/02_first_level_models/plot_fir_model.py",
"copies": "1",
"size": "4795",
"license": "bsd-3-clause",
"hash": 8461724966383554000,
"line_mean": 40.6956521739,
"line_max": 370,
"alpha_frac": 0.6129301356,
"autogenerated": false,
"ratio": 3.814638027... |
"""Analysis of calcium imaging time series data"""
import os
import warnings
import numpy as np
import scipy
from scipy.fftpack import fft, fftfreq
from scipy import corrcoef
from scipy.cluster import hierarchy
from scipy.stats import mode, chisquare, zscore
from scipy.spatial.distance import squareform
try:
from ... | {
"repo_name": "losonczylab/Zaremba_NatNeurosci_2017",
"path": "losonczy_analysis_bundle/lab/analysis/imaging_analysis.py",
"copies": "1",
"size": "88430",
"license": "mit",
"hash": -2544790426250544000,
"line_mean": 39.0861287398,
"line_max": 116,
"alpha_frac": 0.5775076332,
"autogenerated": false,... |
"""Analysis of centroid residuals for determining suitable refinement and
outlier rejection parameters automatically"""
import math
from scitbx.math.periodogram import Periodogram
from dials.array_family import flex
RAD2DEG = 180.0 / math.pi
class CentroidAnalyser:
def __init__(self, reflections, av_callback... | {
"repo_name": "dials/dials",
"path": "algorithms/refinement/analysis/centroid_analysis.py",
"copies": "1",
"size": "10489",
"license": "bsd-3-clause",
"hash": 6015165620809982000,
"line_mean": 41.6382113821,
"line_max": 88,
"alpha_frac": 0.5170178282,
"autogenerated": false,
"ratio": 3.9196562032... |
# # Analysis of combined data sets: Counts vs. angle
#
# 7/18/2018
#
# Doing this in energy space because that is more accurate.
# Import packages ------------------------------
import os
import sys
import matplotlib.pyplot as plt
import numpy as np
import imageio
import pandas as pd
import seaborn as sns
sns.set(st... | {
"repo_name": "pfschus/fission_bicorrelation",
"path": "scripts/plot_counts_vs_angle_E.py",
"copies": "1",
"size": "2825",
"license": "mit",
"hash": -8524715376864720000,
"line_mean": 38.2361111111,
"line_max": 153,
"alpha_frac": 0.6431858407,
"autogenerated": false,
"ratio": 2.5245755138516532,
... |
"""Analysis of current MOS temperature bias."""
import sys
import pytz
from pyiem.plot import MapPlot, get_cmap
from pyiem.util import get_dbconn, utc
def doit(now, model):
""" Figure out the model runtime we care about """
mos_pgconn = get_dbconn("mos")
iem_pgconn = get_dbconn("iem")
mcursor = mos_p... | {
"repo_name": "akrherz/iem",
"path": "scripts/mos/current_bias.py",
"copies": "1",
"size": "3425",
"license": "mit",
"hash": 6647644696432409000,
"line_mean": 26.1825396825,
"line_max": 76,
"alpha_frac": 0.5258394161,
"autogenerated": false,
"ratio": 3.127853881278539,
"config_test": false,
"... |
"""Analysis of mouse behavior during in vivo calcium imaging"""
import numpy as np
from matplotlib import pyplot as plt
import itertools as it
from scipy.ndimage.filters import gaussian_filter1d
import warnings
from ..classes import exceptions as exc
from .. import plotting
# def infer_expt_pair_condition(expt1, e... | {
"repo_name": "losonczylab/Zaremba_NatNeurosci_2017",
"path": "losonczy_analysis_bundle/lab/analysis/behavior_analysis.py",
"copies": "1",
"size": "56162",
"license": "mit",
"hash": 7357348735125979000,
"line_mean": 37.1017639077,
"line_max": 138,
"alpha_frac": 0.5565863039,
"autogenerated": false,... |
#analysis of possible mirna sequences using frame sliding method
#cerceve kaydirma yontemi ile olasi mirna sekanslarinin bulunmasi
from StringIO import StringIO
import operator
def gen_sozluk(dosya_adi):
x=open(dosya_adi,"r")
dosya=x.read()
x.close()
sio=StringIO(dosya)
sozluk={}
... | {
"repo_name": "hanakamer/bioinformatics",
"path": "mirna_hesap_cerceve_kaydirma.py",
"copies": "1",
"size": "2086",
"license": "apache-2.0",
"hash": -1062074594924687500,
"line_mean": 28.6764705882,
"line_max": 152,
"alpha_frac": 0.5915627996,
"autogenerated": false,
"ratio": 2.6042446941323347,
... |
# Analysis of scraped file
import time
import praw
import datetime
import pickle
import requests
import json
import pprint
from wordcloud import WordCloud, STOPWORDS
WIDTH = 1280
HEIGHT = 720
NUM_OF_WORDS = 250
def sentiAnalysis(isUrl, dataToAnalyse):
"""
Function which does sentimental analysis of URL or T... | {
"repo_name": "KaushikR/SubredditStats",
"path": "RandiaAnalysis.py",
"copies": "1",
"size": "8767",
"license": "bsd-3-clause",
"hash": -3416135192729312000,
"line_mean": 33.5157480315,
"line_max": 140,
"alpha_frac": 0.5664423406,
"autogenerated": false,
"ratio": 3.7132570944515035,
"config_tes... |
"""Analysis of text input into executable blocks.
The main class in this module, :class:`InputSplitter`, is designed to break
input from either interactive, line-by-line environments or block-based ones,
into standalone blocks that can be executed by Python as 'single' statements
(thus triggering sys.displayhook).
A ... | {
"repo_name": "noslenfa/tdjangorest",
"path": "uw/lib/python2.7/site-packages/IPython/core/inputsplitter.py",
"copies": "2",
"size": "24271",
"license": "apache-2.0",
"hash": -6093731128193159000,
"line_mean": 35.7186081694,
"line_max": 93,
"alpha_frac": 0.5823822669,
"autogenerated": false,
"rat... |
#imports
import pandas as pd
from matplotlib import pyplot as plt
from matplotlib import cm as cm
import seaborn as sns
from sklearn import linear_model
sns.set(style='white')
airfoil = pd.read_csv('./data/airfoil_self_noise.csv')
#printing the first head of the airfoil dataset
print(airfoil.head())
# check if an... | {
"repo_name": "rishuatgithub/MLPy",
"path": "airfoil_uci_regression.py",
"copies": "1",
"size": "1510",
"license": "apache-2.0",
"hash": -7804168195865149000,
"line_mean": 28.6078431373,
"line_max": 121,
"alpha_frac": 0.721192053,
"autogenerated": false,
"ratio": 3.0382293762575454,
"config_tes... |
"""Analysis output generation, common for all model/pipeline variants
"""
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from os import path
import io
import jinja2
import numpy as np
from matplotlib import pyplot as plt
import seaborn
from ozelot impo... | {
"repo_name": "trycs/ozelot",
"path": "examples/leonardo/leonardo/common/analysis.py",
"copies": "1",
"size": "3069",
"license": "mit",
"hash": -2048404598603588400,
"line_mean": 26.1592920354,
"line_max": 105,
"alpha_frac": 0.6301726947,
"autogenerated": false,
"ratio": 3.4677966101694917,
"co... |
# analysis over all patients
# miscellaneous
def zeros(n):
zeros = []
for i in range (0,n):
zeros.append(0)
return zeros
# initializing -
# function takes no args (opens patient CSV files).
# Function returns a list containing one list per patient. Each patient list contains all unique tuples that are found i... | {
"repo_name": "easyCZ/SLIP-A-2015",
"path": "respiratory/Processed Datasets/Processed Datasets/test2.py",
"copies": "1",
"size": "2620",
"license": "mit",
"hash": -8105964971317075000,
"line_mean": 24.9405940594,
"line_max": 177,
"alpha_frac": 0.6541984733,
"autogenerated": false,
"ratio": 2.8172... |
# analysis.py - load, calculate, save
"""Load an analysis config file, calculate it, and save the results."""
import collections
import logging
import yaml
from . import calculation
from . import features
from . import readjustments
from . import rules
from . import tools
from . import types
from . import vis
__al... | {
"repo_name": "xflr6/dmengine",
"path": "dmengine/analysis.py",
"copies": "1",
"size": "3629",
"license": "mit",
"hash": 7405669180204131000,
"line_mean": 28.7459016393,
"line_max": 87,
"alpha_frac": 0.5822540645,
"autogenerated": false,
"ratio": 3.889603429796356,
"config_test": false,
"has_... |
# analysis.py
# -----------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for educational
# purposes. The Pacman AI projects were developed at UC Berkeley, primarily by
# John DeNero (denero@cs.berkeley.edu) and Dan Klein (klein@c... | {
"repo_name": "yandexdataschool/Practical_RL",
"path": "week03_model_free/crawler_and_pacman/seminar_py3/analysis.py",
"copies": "1",
"size": "1834",
"license": "unlicense",
"hash": 9139489044553953000,
"line_mean": 28.5806451613,
"line_max": 78,
"alpha_frac": 0.685387132,
"autogenerated": false,
... |
# analysis.py
# -----------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
# ... | {
"repo_name": "PiscesDream/Ideas",
"path": "reinforcement/tutorial/analysis.py",
"copies": "1",
"size": "2372",
"license": "apache-2.0",
"hash": 978874903977520100,
"line_mean": 31.0540540541,
"line_max": 80,
"alpha_frac": 0.6922428331,
"autogenerated": false,
"ratio": 3.4985250737463125,
"conf... |
# analysis.py
# -----------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to
# http://inst.eecs.ber... | {
"repo_name": "pfwangthu/edX-Artificial-Intelligence",
"path": "reinforcement/analysis.py",
"copies": "1",
"size": "2341",
"license": "mpl-2.0",
"hash": -789916919059710200,
"line_mean": 30.6351351351,
"line_max": 80,
"alpha_frac": 0.694574968,
"autogenerated": false,
"ratio": 3.4528023598820057,... |
"""Analysis-specific plotting methods"""
import warnings
import numpy as np
import scipy as sp
import itertools as it
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import datetime
import lab
from ..classes.classes import ExperimentGroup
import plotting as plotting
import... | {
"repo_name": "losonczylab/Zaremba_NatNeurosci_2017",
"path": "losonczy_analysis_bundle/lab/plotting/analysis_plotting.py",
"copies": "1",
"size": "30484",
"license": "mit",
"hash": -8089800671851079000,
"line_mean": 37.5873417722,
"line_max": 119,
"alpha_frac": 0.5649193019,
"autogenerated": false... |
"""Analysis the start2 equipments data"""
__all__ = ['main']
import json
from collections import OrderedDict
from urllib.request import urlopen
from utils import python_data_to_lua_table
START2_URL = 'https://acc.kcwiki.org/start2'
TIMEOUT_IN_SECOND = 10
START2_JSON = 'data/start2.json'
JA_ZH_JSON = 'data/ja_zh.json'... | {
"repo_name": "kcwikizh/kancolle-shinkai-db",
"path": "equip.py",
"copies": "1",
"size": "4802",
"license": "mit",
"hash": -7797976888027811000,
"line_mean": 34.8769230769,
"line_max": 74,
"alpha_frac": 0.5319468268,
"autogenerated": false,
"ratio": 2.9388783868935096,
"config_test": false,
"... |
ANALYSIS_TYPES = ("wgs", "wes", "mixed", "unknown", "panel", "external")
CUSTOM_CASE_REPORTS = [
"multiqc",
"cnv_report",
"coverage_qc_report",
"gene_fusion_report",
"gene_fusion_report_research",
]
SEX_MAP = {
1: "male",
2: "female",
"other": "unknown",
0: "unknown",
"1": "mal... | {
"repo_name": "Clinical-Genomics/scout",
"path": "scout/constants/case_tags.py",
"copies": "1",
"size": "4296",
"license": "bsd-3-clause",
"hash": 4120250516523967000,
"line_mean": 32.0461538462,
"line_max": 77,
"alpha_frac": 0.5996275605,
"autogenerated": false,
"ratio": 3.1869436201780417,
"c... |
"""Analysis visualization functions
"""
import numpy as np
from itertools import chain
from .._utils import string_types
def format_pval(pval, latex=True, scheme='default'):
"""Format a p-value using one of several schemes.
Parameters
----------
pval : float | array-like
The raw p-value(s).... | {
"repo_name": "LABSN/expyfun",
"path": "expyfun/analyze/_viz.py",
"copies": "2",
"size": "22433",
"license": "bsd-3-clause",
"hash": -4701717880586258000,
"line_mean": 43.7764471058,
"line_max": 79,
"alpha_frac": 0.5615388044,
"autogenerated": false,
"ratio": 3.606011895193699,
"config_test": f... |
"""Analysis visualization functions
"""
import numpy as np
from itertools import chain
try:
import matplotlib.pyplot as plt
from matplotlib import rcParams
except ImportError:
plt = None
try:
from pandas.core.frame import DataFrame
except ImportError:
DataFrame = None
from .._utils import string_t... | {
"repo_name": "lkishline/expyfun",
"path": "expyfun/analyze/_viz.py",
"copies": "1",
"size": "19369",
"license": "bsd-3-clause",
"hash": 7391822108945943000,
"line_mean": 40.8336933045,
"line_max": 79,
"alpha_frac": 0.5503639837,
"autogenerated": false,
"ratio": 3.649020346646571,
"config_test"... |
"""analyst URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | {
"repo_name": "cmwaura/Newspade",
"path": "analyst/urls.py",
"copies": "1",
"size": "3598",
"license": "mit",
"hash": 5929150469381640000,
"line_mean": 37.688172043,
"line_max": 96,
"alpha_frac": 0.597832129,
"autogenerated": false,
"ratio": 4.051801801801802,
"config_test": false,
"has_no_ke... |
# analyte documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are ... | {
"repo_name": "bio-boris/social_media_scanner",
"path": "docs/conf.py",
"copies": "1",
"size": "7719",
"license": "mit",
"hash": 2490750170071320000,
"line_mean": 30.7654320988,
"line_max": 80,
"alpha_frac": 0.6940018137,
"autogenerated": false,
"ratio": 3.825074331020813,
"config_test": true,
... |
# AnalyticAgent.py
# -*- coding: utf-8 -*-
"""
Code for managing RESTful queries with the ALMA Analytic API. This
includes the AnalyticAgent object class and the QueryType enumeration.
QueryType
An enumeration characterizing the three types of queries that
AnalyticAgent can perform:
PAGE Return only a ... | {
"repo_name": "NEU-Libraries/alma-analytic-tools",
"path": "AnalyticAgent.py",
"copies": "1",
"size": "37487",
"license": "isc",
"hash": 5469089994348050000,
"line_mean": 38.171368861,
"line_max": 404,
"alpha_frac": 0.5817483394,
"autogenerated": false,
"ratio": 4.66604431167538,
"config_test":... |
"""Analytical computation of Solar System bodies
"""
import numpy as np
from ..constants import Earth, Moon, Sun
from ..errors import UnknownBodyError
from ..orbits import Orbit
from ..utils.units import AU
from ..propagators.base import AnalyticalPropagator
def get_body(name):
"""Retrieve a given body orbits a... | {
"repo_name": "galactics/beyond",
"path": "beyond/env/solarsystem.py",
"copies": "2",
"size": "5486",
"license": "mit",
"hash": 6459409260315617000,
"line_mean": 26.2935323383,
"line_max": 87,
"alpha_frac": 0.4637258476,
"autogenerated": false,
"ratio": 3.316807738814994,
"config_test": false,
... |
"""Analytical discrete ordinates method."""
from . import base
from . import iso
from . import ani
__all__ = ['ado']
def ado(n, N, bc, xf, c, L=False, Q=False, x0=0):
"""
Determine the radiation density using analytical discrete ordinates
method.
Parameters
----------
n : int
Number ... | {
"repo_name": "olivertso/ado",
"path": "python/ado.py",
"copies": "1",
"size": "1171",
"license": "mit",
"hash": 7264428352133746000,
"line_mean": 23.3958333333,
"line_max": 71,
"alpha_frac": 0.561058924,
"autogenerated": false,
"ratio": 3.4747774480712166,
"config_test": false,
"has_no_keywo... |
""" Analytical expressions of information theoretical quantities. """
from scipy.linalg import det, inv
from numpy import log, prod, absolute, exp, pi, trace, dot, cumsum, \
hstack, ix_, sqrt, eye, diag, array
from ite.shared import compute_h2
def analytical_value_h_shannon(distr... | {
"repo_name": "gdikov/vae-playground",
"path": "third_party/ite/cost/x_analytical_values.py",
"copies": "1",
"size": "30969",
"license": "mit",
"hash": 1570425064661072100,
"line_mean": 30.3350202429,
"line_max": 76,
"alpha_frac": 0.5220452857,
"autogenerated": false,
"ratio": 3.523273016956868,
... |
# Analytical solutions for problems that can be solved with the two Shen basis.
###
# Problem one is
#
# -u`` = f in [-1, 1] with u(-1) = u(1) = 0 for f which is
# g on [-1, 0) and h on [0, 1]
#
###
# Problem two is
#
# u```` = f in [-1, 1] with u(-1) = u(1) = 0, u`(-1) = u`(1) = 0 for f which is
# g on [-1, 0) an... | {
"repo_name": "MiroK/lega",
"path": "sandbox/bendpy/discont/dg_shen.py",
"copies": "1",
"size": "6035",
"license": "mit",
"hash": -6869612549207594000,
"line_mean": 31.1010638298,
"line_max": 79,
"alpha_frac": 0.4724109362,
"autogenerated": false,
"ratio": 2.5208855472013365,
"config_test": fal... |
# Analytical solutions for problems that can be solved with the two sine basis.
###
# Problem one is
#
# -u`` = f in [0, pi] with u(0) = u(pi) = 0 for f which is
# g on [0, pi/2) and h on [pi/2, pi]
#
###
# Problem two is
#
# u```` = f in [0, pi] with u(0) = u(pi) = 0, u`(0) = u`(pi) = 0 for f which is
# g on [0, ... | {
"repo_name": "MiroK/lega",
"path": "sandbox/bendpy/discont/dg_sine.py",
"copies": "1",
"size": "5398",
"license": "mit",
"hash": -5752548179703789000,
"line_mean": 30.2023121387,
"line_max": 79,
"alpha_frac": 0.4772137829,
"autogenerated": false,
"ratio": 2.537846732487071,
"config_test": fals... |
" analytical test problem to validate 2D and 3D solvers "
import math
from collections import OrderedDict
from dolfin import *
from nanopores import *
from nanopores.physics.simplepnps import *
from nanopores.geometries.curved import Cylinder
# --- define parameters ---
add_params(
bV = -0.1, # [V]
rho = -0.05, # [C/m... | {
"repo_name": "mitschabaude/nanopores",
"path": "scripts/numerics/anaPNPS_refinement_2D.py",
"copies": "1",
"size": "11035",
"license": "mit",
"hash": -3809633973085056000,
"line_mean": 33.592476489,
"line_max": 148,
"alpha_frac": 0.6068871772,
"autogenerated": false,
"ratio": 2.4495005549389566,... |
" analytical test problem to validate 2D and 3D solvers "
import math
from collections import OrderedDict
from dolfin import *
from nanopores import *
from nanopores.physics.simplepnps import *
# --- define parameters ---
add_params(
bV = -0.1, # [V]
rho = -0.05, # [C/m**2]
h2D = .05,
Nmax = 1e5,
damp = 1.,
bulkcon = ... | {
"repo_name": "mitschabaude/nanopores",
"path": "scripts/numerics/analyticalPNPS_2D.py",
"copies": "1",
"size": "8529",
"license": "mit",
"hash": -2299403639243705900,
"line_mean": 34.6861924686,
"line_max": 152,
"alpha_frac": 0.6150779693,
"autogenerated": false,
"ratio": 2.4375535867390683,
"... |
" analytical test problem to validate 2D and 3D solvers "
import math
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from collections import OrderedDict
from dolfin import *
from nanopores import *
from nanopores.physics.simplepnps import *
# --- define parameters ---
add_params(
bV = -0.1, # [V]
r... | {
"repo_name": "mitschabaude/nanopores",
"path": "scripts/numerics/analyticalPNPS.py",
"copies": "1",
"size": "10917",
"license": "mit",
"hash": 7245422797871124000,
"line_mean": 33.4384858044,
"line_max": 115,
"alpha_frac": 0.6080425025,
"autogenerated": false,
"ratio": 2.441189624329159,
"conf... |
" analytical test problem to validate 2D solver "
import math
from dolfin import *
from nanopores import *
from nanopores.physics.simplepnps import *
# --- define parameters ---
bV = -0.5 # [V]
rho = -0.025 # [C/m**2]
# --- create 2D geometry ---
Rz = 2. # [nm] length in z direction of channel part
R = 2. # [nm] pore... | {
"repo_name": "mitschabaude/nanopores",
"path": "scripts/analytical_test_case.py",
"copies": "1",
"size": "3984",
"license": "mit",
"hash": 6575314854384698000,
"line_mean": 26.6666666667,
"line_max": 147,
"alpha_frac": 0.641064257,
"autogenerated": false,
"ratio": 2.4745341614906833,
"config_t... |
'''Analytic decoding failure bound and inactivations estimate
'''
import math
import numpy as np
from pynumeric import nchoosek_log
from functools import lru_cache
from scipy.special import comb as nchoosek
from .. import Soliton
# @profile
@lru_cache(maxsize=2048)
def _vartheta_log(i=None, weight=None, degree=None... | {
"repo_name": "severinson/pyrateless",
"path": "pyrateless/optimize/analytic.py",
"copies": "1",
"size": "11900",
"license": "apache-2.0",
"hash": -8411216390108471000,
"line_mean": 32.4241573034,
"line_max": 83,
"alpha_frac": 0.6292965795,
"autogenerated": false,
"ratio": 3.8570502431118316,
"... |
''' analytic ik module by mmkim'''
import numpy as np
import sys
if '..' not in sys.path:
sys.path.append('..')
import hmath.mm_math as mm
# if parent_joint_axis is None: assume 3dof parent joint
# if not: use parent_joint_axis as rotV
# parent_joint_axis is a local direction
def ik_analytic(posture, joint_name... | {
"repo_name": "queid7/hma",
"path": "modules/ys_motion/mm_analytic_ik.py",
"copies": "1",
"size": "3343",
"license": "mit",
"hash": -7684022205829600000,
"line_mean": 32.099009901,
"line_max": 109,
"alpha_frac": 0.6269817529,
"autogenerated": false,
"ratio": 3.0008976660682225,
"config_test": f... |
""" analytic_reference script """
from common import info, info_split, info_cyan, info_error
from postprocess import get_step_and_info, rank, compute_norms
import dolfin as df
import os
from utilities.plot import plot_any_field
import importlib
def description(ts, **kwargs):
info("""Compare to analytic reference ... | {
"repo_name": "gautelinga/BERNAISE",
"path": "analysis_scripts/analytic_reference.py",
"copies": "1",
"size": "3206",
"license": "mit",
"hash": -1425048543762784500,
"line_mean": 36.2790697674,
"line_max": 79,
"alpha_frac": 0.5845290081,
"autogenerated": false,
"ratio": 3.8395209580838325,
"con... |
'''Analytic routines for debris disks.'''
import numpy as np
from . import photometry
from . import filter
from . import utils
class BB_Disk(object):
'''A blackbody disk class.
Takes multiple temperatures, the purpose being for use to show
disk properties in parameter spaces such as fractional l... | {
"repo_name": "drgmk/sdf",
"path": "sdf/analytics.py",
"copies": "1",
"size": "11395",
"license": "mit",
"hash": -1743949656810416400,
"line_mean": 36.8571428571,
"line_max": 101,
"alpha_frac": 0.5106625713,
"autogenerated": false,
"ratio": 3.9456371191135733,
"config_test": false,
"has_no_ke... |
"""Analytics helper class for the analytics integration."""
import asyncio
import uuid
import aiohttp
import async_timeout
from homeassistant.components import hassio
from homeassistant.components.api import ATTR_INSTALLATION_TYPE
from homeassistant.components.automation.const import DOMAIN as AUTOMATION_DOMAIN
from ... | {
"repo_name": "kennedyshead/home-assistant",
"path": "homeassistant/components/analytics/analytics.py",
"copies": "1",
"size": "9573",
"license": "apache-2.0",
"hash": 4094008070077530600,
"line_mean": 35.3992395437,
"line_max": 90,
"alpha_frac": 0.5688916745,
"autogenerated": false,
"ratio": 4.3... |
"""Analytics helper class for the analytics integration."""
import asyncio
import aiohttp
import async_timeout
from homeassistant.components import hassio
from homeassistant.components.api import ATTR_INSTALLATION_TYPE
from homeassistant.components.automation.const import DOMAIN as AUTOMATION_DOMAIN
from homeassistan... | {
"repo_name": "sander76/home-assistant",
"path": "homeassistant/components/analytics/analytics.py",
"copies": "2",
"size": "7999",
"license": "apache-2.0",
"hash": 8759668593589128000,
"line_mean": 35.6926605505,
"line_max": 90,
"alpha_frac": 0.5758219777,
"autogenerated": false,
"ratio": 4.36150... |
"""Analytics modeling to help understand the projects on Read the Docs."""
import datetime
from django.db import models
from django.db.models import Sum
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from readthedocs.builds.models import Version
from readthedocs.projects.mo... | {
"repo_name": "rtfd/readthedocs.org",
"path": "readthedocs/analytics/models.py",
"copies": "1",
"size": "4168",
"license": "mit",
"hash": -4579146996766342700,
"line_mean": 31.0615384615,
"line_max": 99,
"alpha_frac": 0.5885316699,
"autogenerated": false,
"ratio": 3.9847036328871894,
"config_te... |
# analytics/models.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from django.db import models
from django.db.models import Q
from django.utils.timezone import localtime, now
from datetime import timedelta
from election.models import Election
from exception.models import print_to_log
from follow.mode... | {
"repo_name": "wevote/WeVoteServer",
"path": "analytics/models.py",
"copies": "1",
"size": "108975",
"license": "mit",
"hash": -8721606415581617000,
"line_mean": 48.1986455982,
"line_max": 120,
"alpha_frac": 0.6223996329,
"autogenerated": false,
"ratio": 4.005550246269205,
"config_test": false,... |
# analytics/models.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from django.db import models
from django.db.models import Q
from django.utils.timezone import localtime, now
from election.models import Election
from exception.models import print_to_log
from follow.models import FollowOrganizationLis... | {
"repo_name": "jainanisha90/WeVoteServer",
"path": "analytics/models.py",
"copies": "1",
"size": "73059",
"license": "mit",
"hash": -3677543344842123000,
"line_mean": 48.7,
"line_max": 120,
"alpha_frac": 0.6179389261,
"autogenerated": false,
"ratio": 4.066740885054272,
"config_test": false,
"... |
# ANALYTICS :)
def sentiment()
import json
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from textblob import TextBlob
from elasticsearch import Elasticsearch
# import twitter keys and tokens
from config import *
# create instance of elasticsearch
es = Elastic... | {
"repo_name": "maketwittergreatagain/maketwittergreatagain",
"path": "analytics.py",
"copies": "1",
"size": "1970",
"license": "mit",
"hash": -6989649563856612000,
"line_mean": 26.3611111111,
"line_max": 68,
"alpha_frac": 0.6203045685,
"autogenerated": false,
"ratio": 4.095634095634096,
"config... |
# Analytic solution of EM fields due to a plane wave
import numpy as np, SimPEG as simpeg
def getEHfields(m1d,sigma,freq,zd,scaleUD=True):
'''Analytic solution for MT 1D layered earth. Returns E and H fields.
:param SimPEG.mesh, object m1d: Mesh object with the 1D spatial information.
:param numpy.array,... | {
"repo_name": "simpeg/simpegmt",
"path": "simpegMT/Utils/MT1Danalytic.py",
"copies": "1",
"size": "4510",
"license": "mit",
"hash": -5696215553528173000,
"line_mean": 39.6306306306,
"line_max": 125,
"alpha_frac": 0.6141906874,
"autogenerated": false,
"ratio": 2.7483241925655086,
"config_test": ... |
"""analyticsolution.py - Analytic solutions for the second order Klein-Gordon equation
"""
#Author: Ian Huston
#For license and copyright information see LICENSE.txt which was distributed with this file.
from __future__ import division
import numpy as np
import scipy
from generalsolution import GeneralSolution
#C... | {
"repo_name": "ihuston/pyflation",
"path": "pyflation/solutions/analyticsolution.py",
"copies": "1",
"size": "30177",
"license": "bsd-3-clause",
"hash": 3001533420712452600,
"line_mean": 41.9274537696,
"line_max": 144,
"alpha_frac": 0.4353315439,
"autogenerated": false,
"ratio": 2.722081905105538... |
"""Analytics relying on IVRE's data.
IVRE is an open-source network recon framework. See
<https://ivre.rocks/> to learn more about it.
Currently, this analytics provides:
- Estimated geographic location and Autonomous System (AS) of IP
addresses (based on MaxMind data, see
<https://dev.maxmind.com/geoip/geoip2... | {
"repo_name": "yeti-platform/yeti",
"path": "contrib/analytics/ivre_api/ivre_api.py",
"copies": "1",
"size": "14984",
"license": "apache-2.0",
"hash": -8328794815094073000,
"line_mean": 32.2977777778,
"line_max": 88,
"alpha_frac": 0.5073411639,
"autogenerated": false,
"ratio": 4.345707656612529,
... |
# analytics/urls.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from . import views_admin
from django.conf.urls import re_path
urlpatterns = [
# views_admin
re_path(r'^$', views_admin.analytics_index_view, name='analytics_index',),
re_path(r'^analytics_index_process/$',
views_ad... | {
"repo_name": "wevote/WeVoteServer",
"path": "analytics/urls.py",
"copies": "1",
"size": "2764",
"license": "mit",
"hash": 4496144601076813000,
"line_mean": 63.2790697674,
"line_max": 123,
"alpha_frac": 0.7094790159,
"autogenerated": false,
"ratio": 3.3997539975399755,
"config_test": false,
"... |
# analytics/urls.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from . import views_admin
from django.conf.urls import url
urlpatterns = [
# views_admin
url(r'^$', views_admin.analytics_index_view, name='analytics_index',),
url(r'^analytics_action_list/(?P<voter_we_vote_id>wv[\w]{2}vote... | {
"repo_name": "jainanisha90/WeVoteServer",
"path": "analytics/urls.py",
"copies": "1",
"size": "2566",
"license": "mit",
"hash": -1529149770348114700,
"line_mean": 61.5853658537,
"line_max": 119,
"alpha_frac": 0.7088854248,
"autogenerated": false,
"ratio": 3.4535666218034993,
"config_test": fal... |
# analytics/views_admin.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .controllers import augment_one_voter_analytics_action_entries_without_election_id, \
augment_voter_analytics_action_entries_without_election_id, \
save_organization_daily_metrics, save_organization_election_metrics, ... | {
"repo_name": "wevote/WeVoteServer",
"path": "analytics/views_admin.py",
"copies": "1",
"size": "71740",
"license": "mit",
"hash": 3344935132245164000,
"line_mean": 50.8352601156,
"line_max": 120,
"alpha_frac": 0.6360886535,
"autogenerated": false,
"ratio": 3.829809950886184,
"config_test": fal... |
"""Analytics views that are served from the same domain as the docs."""
from functools import lru_cache
from django.db.models import F
from django.shortcuts import get_object_or_404
from django.utils import timezone
from rest_framework.response import Response
from rest_framework.views import APIView
from readthedoc... | {
"repo_name": "rtfd/readthedocs.org",
"path": "readthedocs/analytics/proxied_api.py",
"copies": "1",
"size": "2612",
"license": "mit",
"hash": 8050106452556271000,
"line_mean": 29.0229885057,
"line_max": 80,
"alpha_frac": 0.6496937213,
"autogenerated": false,
"ratio": 4.08125,
"config_test": fa... |
"""Analyze a game"""
import argparse
import json
import sys
import numpy as np
from numpy import linalg
from gameanalysis import dominance
from gameanalysis import gameio
from gameanalysis import nash
from gameanalysis import reduction
from gameanalysis import regret
from gameanalysis import subgame
def add_parser(... | {
"repo_name": "yackj/GameAnalysis",
"path": "gameanalysis/script/analyze.py",
"copies": "1",
"size": "11106",
"license": "apache-2.0",
"hash": 2134976008702140000,
"line_mean": 40.7518796992,
"line_max": 79,
"alpha_frac": 0.5881505493,
"autogenerated": false,
"ratio": 3.5167827739075364,
"confi... |
"""Analyze a game"""
import argparse
import json
import sys
import numpy as np
from gameanalysis import collect
from gameanalysis import dominance
from gameanalysis import gamereader
from gameanalysis import nash
from gameanalysis import reduction
from gameanalysis import regret
from gameanalysis import restrict
de... | {
"repo_name": "egtaonline/GameAnalysis",
"path": "gameanalysis/script/analyze.py",
"copies": "1",
"size": "11965",
"license": "apache-2.0",
"hash": -1247817724389972000,
"line_mean": 41.5800711744,
"line_max": 87,
"alpha_frac": 0.5908900961,
"autogenerated": false,
"ratio": 3.585555888522625,
"... |
"""Analyze a game using gp learn"""
import argparse
import json
import sys
import warnings
from gameanalysis import learning
from gameanalysis import gamereader
from gameanalysis import nash
from gameanalysis import regret
def add_parser(subparsers):
"""Parser for learning script"""
parser = subparsers.add_p... | {
"repo_name": "egtaonline/GameAnalysis",
"path": "gameanalysis/script/learning.py",
"copies": "1",
"size": "4824",
"license": "apache-2.0",
"hash": -1918946579374399700,
"line_mean": 40.947826087,
"line_max": 79,
"alpha_frac": 0.6127694859,
"autogenerated": false,
"ratio": 3.6993865030674846,
"... |
"""Analyze a game using gp learn"""
import argparse
import json
import sys
from gameanalysis import gameio
from gameanalysis import nash
from gameanalysis import regret
from gameanalysis import gpgame
def add_parser(subparsers):
parser = subparsers.add_parser(
'learning', help="""Analyze game using learn... | {
"repo_name": "yackj/GameAnalysis",
"path": "gameanalysis/script/learning.py",
"copies": "1",
"size": "4827",
"license": "apache-2.0",
"hash": -4990934483481361000,
"line_mean": 38.5655737705,
"line_max": 79,
"alpha_frac": 0.6138388233,
"autogenerated": false,
"ratio": 3.5079941860465116,
"conf... |
""" Analyze and create superdarks for COS data
"""
try: from astropy.io import fits as pyfits
except ImportError: import pyfits
import numpy as np
import glob
import os
from superdark import SuperDark
data_dir = '/grp/hst/cos/Monitors/dark_2/data/'
def lightcurve( filename, step=1 ):
""" quick one until my l... | {
"repo_name": "justincely/cosdark",
"path": "monitor.py",
"copies": "1",
"size": "2533",
"license": "bsd-3-clause",
"hash": 4944339630230761000,
"line_mean": 28.4534883721,
"line_max": 96,
"alpha_frac": 0.5973154362,
"autogenerated": false,
"ratio": 3.214467005076142,
"config_test": false,
"h... |
# analyze androcov result
# giving the instrumentation.json generated by androcov and the logcat generated at runtime
import os
import re
import json
import argparse
from datetime import datetime
# logcat regex, which will match the log message generated by `adb logcat -v threadtime`
LOGCAT_THREADTIME_RE = re.compile(... | {
"repo_name": "ylimit/androcov",
"path": "res/androcov_report.py",
"copies": "1",
"size": "4885",
"license": "mit",
"hash": 2170784050766296300,
"line_mean": 41.1120689655,
"line_max": 109,
"alpha_frac": 0.5893551689,
"autogenerated": false,
"ratio": 3.7838884585592565,
"config_test": false,
... |
# Analyze Color of Object
import os
import cv2
import numpy as np
from . import print_image
from . import plot_image
from . import fatal_error
from . import plot_colorbar
def _pseudocolored_image(device, histogram, bins, img, mask, background, channel, filename, resolution,
analysis_images, ... | {
"repo_name": "AntonSax/plantcv",
"path": "plantcv/analyze_color.py",
"copies": "2",
"size": "11048",
"license": "mit",
"hash": 4074787350292248600,
"line_mean": 39.9185185185,
"line_max": 119,
"alpha_frac": 0.5419985518,
"autogenerated": false,
"ratio": 3.5218361491871213,
"config_test": false... |
'''analyze columns in a transaction3 csv file
INPUT FILE: specified on command line via --in
INPUT/transactions3-al-g-sfr.csv
OUTPUT FILE: specified on command line via --out
'''
import numpy as np
import pandas as pd
import pdb
from pprint import pprint
import sys
from Bunch import Bunch
from directory import dir... | {
"repo_name": "rlowrance/re-local-linear",
"path": "transactions3-analysis.py",
"copies": "1",
"size": "2868",
"license": "mit",
"hash": -2445592685329778700,
"line_mean": 25.0727272727,
"line_max": 90,
"alpha_frac": 0.6241283124,
"autogenerated": false,
"ratio": 3.7102199223803365,
"config_tes... |
# Analyze distribution of RGZ counterparts in WISE color-color space
#
rgz_dir = '/Users/willettk/Astronomy/Research/GalaxyZoo/rgz-analysis'
paper_dir = '/Users/willettk/Astronomy/Research/GalaxyZoo/radiogalaxyzoo/paper'
from astropy.io import fits
import numpy as np
from matplotlib import pyplot as plt
from matplotli... | {
"repo_name": "afgaron/rgz-analysis",
"path": "python/wise_colorcolor.py",
"copies": "2",
"size": "16023",
"license": "mit",
"hash": 800573951823259600,
"line_mean": 33.5323275862,
"line_max": 180,
"alpha_frac": 0.5542033327,
"autogenerated": false,
"ratio": 2.4973503740648377,
"config_test": f... |
""" analyze_errors.py
Usage: analyze_errors.py <pred_out>
"""
from collections import Counter
import json
from text.dataset import Example
""" wanted format
in may 0000 , after finishing the 5-year-term of president of the republic of [macedonia]_2 , [branko crvenkovski]_1 returned to the sdum and was reelected lead... | {
"repo_name": "vzhong/sent2rel",
"path": "analyze_errors.py",
"copies": "1",
"size": "1846",
"license": "mit",
"hash": 7515135010268994000,
"line_mean": 30.8275862069,
"line_max": 177,
"alpha_frac": 0.6175514626,
"autogenerated": false,
"ratio": 3.1772805507745265,
"config_test": false,
"has_... |
"""Analyze how well a system can be reduced by POD methods.
Evaluate pod.py and how well it fits a particular problem. This file contains
helper functions to compare reductions, create plots and creat TeX tables.
Notes
-----
This file should also take care of profiling in the future.
"""
from __future__ import divi... | {
"repo_name": "johannes-scharlach/pod-control",
"path": "src/analysis.py",
"copies": "1",
"size": "16379",
"license": "mit",
"hash": 8327374377665420000,
"line_mean": 31.4336633663,
"line_max": 79,
"alpha_frac": 0.4938030405,
"autogenerated": false,
"ratio": 3.4930688846235873,
"config_test": f... |
""" Analyze libraries in trees
Analyze library dependencies in paths and wheel files
"""
import os
from os.path import basename, join as pjoin, realpath
import warnings
from .tools import (get_install_names, zip2dir, get_rpaths,
get_environment_variable_paths)
from .tmpdirs import TemporaryDirec... | {
"repo_name": "matthew-brett/delocate",
"path": "delocate/libsana.py",
"copies": "1",
"size": "9559",
"license": "bsd-2-clause",
"hash": -177858993633683740,
"line_mean": 33.8868613139,
"line_max": 188,
"alpha_frac": 0.6324929386,
"autogenerated": false,
"ratio": 4.0130142737195635,
"config_tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.