repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
rcatwood/Savu | savu/test/jenkins/plugin_tests/loader_tests/i18_xrd_loader_test.py | 1 | 1404 | # Copyright 2014 Diamond Light Source Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | gpl-3.0 | -1,597,061,129,882,492,400 | 35 | 96 | 0.701567 | false |
aglitke/vdsm | vdsm/storage/image.py | 1 | 51140 | #
# Copyright 2009-2012 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-2.0 | 51,019,312,970,338,880 | 42.523404 | 79 | 0.557841 | false |
Jumpscale/jumpscale_core8 | lib/JumpScale/clients/graphite/GraphiteClient.py | 1 | 1317 |
from JumpScale import j
import socket
import time
# import urllib.request, urllib.parse, urllib.error
try:
import urllib.request
import urllib.parse
import urllib.error
except:
import urllib.parse as urllib
class GraphiteClient:
def __init__(self):
self.__jslocation__ = "j.clients.grap... | apache-2.0 | 1,251,291,274,446,699,500 | 24.823529 | 79 | 0.557327 | false |
fidals/refarm-site | catalog/models_operations.py | 1 | 4426 | import abc
import typing
from django.db.migrations.operations.base import Operation
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
# @todo #283:30m Group models.py, models_operations.py, models_expressions.py into the module.
class IndexSQL(abc.ABC):
def __init__(self, name: str):
... | mit | -4,237,920,755,846,553,000 | 31.970149 | 94 | 0.613173 | false |
LiberatorUSA/GUCEF | dependencies/curl/tests/python_dependencies/impacket/smb.py | 1 | 151624 | # Copyright (c) 2003-2016 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Copyright (C) 2001 Michael Teo <michaelteo@bigfoot.com>
# smb.py - SMB/CIFS library
#
# This software... | apache-2.0 | 3,336,921,338,414,145,000 | 35.990485 | 215 | 0.553244 | false |
southpaw94/MachineLearning | HPTuning/SVM_X_Validation.py | 1 | 1287 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
from sklearn.cross_validation import train_test_split
from sklearn.cross_validation import cross_val_score
from sklearn.grid_search import GridSearchCV
from sklearn.tree import DecisionTreeClassifier
#... | gpl-2.0 | 6,369,555,869,987,812,000 | 30.390244 | 78 | 0.656566 | false |
cloudbase/coriolis | coriolis/api/__init__.py | 1 | 5046 | # Copyright (c) 2013 OpenStack Foundation
#
# 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
#
# Unles... | agpl-3.0 | 3,846,645,010,667,522,000 | 35.832117 | 78 | 0.596512 | false |
NICTA/revrand | tests/test_btypes.py | 1 | 1393 | """Test revrand's bound and parameter types."""
from __future__ import division
import numpy as np
from scipy.stats import gamma
from revrand import Bound, Positive, Parameter
def test_bound():
b = Bound(1, 2)
assert b.lower == 1
assert b.upper == 2
assert b.check(1) is True
assert b.check(3)... | apache-2.0 | 2,096,992,696,473,579,300 | 21.467742 | 55 | 0.601579 | false |
Aravinthu/odoo | addons/website/models/ir_http.py | 1 | 10023 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import traceback
import os
import unittest
import werkzeug
import werkzeug.routing
import werkzeug.utils
import odoo
from odoo import api, models
from odoo import SUPERUSER_ID
from odoo.http import reque... | agpl-3.0 | 8,303,738,624,251,257,000 | 37.255725 | 134 | 0.583458 | false |
atty303/pyfilesystem | fs/commands/fsinfo.py | 1 | 3443 | #!/usr/bin/env python
from fs.errors import ResourceNotFoundError
from fs.opener import opener
from fs.commands.runner import Command
import sys
from datetime import datetime
class FSInfo(Command):
usage = """fsinfo [OPTION]... [PATH]
Display information regarding an FS resource"""
def get_optpars... | bsd-3-clause | 9,063,598,042,925,267,000 | 40 | 105 | 0.448446 | false |
fnaum/rez | src/rez/cli/complete.py | 1 | 3476 | """
Prints package completion strings.
"""
from __future__ import print_function
import argparse
__doc__ = argparse.SUPPRESS
def setup_parser(parser, completions=False):
pass
def command(opts, parser, extra_arg_groups=None):
from rez.cli._util import subcommands
import os
import re
# get com... | lgpl-3.0 | 7,186,320,333,218,014,000 | 29.226087 | 79 | 0.609033 | false |
amoskong/scylla-cluster-tests | sdcm/utils/common.py | 1 | 48757 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | agpl-3.0 | -6,150,648,137,884,515,000 | 35.250558 | 210 | 0.595996 | false |
racker/scrivener | scrivener/tests/test_server.py | 1 | 1777 | # Copyright 2012 Rackspace Hosting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | -3,906,171,968,325,228,500 | 30.732143 | 74 | 0.736072 | false |
MendeleievBros/Mendeleiev-Bros | mendeleiev_bros/escena_niveles.py | 1 | 4374 | # -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class Elemento(pilas.actores.Texto):
def __init__(self, texto='', x... | gpl-3.0 | -6,599,656,830,202,659,000 | 41.427184 | 78 | 0.61762 | false |
eranroz/dnase | src/data_provider/dataDownloader.py | 1 | 18314 | """'
Script for download and installation of data and required programs
Some functions requires rsync
@see {transformWig} - another script for transformations
''"""
import argparse
import ftplib
from multiprocessing import Pool
import os
import urllib
import time
from config import DATA_DIR, BIN_DIR, OTHER_DATA, SI... | mit | -2,990,876,278,321,959,400 | 43.024038 | 120 | 0.598395 | false |
linkslice/graphite-tools | codahale_metrics.py | 1 | 7854 | #!/usr/bin/env python
#####################################################
## Parse codahale/yammer/dropwizard JSON metrics ##
## put the tuples into a list, ##
## pickle the list and dump it into the graphite ##
## pickle port ##
##########################... | mit | 7,965,960,671,044,199,000 | 38.467337 | 136 | 0.536542 | false |
MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/mobile/channels.py | 1 | 7457 | #!/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... | gpl-2.0 | 5,791,372,461,891,725,000 | 37.637306 | 247 | 0.617541 | false |
commonslabgr/donation-box-pi | donation-box/DonationServer.py | 1 | 16989 | #!/usr/bin/python
####################################################
# Name: Donation Box WebSockets deamon
#
# Description:
# Provides the WebSockets Server which polls data from the DB, notifies any connected clients (browsers)
# and accepts messages (donations) from clients that then writes to the DB
#
# Author: D... | gpl-3.0 | -4,253,610,225,365,085,700 | 31.421756 | 243 | 0.6825 | false |
lgarren/spack | lib/spack/spack/test/spec_semantics.py | 1 | 27062 | ##############################################################################
# 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... | lgpl-2.1 | 2,349,253,275,245,285,000 | 36.481994 | 78 | 0.601027 | false |
rl-institut/appBBB | appBBB/results_evaluation.py | 1 | 32709 | from os.path import expanduser
import csv
import pandas as pd
import matplotlib.pyplot as plt
from oemof.core import energy_system as es
from oemof.solph.predefined_objectives import minimize_cost
from oemof.outputlib import to_pandas as tpd
from oemof import db
import helper_BBB as hlsb
def create_es(solver, timeste... | gpl-3.0 | -4,810,676,121,799,167,000 | 39.734745 | 79 | 0.504234 | false |
team-vigir/vigir_behaviors | vigir_flexbe_states/src/vigir_flexbe_states/footstep_plan_relative_state.py | 1 | 4234 | #!/usr/bin/env python
import rospy
import math
import actionlib
from flexbe_core import EventState, Logger
from flexbe_core.proxy import ProxyActionClient
from vigir_footstep_planning_msgs.msg import *
from std_msgs.msg import String, Header
'''
Created on 02/24/2015
@author: Philipp Schillinger and Spyros Maniato... | bsd-3-clause | -8,746,519,600,787,208,000 | 33.422764 | 117 | 0.730279 | false |
IMDProjects/ServiceManager | ServiceManager.py | 1 | 3754 | #-------------------------------------------------------------------------------
# ServiceManager.py
#
# Purpose: Creates, updates, deletes services in ArcGIS Online
#
#
# Prerequisites/Inputs:
# TokenManager: authentication token for NPS ArcGIS Online
# ServiceConfiguration: service configuration st... | mit | 5,012,614,175,353,012,000 | 36.919192 | 176 | 0.644113 | false |
tangentlabs/django-fancypages | fancypages/contrib/oscar_fancypages/abstract_models.py | 1 | 2983 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from ...models import ContentBlock
class AbstractSingleProductBlock(ContentBlock):
name = _("Single Product")
code = 'single-product'
group = _("Catalogue")
template_name = "fancypages/blocks/... | bsd-3-clause | -2,053,354,243,874,709,800 | 28.83 | 75 | 0.65404 | false |
cpcloud/ibis | ibis/impala/tests/test_exprs.py | 1 | 52316 | import unittest
from decimal import Decimal
from io import StringIO
import pandas as pd
import pandas.util.testing as tm
import pytest
import ibis
import ibis.expr.api as api
import ibis.expr.types as ir
from ibis import literal as L
from ibis.common.exceptions import RelationError
from ibis.expr.datatypes import Cat... | apache-2.0 | 8,254,318,533,257,342,000 | 28.129176 | 94 | 0.512291 | false |
palpen/wage_calculator | calculate_hours.py | 1 | 2217 |
import re
import argparse
def wage_calculator(log_txt_file, month, year, wage):
date_pattern = "\*\*Date\*\*" # pattern identifying the date in the file
hours_full = []
with log_txt_file as f:
for line in log_txt_file:
if re.search(r"{0}".format(date_pattern), line): # go to the... | mit | 1,043,829,032,182,839,900 | 32.089552 | 114 | 0.483085 | false |
kovidgoyal/build-calibre | scripts/pkgs/pyqt.py | 1 | 1772 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import (unicode_literals, division, absolute_import,
print_function)
import os
from .constants import PYTHON, MAKEOPTS, build_dir, PREFIX, isosx, iswindows
fr... | gpl-3.0 | -6,079,356,304,098,510,000 | 39.272727 | 137 | 0.603273 | false |
Bl4ckb0ne/ring-api | ring_api/server/flask/api/certificate.py | 1 | 2365 | #
# Copyright (C) 2016 Savoir-faire Linux Inc
#
# Authors: Seva Ivanov <seva.ivanov@savoirfairelinux.com>
# Simon Zeni <simon.zeni@savoirfairelinux.com>
#
# 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 ... | gpl-3.0 | -8,790,291,132,487,526,000 | 29.320513 | 80 | 0.587738 | false |
AntonioMtn/NZBMegaSearch | werkzeug/contrib/testtools.py | 1 | 2435 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.testtools
~~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements extended wrappers for simplified testing.
`TestResponse`
A response wrapper which adds various cached attributes for
simplified assertions on various content types.
:copyright:... | gpl-2.0 | -8,992,439,196,236,989,000 | 33.295775 | 76 | 0.614374 | false |
phako/Totem | src/plugins/iplayer/iplayer.py | 1 | 10459 | # -*- coding: utf-8 -*-
import gettext
from gi.repository import GObject, Peas, Totem # pylint: disable-msg=E0611
import iplayer2
import threading
gettext.textdomain ("totem")
D_ = gettext.dgettext
_ = gettext.gettext
class IplayerPlugin (GObject.Object, Peas.Activatable):
__gtype_name__ = 'IplayerPlugin'
... | gpl-2.0 | 8,621,740,412,142,376,000 | 38.296992 | 80 | 0.568736 | false |
NERC-CEH/ecomaps | ecomaps/services/analysis.py | 1 | 11358 | import datetime
from random import randint
from sqlalchemy.orm import subqueryload, subqueryload_all, aliased, contains_eager, joinedload
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.sql import Alias, or_, asc, desc
from ecomaps.model import Dataset, Analysis, AnalysisCoverageDatasetColumn
from ecomaps.... | gpl-2.0 | 3,181,348,859,315,533,300 | 39.137809 | 118 | 0.558549 | false |
kamimura/py-convert-temperatures | converter.py | 1 | 1936 | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
# added a new temperature scale, two if statements need to add
def convert_to_celsius(t, source):
if source == "Kelvin":
return t - 273.15
elif source == "Celsius":
return t
elif source == "Fahrenheit":
return (t - 32) * 5 / 9
elif ... | mit | 1,126,159,050,346,238,600 | 30.737705 | 100 | 0.558884 | false |
dubourg/openturns | python/test/t_Gumbel_std.py | 1 | 5074 | #! /usr/bin/env python
from __future__ import print_function
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# Instanciate one distribution object
distribution = Gumbel(2.0, -0.5)
print("Distribution ", repr(distribution))
print("Distribution ", distribution)
# Is this dis... | gpl-3.0 | -9,043,513,947,748,732,000 | 41.283333 | 116 | 0.665353 | false |
3dfxsoftware/cbss-addons | account_bank_statement_vauxoo/model/account_journal.py | 1 | 5195 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# "Nhomar Hernandez <nhomar@vauxoo.com>"
#
# This program is free software: you ca... | gpl-2.0 | 8,968,663,386,985,846,000 | 44.156522 | 119 | 0.536491 | false |
Kaftanov/Cchat | chat-server/server.py | 1 | 7250 | #!/usr/bin/env python3
"""
#############################
Server application || TCP, socket
version python: python3
#############################
"""
import select
import signal
import socket
import sys
import uuid
import datetime
from communication import send, receive
from messages import Mess... | gpl-3.0 | -5,659,754,009,381,891,000 | 36.371134 | 96 | 0.495448 | false |
kcolletripp/popular | search/views.py | 1 | 1297 | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect, HttpResponse
from django.views import generic
from .models import Target
from .forms import TargetForm
import utils
# Create your views here.
#class IndexView(generic.ListView):
# template_name = 'search/index.html... | gpl-3.0 | 1,606,601,490,411,531,800 | 31.425 | 80 | 0.680031 | false |
yastrov/battleship | battleship/serverfactory.py | 1 | 1999 | # coding=utf-8
"""
This factory creates BattleshipProtocol() instances for every
connected users. If number of connected users reach the value max_clients then this factory creates instance
of ErrorBattleshipProtocol() for new users.
Also this class, on own initialization, creates instance of the... | apache-2.0 | 6,821,497,901,575,590,000 | 34.381818 | 112 | 0.646823 | false |
marshallmcdonnell/journals | journals/databases/icat/sns/icat.py | 1 | 8206 | #!/usr/bin/env python
#import flask
from __future__ import print_function
import requests
import xmljson
import json
import lxml
import decimal
import pandas
from journals.utilities import process_numbers
#uri = "http://icat.sns.gov:2080/icat-rest-ws/experiment/SNS"
#uri = "http://icat.sns.gov:2080/icat-rest-ws/exp... | mit | 5,587,422,821,829,324,000 | 33.334728 | 111 | 0.530466 | false |
RyanWangGit/HandySearch | scraper/scraper/exporters.py | 1 | 1245 | """
Item Exporters are used to export/serialize items into sqlite3 database.
"""
from scrapy.exporters import BaseItemExporter
import sqlite3
class SqliteWebpageExporter(BaseItemExporter):
def __init__(self, file, **kwargs):
super().__init__()
self._configure(kwargs)
self.conn = sqlite3.c... | gpl-3.0 | 1,078,980,320,858,903,800 | 37.90625 | 92 | 0.473092 | false |
karesansui/karesansui | bin/stop_network.py | 1 | 3039 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of Karesansui.
#
# Copyright (C) 2012 HDE, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, incl... | mit | 6,552,379,057,524,915,000 | 33.146067 | 91 | 0.678513 | false |
DynamoDS/Coulomb | SessionTools/stacktrace_extractor.py | 1 | 5506 | from __future__ import print_function
import json
import xml.etree.ElementTree as xmlElementTree
import base64
import os
import sys
from os.path import isfile, join
import gzip
import datetime
import random
import traceback
import sys
import features_JSON
import features_XML
VERSION="StackTraces-2018-08-16... | mit | 1,103,576,669,027,327,500 | 31.579882 | 198 | 0.562841 | false |
tomekwojcik/ForgeryPy | tests/test_date.py | 1 | 1148 | # -*- coding: utf-8 -*-
import datetime
from unittest import TestCase
from forgery_py.forgery import date
class DateForgeryTestCase(TestCase):
def test_day_of_week(self):
result = date.day_of_week()
assert result in date.DAYS
result = date.day_of_week(abbr=True)
assert result in... | mit | -7,785,290,931,851,571,000 | 21.98 | 44 | 0.599303 | false |
nasa/39A | spaceapps/locations/forms.py | 1 | 3715 | from django.forms import Form, ModelForm, CharField, ChoiceField
from django.forms.models import (
modelformset_factory,
inlineformset_factory,
BaseInlineFormSet,
)
from django.forms.formsets import formset_factory, BaseFormSet
import selectable.forms as selectable
from awards.models import LocalAwar... | apache-2.0 | -321,959,692,586,215,400 | 25.161972 | 78 | 0.621534 | false |
linsalrob/EdwardsLab | bin/NSF_bibtex_by_year.py | 1 | 1668 | """
Parse a bibtex file and only print those entries within a certain number of years
"""
import os
import sys
import argparse
import datetime
from pybtex.database import parse_file, BibliographyData
if __name__ == "__main__":
now = datetime.datetime.now()
earlyyear = now.year - 4
parser = argparse.Argum... | mit | 4,710,846,875,079,895,000 | 35.26087 | 130 | 0.598321 | false |
izapolsk/integration_tests | cfme/tests/containers/test_reports.py | 1 | 15141 | import re
from traceback import format_exc
import pytest
from wrapanapi.utils import eval_strings
from cfme import test_requirements
from cfme.containers.provider import ContainersProvider
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.wait import TimedOutError
pytestmark = [
py... | gpl-2.0 | -8,170,377,183,069,185,000 | 38.429688 | 98 | 0.625586 | false |
Samurais/sce_deck | usr/send_mail_notifications.py | 1 | 2677 | import smtplib
import time
import sys
import os
print "Usage:python", sys.argv[0], "[recipient](1..n) reports_dir"
print "Example:python", sys.argv[0], " wilson@ex.com jake@ex.com /opt/reports"
# constants
fromaddr = "bpm2clouddecker@gmail.com"
password = '********'
def timestamp():
ISOTIMEFORMAT = "%Y-%m-%d-%X"... | apache-2.0 | -2,456,349,963,366,588,400 | 33.320513 | 87 | 0.595443 | false |
tzicatl/lfs-shipping-ups | shipping_ups/plugin.py | 1 | 2998 | from django.contrib.sites.models import get_current_site
from lfs.cart.utils import get_cart
from lfs.customer.utils import get_customer
from lfs.plugins import ShippingMethodPriceCalculator
from ups.client import UPSClient, UPSError
from ups.model import Package, Address
from .models import UPSConfiguration
class... | bsd-3-clause | -7,931,353,110,327,888,000 | 31.956044 | 87 | 0.588726 | false |
mlperf/training_results_v0.6 | NVIDIA/benchmarks/minigo/implementations/tensorflow/minigo/rl_loop/example_buffer.py | 1 | 12801 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -7,449,819,088,656,408,000 | 35.470085 | 91 | 0.617452 | false |
wanghuok02/iherb | iherb/spiders/iherbspider.py | 1 | 1439 | import scrapy
import logging
from scrapy.spiders import Spider
from scrapy.selector import Selector
from iherb.items import IherbItem
class IherbSpider(Spider):
name = "iherbspider"
allowed_domains = ["iherb.cn"]
max_page = 5
cur_page = 1
start_urls = [
"http://www.iherb.cn/Supplements... | apache-2.0 | -8,967,152,911,173,662,000 | 35.923077 | 122 | 0.542738 | false |
emanuele/jstsp2015 | simulation.py | 1 | 7420 | """Simulation estimating Type I and Type II error of CBT and KTST.
Author: Sandro Vega-Pons, Emanuele Olivetti
"""
import numpy as np
from sklearn.metrics.pairwise import pairwise_distances
from kernel_two_sample_test import MMD2u, compute_null_distribution
from sklearn.svm import SVC
from sklearn.grid_search import ... | mit | -3,438,818,910,070,712,000 | 37.645833 | 171 | 0.592453 | false |
JBed/edx-spark | Lab_3/lab3.py | 1 | 17280 | import re
import datetime
from pyspark.sql import Row
month_map = {'Jan': 1, 'Feb': 2, 'Mar':3, 'Apr':4, 'May':5, 'Jun':6, 'Jul':7,
'Aug':8, 'Sep': 9, 'Oct':10, 'Nov': 11, 'Dec': 12}
def parse_apache_time(s):
""" Convert Apache time format into a Python datetime object
Args:
s (str): date and tim... | apache-2.0 | 6,074,960,403,950,983,000 | 43.766839 | 961 | 0.657697 | false |
azlanismail/prismgames | examples/games/car/networkx/readwrite/gexf.py | 1 | 33475 | """
****
GEXF
****
Read and write graphs in GEXF format.
GEXF (Graph Exchange XML Format) is a language for describing complex
network structures, their associated data and dynamics.
This implementation does not support mixed graphs (directed and
unidirected edges together).
Format
------
GEXF is an XM... | gpl-2.0 | 3,307,386,771,986,776,000 | 34.705044 | 79 | 0.522121 | false |
odoo-argentina/account | l10n_ar_account/models/account_invoice.py | 1 | 12294 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields, api, _
from op... | agpl-3.0 | 2,440,302,413,177,547,000 | 37.898734 | 79 | 0.549219 | false |
Azure/azure-sdk-for-python | sdk/servicebus/azure-servicebus/samples/async_samples/schedule_messages_and_cancellation_async.py | 1 | 2329 | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | mit | -1,515,303,370,977,743,400 | 40.589286 | 109 | 0.682267 | false |
aspilotros/YouTube_views_forecasting | CountingLines3-noplot.py | 1 | 3206 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 15 17:54:35 2017
@author: ale
"""
#sys.stdout.write(frmt_date)
# Counting the number of lines in a file each 5 min
import time
import datetime as dt
import matplotlib.pyplot as plt
import plotly as py
import plotly.graph_objs as go
import numpy as ... | mit | -4,667,322,212,081,878,000 | 22.925373 | 178 | 0.554273 | false |
rdireen/nearside | nearside/cylindrical/structures.py | 1 | 3017 | # Copyright (C) 2015 Randy Direen <nearside@direentech.com>
#
# This file is part of NearSide.
#
# NearSide 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 optio... | gpl-3.0 | -3,671,326,859,326,461,000 | 33.295455 | 79 | 0.526019 | false |
dataversioncontrol/dvc | dvc/state.py | 1 | 16303 | """Manages state database used for checksum caching."""
from __future__ import unicode_literals
import os
import sqlite3
import dvc.logger as logger
from dvc.config import Config
from dvc.utils import file_md5, remove, current_timestamp
from dvc.exceptions import DvcException
from dvc.utils.fs import get_mtime_and_s... | apache-2.0 | -3,852,605,697,348,844,000 | 30.412331 | 79 | 0.532601 | false |
sony/nnabla | python/src/nnabla/backward_function/image_augmentation.py | 1 | 1336 | # Copyright 2019,2020,2021 Sony Corporation.
#
# 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... | apache-2.0 | 1,924,461,627,481,144,800 | 42.096774 | 284 | 0.729042 | false |
RowsberryPi/rowsberrypi | pyrow/statshow.py | 1 | 2273 | #!/usr/bin/env python
#Copyright (c) 2011, Sam Gambrell
#Licensed under the Simplified BSD License.
#This is an example file to show how to make use of pyrow
#Have the rowing machine on and plugged into the computer before starting the program
#The program will display any changes to the machine status, stroke state, ... | bsd-2-clause | -7,115,628,451,162,838,000 | 38.877193 | 100 | 0.636604 | false |
tensorflow/datasets | tensorflow_datasets/text/lm1b.py | 1 | 3711 | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets 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 appl... | apache-2.0 | 4,412,130,310,659,180,000 | 34.009434 | 88 | 0.642684 | false |
sadig/DC2 | components/dc2-admincenter/dc2/admincenter/lib/auth/kerberos.py | 1 | 2306 | # -*- coding: utf-8 -*-
#
# (DC)² - DataCenter Deployment Control
# Copyright (C) 2010, 2011, 2012, 2013, 2014 Stephan Adig <sh@sourcecode.de>
# 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; eit... | gpl-2.0 | -8,005,599,435,126,051,000 | 32.405797 | 79 | 0.708894 | false |
tdhooper/starstoloves | starstoloves/lib/search/tests/test_result.py | 1 | 2284 | import pytest
from starstoloves.lib.track.lastfm_track import LastfmTrack
from ..result import LastfmResultParser
pytestmark = pytest.mark.django_db
@pytest.fixture()
def result_parser(request):
return LastfmResultParser()
class TestResultParser():
many_results = {
'trackmatches': {
... | gpl-2.0 | 778,271,204,807,938,200 | 28.662338 | 86 | 0.549037 | false |
AragurDEV/yowsup | yowsup/layers/protocol_profiles/protocolentities/iq_picture_get_result.py | 1 | 1785 | from .iq_picture import PictureIqProtocolEntity
from yowsup.structs import ProtocolTreeNode
class ResultGetPictureIqProtocolEntity(PictureIqProtocolEntity):
'''
<iq type="result" from="{{jid}}" id="{{id}}">
<picture type="image | preview" id="{{another_id}}">
{{Binary bytes of the picture.}}
... | gpl-3.0 | -5,251,179,448,151,242,000 | 38.666667 | 148 | 0.677871 | false |
Instanssi/Instanssi.org | Instanssi/kompomaatti/admin.py | 1 | 1416 | # -*- coding: utf-8 -*-
from django.contrib import admin
from imagekit.admin import AdminThumbnail
from Instanssi.kompomaatti.models import Compo, Entry, Event, Vote, VoteCodeRequest, Profile, Competition, \
CompetitionParticipation, TicketVoteCode, VoteGroup, EntryCollection
class TicketVoteCodeAdmin(admin.Mode... | mit | -8,645,906,533,803,368,000 | 23.413793 | 108 | 0.680085 | false |
Workday/OpenFrame | tools/perf/benchmarks/start_with_url2.py | 1 | 1913 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from benchmarks import startup2
import page_sets
from telemetry import benchmark
# TODO(gabadie): Replaces start_with_url.* by start_with_url2.* after con... | bsd-3-clause | 5,598,138,598,909,910,000 | 33.160714 | 80 | 0.755358 | false |
dr4ke616/LazyTorrent | twisted/plugins/torrent_plugin.py | 1 | 1555 | from zope.interface import implements
from twisted.python import usage
from twisted.plugin import IPlugin
from twisted.application import internet
from twisted.application.service import IServiceMaker
from mamba.utils import config
from mamba.enterprise import database
from mamba.core.session import Session
from mamb... | gpl-3.0 | 8,606,297,883,575,277,000 | 29.490196 | 70 | 0.748553 | false |
GiulianoFranchetto/zephyr | doc/extensions/zephyr/application.py | 1 | 15282 | # Copyright (c) 2017 Open Source Foundries Limited.
#
# SPDX-License-Identifier: Apache-2.0
'''Sphinx extensions related to managing Zephyr applications.'''
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
# TODO: extend and modify this for Windows.
#... | apache-2.0 | -3,486,946,015,469,314,600 | 36.273171 | 154 | 0.551171 | false |
google-research/open-covid-19-data | src/scripts/locations/generate_iso_3166_1.py | 1 | 7123 | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -6,122,616,209,773,287,000 | 49.460993 | 824 | 0.657625 | false |
LamCiuLoeng/fd | rpac/model/__init__.py | 1 | 2426 | # -*- coding: utf-8 -*-
"""The application's model objects"""
from zope.sqlalchemy import ZopeTransactionExtension
from sqlalchemy.orm import scoped_session, sessionmaker
#from sqlalchemy import MetaData
from sqlalchemy.ext.declarative import declarative_base
# Global session manager: DBSession() returns the Thread-l... | mit | -2,430,196,997,975,855,000 | 34.676471 | 78 | 0.741962 | false |
gtaylor/paypal-python | paypal/interface.py | 1 | 19787 | # coding=utf-8
"""
The end developer will do most of their work with the PayPalInterface class
found in this module. Configuration, querying, and manipulation can all be done
with it.
"""
import types
import logging
from pprint import pformat
import warnings
import requests
from paypal.settings import PayPalConfig
f... | apache-2.0 | -4,156,943,831,509,777,000 | 36.471591 | 114 | 0.598838 | false |
NeCTAR-RC/ceilometer | ceilometer/compute/pollsters/cpu.py | 1 | 4105 | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 eNovance <licensing@enovance.com>
# Copyright © 2012 Red Hat, Inc
#
# Author: Julien Danjou <julien@danjou.info>
# Author: Eoghan Glynn <eglynn@redhat.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance ... | apache-2.0 | -2,454,638,988,634,142,700 | 43.597826 | 75 | 0.574945 | false |
openstack/ironic | ironic/common/context.py | 1 | 1975 | # -*- encoding: utf-8 -*-
#
# 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, so... | apache-2.0 | -8,362,864,803,926,115,000 | 33.051724 | 79 | 0.65519 | false |
openstack/os-win | os_win/tests/unit/test_utils.py | 1 | 14238 | # Copyright 2015 Cloudbase Solutions SRL
#
# 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... | apache-2.0 | -7,459,312,965,330,679,000 | 38.994382 | 79 | 0.599874 | false |
Jimdo/thumbor-logdrain-metrics | vows/metrics_vows.py | 1 | 2062 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
from pyvows import Vows, expect
from thumbor.context import Context... | mit | 3,042,607,727,211,385,000 | 38.653846 | 106 | 0.654704 | false |
MVilstrup/mosquito_1 | mosquito/networking/sink.py | 1 | 1926 | # Task sink
# Binds PULL socket to tcp://localhost:5558
# Collects results from workers via that socket
import zmq
class Sink(object):
def __init__(self,
result_port,
send_port,
break_port="tcp://127.0.0.1:9999"):
context = zmq.Context()
# Sock... | apache-2.0 | 3,985,627,639,154,338,300 | 31.644068 | 64 | 0.59865 | false |
gouzongmei/t1 | src/kimchi/model/vms.py | 1 | 40069 | #
# Project Kimchi
#
# Copyright IBM, Corp. 2014
#
# 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 lib... | lgpl-3.0 | -8,180,474,466,544,877,000 | 39.028971 | 79 | 0.549827 | false |
eppye-bots/bots | bots/botsinit.py | 1 | 15231 | from __future__ import unicode_literals
import sys
if sys.version_info[0] > 2:
basestring = unicode = str
import configparser as ConfigParser
else:
import ConfigParser
import os
import encodings
import codecs
import logging
import logging.handlers
#bots-modules
from . import botsglobal
from . ... | gpl-3.0 | -7,892,572,289,152,995,000 | 62.812766 | 195 | 0.627142 | false |
westernx/sgfs | sgfs/cache.py | 1 | 5707 | from subprocess import call
import collections
import errno
import logging
import os
import sqlite3
from sgsession import Entity
log = logging.getLogger(__name__)
class PathCache(collections.MutableMapping):
def __init__(self, sgfs, project_root):
self.sgfs = sgfs
self.project_roo... | bsd-3-clause | -2,746,726,976,391,183,000 | 37.823129 | 151 | 0.557736 | false |
dc3-plaso/dfvfs | tests/file_io/vhdi_file_io.py | 1 | 2952 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the file-like object implementation using pyvhdi."""
import unittest
from dfvfs.lib import errors
from dfvfs.path import os_path_spec
from dfvfs.path import vhdi_path_spec
from tests import test_lib as shared_test_lib
from tests.file_io import test_lib
@shared... | apache-2.0 | 1,324,908,433,610,755,600 | 32.545455 | 70 | 0.712398 | false |
rammstein/0install | zeroinstall/injector/driver.py | 1 | 7097 | """
This class brings together a L{solve.Solver} to choose a set of implmentations, a
L{fetch.Fetcher} to download additional components, and the user's configuration
settings.
@since: 0.53
"""
# Copyright (C) 2011, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall impor... | lgpl-2.1 | -4,867,127,432,715,335,000 | 35.963542 | 113 | 0.722418 | false |
gleicon/RedisLive | src/dataprovider/redisprovider.py | 1 | 11475 | from api.util import settings
from datetime import datetime, timedelta
import redis
import json
import ast
class RedisStatsProvider(object):
"""A Redis based persistance to store and fetch stats"""
def __init__(self):
# redis server to use to store stats
stats_server = settings.get_redis_stat... | mit | -5,711,488,420,907,123,000 | 35.313291 | 88 | 0.546231 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/verification_ip_flow_result_py3.py | 1 | 1304 | # 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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -3,858,672,163,984,985,000 | 37.352941 | 78 | 0.597393 | false |
030io/se-seed | tests/test_jbm.py | 1 | 1595 | # -*- coding: utf-8 -*-
__author__ = 'chinfeng'
from unittest import TestCase
import jbmongo
import random
class JBMongoTestCase(TestCase):
def setUp(self):
# 我们首先有一个数据库,这个数据库是关联上下文的关键,命名为 Context
self._dbc = jbmongo.DBContext()
def test_coll_definition(self):
dbc = self._dbc
... | lgpl-3.0 | 3,465,320,103,526,201,300 | 27.333333 | 74 | 0.57301 | false |
CRFS/python3-ncplib | examples/time.py | 1 | 1346 | """
NCP time data example.
Connects to a node and requests a single time capture to be performed. Prints the result to stdout.
"""
import asyncio
import ncplib
# The node to connect to. Can be a DNS name or an IP address.
NODE_HOST = "127.0.0.1"
# Frequency.
FREQ_HZ = 2400.12e6 # 2400.12 MHz
# Realtime bandwidth.... | mit | -7,047,356,326,211,177,000 | 24.396226 | 116 | 0.643388 | false |
cmput404wi16/metablog | account/models.py | 1 | 1216 | from django.db import models
from django.core import serializers
# Create your models here.
class User(models.Model):
uid = models.CharField(max_length=250, primary_key=True)
nameFirst = models.CharField(max_length=250)
nameLast = models.CharField(max_length=250)
githubId = models.CharField(max_length=... | mit | 4,983,296,740,722,061,000 | 35.848485 | 70 | 0.73273 | false |
zoltan-fedor/robo_car | nodes/drive_control.py | 1 | 11947 | #!/usr/bin/env python
import rospy
from std_msgs.msg import String
#from std_msgs.msg import UInt16
from std_msgs.msg import Int32
import time
from pyfirmata import Arduino
on_hardware = True # whether we are running this node on the actual car (so it can access the IO board)
wheelpin = 5 # to which pin on the IO shel... | mit | -8,419,473,920,683,098,000 | 59.035176 | 208 | 0.696493 | false |
TetraAsh/baruwa2 | baruwa/controllers/lists.py | 1 | 12838 | # -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
# Baruwa - Web 2.0 MailScanner front-end.
# Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net>
#
# 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 S... | gpl-3.0 | 3,271,341,334,908,312,600 | 38.140244 | 80 | 0.531391 | false |
luisza/dfva_client | src/client_fva/ui/requestauthentication.py | 1 | 10627 | import time
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtCore import Qt, pyqtSlot, QThread, pyqtSignal
from PyQt5.QtWidgets import QCompleter, QTableWidgetItem
from client_fva.models.ContactDropDown import ContactModel
from client_fva.models.MyRequest import MyRequestModel
from client_fva.session_storage i... | gpl-3.0 | -6,719,245,680,836,708,000 | 42.52459 | 150 | 0.647424 | false |
gonesurfing/Quisk_rpi_remote | sdriqpkg/quisk_hardware.py | 1 | 2872 | # Please do not change this hardware control module.
# It provides support for the SDR-IQ by RfSpace.
from __future__ import print_function
import _quisk as QS
import sdriq
from quisk_hardware_model import Hardware as BaseHardware
class Hardware(BaseHardware):
decimations = [1250, 600, 500, 360]
def __init__(se... | gpl-2.0 | -3,532,599,379,455,024,600 | 33.60241 | 84 | 0.625 | false |
yuxng/Deep_ISM | ISM/lib/datasets/imdb.py | 1 | 3612 | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
import os.path as osp
import PIL
import numpy as np
import sc... | mit | 5,910,891,603,174,442,000 | 28.365854 | 85 | 0.564784 | false |
astonshane/davisputnamGo | davisputnam/graph.py | 1 | 1255 | import json
import sys
from pprint import pprint
from ete3 import Tree, TreeStyle, TextFace
from PIL import Image, ImageDraw
def parseTree(root):
tree = Tree()
tree.name = root['Name']
tree.add_face(TextFace(root['Split'], fgcolor="red"), column=0, position="branch-bottom")
if root['Children']:
... | mit | -8,743,040,261,105,409,000 | 25.702128 | 93 | 0.623108 | false |
stanislavb/nagios-snmp-location | nagios-plugins/check_snmp_location.py | 1 | 1637 | #!/usr/bin/env python
# This script checks the standard SNMP location oid
# and saves it in a memcached database with hostname as key.
#
# FreeBSD requirements:
# Compile net-snmp with python bindings
# Install py-memcached
# Nagios exit codes:
# 0 OK
# 1 WARNING
# 2 CRITICAL
# 3 UNKNOWN
import netsnmp
import memcac... | unlicense | 1,020,803,993,351,950,000 | 27.224138 | 111 | 0.703115 | false |
flavio/scsgate | scsgate/reactor.py | 1 | 1869 | """ This module contains the definition of the Reactor class.
This one is useful when dealing with concurrent access to the SCSGate
device """
import queue
import threading
from scsgate.tasks import MonitorTask, ExecutionError
class Reactor(threading.Thread):
""" Allows concurrent access to the SCSGate device "... | mit | 3,353,941,284,899,801,000 | 29.639344 | 79 | 0.596041 | false |
asedunov/intellij-community | python/helpers/pydev/_pydevd_bundle/pydevd_comm.py | 1 | 60832 | ''' pydevd - a debugging daemon
This is the daemon you launch for python remote debugging.
Protocol:
each command has a format:
id\tsequence-num\ttext
id: protocol command number
sequence-num: each request has a sequence number. Sequence numbers
originating at the debugger are odd, sequence numbers ori... | apache-2.0 | 896,342,124,411,002,400 | 40.837689 | 191 | 0.513513 | false |
suutari-ai/shoop | shuup/core/api/users.py | 3 | 1754 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. 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.
from __future__ import unicode_literals
from django.contrib.auth ... | agpl-3.0 | 8,015,017,041,828,015,000 | 27.754098 | 105 | 0.706956 | false |
m0mik/gr-osmosdr | grc/gen_osmosdr_blocks.py | 1 | 11905 | """
Copyright 2012 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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... | gpl-3.0 | -936,261,014,248,224,000 | 29.762274 | 256 | 0.646031 | false |
ptonini/Stratus | lib/classes.py | 1 | 7366 | from time import sleep
__author__ = 'ptonini'
import re
import os
import sys
import time
from mutagen.mp3 import MP3
from mutagen.easyid3 import EasyID3
class Tracks:
def __init__(self, source):
if isinstance(source, dict):
self.__dict__.update(source)
elif isinstance(source, list... | unlicense | -336,839,685,327,072,450 | 40.150838 | 99 | 0.509503 | false |
2gis/vmmaster | vmpool/app.py | 1 | 1295 | # coding: utf-8
import logging
from flask import Flask
from core.config import config
from core.utils import JSONEncoder
log = logging.getLogger(__name__)
class Provider(Flask):
def __init__(self, *args, **kwargs):
from core.db import Database
from core.sessions import Sessions
from vmpo... | mit | -5,654,950,707,962,474,000 | 25.428571 | 76 | 0.644015 | false |
bitforks/drawbot | drawBot/ui/codeEditor.py | 1 | 49280 | import AppKit
import objc
from keyword import kwlist
import re
from pygments.lexers import PythonLexer, get_lexer_by_name
from pygments.token import *
from pygments.style import Style
from pygments.styles.default import DefaultStyle
try:
import jedi
hasJedi = True
except:
hasJedi = False
from vanilla im... | bsd-2-clause | -5,953,409,070,966,837,000 | 35.941529 | 222 | 0.605499 | false |
hep-gc/cloudscheduler | web_frontend/cloudscheduler/csv2/group_views.py | 1 | 50458 | from django.conf import settings
config = settings.CSV2_CONFIG
from django.shortcuts import render, get_object_or_404, redirect
from django.views.decorators.csrf import requires_csrf_token
from django.http import HttpResponse
from django.core.exceptions import PermissionDenied
from cloudscheduler.lib.fw_config import... | apache-2.0 | -8,947,802,555,058,953,000 | 45.376838 | 291 | 0.559475 | false |
hongzhouye/frankenstein | tools/mol_utils.py | 1 | 8589 | """Utils functions for module MOL
"""
import os
import numpy as np
from frankenstein.tools.io_utils import zmat2xyz
from frankenstein.data.atom_data import get_atomic_number
def get_enuc(Zs, xyzs):
"""Compute nuclear repulsion for a give molecule
Note:
The coordinates must be in unit of Bohr. (1 B... | bsd-3-clause | -3,732,571,148,976,621,600 | 29.031469 | 219 | 0.544301 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.