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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
creativewild/ansible | lib/ansible/executor/task_executor.py | 1 | 20284 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | -4,145,128,364,003,626,500 | 41.258333 | 134 | 0.597515 | false | 4.464891 | false | false | false |
sudheerchintala/LearnEraPlatForm | common/test/acceptance/pages/lms/discussion.py | 1 | 17170 | from contextlib import contextmanager
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from .course_page import CoursePage
class DiscussionPageMixin(object):
def is_ajax_finished(self):
return self.browser.execute_script("return jQuery.active") == 0
class Discussi... | agpl-3.0 | 4,691,145,072,540,507,000 | 39.02331 | 113 | 0.629062 | false | 4.016374 | false | false | false |
mmetak/streamlink | src/streamlink/plugins/btv.py | 1 | 2617 | from __future__ import print_function
import re
from streamlink import PluginError
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
from streamlink.utils import parse_json
from streamlink.plugin import PluginO... | bsd-2-clause | 2,713,895,647,547,741,700 | 36.385714 | 90 | 0.602216 | false | 3.738571 | false | false | false |
clburlison/scripts | clburlison_scripts/reset_location_services/reset_location_services.py | 1 | 2621 | #!/usr/bin/python
"""Reset location services to factory settings."""
import os
import platform
import subprocess
from distutils.version import LooseVersion
def root_check():
"""Check for root access."""
if not os.geteuid() == 0:
exit("This must be run with root access.")
def os_vers():
"""Retr... | mit | 5,328,378,968,371,180,000 | 30.578313 | 79 | 0.584128 | false | 4.051005 | false | false | false |
pmeier82/BOTMpy | botmpy/common/mcfilter/mcfilter_py.py | 1 | 3655 | # -*- coding: utf-8 -*-
#_____________________________________________________________________________
#
# Copyright (c) 2012 Berlin Institute of Technology
# All rights reserved.
#
# Developed by: Philipp Meier <pmeier82@gmail.com>
# Neural Information Processing Group (NI)
# School for Ele... | mit | -2,978,241,571,100,569,000 | 42.511905 | 78 | 0.633105 | false | 3.827225 | false | false | false |
samedder/azure-cli | src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/sdk/models/event_subscription_update_parameters.py | 2 | 1762 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | 6,089,224,230,908,492,000 | 41.97561 | 94 | 0.573212 | false | 5.213018 | false | false | false |
universalcore/unicore-cms-django | cms/migrations/0012_auto__add_field_category_site.py | 1 | 7929 | # -*- 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):
def forwards(self, orm):
# Adding field 'Category.site'
db.add_column(u'cms_category', 'site',
... | bsd-2-clause | -1,862,634,399,049,781,500 | 77.514851 | 195 | 0.550259 | false | 3.566802 | false | false | false |
digital-scholarship/dp-ready | scrape-model/scrape-model.py | 1 | 7279 | # scrapes the website for the CESSDA SAW Capability Maturity Model
# and stores it in a json file
# @author Peter Neish
import requests
import re
import json
from bs4 import BeautifulSoup
startpage = "https://cessda.net/eng/CESSDA-Services/Projects/Current-projects/CESSDA-SaW/Work-Packages/WP3/CESSDA-CDM/Part-1-CRA1... | mit | -1,089,821,406,743,980,200 | 35.577889 | 160 | 0.477401 | false | 4.105471 | false | false | false |
harkishan81001/multi-device-login | multidevice/permissions.py | 1 | 1662 | from __future__ import absolute_import
# rest framework imports
from rest_framework import permissions
from rest_framework import status
# multi device login imports
from disable_multidevice_login.login_manager import UserLoginState
from disable_multidevice_login.exceptions import MultiLogginFound
from disable_multid... | gpl-3.0 | 9,183,479,781,517,224,000 | 36.772727 | 78 | 0.634176 | false | 5.12963 | false | false | false |
kelvinwong-ca/django-likert-field | test_projects/django14/django14/settings.py | 1 | 5384 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
LIKERT_DIR = os.path.join(os.path.dirname(os.path.dirname(BASE_DIR)))
sys.path.append(BASE_DIR)
sys.path.append(LIKERT_DIR)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = ... | bsd-3-clause | 8,579,683,196,682,429,000 | 28.911111 | 79 | 0.688336 | false | 3.505208 | false | false | false |
ZeromusSoftware/RPi3500 | big_data/pi_performance/pi_performance.py | 1 | 2243 | import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.stats import pearsonr
#we are going to calculate pi with an integration of
#arctan(x)' between 0 and 1 (that calculates pi/4)
def darctan(x) : # we introduce the arctan(x)'function
result = 1/(1+x**2)
return result
def pi(n) : # n will be ... | gpl-2.0 | 8,796,925,081,029,402,000 | 23.933333 | 85 | 0.60856 | false | 2.974801 | false | false | false |
mikar/projects | various/iap_8_fileops.py | 1 | 6563 | #!/usr/bin/env python2
# *-* coding: utf-8 *-*
"Interactive Python Part 8: File Operations"
def withfor():
qbfile = open("lib/qbdata.txt","r")
for line in qbfile:
values = line.split()
print 'QB ', values[0], values[1], 'had a rating of ', values[10]
qbfile.close()
def withwhile():
in... | mit | 1,293,679,725,382,796,000 | 34.543478 | 88 | 0.575229 | false | 3.475027 | false | false | false |
zorchenhimer/NoudaEngine | lib/Projectiles.py | 1 | 3726 | #!/usr/bin/python
import math
import pygame
from lib.Globals import UnitType, Debug, Vars, LoadImage
import lib.Effects
class Projectile(pygame.sprite.Sprite):
""" All projectiles will inherit this class for a basic projectile. """
def __init__(self, d=None, l=-1, offset=0):
pygame.sprite.Sprite.__ini... | mit | 9,049,014,380,063,452,000 | 30.846154 | 141 | 0.552603 | false | 3.50188 | false | false | false |
joberreiter/pyload | module/plugins/hoster/OpenloadIo.py | 1 | 1984 | # -*- coding: utf-8 -*-
import json
import re
from module.network.RequestFactory import getURL
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OpenloadIo(SimpleHoster):
__name__ = "OpenloadIo"
__type__ = "hoster"
__version__ = "0.10"
__status__ = "testing"
... | gpl-3.0 | -4,496,881,646,805,186,600 | 28.61194 | 96 | 0.600302 | false | 3.312187 | false | false | false |
dgvncsz0f/pong | bin/haproxy.py | 1 | 1796 | #!/usr/bin/python
import os
import sys
import time
import select
import socket
import hashlib
import requests
import resolver
import tempfile
CONSUL = os.environ.get("consul", "127.0.0.1")
HAPROXY_CFG = "/tmp/haproxy.cfg"
HAPROXY_PID = "/tmp/haproxy.pid"
def haproxy_cfg ():
cfg = """
global
user haproxy
... | unlicense | -4,793,332,377,483,079,000 | 20.638554 | 94 | 0.577951 | false | 3.064846 | false | false | false |
SivagnanamCiena/nxapi-learning-labs | python/nxapi/render.py | 1 | 7189 | # Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -2,834,888,137,188,184,000 | 36.638743 | 122 | 0.633746 | false | 3.752088 | false | false | false |
atallah-lab/simple_simulation | src/population.py | 1 | 2045 | # -*- coding: utf-8 -*-
import random
import src.constants as c
from src.allele import Allele
from src.locus import Locus
from src.individual import Individual
try:
from tabulate import tabulate
except ImportError:
raise ImportError('>> pip install tabulate')
class Population(object):
"""
docstring
... | mit | -5,200,725,967,591,252,000 | 27.402778 | 66 | 0.603423 | false | 3.955513 | false | false | false |
OstapHEP/ostap | ostap/math/bernstein.py | 1 | 47805 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file ostap/math/bernstein.py
# Module with some useful utilities for dealing with Bernstein polynomials:
# - control_polygon : get a control polygon for Bernstein polynomial
# - upper_co... | bsd-3-clause | -7,008,114,139,077,938,000 | 33.466474 | 96 | 0.463571 | false | 3.451126 | false | false | false |
orbekk/erebus | pywebdav/DAV/propfind.py | 1 | 11671 | #!/usr/bin/env python
"""
python davserver
Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version... | gpl-2.0 | 4,072,723,139,046,746,600 | 31.783708 | 94 | 0.549482 | false | 4.128405 | false | false | false |
seraphln/wheel | wheel/modules/accounts/models.py | 1 | 5351 | #!/usr/bin/env python
# coding=utf8
import logging
from random import randint
from flask import url_for
from wheel.core.db import db
from wheel.core.models.custom_values import HasCustomValue
from wheel.utils.text import abbreviate, slugify
from flask.ext.security import UserMixin, RoleMixin
from flask.ext.security.u... | gpl-3.0 | -5,732,366,026,788,182,000 | 29.930636 | 76 | 0.633153 | false | 3.741958 | false | false | false |
david672orford/GPX_Trip_Planner | Code/gpx_router_osrm.py | 1 | 2570 | # gpx_router_mapquest.py
# Copyright 2013, Trinity College
# Last modified: 17 April 2013
import urllib2
import json
from gpx_data_gpx import GpxRoutePoint
class GpxRouter(object):
url = 'http://router.project-osrm.org/viaroute'
def flesh_out(self, route):
print "Route:", route
locations = []
for point in... | gpl-2.0 | 3,847,888,440,606,158,000 | 26.634409 | 207 | 0.603502 | false | 2.927107 | false | false | false |
silenius/amnesia | amnesia/modules/account/views/recover_password.py | 1 | 2340 | # -*- coding: utf-8 -*-
from marshmallow import ValidationError
from pyramid.httpexceptions import HTTPNotFound
from pyramid.httpexceptions import HTTPBadRequest
from pyramid.view import view_defaults
from pyramid.view import view_config
from amnesia.utils import recaptcha
from amnesia.utils.forms import render_form... | bsd-2-clause | -4,324,061,750,064,062,000 | 31.054795 | 82 | 0.663675 | false | 4.069565 | false | false | false |
Thraxis/pymedusa | sickbeard/server/web/core/base.py | 1 | 17521 | # coding=utf-8
from __future__ import unicode_literals
import json
import datetime
import os
import re
import time
import traceback
from concurrent.futures import ThreadPoolExecutor
from mako.exceptions import RichTraceback
from mako.lookup import TemplateLookup
from mako.runtime import UNDEFINED
from mako.template i... | gpl-3.0 | 2,158,213,775,862,162,200 | 35.200413 | 117 | 0.572285 | false | 4.075599 | false | false | false |
gregstarr/PyGPS | Examples/CoordTransforms3.py | 1 | 20672 | #!/usr/bin/env python
"""
Coordinate Transforms
This will hold a number of different functions that can be used for coordinate transforms.
Created on Sat Nov 1 19:09:47 2014
@author: John Swoboda
"""
from __future__ import division,absolute_import
import numpy as np
def sphereical2Cartisian(spherecoords):
... | agpl-3.0 | 1,276,577,442,360,419,600 | 38.139806 | 90 | 0.573384 | false | 3.059346 | false | false | false |
everypony/ponyFiction | ponyFiction/views/story.py | 1 | 7864 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.core.files.base import ContentFile
from django.core.paginator import Paginator
from django.http import Http404
from django.http.response impo... | gpl-3.0 | -4,080,476,214,228,066,000 | 30.384615 | 145 | 0.663958 | false | 3.504521 | false | false | false |
GeoscienceAustralia/PF3D | testing/test_utilities.py | 1 | 5002 | import unittest
from aim.utilities import *
from numpy import allclose
from math import sqrt
class Test_utilities(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_wind_field(self):
"""test_wind_field - Test conversions to windfield
Tes... | gpl-3.0 | 9,174,126,028,282,564,000 | 36.893939 | 103 | 0.522991 | false | 3.838833 | true | false | false |
dNG-git/pas_upnp | src/dNG/data/upnp/search/resources.py | 1 | 11665 | # -*- coding: utf-8 -*-
"""
direct PAS
Python Application Services
----------------------------------------------------------------------------
(C) direct Netware Group - All rights reserved
https://www.direct-netware.de/redirect?pas;upnp
The following license agreement remains valid unless any additions or
changes a... | gpl-2.0 | 5,518,214,330,811,919,000 | 31.951977 | 196 | 0.604458 | false | 4.057391 | false | false | false |
BespokeInsights/python-intraspector | intraspector/intraspector.py | 1 | 1103 | from functools import wraps
import inspect
import time
class Intraspector():
def __init__(self, debug=True):
self._trace = []
self._debug=debug
def record(self):
def record_decorator(func):
def wrapper(*args, **kwargs):
if self._debug:
tr... | mit | 7,926,381,435,234,366,000 | 30.514286 | 71 | 0.485041 | false | 4.75431 | false | false | false |
tantalishe/object_detection | classificator/make_sklearn_dataset.py | 1 | 1853 | import cv2
import numpy as np
import math
import features as ft
NUMBER_TRAINING_EXAMPLES = 150
NUMBER_TEST_EXAMPLES = 10
NUMBER_CLASSES = 4
FEATURE_TYPE = "humoments"
file_path_list = ["data/dataset1/scew_test/", "data/dataset1/nut/", "data/dataset1/profile_20/", "data/dataset1/profile_40/"]
file_saving_path = "data/"... | gpl-3.0 | -1,925,831,615,177,840,600 | 28.887097 | 125 | 0.716136 | false | 2.837672 | true | false | false |
luci/luci-py | appengine/isolate/handlers_frontend.py | 2 | 11267 | # Copyright 2012 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""This module defines Isolate Server frontend url handlers."""
import collections
import datetime
import json
import logging
import webapp2
im... | apache-2.0 | 4,042,335,707,646,606,000 | 29.700272 | 80 | 0.654034 | false | 3.639212 | true | false | false |
boakley/robotframework-hub | setup.py | 1 | 1675 | """
To push a new version to PyPi, update the version number
in rfhub/version.py and then run the following commands:
$ python setup.py sdist
$ python3 -m twine upload dist/*
"""
from setuptools import setup
filename = 'rfhub/version.py'
exec(open(filename).read())
setup(
name = 'robotframe... | apache-2.0 | -5,574,661,520,951,799,000 | 31.211538 | 74 | 0.573731 | false | 4.026442 | false | false | false |
marionleborgne/nupic.research | tests/extended_temporal_memory/etm_apical_tiebreak_cpp_test.py | 1 | 3495 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2017, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | -6,744,716,341,160,371,000 | 37.833333 | 73 | 0.675823 | false | 4.401763 | true | false | false |
mespe/SolRad | collection/obtain-solardata-NSRDB-61-90.py | 1 | 2120 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 23 12:18:13 2017
@author: Henry Kvinge
File takes relevant solar radiation data from 1961-1990 from NSRDB website,
puts it into a dataframe and saves it as a .csv file.
"""
from urllib.request import urlopen #To read text from url
import pandas a... | mit | -2,022,214,363,162,770,000 | 32.650794 | 99 | 0.648113 | false | 3.150074 | false | false | false |
s0hvaperuna/Not-a-bot | utils/tzinfo.py | 1 | 34604 | # All timezones are flipped so negative utc offsets are positive and the other
# way around. This is because we flip the sign after parse because
# UTC+5 is considered as a -5 offset
tz_str = '''12 Y
-11 X NUT SST
-10 W CKT HAST HST TAHT TKT
-9 V AKST GAMT GIT HADT HNY
-8 U AKDT CIST HAY HNP PST PT
-7 T HAP HNR MST PDT... | mit | 1,176,140,479,478,643,700 | 31.648725 | 78 | 0.596269 | false | 2.391575 | false | false | false |
auvsi-suas/interop | client/tools/mavlink_proxy.py | 1 | 3580 | # Module to receive MAVLink packets and forward telemetry via interoperability.
# Packet details at http://mavlink.org/messages/common#GLOBAL_POSITION_INT.
import logging
import threading
import time
from auvsi_suas.proto.interop_api_pb2 import Telemetry
from pymavlink import mavutil
logger = logging.getLogger(__nam... | apache-2.0 | -4,035,675,240,742,567,000 | 35.161616 | 81 | 0.594413 | false | 4.480601 | false | false | false |
quantumlib/qsim | qsimcirq/qsim_simulator.py | 1 | 21328 | # Copyright 2019 Google LLC. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -8,385,725,218,125,195,000 | 40.333333 | 88 | 0.603807 | false | 4.165625 | false | false | false |
radez/packstack | packstack/plugins/prescript_000.py | 1 | 15384 | """
Plugin responsible for setting OpenStack global options
"""
import glob
import logging
import os
import uuid
from packstack.installer import processors
from packstack.installer import utils
from packstack.installer import validators
from packstack.modules.common import filtered_hosts
from packstack.modules.osplu... | apache-2.0 | 8,762,156,635,729,571,000 | 50.79798 | 284 | 0.470944 | false | 4.358074 | true | false | false |
vmx/spring | spring/settings.py | 1 | 1404 | from urlparse import urlparse
from logger import logger
class WorkloadSettings(object):
def __init__(self, options):
self.creates = options.creates
self.reads = options.reads
self.updates = options.updates
self.deletes = options.deletes
self.cases = 0 # Stub for library ... | apache-2.0 | 1,763,543,457,160,193,500 | 28.87234 | 69 | 0.632479 | false | 4.280488 | false | false | false |
maxive/erp | odoo/addons/base/models/ir_qweb_fields.py | 1 | 17897 | # -*- coding: utf-8 -*-
import base64
import re
from collections import OrderedDict
from io import BytesIO
from odoo import api, fields, models, _
from PIL import Image
import babel
from odoo.tools import html_escape as escape, posix_to_ldml, safe_eval, float_utils, format_date, pycompat
import logging
_logger = loggi... | agpl-3.0 | -1,393,294,241,762,286,000 | 34.651394 | 123 | 0.617981 | false | 3.883898 | false | false | false |
google/telluride_decoding | telluride_decoding/ingest.py | 1 | 48470 | # Copyright 2019 Google 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 in writing, ... | apache-2.0 | 5,012,494,657,477,342,000 | 36.867188 | 98 | 0.658696 | false | 3.676426 | false | false | false |
dodgyrabbit/midi-light-py | timer.py | 1 | 1841 | from __future__ import division
from animation import Animation
class Timer(Animation):
"""A timer implementation that tracks minutes up to an hour"""
def __init__(self):
Animation.__init__(self)
self._start = self._milliseconds()
self._hide_until = 0
def get_frame(self):
"... | mit | 8,264,527,731,432,498,000 | 38.170213 | 117 | 0.604563 | false | 4.261574 | false | false | false |
Haunter17/MIR_SU17 | exp8/exp8g_none.py | 1 | 7699 | import numpy as np
import tensorflow as tf
import h5py
from sklearn.preprocessing import OneHotEncoder
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import time
import scipy.io
# Functions for initializing neural nets parameters
def weight_variable(shape, var_name):
initial = ... | mit | 6,492,603,434,768,493,000 | 30.770213 | 97 | 0.650864 | false | 2.819114 | false | false | false |
lcoandrade/DsgTools | gui/CustomWidgets/ConnectionWidgets/ServerConnectionWidgets/exploreServerWidget.py | 1 | 9179 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
ExploreServerWidget
A QGIS plugin
Brazilian Army Cartographic Production Tools
-------------------
begin : 2015-08-12
gi... | gpl-2.0 | -8,560,350,598,111,780,000 | 40.722727 | 149 | 0.562153 | false | 4.640546 | true | false | false |
JohanComparat/nbody-npt-functions | bin/bin_SMHMr/MD10_add_4MOST_COSMO.py | 1 | 11983 | from astropy.cosmology import FlatLambdaCDM
import astropy.units as u
cosmoMD = FlatLambdaCDM(H0=67.77*u.km/u.s/u.Mpc, Om0=0.307115, Ob0=0.048206)
import glob
import astropy.io.fits as fits
import os
import time
import numpy as n
import sys
# specific functions
from scipy.stats import norm
from scipy.integrate import... | cc0-1.0 | 9,215,100,900,541,068,000 | 40.037671 | 155 | 0.639656 | false | 2.127663 | false | false | false |
prataprc/tayra | tayra/test/stdttl/ref/forblock.ttl.py | 1 | 10731 | import imp
from io import StringIO
from pluggdapps.plugin import Plugin, implements
from tayra import BaseTTLPlugin
def __traceback_decorator__( frames ):
from copy import deepcopy
from os.path import basename
def _map2ttl( frame ):
filename = frame.fil... | gpl-3.0 | -7,378,244,038,086,275,000 | 37.740072 | 153 | 0.491566 | false | 2.924775 | false | false | false |
p4u/projecte_frigos | connection.py | 1 | 1503 | import socket
import time
class Client():
def __init__(self, host, port):
global dns
self.host = host
self.ip = host
self.port = int(port)
self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.conn.setblocking(1)
def connect(self):
self.conn... | agpl-3.0 | 3,323,016,978,920,570,000 | 25.368421 | 71 | 0.580838 | false | 3.692875 | false | false | false |
skuda/client-python | kubernetes/client/models/v1_gce_persistent_disk_volume_source.py | 1 | 6987 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | 2,851,621,172,868,418,000 | 35.015464 | 346 | 0.608416 | false | 4.117266 | false | false | false |
Sound-Colour-Space/sound-colour-space | website/apps/accounts/models.py | 1 | 5101 | import uuid
import os
from django.conf import settings
from django.db import models
from django.utils.text import slugify
from django.utils.translation import ugettext as _
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
from django.core.mail import send_mail
from django.core... | mit | -2,861,263,552,447,284,700 | 33.938356 | 90 | 0.644383 | false | 4.233195 | false | false | false |
GkAntonius/feynman | feynman/core/vertex.py | 1 | 5315 |
from copy import deepcopy
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.patches as mpa
import matplotlib.text as mpt
from . import Drawable
from .. import vectors
from .. import colors
from ..constants import tau
__all__ = ['Vertex', 'Verticle']
class Vertex(Drawabl... | gpl-3.0 | 4,032,931,072,829,275,000 | 23.159091 | 79 | 0.539229 | false | 3.716783 | false | false | false |
buffer/thug | thug/DOM/W3C/HTML/HTMLTableElement.py | 1 | 4323 | #!/usr/bin/env python
import logging
import bs4
from thug.DOM.W3C.Core.DOMException import DOMException
from .HTMLElement import HTMLElement
from .HTMLCollection import HTMLCollection
from .HTMLTableRowElement import HTMLTableRowElement
from .HTMLTableSectionElement import HTMLTableSectionElement
from .HTMLTableCapt... | gpl-2.0 | -8,085,385,491,594,000,000 | 31.261194 | 94 | 0.630581 | false | 3.915761 | false | false | false |
sidzan/netforce | netforce_account_report/netforce_account_report/models/report_gl.py | 2 | 9430 | # Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | mit | 7,012,898,863,108,165,000 | 42.059361 | 131 | 0.531707 | false | 3.883855 | false | false | false |
BoulderBTC/palantir | palantir/tasks.py | 1 | 3149 | from celery import Celery
import requests
import json
from palantir import celeryconfig
app = Celery('tasks')
ports_dict = {
"litecoin": "9327",
"bitcoin": "9332",
"auroracoin": "12347",
"dogecoin": "22550",
"spaincoin": "25490",
"vertcoin": "9171",
"feathercoin": "19327",
"terracoin":... | gpl-3.0 | -9,141,975,276,367,674,000 | 29.872549 | 94 | 0.51826 | false | 3.657375 | false | false | false |
Bolt64/my_code | algorithms/minimum_matrix.py | 1 | 1581 | #!/usr/bin/env python3
def cost(matrix1, matrix2):
return matrix1[0]*matrix1[1]*matrix2[1]
def single_to_double(elements):
return [(elements[i], elements[i+1]) for i in range(len(elements)-1)]
def minimum_cost(i, j, matrix_array, cache=None):
if not cache:
cache={}
if not (i,j) in cache:
... | mit | -4,083,681,545,509,387,300 | 35.767442 | 187 | 0.545225 | false | 3.314465 | false | false | false |
potatolondon/djangoappengine-1-4 | storage.py | 1 | 8327 | import mimetypes
import os
import re
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.conf import settings
from django.core.files.base import File
from django.core.files.storage import Storage
from django.core.files.uploadedfile import UploadedFile
from django.... | bsd-3-clause | 7,697,738,799,666,931,000 | 33.127049 | 134 | 0.610064 | false | 4.071883 | false | false | false |
daiz713/pxchar | bar.py | 1 | 4540 | # -*- coding: utf-8 -*-
# Project pxchar
import sys
import os.path
from PIL import Image
# バージョンは一文字で表す
VERSION = '0';
# color辞書(とりあえず決め打ち)
# 外出ししたい
COLORS = {
# pxchar制御文字
"??": (255, 255, 255), # 不明な文字
"<" : (0, 0, 0), # 終端文字
">" : (69,90,100), # ファイル改行
"%" : (255,235,59),
#... | mit | -6,593,953,283,899,193,000 | 21.222222 | 82 | 0.46725 | false | 2.141328 | false | false | false |
foligny/browsershots-psycopg2 | shotserver/shotserver04/urls.py | 1 | 2795 | # browsershots.org - Test your web design in different browsers
# Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org>
#
# Browsershots 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 ... | gpl-3.0 | 2,774,106,294,563,671,000 | 34.833333 | 78 | 0.67585 | false | 3.69709 | false | false | false |
corcra/troll-interconnector | madbot/tweep.py | 1 | 1735 | #!/bin/python
# Class for tweeps
#
# HOW TO OOP ?
import numpy as np
import database.db as db
import database.models as models
class tweep(object):
"""
oh god
"""
def __init__(self, tweep_author):
"""
wat
"""
# need interaction with the database here
# for now ... | mit | -8,321,547,094,741,981,000 | 33.019608 | 85 | 0.609222 | false | 3.872768 | false | false | false |
leighmacdonald/msort | msort/log.py | 1 | 2944 | """
Module logging facilities. If the colorama module is found, colourized output will be used
"""
from logging import StreamHandler, getLogger as realGetLogger, Formatter, INFO
try:
from colorama import Fore, Back, init, Style
class ColourStreamHandler(StreamHandler):
""" A colorized output SteamHand... | mit | -5,530,493,429,133,026,000 | 29.360825 | 97 | 0.588315 | false | 4.42042 | false | false | false |
M4rtinK/pyside-android | tests/QtGui/qstandarditemmodel_test.py | 1 | 1687 | import unittest
import sys
from PySide.QtGui import QStandardItemModel, QWidget, QStandardItem
from helper import UsesQApplication
class QStandardItemModelTest(UsesQApplication):
def setUp(self):
super(QStandardItemModelTest, self).setUp()
self.window = QWidget()
self.model = QStandardItemM... | lgpl-2.1 | -8,887,790,254,156,196,000 | 25.777778 | 72 | 0.56965 | false | 3.825397 | true | false | false |
opencleveland/large-lots | lots_client/views.py | 1 | 13095 | # -*- coding: utf-8 -*
import re
from django.shortcuts import render
from django.conf import settings
from django import forms
from django.utils import timezone
from django.template import Context
from django.template.loader import get_template
from django.core.mail import EmailMultiAlternatives
from lots_admin.models... | mit | 8,083,484,639,441,323,000 | 41.093248 | 146 | 0.599114 | false | 3.823306 | false | false | false |
looooo/pivy | scons/scons-local-1.2.0.d20090919/SCons/Scanner/Dir.py | 1 | 3802 | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# 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 limitati... | isc | 4,816,880,708,093,967,000 | 33.563636 | 89 | 0.681483 | false | 3.655769 | false | false | false |
botswana-harvard/tshilo-dikotla | td_maternal/forms/maternal_medical_history_form.py | 1 | 14215 | from edc_constants.constants import NEG, YES, NOT_APPLICABLE, POS, NO
from django import forms
from td_maternal.classes import MaternalStatusHelper
from ..models import MaternalMedicalHistory, AntenatalEnrollment
from .base_maternal_model_form import BaseMaternalModelForm
class MaternalMedicalHistoryForm(BaseMater... | gpl-2.0 | 1,011,200,178,735,730,800 | 48.529617 | 127 | 0.586001 | false | 4.298458 | false | false | false |
beschulz/kyototycoon | bench/benchmark.py | 1 | 3361 | # -*- coding: utf-8 -*-
#from pykt import *
from pykt import KyotoTycoon as kt1
from kyototycoon import DB as kt2
from pykt_emu import KyotoTycoon as kt3
import timeit
from cPickle import dumps, loads
key = "A" * 12
val = "B" * 1024
def bench_set(Impl):
db = Impl()
db.open()
ret = db.set(key, val)
assert ret ==... | gpl-2.0 | -7,304,983,524,441,406,000 | 24.08209 | 94 | 0.629575 | false | 2.493323 | false | false | false |
Emptyset110/dHydra | dHydra/web.py | 1 | 4635 | # -*- coding: utf-8 -*-
"""
# Created on
# @author:
# @contact:
"""
import tornado.ioloop
import tornado.web
import os
from dHydra.console import *
# 首页根目录
class IndexHandler(tornado.web.RequestHandler):
def prepare(self):
"""
单入口做URI路由转发,交给对应Handler处理
"""
request = self.request
... | apache-2.0 | -3,358,992,612,076,791,300 | 25.982353 | 79 | 0.450403 | false | 3.999128 | false | false | false |
graemian/ami-mooc-pilot | controllers/lessons.py | 1 | 29187 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -112,122,820,367,161,950 | 36.133588 | 80 | 0.594785 | false | 4.025793 | false | false | false |
CSC301H-Fall2013/Ultra-Remote-Medicine | sample/patient.py | 1 | 3556 | from sample.forms import NewPatientForm
from sample.models import Patient
from django.db import IntegrityError
from django.http import HttpResponseServerError, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from utilities import create_case_attributes
fro... | mit | -4,869,231,119,131,909,000 | 33.192308 | 71 | 0.602643 | false | 4.373924 | false | false | false |
damienjones/django-crispy-forms | crispy_forms/templatetags/crispy_forms_field.py | 1 | 5489 | try:
from itertools import izip
except ImportError:
izip = zip
from django import forms
from django import template
from django.template import loader, Context
from django.conf import settings
from crispy_forms.utils import TEMPLATE_PACK, get_template_pack
register = template.Library()
@register.filter
def... | mit | -5,830,010,719,815,975,000 | 28.831522 | 103 | 0.617963 | false | 4.056911 | false | false | false |
unreal666/outwiker | src/outwiker/actions/movepageup.py | 3 | 1276 | # -*- coding: utf-8 -*-
import wx
from outwiker.gui.baseaction import BaseAction
from outwiker.core.commands import testreadonly, showError
class MovePageUpAction (BaseAction):
"""
Переместить страницу на одну позицию вверх
"""
stringId = u"MovePageUp"
def __init__(self, application):
s... | gpl-3.0 | -338,937,059,167,881,860 | 26.159091 | 75 | 0.630126 | false | 3.463768 | false | false | false |
boundlessgeo/qgis-geogig-plugin | geogig/gui/dialogs/historyviewer.py | 1 | 16826 | # -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
import os
from collections import defaultdict
from qgis.core import *
from PyQt4 import QtGui, QtCore
from geogigpy.commitish import Commitish
from geogigpy.commit import Commit
from geogigpy imp... | gpl-2.0 | 1,157,881,924,646,340,000 | 42.14359 | 136 | 0.616962 | false | 4.081009 | false | false | false |
TuSimple/simpledet | config/dcn/faster_dcnv2_r50v1bc4_c5_512roi_2x.py | 1 | 7642 | from symbol.builder import FasterRcnn as Detector
from models.dcn.builder import DCNResNetC4 as Backbone
from symbol.builder import Neck
from symbol.builder import RpnHead
from symbol.builder import RoiAlign as RoiExtractor
from symbol.builder import BboxC5V1Head as BboxHead
from mxnext.complicate import normalizer_fac... | apache-2.0 | -7,541,153,723,484,994,000 | 27.095588 | 97 | 0.549333 | false | 3.502291 | true | false | false |
cleverhans-lab/cleverhans | cleverhans_v3.1.0/examples/RL-attack/train.py | 1 | 15594 | import argparse
import gym
import numpy as np
import os
import tensorflow as tf
import tempfile
import time
import json
import random
import rlattack.common.tf_util as U
from rlattack import logger
from rlattack import deepq
from rlattack.deepq.replay_buffer import ReplayBuffer, PrioritizedReplayBuffer
from rlattack.... | mit | -8,183,719,819,678,686,000 | 34.848276 | 88 | 0.542773 | false | 4.035714 | false | false | false |
zfergus/seam-erasure | server.py | 1 | 4997 | """Web UI for Seam Erasure."""
from __future__ import print_function
import os
import base64
import io
import time
import numpy
from PIL import Image
from flask import Flask, request, render_template, send_file
from seam_erasure import seam_erasure, obj_reader, util
from seam_erasure import weight_data
app = Flas... | mit | -6,626,085,965,862,245,000 | 33.462069 | 79 | 0.53272 | false | 4.013655 | false | false | false |
NaohiroTamura/ironic | ironic/objects/portgroup.py | 1 | 14666 | # coding=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 writi... | apache-2.0 | 8,349,160,439,657,494,000 | 43.308157 | 84 | 0.642847 | false | 4.307195 | false | false | false |
xZise/pywikibot-core | scripts/commonscat.py | 1 | 23771 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
With this tool you can add the template {{commonscat}} to categories.
The tool works by following the interwiki links. If the template is present on
another language page, the bot will use it.
You could probably use it at articles as well, but this isn't tested.
This bo... | mit | 8,111,609,029,133,420,000 | 42.177449 | 95 | 0.558243 | false | 3.508411 | false | false | false |
iModels/foyer | foyer/utils/io.py | 1 | 2093 | from __future__ import division, print_function
import glob
import sys
from os.path import join, split, abspath
import os
import importlib
from unittest import SkipTest
import inspect
import textwrap
import numpy as np
class DelayImportError(ImportError, SkipTest):
pass
MESSAGES = dict()
MESSAGES['mbuild'] = ... | mit | -7,546,885,162,877,998,000 | 24.216867 | 96 | 0.637363 | false | 3.971537 | false | false | false |
PinkInk/iocp | sensor-dht11-bh1750/main.py | 1 | 3115 | """
main.py for esp8266 sensornode with dht11 & bh1750
read temp, humidity & luminosity, publish to mqtt
"""
try:
import time
START_MS = time.ticks_ms()
import gc
import dht
import machine
import ujson
from bh1750 import BH1750
from umqtt.robust import MQTTClient
def log(msg, file... | mit | 1,092,302,839,204,197,500 | 24.532787 | 82 | 0.532905 | false | 3.156028 | false | false | false |
ndparker/tdi3 | tasks/_shell.py | 1 | 12531 | # -*- coding: ascii -*-
#
# Copyright 2007 - 2017
# Andr\xe9 Malo or his licensors, as applicable
#
# 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/LICENS... | apache-2.0 | -3,233,523,194,585,868,000 | 26.064795 | 78 | 0.558854 | false | 3.886787 | false | false | false |
mayeranalytics/pyUBX | ubx/UBX/ESF.py | 1 | 1590 | """Navigation result messages"""
from ..UBXMessage import initMessageClass, addGet, parseUBXPayload
import struct
from ubx import UBXESFSensor
from ..Types import U2, U4, X2, X4
@initMessageClass
class ESF:
"""Message class ESF."""
_class = 0x10
@addGet
class MEAS:
_id = 0x02
clas... | gpl-3.0 | 8,592,815,899,458,938,000 | 30.176471 | 116 | 0.575472 | false | 3.471616 | false | false | false |
funkbit/pypayex | payex/pxagreement.py | 1 | 2910 | from payex.handlers import BaseHandler
class PxAgreementHandler(BaseHandler):
"""
Base handler for PxAgreement methods.
"""
production_url = 'https://external.payex.com/pxagreement/pxagreement.asmx?WSDL'
testing_url = 'https://external.externaltest.payex.com/pxagreement/pxagreement.asmx?WSDL'
... | bsd-2-clause | 900,594,170,820,788,100 | 25.216216 | 93 | 0.581443 | false | 4.193084 | false | false | false |
avalente/appmetrics | appmetrics/statistics.py | 1 | 14635 | ## Module statistics.py
##
## Copyright (c) 2014 Antonio Valente <y3sman@gmail.com>
##
## 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
... | apache-2.0 | -5,768,493,014,501,941,000 | 27.417476 | 99 | 0.619474 | false | 3.841207 | false | false | false |
qeedquan/misc_utilities | math/controls/state-space-sim.py | 1 | 2924 | """
https://en.wikipedia.org/wiki/State-space_representation
https://www.kalmanfilter.net/modeling.html
"""
import numpy as np
from scipy.linalg import *
def expmint(A, t, nbins=100):
f = lambda x: expm(A*x)
xv = np.linspace(0, t, nbins)
result = np.apply_along_axis(f, 0, xv.reshape(1,-1))
return np... | mit | -6,902,304,522,037,159,000 | 20.035971 | 94 | 0.495896 | false | 2.252696 | false | false | false |
iw3hxn/LibrERP | l10n_it_ade/models/account_tax.py | 1 | 5648 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
# © 2017-2019 Didotech srl (www.didotech.com)
#
# This program is free software: you can redistribute it and/or modify
# it under ... | agpl-3.0 | -2,684,036,224,158,189,000 | 46.855932 | 106 | 0.60386 | false | 3.34142 | false | false | false |
steven004/pytest-autochecklog | setup.py | 1 | 1074 |
from setuptools import setup
setup(
name='pytest-autochecklog',
description='automatically check condition and log all the checks',
author='Steven LI',
author_email='steven004@gmail.com',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Li... | mit | 1,082,370,427,533,242,000 | 30.588235 | 71 | 0.588454 | false | 4.195313 | true | true | false |
nck0405/MyOwn | modules/templates/RMSAmericas/config.py | 1 | 135587 | # -*- coding: utf-8 -*-
try:
# Python 2.7
from collections import OrderedDict
except:
# Python 2.6
from gluon.contrib.simplejson.ordered_dict import OrderedDict
from gluon import current
from gluon.storage import Storage
from s3 import S3Method
RED_CROSS = "Red Cross / Red Crescent"
def config(sett... | mit | 3,934,069,570,843,834,400 | 40.718769 | 155 | 0.433511 | false | 5.060501 | false | false | false |
NeCTAR-RC/murano | murano/dsl/helpers.py | 1 | 17406 | # Copyright (c) 2014 Mirantis, 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... | apache-2.0 | -5,980,736,004,662,842,000 | 29.59051 | 78 | 0.623865 | false | 3.80459 | false | false | false |
neutronst4r/PyOverview | defaults.py | 1 | 21542 | #!/bin/python
# -*- coding: utf-8 -*-
colors = {'indigo' : '#4e017e',
'darkTurquoise': '#045751',
'darkBlue' : '#032697',
'turquoise' : '#039f8f',
'yellow' : '#fab309',
'blue' : '#3b80f5',
'purple' : '#9628de',
'gree... | gpl-3.0 | -8,228,815,969,957,513,000 | 49.682353 | 115 | 0.5487 | false | 2.893994 | false | false | false |
HybridF5/jacket | jacket/storage/backup/drivers/google.py | 1 | 14298 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2014 TrilioData, Inc
# Copyright (c) 2015 EMC Corporation
# Copyright (C) 2015 Kevin Fox <kevin@efox.cc>
# Copyright (C) 2015 Tom Barron <tpb@dyncloud.net>
# Copyright (C) 2016 Vedams Inc.
# Copyright (C) 2016 Google Inc.
# All Rights Reserv... | apache-2.0 | 1,852,066,097,706,270,500 | 37.959128 | 79 | 0.579801 | false | 4.13476 | false | false | false |
syurchi/mobile-gamepad-control | mobileGamepad/server/httpHandler.py | 1 | 1661 | from BaseHTTPServer import BaseHTTPRequestHandler
# import re
from parse import httpParse
class HttpHandler(BaseHTTPRequestHandler):
def do_GET(self):
h = httpParse(self.headers)
#TODO: check only if mobile, otherwise assume desktop
#TODO: create dictionary, with key stating if client is desktop or not -> isMo... | mit | -5,035,612,026,533,340,000 | 38.547619 | 122 | 0.731487 | false | 3.276134 | false | false | false |
osiloke/Flumotion-Transcoder | flumotion/transcoder/admin/datastore/target.py | 1 | 4606 | # vi:si:et:sw=4:sts=4:ts=4
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L.
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
#
# This file may be distributed and/or modified under the terms of
# the GNU Lesser General Public License version 2.1... | lgpl-2.1 | -7,302,972,481,427,910,000 | 35.848 | 80 | 0.65762 | false | 4.471845 | true | false | false |
Alwnikrotikz/kegbot | pykeg/src/pykeg/core/manager.py | 1 | 23026 | # Copyright 2010 Mike Wakerly <opensource@hoho.com>
#
# This file is part of the Pykeg package of the Kegbot project.
# For more information on Pykeg or Kegbot, see http://kegbot.org/
#
# Pykeg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | gpl-2.0 | -2,036,055,279,308,483,300 | 30.074224 | 86 | 0.665378 | false | 3.514883 | false | false | false |
seanpont/grade-maker-pro | app/models.py | 1 | 5980 | """
models.py
App Engine datastore models
"""
from google.appengine.ext import ndb
from utils import *
def to_dict(model):
assert isinstance(model, ndb.Model)
model_dict = model.to_dict()
model_dict['id'] = model.key.id()
return model_dict
def domain_of(email):
return email.lower().split('@'... | mit | -8,565,603,136,056,567,000 | 30.81383 | 105 | 0.657358 | false | 3.580838 | false | false | false |
wagamama/geo-twd | geotwd/__init__.py | 1 | 1977 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
a = 6378.137 # km
f = 1/298.257222101 # GRS80
lon0 = 121
N0 = 0 # km
E0 = 250 # km
k0 = 0.9999
n = f / (2 - f)
A = a / (1 + n) * (1 + math.pow(n, 2) / 4 + math.pow(n, 4) / 64)
a1 = n / 2 - math.pow(n, 2) * 2 / 3 + math.pow(n, 3) * 5 / 16
a2 = math.pow(n, 2... | mit | 6,731,420,418,271,508,000 | 26.84507 | 83 | 0.481538 | false | 2.312281 | false | false | false |
WilJoey/ckanext-tnext | ckanext/tnext/plugin.py | 1 | 7407 | import logging
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import action as a
import constants
import auth
from ckanext.tnext import helpers
log = logging.getLogger(__name__)
def tnext_hots(*args):
'''
result = {}
result['arg1'] = args[0] or 'Nothing'
result['status'] = 'succ... | mit | 849,924,042,358,632,100 | 44.164634 | 107 | 0.602268 | false | 4.001621 | false | false | false |
ColdrickSotK/storyboard | storyboard/tests/mock_smtp.py | 1 | 2440 | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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... | apache-2.0 | -8,875,417,801,995,916,000 | 31.533333 | 78 | 0.659836 | false | 4.013158 | false | false | false |
ABoothInTheWild/baseball-research | conjointAnalysis_HoustonTexans.py | 1 | 2948 | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 16 17:42:56 2017
@author: Alexander
"""
# Consumer Preferences for Sporting Events---Conjoint Analysis (Python)
# prepare for Python version 3x features and functions
from __future__ import division, print_function
# import packages for analysis and modelin... | gpl-3.0 | 6,844,453,867,855,396,000 | 36.311688 | 83 | 0.686228 | false | 3.334842 | false | false | false |
arecker/reckerops | cfn/templates/joined_file/contact_lambda_function.py | 1 | 1457 | import json
import os
import urllib
import boto3
def handler(event, context):
print(type(event))
print(event)
try:
data = json.loads(event['body'])
except json.decoder.JSONDecodeError:
data = dict(urllib.parse.parse_qsl(event['body']))
for required_key in ('email', 'text'):
... | gpl-3.0 | 3,329,566,711,204,637,000 | 28.14 | 115 | 0.530542 | false | 3.864721 | false | false | false |
twister/twister.github.io | server/CentralEngineWebUi.py | 1 | 11967 |
# File: CentralEngineWebUi.py ; This file is part of Twister.
# version: 2.007
# Copyright (C) 2012-2013 , Luxoft
# Authors:
# Adrian Toader <adtoader@luxoft.com>
# Andrei Costachi <acostachi@luxoft.com>
# Andrei Toma <atoma@luxoft.com>
# Cristi Constantin <crconstantin@luxoft.com>
# Daniel Cioata <d... | apache-2.0 | -7,191,106,380,456,585,000 | 35.708589 | 125 | 0.588535 | false | 3.661873 | false | false | false |
maxamillion/autocloud | autocloud/web/app.py | 1 | 2291 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import flask
from flask import request, url_for
import os
from sqlalchemy import desc
from autocloud.models import init_model
from autocloud.models import JobDetails
from autocloud.web.pagination import RangeBasedPagination
from autocloud.web.utils import ... | agpl-3.0 | -1,398,440,308,598,706,200 | 29.959459 | 76 | 0.63553 | false | 3.568536 | false | false | false |
pydicom/sendit | sendit/apps/main/utils.py | 1 | 6978 | '''
Copyright (c) 2017 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute... | mit | 7,250,047,244,013,885,000 | 33.374384 | 89 | 0.651189 | false | 3.967027 | false | false | false |
akuefler/fovea | examples/bombardier/scen1_game2.py | 1 | 6026 | """
Scenario 1: Game 2
Two bodies (reduced game)
-------------------------
Hypothesize combination of bodies 1 & 4 and 2 & 3
provided trajectory stays sufficiently far from them
"""
from __future__ import division
from PyDSTool import *
import PyDSTool.Toolbox.phaseplane as pp
from bombardier import *
import bombard... | bsd-3-clause | -4,433,281,915,676,713,000 | 31.053191 | 145 | 0.691669 | false | 3.069791 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.