text stringlengths 0 1.05M | meta dict |
|---|---|
## A script for finding every cox coefficient and pvalue for every mRNA in LGG Tier 3 data downloaded Jan. 5th, 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
#... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/LGG/cox_regression.py",
"copies": "1",
"size": "9834",
"license": "mit",
"hash": -7015210057540040000,
"line_mean": 34.3741007194,
"line_max": 142,
"alpha_frac": 0.6454138702,
"autogenerated": false,
"ratio": 3.1022082018927444,
"config_test"... |
## A script for finding every cox coefficient and pvalue for every mRNA in LIHC Tier 3 data downloaded Feb. 2015
##load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
##This call will only work if you are running python from the command line.
##If you are not ... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/cox_regression/LIHC/cox_regression.py",
"copies": "1",
"size": "9486",
"license": "mit",
"hash": -3237184185042027000,
"line_mean": 31.0472972973,
"line_max": 142,
"alpha_frac": 0.6205987771,
"autogenerated": false,
"ratio": 3.120394736842105,
... |
## A script for finding every cox coefficient and pvalue for every mRNA in LIHC Tier 3 data downloaded Jan. 5th, 2016
##load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
##... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/LIHC/cox_regression.py",
"copies": "1",
"size": "10285",
"license": "mit",
"hash": -910934748359796100,
"line_mean": 32.9438943894,
"line_max": 142,
"alpha_frac": 0.6387943607,
"autogenerated": false,
"ratio": 3.105374396135266,
"config_test"... |
## A script for finding every cox coefficient and pvalue for every mRNA in LUAD Tier 3 data downloaded Feb. 2015
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
##This call will only work if you are running python from the command line.
##If you are no... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/cox_regression/LUAD/cox_regression.py",
"copies": "1",
"size": "8520",
"license": "mit",
"hash": -1304648225903000600,
"line_mean": 33.9180327869,
"line_max": 143,
"alpha_frac": 0.6325117371,
"autogenerated": false,
"ratio": 3.1163130943672277,
... |
## A script for finding every cox coefficient and pvalue for every mRNA in LUAD Tier 3 data downloaded Jan. 5th, 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
#... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/LUAD/cox_regression.py",
"copies": "1",
"size": "9282",
"license": "mit",
"hash": -6365172607026777000,
"line_mean": 35.8333333333,
"line_max": 143,
"alpha_frac": 0.650937298,
"autogenerated": false,
"ratio": 3.106425702811245,
"config_test":... |
## A script for finding every cox coefficient and pvalue for every mRNA in LUSC Tier 3 data downloaded Feb. 2015
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
##This call will only work if you are running python from the command line.
##If you are n... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/cox_regression/LUSC/cox_regression.py",
"copies": "1",
"size": "8503",
"license": "mit",
"hash": 7241484964736158000,
"line_mean": 33.8483606557,
"line_max": 142,
"alpha_frac": 0.6329530754,
"autogenerated": false,
"ratio": 3.1135115342365434,
... |
## A script for finding every cox coefficient and pvalue for every mRNA in LUSC Tier 3 data downloaded Jan. 5th, 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/LUSC/cox_regression.py",
"copies": "1",
"size": "9273",
"license": "mit",
"hash": -9220558667988094000,
"line_mean": 35.652173913,
"line_max": 142,
"alpha_frac": 0.6515690715,
"autogenerated": false,
"ratio": 3.099264705882353,
"config_test":... |
## A script for finding every cox coefficient and pvalue for every mRNA in OV Tier 3 data downloaded Feb. 2015
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
##This call will only work if you are running python from the command line.
##If you are not running from the command li... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/cox_regression/OV/cox_regression.py",
"copies": "1",
"size": "9894",
"license": "mit",
"hash": 6896578659823251000,
"line_mean": 31.4393442623,
"line_max": 143,
"alpha_frac": 0.621386699,
"autogenerated": false,
"ratio": 3.098653304102725,
"co... |
## A script for finding every cox coefficient and pvalue for every mRNA in OV Tier 3 data downloaded Jan. 5th, 2016
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
##If you are not running from... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/OV/cox_regression.py",
"copies": "1",
"size": "9944",
"license": "mit",
"hash": 7430374563656607000,
"line_mean": 32.7084745763,
"line_max": 142,
"alpha_frac": 0.6411906677,
"autogenerated": false,
"ratio": 3.109443402126329,
"config_test": f... |
## A script for finding every cox coefficient and pvalue for every mRNA in PAAD Tier 3 data downloaded Jan. 5th, 2016
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
##If you are not running fr... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/PAAD/cox_regression.py",
"copies": "1",
"size": "10308",
"license": "mit",
"hash": -3533043723049315000,
"line_mean": 33.9423728814,
"line_max": 142,
"alpha_frac": 0.6403764067,
"autogenerated": false,
"ratio": 3.1038843721770553,
"config_tes... |
## A script for finding every cox coefficient and pvalue for every mRNA in READ Tier 3 data downloaded Jan. 5th, 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/READ/cox_regression.py",
"copies": "1",
"size": "9273",
"license": "mit",
"hash": -8494495816482631000,
"line_mean": 35.652173913,
"line_max": 142,
"alpha_frac": 0.6515690715,
"autogenerated": false,
"ratio": 3.1159274193548385,
"config_test"... |
## A script for finding every cox coefficient and pvalue for every mRNA in SARC Tier 3 data downloaded Jan. 5th, 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/SARC/cox_regression.py",
"copies": "1",
"size": "9253",
"license": "mit",
"hash": -2974556469999755300,
"line_mean": 35.7182539683,
"line_max": 142,
"alpha_frac": 0.6511401708,
"autogenerated": false,
"ratio": 3.1060758643840214,
"config_test... |
## A script for finding every cox coefficient and pvalue for every mRNA in SKCM Tier 3 data downloaded Feb. 2015
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
##This call will only work if you are running python from the command line.
##If you are no... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/cox_regression/SKCM/cox_regression.py",
"copies": "1",
"size": "8591",
"license": "mit",
"hash": -4463594101630349000,
"line_mean": 34.6473029046,
"line_max": 143,
"alpha_frac": 0.6342684204,
"autogenerated": false,
"ratio": 3.0825260136347326,
... |
## A script for finding every cox coefficient and pvalue for every mRNA in SKCM Tier 3 data downloaded Jan. 5th, 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/SKCM/cox_regression.py",
"copies": "1",
"size": "9310",
"license": "mit",
"hash": 5081393592398883000,
"line_mean": 36.24,
"line_max": 143,
"alpha_frac": 0.6494092374,
"autogenerated": false,
"ratio": 3.0992010652463384,
"config_test": false,... |
## A script for finding every cox coefficient and pvalue for every mRNA in STAD Tier 3 data downloaded Feb. 2015
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
##This call will only work if you are running python from the command line.
##If you are not running from the command ... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/cox_regression/STAD/cox_regression.py",
"copies": "1",
"size": "9886",
"license": "mit",
"hash": -4445600273606843000,
"line_mean": 32.8561643836,
"line_max": 143,
"alpha_frac": 0.6235079911,
"autogenerated": false,
"ratio": 3.0874453466583387,
... |
## A script for finding every cox coefficient and pvalue for every mRNA in UCEC Tier 3 data downloaded Jan. 5th 2016
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mrna/cox/UCEC/cox_regression.py",
"copies": "1",
"size": "13424",
"license": "mit",
"hash": 8730643039326008000,
"line_mean": 33.0710659898,
"line_max": 142,
"alpha_frac": 0.6353545888,
"autogenerated": false,
"ratio": 3.0268320180383315,
"config_test... |
## A script for finding every cox coefficient and pvalue for every OV lncRNA in the beta MiTranscriptome data set (normalized counts)
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
##If you ar... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "lncrna/cox/OV/cox_regression.py",
"copies": "1",
"size": "10212",
"license": "mit",
"hash": 8403198060269602000,
"line_mean": 33.9726027397,
"line_max": 142,
"alpha_frac": 0.6619663141,
"autogenerated": false,
"ratio": 3.1286764705882355,
"config_test... |
## A script for finding every cox coefficient and pvalue for every READ lncRNA in the beta MiTranscriptome data set (normalized counts)
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "lncrna/cox/READ/cox_regression.py",
"copies": "1",
"size": "9500",
"license": "mit",
"hash": -4865724338649435000,
"line_mean": 36.2549019608,
"line_max": 142,
"alpha_frac": 0.6736842105,
"autogenerated": false,
"ratio": 3.1322123310253875,
"config_te... |
## A script for finding every cox coefficient and pvalue for every SKCM lncRNA in the beta MiTranscriptome data set (normalized counts)
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from ... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "lncrna/cox/SKCM/cox_regression.py",
"copies": "1",
"size": "9487",
"license": "mit",
"hash": 4684703284188051000,
"line_mean": 36.796812749,
"line_max": 142,
"alpha_frac": 0.6728154316,
"autogenerated": false,
"ratio": 3.1248353096179184,
"config_test... |
## A script for finding every cox coefficient and pvalue for every STAD lncRNA in the beta MiTranscriptome data set (normalized counts)
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
##If you ... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "lncrna/cox/STAD/cox_regression.py",
"copies": "1",
"size": "10299",
"license": "mit",
"hash": 1151842840812833300,
"line_mean": 34.1501706485,
"line_max": 142,
"alpha_frac": 0.6623944072,
"autogenerated": false,
"ratio": 3.120909090909091,
"config_tes... |
## A script for finding every cox coefficient and pvalue for every UCEC lncRNA in the beta MiTranscriptome data set (normalized counts)
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "lncrna/cox/UCEC/cox_regression.py",
"copies": "1",
"size": "13659",
"license": "mit",
"hash": -8010158717242352000,
"line_mean": 33.4924242424,
"line_max": 142,
"alpha_frac": 0.6503404349,
"autogenerated": false,
"ratio": 3.040739091718611,
"config_te... |
# A script for finding the missing sections given a multi-beam wafer directory
import os
import sys
import glob
import stat
import csv
import argparse
import sqlite3
import re
import time
debug_input_dir = '/n/lichtmanfs2/SCS_2015-9-14_C1_W05_mSEM'
FOCUS_FAIL_STR = 'FOCUS_FAIL'
MISSING_SECTION_STR = 'MISSING_SECTION'... | {
"repo_name": "Rhoana/rh_aligner",
"path": "scripts/check_missing_sections.py",
"copies": "1",
"size": "14180",
"license": "mit",
"hash": -2872469478524627500,
"line_mean": 45.6447368421,
"line_max": 215,
"alpha_frac": 0.6035260931,
"autogenerated": false,
"ratio": 3.7256962690488704,
"config_t... |
##a script for getting updated readcounts for human mirnas
##the id is used when available
##when unannotated the coordinates are used
f=open('human_mirnas.txt')
mirna_dict=eval(f.read())
f.close()
f=open('coordinates_dict.txt')
coordinates_dict=eval(f.read())
f.close()
##files.txt is a list of the files you want to ... | {
"repo_name": "OmnesRes/onco_lnc",
"path": "mirna/counting.py",
"copies": "1",
"size": "2507",
"license": "mit",
"hash": 497065417313135500,
"line_mean": 32.4266666667,
"line_max": 119,
"alpha_frac": 0.4555245313,
"autogenerated": false,
"ratio": 3.535966149506347,
"config_test": false,
"has_... |
## A script for obtaining the normalized expression values of genes of interest and preparing them for R
## Load necessary modules
import numpy as np
import os
from rpy2 import robjects as ro
##This call will only work if you are running python from the command line.
##If you are not running from the command line ma... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/figures/figure_1/clustergrams/LGG/for_clustering.py",
"copies": "1",
"size": "7607",
"license": "mit",
"hash": 5575701238520577000,
"line_mean": 28.831372549,
"line_max": 132,
"alpha_frac": 0.6382279479,
"autogenerated": false,
"ratio": 2.934799... |
## A script for obtaining the normalized expression values of genes of interest and preparing them for R
## Load necessary modules
import os
##This call will only work if you are running python from the command line.
##If you are not running from the command line manually type in your paths.
BASE_DIR = os.path.dirna... | {
"repo_name": "OmnesRes/pan_cancer",
"path": "paper/figures/figure_1/kaplans/LGG/for_kaplan.py",
"copies": "1",
"size": "5991",
"license": "mit",
"hash": -5411653531795091000,
"line_mean": 30.5315789474,
"line_max": 132,
"alpha_frac": 0.6506426306,
"autogenerated": false,
"ratio": 2.9555994079921... |
"""A script for parsing the Alov bounding box `.ann` files."""
import sys
import os
import itertools
import shutil
import pandas as pd
import numpy as np
def parse_file(bbox_dir, filename):
"""Parse an individual `.ann` file and output the relevant elements.
Args:
----
bbox_dir: str
file... | {
"repo_name": "dansbecker/motion-tracking",
"path": "motion_tracker/data_setup/parse_alov_bb.py",
"copies": "1",
"size": "6199",
"license": "mit",
"hash": 8212785732987451000,
"line_mean": 32.6902173913,
"line_max": 82,
"alpha_frac": 0.589772544,
"autogenerated": false,
"ratio": 3.447719688542825... |
"""A script for parsing the Imagenet bounding box XML files."""
import sys
import os
import itertools
import pandas as pd
import xml.etree.ElementTree as ET
def parse_file(bbox_dir, filename):
"""Parse an individual XML file and grab the relevant elements.
Args:
----
bbox_dir: str
filenam... | {
"repo_name": "dansbecker/motion-tracking",
"path": "motion_tracker/data_setup/parse_imagenet_bb.py",
"copies": "1",
"size": "2506",
"license": "mit",
"hash": -2795283325361774600,
"line_mean": 24.06,
"line_max": 84,
"alpha_frac": 0.594972067,
"autogenerated": false,
"ratio": 3.7071005917159763,
... |
""" A script for recalculating visit statistics (by deleting and re-getting).
It recalculates only those where util.isNaN(stats.body_mass_index) is True.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py recalc_visit_stats --org maventy
To run on produ... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/recalc_visit_stats.py",
"copies": "1",
"size": "2018",
"license": "bsd-3-clause",
"hash": -4058518073069169700,
"line_mean": 30.53125,
"line_max": 98,
"alpha_frac": 0.6754212091,
"autogenerated": false,
"ratio": 3.485319... |
""" A script for recounting # of patients and visits
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py recount
To run on production:
> manage.py recount --remote
"""
import getpass
import logging
import settings
from django.core.manag... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/recount.py",
"copies": "1",
"size": "2877",
"license": "bsd-3-clause",
"hash": -5601889987035116000,
"line_mean": 28.2842105263,
"line_max": 79,
"alpha_frac": 0.6534584637,
"autogenerated": false,
"ratio": 3.760784313725... |
""" A script for running a console.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py console --app_id <appid>
To run on production:
> manage.py console --remote --app_id <appid>
"""
import getpass
import logging
import settings
import ... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/console.py",
"copies": "1",
"size": "2254",
"license": "bsd-3-clause",
"hash": 8070028965097099000,
"line_mean": 29.7464788732,
"line_max": 75,
"alpha_frac": 0.6486246673,
"autogenerated": false,
"ratio": 3.8795180722891... |
""" A script for setting each Visit org from its parent Patient.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py setvisitorg
To run on production:
> manage.py setvisitorg --remote
NOTE: This should be no longer needed once the first initialization is... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/setvisitorg.py",
"copies": "1",
"size": "3015",
"license": "bsd-3-clause",
"hash": -395908788331739840,
"line_mean": 31.0744680851,
"line_max": 82,
"alpha_frac": 0.6736318408,
"autogenerated": false,
"ratio": 3.606459330... |
""" A script for testing DraftRegistrationApprovals. Automatically adds comments to and rejects
pending DraftRegistrationApprovals
"""
import sys
import logging
import datetime as dt
from django.utils import timezone
from website.app import init_app
from website.project.model import DraftRegistration, Sanction
logge... | {
"repo_name": "alexschiller/osf.io",
"path": "scripts/prereg/reject_draft_registrations.py",
"copies": "9",
"size": "1747",
"license": "apache-2.0",
"hash": -8491878775636070000,
"line_mean": 30.1964285714,
"line_max": 122,
"alpha_frac": 0.6239267315,
"autogenerated": false,
"ratio": 4.0253456221... |
""" A script for testing DraftRegistrationApprovals. Automatically adds comments to and rejects
pending DraftRegistrationApprovals
"""
import sys
import logging
import datetime as dt
from website.app import init_app
from website.models import DraftRegistration, Sanction, User
logger = logging.getLogger(__name__)
logg... | {
"repo_name": "brandonPurvis/osf.io",
"path": "scripts/prereg/reject_draft_registrations.py",
"copies": "9",
"size": "1717",
"license": "apache-2.0",
"hash": 4584485334581321700,
"line_mean": 30.7962962963,
"line_max": 122,
"alpha_frac": 0.619685498,
"autogenerated": false,
"ratio": 4.01168224299... |
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending
DraftRegistrationApprovals.
"""
import sys
import logging
from framework.celery_tasks.handlers import celery_teardown_request
from website.app import init_app
from website.project.model import DraftRegistration, Sanction
logger =... | {
"repo_name": "mluo613/osf.io",
"path": "scripts/prereg/approve_draft_registrations.py",
"copies": "28",
"size": "1260",
"license": "apache-2.0",
"hash": 1072098318091961100,
"line_mean": 31.3076923077,
"line_max": 122,
"alpha_frac": 0.6706349206,
"autogenerated": false,
"ratio": 3.90092879256965... |
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending
DraftRegistrationApprovals.
"""
import sys
import logging
from framework.tasks.handlers import celery_teardown_request
from website.app import init_app
from website.project.model import DraftRegistration, Sanction
logger = loggin... | {
"repo_name": "KAsante95/osf.io",
"path": "scripts/prereg/approve_draft_registrations.py",
"copies": "4",
"size": "1253",
"license": "apache-2.0",
"hash": 4036909659410998300,
"line_mean": 31.1282051282,
"line_max": 122,
"alpha_frac": 0.6695929769,
"autogenerated": false,
"ratio": 3.9034267912772... |
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending
DraftRegistrationApprovals.
"""
import sys
import logging
from website.app import init_app
from website.models import DraftRegistration, Sanction, User
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.WARN)
l... | {
"repo_name": "ticklemepierce/osf.io",
"path": "scripts/prereg/approve_draft_registrations.py",
"copies": "3",
"size": "1154",
"license": "apache-2.0",
"hash": -8036463927482016000,
"line_mean": 31.0555555556,
"line_max": 122,
"alpha_frac": 0.6585788562,
"autogenerated": false,
"ratio": 3.8724832... |
""" A script for updating the patient organization of a user.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py print_all_visits --org maventy
To run on production:
> manage.py print_all_visits --org maventy --remote
"""
import logging
from optparse im... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/print_all_visits.py",
"copies": "1",
"size": "1191",
"license": "bsd-3-clause",
"hash": -1208119756659356400,
"line_mean": 24.8913043478,
"line_max": 66,
"alpha_frac": 0.7061293031,
"autogenerated": false,
"ratio": 3.432... |
""" A script for updating the patient organization of a user.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py setpassword --user dfrankow --password foo
To run on production:
> manage.py setpassword --user dfrankow --password foo --remote
"""
import ... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/setpassword.py",
"copies": "1",
"size": "1550",
"license": "bsd-3-clause",
"hash": 5674828841575621000,
"line_mean": 26.1929824561,
"line_max": 78,
"alpha_frac": 0.7,
"autogenerated": false,
"ratio": 3.6729857819905214,
... |
""" A script for updating the patient organization of a user.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py setuserorg --user dfrankow --org maventy
To run on production:
> manage.py setuserorg --user dfrankow --org maventy --remote
"""
import logg... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/setuserorg.py",
"copies": "1",
"size": "1755",
"license": "bsd-3-clause",
"hash": 2394271305266928600,
"line_mean": 27.7704918033,
"line_max": 78,
"alpha_frac": 0.6997150997,
"autogenerated": false,
"ratio": 3.4683794466... |
""" A script for updating the search index.
This is a manage.py command. Run with --help for documentation.
Example usage:
To run on localhost:
> manage.py updatesearchindex
To run on production:
> manage.py updatesearchindex --remote
"""
import getpass
import logging
import settings
from django... | {
"repo_name": "avastjohn/maventy_new",
"path": "healthdb/management/commands/updatesearchindex.py",
"copies": "1",
"size": "2889",
"license": "bsd-3-clause",
"hash": 6245131244341277000,
"line_mean": 30.4606741573,
"line_max": 77,
"alpha_frac": 0.6542056075,
"autogenerated": false,
"ratio": 3.786... |
"""A script for watching all traffic on the IOPub channel (stdout/stderr/pyerr) of engines.
This connects to the default cluster, or you can pass the path to your ipcontroller-client.json
Try running this script, and then running a few jobs that print (and call sys.stdout.flush),
and you will see the print statements... | {
"repo_name": "pioneers/topgear",
"path": "ipython-in-depth/examples/Parallel Computing/iopubwatcher.py",
"copies": "4",
"size": "2618",
"license": "apache-2.0",
"hash": -5540270860744334000,
"line_mean": 33,
"line_max": 95,
"alpha_frac": 0.6375095493,
"autogenerated": false,
"ratio": 3.713475177... |
"""A script generating the visibility graph for problem 1"""
import json
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
import numpy as np
import os
from pprint import pprint
class Problem:
""" Class containing a path-finding problem instance"""
def __ini... | {
"repo_name": "chm90/Multi_agent_A1",
"path": "src/visibility_graph.py",
"copies": "1",
"size": "9225",
"license": "mit",
"hash": 9193182454756168000,
"line_mean": 30.8892733564,
"line_max": 87,
"alpha_frac": 0.5496473142,
"autogenerated": false,
"ratio": 3.2735346358792183,
"config_test": fals... |
""" A script illustrating how to evolve a simple Capture-Game Player
which uses a MDRNN as network, with a simple ES algorithm."""
__author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.rl.tasks.capturegame import CaptureGameTask
from pybrain.structure.evolvables.cheaplycopiable import CheaplyCopiable
from pybrain.rl.l... | {
"repo_name": "daanwierstra/pybrain",
"path": "examples/capturegame/evolvingplayer.py",
"copies": "1",
"size": "1877",
"license": "bsd-3-clause",
"hash": 2825888687245123000,
"line_mean": 35.8235294118,
"line_max": 103,
"alpha_frac": 0.7650506127,
"autogenerated": false,
"ratio": 3.33392539964476... |
"""A script is a series of operations."""
import json
import os
from .ops import create
class Script(object):
"""A script is a series of operations."""
def __init__(self, s=None):
"""Parse a script from a JSON string."""
if s is not None:
self.parsed_script = json.loads(s)
... | {
"repo_name": "jezcope/pyrefine",
"path": "pyrefine/script.py",
"copies": "1",
"size": "1267",
"license": "mit",
"hash": 7575640011268687000,
"line_mean": 21.2280701754,
"line_max": 72,
"alpha_frac": 0.5580110497,
"autogenerated": false,
"ratio": 4.309523809523809,
"config_test": false,
"has_... |
"""A script testing the extraction pipeline of RHEA
Steps
1) Initialise Format, Extractor and RadialVelocity
2) Define file paths for science, flat and dark frames
3) Extract/import spectra
4) Create/import reference spectra
5) Calculate radial velocities
6) Plot radial velocities
"""
import numpy as np
try:
impor... | {
"repo_name": "mikeireland/pymfe",
"path": "tauceti_thar_extraction.py",
"copies": "1",
"size": "5471",
"license": "mit",
"hash": 3205346437561254000,
"line_mean": 39.2279411765,
"line_max": 133,
"alpha_frac": 0.5161762018,
"autogenerated": false,
"ratio": 3.893950177935943,
"config_test": fals... |
"""A script testing the extraction pipeline of RHEA
Steps
1) Initialise Format, Extractor and RadialVelocity
2) Define file paths for science, flat and dark frames
3) Extract/import spectra
4) Create/import reference spectra
5) Calculate radial velocities
6) Plot radial velocities
"""
import numpy as np
imp... | {
"repo_name": "mikeireland/pymfe",
"path": "thar_extraction_test.py",
"copies": "1",
"size": "4732",
"license": "mit",
"hash": 8159742888251268000,
"line_mean": 42.2242990654,
"line_max": 133,
"alpha_frac": 0.4860524091,
"autogenerated": false,
"ratio": 3.872340425531915,
"config_test": false,
... |
"""A script that builds all the information from the OpenAL headers."""
import build_metadata.extract_from_headers
import os.path
import yaml
import collections
headers = set([
os.path.join('OpenAL-Soft', 'include', 'al', 'al.h'),
os.path.join('OpenAL-Soft', 'include', 'al', 'alc.h'),
os.path.join('OpenAL-Soft', 'inc... | {
"repo_name": "camlorn/camlorn_audio_rewrite",
"path": "build_data.py",
"copies": "1",
"size": "2094",
"license": "bsd-2-clause",
"hash": -932045381195006300,
"line_mean": 36.3928571429,
"line_max": 176,
"alpha_frac": 0.6843361987,
"autogenerated": false,
"ratio": 3.0172910662824206,
"config_te... |
"A script that calculates allele frequencies from plink data"
import argparse
import pydigree as pyd
parser = argparse.ArgumentParser()
parser.add_argument('--ped', required=True, help='Plink formatted PED file')
parser.add_argument('--map', required=True, help='Plink formatted MAP file')
parser.add_argument('--snps... | {
"repo_name": "jameshicks/pydigree",
"path": "scripts/frequencies.py",
"copies": "1",
"size": "1422",
"license": "apache-2.0",
"hash": 7582885871019944000,
"line_mean": 34.55,
"line_max": 77,
"alpha_frac": 0.6378340366,
"autogenerated": false,
"ratio": 3.4100719424460433,
"config_test": false,
... |
"""A script that changes a scan parameter (usually PlsrDAC, innermost loop) in a certain range for selected pixels and measures the length of the HitOR signal with ToT and TDC method.
The TDC method gives higher precision charge information than the TOT method. The TDC method is limited to single pixel cluster. During... | {
"repo_name": "SiLab-Bonn/pyBAR",
"path": "pybar/scans/calibrate_hit_or.py",
"copies": "1",
"size": "17648",
"license": "bsd-3-clause",
"hash": 9025521105500629000,
"line_mean": 69.4493927126,
"line_max": 355,
"alpha_frac": 0.6367860381,
"autogenerated": false,
"ratio": 3.68203630294179,
"confi... |
"""A script that changes the PlsrDAC in a certain range and measures the voltage step from the transient injection signal.
Since the minimum and maximum of the signal is measured, this script gives a more precise PlsrDAC calibration than
the normal PlsrDAC calibration. Do not forget to add the oscilloscope device in du... | {
"repo_name": "SiLab-Bonn/pyBAR",
"path": "pybar/scans/calibrate_plsr_dac_transient.py",
"copies": "1",
"size": "18061",
"license": "bsd-3-clause",
"hash": 5362335622730516000,
"line_mean": 60.852739726,
"line_max": 268,
"alpha_frac": 0.6287580976,
"autogenerated": false,
"ratio": 3.4866795366795... |
"""A script that changes the voltage in a certain range and measures the current needed for IV curves. Maximum voltage and current limits
can be set for device protection.
"""
import logging
import time
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
imp... | {
"repo_name": "SiLab-Bonn/pyBAR",
"path": "pybar/scans/scan_iv.py",
"copies": "1",
"size": "5354",
"license": "bsd-3-clause",
"hash": 3378317442352461000,
"line_mean": 47.6727272727,
"line_max": 257,
"alpha_frac": 0.5698543145,
"autogenerated": false,
"ratio": 4.096403978576894,
"config_test": ... |
"""A script that contains all functions to do RNA-seq epistasis analysis."""
# important stuff:
import pandas as pd
import numpy as np
# Graphics
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import scipy.odr as odr
# labeller:
import gvars
from scipy.stats import gaussian_kde
from ma... | {
"repo_name": "WormLabCaltech/mprsq",
"path": "src/epistasis.py",
"copies": "1",
"size": "15460",
"license": "mit",
"hash": 4602572335771810300,
"line_mean": 30.2955465587,
"line_max": 79,
"alpha_frac": 0.5752910737,
"autogenerated": false,
"ratio": 3.2865646258503403,
"config_test": false,
"... |
"""A script that contains all genotype variable information for mprsq."""
class genvars:
"""A class that contains important variables for the mprsq project."""
def __init__(self):
"""Initialize the class object with all the necessary variables."""
self.double_mapping = {'bd': 'a', 'bc': 'f'}
... | {
"repo_name": "WormLabCaltech/mprsq",
"path": "src/gvars.py",
"copies": "1",
"size": "4550",
"license": "mit",
"hash": 2046580166803875000,
"line_mean": 40.3636363636,
"line_max": 75,
"alpha_frac": 0.3186813187,
"autogenerated": false,
"ratio": 3.5271317829457365,
"config_test": false,
"has_n... |
# a script that converts word file to txt files
# requires word application on Windows machine
# requirement:
# 1. Windows platform
# 2. python 2.7
# 3. pywin32, download from http://sourceforge.net/projects/pywin32/
# 4. word application installed on running machine
from win32com.client import constants, D... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/578121_Converts_doc_files_intext_files_Windows/recipe-578121.py",
"copies": "1",
"size": "1578",
"license": "mit",
"hash": -5493638667337446000,
"line_mean": 32.5744680851,
"line_max": 76,
"alpha_frac": 0.6679340938,
"autogenerated": false,
... |
# A script that finds occurrences of the .. tags:: directive
# and sets up the structure of the tags directory. One file
# is created for each subject tag, that file contains links to
# each instance of the tag throughout the docs.
import os
import shutil
import re
from six import PY3
def make_tagdir():
# Clean... | {
"repo_name": "daniel-de-vries/OpenLEGO",
"path": "openlego/docs/_utils/preprocess_tags.py",
"copies": "1",
"size": "3106",
"license": "apache-2.0",
"hash": 1140347213114532000,
"line_mean": 30.693877551,
"line_max": 79,
"alpha_frac": 0.5244687701,
"autogenerated": false,
"ratio": 4.3319386331938... |
'''A script that gathers analytical data regarding the automata.'''
from lrp import Linear_Reward_Penalty as LRP
from mse import MSE
from environment import Environment
from pinger import Pinger
import numpy as np
# import matplotlib.pyplot as plt
import plotly.plotly as py
import plotly.graph_objs as go
# import tune_... | {
"repo_name": "0xSteve/detection_learning",
"path": "P_model/Visualizations/UUAV_depth_finding/analytics.py",
"copies": "1",
"size": "4407",
"license": "apache-2.0",
"hash": -671019840492716300,
"line_mean": 38.7027027027,
"line_max": 78,
"alpha_frac": 0.6065350579,
"autogenerated": false,
"ratio... |
"""A script that generates a TSV file of games to import into Team Cowboy.
Games are imported from any Sportszone web site (e.g. http://www.gshockey.com/).
If Team Cowboy API credentials are provided then Team Cowboy is queried for
existing games in the same date range as the Sportszone schedule. Any duplicate
games a... | {
"repo_name": "kjiwa/sportszone-exporter",
"path": "__main__.py",
"copies": "1",
"size": "8265",
"license": "mit",
"hash": 1481966509775941600,
"line_mean": 30.7884615385,
"line_max": 80,
"alpha_frac": 0.6592861464,
"autogenerated": false,
"ratio": 3.194820255121763,
"config_test": false,
"ha... |
"A script that generates the Signpost's Featured Content Report."
import getpass
import pywikibot
import re
from wikitools.wiki import Wiki as WikitoolsWiki
from wikitools.page import Page as WikitoolsPage
WP_GO_HEADING = (
r"'''\[\[Wikipedia:Featured (.+?)\|.+?\]\] that gained featured status'''")
WP_GO_ITEM = r"... | {
"repo_name": "APerson241/EnterpriseyBot",
"path": "fcreporter/fcreporter.py",
"copies": "2",
"size": "4372",
"license": "mit",
"hash": 840095833037450100,
"line_mean": 41.4466019417,
"line_max": 148,
"alpha_frac": 0.5475754803,
"autogenerated": false,
"ratio": 3.450670876085241,
"config_test":... |
"""A script that generates the SRA submission files for our project."""
# -*- coding: utf-8 -*-
import pandas as pd
import argparse as arg
import os
import numpy
parser = arg.ArgumentParser(description='Generate the SRA metadata files')
parser.add_argument('biosample', type=str,
help='path to the b... | {
"repo_name": "WormLabCaltech/mprsq",
"path": "sra_submission/make_sra_metadata_file.py",
"copies": "1",
"size": "2373",
"license": "mit",
"hash": 4050353250908966400,
"line_mean": 38.55,
"line_max": 79,
"alpha_frac": 0.5992414665,
"autogenerated": false,
"ratio": 3.469298245614035,
"config_tes... |
#a script that locks a certain file - it doesn't check (currently)
#the lockfile relevance, lockfiles are now implementd as file_naem.lock
from random import random
from time import sleep
from os import remove
from os.path import exists,dirname,join,isdir
lock_ext='.lock'
timeout = 10
class deadlockError(Exception):
... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/193488_lockfile_and_directory_module/recipe-193488.py",
"copies": "1",
"size": "2462",
"license": "mit",
"hash": -7359080534037621000,
"line_mean": 35.2058823529,
"line_max": 91,
"alpha_frac": 0.6758732738,
"autogenerated": false,
"ratio":... |
# A script that parses the wikipedia page into JSON.
# run wget http://en.wikipedia.org/wiki/List_of_mobile_country_codes
# then this..
import json
import os
from BeautifulSoup import BeautifulSoup
from mobile_codes import MNCOperator
def parse_wikipedia():
with open('List_of_mobile_country_codes', 'r') as html... | {
"repo_name": "andymckay/mobile-codes",
"path": "parse.py",
"copies": "2",
"size": "1685",
"license": "mit",
"hash": -4015037618027713000,
"line_mean": 27.5593220339,
"line_max": 73,
"alpha_frac": 0.6112759644,
"autogenerated": false,
"ratio": 3.795045045045045,
"config_test": false,
"has_no_... |
# A script that processes HTSeq-count output for easy input into R.
# Fetches the sample name from the cluster output
# Saves the six lines of basic statistics generated by HTSeq at the bottom of the file in a .txt file
import re
import os
import glob
import argparse
import sys
def create_parser():
"""Return the... | {
"repo_name": "Joannacodes/science",
"path": "htseq-2-R.py",
"copies": "2",
"size": "1880",
"license": "apache-2.0",
"hash": 1972307393639351300,
"line_mean": 27.0597014925,
"line_max": 101,
"alpha_frac": 0.5776595745,
"autogenerated": false,
"ratio": 3.6153846153846154,
"config_test": false,
... |
"""A script that processes the input CSV files and copies them into a SQLite database."""
import csv
import sqlite3
import os
import sys
import click
import time
__version__ = '2.1.0'
def write_out(msg):
if write_out.verbose:
print(msg)
class CsvOptions:
def __init__(self,
typing_... | {
"repo_name": "zblesk/csv-to-sqlite",
"path": "csv_to_sqlite.py",
"copies": "1",
"size": "8543",
"license": "mit",
"hash": -4193641018838773000,
"line_mean": 38.1880733945,
"line_max": 140,
"alpha_frac": 0.5712279059,
"autogenerated": false,
"ratio": 4.107211538461539,
"config_test": false,
"... |
"""A script that provides custom input vectors that can be used during active
scans.
The option Enable Script Input Vectors must be enabled before starting the
scans.
Note that new scripts will initially be disabled, right click the script in the
Scripts tree and select Enable Script.
"""
import urllib
def parsePara... | {
"repo_name": "zapbot/zap-extensions",
"path": "addOns/jython/src/main/zapHomeFiles/scripts/templates/variant/Input Vector default template.py",
"copies": "7",
"size": "2067",
"license": "apache-2.0",
"hash": 3039964650618017300,
"line_mean": 32.8852459016,
"line_max": 79,
"alpha_frac": 0.6574746009,... |
"""A script that runs a fast threshold scan for different parameter (e.g. GDAC, TDACVbp) to get a threshold calibration.
To save time the PlsrDAC start position is the start position determined from the previous threshold scan. So the
scan parameter values should be chosen in a ways that the threshold increases for e... | {
"repo_name": "SiLab-Bonn/pyBAR",
"path": "pybar/scans/calibrate_threshold.py",
"copies": "1",
"size": "12584",
"license": "bsd-3-clause",
"hash": -4561077390620466000,
"line_mean": 69.5,
"line_max": 293,
"alpha_frac": 0.6952479339,
"autogenerated": false,
"ratio": 3.712094395280236,
"config_te... |
""" A script that send an SMS alert about a predefined TimeTabel"""
# imports
from twilio.rest import TwilioRestClient
from datetime import datetime
import time
# Day defeniton
# fill your time and class according to the template below
# day = {Time:class}
# Time = float, class = String
mon = {}
tue = {}
... | {
"repo_name": "Mik-the-koder/timeTable",
"path": "bla.py",
"copies": "1",
"size": "2035",
"license": "mit",
"hash": 99200525214457840,
"line_mean": 31.9166666667,
"line_max": 165,
"alpha_frac": 0.6820638821,
"autogenerated": false,
"ratio": 3.1550387596899223,
"config_test": false,
"has_no_ke... |
"""A Script that tags your movie files.
Run the script in a folder containing the mp4/mkv movie files with their
filename as the movie's title.
This script might seem a little messy and ugly and I know maybe there is
better and effecient way to do some of the tasks.
but I am unaware of them at the moment and am a beg... | {
"repo_name": "prithugoswami/auto-movie-tagger",
"path": "amt.py",
"copies": "1",
"size": "14949",
"license": "mit",
"hash": -3343518404846245000,
"line_mean": 39.185483871,
"line_max": 79,
"alpha_frac": 0.5053849756,
"autogenerated": false,
"ratio": 4.373610298420129,
"config_test": false,
"... |
"""A script that takes external trigger scan data where the TDC + TDC time stamp were activated and creates
time walk plots from the data.
"""
import logging
from matplotlib import pyplot as plt
from matplotlib import cm
import tables as tb
import numpy as np
from scipy.interpolate import interp1d
import progressbar
... | {
"repo_name": "SiLab-Bonn/pyBAR",
"path": "pybar/scans/analyze_timewalk.py",
"copies": "1",
"size": "8651",
"license": "bsd-3-clause",
"hash": -5986124416934125000,
"line_mean": 52.0736196319,
"line_max": 223,
"alpha_frac": 0.6369205872,
"autogenerated": false,
"ratio": 3.4166666666666665,
"con... |
"""A script to apply a page parser to an HTML file.
Used for easier debugging and visual checks."""
import argparse
from jobtechs.parser import NETLOC_TO_PARSER_MAP, TermsExtractor
def main():
# pylint: disable=missing-docstring
parser = argparse.ArgumentParser()
parser.add_argument('parser_netloc', choi... | {
"repo_name": "newtover/process_jobs",
"path": "jobtechs/scripts/apply_parser.py",
"copies": "1",
"size": "1093",
"license": "mit",
"hash": 8862534204941144000,
"line_mean": 30.2285714286,
"line_max": 89,
"alpha_frac": 0.6431838975,
"autogenerated": false,
"ratio": 3.607260726072607,
"config_te... |
""" A script to build specific fasta databases """
import sys
import logging
#===================================== Iterator ===============================
class Sequence:
''' Holds protein sequence information '''
def __init__(self):
self.header = ""
self.sequence = ""
class FASTAReader:
... | {
"repo_name": "jmchilton/TINT",
"path": "projects/TropixGalaxy/resources/client/edu/umn/msi/tropix/galaxy/client/proteomics/filter_by_an_id.py",
"copies": "1",
"size": "2992",
"license": "epl-1.0",
"hash": 7950386859765457000,
"line_mean": 29.8453608247,
"line_max": 99,
"alpha_frac": 0.4943181818,
... |
"""A script to calculate monasca data size. CAUTION: It is very time consuming in a real environment!"""
import datetime
import os
from monascaclient import client
from monascaclient import ksclient
auth_url = os.environ.get('OS_AUTH_URL')
username = os.environ.get('OS_USERNAME')
password = os.environ.get('OS_PASSWOR... | {
"repo_name": "zqfan/openstack",
"path": "monasca/monasca_data_size.py",
"copies": "1",
"size": "1805",
"license": "apache-2.0",
"hash": -7113312868030885000,
"line_mean": 30.6666666667,
"line_max": 105,
"alpha_frac": 0.6088642659,
"autogenerated": false,
"ratio": 3.8322717622080678,
"config_te... |
"""A script to calculate TG-51 dose using pylinac classes and following the TG-51 photon form"""
from pylinac.calibration import tg51
ENERGY = 6
TEMP = 22.1
PRESS = tg51.mmHg2kPa(755.0)
CHAMBER = '30013' # PTW
P_ELEC = 1.000
ND_w = 5.443 # Gy/nC
MU = 200
CLINICAL_PDD = 66.5
tg51_6x = tg51.TG51Photon(
unit='Tru... | {
"repo_name": "jrkerns/pylinac",
"path": "docs/source/code_snippets/tg51_class.py",
"copies": "1",
"size": "1119",
"license": "mit",
"hash": 8672360867416695000,
"line_mean": 25.6428571429,
"line_max": 116,
"alpha_frac": 0.6827524576,
"autogenerated": false,
"ratio": 2.293032786885246,
"config_... |
"""A script to calculate TG-51 dose using pylinac functions and following the TG-51 photon form"""
from pylinac.calibration import tg51
ENERGY = 6
TEMP = 22.1
PRESS = tg51.mmHg2kPa(755.0)
CHAMBER = '30013' # PTW
P_ELEC = 1.000
ND_w = 5.443 # Gy/nC
MU = 200
CLINICAL_PDD = 66.5
# Section 4 (beam quality)
# since ene... | {
"repo_name": "jrkerns/pylinac",
"path": "docs/source/code_snippets/tg51_function.py",
"copies": "1",
"size": "1425",
"license": "mit",
"hash": -2801244462761614000,
"line_mean": 29.3191489362,
"line_max": 108,
"alpha_frac": 0.7010526316,
"autogenerated": false,
"ratio": 2.2161741835147746,
"co... |
"""A script to calculate TRS-398 dose using pylinac classes and following the TRS-398 photon form"""
from pylinac.calibration import trs398
ENERGY = 6
TEMP = 22.1
PRESS = trs398.mmHg2kPa(755.0)
CHAMBER = '30013' # PTW
K_ELEC = 1.000
ND_w = 5.443 # Gy/nC
MU = 200
CLINICAL_PDD = 66.5
trs398_6x = trs398.TRS398Photon(... | {
"repo_name": "jrkerns/pylinac",
"path": "docs/source/code_snippets/trs398_class.py",
"copies": "1",
"size": "1182",
"license": "mit",
"hash": -2684705553313882000,
"line_mean": 24.6956521739,
"line_max": 120,
"alpha_frac": 0.6785109983,
"autogenerated": false,
"ratio": 2.299610894941634,
"conf... |
''' A script to change some 'c' code style and errors.
I should refactor this :\ '''
import os,sys
types = ["void", "int", "unsigned int", "long int", "char", "unsigned char", "float", "double"]
tokens = []
white_space = []
# Rules
#----------------------
def fflush_before_scanf(i,elements):
return ( i+1 < le... | {
"repo_name": "someoneigna/python-projects",
"path": "garin_fixer/garin_fixer.py",
"copies": "1",
"size": "3730",
"license": "mit",
"hash": 5687201746793003000,
"line_mean": 27.9147286822,
"line_max": 98,
"alpha_frac": 0.5345844504,
"autogenerated": false,
"ratio": 3.5355450236966823,
"config_t... |
"""A script to check and report the size of the grammars."""
import inspect
import os
import importlib
from darglint.parse.grammar import (
BaseGrammar,
)
def convert_filename_to_module(filename):
return filename[:-3].replace('/', '.')
def get_python_modules_in_grammars():
basepath = os.path.join(
... | {
"repo_name": "terrencepreilly/darglint",
"path": "integration_tests/grammar_size.py",
"copies": "1",
"size": "1682",
"license": "mit",
"hash": 4287172595804345300,
"line_mean": 23.7352941176,
"line_max": 66,
"alpha_frac": 0.5558858502,
"autogenerated": false,
"ratio": 3.911627906976744,
"confi... |
"""A Script to compute the effective overlap between a laser and a star Airy disk,
when the starlight is dispersed, in a heterodyne laser frequency comb detection
scheme."""
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
#Start with a y(x) jinc func... | {
"repo_name": "mikeireland/pfi",
"path": "pfi/overlap.py",
"copies": "1",
"size": "1957",
"license": "mit",
"hash": -4490286485062641700,
"line_mean": 43.5,
"line_max": 112,
"alpha_frac": 0.6438426162,
"autogenerated": false,
"ratio": 2.6268456375838927,
"config_test": false,
"has_no_keywords... |
# A script to convert an entire directory to a C array, in the "romfs" format
import os, sys
import re
import struct
_crtline = ' '
_numdata = 0
_bytecnt = 0
maxlen = 30
# Line output function
def _add_data( data, outfile, moredata = True ):
global _crtline, _numdata, _bytecnt
_bytecnt = _bytecnt + 1
if mored... | {
"repo_name": "simplemachines-italy/hempl",
"path": "mkfs.py",
"copies": "1",
"size": "2977",
"license": "mit",
"hash": -6253239516938278000,
"line_mean": 28.4752475248,
"line_max": 98,
"alpha_frac": 0.6090023514,
"autogenerated": false,
"ratio": 3.214902807775378,
"config_test": false,
"has_... |
"""A script to create a plot of the number of issues in a project.
Uses GitHub's API v4 which uses graphql
https://developer.github.com/v4/
For more instructions see the the corresponding Jupyter notebook:
project_stats.ipynb
"""
import argparse
import datetime
from dateutil import parser as date_parser
import json
i... | {
"repo_name": "kubeflow/community",
"path": "scripts/project_stats.py",
"copies": "1",
"size": "7517",
"license": "apache-2.0",
"hash": -3541369354438406000,
"line_mean": 29.9382716049,
"line_max": 117,
"alpha_frac": 0.5184249036,
"autogenerated": false,
"ratio": 4.509298140371926,
"config_test... |
#A script to create custom POX flows
#http://github.com/abh15/pox-flowgen
#import random
#fname="poxscript_"+str(random.randint(1000,9999))+".py"
#uncomment above lines if each script with a new name is required
fname="controllerScript.py"
file=open(fname,'w')
file.close()
#----create a new empty file----
target=o... | {
"repo_name": "abh15/pox-flowgen",
"path": "pcfg.py",
"copies": "1",
"size": "8950",
"license": "mit",
"hash": 3857085243752984600,
"line_mean": 26.2036474164,
"line_max": 167,
"alpha_frac": 0.6339664804,
"autogenerated": false,
"ratio": 2.651851851851852,
"config_test": false,
"has_no_keywor... |
"A script to demonstrate cross validation"
import numpy as np
import matplotlib.pyplot as plt
import regression
N=100
THETA_START=-1.9
THETA_END=2.2
NOISE_SIGMA=0.4
def fit_model(train_data, eval_data, model):
X_tr, y_tr = train_data
X_eval, y_eval = eval_data
# Define our kernel function.
def kerne... | {
"repo_name": "mfergie/regression-tutorial",
"path": "cross_validation.py",
"copies": "1",
"size": "2326",
"license": "mit",
"hash": -6792783401073928000,
"line_mean": 24.8444444444,
"line_max": 70,
"alpha_frac": 0.6182287188,
"autogenerated": false,
"ratio": 3.1732605729877217,
"config_test": ... |
"""A script to download slack archives."""
from os.path import abspath, dirname, join
from splinter import Browser
from splinter.exceptions import ElementDoesNotExist
import yaml
HERE = dirname(abspath(__file__))
CONFIG_PATH = join(HERE, '..', 'parktain', 'config.yaml')
with open(CONFIG_PATH, 'r') as ymlfile:
sl... | {
"repo_name": "punchagan/parktain",
"path": "scripts/download_archive.py",
"copies": "1",
"size": "1259",
"license": "bsd-3-clause",
"hash": -1092621629142414500,
"line_mean": 28.9761904762,
"line_max": 73,
"alpha_frac": 0.6735504369,
"autogenerated": false,
"ratio": 3.780780780780781,
"config_... |
# A script to ensure that every HWP flat-field is normalized by its full fram MFM
import os
import glob
from astropy.stats import sigma_clipped_stats
import astroimage as ai
# Add the header handler to the BaseImage class
# from Mimir_header_handler import Mimir_header_handler
# ai.reduced.ReducedScience.set_header_ha... | {
"repo_name": "jmontgom10/Mimir_pyPol",
"path": "oldCode/03a2_normalize_HWP_flats.py",
"copies": "1",
"size": "1463",
"license": "mit",
"hash": 8886705029684487000,
"line_mean": 32.25,
"line_max": 81,
"alpha_frac": 0.7388926863,
"autogenerated": false,
"ratio": 2.997950819672131,
"config_test":... |
# A script to execute all the SQL DDL scripts which are needed in addition to what JPA does.
import pyodbc, os, sys, time
if (len(sys.argv) <= 1):
databaseServer = 'SASERVER1\SQL2008R2'
databaseName = 'imDev'
userName = 'REMOVED'
password = 'REMOVED'
scriptPath = '.'
else:
[scriptPath,databaseServer,... | {
"repo_name": "JoelBondurant/RandomCodeSamples",
"path": "python/deploySQL.py",
"copies": "1",
"size": "1680",
"license": "apache-2.0",
"hash": -4246797213937200600,
"line_mean": 23.8461538462,
"line_max": 92,
"alpha_frac": 0.6702380952,
"autogenerated": false,
"ratio": 3.0712979890310788,
"con... |
# A script to extract and plot significant LVs from PLS
# event-related and block result.mat files in all current
# MATLAB encodings. Not yet compatible with structural PLS
# results !
# Note: If this is your first time running R from within
# python, you'll need to execute the following commands:
# !conda install -... | {
"repo_name": "emdupre/PFOCv2",
"path": "import_and_display_PLS_results.py",
"copies": "1",
"size": "9646",
"license": "mit",
"hash": 3766693171098194400,
"line_mean": 39.8728813559,
"line_max": 105,
"alpha_frac": 0.5895708066,
"autogenerated": false,
"ratio": 3.491132826637713,
"config_test": ... |
"""A script to fit tramlines etc for Ghost data.
"""
from __future__ import division, print_function
import pymfe
import astropy.io.fits as pyfits
import numpy as np
import matplotlib.pyplot as plt
import pdb
import shutil
import matplotlib.cm as cm
#plt.ion()
#Define the files in use (NB xmod.txt and wavemod.txt ... | {
"repo_name": "mikeireland/pymfe",
"path": "ghost_fit.py",
"copies": "1",
"size": "2187",
"license": "mit",
"hash": -230040657147824100,
"line_mean": 28.16,
"line_max": 90,
"alpha_frac": 0.7279378144,
"autogenerated": false,
"ratio": 2.690036900369004,
"config_test": false,
"has_no_keywords":... |
"""A script to fit tramlines etc for RHEA@Subaru data.
Long wavelengths are down and right. 15 lines visible.
lines = np.loadtxt('argon.txt')
order = 1e7/31.6*2*np.sin(np.radians(64.0))/argon
plt.plot(1375 - (order - np.round(order))/order*1.8e5)
plt.plot(1375 - (order - np.round(order)+1)/order*1.8e5)
plt.plot(1375 ... | {
"repo_name": "mikeireland/pymfe",
"path": "rhea_subaru_superK.py",
"copies": "1",
"size": "2445",
"license": "mit",
"hash": -3280144521369125400,
"line_mean": 27.7647058824,
"line_max": 93,
"alpha_frac": 0.7141104294,
"autogenerated": false,
"ratio": 2.533678756476684,
"config_test": false,
... |
"""A script to generate a cloudbuild yaml."""
import os
import yaml
import argparse
# Add directories for new tests here.
DEP_TESTS = ['small_app', 'medium_app', 'large_app']
APP_SIZE_TESTS = {
'scratch_small': '5',
'scratch_medium': '500',
'scratch_large': '50000'
}
_DATA_DIR = '/workspace/ftl/python/ben... | {
"repo_name": "GoogleCloudPlatform/runtimes-common",
"path": "ftl/benchmark/ftl_python_benchmark_yaml.py",
"copies": "3",
"size": "3660",
"license": "apache-2.0",
"hash": -4874140158534433000,
"line_mean": 29,
"line_max": 126,
"alpha_frac": 0.550273224,
"autogenerated": false,
"ratio": 3.61660079... |
"""A script to generate a cloudbuild yaml."""
import os
import yaml
import util
# Add directories for new tests here.
TEST_DIRS = [
'destination_test', 'metadata_test', 'lock_test',
'empty_descriptor_test', 'no_descriptor_test',
'no_deps_test', 'additional_directory',
'gcp_build_test'
]
_ST_IMAGE = ... | {
"repo_name": "sharifelgamal/runtimes-common",
"path": "ftl/integration_tests/ftl_php_integration_tests_yaml.py",
"copies": "3",
"size": "1938",
"license": "apache-2.0",
"hash": -7273752538870537000,
"line_mean": 32.4137931034,
"line_max": 122,
"alpha_frac": 0.6150670795,
"autogenerated": false,
... |
"""A script to generate a cloudbuild yaml."""
import os
import yaml
import util
# Add directories for new tests here.
TEST_DIRS = [
'gcp_build_test', 'packages_test', 'packages_lock_test',
'destination_test', 'metadata_test', 'npmrc_test', 'file_test',
'empty_descriptor_test', 'no_descriptor_test',
'... | {
"repo_name": "priyawadhwa/runtimes-common",
"path": "ftl/integration_tests/ftl_node_integration_tests_yaml.py",
"copies": "1",
"size": "1889",
"license": "apache-2.0",
"hash": -5215474930423090000,
"line_mean": 32.1403508772,
"line_max": 78,
"alpha_frac": 0.5955532028,
"autogenerated": false,
"r... |
"""A script to generate a cloudbuild yaml."""
import os
import yaml
import util
# Add directories for new tests here.
TEST_DIRS = [
'packages_test', 'metadata_test',
'python3_test', 'pipfile_test',
'venv_dir_test']
_ST_IMAGE = ('gcr.io/gcp-runtimes/structure-test:'
'6195641f5a5a14c63c794526... | {
"repo_name": "nkubala/runtimes-common",
"path": "ftl/integration_tests/ftl_python_integration_tests_yaml.py",
"copies": "1",
"size": "1793",
"license": "apache-2.0",
"hash": 1595223677785717200,
"line_mean": 31.6,
"line_max": 76,
"alpha_frac": 0.5906302287,
"autogenerated": false,
"ratio": 3.207... |
"""A script to generate a list of products we are interested in found in job descriptions.
It takes a list of urls from infile (stdin by default) and returns a |-separated output
for each url. The script requires a file with techs we are searching for, the file is
specified by --techs-file option. The urls that led to... | {
"repo_name": "newtover/process_jobs",
"path": "jobtechs/scripts/extract_techs.py",
"copies": "1",
"size": "7040",
"license": "mit",
"hash": 8928828892238553000,
"line_mean": 35.2886597938,
"line_max": 98,
"alpha_frac": 0.5909090909,
"autogenerated": false,
"ratio": 3.984153933220147,
"config_t... |
"""A script to generate a metanetx database.
The purpose of the metanetx database is to provide mapping
from InChI keys to a number of database identifiers. This database
will then populate the website if there is an inchi match.
Running this script requires downloading the following from
https://www.metanetx.org/mnx... | {
"repo_name": "JamesJeffryes/MINE-Database",
"path": "Scripts/generate_metanetx_database.py",
"copies": "1",
"size": "2515",
"license": "mit",
"hash": 749110798309199100,
"line_mean": 28.9523809524,
"line_max": 84,
"alpha_frac": 0.6429423459,
"autogenerated": false,
"ratio": 3.249354005167959,
... |
"""A script to generate fake perfect reads from a reference. """
import argparse
import sys
import random
def read_reference(args):
with open(args.reference, 'r') as ref_fh:
reference_seq = ""
for i, line in enumerate(ref_fh):
if line.startswith('>'):
if i != 0:
... | {
"repo_name": "alneberg/sillymap",
"path": "scripts/generate_test_reads.py",
"copies": "1",
"size": "1422",
"license": "mit",
"hash": -7746032089655724000,
"line_mean": 34.55,
"line_max": 131,
"alpha_frac": 0.6279887482,
"autogenerated": false,
"ratio": 3.618320610687023,
"config_test": false,
... |
# A script to generate helper files for dynamic linking to the Python dll
#
decls = '''
void, Py_Initialize, (void)
int, PyRun_SimpleString, (char *)
void, Py_Finalize, (void)
char *, Py_GetPath, (void)
void, Py_SetPythonHome, (char *)
void, Py_SetProgramName, (char *)
PyObject *, PyMarshal_ReadObjectFromString, (char ... | {
"repo_name": "sovaa/backdoorme",
"path": "backdoors/shell/pupy/client/sources/mktab.py",
"copies": "34",
"size": "3973",
"license": "mit",
"hash": -6375581162205862000,
"line_mean": 35.787037037,
"line_max": 107,
"alpha_frac": 0.6516486282,
"autogenerated": false,
"ratio": 3.211802748585287,
"... |
# A script to help doing the deliveries.
# The user is asked to provide a project ID, a run name, and an UPPMAX project
import sys, os, yaml, glob, shutil
from datetime import datetime
def fixProjName(pname):
newname = pname[0].upper()
postperiod = False
for i in range(1, len(pname)):
if pname[i]... | {
"repo_name": "SciLifeLab/scilifelab",
"path": "scripts/assisted_delivery.py",
"copies": "4",
"size": "8979",
"license": "mit",
"hash": -7215780009638414000,
"line_mean": 36.2572614108,
"line_max": 144,
"alpha_frac": 0.5528455285,
"autogenerated": false,
"ratio": 3.312061969752859,
"config_test... |
"""A script to import a dumped pickle file from the pipeline and plot the flux as a function of zaber position to determine if the alignment was correct.
"""
from __future__ import division, print_function
import numpy as np
import matplotlib.pyplot as plt
import glob
import pdb
import pickle
import matplotlib.cm ... | {
"repo_name": "mikeireland/pymfe",
"path": "determine_IFU_alignment.py",
"copies": "1",
"size": "2723",
"license": "mit",
"hash": 4539091607042373000,
"line_mean": 32.2073170732,
"line_max": 153,
"alpha_frac": 0.7139184723,
"autogenerated": false,
"ratio": 2.6514118792599803,
"config_test": fal... |
# a script to import annotations saved in kw18 files to girder.
# assumes the name of the kw18 file matches the item name.
import time
from datetime import date
import girder_client
import girder as g
import sys
import os
import csv
import pdb
import csv
from pprint import pprint
def process_stack(gc, stack_id):
... | {
"repo_name": "law12019/deep_learning",
"path": "scripts/copyAnnotationsToStack.py",
"copies": "1",
"size": "3966",
"license": "apache-2.0",
"hash": -3948363280870622000,
"line_mean": 32.3277310924,
"line_max": 106,
"alpha_frac": 0.5350479072,
"autogenerated": false,
"ratio": 3.8844270323212537,
... |
# A script to migrate old keen analytics to a new collection, generate in-between points for choppy
# data, or a little of both
import os
import csv
import copy
import pytz
import logging
import argparse
import datetime
from dateutil.parser import parse
from keen.client import KeenClient
from website.settings import ... | {
"repo_name": "icereval/osf.io",
"path": "scripts/analytics/migrate_analytics.py",
"copies": "9",
"size": "20115",
"license": "apache-2.0",
"hash": -8601566881216215000,
"line_mean": 41.6165254237,
"line_max": 177,
"alpha_frac": 0.641163311,
"autogenerated": false,
"ratio": 3.931014266171585,
"... |
# A script to migrate old keen analytics to a new collection, generate in-between points for choppy
# data, or a little of both
import os
import csv
import copy
import time
import pytz
import logging
import argparse
import datetime
from dateutil.parser import parse
from keen.client import KeenClient
from website.sett... | {
"repo_name": "hmoco/osf.io",
"path": "scripts/analytics/migrate_analytics.py",
"copies": "9",
"size": "20127",
"license": "apache-2.0",
"hash": -7665635534734873000,
"line_mean": 41.5517970402,
"line_max": 177,
"alpha_frac": 0.6412778854,
"autogenerated": false,
"ratio": 3.9310546875,
"config_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.