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 |
|---|---|---|---|---|---|---|---|
# encoding: utf-8
from woo.dem import *
import woo.core
import woo.dem
import woo.pyderived
import woo.models
import math
from minieigen import *
nan=float('nan')
if 'qt5' in woo.config.features:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class EllGroup(woo.core.Pr... | woodem/woo | py/pre/ell2d.py | Python | gpl-2.0 | 9,539 | [
"VTK"
] | 9f9342404170abdfdb8423d2abbc974f285feafe81234df7fc1ff91e6df033bf |
#!/usr/bin/python
'''
Drop menu callback handlers for mrMeshPy
Andre' Gouws 2017
#TODO - workaround that doesn't require the parent UI to be global - needed for drawing routines
'''
import vtk
from mp_VTKDrawing import *
debug = True
global the_parent_UI
def Ui_setupMenuBarCallbacks(parent_UI):
global t... | andregouws/mrMeshPy | mp_MenuCallbacks.py | Python | mit | 4,927 | [
"VTK"
] | db8be1a40a27e68ffb628d6a052e12855ccc2fc1753aa5228b0ce52af3e9bcd3 |
# nls/animation.py
# This module define routines and type to record evolution of solution and store it into file.
# (c) Daniel Bershatsky, 2016
# See LICENSE for details
from __future__ import absolute_import, print_function
from time import time
from matplotlib import animation
from matplotlib.pyplot import f... | daskol/nls | nls/animation.py | Python | mit | 4,052 | [
"Gaussian"
] | efc3b23d7e97cff290378bc6b8861a193af6097e1247538d78beeaec5ab45a42 |
#!/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... | MOA-2011/e2openplugin-OpenWebif | plugin/controllers/views/web/mediaplayercmd.py | Python | gpl-2.0 | 5,225 | [
"VisIt"
] | daafb25cfd6e46b0c85fff805bfbf0c2076bbc74c1aadf57a75f9578c618f92a |
"""
The Input Data Agent queries the file catalog for specified job input data and adds the
relevant information to the job optimizer parameters to be used during the
scheduling decision.
"""
__RCSID__ = "$Id$"
from DIRAC.WorkloadManagementSystem.Agent.OptimizerModule import OptimizerModule
from DIRAC.Core.... | rajanandakumar/DIRAC | WorkloadManagementSystem/Agent/InputDataAgent.py | Python | gpl-3.0 | 11,233 | [
"DIRAC"
] | 58a68016d97d249087effd53a5382e930637a4ee14c6b042317dca55ea5c5262 |
''' EmailAction
This action writes all the necessary data to a cache file ( cache.db ) that
will be used later by the EmailAgent in order to send the emails for each site.
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = '$Id$'
import s... | yujikato/DIRAC | src/DIRAC/ResourceStatusSystem/PolicySystem/Actions/EmailAction.py | Python | gpl-3.0 | 3,192 | [
"DIRAC"
] | aa24a498fe52d8cd31c10202faff7de7906513c8142450095b8f64ca5c46bc83 |
import os
class Atom(object):
"""Docstring for Atom"""
atom_id = ""
atom_type = ""
x_pos = 0.0000
y_pos = 0.0000
z_pos = 0.0000
numbonds = 0
atom_bonds = []
ring = False
opls_id = 0
opls_bondid = 0
opls_partial = 0
opls_sigma = 0
opls_epsilon = 0
opls_mass = ... | sipjca/cmlparser_py | atom.py | Python | apache-2.0 | 4,139 | [
"LAMMPS"
] | 26aa5c1b79e8c3236a72aeb4300656819a4b6bdf889daeb383c121b31d4d141f |
#!/usr/bin/env python
#Contact, Adam Taranto, adam.taranto@anu.edu.au
# .-. .-') ('-. .-') .-') _ .-. .-') ('-. .-') .-') _ ('-. .-')
# \ ( OO ) ( OO ).-. ( OO ). ( OO) ) \ ( OO ) _( OO) ( OO ). ( OO) ) _( OO) ( OO ).
# ;... | Adamtaranto/blast-besties | blastbesties/__init__.py | Python | mit | 4,076 | [
"BLAST"
] | 0416fff6269800e56e7f371ac6d8b11910439da76d0984886bfd9704914bf3eb |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import models, migrations
def update_site_forward(apps, schema_editor):
"""Set site domain and name."""
Site = apps.get_model("sites", "Site")
Site.objects.update_or_create(
id=settings... | mikemitr/test-for-brian-criswell | test-for-brian-criswell/contrib/sites/migrations/0002_set_site_domain_and_name.py | Python | bsd-3-clause | 962 | [
"Brian"
] | 921acdb3625ee962f613f3ec7f2c00c67d9e6ad4377fa5de520a99a52912025e |
#!/usr/bin/env python
# Name: amplicon_pipeline.py
# Date: 16-01-2018
# Licence: GNU General Public License v3.0 (copy provided in directory)
# Author: Tom van Wijk - RIVM Bilthoven
# Contact: tom_van_wijk@hotmail.com / tom.van.wijk@rivm.nl
############################## DESCRIPTION ##############################
... | Tommyvanwijk/RIVM_amplicon_pipeline | amplicon_pipeline.py | Python | gpl-3.0 | 25,107 | [
"Bioconductor"
] | b260f8edb4f78594963730e4c039c79c639e05739a058721f7cc9070bfe1420c |
#!/usr/bin/python
import sys
import random
from mrbait import misc_utils as utils
from Bio import AlignIO
############################# CLASSES ##################################
class consensAlign():
'Consensus alignment object'
#Default constructor
def __init__(self, alignment, threshold, mask, maf=0.0):
self... | tkchafin/mrbait | mrbait/alignment_tools.py | Python | gpl-3.0 | 5,848 | [
"Biopython"
] | aca89371365f9df96b978e2d9add736e7a2e8bdcc017c1f390396880764a2b84 |
# Orca
#
# Copyright 2009 Eitan Isaacson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is ... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/scripts/apps/notify-osd/script.py | Python | gpl-3.0 | 3,108 | [
"ORCA"
] | 0759a069b04731106a0eae6b21802712fb0cc2e68cc042add5fcaa938129aea3 |
#
# Copyright (C) 2013-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... | espressomd/espresso | samples/grand_canonical.py | Python | gpl-3.0 | 5,563 | [
"ESPResSo"
] | f7c95d756ea36c4308fed3824a6a36c3ad57efd785b3f7da12bd2636c2229c46 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyBcbioGff(PythonPackage):
"""Read and write Generic Feature Format (GFF) with Biopython
... | iulian787/spack | var/spack/repos/builtin/packages/py-bcbio-gff/package.py | Python | lgpl-2.1 | 740 | [
"Biopython"
] | e94c44f535244305e06c1bc6c8ddf2a0d163999a4a72646940ea69723d7de0ad |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import traceback
import fs_uae_launcher.fsui as fsui
from ..Config import Config
from ..Signal import Signal
from ..Settings import Settings
from ..Database imp... | cnvogelg/fs-uae-gles | launcher/fs_uae_launcher/ui/VariantsBrowser.py | Python | gpl-2.0 | 5,907 | [
"ADF"
] | 4bc73579739afd0829af645a5d740699afd45e5e161336b076b1dc3e487c57ab |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software F... | tiagocardosos/stoq | stoqlib/gui/wizards/workorderpackagewizard.py | Python | gpl-2.0 | 6,769 | [
"VisIt"
] | 4204cd0964acb8f3f5e2a812ea81321dd718e4b6934e153129e5d962985da7e1 |
# Copyright (c) 2007-2009 Pedro Matiello <pmatiello@gmail.com>
# Peter Sagerson <peter.sagerson@gmail.com>
# Johannes Reinhardt <jreinhardt@ist-dein-freund.de>
# Rhys Ulerich <rhys.ulerich@gmail.com>
# Roy Smith <roy@panix.c... | cwmartin/rez | src/rez/vendor/pygraph/algorithms/minmax.py | Python | lgpl-3.0 | 16,125 | [
"VisIt"
] | cf8bb00114571f308420aed448a95711a3ebba4fb9ec09fd277b10850c8b606e |
# ======================================================================
# Atomistica - Interatomic potential library and molecular dynamics code
# https://github.com/Atomistica/atomistica
#
# Copyright (2005-2020) Lars Pastewka <lars.pastewka@imtek.uni-freiburg.de>
# and others. See the AUTHORS file in the top-level A... | Atomistica/atomistica | tests/forces_and_virial.py | Python | gpl-2.0 | 14,164 | [
"ASE"
] | a699226e7f7f1ebd391340ca236cf827f5e9b00fde5fd974cd5704999946d5e9 |
"""
soapdenovo2_pregraph.py
A wrapper script for SOAPdenovo2 pregraph module
Copyright Peter Li - GigaScience and BGI-HK
"""
import optparse
import os
import shutil
import subprocess
import sys
import tempfile
def stop_err(msg):
sys.stderr.write(msg)
sys.exit()
def cleanup_before_exit(tmp_dir):
if tm... | gigascience/galaxy-bgisoap | tools/soapdenovo2_pregraph/soapdenovo2_pregraph_wrapper.py | Python | gpl-3.0 | 6,801 | [
"Galaxy"
] | 651598993e45a6010d1bd75adeb129adcae8ee9d6130f74403bda44599ecd1a9 |
#
# Copyright 2008, 2009 Brian R. D'Urso
#
# This file is part of Python Instrument Control System, also known as Pythics.
#
# Pythics 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 t... | dursobr/Pythics | pythics/instruments/Mikrotron_Inspecta4C.py | Python | gpl-3.0 | 7,313 | [
"Brian"
] | af73dc841f6d92ddb946a724c4ce7ca496b449ac336fe28be253151cde7d9a8c |
# analogStimTable.py ---
#
# Filename: analogStimTable.py
# Description:
# Author: Upi Bhalla
#
# 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, or
# (at your option) any la... | dilawar/moose-full | moose-examples/snippets/analogStimTable.py | Python | gpl-2.0 | 3,320 | [
"MOOSE"
] | 307bdbd65427e954993796f743a9485e4bcd4e7b101491ad2c6da6c910b83630 |
# (C) British Crown Copyright 2019, Met Office
#
# This file is part of cf-units.
#
# cf-units is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | ocefpaf/cf_units | cf_units/tex.py | Python | lgpl-3.0 | 1,944 | [
"VisIt"
] | d3c0606ce283d00f4f35b5b815b2ba233cd69b793d1c421c3701933dd1898212 |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | thica/ORCA-Remote | src/ORCA/utils/Platform/android/android_cRotation.py | Python | gpl-3.0 | 1,988 | [
"ORCA"
] | 9ae69767252c20193a0bc5070f29236b5c2b66f37f8ab1bc6439358516b8dbc9 |
# do some tests here before we import
# Right version of Scientific?
from ase.test import NotAvailable
import string, os
try:
import Scientific
version = string.split(Scientific.__version__,".")
print 'Found ScientifPython version: ',Scientific.__version__
if map(int,version) < [2,8]:
print 'Sci... | freephys/python_ase | ase/test/jacapo.py | Python | gpl-3.0 | 1,350 | [
"ASE",
"NetCDF"
] | a9dcfad159415ecdf723a49b5c26d318e88c136505643627e65bc44ad50ba577 |
import numpy as np
import os
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import matplotlib.pyplot as plt
import time
from datetime import datetime
from matplotlib.dates import date2num, num2date
import pyroms
import pyroms_toolbox
import _remapping
class nctime(object):
pass
def remap_uv(s... | kshedstrom/pyroms | examples/Arctic_HYCOM/remap_uv.py | Python | bsd-3-clause | 6,919 | [
"NetCDF"
] | 8e502eb642ad7ef8f426f8501e4a14536ab0af9124df40ff0d93bce0df9638bd |
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
from numpy import log2
from scipy import arange
#from mpl_toolkits.mplot3d import Axes3D
from dspUtils import get_fft
def plot_log_spectrum(y, Fs, upper_frequency=0):
"""
plot spectrum on a log-frequency scale
"""
frq, ampl = g... | williampierce/cc | tools/dsp/plotUtils.py | Python | mit | 2,757 | [
"Gaussian"
] | ad15f535d8b02ed6aeab1d85ae91002cebdef491e208170932263129f20c9c9c |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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 Fre... | beernarrd/gramps | gramps/gen/filters/rules/family/_haslds.py | Python | gpl-2.0 | 1,761 | [
"Brian"
] | e0a6bd63185d51796c030b69266e198c83f0720fc9d6011bfc97d67f20afad37 |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytest
from django.utils.translation import activ... | shoopio/shoop | shuup_tests/browser/admin/test_order_detail.py | Python | agpl-3.0 | 5,075 | [
"VisIt"
] | 48db50407e6bd43dc46555e863099891409599ec4b4b3e35cf88e409aaf7f083 |
# Orca
#
# Copyright 2005-2008 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/scripts/apps/gcalctool/__init__.py | Python | gpl-3.0 | 845 | [
"ORCA"
] | b2d625d1a1e56de6c1c93cbe03a938582973c76c4f9e15bfbc651644a109df7d |
# 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 | mol_dqn/experimental/multi_obj_opt.py | Python | apache-2.0 | 15,351 | [
"RDKit"
] | 3c26c7d9def7f70e280e6b67b7319804a4b498df240f8cf25ea902c92bba8491 |
../../../../../../../share/pyshared/orca/scripts/apps/Instantbird/script.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/Instantbird/script.py | Python | gpl-3.0 | 75 | [
"ORCA"
] | 9149b79321b6fda7eee29396f05200e22a6da3a678050868fc0c1b0afcd92ede |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = [
url(r'^$', TemplateView.as_view(temp... | goldhand/product-purchase | config/urls.py | Python | bsd-3-clause | 1,384 | [
"VisIt"
] | 062a7ac4e41c53a0e2f9ffb9716f8f6be4da01bd1ac7cd4ee531affd966aad4e |
#!/usr/bin/env python3
import sys
import argparse
import glob
import re
import vtk
import vtktools
def parse_args(argv):
parser = argparse.ArgumentParser(
prog="vtu2ensight",
description="""This converts a vtu file to a ensight file. If applied to checkpointed files, use rename_checkpoint ... | FluidityStokes/fluidity | tools/vtu2ensight.py | Python | lgpl-2.1 | 5,350 | [
"VTK"
] | ddeac194036d6eee6bac49cb62637cab05033526bc0f4da9db719d921adae4db |
from pylab import figure,scatter,contour,show,legend,connect
from numpy import array, append, arange, reshape, empty, exp
from shogun import Gaussian, GMM
from shogun import RealFeatures
import util
util.set_title('EM for 2d GMM example')
#set the parameters
min_cov=1e-9
max_iter=1000
min_change=1e-9
cov_type=0
#set... | geektoni/shogun | examples/undocumented/python/graphical/em_2d_gmm.py | Python | bsd-3-clause | 2,419 | [
"Gaussian"
] | f16777ca4bf598e6d37a2332ad5db200becdced756166e893c97e8fa70b042c5 |
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 15:47:46 2015
@author: Christian010
"""
from win32api import GetSystemMetrics #Utilizada para obtener la resolución de la pantalla
from win32api import keybd_event #Utilizada para enviar teclas al sistema
pymol_argv = ['pymol', '-xq'] #Argumentos leídos por PyMOL al... | Christian010/RealMOL | Base code/RealMOL/bin/Debug/Oculus.py | Python | gpl-3.0 | 37,773 | [
"PyMOL"
] | 7c5b8242f6472849e839de4424b51b0b6c4f1db9d6ac7043f1a335f6aef024a2 |
import sys
import gzip
from collections import OrderedDict
import numpy as np
import multiprocessing
# NGS packages
import pysam
from bx.intervals.io import GenomicIntervalReader
def compute_sub_matrix_wrapper(args):
return heatmapper.compute_sub_matrix_worker(*args)
class heatmapper:
"""
Class to hand... | Joshmoss11/x-seq | deeptools/heatmapper.py | Python | gpl-3.0 | 39,550 | [
"pysam"
] | ad31b506235214a2cd4675319b96284d1caf8f260ec2924f1b182161a43fbae1 |
import unittest
from octopus.modules.identifiers import pmid
class TestPMID(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_01_normalise_PMID(self):
identifier_1 = "PMID12345"
identifier_2 = "PMID:12345"
identifier_1 = pmid.normalise(ide... | JiscPER/magnificent-octopus | octopus/tests/unit/test_pmid.py | Python | apache-2.0 | 830 | [
"Octopus"
] | 8da02196a5d977b6f5f729b69201988fef78131f12cd7e51f39d2d421d1739a7 |
import numpy as np
import sys, os, math
import datetime as dt
import scipy, scipy.signal
import parmap
from scipy.interpolate import splrep, splev, make_interp_spline, splder, sproot, interp1d
from tqdm import tqdm
# doing imports inside module until travis is fixed
# Cat: TODO: move these to the top once Peter's work... | paninski-lab/yass | src/yass/deconvolve/match_pursuit_gpu_test_OLD.py | Python | apache-2.0 | 77,207 | [
"NEURON"
] | 8807bad01f343fb17fdf5c7cb2701025024cd97dd55de64e0569fe52f9c87ed9 |
from . import bwa
from . import util
from . import gatk
from _version import __version__
| mskcc/cmo | cmo/__init__.py | Python | gpl-2.0 | 89 | [
"BWA"
] | d40cab01f5b9bb9c28466512909ada5ce813d08efe6adf086b254870ad21f15a |
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
from math import ceil
from os.path import dirname, join, realpath
from sys import exit as sys_exit
from sys import path
path.append("..")
from platformio import util
from platformio.platforms.base import PlatformFactory, get_packages
def is_... | mcanthony/platformio | scripts/docspregen.py | Python | mit | 8,500 | [
"VisIt"
] | a6aa528926c7f36c7c42811d46818c73728db760a45dad985bb7a4f6e1029d5a |
# -*- coding: utf-8 -*-
#
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Joan Massich <mailsik@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
# Oleh Kozynets <ok7mailbox@gmail.com>
#
# License: Simplified BSD
imp... | larsoner/mne-python | mne/viz/_brain/tests/test_brain.py | Python | bsd-3-clause | 40,660 | [
"VTK"
] | 0f496acec494b2cdd1db2c0eff6518fdf49747701b54769b22b66860dfdf1e06 |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | yipenggao/moose | python/chigger/tests/new_files/old_files.py | Python | lgpl-2.1 | 1,873 | [
"MOOSE"
] | d32ae75d07e3006029dc833e71a31fb9a398cf334693c6cbfd138d280f7cdaa7 |
import os
from bs_utils.utils import *
FWD_MAPPABLE_REGIONS = lambda chrom_id: chrom_id+'.fwd_mappable_regions'
REV_MAPPABLE_REGIONS = lambda chrom_id: chrom_id+'.rev_mappable_regions'
# example: T-CGA
def rrbs_build(fasta_file, build_command, ref_path, low_bound, up_bound, aligner, cut_format="C-CGG"):
# ref... | BSSeeker/BSseeker2 | bs_index/rrbs_build.py | Python | mit | 8,223 | [
"Bowtie"
] | f85b7ed8688aa4ed0d4e5ecf9281c6152e19d189936b0fc1e1e0e7ca66a02efc |
""" Utilities for WMS
"""
import os, sys
from DIRAC import gConfig, gLogger, S_OK, S_ERROR
def createJobWrapper( jobID, jobParams, resourceParams, optimizerParams,
extraOptions = '',
defaultWrapperLocation = 'DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapperTemplate.py'... | Sbalbp/DIRAC | WorkloadManagementSystem/Utilities/Utils.py | Python | gpl-3.0 | 2,607 | [
"DIRAC"
] | 01385c5c0fd9f7d319c9ddf18e24d54a3209e214048ad19a332677559f78738b |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS Instructor Dashboard.
"""
import ddt
from bok_choy.promise import EmptyPromise
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.certificates import CertificateConfigFixture
from common.test.acceptance.fixtures.course import CourseFixtur... | lduarte1991/edx-platform | common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py | Python | agpl-3.0 | 64,156 | [
"VisIt"
] | 835421399bec9bbdd4051141ff59f46113858e55ebb0294f8a436b919af47a3a |
#!/usr/bin/env python
"""
Created on Mar 5, 2012
"""
from __future__ import division
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyue@mit.edu"
__date__ = "Mar 5, 2012"
import unittest
import os
from nose.e... | migueldiascosta/pymatgen-db | matgendb/alchemy/tests/test_transmuters.py | Python | mit | 2,518 | [
"pymatgen"
] | 8a422576f0d4819e3edad1627623e3807277e8b5394568d8f1ffd2618ccb8a55 |
# encoding: utf8
import re
from random import *
from collections import Counter
from pprint import pprint
from heapq import nlargest
# -> http://blog.echen.me/2011/08/22/introduction-to-latent-dirichlet-allocation/
# https://tedunderwood.com/2012/04/07/topic-modeling-made-just-simple-enough/
documents = [
# space
"W... | mobarski/sandbox | topic/lda/lda2v2.py | Python | mit | 5,375 | [
"COLUMBUS"
] | 98098c5317f89fc7cf5d9df58e9f434a07b27393acf9658636c940bffe75918c |
#!/usr/bin/env python
"check build configuration"
#
# Copyright (C) 2010-2021 ABINIT Group (Yann Pouillon)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#
# FIXME: detect duplicate definitions
... | abinit/abinit | abichecks/scripts/check-build-config.py | Python | gpl-3.0 | 6,890 | [
"ABINIT"
] | 8e2664ae9c5bb696d67321ab9b806a4e599868fac5938a3009a578159ebb5e45 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import math
import itertools
from six.moves import map, zip
import numpy as np
from numpy.linalg import inv
from numpy import pi, dot, transpose, radians
fro... | nisse3000/pymatgen | pymatgen/core/lattice.py | Python | mit | 40,249 | [
"ABINIT",
"CRYSTAL",
"pymatgen"
] | cd76f4f390b99ba68a84fcb94308260a59eb03d62a6c147a4372db15ac34e0b1 |
try:
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
from tastypie import authorization
from tastypie.authentication import MultiAuthentication
from crits.exploits.exploit import Exploit
from crits.exploits.handlers import add_new_exploit
from crits.core.api imp... | Magicked/crits | crits/exploits/api.py | Python | mit | 3,699 | [
"Amber"
] | 4fd97dfca552e1d0be464eafc3d605bd3b2e650ce3dfefb7f7724f1cae4e8bfa |
# running by command
# pymol -cqr this_script.py
from pymol import cmd
import os,glob,re
# working dir of the script, also output dir for prepare_receptor4.py
pdbqt_dir = 'receptors/wt-ensemble'
# relative path from working dir above
reference_structure = "../../structures/NA_2HU4.pdb"
pdb_dir = '../../clustering/WT... | ttdtrang/SlidingBindingBox | scripts/superimpose.py | Python | mit | 865 | [
"PyMOL"
] | 79dd1ca093fe3d2fb7ea457c9da0c055fc25444d16930db90f6417ce3f0d47bd |
#
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2018, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify ... | graalvm/mx | mx_commands.py | Python | gpl-2.0 | 5,748 | [
"VisIt"
] | 7f9e08eda9461c13684e0baa2e10854875617cf72b90664d25cd0b1c67c44b97 |
# encoding=utf-8
__author__ = 'Q-Whai'
'''
DESC: 这是一款曾经很火的游戏——2048
Blog: http://blog.csdn.net/lemon_tree12138
Create Date: 2016/2/24
Last Modify: 2016/3/9
version: 0.0.2
'''
import random
import copy
class Game2048(object):
# --------------------------------- #
# default initial #
# --... | William-Hai/SimpleDemo-python | games/game_2048.py | Python | gpl-3.0 | 7,596 | [
"VisIt"
] | c7adc309463876444257efd0e79975232509a68d71515ab87f95f3a1e7b0d02a |
from __future__ import absolute_import
from datetime import timedelta
from django.http import HttpResponse
from django.test import TestCase
from django.test.client import RequestFactory
from django.contrib.auth.models import AnonymousUser
from django.contrib.auth import get_user_model
from django.contrib.sessions.bac... | mixcloud/django-experiments | experiments/tests/test_webuser.py | Python | mit | 15,124 | [
"Brian",
"VisIt"
] | 3a9da747c0df256573daa2d29e585be32323b1a9342225f47db8a6db2081f8a2 |
# Copyright (c) 2010 Robert L. Campbell
# @mmagnus this is not my code
# taken from http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/list_hbonds.py
from pymol import cmd
def list_hbonds(selection,selection2=None,cutoff=3.2,angle=45,mode=1,hb_list_name='hbonds'):
"""
USAGE
list_hb selection, [selection2 (def... | m4rx9/rna-pdb-tools | rna_tools/tools/rna_calc_hbonds/pymol_list_hbonds.py | Python | mit | 1,911 | [
"PyMOL"
] | 2aa29aecf061a833b40ddc117de51b06466fe168392295a277c243c35766a81b |
#########################################################################
## Copyright (C) 2015 Zong-han, Xie <icbm0926@gmail.com>.
## All rights reserved.
##
## You may use this file under the terms of the BSD license as follows:
##
## Redistribution and use in source and binary forms, with or without
## modification,... | xingularity/OpenLCDFDM | setup.py | Python | bsd-3-clause | 3,308 | [
"CRYSTAL"
] | 14e593e636d7c26f20d7627b2f59730dee70515c7a0dbefd34d2786d0394cb37 |
#!/usr/bin/env python
"""
Restart DIRAC component using runsvctrl utility
"""
from DIRAC.Core.Base.Script import Script
@Script()
def main():
Script.disableCS()
# Registering arguments will automatically add their description to the help menu
Script.registerArgument(
" System: Name of the system ... | DIRACGrid/DIRAC | src/DIRAC/FrameworkSystem/scripts/dirac_restart_component.py | Python | gpl-3.0 | 1,275 | [
"DIRAC"
] | 53514f30762124fd314337cdf3c4ac8735da981fa5a9a9c084ecd643b2523ae9 |
import numpy
import pandas
import utility.getdata as ut
import math
from utility.constants import Constants
from numpy.random import RandomState
from lxml import etree
class SynthSignals:
def __init__(self, frequency=1e6, synthetic_signals=None, data_path='signals/test.txt'):
if isinstance(frequency, floa... | gergopokol/renate-od | observation/noise.py | Python | lgpl-3.0 | 26,011 | [
"Gaussian"
] | 977f437edcf2460eec0c6262b3597ed6818945c89b05e2ffc0e8afb576033702 |
import copy
import signal
import itertools
from sympy.logic import POSform
import sympy
import pyeda.inter as pyEDA
from shatter import float_input_helper as helper
from shatter.machine_learning.labeled_data import from_dict_to_data_frame
from shatter.constants import *
def add_empty_columns(df, variables):
for... | jisazaTappsi/shatter | shatter/float_input.py | Python | mit | 11,608 | [
"ESPResSo"
] | e1d846a720fcbd4edb24265cfe0127efea7afc3ece2f9fdb23255e09e443a8b2 |
"""
Just a selector for X509Certificate
"""
from pkgutil import extend_path
#####
# SUPER DISGUSTING HACK
# We define these variables, and then remove them immediately.
# it is to allow something like 'from DIRAC.Core.Security import X509Chain'
# But pylint would complain just like that
# I've spent a lot of time try... | DIRACGrid/DIRAC | src/DIRAC/Core/Security/__init__.py | Python | gpl-3.0 | 844 | [
"DIRAC"
] | 858f699621ad34416239b74740efdc0d0229a8a063d5f6e28dc54f4f321da20e |
import os
import time
import numpy as np
from chainer import cuda, Variable, function, FunctionSet, optimizers
from chainer import functions as F
class VAE_YZ_X(FunctionSet):
def __init__(self, **layers):
super(VAE_YZ_X, self).__init__(**layers)
def softplus(self, x):
return F.log(F.exp(x) ... | ruohoruotsi/Wavelet-Tree-Synth | nnet/VAE-RyotaKatoh-chainer/VAE_YZ_X.py | Python | gpl-2.0 | 5,152 | [
"Gaussian"
] | 25fae1d6227cab4ed286b5427a4e8697bf9535edc3e7bca05f247de831496cac |
##
## teem.py: automatically-generated ctypes python wrappers for Teem
## Copyright (C) 2012, 2011, 2010, 2009 University of Chicago
##
## 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 Softwar... | JazzQ/teem-1.11.0-src-v1 | python/ctypes/teem.py | Python | lgpl-2.1 | 438,088 | [
"VTK"
] | f287725c63d3fe555ac9a9e53fa6a2dd718fd4279b42165c48c4f28cc5b381ac |
"""Calculate LBI for a given tree and one or more sets of parameters.
"""
import Bio
import Bio.Phylo
from collections import defaultdict
import json
import numpy as np
from .utils import write_json
def select_nodes_in_season(tree, timepoint, time_window=0.6):
"""Annotate a boolean to each node in the tree if it ... | nextstrain/augur | augur/lbi.py | Python | agpl-3.0 | 5,215 | [
"Biopython"
] | ff024d65ab788b79ba438e6a8ea49d88c3a5a9c7ed55e872877ce2e9341fa3ec |
########################################################################
#
# (C) 2015, Brian Coca <bcoca@ansible.com>
#
# This file is part of Ansible
#
# Ansible 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... | bryceliu/ansible | lib/ansible/galaxy/role.py | Python | gpl-3.0 | 12,340 | [
"Brian",
"Galaxy"
] | 428883059b2bc16eab9c37adac94443db455b6d7b468c7576b9152be8ecd57c4 |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | kdmurray91/scikit-bio | skbio/diversity/tests/test_driver.py | Python | bsd-3-clause | 35,795 | [
"scikit-bio"
] | 806268ec34cb241eee872b1a6b8393b9e8516558a23d72e4aa55f75e3673fc8d |
# -*- coding: utf-8 -*-
# Copyright 2007-2021 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | thomasaarholt/hyperspy | hyperspy/io.py | Python | gpl-3.0 | 32,354 | [
"NetCDF"
] | b2559d2a1cd25c083e1cb5abf3fa90f21ea932657eb3fcfd23cb22541047f5f2 |
#!/usr/bin/env python
from setuptools import setup, find_packages
import re
import os
# There is an issue with building python packages in a shared vagrant directory because of how setuptools works
# in python < 2.7.9. We solve this by deleting the filesystem hardlinking capability during build.
# See: http://stackove... | cimarron-pistoncloud/gitlint | setup.py | Python | mit | 3,073 | [
"VisIt"
] | 0e3a831976c93cff74868f574820b1402c29ada93b20c3a85314275a65d70ba8 |
# Copyright 2020 The TensorFlow 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 applica... | cxxgtxy/tensorflow | tensorflow/compiler/mlir/tfr/python/tfr_gen.py | Python | apache-2.0 | 52,880 | [
"VisIt"
] | 220bef92bb0b330f841c110461c8457cd868e60ddceccc29c9486cc1d1d2a5b0 |
""" This is a test of the AuthServer. Requires authlib, pyjwt, dominate
It supposes that the AuthDB is present and installed in DIRAC
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest
from mock import MagicMock
from DIRAC.Core.Utilities.... | ic-hep/DIRAC | tests/Integration/Framework/Test_AuthServer.py | Python | gpl-3.0 | 3,554 | [
"DIRAC"
] | 3067196cca100a2c20b9c336ee507dabd79384c11a151f9c9ba0f85a0ef9b632 |
#A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* Copyright (c) Schrodinger, LLC.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove this copyright notice.
#F* ------... | gratefulfrog/lib | python/pymol/cmd.py | Python | gpl-2.0 | 11,986 | [
"ChemPy",
"PyMOL"
] | 809d3227f88d3c994ba22352ea58e5c1c38c7b3b10f3b75484a87ded494369d8 |
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import requests
import json
import time
from random import randint
import pandas as pd
import os.path
import sys
import codecs
import numpy as np
import re
import urllib2
print sys.stdout.encoding
class GoogleTrendCr... | clauwag/WikipediaGenderInequality | src/GoogleTrendCrawlerJSON.py | Python | mit | 7,247 | [
"VisIt"
] | 8a7c25f2f1c5063fe5938c1b3fbd135aa8eeba83eedb75d89a1c96f5a90fe090 |
import pickle
import numpy as np
from numpy.testing import assert_array_almost_equal
from sklearn.neighbors.ball_tree import (BallTree, NeighborsHeap,
simultaneous_sort, kernel_norm,
nodeheap_sort, DTYPE, ITYPE)
from sklearn.neighbors.dis... | BiaDarkia/scikit-learn | sklearn/neighbors/tests/test_ball_tree.py | Python | bsd-3-clause | 10,219 | [
"Gaussian"
] | ad7f00c3dd97b6fdefa5611f115659200f600b72935f3c00d772913356175252 |
import json
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from keystoneclient.exceptions import Conflict
from horizon import exceptions
from horizon import form... | Crystal-SDS/dashboard | crystal_dashboard/dashboards/crystal/policies/policies/tables.py | Python | gpl-3.0 | 12,414 | [
"CRYSTAL"
] | 1687c240f5c396136b5ffc335164e3e3a52c446cfd0681250bab3f91500e3cd2 |
"""Forest of trees-based ensemble methods
Those methods include random forests and extremely randomized trees.
The module structure is the following:
- The ``BaseForest`` base class implements a common ``fit`` method for all
the estimators in the module. The ``fit`` method of the base ``Forest``
class calls the ... | mehdidc/scikit-learn | sklearn/ensemble/forest.py | Python | bsd-3-clause | 59,215 | [
"Brian"
] | df7d5fc2d4547d3a6cf3925f4fac0eaee895f2ac4d209743b23a761cb2cd07b7 |
"""
This module provides a way to pass information between passes as metadata.
* add attaches a metadata to a node
* get retrieves all metadata from a particular class attached to a node
"""
from ast import AST # so that metadata are walkable as regular ast nodes
class Metadata(AST):
""" Base class to add inf... | pbrunet/pythran | pythran/metadata.py | Python | bsd-3-clause | 1,612 | [
"VisIt"
] | 0452ad376c60fec9fd6e0a73eb28c1222d3edef316e4fff00ca49526fd4eca7f |
# http://www.uniprot.org/faq/28
"""This serves just the download of files.
Parsing can be done using Biopython:
from Bio import SeqIO
uniprot_entry = SeqIO.read(open("uniprot_files/A8Z556.xml"), "uniprot-xml")
"""
import os
import urllib.request
from restapi import RESTAPI
class UniprotRESTAPI(RESTAPI):
def... | konrad/kufpybio | kufpybio/uniprotrestapi.py | Python | isc | 804 | [
"Biopython"
] | b91c3880480f462896e94d8d333504a27c2b74348a7ddc6f0ec375175d3a0631 |
from __future__ import division
import numpy as np
from base import optics as o
from base.data import rad2deg
from base import cones as cones
# emmetrop imports:
from emmetrop.analysis import Information as info
from emmetrop.eye.eyeModel import traceEye
from emmetrop.eye.movement import brownian_motion
from emmetrop... | bps10/emmetrop | emmetrop/analysis/NeitzModel.py | Python | mit | 8,635 | [
"Gaussian"
] | 820551cbe40d3090c9b1c362aec8cd4646de4f5222804cd6fbf8ea5d82cd66b9 |
#
#@BEGIN LICENSE
#
# PSI4: an ab initio quantum chemistry software package
#
# 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 ver... | spring01/libPSI | src/lib/libfunctional/matlab/mfiles/expei.py | Python | gpl-2.0 | 2,542 | [
"Psi4"
] | 77c984de14e395fb81fbbdaa1d79051155007b87433425b03822d296b1733cea |
# Copyright 2009 by Bartek Wilczynski. All rights reserved.
# Revisions copyright 2009 by Peter Cock.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Motif command line tool wrappers."""
from _Ali... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/Motif/Applications/__init__.py | Python | gpl-2.0 | 397 | [
"Biopython"
] | 5f4df9a4d541d635ca6b497530882154fcadd661f1986993c1bae7749f01c135 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | skosukhin/spack | var/spack/repos/builtin/packages/r-alsace/package.py | Python | lgpl-2.1 | 2,082 | [
"Bioconductor"
] | 3ada53040424403dc1d16a3ca600fd6738bce4b3c360fba58a1c616cd57189e2 |
# Lint as: python3
# 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 ... | tensorflow/probability | spinoffs/inference_gym/inference_gym/targets/logistic_regression.py | Python | apache-2.0 | 5,853 | [
"Gaussian"
] | a39a83d1cdd6d857230d388d5f4c951e88232f9ae1b5f49fd8075a61d752ad5c |
from ase import Atoms
from ase.structure import molecule
from ase.parallel import paropen
from gpaw import GPAW, Mixer, MixerDif
from gpaw.utilities.tools import split_formula
cell = [14.4, 14.4, 14.4]
data = paropen('data.txt', 'a')
##Reference from J. Chem. Phys. Vol 120 No. 15, 15 April 2004, page 6898
tpss_de = [... | robwarm/gpaw-symm | gpaw/test/big/tpss/tpss.py | Python | gpl-3.0 | 3,276 | [
"ASE",
"GPAW"
] | c41f43e6cd8744a4d367dff3a02777a23d3ebe4f9617238b607b28301701c2f3 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import datetime
import json
import os
import pytz
import re
import six
import time
from datetime import timedelta
from decimal import Decimal
from django.conf import settings
from django.core import mail
from django.core.... | pulilab/rapidpro | temba/flows/tests.py | Python | agpl-3.0 | 350,752 | [
"VisIt"
] | 3a5cfa2fa1321be671c91597d6ec7b00561a261a5f0b967b9c553485693fccec |
import datetime
from django.core.management.base import NoArgsCommand
from django.core.urlresolvers import reverse
from django.db import connection
from django.db.models import Q, F
from askbot.models import User, Post, PostRevision, Thread
from askbot.models import Activity, EmailFeedSetting
from django.utils.translat... | afdelgado/askbot | askbot/management/commands/send_email_alerts.py | Python | gpl-3.0 | 21,929 | [
"VisIt"
] | d2f6a40533a0c6dfc59b5c188c1fb95b82cc8ceb07cd2d45d793e9cd11d98b0b |
# Copyright 2016 Uri Laserson
#
# 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 to in writing,... | lasersonlab/pepsyn | pepsyn/cli.py | Python | apache-2.0 | 27,148 | [
"Amber",
"Biopython"
] | 74967a5e27a96e02a4bcd86fd72be48906e779644a32d3056afb4db335e02f0d |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2012 Michal Kalewski <mkalewski at cs.put.poznan.pl>
#
# This file is a part of the Simple Network Simulator (sim2net) project.
# USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO
# THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD H... | mkalewski/sim2net | sim2net/area/_area.py | Python | mit | 3,697 | [
"VisIt"
] | fa9baadb0dda94111252d30f2f8105d4af9aee3aa1df64c1695c19d7e9985af9 |
import numpy as np
import multiprocessing as mp
import os
from .parameter import ModelParameters
from .cem_function import posterior_function
def one_chain(args):
'''
This function is testing the startpoint of an MCMC chain and tries to find parameter values for which Chempy does not return -inf
'''
seed,a,start... | jan-rybizki/Chempy | Chempy/optimization.py | Python | mit | 4,496 | [
"ChemPy"
] | 90a6acb969abc008154f9be83cbcc9f1038585d176af39f61cbaaa1ec2c71604 |
import numpy as np
from ase import Atoms
from ase.data.molecules import molecule
from gpaw import GPAW
L = 3.0 + 2 * 4.0
d = np.linspace(3.0, 5.5, 11)
for symbol in ['Ar', 'Kr']:
dimer = Atoms([symbol, symbol],
[(0, 0, 0), (1, 1, 1)],
cell=(L, L, L))
dimer.center()
calc ... | qsnake/gpaw | gpaw/test/big/vdw/dimers.py | Python | gpl-3.0 | 1,139 | [
"ASE",
"GPAW"
] | 8050136b883da32040195a163275a879ef7c309bad5494465ea82f679e730ac8 |
import numpy as np
from ase.calculators.calculator import Calculator, all_properties
class SinglePointCalculator(Calculator):
"""Special calculator for a single configuration.
Used to remember the energy, force and stress for a given
configuration. If the positions, atomic numbers, unit cell, or
bo... | suttond/MODOI | ase/calculators/singlepoint.py | Python | lgpl-3.0 | 5,802 | [
"ASE"
] | e898c1f6c75810fe25583d62d8a5855bbcb6b2bc40ea4d6a625edcbac36c9ec2 |
#!/usr/bin/env python
# flake8: noqa
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015 Leandro Toledo de Souza <leandrotoeldodesouza@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as publ... | vsilent/python-telegram-bot | telegram/emoji.py | Python | gpl-3.0 | 37,075 | [
"Octopus"
] | 07ba5eb3bcc1afeaef3832ab49c629df18a81b2dbe59819c7cb7b6583aa6c5f1 |
import compass_cal
reload(compass_cal)
fn="../../../../../ct_river/data/2014-05/tioga_winch/freebird/20140514/compass-0x5002930054E40942-20140514T0643.dat.npz"
cf=compass_cal.CalibrationFit(fn)
cf.fit()
cf.write_cal('compass.cal',overwrite=True)
samples=cf.raw_data['samples']
figure(1).clf()
plot(samples[:,0]... | rustychris/freebird | software/freebird/test_ellipse_fit.py | Python | gpl-2.0 | 1,532 | [
"Mayavi"
] | aa8ddaebf69c4a4b1ef1a03f898a8b72dc293081755a9ed9ab7c1702730b2b21 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt5 import QtGui, QtCore, QtSvg
from LicenceDialog import Licence
from Tools import UsefulTools
from PyQt5.QtWidgets import *
class About(QDialog):
def __init__(self, parent=None):
super(About, self).__init__(parent)
self.resize(550, 385)
... | gaining/Resetter | Resetter/usr/lib/resetter/AboutPage.py | Python | gpl-3.0 | 3,177 | [
"VisIt"
] | a286d221d3b1e0d01bdd2592096bc0a18d071c454e799f618ffa8a48e534f6bb |
from __future__ import print_function
import unittest as ut
import numpy as np
from numpy.random import random, seed
import espressomd
import math
@ut.skipIf(not espressomd.has_features(["MASS",
"PARTICLE_ANISOTROPY",
"ROTATIONAL_INERTIA"... | KonradBreitsprecher/espresso | testsuite/mass-and-rinertia_per_particle.py | Python | gpl-3.0 | 16,194 | [
"ESPResSo"
] | 1c8235c357a323244ed30e587f3092400b8a2e5659581e8867c844cf1be812da |
# -*- coding: utf-8 -*-
"""
When lammps.data file was generated using msi2lmp.exe from MS-car/mdf with ClayFF, there are many redundant
bonds/angles/dihedrals/impropers etc, ususlly tens of thousands. This code is used to remove those connections.
"""
# hyper parameter
bondRemain = [4]
angleRemain = [8]
dir... | riddlezyc/geolab | src/io/removeRedundantTopo.py | Python | gpl-3.0 | 4,626 | [
"LAMMPS"
] | 5c104f0eafeaec35855ca18b4269d06a0ebf97ff9c06be02589529b5c77a68e6 |
#!/usr/bin/env python
import vtk
def main():
font_size = 24
# Create the text mappers and the associated Actor2Ds.
# The font and text properties (except justification) are the same for
# each single line mapper. Let's create a common text property object
singleLineTextProp = vtk.vtkTextProperty... | lorensen/VTKExamples | src/Python/Annotation/MultiLineText.py | Python | apache-2.0 | 7,461 | [
"VTK"
] | a26c943b934f997027faa5329ffb507a92adf565a1a378e7b18a74894fed1e12 |
"""
FROWNS LICENSE
Copyright (c) 2001-2003, Brian Kelley
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of... | ubccr/pinky | pinky/canonicalization/disambiguate.py | Python | bsd-2-clause | 9,269 | [
"Brian"
] | 6a4138c07edb03271fc86c990e69e244fdf4469c0643288e30e1eb0558539126 |
# -*- coding: utf-8 -*-
import copy
import json
import os
from datetime import datetime, timedelta
from django.conf import settings
from django.core import mail
import mock
import pytest
from waffle.testutils import override_switch
from olympia import amo
from olympia.access.models import Group, GroupUser
from oly... | wagnerand/olympia | src/olympia/activity/tests/test_utils.py | Python | bsd-3-clause | 34,509 | [
"VisIt"
] | 42a33ca2d4591ae967277a16b3e03da416f404bd8940625c9228897c417f16a1 |
"""
Acceptance tests for studio related to the outline page.
"""
import json
from datetime import datetime, timedelta
import itertools
from pytz import UTC
from bok_choy.promise import EmptyPromise
from nose.plugins.attrib import attr
from ...pages.studio.settings_advanced import AdvancedSettingsPage
from ...pages.stu... | martynovp/edx-platform | common/test/acceptance/tests/studio/test_studio_outline.py | Python | agpl-3.0 | 79,177 | [
"VisIt"
] | c3654e76f600d4427dd8611a9502b99a2394f877a7dabb5bc142a98ab8ac2530 |
"""Visual search using features from visual system and ocular motion."""
import os
from math import hypot
import logging
import argparse
import numpy as np
import cv2
from collections import namedtuple, OrderedDict
from lumos.context import Context
from lumos.input import InputRunner
from lumos import rpc
from lumos.... | napratin/nap | nap/agent/visual_search.py | Python | mit | 25,915 | [
"NEURON"
] | c350849a2525bba26c1509033e5b772b9756681de09ac912e0990069418fc036 |
from __future__ import absolute_import
import copy
import cython
cython.declare(PyrexTypes=object, Naming=object, ExprNodes=object, Nodes=object,
Options=object, UtilNodes=object, LetNode=object,
LetRefNode=object, TreeFragment=object, EncodedString=object,
error=object, w... | bdh1011/wau | venv/lib/python2.7/site-packages/Cython/Compiler/ParseTreeTransforms.py | Python | mit | 117,833 | [
"VisIt"
] | 255425cf9e7c4cddd5829fe3eacec3ead420c1f3187627dff207bfb50f540a1e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.