repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TLemur/freq-bot | src/plugins/query/disco.py | 1 | 2563 | #!/usr/bin/env python
# -*- coding: utf8 -*-
#~#######################################################################
#~ Copyright (c) 2008 Burdakov Daniel <kreved@kreved.org> #
#~ #
#~ This file is part of FreQ-bot. ... | gpl-3.0 | 1,910,563,791,328,330,000 | 43.189655 | 79 | 0.476395 | false | 3.535172 | false | false | false |
eLRuLL/scrapy | scrapy/utils/engine.py | 1 | 1355 | """Some debugging functions for working with the Scrapy engine"""
# used in global tests code
from time import time # noqa: F401
def get_engine_status(engine):
"""Return a report of the current engine status"""
tests = [
"time()-engine.start_time",
"engine.has_capacity()",
"len(engin... | bsd-3-clause | 4,057,573,841,147,418,600 | 27.229167 | 67 | 0.591144 | false | 3.55643 | true | false | false |
kperun/nestml | pynestml/cocos/co_co_init_vars_with_odes_provided.py | 1 | 3786 | #
# co_co_init_vars_with_odes_provided.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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
... | gpl-2.0 | 6,593,271,330,842,153,000 | 38.852632 | 109 | 0.642631 | false | 4.07535 | false | false | false |
aaltinisik/OCBAltinkaya | addons/product/product.py | 1 | 70029 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -2,923,583,481,406,589,400 | 49.562455 | 379 | 0.594825 | false | 3.904818 | false | false | false |
Kray/qmdc | src/tracklistview.py | 1 | 4206 | class TrackListView(QTreeView):
def __init__(self, parent):
super(TrackListView, self).__init__(parent)
self.setRootIsDecorated(False)
self.setSortingEnabled(True)
self.setAllColumnsShowFocus(True)
self.setSelectionBehavior(QTreeView.SelectRows)
#self.... | gpl-3.0 | -2,895,516,154,502,533,000 | 39.057143 | 148 | 0.558726 | false | 3.938202 | false | false | false |
MahdiZareie/PyShop | product/migrations/0001_initial.py | 1 | 1027 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Picture',
fields=[
('id', models.AutoField(prim... | mit | 1,292,277,649,275,318,000 | 29.205882 | 114 | 0.526777 | false | 4.711009 | false | false | false |
muxiaobai/CourseExercises | python/tensorflow/tensorflowbase/logisticClassification-diabetes.py | 1 | 1666 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 案例:是否得了糖尿病
import tensorflow as tf
import numpy as np
tf.set_random_seed(777) # for reproducibility
xy = np.loadtxt('data-logisticClassificationdiabetes-diabetes.csv', delimiter=',', dtype=np.float32)
x_data = xy[:, 0:-1]
y_data = xy[:, [-1]]
X = tf.placeholder(tf.float32,... | gpl-2.0 | -353,991,877,810,684,100 | 29.734694 | 108 | 0.700531 | false | 2.133144 | false | false | false |
hooliooo/python3-social-media-api-retriever | app.py | 1 | 4002 | from flask import Flask
from flask_restful import Resource, Api
# import json
from facebook import facebook_json
from instagram import instagram_json
from twitter import twitter_json
import requests_cache
import os
# from youtube import youtube_json
# import pdb
app = Flask(__name__)
api = Api(app)
requests_cache.i... | mit | 4,721,026,097,362,952,000 | 23.857143 | 82 | 0.666417 | false | 3.041033 | false | false | false |
zer0yu/ZEROScan | lib/core/convert.py | 1 | 1260 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from lib.core.settings import IS_WIN, UNICODE_ENCODING
def singleTimeWarnMessage(message): # Cross-linked function
sys.stdout.write(message)
sys.stdout.write("\n")
sys.stdout.flush()
def stdoutencode(data):
retVal = None
try:
da... | mit | 7,783,712,084,488,827,000 | 30.5 | 85 | 0.595238 | false | 4.300341 | false | false | false |
theJollySin/pytextgame | pytextgame/ui.py | 1 | 6368 | # -- coding: utf-8 --
'''Simple UIs for Text Games in Python,
built on pygame
'''
import string
import sys
from pytextgame import screen
from pytextgame.displays import Displays
from pytextgame.actions import ActionKeys
from pytextgame.window import Window, Windows
from colors import WHITE
if sys.version_info[0] < 3: ... | mit | 7,162,272,413,126,270,000 | 30.84 | 91 | 0.577889 | false | 4.040609 | false | false | false |
AleksanderLidtke/AnalyseScinetificArticles | DownloadArticles.py | 1 | 38230 | # -*- coding: utf-8 -*-
"""
Test downloading scientific articles' infomration from the web.
Created on Sun Apr 19 20:46:55 2015
@author: alek
"""
import os, requests, re, difflib, time, numpy, subprocess, networkx, matplotlib.pyplot
import nltk, string, sklearn.metrics, sklearn.cluster
try:
from selenium import ... | lgpl-3.0 | -8,477,136,316,659,236,000 | 51.951524 | 290 | 0.639079 | false | 3.847625 | false | false | false |
emulbreh/shrubbery | shrubbery/polymorph/models.py | 1 | 9774 | from django.db import models, transaction
from django.utils.importlib import import_module
from shrubbery.conf import settings
from shrubbery.db.managers import Manager
from shrubbery.db.utils import get_sub_models, get_query_set, get_model, remove_join, forge_join
from shrubbery.db.union import UnionQuerySet
from shr... | mit | -6,236,834,543,948,433,000 | 34.802198 | 169 | 0.614897 | false | 3.863241 | false | false | false |
drytoastman/scorekeeperbackend | common/sccommon/changelogs.py | 1 | 4875 | #!/usr/bin/env python3
import datetime
import itertools
import json
import psycopg2
import psycopg2.extras
import re
import sys
import time
psycopg2.extras.register_uuid()
psycopg2.extensions.register_adapter(dict, psycopg2.extras.Json)
def print_log(table, action, otime, ltime, old, new, idfield):
if action == ... | gpl-3.0 | 9,106,229,219,233,841,000 | 37.690476 | 164 | 0.567795 | false | 3.369039 | false | false | false |
mramire8/active | experiment/anytimev2.py | 1 | 13575 | __author__ = 'maru'
__copyright__ = "Copyright 2013, ML Lab"
__version__ = "0.1"
__status__ = "Development"
import sys
import os
sys.path.append(os.path.abspath("."))
from experiment_utils import *
import argparse
from sklearn.datasets.base import Bunch
from sklearn import linear_model
import time
from sklearn imp... | apache-2.0 | -27,461,355,118,457,564 | 35.296791 | 135 | 0.528103 | false | 3.84017 | true | false | false |
fowie/PiCoolerControl | CoolerControl.py | 1 | 4625 | #/bin/python
# Script will be run as a cron job every minute
# Steps:
# 1 - Obtain current state (read GPIO pins)
# 2 - Read the schedule
# 2a - Get the current position of the state machine
# 3 - Determine if anything needs to happen on the schedule
# 3a - Perform operations
# - Determine if the pump was on recentl... | apache-2.0 | 9,062,713,403,212,197,000 | 30.462585 | 140 | 0.694919 | false | 2.999351 | false | false | false |
jakelever/kindred | tests/test_utils.py | 1 | 1774 |
import kindred
import os
import shutil
import tempfile
import hashlib
class TempDir:
def __init__(self):
pass
def __enter__(self):
self.tempDir = tempfile.mkdtemp()
return self.tempDir
def __exit__(self, type, value, traceback):
shutil.rmtree(self.tempDir)
def test_loadBioNLP_findDir():
with TempDir() ... | mit | -6,767,766,425,493,751,000 | 29.067797 | 152 | 0.748591 | false | 2.85209 | false | false | false |
glassnotes/Balthasar | src/balthasar/coarsewignerfunction.py | 1 | 14961 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# coarsewignerfunction.py: A class for Coarse-grained Wigner functions
#
# © 2016 Olivia Di Matteo (odimatte@uwaterloo.ca)
#
# This file is part of the project Balthasar.
# Licensed under BSD-3-Clause
#
from itertools import product
import numpy as np
from pynitefields imp... | bsd-3-clause | -6,178,820,922,894,147,000 | 42.74269 | 103 | 0.544118 | false | 4.332465 | false | false | false |
jeffcarter-github/MachineLearningLibrary | MachineLearningLibrary/Regression/LinearRegression.py | 1 | 2075 | import numpy as np
from scipy.stats import kstest, norm
class LinearRegression(object):
'''Ordinary Least Squares...'''
def __init__(self, X, y, fit_intercept=True):
self.X = X
self.y = y
self.fit_intercept = fit_intercept
self._coeff = None
def fit(self, check_residuals=T... | mit | 4,874,837,497,256,467,000 | 31.421875 | 85 | 0.54988 | false | 3.330658 | false | false | false |
lakepay/lake | share/qt/extract_strings_qt.py | 1 | 1851 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/lakestrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format... | mit | -4,923,338,201,270,589,000 | 22.730769 | 78 | 0.580227 | false | 3.459813 | false | false | false |
morucci/pygerrit | pygerrit/__init__.py | 1 | 4818 | # The MIT License
#
# Copyright 2012 Sony Mobile Communications. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the r... | mit | 1,186,567,472,564,510,700 | 34.688889 | 79 | 0.62308 | false | 4.566825 | false | false | false |
brainwater/identitone | idt_site/settings.py | 1 | 2005 | """
Django settings for identitone project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)... | gpl-2.0 | -8,730,750,947,671,568,000 | 23.156627 | 71 | 0.715212 | false | 3.089368 | false | false | false |
cancro7/gem5 | fault-instance-generator.py | 1 | 3941 | #!/usr/bin/env python
import argparse
from random import randint
parser = argparse.ArgumentParser(description='Gem5 Fault Instance Generator')
parser.add_argument('-b', '--btb-access-count', type=str, dest='bacFile',
help='File containing BTB access references')
parser.set_defaults(bacFile="m5ou... | bsd-3-clause | -1,088,697,293,508,398,000 | 34.1875 | 77 | 0.465618 | false | 4.335534 | false | false | false |
DemocracyClub/yournextrepresentative | ynr/apps/parties/models.py | 1 | 6389 | from django.db import models
from django.utils import timezone
from django_extensions.db.models import TimeStampedModel
from .managers import PartyQuerySet
class Party(TimeStampedModel):
"""
A UK political party
The canonical source of these parties is The Electoral Commission, with
some exceptions.... | agpl-3.0 | 590,743,517,109,042,200 | 31.93299 | 101 | 0.62232 | false | 4.085038 | false | false | false |
zach-king/Python-Miscellaneous | Networking/chat_server.py | 1 | 1693 | import socket
import select
import sys
sock_list = []
def chat_server():
global sock_list
buff_size = 1024
s = socket.socket()
s.bind(('127.0.0.1', 9000))
s.listen(5)
print('Server started on port 9000')
conn, addr = s.accept()
sock_list.append(conn)
while True:
... | gpl-2.0 | -1,800,638,584,765,242,600 | 27.711864 | 95 | 0.468399 | false | 4.079518 | false | false | false |
nesl/SensorActuatorManager | pkg/devices/PushDevice.py | 1 | 5552 | # Author: Mani Srivastava, NESL, UCLA
# Created on: May 22, 2013
#
# Copyright notice in LICENSE file
#
import sys
import os
import Queue
import BaseDevice
import time
import json
import cherrypy
import iso8601
import logging
from pkg.utils.debug import debug_mesg
from pkg.utils.misc import json_convert_unicode_to_s... | bsd-3-clause | 8,166,600,524,441,771,000 | 29.510989 | 167 | 0.657421 | false | 3.035539 | false | false | false |
PyCQA/astroid | doc/conf.py | 1 | 7862 | #
# Astroid documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 26 15:00:40 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values ha... | lgpl-2.1 | 3,628,337,848,040,499,000 | 29.59144 | 80 | 0.694353 | false | 3.747378 | true | false | false |
chiang831/LeHavre | src/game/resource_picker.py | 1 | 1842 | """This module handles picking resource from available resource."""
from game import resource
class ResourcePickerError(Exception):
pass
class ResourcePicker(object):
def __init__(self):
self._available = None
self._picked_resource = resource.Resource()
def SetAvailableResource(self, res):
self._a... | gpl-2.0 | 2,077,889,943,885,185,800 | 27.338462 | 71 | 0.732899 | false | 3.625984 | false | false | false |
ic-hep/DIRAC | Workflow/Modules/test/Test_Modules.py | 1 | 28453 | """ Unit Test of Workflow Modules
"""
import unittest
import itertools
import os
import copy
import shutil
from mock import MagicMock as Mock
from DIRAC import gLogger
class ModulesTestCase( unittest.TestCase ):
""" Base class for the Modules test cases
"""
def setUp( self ):
gLogger.setLevel( 'ERROR' )
... | gpl-3.0 | -2,412,094,816,721,327,000 | 50.826958 | 142 | 0.540681 | false | 3.717403 | true | false | false |
geoffkilpin/pombola | pombola/hansard/management/commands/hansard_reattribute_entries.py | 1 | 3681 | # This admin command is to save having to move Hansard Entries
# individually in the admin console, which is not fun - or particularly
# safe - when there are more than one or two of them
from dateutil import parser
import sys
from django.conf import settings
from django.contrib.contenttypes.models import ContentType... | agpl-3.0 | 8,819,104,886,562,429,000 | 41.802326 | 101 | 0.619397 | false | 4.11745 | false | false | false |
testedminds/sand | sand/cytoscape/positions.py | 1 | 1772 | import csv
def __positions_to_csv(positions, path):
with open(path, 'w') as csvfile:
writer = csv.writer(csvfile)
writer.writerows(positions)
def positions_to_csv(network, path):
view = network.get_first_view()
__positions_to_csv(view_to_positions(view), path)
def view_to_positions(vie... | apache-2.0 | 2,434,277,917,504,964,600 | 32.433962 | 92 | 0.648984 | false | 3.676349 | false | false | false |
Juniper/contrail-provisioning | contrail_provisioning/common/keepalived_setup.py | 1 | 5562 | #!/usr/bin/python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import os
import sys
import argparse
import netaddr
import netifaces
import ConfigParser
import platform
from fabric.api import local
from contrail_provisioning.common.base import ContrailSetup
from contrail_provisioning.compute.n... | apache-2.0 | 6,912,362,993,338,527,000 | 42.795276 | 107 | 0.531464 | false | 4.042151 | false | false | false |
foxscotch/advent-of-code | 2017/08/p1.py | 1 | 2852 | # Python 3.6.1
import re
from timeit import timeit
class Registers(dict):
"""Simple dict-based class that sets a default value on missing keys."""
def __missing__(self, key):
self[key] = 0
return self[key]
class Instruction:
"""Class for holding register instructions."""
instr_re = ... | mit | 7,313,618,287,602,904,000 | 28.402062 | 80 | 0.551543 | false | 3.661104 | false | false | false |
lancms/lancms2 | crew/models.py | 1 | 1229 | from django.db import models
from django.utils.translation import ugettext_lazy as _
# Create your models here.
from core.models import Event, User
class Crew(models.Model):
event = models.ForeignKey(Event)
name = models.CharField(max_length=64, verbose_name=_('Name'))
description = models.TextField(nul... | gpl-2.0 | -6,179,711,398,685,303,000 | 24.604167 | 76 | 0.615948 | false | 3.852665 | false | false | false |
pawel-akonom/diff2html-plus | diff2html.py | 1 | 28184 | #! /usr/bin/python
# coding=utf-8
#
# 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 in t... | gpl-2.0 | -6,287,472,977,222,970,000 | 34.630847 | 235 | 0.559644 | false | 3.419973 | false | false | false |
yotam180/xAI | src/vision/server/google_images.py | 1 | 1992 | from selenium import webdriver
from json import loads, dumps
import re
import time
class GoogleSearch(object):
"""
To represent a search engine and query results from Google.
"""
def __init__(self):
"""
Initializes a new search engine
"""
self.driver = webdriver.Chrome(... | gpl-3.0 | -5,690,252,001,971,754,000 | 27.471429 | 125 | 0.519076 | false | 4.141372 | false | false | false |
Azure/azure-sdk-for-python | sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py | 1 | 4742 | # 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 may ... | mit | 7,340,601,551,714,671,000 | 41.720721 | 133 | 0.639182 | false | 4.64902 | false | false | false |
CAB-LAB/jupyterhub-swarm | jupyterhub_config.py | 1 | 4389 | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# Configuration file for JupyterHub
import os
import sys
c = get_config()
# We rely on environment variables to configure JupyterHub so that we
# avoid having to rebuild the JupyterHub container every time we change ... | gpl-3.0 | 3,716,831,870,285,218,000 | 31.272059 | 111 | 0.661198 | false | 2.947616 | true | false | false |
mlabru/ptracks | model/newton/defs_newton.py | 1 | 10031 | #/usr/bin/env python
# -*- coding: utf-8 -*-
"""
---------------------------------------------------------------------------------------------------
defs_newton
defines e constantes válidas localmente
revision 0.2 2015/nov mlabru
pep8 style conventions
revision 0.1 2014/out mlabru
initial release (Python/Linux)
... | gpl-3.0 | 1,941,892,134,202,871,000 | 34.437722 | 120 | 0.580538 | false | 2.22774 | false | false | false |
MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/web/movielistm3u.py | 1 | 5181 | #!/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 | 413,458,427,154,229,200 | 34.731034 | 248 | 0.62652 | false | 3.565726 | false | false | false |
MediaKraken/mkarchive | kivy_test/subprogram_ssl_keygen.py | 1 | 1464 | '''
Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful... | gpl-2.0 | -8,266,755,077,542,875,000 | 38.666667 | 82 | 0.68306 | false | 3.562044 | false | false | false |
BertrandBordage/django-postgrefts | setup.py | 1 | 1079 | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(CURRENT_PATH, 'requirements.txt')) as f:
required = f.read().splitlines()
setup(
name='django-postgrefts',
author='Bertrand Bordage',
author_... | bsd-3-clause | -4,259,952,374,703,971,000 | 28.916667 | 63 | 0.636026 | false | 3.752613 | false | true | false |
mvaled/sentry | src/sentry/south_migrations/0395_auto__add_releaseprojectenvironment__add_unique_releaseprojectenvironm.py | 1 | 102138 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... | bsd-3-clause | -5,967,794,903,881,135,000 | 90.276139 | 233 | 0.580577 | false | 3.888749 | false | false | false |
jakobabesser/pymus | pymus/sisa/loudness/estimator.py | 1 | 2141 | import numpy as np
from .loudness_critical_band_approximation import LoudnessCriticalBandApproximationIsolatedMonophonicTracks
from ...tools import Tools
__author__ = 'Jakob Abesser'
class LoudnessEstimator:
""" Wrapper class for loudness estimators
"""
def __init__(self):
pass
@stati... | mit | 8,950,198,014,390,151,000 | 39.396226 | 111 | 0.5773 | false | 4.594421 | false | false | false |
BryceSchroeder/delvmod | delv/colormap.py | 1 | 5210 | #!/usr/bin/env python
# Copyright 2015 Bryce Schroeder, www.bryce.pw, bryce.schroeder@gmail.com
# Wiki: http://www.ferazelhosting.net/wiki/delv
#
# 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 Fo... | gpl-3.0 | -8,377,676,020,398,541,000 | 37.029197 | 82 | 0.59309 | false | 2.367106 | false | false | false |
ONLYOFFICE/core | Test/Applications/StandardTester/tester/scripts/tester.py | 1 | 1243 | #!/usr/bin/env python
import os
import platform
import subprocess
def make(src_args):
#--input="input-standard-files-dir"
#--output="output-dir"
#--standard // generate standarts
#--use-system-fonts="0/1/false/true"
#--font-dirs="C:\\Windows\\Fonts;/usr/share/fonts;"
#--cores=4
work_dir = os.path.dirnam... | agpl-3.0 | 2,776,664,227,402,981,000 | 28.619048 | 90 | 0.615447 | false | 3.16285 | false | false | false |
Ebag333/Pyfa | service/pycrest/weak_ciphers.py | 1 | 5235 | import datetime
import ssl
import warnings
from requests.adapters import HTTPAdapter
try:
from requests.packages import urllib3
from requests.packages.urllib3.util import ssl_
from requests.packages.urllib3.exceptions import (
SystemTimeWarning,
SecurityWarning,
)
from requests.pac... | gpl-3.0 | 3,188,589,540,693,058,600 | 38.659091 | 109 | 0.635912 | false | 4.045595 | false | false | false |
skirpichev/omg | diofant/core/trace.py | 1 | 5346 | from ..matrices import Matrix
from .add import Add
from .compatibility import default_sort_key
from .containers import Tuple
from .expr import Expr
from .mul import Mul
from .power import Pow
from .sympify import sympify
def _is_scalar(e):
"""Helper method used in Tr."""
# sympify to set proper attributes
... | bsd-3-clause | 1,281,262,005,161,226,000 | 26.989529 | 73 | 0.54826 | false | 3.786119 | false | false | false |
liuenyan/django-blog | blog/templatetags/blog_extras.py | 1 | 1424 | import hashlib
from django import template
from django.db.models import Count
from ..models import Post, Category, Tag, Link
register = template.Library()
@register.inclusion_tag('_navbar.html')
def show_navbar(active, user):
return {'active': active, 'user': user}
@register.inclusion_tag('_sidebar.html')
def sh... | mit | -2,121,758,207,369,709,800 | 32.904762 | 104 | 0.641854 | false | 3.423077 | false | false | false |
kgullikson88/TS23-Scripts | ImproveWavelengthSolution.py | 1 | 2035 | import scipy
import sys
import os
import numpy as np
import pylab
import MakeModel
from astropy.io import fits as pyfits
from FitTellurics import FitFunction, FitContinuum3, CCImprove
import FitsUtils
import Units
homedir = os.environ['HOME']
LineListFile = homedir + "/School/Research/McDonaldData/LineList.dat"
if... | gpl-3.0 | -3,416,336,940,831,758,300 | 28.492754 | 108 | 0.625553 | false | 2.902996 | false | false | false |
XiaoChengOMG/Practice | www/orm.py | 1 | 1791 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
__author__ = ""
'''
'''
import asyncio,logging
logging.basicConfig(level=logging.INFO)
import aiomysql
def log(sql,args=()):
logging.info('SQL: %s' % sql)
async def create_pool(loop,**kw):
logging.info('create database connection pool...')
global _pool
... | apache-2.0 | -8,663,139,979,751,972,000 | 26.136364 | 63 | 0.551089 | false | 3.715768 | false | false | false |
nojero/pod | src/pod/equivalence.py | 1 | 7197 |
import sat
import ptnet
import z3
from util import *
from encoding import *
class MergingEquivalence :
def __init__ (self, domain) :
self.domain = domain
def is_in_domain (self, it) :
for x in it :
if x not in self.domain :
raise LookupError, "'%s' is not in the d... | gpl-3.0 | 4,782,201,330,291,516,000 | 32.474419 | 93 | 0.530777 | false | 3.529671 | false | false | false |
tuffery/Frog2 | frowns/Utils/StereoFinder.py | 1 | 2826 | def isChiral(atom):
"""(atom) -> See if the bfs atoms can form a chiral center"""
q = {}
weights = {}
for oatom in atom.oatoms:
q[oatom] = [{atom:1, oatom:1}, oatom.number, [oatom]]
weights[oatom] = oatom.number + oatom.hcount
if len(q) == 3:
if atom.hcount != 1:
... | gpl-3.0 | 1,283,979,896,099,745,800 | 24.690909 | 66 | 0.462845 | false | 3.568182 | false | false | false |
daveculp/Adafruit-Serial-LCD-for-pyboard | afserlcd.py | 1 | 4602 | '''This is a simple class for interfacing an Adafruit serial LCD with a pyboard.'''
import pyb
#define our LCD commands
LCD_COMMAND = 0xFE
DISPLAY_ON = 0x42
DISPLAY_OFF = 0x46
SET_BRIGHTNESS = 0x99
SET_SAVE_BRIGHTNESS = 0x98
SET_CONTRAST = 0x50... | mit | 8,140,869,143,961,755,000 | 28.883117 | 83 | 0.567362 | false | 3.452363 | false | false | false |
maweigert/gputools | gputools/core/ocltypes.py | 1 | 13081 | """
@author: mweigert
A basic wrapper class around pyopencl.cl__array
"""
from __future__ import absolute_import, print_function
import numpy as np
import pyopencl.array as cl_array
import pyopencl as cl
from pyopencl.characterize import has_double_support
from gputools import get_device
from gputools.core.oclprogr... | bsd-3-clause | -8,130,269,717,595,137,000 | 30.75 | 105 | 0.560431 | false | 3.545947 | false | false | false |
coffeemug13/pyonenote | pyonenote.py | 1 | 9347 | """
PyOneNote.py
~~~~~~~~~~~~~~~~~
This module contains a basic OAuth 2 Authentication and basic handler for GET and POST operations.
This work was just a quick hack to migrate notes from and old database to onenote but should hep you to understand
the request structure of OneNote.
Copyright (c) 2016 Coffeemu... | mit | -1,410,070,218,896,251,000 | 39.358407 | 203 | 0.579437 | false | 3.785743 | false | false | false |
khalim19/gimp-plugin-export-layers | export_layers/pygimplib/tests/setting/stubs_setting.py | 1 | 4093 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2014-2019 khalim19
#
# 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... | gpl-3.0 | -5,217,680,496,299,321,000 | 25.237179 | 90 | 0.723186 | false | 3.674147 | false | false | false |
nkoech/csacompendium | csacompendium/research/api/researchdiversity/researchdiversityserializers.py | 1 | 7089 | from csacompendium.research.models import (
Diversity,
ResearchDiversity,
)
from csacompendium.utils.hyperlinkedidentity import hyperlinked_identity
from csacompendium.utils.serializersutils import (
CreateSerializerUtil,
get_related_content_url,
FieldMethodSerializer
)
from rest_framework.serialize... | mit | 6,294,233,616,711,571,000 | 32.597156 | 104 | 0.582875 | false | 4.806102 | false | false | false |
vgrem/Office365-REST-Python-Client | generator/generate.py | 1 | 1115 | from generator import load_settings
from generator.builders.type_builder import TypeBuilder
from office365.runtime.odata.odata_v3_reader import ODataV3Reader
from office365.runtime.odata.odata_v4_reader import ODataV4Reader
def generate_files(model, options):
"""
:type model: office365.runtime.odata.odata_mo... | mit | -1,358,164,647,981,276,000 | 29.972222 | 74 | 0.712108 | false | 3.779661 | false | false | false |
ppizarror/Ned-For-Spod | lib/object.py | 1 | 2067 | # coding=utf-8
"""
OBJETO
Maneja objetos del mundo, como pistas y decoraciones, dibuja a los elementos
en pantalla.
Autor: PABLO PIZARRO @ppizarror
Fecha: ABRIL 2015
"""
if __name__ == '__main__':
# noinspection PyUnresolvedReferences
from path import *
class Gameobject(object):
"""Objet... | gpl-2.0 | -8,268,332,533,941,296,000 | 25.851351 | 84 | 0.539544 | false | 3.523077 | false | false | false |
roderickmackenzie/opvdm | gui/inp_description.py | 1 | 2274 | # Organic Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for organic solar cells.
# Copyright (C) 2012 Roderick C. I. MacKenzie
#
# roderick.mackenzie@nottingham.ac.uk
# www.opvdm.com
# Room B86 Coates, University Park, Nottingham, NG7 2RD, UK
#
# This program is free softwar... | gpl-2.0 | 4,907,669,692,966,138,000 | 35.677419 | 82 | 0.711522 | false | 3.098093 | false | false | false |
cdsousa/SymPyBotics | sympybotics/dynamics/rne_park.py | 1 | 2340 | from sympy import zeros, eye
from .extra_dyn import frictionforce, driveinertiaterm
from ..utils import sym_skew as skew
from ..utils import identity
def Adj(G, g):
R = G[0:3, 0:3]
p = G[0:3, 3]
return (R.row_join(zeros(3))).col_join(
(skew(p) * R).row_join(R)) * g
def Adjdual(G, g):
R = G[0... | bsd-3-clause | -8,549,918,759,218,217,000 | 23.893617 | 79 | 0.524359 | false | 2.402464 | false | false | false |
dragorosson/heat | heat/engine/clients/os/manila.py | 1 | 4911 | #
# 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, software
# ... | apache-2.0 | 4,332,230,476,536,119,300 | 34.586957 | 78 | 0.621666 | false | 4.237274 | false | false | false |
loads/ailoads | molotov/tests/test_quickstart.py | 1 | 2046 | import tempfile
import shutil
import os
from molotov import quickstart, __version__, run
from molotov.tests.support import set_args, TestLoop, dedicatedloop
class TestQuickStart(TestLoop):
def setUp(self):
super(TestQuickStart, self).setUp()
self._curdir = os.getcwd()
self.tempdir = tempf... | apache-2.0 | -4,303,793,364,620,485,000 | 27.027397 | 77 | 0.556696 | false | 4.1167 | true | false | false |
lvphj/epydemiology | epydemiology/phjCleanUKPostcodes.py | 1 | 99765 | """
Functions to check postcode variable in Pandas dataframe
========================================================
These functions take a dataframe containing postcode information and attempts
to correct errors and extract outward (first half), inward (second half) and
postcode area (first letters) components of th... | mit | 3,842,442,044,245,103,000 | 53.251904 | 351 | 0.569643 | false | 4.201711 | false | false | false |
cajone/pychess | lib/pychess/Players/Player.py | 1 | 4715 | from gi.repository import GObject
class PlayerIsDead(Exception):
""" Used instead of returning a move,
when an engine crashes, or a nonlocal player disconnects """
pass
class TurnInterrupt(Exception):
""" Used instead of returning a move, when a players turn is interrupted.
Currently thi... | gpl-3.0 | 4,301,242,595,915,062,300 | 30.644295 | 80 | 0.620361 | false | 4.473435 | false | false | false |
beniwohli/apm-agent-python | elasticapm/instrumentation/packages/tornado.py | 1 | 5909 | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# 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, t... | bsd-3-clause | 5,332,078,897,494,987,000 | 44.453846 | 120 | 0.696226 | false | 4.325769 | false | false | false |
madewokherd/urk | scripts/theme.py | 1 | 12167 | import time
import windows
import widgets
import chaninfo
import events
from conf import conf
textareas = {}
if 'font' in conf:
textareas['font'] = conf['font']
if 'bg_color' in conf:
textareas['bg'] = conf['bg_color']
if 'fg_color' in conf:
textareas['fg'] = conf['fg_color']
widgets.set_style("view", te... | gpl-2.0 | -2,758,089,470,375,473,000 | 32.243169 | 127 | 0.535958 | false | 2.977729 | false | false | false |
CoderDojoPL/stacja_pogodowa | python_scripts/rrd_update.py | 1 | 1226 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
#
import sys, requests
from rrdtool import *
from rrdtool import update as rrd_update
galileo_path = "/opt/";
if galileo_path not in sys.path:
sys.path.append(galileo_path);
from coderdojo_library import *
if __name__ == '__main__':
GalileoBoard = CoderDojo... | mit | -5,374,646,723,519,305,000 | 25.630435 | 108 | 0.660408 | false | 2.557411 | false | false | false |
tpn/tpn | lib/tpn/kbhit.py | 1 | 3218 | #!/usr/bin/env python
'''
From: http://home.wlu.edu/~levys/software/kbhit.py
A Python class implementing KBHIT, the standard keyboard-interrupt poller.
Works transparently on Windows and Posix (Linux, Mac OS X). Doesn't work
with IDLE.
This program is free software: you can redistribute it and/or modify
it under the... | mit | 6,470,994,556,970,673,000 | 23.195489 | 83 | 0.570541 | false | 3.858513 | false | false | false |
mmcco/Verified-BPF | bedrock/tools/universes.py | 1 | 4675 | #!/usr/bin/python
import sys
class CycleFound (Exception):
def __init__(self, path, labels):
self.path = path
self.labels = labels
def __str__(self):
l = len(self.labels)
result = ""
for i in range(0, l):
result = "%s%s %s " % (result, self.path[i], self.lab... | bsd-3-clause | -8,935,177,100,206,518,000 | 24.828729 | 84 | 0.429519 | false | 3.652344 | false | false | false |
e-koch/VLA_Lband | 14B-088/HI/analysis/co_comparison/cloud_catalog.py | 1 | 4033 |
from astropy.table import Table, Column
from astropy.io import fits
import astropy.units as u
from astropy.wcs import WCS
import matplotlib.pyplot as p
import numpy as np
from spectral_cube import SpectralCube
from analysis.paths import (iram_co21_data_path, fourteenB_HI_data_path,
paper1_... | mit | 7,481,956,122,856,201,000 | 30.755906 | 93 | 0.650384 | false | 2.800694 | false | false | false |
opesci/devito | devito/passes/iet/instrument.py | 1 | 2261 | from devito.ir.iet import MapNodes, Section, TimedList, Transformer
from devito.mpi.routines import (HaloUpdateCall, HaloWaitCall, MPICall, MPIList,
HaloUpdateList, HaloWaitList, RemainderCall)
from devito.passes.iet.engine import iet_pass
from devito.passes.iet.orchestration import Bus... | mit | -8,532,868,118,993,749,000 | 29.972603 | 83 | 0.628041 | false | 3.688418 | false | false | false |
NeuromorphicProcessorProject/snn_toolbox | examples/mnist_keras_INI.py | 1 | 5042 | """End-to-end example for SNN Toolbox.
This script sets up a small CNN using Keras and tensorflow, trains it for one
epoch on MNIST, stores model and dataset in a temporary folder on disk, creates
a configuration file for SNN toolbox, and finally calls the main function of
SNN toolbox to convert the trained ANN to an ... | mit | 3,051,974,469,091,452,000 | 32.171053 | 79 | 0.656882 | false | 3.453425 | true | false | false |
pacificclimate/nchelpers | setup.py | 1 | 1497 | from setuptools import setup
__version__ = (5, 5, 6)
setup(
name="nchelpers",
description="Helper classes and methods for Climate and Forecast NetCDF"
"datasets",
keywords="NetCDF climate forecast",
packages=['nchelpers'],
version='.'.join(str(d) for d in __version__),
url="htt... | gpl-3.0 | 2,547,586,673,324,611,600 | 33.813953 | 76 | 0.599198 | false | 3.441379 | false | false | false |
pmdarrow/rest-api | users/views.py | 1 | 2374 | import json
import re
from django.http import HttpResponse, JsonResponse
from django.views.generic import View
from .forms import UserSerializer
from .models import User
allowed_filters = re.compile(r'^(username|email|gender|title|first_name|'
r'last_name|street|city|state|phone|cell|pp... | mit | -8,221,110,706,021,646,000 | 31.520548 | 76 | 0.613311 | false | 4.224199 | false | false | false |
ArteliaTelemac/PostTelemac | PostTelemac/meshlayerlibs/pyqtgraph/Vector.py | 1 | 3115 | # -*- coding: utf-8 -*-
"""
Vector.py - Extension of QVector3D which adds a few missing methods.
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more information.
"""
from .Qt import QtGui, QtCore, QT_LIB
import numpy as np
class Vector(QtGui.QVector3D):
"""Extension of QVe... | gpl-3.0 | 5,025,998,287,396,986,000 | 30.795918 | 107 | 0.473515 | false | 3.651817 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/google_ads_field_service/transports/grpc.py | 1 | 11498 | # -*- coding: utf-8 -*-
# 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... | apache-2.0 | -4,842,684,159,372,807,000 | 44.090196 | 112 | 0.614368 | false | 4.673984 | false | false | false |
jrwdunham/lingsync2old | fix-tags.py | 1 | 5526 | """This script was written for the express purpose of fixing the tags in a
particular OLD after the lingsync2old.py migration script failed to do so.
It SHOULD NOT BE RUN on an existing OLD without careful inspection first since
doing so may cause data corruption.
"""
import json, pprint, re
from old_client import O... | apache-2.0 | 6,626,382,727,045,683,000 | 34.423077 | 91 | 0.513934 | false | 3.572075 | false | false | false |
exted/enclib | enclib.py | 1 | 10678 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Enclib v0.1 DEV
http://github.com/exted/enclib/
Copyright 2014 Exted Luo (http://extedluo.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Founda... | mit | 6,214,208,754,599,738,000 | 34.5 | 99 | 0.61061 | false | 3.719874 | false | false | false |
xapple/seqenv | seqenv/common/database.py | 1 | 13725 | # Built-in modules #
import os, sqlite3, types
# Internal modules #
from seqenv.common import download_from_url, md5sum
from seqenv.common.color import Color
from seqenv.common.autopaths import FilePath
from seqenv.common.cache import property_cached
#################################################... | mit | -5,435,183,319,394,236,000 | 39.973134 | 98 | 0.574281 | false | 4.04033 | false | false | false |
craneworks/python-pyroute2 | pyroute2/devlink.py | 1 | 2147 | import logging
from pyroute2.netlink import NLM_F_REQUEST
from pyroute2.netlink import NLM_F_DUMP
from pyroute2.netlink.devlink import DevlinkSocket
from pyroute2.netlink.devlink import devlinkcmd
from pyroute2.netlink.devlink import DEVLINK_NAMES
log = logging.getLogger(__name__)
class DL(DevlinkSocket):
def _... | apache-2.0 | 2,995,356,431,793,696,000 | 29.671429 | 69 | 0.543549 | false | 3.875451 | false | false | false |
probcomp/cgpm | src/utils/config.py | 1 | 4181 | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2016 MIT Probabilistic Computing Project
# 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... | apache-2.0 | 4,207,421,975,917,411,300 | 35.675439 | 76 | 0.605836 | false | 3.598107 | false | false | false |
bcs-de/mezzanine-pageimages | setup.py | 1 | 1815 | #
# Copyright 2013, 2014
# by Arnold Krille for bcs kommunikationsloesungen
# <a.krille@b-c-s.de>
#
# 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:... | apache-2.0 | 157,210,935,039,437,280 | 40.25 | 80 | 0.699725 | false | 3.544922 | false | false | false |
aarif4/wireless_positioning_system | wps_ros/nodes/wifi_logger.py | 1 | 4249 | #!/usr/bin/env python
'''
This ROS Node records all of the available Wi-Fi Scans received from Wavemon and saves it in a file named
Wavemon_Log_YYY-MM-DD_HHMM.log. This log file is saved in wherever the user desires it by passing it as a
parameter called "log_folder". Else, the log file is saved in the home director... | bsd-3-clause | -5,401,334,931,768,648,000 | 32.195313 | 223 | 0.702518 | false | 3.555649 | false | false | false |
DistributedSystemsGroup/zoe | zoe_master/gelf_listener.py | 1 | 3184 | #!/usr/bin/python3
# Copyright (c) 2016, Daniele Venzano
#
# 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 l... | apache-2.0 | -1,562,007,374,333,840,400 | 35.181818 | 146 | 0.648241 | false | 3.651376 | false | false | false |
reimandlab/ActiveDriverDB | website/helpers/views.py | 1 | 6880 | from copy import copy
from flask import jsonify
from flask import request
from sqlalchemy import and_
from sqlalchemy import asc
from sqlalchemy import desc
from sqlalchemy.exc import StatementError
from sqlalchemy.ext.associationproxy import AssociationProxy
from database import db, fast_count
from helpers.filters.ma... | lgpl-2.1 | 8,200,000,686,788,237,000 | 32.560976 | 97 | 0.561337 | false | 4.928367 | false | false | false |
xunxunzgq/open-hackathon-bak_01 | open-hackathon-server/src/hackathon/constants.py | 1 | 9034 | # -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softw... | mit | -8,048,698,901,031,551,000 | 28.42671 | 122 | 0.668807 | false | 3.910823 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-servicefabric/azure/servicefabric/models/services_health_evaluation.py | 1 | 3124 | # 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 | -4,146,688,202,415,256,000 | 47.8125 | 178 | 0.675736 | false | 4.32687 | false | false | false |
mattmcd/PyAnalysis | mda/finance.py | 1 | 2262 | from __future__ import division
import os
import re
import time
import boto3
from tqdm import tqdm
import mda
from mda.io.google_finance import LseReader
from mda.io.s3 import S3Proxy
__author__ = 'mattmcd'
dataLoc = mda.data_dir('FTSE100')
def get_all(do_copy=False):
"""Get last 10 days of 1 minute intraday... | apache-2.0 | -5,846,792,025,987,146,000 | 24.41573 | 75 | 0.593722 | false | 3.396396 | false | false | false |
Nazruden/L3-ProjetReseau | grid.py | 1 | 2174 |
symbols = [' ', 'O', 'X']
EMPTY = 0
J1 = 1
J2 = 2
NB_CELLS=9
class grid:
cells = []
def __init__(self):
self.cells = []
for i in range(NB_CELLS):
self.cells.append(EMPTY)
def play(self, player, cellNum):
assert(0<= cellNum and cellNum < NB_CELLS)
assert(self.... | mit | -6,278,201,934,140,995,000 | 27.605263 | 132 | 0.485741 | false | 3.569787 | false | false | false |
jne0915/Haloes | person/views.py | 1 | 12712 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.sessions.models import Session
from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exempt
from .forms import ... | gpl-3.0 | -2,147,021,195,785,344,300 | 34.311111 | 102 | 0.53831 | false | 4.112585 | false | false | false |
vikasTmz/cao-utils | blenderVISP/treeview_cylinders.py | 1 | 6594 | import bpy
from bpy.props import IntProperty, CollectionProperty
from bpy.types import Panel, UIList
# #########################################
# Register
# #########################################
def get_activeSceneObject():
return bpy.context.scene.objects.active.name
class Uilist_actions_cylinder(bpy.types... | gpl-3.0 | -8,382,457,813,764,497,000 | 34.836957 | 118 | 0.568092 | false | 3.613151 | false | false | false |
untergeek/es_stats_zabbix | es_stats_zabbix/cli/get_nodes.py | 1 | 2170 | """
Click module to launch node LLD gathering
"""
from sys import exit
import click
from es_stats_zabbix import __version__
from es_stats_zabbix.exceptions import FailedExecution, NotFound
from es_stats_zabbix.helpers.utils import do_request, log_to_listener, open_port
CONTEXT_SETTINGS = dict(help_option_names=['-h',... | apache-2.0 | 3,932,955,879,487,563,300 | 35.166667 | 90 | 0.634101 | false | 3.703072 | false | false | false |
antoinecarme/pyaf | tests/multi_dimensional_engine/test_multi_dimensional_air_passengers.py | 1 | 1550 | import pandas as pd
import numpy as np
import pyaf.ForecastEngine as autof
import pyaf.Bench.TS_datasets as tsds
b1 = tsds.load_airline_passengers()
df = b1.mPastData
df.head()
lEngine = autof.cForecastEngine()
lEngine
H = b1.mHorizon;
# lEngine.mOptions.enable_slow_mode();
# lEngine.mOptions.mDebugPerformance = ... | bsd-3-clause | -7,139,851,619,651,500,000 | 26.678571 | 71 | 0.726452 | false | 2.495974 | false | false | false |
BlackHole/enigma2-obh10 | lib/python/Components/Converter/Streaming2.py | 2 | 1126 | from Converter import Converter
from Components.Element import cached
from pprint import pprint
# the protocol works as the following:
# lines starting with '-' are fatal errors (no recovery possible),
# lines starting with '=' are progress notices,
# lines starting with '+' are PIDs to record:
# "+d:[p:t[,p:t...]]"... | gpl-2.0 | 7,345,038,617,032,228,000 | 27.871795 | 103 | 0.598579 | false | 3.341246 | false | false | false |
robodasha/research_papers | research_papers/tools/parscit_extractor.py | 1 | 3672 |
import re
import os.path
import logging
import subprocess
import research_papers.logutils as logutils
__author__ = 'robodasha'
__email__ = 'damirah@live.com'
class ParscitExtractor(object):
def __init__(self, parscit_dir):
"""
:param parscit_dir: directory where ParsCit is installed
"... | mit | -4,888,883,184,914,629,000 | 36.469388 | 80 | 0.587691 | false | 4.089087 | false | false | false |
mvaled/sentry | src/sentry/analytics/event.py | 2 | 3221 | from __future__ import absolute_import, print_function
__all__ = ("Attribute", "Event", "Map")
import six
from uuid import uuid1
from base64 import b64encode
from collections import Mapping
from django.utils import timezone
from sentry.utils.dates import to_timestamp
class Attribute(object):
def __init__(self... | bsd-3-clause | -8,344,939,886,867,566,000 | 27.758929 | 100 | 0.571562 | false | 4.24934 | false | false | false |
Yushenbo/Python_notes | traits/traitsListener.py | 1 | 1067 | #-*- coding:utf-8 -*-
#########################################################################
# File Name: traitsListener.py
# Author: Nichol.Shen
# mail: nichol_shen@yahoo.com
#########################################################################
#!/usr/bin/env python3
from traits.api import HasTraits, Str, Int
... | gpl-3.0 | -5,560,415,951,059,783,000 | 23.25 | 78 | 0.523899 | false | 3.223565 | false | false | false |
tomashaber/raiden | raiden/tests/benchmark/profile_transfer.py | 1 | 8581 | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import namedtuple
from ethereum import slogging
from raiden.settings import DEFAULT_SETTLE_TIMEOUT
from raiden.utils import sha3, profiling
from raiden.network.transport import UDPTransport
from raiden.network.discovery import Discovery
f... | mit | -4,626,534,663,286,842,000 | 28.088136 | 92 | 0.614847 | false | 3.872292 | true | false | false |
pyrrho314/recipesystem | trunk/dontload-astrodata_Gemini/RECIPES_Gemini/primitives/primitives_F2.py | 1 | 10743 | import numpy as np
from astrodata.adutils import logutils
from gempy.adlibrary.manipulate_ad import remove_single_length_dimension
from gempy.gemini import gemini_tools as gt
from primitives_GEMINI import GEMINIPrimitives
class F2Primitives(GEMINIPrimitives):
"""
This is the class containing all of the primiti... | mpl-2.0 | -4,384,992,145,584,854,500 | 42.670732 | 79 | 0.558596 | false | 4.785301 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.