text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
"""This module defines an ASE interface to NWchem
http://www.nwchem-sw.org/
"""
import os, sys
import numpy as np
from warnings import warn
from ase.atoms import Atoms
from ase.units import Hartree, Bohr
from ase.io.orca import write_orca
from ase.calculators.calculator import FileIOCalculator, Parameters, ReadError... | PHOTOX/fuase | ase/ase/calculators/orca.py | Python | gpl-2.0 | 15,172 | [
"ASE",
"Gaussian",
"NWChem",
"ORCA"
] | 7d5ff0d6b6936642610f15db8826c5dceb9d0d0c49012542799b1b4ccde3cf0c |
from . import ui, keyboard, tillconfig, user, cmdline
from . import department
from . import printer
import twython
import time, datetime
from requests_oauthlib import OAuth1Session
from . import td
from .models import RefusalsLog
from .models import StockType
from .models import StockItem
from .models import lazyload
... | sde1000/quicktill | quicktill/extras.py | Python | gpl-3.0 | 9,873 | [
"VisIt"
] | 6bdcab5932d38c83c7b970782963d676c4a8b1d6e53b473a907ad34fc11f94c1 |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | nearlyfreeapps/python-googleadwords | examples/adspygoogle/adwords/v201109/basic_operations/add_text_ads.py | Python | apache-2.0 | 3,210 | [
"VisIt"
] | dc3b06ea3ed708dbc53d5fcd4019c397eca39c5e469da579ec1ee9407b70df27 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2019 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | dgasmith/psi4 | psi4/driver/qmmm.py | Python | lgpl-3.0 | 5,473 | [
"Psi4"
] | 9966e134b3dae88b8b7e2e700621d01b2b3edbcf425397d7d85011fa773d9267 |
"""
Displays Agg images in the browser, with interactivity
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# The WebAgg backend is divided into two modules:
#
# - `backend_webagg_core.py` contains code necessary to embed a WebAgg
# plot inside of a web... | boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/matplotlib/backends/backend_webagg.py | Python | mit | 12,210 | [
"VisIt"
] | 76ce9fd8aaac62d077019658123e690aad71febaae0b779934762bb23c719b8e |
################################################################################
# Copyright (C) 2013-2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Unit tests for gaussian_markov_chain module.
"""
import nump... | bayespy/bayespy | bayespy/inference/vmp/nodes/tests/test_gaussian_markov_chain.py | Python | mit | 38,136 | [
"Gaussian"
] | 53e485ad4c3f06e47234b6267e311b09ec7860b745c2422fa883fb3a1a17c7e2 |
# Author: Pierre Lafaye de Micheaux, Stefan van der Walt
# Python FastICA
# License: GPL unless permission obtained otherwise
# Look at algorithms in Tables 8.3 and 8.4 page 196 in the book: Independent Component Analysis, by Aapo et al.
import numpy as np
import types
__all__ = ['fastica']
def _gs_decorrelation(w... | qilicun/python | python3/scripts/ica.py | Python | gpl-3.0 | 8,770 | [
"Gaussian"
] | 1adda48606cf377cfd4f547db0299568fa2ee250f9a1fd8a48b8f3b7ebc4e60f |
import misc
import crack
import sys
KEY="test>>"
def run_test(fun,args,chk,pts):
try:
rv=fun(*args)
print("%s calling %s(%s)... " % \
(KEY,fun.__name__,",".join([repr(x) for x in args])),rv)
except Exception, e:
print("Exception: "+str(e))
return 0
else:
... | Byrdor/CS-FA16PL | Python/Password Cracking/test.py | Python | mit | 2,330 | [
"MOOSE"
] | a01fc59398ada1a8e17413585046ef01144b67962af5d9e09a15d008af75bc1a |
import numpy as np
import mdtraj as md
import os
import glob
class NonequilibriumSwitchingAnalysis(object):
"""
This is a helper class for analyzing nonequilibrium switching data
"""
def __init__(self, trajectory_directory, trajectory_prefix):
"""
Create a NonequilibriumSwitchingAnaly... | choderalab/perses | notebooks/plotting_tools.py | Python | mit | 5,310 | [
"MDTraj"
] | 73889507eece86ef9bbb7f2454cef7e3cebb7ba6f6e9602daf4131f76da19e82 |
"""A set of reward utilities written by the authors of dm_control"""
from multiprocessing import Value
import numpy as np
# The value returned by tolerance() at `margin` distance from `bounds` interval.
_DEFAULT_VALUE_AT_MARGIN = 0.1
def _sigmoids(x, value_at_1, sigmoid):
"""Returns 1 when `x` == 0, between 0 a... | rlworkgroup/metaworld | metaworld/envs/reward_utils.py | Python | mit | 8,058 | [
"Gaussian"
] | 19e167d7af30208c0aa99967e7a03721a6191f862c60ae81ecb5c4f0d51e1e89 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-admin-sync-users-from-file
# Author : Adrian Casajus
########################################################################
"""
Sync users in Configuration with the cfg contents.
"""
from __... | fstagni/DIRAC | Interfaces/scripts/dirac-admin-sync-users-from-file.py | Python | gpl-3.0 | 1,902 | [
"DIRAC"
] | 8a8a24536dca5cc1820af571e0e2ecb8617a379fd9ba2d6348a4c3ce3272ffbf |
########################################
#Globale Karte fuer tests
# from Rabea Amther
########################################
# http://gfesuite.noaa.gov/developer/netCDFPythonInterface.html
import math
import datetime as DT
from datetime import datetime
from matplotlib.dates import DayLocator, HourLocator, DateForm... | CopyChat/Plotting | Python/noi_cmip5.py | Python | gpl-3.0 | 10,867 | [
"NetCDF"
] | bbbf93293170ef01058dbe454f8b668fee87e62a4ce7188c3ced818f3a7d3395 |
# encoding: utf-8
# Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility... | kinnou02/navitia | source/jormungandr/jormungandr/realtime_schedule/siri.py | Python | agpl-3.0 | 14,117 | [
"VisIt"
] | aba26353391c5a6ef789cdabfdb7d3c5086a8817915ccc1d313a4a03f50774ae |
#!/usr/bin/python
#
# ice - web frontend for SeaIce, based on the Python-Flask framework.
#
# Copyright (c) 2013, Christopher Patton, all rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistrib... | cjpatton/seaice | ice.py | Python | bsd-3-clause | 30,156 | [
"VisIt"
] | 5f9af40cb13f4015932b54ea9c3d6568e75b5b8371fd7b02d7c788e674b895a6 |
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015-2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | ZenHarbinger/snapcraft | snapcraft/tests/commands/test_list_plugins.py | Python | gpl-3.0 | 2,645 | [
"GULP"
] | 029c10b6c6407b7efdaf9564f62d0c72d83766ac3f42480710e9d63a6d845db6 |
#!/usr/bin/python
import os
from astropy.time import Time
from astropy.io import fits
import psycopg2
import sys
import socket
from optparse import OptionParser
import subprocess
import datetime
import time
import zipfile
import numpy as np
#********************************
#Script that downloads GPU box files, runs ... | miguelfmorales/FHD | data_download.py | Python | bsd-2-clause | 41,227 | [
"Bowtie"
] | f1b91827153b8d4cf23f125603485e294602d35e402ffa9d2912df5686e93c57 |
#!/usr/bin/python2
"""Retrieves National Water Model data from HydroShare."""
from datetime import datetime, timedelta
import json
import os
import re
from urllib import urlopen, urlretrieve
from urllib2 import HTTPError
from dateutil import parser as date_parser
import pytz
from hs_constants import HS_DATA_EXPLORER... | twhiteaker/pynwm | src/pynwm/hydroshare/hs_retrieve.py | Python | mit | 7,746 | [
"NetCDF"
] | 4a78000c6c50e33f6469fc873614f904b99b04301ca35366eed965fc56670975 |
# Functions to implement several important functions for
# various Continous and Discrete Probability Distributions
#
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
import math
import warnings
from copy import copy
from scipy.misc import comb, derivative
from s... | jrversteegh/softsailor | deps/scipy-0.10.0b2/scipy/stats/distributions.py | Python | gpl-3.0 | 213,919 | [
"Gaussian"
] | 7aeea16c3127957b7f143a219da33532a31e5bc7fb27ff0e0cab524618999f33 |
"""Functions to categorize reads for further analysis."""
import sqlite3 as sq
from itertools import izip
import array
import re
import h5py
import numpy as np
from pysam import AlignedSegment as pas
from mitty.lib.reads import old_style_cigar
import logging
logger = logging.getLogger(__name__)
def analyze_read(re... | latticelabs/Mitty | mitty/benchmarking/creed.py | Python | gpl-2.0 | 9,667 | [
"pysam"
] | 01292df5ac867c7b683e557984ad4ed876f4f7d3d52c14ae11dd93b071c8394c |
# -*- coding: utf-8 -*-
import ast
import base64
import csv
import glob
import itertools
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import time
import urllib
import urllib2
import urlparse
import xmlrpclib
import zlib
from xml.etree import ElementTree
from cStri... | ax003d/openerp | openerp/addons/web/controllers/main.py | Python | agpl-3.0 | 68,391 | [
"VisIt"
] | 40b633b5e8ca05d658f080d5684e2136b7fe9b1105e22f95e9fbf69c76df82b8 |
#
# Copyright (C) 2011 by Brian Weck
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
#
import logging
from datetime import date
import utils
def __configure_logging():
# configure the base logger for the pkg
l = logging.getLogger("cssbot")
l.setLevel(logging.DEBUG)
#... | bweck/cssbot | cssbot/log.py | Python | mit | 1,005 | [
"Brian"
] | c583fb4ade4378b0e0de3e9ec4794af0603b746140cf0886b2692dc9873efae8 |
# $Id$
#
# Copyright (c) 2003-2006 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" utility functionality for fingerpri... | adalke/rdkit | rdkit/Chem/Fingerprints/FingerprintMols.py | Python | bsd-3-clause | 17,737 | [
"RDKit"
] | 4c37e4f0f19f18ef0f4d9d5abda36ab6e047b266349f01969994dd0b4af6cd55 |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This progr... | JetChars/vim | vim/bundle/python-mode/pymode/libs/pylint/checkers/format.py | Python | apache-2.0 | 39,691 | [
"VisIt"
] | 5dfad35d039b461b22dc1fd2988cb35cc482e9066b79043d1e24e83c784f217f |
# Rewritten by RayzoR
import sys
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "140_ShadowFoxPart2"
# NPCs
KLUCK = 30895
XENOVIA = 30912
# ITEMs
CRYSTAL = 10347
OXYDE ... | zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/140_ShadowFoxPart2/__init__.py | Python | gpl-3.0 | 4,120 | [
"CRYSTAL"
] | c63295399fe89f83da071029ce1e96e61e05f18b8b20249ac8b07709fa1108cc |
import simtk.unit as unit
from wepy.util.util import box_vectors_to_lengths_angles
from wepy.util.mdtraj import json_to_mdtraj_topology, mdtraj_to_json_topology
import mdtraj as mdj
import numpy as np
def binding_site_idxs(json_topology,
ligand_idxs, receptor_idxs,
coords... | ADicksonLab/wepy | src/wepy_tools/systems/receptor.py | Python | mit | 2,031 | [
"MDTraj"
] | 739a91c2b6d9b639cda64d606823b35b956fbd5f8756cd3c2f2299ad2ab00564 |
import copy
import warnings
import graphviz
import matplotlib.pyplot as plt
import numpy as np
def plot_stats(statistics, ylog=False, view=False, filename="avg_fitness.svg"):
""" Plots the population's average and best fitness. """
if plt is None:
warnings.warn(
"This display is not avail... | robbiejdunn/FightingICE-neuroevolution | fiagent/visualize.py | Python | gpl-3.0 | 5,996 | [
"NEURON"
] | 9468fa280ef5c454c49e6658e4b677e4eaaf5ed53f1bcf1525ab248adfab8aeb |
import unittest
import numpy as np
import pysal
import pysal.spreg.diagnostics as D
from pysal.spreg.twosls_sp import BaseGM_Lag, GM_Lag
class TestBaseGMLag(unittest.TestCase):
def setUp(self):
self.w = pysal.rook_from_shapefile(pysal.examples.get_path("columbus.shp"))
self.w.transform = 'r'
... | darribas/pysal | pysal/spreg/tests/test_twosls_sp.py | Python | bsd-3-clause | 21,986 | [
"COLUMBUS"
] | b2c161ec64b20501c4d4626365be1077395cf08ff86431b7248730de2b722415 |
# -*- coding: utf-8 -*-
from yade import ymport, plot, qt
import numpy
#import yade.log
#yade.log.setLevel('WireMat',yade.log.TRACE)
#yade.log.setLevel('Law2_ScGeom_WirePhys_WirePM',yade.log.TRACE)
#yade.log.setLevel('Ip2_WireMat_WireMat_WirePhys',yade.log.TRACE)
#### definition for net generation
def diamondNet( r... | anna-effeindzourou/trunk | examples/anna_scripts/tensile_test/netonly_longitudinal.py | Python | gpl-2.0 | 7,179 | [
"ParaView"
] | 3961be5a9caa28a700cefcdb5f55a8d92f93c2be0b0ed8fcf3f616dddc92b9c3 |
from functions.builtin import BuiltinFunctionTestCase
class BuiltinFunctionTests(BuiltinFunctionTestCase):
'''
this test is designed to compare stats between old planner vs ORCA
@tags ORCA
'''
sql_dir = 'sql/'
ans_dir = 'expected/'
out_dir = 'output/'
| cjcjameson/gpdb | src/test/tinc/tincrepo/functions/builtin/test_builtin_functions.py | Python | apache-2.0 | 281 | [
"ORCA"
] | 192a4e1155e01ab456a528c0d4858d19a8d6383e466d369b352242cfccf79c4f |
from geometricmd.curve_shorten import compute_trajectory
from geometricmd.geometry import Curve
from ase.io import read
from ase.calculators.emt import EMT
start_point = read('x0.xyz')
start_point.set_calculator(EMT())
end_point = read('xN.xyz')
traj = Curve(start_point, end_point, 12, 1E+03)
compute_trajectory(tra... | suttond/GeometricMD | example/butane_single_process.py | Python | lgpl-3.0 | 368 | [
"ASE"
] | fcddc4eeb7f9c078391898a929ca6ee5007e076dbcf582a6c5a05102d4afae53 |
#!/usr/bin/env python3
#################################################################################
# #
# Copyright (c) 2016 Allen Majewski (altoidnerd) #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Softw... | Altoidnerd/paradichlorobenzene5 | 17.volume_dependence/creation_of_volume_aletered_pwis/experimental/matrix.old.py | Python | gpl-3.0 | 13,055 | [
"CRYSTAL"
] | c296db9bc71f1f186bccb6e82482c0d4e765173945f3871c0404313559f75a7f |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009-2013 Zuza Software Foundation
# Copyright 2013-2014 Evernote Corporation
#
# This file is part of Pootle.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... | evernote/pootle | pootle/apps/pootle_language/models.py | Python | gpl-2.0 | 5,878 | [
"VisIt"
] | 96a266e7004e2f9481f9e75b18f7ebc7605ea22bb6f85c9e84758696a5bc93e1 |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | wizmer/NeuroM | neurom/viewer.py | Python | bsd-3-clause | 4,963 | [
"NEURON"
] | 9c39fec2419d7fdca996dcdd9443af1b6f7ce52148c9f0a06c49eaf281c38648 |
""" JobCommand
The JobCommand class is a command class to know about present jobs efficiency
"""
__RCSID__ = '$Id$'
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.DISET.RPCClient import RPCClient
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getSites
from DIRAC.ResourceStatusSystem.Command.Comma... | petricm/DIRAC | ResourceStatusSystem/Command/JobCommand.py | Python | gpl-3.0 | 9,234 | [
"DIRAC"
] | 664a4aff40339bac5aeb1046ae6855319e319afa9bf41bc2478861c4f126620b |
import numpy as N
import pylab as P
from scikits.learn.machine.em import GM
#------------------------------
# Hyper parameters:
# - K: number of clusters
# - d: dimension
k = 3
d = 2
#-------------------------------------------------------
# Values for weights, mean and (diagonal) variances
# - the we... | jhmadhav/pynopticon | src/em/examples/basic_example1.py | Python | gpl-3.0 | 1,717 | [
"Gaussian"
] | 8739db2138afbb8383618fea495f7167a70f873124f182eb4549258e195fc543 |
# $Id: docutils_xml.py 7966 2016-08-18 13:06:09Z milde $
# Author: David Goodger, Paul Tremblay, Guenter Milde
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.
"""
Simple document tree Writer, writes Docutils XML according to
http://docutils.sourceforg... | burzillibus/RobHome | venv/lib/python2.7/site-packages/docutils/writers/docutils_xml.py | Python | mit | 7,687 | [
"VisIt"
] | bed42124e59e8e593e45c53bf312c6c42f92e84f2408b405881465879e37fd0a |
"""Wang's termwise semantic similarity for GO terms"""
# http://127.0.0.1:31762/library/GOSemSim/doc/GOSemSim.html
# https://cran.r-project.org/doc/manuals/r-release/R-intro.html#An-introductory-session
# TOP 20179076 R. HA..c 98 4 2010 332 1 13 au[06](Guangchuang Yu)
# GOSemSim: an R package for measuring sem... | tanghaibao/goatools | goatools/semsim/termwise/wang.py | Python | bsd-2-clause | 6,310 | [
"Bioconductor"
] | 3a6ab9afb9d34b9eeb6c83fe053bec45f2a115102b3551667396109b4a0bb85f |
#!/usr/bin/env python
import sys
import math
# The PYTHONPATH should contain the location of moose.py and _moose.so
# files. Putting ".." with the assumption that moose.py and _moose.so
# has been generated in ${MOOSE_SOURCE_DIRECTORY}/pymoose/ (as default
# pymoose build does) and this file is located in
# ${MOOSE_S... | BhallaLab/moose-thalamocortical | DEMOS/pymoose/squid/squid.py | Python | lgpl-2.1 | 7,101 | [
"MOOSE"
] | f4159bf9d0880667d19b3ac0d9674adef4c19cc458e100772c68cadf92c403d7 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2002 Bruce J. DeGrasse
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2009 Brian G. Matherly
# Copyright (C) 2008 James Friedmann <jfriedmannj@gmail.com>
# Copyright (C) 2009 Benny Malengier <benny.malengier@gramps-pr... | Forage/Gramps | gramps/plugins/textreport/detancestralreport.py | Python | gpl-2.0 | 38,387 | [
"Brian"
] | 90eb9958114d79e799731c457b574a82f82d081cd45896b640e5373bc7ffc8b2 |
import libtcodpy as libtcod
class Random(object):
def __init__(self, stream_id):
self.stream_id = stream_id
def get_int(self, *args, **kwargs):
""" rand.get_int([start,] stop) -> random integer
Note the non-standard order of default arguments: if a single argument
is provided,... | narc0tiq/NP-Complete | tcod/__init__.py | Python | mit | 23,740 | [
"Amber"
] | da4a1c28fe0fb8107c090ba083dbf7ec3740340b39058b6c51a288b8139aa3df |
import cplexus as plexus
import time
from itertools import repeat
SIZE = 14
INPUT_SIZE = 4
OUTPUT_SIZE = 1
CONNECTIVITY = 1
PRECISION = 2
TRAINING_DURATION = 0.1
DOMINANCE_THRESHOLD = 0.7
RANDOMLY_FIRE = False
DYNAMIC_OUTPUT = True
VISUALIZATION = True
TRAINING_SAMPLE_SIZE = 20
TESTING_SAMPLE_SIZE = 20
def shift... | mertyildiran/Plexus | examples/sequence_basic.py | Python | mit | 2,718 | [
"NEURON"
] | 002a93b38808bab7d4ae799ef6032582c9e30045e7a68c6636b75ba1c920fb9c |
"""
Create a virtual environment like this
$ conda create -n mu18SV4 python=2.7 qiime matplotlib mock nose -c bioconda
It is also necessary to install fastq-join. On systems with apt this will work:
$ apt install ea-utils
Building fastq-join from source takes less space.
This script requires vsearch, which c... | hurwitzlab/muscope-18SV4 | qc18SV4/pipeline.py | Python | mit | 16,495 | [
"Bioconda"
] | 6a7f35101b72d64406b0533345d246f5cddb1152dcc60be735e7f32edc9db545 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | amjames/psi4 | psi4/driver/qcdb/molparse/from_string.py | Python | lgpl-3.0 | 28,654 | [
"Psi4"
] | b2281a44403fe24aad91cbcf0dc32f0ad84f63a3ca9f56c70ee5b411c12371fe |
# -*- coding: utf-8 -*-
__author__ = 'klb3713'
# Not actually used directly, just for convenience
DATA_DIR = "/home/klb3713/workspace/cw_word_embedding/data/"
## 32-bit for the GPU
##import theano.config as config
##floatX = config.floatX
#floatX = 'float32'
TRAIN_FILE = DATA_DIR + "corpus"
# SAMPLE_FILE = DATA_D... | klb3713/cw_word_embedding | config.py | Python | gpl-3.0 | 2,501 | [
"NEURON"
] | 3a3c660e30d6a25dcbab80e033fda7ffe0cd634338a83df818a22dd258d24c0b |
## \file
## \ingroup tutorial_roofit
## \notebook
## Multidimensional models: utility functions classes available for use in tailoring of
## composite (multidimensional) pdfs
##
## \macro_code
##
## \date February 2018
## \authors Clemens Lange, Wouter Verkerke (C++ version)
import ROOT
# Create observables, paramete... | root-mirror/root | tutorials/roofit/rf302_utilfuncs.py | Python | lgpl-2.1 | 3,343 | [
"Gaussian"
] | 78d6809ff6f6732e4cbb580e31c1501d7979d9f8523ec4af6199edb5eb1c7c72 |
# coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid and World Bank
- **Ftp Client for Retrieving ftp data.**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | drayanaindra/inasafe | realtime/download_netcdf.py | Python | gpl-3.0 | 4,116 | [
"NetCDF"
] | 6ee3d4756d6dffc73c4e541b5f08d048cabc8016cf6e5de7ab65c3b70a6a0d46 |
"""
Acceptance tests for Home Page (My Courses / My Libraries).
"""
from flaky import flaky
from opaque_keys.edx.locator import LibraryLocator
from uuid import uuid4
from common.test.acceptance.fixtures.catalog import CatalogFixture, CatalogConfigMixin
from common.test.acceptance.fixtures.programs import ProgramsFixtu... | synergeticsedx/deployment-wipro | common/test/acceptance/tests/studio/test_studio_home.py | Python | agpl-3.0 | 7,764 | [
"VisIt"
] | e30ecd0d85ca9ac9081d689827f1f1e3c1e7f40fdd560277c73e464f4168bd9c |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | xguse/scikit-bio | skbio/sequence/tests/test_nucleotide_sequences.py | Python | bsd-3-clause | 19,377 | [
"scikit-bio"
] | f13dd0cf666cefd461bb0b3d0cbed3187841744b28d3e150f40ec50d6d73b546 |
# -*- coding: utf-8 -*-
""" Tests for student account views. """
import logging
import re
from unittest import skipUnless
from urllib import urlencode
import mock
import ddt
from django.conf import settings
from django.core import mail
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.url... | synergeticsedx/deployment-wipro | lms/djangoapps/student_account/test/test_views.py | Python | agpl-3.0 | 28,910 | [
"VisIt"
] | 36fd3307bbba473fce5c03567ad47d60a9950f3c2f3ad70d02138f0e07454e83 |
"""
Service functions for dealing with Bricklink. Much uglyness due to Bricklink
not exposing things sensibly.
"""
import email
import html
import imaplib
import os
import re
from datetime import date
from django.conf import settings
from django.db import transaction
from django.db.models import F, Q
from django.templ... | jensadne/brixdb | brixdb/service/bricklink.py | Python | mit | 33,156 | [
"VisIt"
] | 678066b5160d7e03859464a320304907888d6461450aef5f31a7a5d9a5d670ea |
#!/usr/bin/env python
# encoding: utf-8
'''
Created by Brian Cherinka on 2016-04-08 14:31:34
Licensed under a 3-clause BSD license.
Revision History:
Initial Version: 2016-04-08 14:31:34 by Brian Cherinka
Last Modified On: 2016-04-08 14:31:34 by Brian
'''
from __future__ import division, print_function
impo... | sdss/marvin | python/marvin/web/controllers/galaxy.py | Python | bsd-3-clause | 36,602 | [
"Brian",
"Galaxy"
] | 28651e2c19698f5fc834384db516497b24afd205e43f3133442e586416aa4593 |
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | hedaoyuan/Paddle | python/paddle/v2/parameters.py | Python | apache-2.0 | 13,966 | [
"VisIt"
] | 01da3af74a91f4b2beedb14e0e2facd847e8286a4d330c393bf28343c40ef57e |
"""
Utility functions for transcripts.
++++++++++++++++++++++++++++++++++
"""
import os
import copy
import json
import requests
import logging
from pysrt import SubRipTime, SubRipItem, SubRipFile
from lxml import etree
from HTMLParser import HTMLParser
from xmodule.exceptions import NotFoundError
from xmodule.contents... | fintech-circle/edx-platform | common/lib/xmodule/xmodule/video_module/transcripts_utils.py | Python | agpl-3.0 | 24,876 | [
"FEFF"
] | a13a3b605c53a50c11bc3e135e05ffdb350efe8a0f82bd6b5362fc23a941e042 |
"""ceda_cc
##########
Entry point for API.
USAGE
#####
c4_run.main( <argument list> )
"""
import sys
from ccinit import c4_init
testmain=False
## callout to summary.py: if this option is selected, imports of libraries are not needed.
if not testmain:
if __name__ == '__main__':
if len(sys.argv) > 1:
if sys.a... | martinjuckes/ceda_cc | ceda_cc/c4_run.py | Python | bsd-3-clause | 15,136 | [
"NetCDF"
] | 8262a0dc48e7e4ec772362ac598bc8f7a82e19f2ec2f9b7cd49ec8b1617ebb9e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
"""
This module provides classes to comparsion the structures of the two
molecule. As long as the two molecule have the same bond connection tables,
the molecules are de... | matk86/pymatgen | pymatgen/analysis/molecule_structure_comparator.py | Python | mit | 7,931 | [
"Dalton",
"pymatgen"
] | 7f5c305ba6592203b8908173469d0809f68cc04683c14dece78357d65dc5d167 |
""" This is a test of the PublisherHandler
It supposes that the RSS DBs are present, and that the service is running
"""
# pylint: disable=invalid-name,wrong-import-position
import unittest
import sys
from DIRAC.Core.Base.Script import parseCommandLine
parseCommandLine()
from DIRAC.Core.DISET.RPCClient import ... | petricm/DIRAC | tests/Integration/ResourceStatusSystem/Test_Publisher.py | Python | gpl-3.0 | 1,519 | [
"DIRAC"
] | 9428e84c087bd180537023a073b64947d44e33c9547f25d89f79c421d63cc6a8 |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | eleftherioszisis/NeuroM | neurom/fst/__init__.py | Python | bsd-3-clause | 7,257 | [
"NEURON"
] | 0cd820d5ddc37f4ff8a64830651f377df4d9c4f77cd6eca0d7d22a8b3589eb70 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_pdbqt.py | Python | gpl-2.0 | 5,269 | [
"MDAnalysis"
] | 555e8ce24902286a6b8a20ed18edd102fe256614e2b1aaf65a5cedaf12ec92ec |
from forcefield import ForceField
import logging
import numpy as np
from copy import deepcopy
from numpy.linalg import norm
from scipy.special import sph_harm as Y
mult_logger = logging.getLogger('fftoolbox.multipole')
def Rlm(l, m, r, theta, phi):
return r**l * np.sqrt(4 * np.pi / (2 * l + 1)) * Y(m, l, theta, ... | maxivanoff/fftoolbox-app | q/multipole.py | Python | gpl-2.0 | 12,729 | [
"PyMOL"
] | effed40cf1d62c2619d0cc3f0cef926d8ba0aae3e315cc41ce9e131f388af87b |
"""
K-means clustering and vector quantization (:mod:`scipy.cluster.vq`)
====================================================================
Provides routines for k-means clustering, generating code books
from k-means models and quantizing vectors by comparing them with
centroids in a code book.
.. autosummary::
... | WarrenWeckesser/scipy | scipy/cluster/vq.py | Python | bsd-3-clause | 29,250 | [
"Gaussian"
] | e7e02df9acf88f11003498da8f285527f840efc18247fab7ae30b1ff8b7e37f5 |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015-2017 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | mas-dse-greina/neon | luna16/old_code/LUNA16_VGG_no_batch_Sigmoid_pretrained.py | Python | apache-2.0 | 9,262 | [
"Gaussian"
] | e449d80c0ed00d90c52b764cecf5d9c22fd02003ab60e7db57787e8672cfe034 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/prop/magnetizability/__init__.py | Python | apache-2.0 | 1,081 | [
"PySCF"
] | 650a8278a63a26d6479fd63da8a72ae04385403b4cbb66c1e433e65a67f6734c |
#
# GMSK modulation and demodulation.
#
#
# Copyright 2005-2007,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either v... | jmcorgan/gnuradio | gr-digital/python/digital/gmsk.py | Python | gpl-3.0 | 10,690 | [
"Gaussian"
] | 02e57607a94be0762e28ebbdf0d76bf4c5b0a87c916cf16ee8baa82c7eaaf7d6 |
# -*- coding: utf-8 -*-
import praw, re, requests, pymongo, sys
from config import USERNAME, PASSWORD, SUBREDDIT, MONGO_URL, MONGO_PORT, MONGO_DB
from util import check_processed_posts, read_queue_file, update_queue_file, reset_db, update_db, log_msg, log_success, log_warning, log_error
from collections import de... | mrmin123/tamabot | tamabot.py | Python | mit | 22,009 | [
"VisIt"
] | 61f9eedcea99d101009ae28e0dd7d305123602c3170cf09195a54a412cabc21c |
# -*- coding: utf-8 -*-
"""Command line interface for PyBEL.
Why does this file exist, and why not put this in ``__main__``? You might be tempted to import things from ``__main__``
later, but that will cause problems--the code will get executed twice:
- When you run ``python3 -m pybel`` python will execute``__main__... | pybel/pybel | src/pybel/cli.py | Python | mit | 17,595 | [
"Cytoscape",
"Pybel"
] | 239855131030b4817e39b1a69f6db81a972c4ef718cd8704c56ba9393469714d |
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
import os
im... | nuclear-wizard/moose | python/MooseDocs/__init__.py | Python | lgpl-2.1 | 1,270 | [
"MOOSE"
] | 98da50d8266d753c7cee93142fcdbfc18a60f2f9213c8ef71e2a7faab8692a92 |
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2020 Samuele Carcagno <sam.carcagno@gmail.com>
# This file is part of pychoacoustics
# pychoacoustics is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation,... | sam81/pychoacoustics | pychoacoustics/win_psychometric_listener_plot.py | Python | gpl-3.0 | 9,583 | [
"Gaussian"
] | d47670f0139ca87caf3755989a80d6b0b52dcfce206430be72c4de12df8c9678 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/web/getpid.py | Python | gpl-2.0 | 4,934 | [
"VisIt"
] | 05ebdca7c47ac4efe7e7e9ef40f36667cc4b19ee6062b74194b854771704602d |
#******************
# MODULE DOCSTRING
#******************
"""
LOMAP: Maximum Common Subgraph and scoring calculations
=====
Alchemical free energy calculations hold increasing promise as an aid to drug
discovery efforts. However, applications of these techniques in discovery
projects have been relatively few, par... | MobleyLab/Lomap | lomap/mcs.py | Python | mit | 26,832 | [
"RDKit"
] | d1bd9dad9fb71d4be9982bae9bc2a775798fad7661cebf132e6eaa02bb0f04bc |
""" Callbacks that handle virtual node functionality.
"""
from typing import Any, Optional, Tuple
import dash
from dash.dependencies import Input, Output, State
from .. import constants, converters, id_constants, state, utils
from ..dash_app import app
@app.callback(
Output(id_constants.SIGNAL_VIRTUAL_NODE_ADD... | googleinterns/userjourneytool | ujt/callbacks/virtual_node_callbacks.py | Python | apache-2.0 | 9,431 | [
"Cytoscape"
] | 5d22cb56ee551cd9edd575414202b4040d8e1058ba68bbd2978e301855c19f6a |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2017 Alois Poettker <alois.poettker@gmx.de>
#
# This program is free software; you can redistribute it and/or modi... | SNoiraud/gramps | gramps/plugins/tool/reorderids.py | Python | gpl-2.0 | 29,058 | [
"Brian"
] | 236f60eedf17ed45265d3ffe8de8ecf0ffd11c0b78876398d8d928781f9c46be |
import glob
import pandas as pd
import numpy as np
pd.set_option('display.max_columns', 50) # print all rows
import os
os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files")
normalB = glob.glob("binary_position_RRBS_normal_B_cell*")
mcell = glob.glob("binary_position_RRBS_NormalBCD19pCD27... | evanbiederstedt/RRBSfun | trees/chrom_scripts/normal_chr21.py | Python | mit | 25,844 | [
"MCell"
] | e849cfaecf8bed45f52488d1a1afbb8f129a19e11f07ceb4e17bb4ec37d06f91 |
import xml.dom.minidom
import numpy
import string
def CreateLib():
"""@todo: document me"""
import sys
import time
domimpl = xml.dom.minidom.getDOMImplementation()
doc = domimpl.createDocument(None, "source_library", None)
lib = doc.documentElement
lib.setAttribute("title", "source library"... | qpiel/python_estimation_source | ctoolsAnalysis/xml_generator.py | Python | gpl-3.0 | 13,267 | [
"Gaussian"
] | 8ee91562b609422505253b03471774a55256b47810c5f521ced4d16a36f0b107 |
# Hidden Markov Model Implementation
import pylab as pyl
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy as scp
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import rospy
#import hrl_lib.mayavi2_util as mu
import hrl_lib.viz ... | tapomayukh/projects_in_python | classification/Classification_with_HMM/Single_Contact_Classification/Variable_Stiffness_Variable_Velocity/HMM/with padding 3s/hmm_crossvalidation_force_motion_10_states_scaled_wrt_all_data.py | Python | mit | 40,904 | [
"Mayavi"
] | 86ce44103dc5bf1ff8ca37b493bad9b8078a85975004f101eb174d26255a3a52 |
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | deepmind/deepmind-research | density_functional_approximation_dm21/density_functional_approximation_dm21/compute_hfx_density.py | Python | apache-2.0 | 12,592 | [
"Gaussian",
"PySCF"
] | f3f3215de1d3e33a3f7bba7ba8c31346b4d76ac1068a704a8d66eee3fe4ff6e7 |
'''
Set up Visual Sudio to build a specified MPIR configuration
Copyright (C) 2011, 2012, 2013, 2014, 2015 Brian Gladman
'''
from operator import itemgetter
from os import listdir, walk, unlink, makedirs
from os.path import split, splitext, isdir, relpath, join, exists
from os.path import dirname, normpath
from copy ... | BrianGladman/pthreads | build.vs/build_tests/build_tests.py | Python | apache-2.0 | 4,124 | [
"Brian"
] | 0b933d854df3a586a8514e96f5abc5551a6d1761d131b749a9ebee9dff93e0ad |
# Function to allow land to be generated for a range of scenarios
# Land Options:
# 'square' (default) Square block of land with boundaries specified by boundaries keyword, a list of 4 floats in the form [S,N,W,E]
# 'continents_old' Choose continents from the original continent set-up adapted from the Sauliere 2012 pa... | sit23/Isca | src/extra/python/isca/land_generator_fn.py | Python | gpl-3.0 | 11,099 | [
"Gaussian"
] | 68174f697f8915030e839a0eb96831e5d8a83761a8799bf3c24157bdef82978c |
#!/usr/bin/env python
"""models.py: Implementation of RNNSearch in Chainer"""
__author__ = "Fabien Cromieres"
__license__ = "undecided"
__version__ = "1.0"
__email__ = "fabien.cromieres@gmail.com"
__status__ = "Development"
from _collections import defaultdict
import numpy as np
import chainer
from chainer import cuda... | prajdabre/knmt | nmt_chainer/models.py | Python | gpl-3.0 | 56,739 | [
"Gaussian"
] | 95aa654293878d6dcf71edeafa2d6456a0a1a686e0bea54168d9eaff92941dec |
#!/usr/bin/env python
#Guruprasad Ananda
"""
Uses SPUTNIK to fetch microsatellites and extracts orthologous repeats from the sputnik output.
"""
from galaxy import eggs
import sys, os, tempfile, string, math, re
def reverse_complement(text):
DNA_COMP = string.maketrans( "ACGTacgt", "TGCAtgca" )
comp = [ch for... | volpino/Yeps-EURAC | tools/regVariation/microsats_alignment_level.py | Python | mit | 18,778 | [
"Galaxy"
] | 4f788c1d86395601dc573fd0834bad0c7f8b362e3668a0aa9225cd51e314c4dc |
# Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | idaholab/raven | framework/utils/mathUtils.py | Python | apache-2.0 | 45,963 | [
"Gaussian"
] | 8f7ab09fe701340b2866c659acea7e919c1fcb961e1f49ea6c77ee4826ef095f |
from lettuce import step, world
from questionnaire.features.pages.questions import QuestionListingPage, CreateQuestionPage
from questionnaire.models import Question
@step(u'And I have 100 questions')
def and_i_have_100_questions(step):
for i in range(0, 100):
Question.objects.create(text="When will you be... | testvidya11/ejrf | questionnaire/features/questions_steps.py | Python | bsd-3-clause | 4,110 | [
"VisIt"
] | f7dc9bffdd44d23841eec1c29be0a4d28b24d1014b5c7dfd767c46fdc7c349bb |
# Rdesigneur example 4.1
# Making an axon with a propagating action potential.
# Turned into a doctest
import matplotlib
matplotlib.use('Agg')
import numpy as np
import moose
import rdesigneur as rd
numAxonSegments = 200
comptLen = 10e-6
comptDia = 1e-6
RM = 1.0
RA = 10.0
CM = 0.01
expected = np.array([-0.065 , ... | BhallaLab/moose-core | tests/rdesigneur/test_32_squid_axon_propgn.py | Python | gpl-3.0 | 2,456 | [
"MOOSE",
"NEURON"
] | d561294162ad2cd5b1ffa9cbf2a2c188bca0a82c17c947119da3d3e5866936bb |
""" Utilities to process parametric job definitions and generate
bunches of parametric jobs. It exposes the following functions:
getNumberOfParameters() - to get the total size of the bunch of parametric jobs
generateParametricJobs() - to get a list of expanded descriptions of all the jobs
"""
__RCSID__ =... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/Utilities/ParametricJob.py | Python | gpl-3.0 | 6,480 | [
"DIRAC"
] | ee924e9b1dd4ff8fee13552e859ce21e62e26638c8444025e4340b294459275b |
from datetime import datetime
import numpy as np
import warnings
__author__ = 'Trond Kristiansen'
__email__ = 'me@trondkristiansen.com'
__created__ = datetime(2008, 8, 15)
__modified__ = datetime(2015, 7, 25)
__version__ = "1.5"
__status__ = "Development"
'''
Various vertical coordinates
Presently, only oc... | trondkr/model2roms | IOverticalGrid.py | Python | mit | 12,777 | [
"NetCDF"
] | 0b928a971c33255ed55adc80cbbdde84590cc756a9ef070c9c4bdbc9d701b8bc |
# Copyright (c) 2014 Evalf
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, s... | joostvanzwieten/nutils | nutils/element.py | Python | mit | 43,535 | [
"VTK"
] | a6baef9dac71f08dd367d80b000f5f457719a91c41cb4dbd29e894cf35446065 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# PMDA
# Copyright (c) 2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under the GNU Public Licence, v2 or any higher ve... | MDAnalysis/pmda | pmda/util.py | Python | gpl-2.0 | 11,129 | [
"MDAnalysis"
] | 0a90bd77a0e428f876ccc676605356d5239670fe6a76efd04c66d0990786325a |
import csv
import numpy as np
import numpy.random as npr
from util import slicedict
from rdkit_utils import smile_to_fp
def randomize_order(data):
data = {k : np.array(v) for k, v in data.iteritems()} # To array for fancy indexing
N = len(data.values()[0])
rand_ix = np.arange(N)
npr.RandomState(0).shu... | HIPS/neural-fingerprint | neuralfingerprint/data_util.py | Python | mit | 2,375 | [
"RDKit"
] | 48c6114de3e9a0ae789bb0093b964fd16305e449b866ba9ef2fd6ad1228cf361 |
##############################################################################
#
# Copyright (c) 2009-2013 by University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Open Software License version 3.0
# http://www.opensource.org/licenses/osl-3.0.php
#
#... | victortey/VEGL-Portal | src/main/resources/org/auscope/portal/server/scriptbuilder/templates/escript-magnetic.py | Python | gpl-3.0 | 3,361 | [
"NetCDF",
"VisIt"
] | 444d159d5754fc096723766aa0e233aebaec7cad178fa6e29c295c92f8e5f043 |
#!/usr/bin/env python -i
# preceding line should have path for Python on your machine
# vizplotgui_atomeye.py
# Purpose: viz running LAMMPS simulation via AtomEye with plot and GUI
# Syntax: vizplotgui_atomeye.py in.lammps Nfreq compute-ID
# in.lammps = LAMMPS input script
# Nfreq = plot data point ... | Pakketeretet2/lammps | python/examples/vizplotgui_atomeye.py | Python | gpl-2.0 | 4,548 | [
"LAMMPS"
] | 21fda7a22678d84e825ecf95dbbc2d701d1165ddb6429a11799cccdc38d06116 |
#! /usr/bin/env python
from __future__ import print_function
from Bio.Blast import NCBIXML
import sys
from xml.parsers.expat import ParserCreate, ExpatError, errors
def parse_result(blast_xml_file):
with open(blast_xml_file) as bf:
try:
blast_records = NCBIXML.parse(bf)
for bl... | teasdalm/scripts | parse_blast.py | Python | bsd-3-clause | 1,002 | [
"BLAST"
] | c0117ed1e29da5463614db8c1ca307f206836781b3d9b809b80fdd9a229abdd1 |
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | amb/blender-texture-tools | __init__.py | Python | gpl-2.0 | 52,255 | [
"Gaussian"
] | 3ccefec0c6082a7a321837d912151f81b245149953a744c55945bd5380a5421d |
# -*- coding: utf-8 -*-
"""
End-to-end tests for LibraryContent block in LMS
"""
import ddt
import textwrap
from nose.plugins.attrib import attr
from ..helpers import UniqueCourseTest
from ...pages.studio.auto_auth import AutoAuthPage
from ...pages.studio.overview import CourseOutlinePage
from ...pages.studio.library ... | sameetb-cuelogic/edx-platform-test | common/test/acceptance/tests/lms/test_library.py | Python | agpl-3.0 | 13,185 | [
"VisIt"
] | 645df09355fe4c5854973d79850a5f51e7cc380e2110a89f81b628c21caa3a1b |
"""
This is a DIRAC WMS administrator interface.
It exposes the following methods:
Site mask related methods:
setMask(<site mask>)
getMask()
Access to the pilot data:
getWMSStats()
"""
from tempfile import mkdtemp
import shutil
from DIRAC.Core.DISET.RequestHandler import RequestHandler
from DIRAC impor... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/Service/WMSAdministratorHandler.py | Python | gpl-3.0 | 26,612 | [
"DIRAC"
] | 7cd3ba96ae5be920a3ad31d35828ce9a2c7e7241f4fc3bb6e3c1bff69c92b9eb |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | mhlechner/psi4 | psi4/driver/p4util/python_helpers.py | Python | gpl-2.0 | 5,280 | [
"Psi4"
] | 23c563e7c9dd4f0573e444fbffd5edc56ed99fe8cde15a6f8355dcb6ea0caa3f |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | KaiSzuttor/espresso | testsuite/python/analyze_gyration_tensor.py | Python | gpl-3.0 | 3,567 | [
"ESPResSo"
] | 3380552af9d1be0d7b2c0f7f5928bc8d5e83e208830e37182e05bec5d6507e50 |
# -----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------... | bokeh/bokeh | sphinx/docserver.py | Python | bsd-3-clause | 2,966 | [
"VisIt"
] | cd8c4e1a3951f21632d0cf4aedc51177cf8daec2ffaaed285bdec3cb3addabe8 |
from dateutil.parser import *
from django.utils.timezone import get_current_timezone
from jsonschema.exceptions import best_match
from bestiary.models import Monster, Building, GameItem
from herders.models import MonsterInstance, RuneInstance, RuneCraftInstance, MonsterPiece, BuildingInstance, ArtifactInstance, Artifa... | PeteAndersen/swarfarm | herders/profile_parser.py | Python | apache-2.0 | 19,880 | [
"VisIt"
] | 8f7f62e99b7326197bcf1572d79f7c056f32b146c03a1cf198502c0d1ec9dd31 |
#!/usr/bin/env python
"""
Reorder the atoms in the Angles section of a data file to make sure that
atoms have a "canonical order" (for example the first atom has a lower
id than the last atom, for angle and dihedral interactions.
(This helps us detect potential problems like dupicate Angle interactions.)
... | SGenheden/lammps | tools/moltemplate/src/nbody_reorder_atoms.py | Python | gpl-2.0 | 2,680 | [
"LAMMPS"
] | 10ef7bc1fa6f5477e862091fe7e6e0ed7132a20798916d4158bc0a44a1851ec2 |
import os
import logging
import devsiteHelper
import devsiteParseMD
import devsiteParseHTML
import devsiteParseYAML
SOURCE_PATH = os.path.join(os.path.dirname(__file__), 'src/content')
def getPage(requestPath, lang):
fileLocations = [
os.path.join(SOURCE_PATH, lang, requestPath, '_index.yaml'),
os.path.join... | ebidel/WebFundamentals | devsiteIndex.py | Python | apache-2.0 | 1,881 | [
"GULP"
] | 47781e3da4a1644a5138b286bd5b9befda0f8b5e80ec397e31a687e6e90d197e |
import os, sys, re, dicom, scipy, cv2
import numpy as np
from skimage import transform, exposure
from sklearn import decomposition
from PIL import Image
from pandas.io.parsers import read_csv
import theano
import theano.tensor as T
import lasagne as nn
import utils as u, config as c
import heart
def sigmoid(x):
... | woshialex/diagnose-heart | CNN_B/dsb_utils.py | Python | mit | 22,475 | [
"Gaussian"
] | c87b9cfdeb6089392a95414bc09bc703ac20a76517ccf4be37e5e45232ae7b3c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.