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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AMOboxTV/AMOBox.LegoBuild | plugin.video.salts/scrapers/onlinedizi_scraper.py | 1 | 4676 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | gpl-2.0 | -8,868,857,414,232,558,000 | 43.533333 | 182 | 0.566938 | false | 3.858086 | false | false | false |
hailongqiu/new-deepin-media-player | src/plugins/youku/youku_web_parse.py | 1 | 5006 | #! /usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2013 XXX, Inc.
# 2013 红铭曼,王芳
#
# Author: 红铭曼,王芳 <hongmingman@sina.com>
# Maintainer: 红铭曼,王芳 <hongmingman@sina.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | gpl-3.0 | 5,523,252,859,593,766,000 | 36.257576 | 94 | 0.573607 | false | 3.08532 | false | false | false |
codenamejason/data_from_pdf | utils.py | 1 | 3856 | # vim: sw=4:expandtab:foldmethod=marker
#
# Copyright (c) 2014, Jason Romero
# 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 ... | artistic-2.0 | -7,082,099,426,749,086,000 | 30.606557 | 77 | 0.641079 | false | 3.736434 | false | false | false |
srznew/heat | heat/engine/resources/openstack/nova/server.py | 1 | 65002 | #
# 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,687,122,793,121,443,000 | 40.828829 | 79 | 0.53683 | false | 4.502771 | true | false | false |
line72/subte | libsubte/interface/StopMarker.py | 1 | 9828 | #
# Copyright (C) 2012 - Marcus Dillavou
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope ... | gpl-3.0 | -5,898,807,832,328,061,000 | 32.889655 | 129 | 0.577941 | false | 3.621223 | false | false | false |
jalabort/ijcv-2014-aam | aam/image/test/image_test.py | 1 | 18144 | import warnings
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from nose.tools import raises
from menpo.testing import is_same_array
from menpo.image import BooleanImage, MaskedImage, Image
@raises(ValueError)
def test_create_1d_error():
Image(np.ones(1))
def test_image_n_elements():... | bsd-2-clause | 23,672,551,868,986,324 | 29.089552 | 76 | 0.641534 | false | 3.011452 | true | false | false |
nevins-b/lemur | lemur/plugins/lemur_openssl/plugin.py | 1 | 4304 | """
.. module: lemur.plugins.lemur_openssl.plugin
:platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from io import open
import subprocess
from flask import current_app
from ... | apache-2.0 | 4,822,535,974,338,497,000 | 28.278912 | 133 | 0.549954 | false | 4.014925 | false | false | false |
alextingle/autoclapper | autoclapper.py | 1 | 7762 | #! /usr/bin/env python
## Support for byteswapping audio streams (needed for AIFF format).
_typecode = {2:'h'}
def _init_typecode():
import array
for t in ('i', 'l'):
a = array.array(t)
if a.itemsize==4:
_typecode[4] = t
return
import sys
print "Can't find array typecode ... | agpl-3.0 | 5,807,491,492,278,945,000 | 32.456897 | 95 | 0.652409 | false | 3.230129 | false | false | false |
oneconvergence/group-based-policy | gbpservice/neutron/services/grouppolicy/extension_manager.py | 1 | 11825 | # 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
# distributed under the... | apache-2.0 | 5,398,071,857,213,786,000 | 45.559055 | 78 | 0.622664 | false | 4.394277 | false | false | false |
dtroyer/python-openstacksdk | openstack/object_store/v1/account.py | 1 | 1764 | # 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
# distributed under ... | apache-2.0 | -5,670,804,540,234,342,000 | 38.2 | 78 | 0.696145 | false | 4.009091 | false | false | false |
civisanalytics/ansible-modules-core | cloud/amazon/iam.py | 1 | 30387 | #!/usr/bin/python
# 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) any later version.
#
# Ansible is distributed... | gpl-3.0 | 2,926,000,182,716,711,000 | 39.035573 | 213 | 0.581532 | false | 4.059177 | false | false | false |
titu1994/MobileNetworks | weights/remove_extra_class.py | 1 | 1279 | import h5py
'''
Place all the weight files here (should automatically be placed after running weight_load.py
for all the checkpoints, and then simply run this script to change the weights to support 1000
classes instead of 1001.
'''
base = "mobilenet_"
alphas = ["1_0", "7_5", "5_0", "2_5"]
sizes = [224, 192, 160, 12... | apache-2.0 | 1,143,303,184,041,994,100 | 29.452381 | 95 | 0.637217 | false | 3.675287 | false | false | false |
ThomasColliers/whatmigrate | siteconnection.py | 1 | 5571 | # Class that handles What.CD authentication, can download torrents and can search the site log
import os,pycurl,urllib,re,sys,urllib2
from BeautifulSoup import BeautifulSoup
re_main = re.compile(r'<span style="color: red;">(.*?)</span>')
re_detail = re.compile(r' Torrent <a href="torrents\.php\?torrentid=\d+"> \d+</a>... | gpl-3.0 | 8,229,056,412,642,731,000 | 41.853846 | 215 | 0.588584 | false | 3.794959 | false | false | false |
stackforge/monasca-notification | monasca_notification/plugins/email_notifier.py | 1 | 11064 | # (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# Copyright 2017 Fujitsu LIMITED
#
# 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/LICE... | apache-2.0 | 4,724,552,376,887,592,000 | 34.235669 | 95 | 0.596439 | false | 4.266872 | false | false | false |
MadsJensen/malthe_alpha_project | source_connectivity_permutation.py | 1 | 6505 | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 9 08:41:17 2015.
@author: mje
"""
import numpy as np
import numpy.random as npr
import os
import socket
import mne
# import pandas as pd
from mne.connectivity import spectral_connectivity
from mne.minimum_norm import (apply_inverse_epochs, read_inverse_operator)
# Pe... | mit | 1,237,449,237,555,734,500 | 29.539906 | 79 | 0.563105 | false | 3.303707 | false | false | false |
nnmware/nnmware | apps/money/admin.py | 1 | 2443 | # nnmware(c)2012-2020
from __future__ import unicode_literals
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from nnmware.apps.money.models import Transaction, Bill, Currency, ExchangeRate
@admin.register(Transaction)
class TransactionAdmin(admin.ModelAdmin):
list_disp... | gpl-3.0 | 3,056,534,765,082,308,000 | 37.171875 | 111 | 0.552599 | false | 4.044702 | false | false | false |
t3dev/odoo | addons/website_slides_survey/tests/test_course_certification_failure.py | 1 | 6421 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.survey.tests.common import SurveyCase
class TestCourseCertificationFailureFlow(SurveyCase):
def test_course_certification_failure_flow(self):
# Step 1: create a simple certification
... | gpl-3.0 | 2,418,318,624,319,238,000 | 51.631148 | 197 | 0.611587 | false | 4.196732 | false | false | false |
dikaiosune/nau-elc-force-completion-mailer | mailer.py | 1 | 7174 | __author__ = 'adam'
import configparser
import logging
import argparse
import smtplib
from email.mime.text import MIMEText
from datetime import datetime, timedelta
from xlrd import open_workbook
from jinja2 import Template
template = Template("""
<p>Dear {{ instructor.first }},</p>
<p>One of the most common Blackbo... | mit | -1,298,246,076,243,391,500 | 35.050251 | 122 | 0.681907 | false | 3.387158 | true | false | false |
jackrzhang/zulip | zerver/views/invite.py | 1 | 5106 |
from django.conf import settings
from django.core.exceptions import ValidationError
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from typing import List, Optional, Set
from zerver.decorator import require_realm_admin, to_non_negative_int, \
require_non_guest... | apache-2.0 | -138,191,675,718,502,620 | 42.641026 | 101 | 0.686643 | false | 3.816143 | false | false | false |
sanguinariojoe/FreeCAD | src/Mod/Fem/femtaskpanels/task_solver_ccxtools.py | 9 | 16191 | # ***************************************************************************
# * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... | lgpl-2.1 | -6,757,533,628,294,308,000 | 39.680905 | 94 | 0.577852 | false | 3.952881 | false | false | false |
vhakulinen/bruno-server | bruno/commands/decorators.py | 1 | 1424 | from bruno.send_utils import send_error
from bruno.env import inputs
class Args:
"""
Decorator for validating number of args. You can also pass in help
message.
"""
def __init__(self, no_args, msg=None):
self.no_args = no_args
if msg:
self.msg = '(' + msg + ')'
... | gpl-2.0 | -6,546,121,015,751,768,000 | 25.37037 | 79 | 0.525983 | false | 3.988796 | false | false | false |
FireWalkerX/eyeOS-FOSS-V.2.0 | devtools/qooxdoo-sdk/tool/bin/create-application.py | 1 | 12157 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# qooxdoo - the new era of web development
#
# http://qooxdoo.org
#
# Copyright:
# 2008 - 2010 1&1 Internet AG, Germany, http://www.1und1.de
#
# License:
# LGPL: http://www.gnu.org/... | agpl-3.0 | 4,756,107,839,994,583,000 | 33.933908 | 135 | 0.586329 | false | 3.601007 | false | false | false |
gtesei/fast-furious | competitions/santander-customer-transaction-prediction/base_light_gbm1.py | 1 | 2556 | import lightgbm as lgb
import pandas as pd
import numpy as np
import sys
from datetime import datetime
from pathlib import Path
from sklearn.model_selection import StratifiedKFold
from sklearn.model_selection import RepeatedStratifiedKFold
path=Path("data/")
train=pd.read_csv(path/"train.csv").drop("ID_code",axis=1)
... | mit | -557,002,843,498,613,570 | 31.769231 | 171 | 0.664319 | false | 3.028436 | false | false | false |
GarrettArm/TheDjangoBook | mysite_project/blog/views.py | 1 | 1361 | from django.shortcuts import render
from django.utils import timezone
from django.views import generic
from .models import Post
class IndexView(generic.ListView):
template_name = "blog/post_list.html"
context_object_name = "posts"
def get_queryset(self):
return Post.objects.filter(published_date... | gpl-3.0 | -2,322,962,383,464,944,600 | 28.586957 | 80 | 0.626745 | false | 3.991202 | false | false | false |
Great-Li-Xin/PythonDev | Games/Chap8/Zombie Mob.py | 1 | 9550 | # MyLibrary.py
import sys, time, random, math, pygame
from pygame.locals import *
# prints text using the supplied font
def print_text(font, x, y, text, color=(255, 255, 255)):
imgText = font.render(text, True, color)
screen = pygame.display.get_surface() # req'd when function moved into MyLibrary
scree... | mit | 5,144,566,735,357,413,000 | 31.263514 | 112 | 0.553298 | false | 3.750982 | false | false | false |
oculusstorystudio/kraken | Python/kraken/ui/HAppkit_Editors/editor_widgets/integer_editor.py | 1 | 2518 |
import sys
from kraken.ui.Qt import QtWidgets, QtGui, QtCore
from ..fe import FE
from ..widget_factory import EditorFactory
from ..base_editor import BaseValueEditor
class IntegerEditor(BaseValueEditor):
def __init__(self, valueController, parent=None):
super(IntegerEditor, self).__init__(valueControll... | bsd-3-clause | -3,679,933,215,878,452,700 | 30.475 | 96 | 0.575854 | false | 4.319039 | false | false | false |
bvesperman/Sector67RaspberryPiAccessControl | space_machines/door.py | 1 | 5509 | import logging
import time
import Queue
import threading
from Tkinter import *
from pystates import StateMachine
class DoorState(StateMachine):
def CLOSED_LOCKED(self):
self.generate_message({"event": self.name + "_CLOSED_LOCKED"})
if self.show_gui: self.v.set("CLOSED_LOCKED")
self.log.debug("turn off ... | mit | 492,777,001,027,727,100 | 32.186747 | 105 | 0.656744 | false | 3.208503 | false | false | false |
rmvanhees/pynadc | pynadc/scia/hk.py | 1 | 6316 | """
This file is part of pynadc
https://github.com/rmvanhees/pynadc
Routines to convert Sciamachy house-keeping data from raw counts
to physical units.
Copyright (c) 2018 SRON - Netherlands Institute for Space Research
All Rights Reserved
License: BSD-3-Clause
"""
from datetime import timedelta
import numpy as... | bsd-3-clause | -2,944,959,474,597,993,500 | 34.483146 | 76 | 0.542749 | false | 2.993365 | false | false | false |
40223233/2015cd_midterm | wsgi.py | 1 | 26126 | #@+leo-ver=5-thin
#@+node:2014fall.20141212095015.1775: * @file wsgi.py
# coding=utf-8
# 上面的程式內容編碼必須在程式的第一或者第二行才會有作用
################# (1) 模組導入區
# 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝
#@@language python
#@@tabwidth -4
#@+<<declarations>>
#@+node:2014fall.20141212095015.1776: ** <<declar... | gpl-2.0 | -7,574,877,212,437,480,000 | 28.628342 | 137 | 0.549093 | false | 2.210232 | false | false | false |
opentrials/processors | processors/base/writers/fda_application.py | 1 | 1620 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from . import write_organisation
from .. import helpers
logger = logging.getLogger(__name__)
# Module API
def write_fda_applica... | mit | -2,835,677,600,094,138,400 | 29.566038 | 79 | 0.605556 | false | 4.390244 | false | false | false |
jparyani/Mailpile | mailpile/plugins/setup_magic.py | 1 | 40822 | import os
import random
import sys
import datetime
from urllib import urlencode
import mailpile.auth
from mailpile.defaults import CONFIG_RULES
from mailpile.i18n import ListTranslations, ActivateTranslation, gettext
from mailpile.i18n import gettext as _
from mailpile.i18n import ngettext as _n
from mailpile.plugins ... | apache-2.0 | -7,887,133,988,458,968,000 | 37.95229 | 83 | 0.503748 | false | 4.329409 | true | false | false |
munhanha/mtg-random | djangoappengine/boot.py | 1 | 8121 | import logging
import os
import sys
PROJECT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DATA_ROOT = os.path.join(PROJECT_DIR, '.gaedata')
# Overrides for os.environ
env_ext = {'DJANGO_SETTINGS_MODULE': 'settings'}
def setup_env():
"""Configures app engine environment for command-line apps."... | bsd-3-clause | 4,427,875,777,957,635,000 | 41.742105 | 147 | 0.619751 | false | 4.262992 | false | false | false |
TheWebMonks/equipo | app/freelancers/viewsets.py | 1 | 4110 | from .serializers import serializers
from .models import *
from django.contrib.auth.models import User, Group
from rest_framework import viewsets, permissions, renderers
class ProjectViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows users to be viewed or edited.
"""
queryset = Project.objec... | apache-2.0 | -1,411,435,979,445,298,400 | 27.541667 | 65 | 0.725304 | false | 4.363057 | false | false | false |
srossross/stable.world | stable_world/managers/base.py | 1 | 1825 | from __future__ import unicode_literals
import os
import click
from pipes import quote
from .push_file import push_file, pull_file
from stable_world.py_helpers import urlparse, urlunparse
class BaseManager(object):
NAME = None
PROGRAM = None
@classmethod
def enabled(cls):
if cls.PROGRAM is ... | bsd-2-clause | -4,610,486,736,509,769,000 | 25.071429 | 89 | 0.580274 | false | 3.882979 | true | false | false |
avedaee/DIRAC | DataManagementSystem/Service/FileCatalogProxyHandler.py | 1 | 3492 | ########################################################################
# $HeadURL $
# File: FileCatalogProxyHandler.py
########################################################################
""" :mod: FileCatalogProxyHandler
================================
.. module: FileCatalogProxyHandler
:synopsi... | gpl-3.0 | 5,032,431,279,644,278,000 | 35.757895 | 97 | 0.645762 | false | 4.279412 | false | false | false |
googleapis/googleapis-gen | grafeas/v1/grafeas-v1-py/grafeas/grafeas_v1/types/build.py | 1 | 2488 | # -*- 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 | -2,803,864,520,464,966,700 | 30.493671 | 74 | 0.668408 | false | 4.252991 | false | false | false |
TuKo/brainiak | examples/fcma/classification.py | 1 | 9141 | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | 8,559,069,756,804,332,000 | 49.502762 | 129 | 0.68067 | false | 3.34223 | true | false | false |
praekelt/vumi-go | go/routers/app_multiplexer/forms.py | 1 | 1271 | from django import forms
class ApplicationMultiplexerTitleForm(forms.Form):
content = forms.CharField(
label="Menu title",
max_length=100
)
class ApplicationMultiplexerForm(forms.Form):
application_label = forms.CharField(
label="Application label"
)
endpoint_name = forms... | bsd-3-clause | 8,391,352,842,481,823,000 | 24.938776 | 68 | 0.610543 | false | 4.539286 | false | false | false |
xmnlab/minilab | arch/socket_arch/simple_socket/client.py | 1 | 1045 | # Echo client program
from __future__ import print_function, division, unicode_literals
from random import randint
import socket
import pickle
import sys
import platform
if platform.system() == 'Linux':
sys.path.insert(0, '/var/www/mswim')
else:
sys.path.insert(0, '/mswim/')
from mswim import settings
HOST =... | gpl-3.0 | 7,342,832,662,091,720,000 | 23.325581 | 65 | 0.6 | false | 3.530405 | false | false | false |
penkin/python-dockercloud | dockercloud/api/http.py | 1 | 2612 | from __future__ import absolute_import
import logging
from requests import Request, Session
from requests import utils
from urllib.parse import urljoin
import dockercloud
from .exceptions import ApiError, AuthError
logger = logging.getLogger("python-dockercloud")
global_session = Session()
def get_session():
... | apache-2.0 | 2,378,145,631,790,428,000 | 30.095238 | 110 | 0.620597 | false | 3.835536 | false | false | false |
rawdigits/wee-slack | wee_slack.py | 1 | 170611 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import OrderedDict
from functools import wraps
from itertools import islice, count
import textwrap
import time
import json
import pickle
import sha
import os
import re
import urllib
import sys
import traceback
import collections
import ... | mit | -8,762,472,178,675,239,000 | 37.339551 | 277 | 0.599475 | false | 3.764751 | true | false | false |
Brocade-OpenSource/OpenStack-DNRM-Nova | nova/compute/api.py | 1 | 152761 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012-2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache Lic... | apache-2.0 | 9,132,316,229,346,046,000 | 42.558882 | 79 | 0.566899 | false | 4.555406 | false | false | false |
deepmind/rlax | rlax/_src/policy_gradients.py | 1 | 10472 | # Copyright 2019 DeepMind Technologies Limited. 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 ... | apache-2.0 | 380,960,590,882,449,540 | 34.569966 | 122 | 0.690942 | false | 3.125037 | false | false | false |
openstack/vitrage | vitrage/api/controllers/v1/alarm.py | 1 | 2404 | # Copyright 2016 - Nokia Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | -3,731,942,575,143,812,600 | 30.631579 | 75 | 0.649334 | false | 3.928105 | false | false | false |
neerajvashistha/pa-dude | lib/python2.7/site-packages/sphinx/theming.py | 1 | 8278 | # -*- coding: utf-8 -*-
"""
sphinx.theming
~~~~~~~~~~~~~~
Theming support for HTML builders.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import shutil
import zipfile
import tempfile
from os import path
from six import str... | mit | 4,504,715,810,136,291,300 | 33.781513 | 88 | 0.539381 | false | 4.609131 | true | false | false |
SylvainA/os-event-catcher | openstack/common/rpc/common.py | 1 | 18537 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the ... | apache-2.0 | 7,062,735,833,508,406,000 | 35.490157 | 79 | 0.644657 | false | 4.332087 | false | false | false |
rwl/PyCIM | CIM14/CDPSM/Balanced/IEC61970/Wires/EnergySource.py | 1 | 2528 | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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... | mit | -1,110,787,457,818,717,400 | 44.963636 | 108 | 0.714794 | false | 3.931571 | false | false | false |
trilan/lemon | lemon/forms.py | 1 | 2292 | from django import forms
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.forms.formsets import formset_factory
from django.forms.models import BaseInlineFormSet
from django.forms.models import ModelFormMetaclass, _get_foreign_key
from django.utils.trans... | bsd-3-clause | 1,137,810,636,647,366,900 | 31.28169 | 77 | 0.58726 | false | 4.228782 | false | false | false |
gmsanchez/nmpc_comparison | cstr_startup_colloc.py | 1 | 9778 | # Linear and nonlinear control of startup of a CSTR.
import mpctools as mpc
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import gridspec
import time
# Define some parameters and then the CSTR model.
Nx = 3
Nu = 2
Nd = 1
# Ny = Nx
Delta = .25
# eps = 1e-6 # Use this as a small number.
T0 = 350
c0... | gpl-3.0 | 3,749,407,622,004,102,700 | 30.850163 | 80 | 0.54009 | false | 2.509754 | false | false | false |
bmazin/ARCONS-pipeline | photonlist/test/testExpTimeWeight.py | 1 | 1192 | '''
Author: Julian van Eyken Date: Jul 9 2013
Test code for per-pixel effective exposure time weighting.
'''
import os.path
import photonlist.photlist as pl
import photonlist.RADecImage as rdi
from util.FileName import FileName
def getSimpleImage(fileName=FileName(run='PAL2012',date='20121211',tstamp='20121212... | gpl-2.0 | -3,305,290,240,977,502,700 | 34.058824 | 106 | 0.700503 | false | 3.475219 | false | false | false |
jc6036/LordsAndLadies | file_filler.py | 1 | 2432 | # Using this to simply fill up a text file with placeholder names
def fill_names(filename, num_of_names, variation, gender = "none"):
if gender == "male":
if variation == "first":
with open("./%s" % str(filename), "w") as opened_file:
for i in range(1, num_of_names + 1):
... | gpl-2.0 | 6,665,909,490,550,261,000 | 34.246377 | 74 | 0.515625 | false | 3.290934 | false | false | false |
nschaetti/EchoTorch | echotorch/transforms/text/Character.py | 1 | 3378 | # -*- coding: utf-8 -*-
#
# Imports
import torch
from .Transformer import Transformer
# Transform text to character vectors
class Character(Transformer):
"""
Transform text to character vectors
"""
# Constructor
def __init__(self, uppercase=False, gram_to_ix=None, start_ix=0, fixed_length=-1):
... | gpl-3.0 | 8,788,521,190,926,664,000 | 24.78626 | 87 | 0.450266 | false | 4.201493 | false | false | false |
mhils/mitmproxy | mitmproxy/flowfilter.py | 1 | 14034 | """
The following operators are understood:
~q Request
~s Response
Headers:
Patterns are matched against "name: value" strings. Field names are
all-lowercase.
~a Asset content-type in response. Asset content types are:
... | mit | 5,222,736,535,658,669,000 | 23.322357 | 98 | 0.562847 | false | 3.616078 | false | false | false |
rwgdrummer/maskgen | hp_tool/hp/ErrorWindow.py | 1 | 2192 | from Tkinter import *
from tkSimpleDialog import Dialog
import json
import csv
import tkFileDialog
class ErrorWindow(Dialog):
"""
Provided a list of error messages, shows them in a simple pop-up window.
"""
def __init__(self, master, errors):
self.errors = errors
self.cancelPressed = Tr... | bsd-3-clause | -6,608,855,206,167,699,000 | 30.782609 | 89 | 0.605839 | false | 3.593443 | false | false | false |
cyphactor/lifecyclemanager | testenv/trac-0.10.4/trac/util/autoreload.py | 1 | 2888 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists o... | gpl-3.0 | -7,681,305,959,908,121,000 | 34.219512 | 80 | 0.608033 | false | 4.349398 | false | false | false |
KBNLresearch/iromlab | iromlab/testsru.py | 1 | 1831 | #! /usr/bin/env python
import io
import xml.etree.ElementTree as ETree
from .kbapi import sru
def main():
"""
Script for testing SRU interface outside Iromlab
(not used by main Iromlab application)
"""
catid = "184556155"
# Lookup catalog identifier
#sruSearchString = '"PPN=' + str(catid)... | apache-2.0 | 1,240,776,010,216,517,400 | 27.625 | 85 | 0.581103 | false | 3.912393 | false | false | false |
madsmpedersen/MMPE | datastructures/dual_key_dict.py | 1 | 3481 | '''
Created on 08/11/2013
@author: mmpe
'''
class DualKeyDict(object):
def __init__(self, unique_key_att, additional_key_att):
self._unique_key_att = unique_key_att
self._additional_key_att = additional_key_att
self._dict = {}
self._unique_keys = set()
def __getitem__(self, ke... | apache-2.0 | 1,287,717,536,764,929,500 | 29.535088 | 158 | 0.556162 | false | 3.867778 | false | false | false |
zjuchenyuan/BioWeb | Lib/Bio/codonalign/codonalphabet.py | 1 | 2100 | # Copyright 2013 by Zheng Ruan (zruan1991@gmail.com).
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Code for Codon Alphabet.
CodonAlphabet class is inherited from Alphabet... | mit | -3,725,978,972,403,675,000 | 28.577465 | 73 | 0.69381 | false | 3.301887 | false | false | false |
saeedghsh/SSRR13 | Andreas/slam6d/3rdparty/lastools/ArcGIS_toolbox/scripts/lasground.py | 2 | 6337 | #
# lasground.py
#
# (c) 2012, Martin Isenburg
# LASSO - rapid tools to catch reality
#
# uses lasground.exe to extracts the bare-earth by classifying LIDAR
# points into ground (class = 2) and non-ground points (class = 1).
#
# The LiDAR input can be in LAS/LAZ/BIN/TXT/SHP/... format.
# The LiDAR output can ... | bsd-3-clause | -3,070,467,438,095,268,000 | 28.17619 | 130 | 0.614644 | false | 3.351137 | false | false | false |
jhanley634/testing-tools | problem/pixel/volcanic_voxels.py | 1 | 6745 | #! /usr/bin/env python
# Copyright 2020 John Hanley.
#
# 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, me... | mit | 140,680,134,709,253,020 | 31.897561 | 76 | 0.575326 | false | 3.36695 | false | false | false |
AlexHill/django | django/db/models/fields/related.py | 1 | 77816 | from operator import attrgetter
from django.db import connection, connections, router, transaction
from django.db.backends import utils
from django.db.models import signals, Q
from django.db.models.fields import (AutoField, Field, IntegerField,
PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist)
fr... | bsd-3-clause | -1,930,050,891,207,236,900 | 44.373761 | 228 | 0.599954 | false | 4.15484 | false | false | false |
erigones/esdc-ce | gui/migrations/0004_alerting_fields_initialization.py | 1 | 1297 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models, transaction
# noinspection PyUnusedLocal
def initialize_alerting_fields(apps, schema_editor):
former_user_profile = apps.get_model('gui', 'UserProfile')
if former_user_profile.objects.count() > 10000:
... | apache-2.0 | 4,412,531,453,637,234,700 | 39.53125 | 118 | 0.643793 | false | 4.294702 | false | false | false |
PaulWay/insights-core | insights/parsers/date.py | 1 | 3048 | """
date - Command
==============
This module provides processing for the output of the ``date`` command.
The specs handled by this command inlude::
"date" : CommandSpec("/bin/date"),
"date_utc" : CommandSpec("/bin/date --utc"),
Class ``Date`` parses the output of the ``... | apache-2.0 | -1,107,753,871,417,200,300 | 27.485981 | 77 | 0.603675 | false | 3.767614 | false | false | false |
ihciah/xk-database | views/admin.py | 1 | 5958 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint
from flask import g, request, flash
from flask import render_template, redirect
from models import Student,Account,Course,Xk,Teacher
from forms import SearchStudentFrom,adminProfileForm,UserProfileForm,SearchForm,CourseEditForm,UseraddForm
from ... | gpl-2.0 | -1,314,900,180,352,519,200 | 34.810976 | 123 | 0.65344 | false | 3.409988 | false | false | false |
xiang12835/python_web | py2_web2py/web2py/gluon/packages/dal/pydal/representers/postgre.py | 3 | 1368 | from ..adapters.postgres import Postgre, PostgreNew
from .base import SQLRepresenter, JSONRepresenter
from . import representers, before_type, for_type
from ..helpers.serializers import serializers
@representers.register_for(Postgre)
class PostgreRepresenter(SQLRepresenter, JSONRepresenter):
def _make_geoextra(se... | apache-2.0 | 1,911,755,367,537,962,500 | 32.365854 | 63 | 0.658626 | false | 3.480916 | false | false | false |
hstau/manifold-cryo | fit_1D_open_manifold_3D.py | 1 | 5015 | import numpy as np
import get_fit_1D_open_manifold_3D_param
import solve_d_R_d_tau_p_3D
import a
from scipy.io import loadmat
import matplotlib.pyplot as plt
#import matplotlib.pyplot as plt
'''
function [a,b,tau] = fit_1D_open_manifold_3D(psi)
%
% fit_1D_open_manifold_3D
%
% fit the eigenvectors for ... | gpl-2.0 | 2,362,552,218,448,211,500 | 30.147436 | 99 | 0.465803 | false | 2.552163 | false | false | false |
tjmonsi/cmsc129-2016-repo | submissions/exercise4/pitargue/interpreter/syntax_analyzer.py | 1 | 33315 | from . import evaluate
class Parser():
def __init__(self, variables):
self.lexemes = []
self.lookahead = None
self.tokens = []
self.parse_tree = []
self.variables = variables
self.types = {
'TRUE_KEYWORD': 'boolean',
'FALSE_KEYWORD': 'boolean... | mit | -5,841,835,166,006,237,000 | 42.777924 | 137 | 0.536125 | false | 4.182674 | false | false | false |
icyflame/batman | tests/flow_tests.py | 1 | 7876 | # -*- coding: utf-8 -*-
"""Tests for the flow module."""
#
# (C) Pywikibot team, 2015
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
__version__ = '$Id$'
from pywikibot.exceptions import NoPage
from pywikibot.flow import Board, Topic, Post
from pywikibo... | mit | 6,127,447,604,697,114,000 | 34.318386 | 82 | 0.599543 | false | 3.838207 | true | false | false |
jimmykiselak/lbrycrd | qa/rpc-tests/maxblocksinflight.py | 1 | 3782 | #!/usr/bin/env python2
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
fro... | mit | 2,546,787,251,703,153,000 | 38.395833 | 110 | 0.618456 | false | 4.002116 | true | false | false |
botify-labs/mangrove | mangrove/pool.py | 1 | 11546 | from abc import ABCMeta
from multiprocessing import cpu_count
from concurrent.futures import ThreadPoolExecutor
from boto import ec2
from mangrove.declarative import ServiceDeclaration, ServicePoolDeclaration
from mangrove.mappings import ConnectionsMapping
from mangrove.utils import get_boto_module
from mangrove.ex... | mit | -903,598,347,621,880,300 | 38.272109 | 88 | 0.597696 | false | 4.531397 | false | false | false |
tehamalab/dgs | goals/models.py | 1 | 39889 | import json
from django.db import models
from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.contrib.postgres.fields import HStoreField, ArrayField
from django.utils.translation import ugettext_lazy as _
from django.templat... | unlicense | -7,689,396,014,878,925,000 | 35.56187 | 113 | 0.561558 | false | 4.167694 | false | false | false |
atheendra/access_keys | keystone/tests/test_v3_federation.py | 1 | 58835 | # 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
# distributed under t... | apache-2.0 | -6,737,992,034,688,989,000 | 37.154994 | 79 | 0.516427 | false | 4.360086 | true | false | false |
Fokko/incubator-airflow | airflow/operators/cassandra_to_gcs.py | 1 | 14378 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | -4,027,919,065,744,805,000 | 38.284153 | 104 | 0.627973 | false | 4.092798 | false | false | false |
nshearer/etl | src/etl/EtlJoinProcessor.py | 1 | 5333 | '''
Created on Dec 28, 2012
@author: nshearer
'''
from abc import ABCMeta, abstractmethod
from EtlProcessor import EtlProcessor
class EtlJoinProcessor(EtlProcessor):
'''Join one set of records to another'''
def __init__(self):
super(EtlJoinProcessor, self).__init__()
se... | gpl-2.0 | -5,025,042,689,156,766,000 | 36.381295 | 79 | 0.475342 | false | 5.007512 | false | false | false |
mattduan/proof | util/UniqueList.py | 1 | 4847 | """
List with unique entries. UniqueList does not allow null nor duplicates.
"""
__version__= '$Revision: 11 $'[11:-2]
__author__ = "Duan Guoqiang (mattgduan@gmail.com)"
class UniqueList(list):
def __init__(self, initlist=[]):
# call super class
list.__init__(self)
# add initlist
... | bsd-3-clause | -1,884,556,780,845,086,200 | 25.2 | 97 | 0.482773 | false | 3.212061 | true | false | false |
flopezag/fiware-backlog | kernel/DataBoard.py | 1 | 5593 | from kconfig import settings
from kconfig import enablersBook, helpdeskCompBook
from kconfig import trackersBook, workGroupBook
from kernel.DataFactory import DataFactory
__author__ = "Manuel Escriche <mev@tid.es>"
class Data:
@staticmethod
def getUrgentDeskUpcoming():
trackers = ','.join(trackersBo... | apache-2.0 | 5,845,164,835,955,047,000 | 39.824818 | 136 | 0.714107 | false | 3.963855 | false | false | false |
george-hopkins/frn-py | frn/common/protocol.py | 1 | 2718 | from twisted.protocols import basic
from frn.utils import parse_dict
class InvalidServerResponse(Exception):
pass
class InvalidClientRequest(Exception):
pass
class LineReceiver(basic.LineReceiver):
def decodedLineReceived(self, line):
"""Override this for when each line is received."""
... | lgpl-3.0 | -7,237,886,593,561,025,000 | 28.868132 | 73 | 0.598234 | false | 4.334928 | false | false | false |
eoconsulting/django-zoook | django_zoook/tag/views.py | 1 | 4455 | # -*- coding: utf-8 -*-
############################################################################################
#
# Zoook. OpenERP e-sale, e-commerce Open Source Management Solution
# Copyright (C) 2011 Zikzakmedia S.L. (<http://www.zikzakmedia.com>). All Rights Reserved
#
# Module Created: 03/05/2012
# ... | agpl-3.0 | -6,514,768,064,720,154,000 | 42.213592 | 136 | 0.602112 | false | 3.967023 | false | false | false |
MathieuDuponchelle/gobject-introspection | giscanner/girparser.py | 1 | 26691 | # -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; eithe... | gpl-2.0 | -4,067,458,910,382,923,000 | 42.259319 | 94 | 0.558878 | false | 4.103151 | false | false | false |
philanthropy-u/edx-platform | lms/djangoapps/courseware/views/index.py | 1 | 25792 | """
View for Courseware Index
"""
# pylint: disable=attribute-defined-outside-init
import logging
import urllib
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.views import redirect_to_login
from django.urls import reverse
from django.http import Http404
from dja... | agpl-3.0 | 928,075,862,110,087,700 | 40.734628 | 120 | 0.61426 | false | 4.298667 | false | false | false |
ljwolf/spvcm | spvcm/both_levels/se_se/sample.py | 1 | 1359 | import numpy as np
import scipy.linalg as scla
from ...utils import splogdet
from pysal.spreg.utils import spdot
def logp_rho_prec(state, val):
"""
This computes the logp of the spatial parameter using the precision, rather than the covariance. This results in fewer matrix operations in the case of a SE formul... | mit | 5,092,001,588,908,868,000 | 31.357143 | 204 | 0.671082 | false | 3.095672 | false | false | false |
funkring/fdoo | addons-funkring/at_stock/__openerp__.py | 1 | 1542 | # -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-
#############################################################################
#
# Copyright (c) 2007 Martin Reisenhofer <martin.reisenhofer@funkring.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | agpl-3.0 | -4,827,440,454,047,546,000 | 34.045455 | 78 | 0.57393 | false | 3.913706 | false | false | false |
sanal-cem/heritago | heritago/heritages/tests/tests_models.py | 1 | 2021 | from django.test import TestCase
from heritages.models import Tag, Heritage, Multimedia, UserProfile, User
import os
testfile = "testfile.txt"
testfile2 = "testfile2.txt"
class ModelsTest(TestCase):
@classmethod
def setUpClass(cls):
Tag.objects.create(name="TAG_ancient")
title = "Test Mosque... | mit | 3,023,365,666,309,742,000 | 33.844828 | 114 | 0.641267 | false | 3.564374 | true | false | false |
mjhouse/scripts | hex/env.py | 1 | 2609 | import re, shlex
import math
hextag = re.compile('{{(.*?)}}',flags=re.MULTILINE|re.DOTALL)
class HexExpression:
delimiters = (' ', '=','-','+','*','(',')')
quotes = ('\"','\'')
def __init__( self, tokens ):
self.operations = {
'=':self.assign,
'-':self.minus,
... | gpl-2.0 | -2,340,866,839,609,065,500 | 29.337209 | 96 | 0.48716 | false | 4.013846 | false | false | false |
thejevans/pointSourceAnalysis | convertH5_GFU.py | 1 | 1276 | #!/usr/bin/env python
'''
Template to convert from HDF5 files to NPY numpy array Files. This implementation uses
parseGFU.py to parse the data
'''
# Imports
from __future__ import print_function
from optparse import OptionParser
import tables
import numpy as np
import parseGFU
# Command parsing
usage = '%prog [optio... | gpl-3.0 | -6,438,877,276,518,161,000 | 27.355556 | 86 | 0.670063 | false | 3.393617 | false | false | false |
flgiordano/netcash | +/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_projection_spec.py | 1 | 10147 | # Copyright 2015 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 ag... | bsd-3-clause | 4,696,202,010,263,796,000 | 28.669591 | 80 | 0.673401 | false | 4.373707 | false | false | false |
cmr/automatafl | old_python_prototype/server.py | 1 | 6501 | """
Automatafl HTTP game server.
There is a central store of all currently-running games, with the board and
game state. Each game is identified by a UUIDv4. When creating a game, the
client has an option to make the game public or private. Public games will be
listed publically. A player may join any game which they ... | apache-2.0 | -5,343,330,481,925,989,000 | 31.505 | 84 | 0.610983 | false | 3.188328 | false | false | false |
ppy/angle | scripts/generate_android_bp.py | 1 | 19660 | # Copyright The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Generates an Android.bp file from the json output of a 'gn desc' command.
# Example usage:
# gn desc out/Android --format=json "*" > desc.json
# py... | bsd-3-clause | -6,153,206,636,641,283,000 | 33.013841 | 119 | 0.588708 | false | 3.685098 | false | false | false |
biothings/biothings_explorer | tests/test_apis/test_cordmolecularactivity.py | 1 | 4943 | import unittest
from biothings_explorer.registry import Registry
from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher
from .utils import get_apis
reg = Registry()
class TestSingleHopQuery(unittest.TestCase):
def test_ma2protein(self):
"""Test gene-protein"""
seqd = Singl... | apache-2.0 | 8,533,805,272,853,411,000 | 32.856164 | 78 | 0.564839 | false | 3.57929 | true | false | false |
ahmadia/binder | web/app.py | 1 | 5636 | import Queue
import json
import signal
import time
from tornado import gen
from tornado.ioloop import IOLoop
from tornado.web import Application, RequestHandler
from tornado.httpserver import HTTPServer
from binder.service import Service
from binder.app import App
from binder.cluster import ClusterManager
from .buil... | apache-2.0 | -671,810,061,599,228,800 | 29.464865 | 98 | 0.625798 | false | 3.92206 | false | false | false |
mithro/HDMI2USB-litex-firmware | targets/neso/base.py | 1 | 5595 | # Support for the Numato Neso Artix 7 100T Board
from migen import *
from migen.genlib.resetsync import AsyncResetSynchronizer
from litex.soc.integration.soc_core import mem_decoder
from litex.soc.integration.soc_sdram import *
from litex.soc.integration.builder import *
from litedram.modules import MT41K128M16
from ... | bsd-2-clause | 329,493,176,064,576,200 | 35.809211 | 107 | 0.562645 | false | 3.008065 | false | false | false |
SergeyStaroletov/Patterns17 | CourseWorkReports/Курсовой проект Киреков ПИ-42/Исходный код/Model/Classifiers/ImageClassifier.py | 1 | 1143 | import keras
import numpy as np
from keras.preprocessing import image
from .IClassifier import IClassifier
class ImageClassifier(IClassifier):
""" классификатор изображений """
def __init__(self):
self.__input_shape = None
self.__aliases = None
self.__model = None
... | mit | -2,960,119,143,002,614,000 | 31.5625 | 91 | 0.568901 | false | 3.20597 | false | false | false |
gmr/mikkoo | mikkoo/statsd.py | 1 | 5519 | """
Statsd Client that takes configuration first from the rejected configuration
file, falling back to environment variables, and finally default values.
Environment Variables:
- STATSD_HOST
- STATSD_PORT
- STATSD_PREFIX
"""
import logging
import os
import socket
from tornado import iostream
LOGGER = logging.ge... | bsd-3-clause | -7,954,871,945,239,064,000 | 31.464706 | 78 | 0.586157 | false | 4.17158 | false | false | false |
f3at/feat | src/feat/configure/uninstalled.py | 1 | 1393 | # F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# 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... | gpl-2.0 | -509,342,342,318,453,400 | 38.8 | 73 | 0.730079 | false | 3.491228 | false | false | false |
bibarz/bibarz.github.io | dabble/ab/auth_algorithms.py | 1 | 17145 | # Import any required libraries or modules.
import numpy as np
from sklearn import svm
from sklearn.ensemble import RandomForestClassifier
from sklearn.neighbors import KNeighborsClassifier
import csv
import sys
class MetaParams:
n_lda_ensemble = 101
lda_ensemble_feature_fraction = 0.4
mode = 'lda_ensembl... | mit | 2,837,573,524,067,170,300 | 45.972603 | 172 | 0.633829 | false | 3.518367 | false | false | false |
maferelo/saleor | saleor/site/migrations/0017_auto_20180803_0528.py | 3 | 1357 | # Generated by Django 2.0.3 on 2018-08-03 10:28
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("site", "0016_auto_20180719_0520")]
operations = [
migrations.CreateModel(
name="SiteSettingsTranslation",
... | bsd-3-clause | -1,561,289,987,221,625,000 | 32.097561 | 78 | 0.46647 | false | 5.101504 | false | false | false |
Azure/azure-sdk-for-python | sdk/servicebus/azure-servicebus/tests/perf_tests/receive_message_batch.py | 1 | 1324 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | -8,110,725,861,099,683,000 | 41.709677 | 95 | 0.527946 | false | 4.597222 | false | false | false |
slogan621/tscharts | tscharts/views.py | 1 | 9381 | #(C) Copyright Syd Logan 2016-2021
#(C) Copyright Thousand Smiles Foundation 2016-2021
#
#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 req... | apache-2.0 | 1,100,830,941,482,948,100 | 30.166113 | 130 | 0.538109 | false | 4.981944 | false | false | false |
wanglei828/apollo | modules/tools/plot_planning/speed_dsteering_data.py | 1 | 3396 | #!/usr/bin/env python
###############################################################################
# Copyright 2019 The Apollo Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy ... | apache-2.0 | -6,538,834,778,381,319,000 | 37.157303 | 80 | 0.592756 | false | 3.96729 | false | false | false |
PanDAWMS/panda-server | pandaserver/daemons/scripts/copyArchive.py | 1 | 71078 | import os
import re
import sys
import time
import fcntl
import shelve
import datetime
import traceback
import requests
from urllib3.exceptions import InsecureRequestWarning
import pandaserver.userinterface.Client as Client
from pandaserver.taskbuffer import EventServiceUtils
from pandacommon.pandalogger.PandaLogger i... | apache-2.0 | 4,297,887,075,583,032,000 | 45.885224 | 323 | 0.571991 | false | 3.775724 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.