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
import logging from cStringIO import StringIO from math import exp from lxml import etree from path import path # NOTE (THK): Only used for detecting presence of syllabus import requests from datetime import datetime import dateutil.parser from lazy import lazy from xmodule.modulestore import Location from xmodule.pa...
jswope00/GAI
common/lib/xmodule/xmodule/course_module.py
Python
agpl-3.0
42,527
[ "VisIt" ]
2a1dbaa1deef058d0ec510b8bfeebbce2251e526580d76af2284984ffe08e4d5
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Tim G L Lyons # # 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 Fr...
Forage/Gramps
gramps/gen/plug/__init__.py
Python
gpl-2.0
2,680
[ "Brian" ]
443bc398a8e3c24579caeba8880865ce296c08c0ec2f2fafa3175d240e753820
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2008 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2008 Gary Burton # Copyright (C) 2008 Robert Cheramy <robert@cheramy.net> # Copyright (C) 2010 Jakim Friant # # This program is free software;...
pmghalvorsen/gramps_branch
gramps/plugins/export/exportpkg.py
Python
gpl-2.0
8,952
[ "Brian" ]
c7aea6ed57568b3100afeec5fd2531552f7e5e84df64f823a170ae6408e27035
#!/usr/bin/env python # # $File: sampleThreeGenFamily.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can re...
BoPeng/simuPOP
docs/sampleThreeGenFamily.py
Python
gpl-2.0
1,331
[ "VisIt" ]
5a83159ab29cdbf169b4731838e76f8948eb18f0f5eb25b797dbc2ce26e145b0
import enum from graphql.language import ast from graphql.language.parser import parse from ..query import Node, Field, Link, merge class NodeVisitor: def visit(self, obj): visit_method = getattr(self, 'visit_{}'.format(obj.kind)) if visit_method is None: raise NotImplementedError('...
vmagamedov/hiku
hiku/readers/graphql.py
Python
bsd-3-clause
12,187
[ "VisIt" ]
fb0e0c2a83dfda95b74330596d5cdee6ba39f09db95ecc647fd1c92535704150
# # Copyright (C) 2017, 2021 Smithsonian Astrophysical Observatory # # # 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 vers...
anetasie/sherpa
sherpa/sim/tests/test_sim_unit.py
Python
gpl-3.0
3,249
[ "Gaussian" ]
a2d7f14042c77f311226f88d9d41e159d5745e62babb4aab03ca8515e47d2bc7
""" tebdIsing6.py Use TEBD to compute ground state of transverse field Ising model. 2014-09-29 """ import numpy as np from cmath import * from mpstest17 import * import matplotlib.pyplot as plt import time def main(): test0() def test0(): (J,hx,hz) = (1,0.1,0.05) (timeStep,nsteps,chi) = (0.01,300,10) ...
ehua7365/RibbonOperators
TEBD/tebdIsing6.py
Python
mit
14,136
[ "DIRAC" ]
55af5af547bbb6c84485863687c7484b96cc289ab2989d40bbb7f121e1380423
# -*- coding: utf-8 -*- """ =============================================================================== Network.tools.topology: Assorted topological manipulation methods =============================================================================== """ import scipy as _sp import numpy as _np import scipy.ndimage ...
stadelmanma/OpenPNM
OpenPNM/Network/tools.py
Python
mit
45,375
[ "ParaView", "VisIt" ]
d38412a837ca1500a6a27b3aba58b7f5a535795a0086bd28ad1e3433a88e8d39
import numpy as np from pylab import * from gpaw.response.tool import linear_fit from gpaw.test import equal tag = 'Nabulk' d = np.loadtxt('%s_RPA.dat' %(tag)) x = d[:,0] y = d[:,1] xscale = x**(-1.5) plot(xscale, y, 'o') yfit, para = linear_fit(xscale,y) xx = np.linspace(0, xscale.max(), 1000) yy = para[0] * xx +...
robwarm/gpaw-symm
gpaw/test/big/rpa/plot_rpa.py
Python
gpl-3.0
613
[ "GPAW" ]
89ff48ac959fa0198ce96fe8e2b6828064774abe7c09ba2f030e894778d14605
# Copyright (C) 2014 Sereina Riniker # # 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. # """ Torsion Fingerprints (Deviation) (TFD) According to a paper from Schulz-Gasch et a...
jandom/rdkit
rdkit/Chem/TorsionFingerprints.py
Python
bsd-3-clause
24,314
[ "RDKit" ]
ffabed467362c9b561d395db8cad7807daf503a7c0cdfd3d285af5005152cc1a
"""cursor_handler.py - Cursor handler.""" import gobject import gtk from mcomix import constants class CursorHandler(object): def __init__(self, window): self._window = window self._timer_id = None self._auto_hide = False self._current_cursor = constants.NORMAL_CURSOR def se...
benoit-pierre/mcomix
mcomix/cursor_handler.py
Python
gpl-2.0
2,663
[ "FLEUR" ]
0aca9341fb81ba0d688befc1491a380ce8b3852c8de41e9ca337b3bf5f050749
# Copyright (c) 2009-2021 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. """Implement CustomOperation.""" from abc import abstractmethod import itertools from hoomd.operation import _TriggeredOperation from hoomd.data.parameterdicts...
joaander/hoomd-blue
hoomd/custom/custom_operation.py
Python
bsd-3-clause
6,875
[ "HOOMD-blue" ]
0c54c0ead4698d0a34faa6f4384ba7d0736359ec578b821970a4583b1d33ebe0
__author__ = 'watson-parris' from cis.data_io.products.HadGEM import HadGEM_PP import logging class HadGEM_unknown_vars(HadGEM_PP): def get_variable_names(self, filenames, data_type=None): import iris import cf_units as unit from cis.utils import single_warnings_only # Removes war...
duncanwp/cis_plugins
hadgem_unknown_vars.py
Python
lgpl-3.0
2,736
[ "NetCDF" ]
d5a96b585a64ad98a0fbbe3c26846e37a8ca3193ef149e183481d69aa5e0b243
from datetime import datetime from django.db import IntegrityError from django.http import HttpResponse from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from rango.models import Category, Page, UserProfile, User from rango.forms import CategoryForm, PageForm, Use...
apenchev/tangowithdjango
rango/views.py
Python
mit
12,248
[ "VisIt" ]
abdb0a99feed7f7a16fc8e157c598ac9237e6722633b10490f187c7742692d88
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # Copyright (C) 2010 Nick Hall # # This program is free software; you can redistribute it and/or modify # it under the terms of th...
pmghalvorsen/gramps_branch
gramps/plugins/tool/ownereditor.py
Python
gpl-2.0
7,171
[ "Brian" ]
025991e87d553e4f1f403f056ad66023eb7600d97a046e3f43ff102e708f63c7
# Copyright 2020 The TensorFlow Probability Authors. # # 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 o...
tensorflow/probability
tensorflow_probability/python/distributions/normal_inverse_gaussian.py
Python
apache-2.0
11,258
[ "Gaussian" ]
bb57c8c33b974e5359b8dab3d6e73c66f12a09779239f1016bddc03c0544ba14
""" Test experiments. Logging is disabled, so just check the directory and log files creation. """ import asyncio import numpy as np import os.path as op import tempfile import shutil from concert.quantities import q from concert.coroutines.base import start from concert.coroutines.sinks import Accumulate from concert....
ufo-kit/concert
concert/tests/integration/test_experiments.py
Python
lgpl-3.0
9,086
[ "VisIt" ]
ff4fa6121aeae5254b40c44201c7ec3dfb909e5f7873cf30e4c097dc17079e8e
# -*- coding: utf-8 -*- """Factories for the OSF models, including an abstract ModularOdmFactory. Example usage: :: >>> from tests.factories import UserFactory >>> user1 = UserFactory() >>> user1.username fred0@example.com >>> user2 = UserFactory() fred1@example.com Factory boy docs: http://f...
GaryKriebel/osf.io
tests/factories.py
Python
apache-2.0
13,123
[ "Brian" ]
c3e340049f559592ed3ca767a338d096bf1e4d710d92578da6b90eedce17f44e
#!/usr/bin/env python # -*- coding: utf-8 -*- # Emacs: treat this as -*- python -*- from optparse import OptionParser parser = OptionParser(usage='%prog [options]', version='%prog 0.1') parser.add_option('--dir', dest="dir", default='.', help='Results directo...
robwarm/gpaw-symm
doc/devel/memory_bandwidth/memory_bandwidth.py
Python
gpl-3.0
10,119
[ "ASE", "GPAW" ]
8aec224745f29a648051c27c1a7a601cf9a9f5337fe28aaa9939c35a630df051
""" Acceptance tests for Studio's Course Name(Course display name) Length """ from .base_studio_test import StudioCourseTest from ...pages.studio.ga_course_rerun import CourseRerunPage from ...pages.studio.ga_index import DashboardPage from ...pages.studio.settings_advanced import AdvancedSettingsPage class CourseN...
nttks/edx-platform
common/test/acceptance/tests/studio/test_ga_studio_course_name.py
Python
agpl-3.0
3,084
[ "VisIt" ]
41d0182f6d349d90c5f74e60fe40a00bfdc5802a7b064a45f357d9d9799b2f6c
import mwmatching #import ortools - import the bits we need from it only from ortools.constraint_solver import pywrapcp from ortools.constraint_solver import routing_enums_pb2 import exagony import weightings import initial_rankings as initial_rankings from operator import itemgetter topN_ = ['United States','Canada'...
aoanla/RDWC2018
scheduler-delta.py
Python
gpl-3.0
13,310
[ "EPW" ]
847fd0e66d10821dc3fce0f32ab45dce8fad62d5c0ec3f92edd21a0a03849295
""" Sheets for simulating a moving eye. This module provides two classes, ShiftingGeneratorSheet, and SaccadeController, that can be used to simulate a moving eye, controlled by topographic neural activity from structures like the superior colliculus. ShiftingGeneratorSheet is a subclass of GeneratorSheet that accept...
jesuscript/topo-mpi
topo/sheet/saccade.py
Python
bsd-3-clause
13,111
[ "Gaussian" ]
72312e4d3d7ffa8c9a46b52ad55effdef96d4be19abe2f8ee7192468c07cba73
# for python 3 # You'll need to customize this according to your needs. Proper orientation of # the kinect is vital; if participants are able to maintain their head or wrists # continuously inside the word rects, they will repeatedly trigger the collision # detection from pykinect2 import PyKinectV2 from pykinect2.PyKi...
jgerschler/ESL-Games
Kinect/Sentence Builder/Deprecated/SentenceBuilderFullScreen.py
Python
mit
10,652
[ "VisIt" ]
a1caa228e140e3161ae3ccef0d9a3ad99d435a7b325244a2c1b29d1b22e042b8
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """Tools and helper functions for abinit calculations""" from __future__ import unicode_literals, division, print_function import os import six import re import collections import shutil import operator import ...
matk86/pymatgen
pymatgen/io/abinit/utils.py
Python
mit
27,984
[ "ABINIT", "NetCDF", "pymatgen" ]
45672cd2b7eef975589eef1524b747667ef68fdcf1095fe81afcef9157c9a6e0
import logging import os from multiprocessing import Process from pysam import AlignmentFile from PyMaSC.core.mappability import BWFeederWithMappableRegionSum from PyMaSC.core.ncc import NaiveCCCalculator, ReadUnsortedError from PyMaSC.core.mscc import MSCCCalculator from PyMaSC.handler.mappability import Mappability...
ronin-gw/PyMaSC
PyMaSC/handler/masc_worker.py
Python
mit
7,557
[ "pysam" ]
aa289a1e17940d8c7272bd480840340b3642fc08880a108239e20b50e154b3c7
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter" _path_str = "scatter.marker" _valid_props = { "autocolorscale", "ca...
plotly/python-api
packages/python/plotly/plotly/graph_objs/scatter/_marker.py
Python
mit
57,787
[ "Bowtie" ]
86600dc43a4255ef494c5fb060986c7682c3e01bc59b6f07a8ad96df18c46eaf
import OpenGL.GL as gl import OpenGL.arrays.vbo as glvbo import gl_program class SpikeProgram(gl_program.GLProgram): """Render a series of ints as white dots.""" def __init__(self, width, height): self.width = width # size of the grid self.height = height # size of the grid s...
tcstewar/opengl_texture_rendering
sparkle/spiker.py
Python
gpl-2.0
2,337
[ "NEURON" ]
10fb1d3dfa1ffaa877b31aa1a0c3df4c950ea6f953e804ae2ad75e10e4dda32d
# Copyright 2008 Brian Boyer, Ryan Mark, Angela Nitzke, Joshua Pollock, # Stuart Tiffen, Kayla Webley and the Medill School of Journalism, Northwestern # University. # # This file is part of Crunchberry Pie. # # Crunchberry Pie is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
brianboyer/newsmixer
pie/profiles/tests.py
Python
gpl-3.0
6,762
[ "Brian" ]
134b73763a24a9b9a550e2100d157497a07609126eefbcc8f26ba89c1ed3214b
######################################################################## # $HeadURL$ # File: RequestTests.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2012/07/24 10:23:40 ######################################################################## """ :mod: RequestTests ======================= .. module: R...
calancha/DIRAC
RequestManagementSystem/test/RequestTests.py
Python
gpl-3.0
18,416
[ "DIRAC" ]
08b0f62efd88bb7d3edf2d7cb5be02463a500aa0a49fd3c6a79f3d71189ea6f8
""" This module provides functions to perform full Procrustes analysis. This code was originally written by Justin Kucynski and ported over from scikit-bio by Yoshiki Vazquez-Baeza. """ import numpy as np from scipy.linalg import orthogonal_procrustes __all__ = ['procrustes'] def procrustes(data1, data2): r""...
pizzathief/scipy
scipy/spatial/_procrustes.py
Python
bsd-3-clause
4,400
[ "scikit-bio" ]
66707c3f40a34d724909def4d86c5c4231cd9c70b19955479bbbcc8793968ba0
import ast import itertools from types import FunctionType from myhdl._util import _flatten from myhdl._enum import EnumType from myhdl._Signal import SignalType class Data(): pass def _resolveRefs(symdict, arg): gens = _flatten(arg) data = Data() data.symdict = symdict v = _AttrRefTransformer(...
myhdl/myhdl
myhdl/_resolverefs.py
Python
lgpl-2.1
2,454
[ "VisIt" ]
5f618448e418c859e2d83eb49085d475f3891c1121d0cd98d485bbfde12654ca
from __future__ import absolute_import import fluent.syntax.ast as FTL from fluent.migrate.helpers import transforms_from from fluent.migrate.helpers import VARIABLE_REFERENCE, TERM_REFERENCE from fluent.migrate import REPLACE, COPY what_is_a_browser = "firefox/browsers/what-is-a-browser.lang" what_is_a_browser = "moz...
MichaelKohler/bedrock
lib/fluent_migrations/firefox/browsers/what-is-a-browser.py
Python
mpl-2.0
10,903
[ "VisIt" ]
38dd63da01976dcd642065d2ef300f3e2f3b2e5204bb0c6022d4f8d308e78e20
#!/usr/bin/env python # -*- coding: utf-8 -*- """Spectral feature extraction""" import numpy as np import scipy import scipy.signal import scipy.fftpack from .. import util from .. import filters from ..util.exceptions import ParameterError from ..core.convert import fft_frequencies from ..core.audio import zero_cro...
bmcfee/librosa
librosa/feature/spectral.py
Python
isc
60,885
[ "Gaussian" ]
fbf98cc6f3d142c18ab4511cbc06f9acb38f5185074d948c8d98607b024e7642
""" Data-driven tests for reads """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import ga4gh.backend as backend import ga4gh.datamodel as datamodel import ga4gh.datamodel.datasets as datasets import ga4gh.datamodel.reads as reads imp...
srblum/server
tests/datadriven/test_reads.py
Python
apache-2.0
16,781
[ "pysam" ]
537bc858e0eb354f889ee9ef3d7f01927895062d37bc604320b797f8ccec6c21
import os import unittest from polycircles import polycircles import simplekml from geographiclib import geodesic class TestKMLs(unittest.TestCase): """Tests the KML representation of the Polycircles using the simplekml package.""" def setUp(self): self.output_dir = 'polycircles/test/kmls' ...
adamatan/polycircles
polycircles/test/test_kmls.py
Python
mit
5,506
[ "COLUMBUS" ]
eea8e6acf353e48690f1473b8e83df34941e497d5af08731a64d1ea8ee9c1c31
import urllib2 import html2text import re import numpy as np import json from scipy.optimize import curve_fit try: import matplotlib as matplot matplot.use('Agg') import matplotlib.pyplot as mpl plottingEnabled = True except: print "Matplotlib not detected, plotting disabled" plottingEnabled = ...
schollz/webcontentgrabber
context_extractor.py
Python
mit
4,936
[ "Gaussian" ]
edc33215a76e241967f342daf3aa928f7999f5fddb213bd1fa45bd3c00eb390b
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
sparkslabs/kamaelia_
Sketches/JL/IRC/KambotIRC.py
Python
apache-2.0
13,785
[ "DIRAC" ]
2870a5d3957639be205d78825b3d92f7c106af1e8abb505561dfe74b15e3b447
################################################################## # Copyright 2018 Open Source Geospatial Foundation and others # # licensed under MIT, Please consult LICENSE.txt for details # ################################################################## import unittest import lxml.etree import json impor...
tomkralidis/pywps
tests/test_execute.py
Python
mit
23,233
[ "NetCDF" ]
14de8a1a8544061e40d32eb29d7544961a4b5019db509485fb90bb806da04fdd
from rrpam_wds.gui import set_pyqt_api # isort:skip # NOQA import logging import os import time import mock import rrpam_wds.constants as c from rrpam_wds.examples import networks from rrpam_wds.gui.dialogs import DataWindow from rrpam_wds.gui.dialogs import MainWindow from rrpam_wds.gui.dialogs import RiskMatrix fr...
asselapathirana/RRPam-WDS
src/rrpam_wds/tests/test_datawindow2.py
Python
gpl-3.0
15,764
[ "ADF" ]
e3f053d51df8a34edf258ce4994613bb62c68da71df45631590c49103e670cb4
# Copyright 2012 Patrick Varilly # # 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 di...
patvarilly/units_and_physics
units.py
Python
gpl-3.0
7,364
[ "Gromacs" ]
964c41db3040a6985e62979130ef26c8d415f88ac71977ee981d69b04d933910
""" ================== tao.ui_modules ================== Helper class to extension UI modules """ from django.conf import settings from tao.record_filter_form import RecordFilterForm from tao.output_format_form import OutputFormatForm from tao.sql_job_form import SQLJobForm from tao.models import Simulation, GalaxyMod...
IntersectAustralia/asvo-tao
web/tao/ui_modules.py
Python
gpl-3.0
4,349
[ "Galaxy" ]
0796bfb382af1b596319368b506090104e34084eb27abfcd806918bb98141548
""" MQProducer """ from DIRAC import gLogger from DIRAC.Resources.MessageQueue.Utilities import getDestinationAddress, getMQService class MQProducer(object): def __init__(self, mqManager, mqURI, producerId): self._connectionManager = mqManager self._mqURI = mqURI self._destination = getDes...
DIRACGrid/DIRAC
src/DIRAC/Resources/MessageQueue/MQProducer.py
Python
gpl-3.0
1,290
[ "DIRAC" ]
73590d02ef901bd902fdd73766b22b6a2be9c37c544cf164d2fc0b8a60ebd36b
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2016 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 ...
kannon92/psi4
psi4/driver/qcdb/__init__.py
Python
gpl-2.0
1,840
[ "CFOUR", "ORCA", "Psi4" ]
f9a567201c912bfea1d4397407cacc034e041d52bd86dbd57182361915dd3389
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
google-research/google-research
readtwice/layers/tensor_utils.py
Python
apache-2.0
20,218
[ "Gaussian" ]
ea21eeebcfffbc19363c638868a9f66d94934ab374e6db2168cdebd522d57896
import spynnaker.pyNN as Frontend import spynnaker_external_devices_plugin.pyNN as ExternalDevices import pylab Frontend.setup(timestep=1.0, min_delay=1.0, max_delay=144.0) nNeurons = 256 run_time = 5000 cell_params_lif = {'cm' : 0.25, # nF 'i_offset' : 0.0, 'tau_m' ...
svadams/SpinnIOTest
examples/injection_test.py
Python
gpl-3.0
2,141
[ "NEURON" ]
a5002dc9987d61f2f432ab15860ca6d41a9181bf751dd9ebded5a1d885068bd3
""" Unittest classes for the asciidata module @author: Martin Kuemmel, Jonas Haase @organization: Space Telescope - European Coordinating Facility (ST-ECF) @license: Gnu Public Licence @contact: mkuemmel@eso.org @since: 2005/09/13 $LastChangedBy: jhaase $ $LastChangedDate: 2008-02-27 16:45:36 +0100 (Wed, 27 Feb 2008)...
COSMOGRAIL/COSMOULINE
pipe/modules/asciidata/asciidata_test.py
Python
gpl-3.0
59,791
[ "Galaxy" ]
9cfa247211325ebd0995d8dd8f7939417d2cd63986f64a89170c398fcdf2a01c
#!/usr/bin/env python3 # # netcdf_to_vtk # # Converts a netCDF file into a VTK file. The format of the VTK file # follows the 'legacy format' and will be a structured grid. In case # the input file consists of multiple time steps, every time step is # stored as a separate VTK file, with an appropriate suffix. # # This ...
Submanifold/Aleph
utilities/netcdf_to_vtk.py
Python
mit
2,374
[ "NetCDF", "VTK" ]
78a5868468c0be0ce944131184d9ad96dd1c1a161ea79bdb8e46e6eeed440cbc
''' # This script is an example of calculation of long range interactions # (Coulomb interaction) using the Ewald summation and the P3M methods. # # Initially, the simple cubic structure is generated in order to represent the # NaCl crystal. Then the energy and forces are calculated and compared using both # the...
fedepad/espressopp
examples/electrostatics/electrostatics_example.py
Python
gpl-3.0
8,975
[ "CRYSTAL", "VMD" ]
11c0ac1ffceb16c63b5483db8821190b276345800a52ed4423de7cf96883a704
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Douglas S. Blank # Copyright (C) 2010 Jakim Friant # # This program is free software; you can redistribute it and/or modify # it under the term...
Forage/Gramps
gramps/plugins/gramplet/descendgramplet.py
Python
gpl-2.0
6,319
[ "Brian" ]
e6d8a6ef3fb1cff9e890607d20f38b9b6225266126fdb50d3f949a54595fdbe6
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import copy as cp import os from math import floor, ceil, log import itertools as itt import warnings import ...
trachelr/mne-python
mne/cov.py
Python
bsd-3-clause
70,653
[ "Gaussian" ]
d3aadc23d1012cba652225da3bf6251ff5ab021018004f197d49d5a24cb4bf27
""" Example 4, to be run in python. In this example, we fit the CO emission using the data made from Ex2 (which you should be able to download from the same place you got this script). For these data, I just fixed the lens properties to those we got from the ALMA 870um data, because the ALMA data have way highe...
jspilker/visilens
examples/Ex4_fit_line_SPT0346-52_CO21.py
Python
mit
4,931
[ "Gaussian" ]
151aafe17b328070cd2203d302ece47e7cb40342323b117898a2e4969912c308
import ast import itertools import logging import os.path from pkgutil import iter_modules from .alias_helper import ( as_alias_handler, fully_qualify_alias_labels, handle_aliases_in_init_files, handle_fdid_aliases, not_as_alias_handler, retrieve_import_alias_mapping ) from ..core.ast_helper im...
python-security/pyt
pyt/cfg/stmt_visitor.py
Python
gpl-2.0
42,406
[ "VisIt" ]
863544d4899de8fa322719a25424c88ecbb9859e3761b206e91831888e847699
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/network/_help.py
Python
mit
299,402
[ "VisIt" ]
5720c174c2d30ee3b51321dcca2c0301fd25c495ee1263c61adc3f8e38898336
# Copyright (c) 2014 OpenStack Foundation. # # 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 ...
dukhlov/oslo.messaging
oslo_messaging/hacking/checks.py
Python
apache-2.0
13,278
[ "VisIt" ]
1d89622b1255da040ebe886390c89dc693d6987a4883b2e827ad636a66fe1659
""" Peak picking routines, lineshape parameter guessing, and related functions. """ # external modules import numpy as np import scipy.ndimage as ndimage # analysisbase fuctions from analysisbase import ndwindow_index,valid_pt # lineshape classes from lineshapes1d import gauss, ls_str2class # spectral segmentatio...
odyaka341/nmrglue
nmrglue/analysis/peakpick.py
Python
bsd-3-clause
18,506
[ "Gaussian" ]
374bb195c0df73e930e3d06a189ff3ec01831d502378603cf73669b5f65d5b60
#!/usr/bin/env python """ findUnannotated.py Author: Tony Papenfuss Date: Fri Aug 15 12:19:24 EST 2008 """ import os, sys from bx.intervals.intersection import * from fasta import FastaFile from blast import BlastFile from useful import progressMessage print "Load Solexa contigs & store as Intervals in an Interse...
PapenfussLab/Srtools
bin/old/findUnannotated.py
Python
artistic-2.0
2,499
[ "BLAST" ]
e0d87d9e0d523a1a29fb581331b093c704f68d650137e166ec10f1306151d832
import six import lxml.etree from .parser import CustomParser as Parser from .xmlvisitor import XmlVisitor from .jsonlike import * _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if not isinstance(text, six.text_type): text = text.decode(encoding) tree = _pa...
sgornick/obscrape
js2xml/__init__.py
Python
mit
498
[ "VisIt" ]
05beb7bad823a4f6e1ed889f907199bc98f0c231aadf62af5c517d8ee78eb25a
#!/usr/bin/env python """Module to run orthoMCL. Steps in this module reflect the steps in the UserGuide.txt bundled with OrthoMCL.""" from Bio import SeqIO import argparse import multiprocessing import os import shutil from subprocess import Popen, PIPE, CalledProcessError, check_call, STDOUT import tempfile import ...
ODoSE/odose.nl
run_orthomcl.py
Python
mit
20,897
[ "BLAST" ]
4c5bc9864927947a906b9fa44e6542e81eb4ce4fbecd37600fb2a27bb07b5b78
""" Test the coordinates class that represents the plane of orbit of the Sgr dwarf galaxy. """ # Third-party import astropy.coordinates as coord import astropy.units as u from astropy.io import ascii from astropy.table import Table from astropy.utils.data import get_pkg_data_filename import numpy as np # This pro...
adrn/gala
gala/coordinates/tests/test_orphan.py
Python
mit
2,147
[ "Galaxy" ]
d75f8935806981491c3b7594b65ad3e901f546204f4edeefd85d3eefea699def
#!/usr/bin/env python #-*- coding: utf-8 -*- #python imports from sys import exit from os import remove, path try: from hashlib import sha1 as new_sha except ImportError: from sha import new as new_sha from urlparse import urljoin #project imports from session import Session from dbconnection import dbConnect...
cria/microSICol
py/modules/form_del.py
Python
gpl-2.0
22,905
[ "VisIt" ]
907dc762b5709cbc929b6b21e747134db6d43aeebf824836d51dc4fccea9cc3c
#!/usr/bin/python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Alchemical factory for free energy calculations that operates directly on OpenMM swig S...
choderalab/brokenyank
src/yank/alchemy.py
Python
lgpl-3.0
45,113
[ "OpenMM" ]
54fca4014c8fe07729a33aeaefd3a8141221b540b782bb7904cbec9b1b935022
# coding=utf-8 from __future__ import unicode_literals from .version import __version__ from datetime import datetime BCTPY = """ @misc{{bctpy, publisher = {{GitHub}}, title = {{bctpy v{version}: Brain Connectivity Toolbox for Python}}, url = {{https://github.com/aestrivex/bctpy}}, author = {{LaPlante,...
aestrivex/bctpy
bct/citations.py
Python
gpl-3.0
13,894
[ "Desmond" ]
846117ed08e065aeecd10d0133860d0e2ff6acff88cee09ffefcbf29b68d038c
# ---------------------------------------------------------------------------- # 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. # --------------------------------------------...
anderspitman/scikit-bio
skbio/io/_exception.py
Python
bsd-3-clause
2,510
[ "scikit-bio" ]
8e1ccc6cac46b08207bb917cfcc556ba11b31c1c9f1af9fb5f3f081c804ad013
#### # # Copyright (c) 2015, Jake Vanderplas, Luke Siemens # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list...
lsiemens/iprocess-projects
psipy/animate_analytic.py
Python
bsd-3-clause
5,466
[ "Gaussian" ]
081644f14032d9ac3d8a36cdd3c9da245b8d144b1aa43c4dfe83e624cd61c5c2
# Author: Samuel Genheden samuel.genheden@gmail.com """ Classes to perform actions on MD trajectories """ import os from collections import namedtuple import MDAnalysis as md import MDAnalysis.core.AtomGroup as AtomGroup import MDAnalysis.analysis.align as align import MDAnalysis.lib.util as mdutil import numpy as n...
SGenheden/Scripts
sgenlib/mdactions.py
Python
mit
58,085
[ "MDAnalysis" ]
464aea36783ca7fd9f9a915d4ec8f71bddc4a2921d2fd9e7162b550d00ec1b3c
## appsterdam twitter data ## usage: we open a csv file with names of companies or phenomenon that are ## of interest to the amsterdam tech community. these subjects are ## searched on twitter. the tweets will give us a new list of users and ## hashtags. these will be searched again and...
InnoViz/innoviz-frontend
app/data miner scripts/TWITTER GRAPH/twitter_miner.py
Python
mit
6,330
[ "Cytoscape" ]
8d0a24dbd7573e21ccd50b3f6984c89bfd14ff382aca714c2dbed8f69d21e9df
from glue.core.fitters import BaseFitter1D from glue.core.simpleforms import IntOption from glue.config import fit_plugin import numpy as np import emcee def gaussian(x, mean, amplitude, stddev): return np.exp(-(x - mean) ** 2 / (2 * stddev ** 2)) * amplitude def lnprob(param, x, y, dy): # mean, amplitude,...
stscieisenhamer/glue
doc/gui_guide/emcee_plugin.py
Python
bsd-3-clause
2,842
[ "Gaussian" ]
0b8ee83141a3120b5d7042f9edc14bb7a1d8b5acd592fb3eb4bc01073979581b
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2010 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
davidfraser/genshi
genshi/template/astutil.py
Python
bsd-3-clause
24,465
[ "VisIt" ]
72c4d39e9c220e42422b4f7cfe68fe70833d03c185cb64f3fad5965153876030
""" Contains the parent classes Platform""" # platform.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # Documentation and more info at http://missionpinball.com/mpf import time class Platform(object): """Parent ...
jabdoa2/mpf
mpf/system/platform.py
Python
mit
10,382
[ "Brian" ]
b5a14cf9065808d85a6d8a8e24682e0b972db24d25e8408daf200c3d8a0e0e6c
# Author: Samuel Ponc\'e # Date: 30/04/2013 -- 11/09/2014 # Version 1.3 # Classes needed for the temperature.py script # Last devel info: Dynamical coding done import numpy as N from numpy import zeros import itertools as Iter from functools import partial import multiprocessing import netCDF4 as nc import sys import ...
jmbeuken/abinit
scripts/deprecated/rf_mods_seq.py
Python
gpl-3.0
51,849
[ "NetCDF" ]
0f69a1d74fa711f01633ffcebdef058c0d7bb1310c1e14f97f9275175d352b3a
# Network class. from scipy.special import expit import numpy as np import pyperclip import screenPixel import pyautogui as pg import random import re import os ''' inp nodes hidden nodes exit nodes 100 20 2 ''' class network: def mutate(self,x): if(np.random.rand() < self.mutationRate)...
Chrisr850/Snake.io-player
network.py
Python
mit
4,997
[ "NEURON" ]
9b60233f748df137aa262f5f1fb73d5b1ddd9b5ba6f18487854ee0419009cd17
#!/usr/bin/python2 import sys from collections import OrderedDict # Daniel Elsner #Takes a tabular blast results file (outfmt 6), reduced to the the three colums query, hit and score (use "cut", from GNU coreutils, presumably included in most Linux distros), to obtain the score of each relevant pairwise comparison. ...
dewuem/python-bioinf
orthology-and-selection/obtain-blast-score-construct-clusters-short.py
Python
mit
6,045
[ "BLAST" ]
38d51c0d48ce7c8c54de928ed071d02e5ddea1c6ed09a1bfb4ba137d3f8c4d52
""" (c) RIKEN 2017. All rights reserved. Author: Keitaro Yamashita This software is released under the new BSD License; see LICENSE. """ import iotbx.phil from cctbx import sgtbx from dxtbx.model.experiment_list import ExperimentListFactory from dxtbx.model.experiment_list import ExperimentListDumper from dxtbx.model...
keitaroyam/yamtbx
yamtbx/dataproc/dials/command_line/import_xds_for_refine_stills.py
Python
bsd-3-clause
11,464
[ "CRYSTAL" ]
14d6ca1fb1f5457cc22e2bd798e8bf57523186fb58244b34b68000fbb2c54cfa
# ################################################################ # # Active Particles on Curved Spaces (APCS) # # Author: Silke Henkes # # ICSMB, Department of Physics # University of Aberdeen # Author: Rastko Sknepnek # # Division of Physics # School of Engineering, Physics and Mathem...
sknepneklab/SAMoS
analysis/batch_nematic/batch_analyze_nematic_R8.py
Python
gpl-3.0
2,346
[ "VTK" ]
a60b69f776c8d624de7281bb1bfdb448d15c8cfa046e197326c463839a90de9c
###################################################################### # Copyright (C) 2013-2014 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ###############...
nipunreddevil/bayespy
bayespy/inference/vmp/nodes/node.py
Python
gpl-3.0
40,101
[ "Gaussian" ]
e483a01f5ea979876d5576cd0d505aded47fddebdf474c9cd4eafdca8111adfd
import inspect import sys from .formatting import format_filename from .xtracebackframe import XTracebackFrame class XTracebackExc(object): def __init__(self, etype, value, tb, xtb): """ :param value: The exception instance :type value: Exception :param tb: The traceback instanc...
005/xtraceback
xtraceback/xtracebackexc.py
Python
mit
4,469
[ "xTB" ]
ab9317ec24c25ff5f8d210d54182cbe39b5f8bacdd5af13608f078984bd41640
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """ Greyscale ℓ2-TV Denoising ========================= This example demonstrates the use of class :class:`.tvl2.T...
alphacsc/alphacsc
alphacsc/other/sporco/examples/scripts/tv/tvl2dcn_den.py
Python
bsd-3-clause
2,902
[ "Gaussian" ]
861f82b28cefc6facbf15d6c13f297626962b5cd0e532c9049db53c9cb4765c8
# # @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 ...
kratman/psi4public
tests/reap.py
Python
gpl-2.0
6,615
[ "Psi4" ]
8ecacb3181d56b2528d1aa71336bdf5263b6d692e71f5a54486fa75cd06d5c3a
from __future__ import division from cctbx.array_family import flex from cctbx import crystal, sgtbx from cctbx import covariance, geometry import model from libtbx.utils import format_float_with_standard_uncertainty \ as format_float_with_su from libtbx import adopt_init_args import math class distances_as_cif...
stefsmeets/topas_tools
topas_tools/cif/geometry.py
Python
gpl-2.0
9,578
[ "CRYSTAL" ]
e153e5a24969df4819f4115ed19bc60db1a4921e33b7128c369fe55d5198efe3
# coding=utf-8 # Copyright 2022 The Edward2 Authors. # # 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 o...
google/edward2
edward2/tensorflow/layers/hetsngp_test.py
Python
apache-2.0
4,417
[ "Gaussian" ]
4ce3c437186edbf4599d005fb83d898c5d97cf09f98e6962ead77d5838fab782
r"""Gaussian process changes (CostNormal)""" import warnings import numpy as np from numpy.linalg import slogdet from ruptures.base import BaseCost from ruptures.costs import NotEnoughPoints class CostNormal(BaseCost): """Gaussian process change.""" model = "normal" def __init__(self, add_small_diag=T...
deepcharles/ruptures
src/ruptures/costs/costnormal.py
Python
bsd-2-clause
2,222
[ "Gaussian" ]
e8e31053c097c3a52dc781a66ae70930f808254ad9451626d4a5d31f3d6dedfb
# Copyright (C) 2001-2006 Quantum ESPRESSO group # This file is distributed under the terms of the # GNU General Public License. See the file `License' # in the root directory of the present distribution, # or http://www.gnu.org/copyleft/gpl.txt . # # Author: Filippo Spiga (spiga.filippo@gmail.com) # Date: September 29...
fspiga/phiGEMM
scripts/addPhigemmSymbs.py
Python
gpl-2.0
1,821
[ "Quantum ESPRESSO" ]
abc4a2d75e1933ec23f475bc953aebacc23e27d8b70dc3902eaf79da789c660f
# 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 scipy.io import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy #import hrl_lib.mayavi2_util as mu imp...
tapomayukh/projects_in_python
sandbox_tapo/src/skin_related/AI_Surface_Recognition/src/hmm_crossvalidation_force_7_states.py
Python
mit
15,135
[ "Gaussian", "Mayavi" ]
391d0e4a5d3f38162779f1c3e56eea0e5aa03757a71d40e9b8969c2e22fcf6ed
# ----------------------------------------------------------------------------- # Download data: # - Browser: # http://midas3.kitware.com/midas/folder/10409 => VisibleMale/vm_head_mri.mha # - Terminal # curl "http://midas3.kitware.com/midas/download?folders=&items=235237" -o vm_head_mri.mha # --------------...
Kitware/tonic-data-generator
scripts/vtk/medical/head-mri.py
Python
bsd-3-clause
3,539
[ "VTK" ]
b80901db9e0aee7821cd263a5071510dfcdc0f6d309fa9efe295e496e36afaa9
# vim: set fileencoding=utf-8 : import unittest import neuroml import neuroml.writers as writers import PyOpenWorm import subprocess from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q namespaces = { "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } # Set up the database ...
mwatts15/PyOpenWorm
tests/test.py
Python
mit
18,558
[ "NEURON" ]
b6546f9fa5e0442499e9ce2623b738f534be2162b8f7f5c18edc920eeda8838e
""" HPHF via SGM """ import numpy as np from frankenstein.sgscf import sgsphf class SGHPHF(sgsphf.SGSPHF): def __init__(self, pymol, **kwargs): self.eta = 1 sgsphf.SGSPHF.__init__(self, pymol) self.__dict__.update(kwargs) if np.abs(self.eta) != 1: raise ValueError...
hongzhouye/frankenstein
sgscf/sghphf.py
Python
bsd-3-clause
1,292
[ "PyMOL", "PySCF" ]
2674732e498af8ed2203ab7ec5fd4b6e64daf7fc6d7ac2063899df61f5d88e81
import json import os import sys from functools import wraps from typing import Any, Callable, Dict, Iterable, List, Optional, Set from zulip import Client from zerver.lib import mdiff from zerver.models import get_realm, get_user from zerver.openapi.openapi import validate_against_openapi_schema ZULIP_DIR = os.path...
shubhamdhama/zulip
zerver/openapi/python_examples.py
Python
apache-2.0
39,351
[ "Octopus" ]
e41cdd7d997edf36be0042fbe44980211496705e8d73dfe00a48005fef442bd9
# Change LogicalFile to be a wrapper for the DiracFile, # make sure DiracFile replicates required functionality and add any # possible translation layer here from GangaCore.Core.exceptions import GangaException from GangaCore.GPIDev.Schema import Schema, Version, SimpleItem, ComponentItem from GangaDirac.Lib.Files.Dir...
ganga-devs/ganga
ganga/GangaLHCb/Lib/Files/LogicalFile.py
Python
gpl-3.0
4,419
[ "DIRAC" ]
8d3a209ef1477130a449a961389eb08788272c667eef0ebe1f35e4fe31516d1b
# pylint: disable=R0913,R0914,W0201,W0622,C0302,R0902,R0903,W1001,W0612,W0613 """Useful functions and objects used more or less everywhere.""" from __future__ import print_function from builtins import zip from builtins import str from builtins import range from builtins import object __author__ = 'Lorenzo Bolla' i...
demisjohn/EMpy
EMpy/utils.py
Python
mit
40,698
[ "CRYSTAL" ]
527842535e38f8388fb807f7ea2fad50ac5962d9c8cf88786f833d71311e2173
""" Application to explore the difference between sasview 3.x orientation dispersity and possible replacement algorithms. """ import mpl_toolkits.mplot3d # Adds projection='3d' option to subplot import matplotlib.pyplot as plt from matplotlib.widgets import Slider, CheckButtons from matplotlib import cm import numpy...
SasView/sasmodels
explore/angular_pd.py
Python
bsd-3-clause
5,217
[ "Gaussian" ]
5d6dc309f8a98f3a50fb42bd4fadfd3f1b85557eaf30f4e17303506622ad9c71
from __future__ import division, print_function, absolute_import class FirstNames(object): def __init__(self): self.names = set(['john', 'william', 'james', 'charles', 'george', 'frank', 'joseph', 'thomas', 'henry', 'robert', 'edward', 'harry', 'walter', 'arthur', 'fred', 'albert', 'samuel', 'david',...
robert-giaquinto/text-analysis
src/clean_journal/first_names.py
Python
mit
82,014
[ "Amber", "Brian", "COLUMBUS", "CRYSTAL", "Dalton", "Desmond", "MOE" ]
45c1d478d62b763c53decbd93288a0eab32b21ef48c3439870db0bad4cdfc809
print "Importing..." from enthought.mayavi import mlab from enthought.mayavi.filters.warp_scalar import WarpScalar from enthought.mayavi.modules.surface import Surface from numpy import array from glob import glob import re print " done." frames = glob("output/frame_scal*.vtk") frames.sort() max_frame_number = int(re...
certik/mhd-hermes
vis_scal.py
Python
bsd-3-clause
1,560
[ "Mayavi", "VTK" ]
550eedefdd144bfa95199c73605542ae7e79bc7b814cd6ac20fbd909e112e7b8
# -*- coding: utf-8 -*- """ Helper functions for auxiliary pseudo marginal MCMC Gaussian process classification experiments. """ __authors__ = 'Matt Graham' __copyright__ = 'Copyright 2015, Matt Graham' __license__ = 'MIT' import os import datetime import json import numpy as np from scipy.special import gammaln impo...
matt-graham/auxiliary-pm-mcmc
gpdemo/utils.py
Python
mit
8,482
[ "Gaussian" ]
448723f31df8533c99f1ca500a5211d3c69f9fa3032b9ef19c40a261a9d28f8c
# -*- coding: utf-8 -*- """ End-to-end tests for the courseware unit bookmarks. """ import json from unittest import skip import pytest import requests from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acceptance.pages.common import BASE_URL from common.test.acceptan...
a-parhom/edx-platform
common/test/acceptance/tests/lms/test_bookmarks.py
Python
agpl-3.0
22,195
[ "VisIt" ]
565d4c8a0d491b888421bfcc9bb1f0245c9eadf1015cd5e48347190f4248d295
"""Leetcode 130. Surrounded Regions Medium URL: https://leetcode.com/problems/surrounded-regions/ Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. Example: X X X X X O O X X X O X X O X X A...
bowen0701/algorithms_data_structures
lc0130_surrounded_regions.py
Python
bsd-2-clause
2,909
[ "VisIt" ]
c393e9c6d03ed5cf8fee47c8775b07dbb2e0dce25917e23839ca2a573230fa48
# -*- coding: utf-8 -*- """Tests for input and output.""" import logging import os import re import tempfile import unittest from io import BytesIO, StringIO from pathlib import Path import pybel from pybel import ( BELGraph, from_bel_script, from_bel_script_url, from_bytes, from_nodelink, fr...
pybel/pybel
tests/test_io/test_import.py
Python
mit
19,541
[ "Pybel" ]
cfadaa21803cf17b6ba15d8491ab9e88b53d88a10ec33c1e51bf4a2a79474825
#!/usr/bin/env python import os import re import sys import warnings from setuptools import setup, find_packages from setuptools import Command MAJOR = 0 MINOR = 8 MICRO = 1 ISRELEASED = False VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) QUALIFIER = '' DISTNAME = 'xarray' LICENSE = 'Apache' AUTHOR = 'xarray Develop...
NicWayand/xray
setup.py
Python
apache-2.0
4,681
[ "NetCDF" ]
b68d90819f3c8f186174f508d7a2e2adec6d3cdcc37667bf619d0546155bfe77
""" This sample simulates monovalent salt (equal number of positive and negative unit charges). Electrostatic interactions between charges is emulated by the Debye-Hueckel potential. The system is maintained at a constant temperature by using a Langevin thermostat. """ # # Copyright (C) 2013-2018 The ESPResSo project ...
hmenke/espresso
samples/debye_hueckel.py
Python
gpl-3.0
6,610
[ "ESPResSo" ]
51691e7aeff05db57b1b81f361bee80759d329e31629faa402189e3e886bba90
import numpy as np import matplotlib import matplotlib.pyplot as plt from fitFunctions import gaussian import mpfit import scipy.stats import smooth from util.ObsFile import ObsFile from util.FileName import FileName def smoothBaseline(baselines,nPtsInMode=400): modBases = np.array(baselines) for i in range(le...
bmazin/ARCONS-pipeline
examples/energyRes/obsR.py
Python
gpl-2.0
8,946
[ "Gaussian" ]
dbcf4ba2f4c4b450ba3e7dea63af329d9a4d71ed80a82c90192cfa9967facff0
import psi4 import numpy as np import random mol = psi4.geometry(""" C C 1 20 """) primary = psi4.core.BasisSet.build(mol, "ORBITAL", "cc-pVDZ") aux = psi4.core.BasisSet.build(mol, "ORBITAL", "cc-pVDZ-jkfit") nbf = primary.nbf() naux = aux.nbf() # form metric mints = psi4.core.MintsHelper(primary) zero_bas = psi4.c...
rmcgibbo/psi4public
tests/df-helper/input.py
Python
lgpl-3.0
11,815
[ "Psi4" ]
6776a37c681d7a277107103bdf6ebe654fa59d351d2828fd18b4381e443f776e