repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nfco/netforce | netforce_general/netforce_general/models/report_template.py | 2 | 2793 | # 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 | -5,616,491,151,776,131,000 | 45.55 | 243 | 0.628357 | false | 3.961702 | false | false | false |
kaiw/meld | meld/ui/msgarea.py | 1 | 8941 | # This file is part of the Hotwire Shell user interface.
#
# Copyright (C) 2007,2008 Colin Walters <walters@verbum.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the ... | gpl-2.0 | -2,819,660,646,051,512,300 | 33.388462 | 87 | 0.586959 | false | 3.770983 | false | false | false |
eoss-cloud/madxxx_catalog_api | catalog/model/orm.py | 1 | 4406 | #-*- coding: utf-8 -*-
""" EOSS catalog system
catalog objects ORM model used for the db connection
"""
__author__ = "Thilo Wehrmann, Steffen Gebhardt"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["Thilo Wehrmann", "Steffen Gebhardt"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "Thilo Weh... | mit | 1,820,237,830,777,222,000 | 37.649123 | 124 | 0.658874 | false | 3.708754 | false | false | false |
praba230890/PYPOWER | pypower/hasPQcap.py | 2 | 2682 | # Copyright (c) 1996-2015 PSERC. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""Checks for P-Q capability curve constraints.
"""
from sys import stderr
from numpy import any, zeros, nonzero
from pypower.idx_gen import QMAX, QMIN, PMAX, P... | bsd-3-clause | 5,609,161,318,974,450,000 | 41.571429 | 86 | 0.655854 | false | 3.114983 | false | false | false |
rsalmaso/python-stua | setup.py | 1 | 2128 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2015, Raffaele Salmaso <raffaele@salmaso.org>
#
# 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, includ... | mit | 4,953,026,207,646,153,000 | 38.407407 | 93 | 0.690789 | false | 4.084453 | false | false | false |
cwlseu/recipes | pyrecipes/mxnet/argument_default.py | 1 | 6648 |
import os
import argparse
import logging
logging.basicConfig(level=logging.DEBUG)
def add_data_args(parser):
data = parser.add_argument_group('Data', 'the input images')
data.add_argument('--data-train', type=str, help='the training data')
data.add_argument('--data-val', type=str, help='the validation da... | gpl-3.0 | 8,618,840,667,748,056,000 | 46.492857 | 111 | 0.579422 | false | 3.777273 | false | false | false |
SchoolIdolTomodachi/SchoolIdolAPI | api/migrations/0070_auto_20150914_2035.py | 4 | 2100 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0069_verificationrequest'),
]
operations = [
migrations.CreateModel(
name='UserImage',
fields... | apache-2.0 | -4,888,551,004,536,755,000 | 37.888889 | 202 | 0.57619 | false | 4.449153 | false | false | false |
qxcv/comp2560 | project/datasets.py | 1 | 13733 | """Functions for reading data sets (LSP, INRIA, Buffy, etc.)"""
from abc import abstractmethod, ABCMeta
from copy import copy
from io import BytesIO
from zipfile import is_zipfile, ZipFile
import numpy as np
from scipy.io import loadmat
from scipy.misc import imread
# Configuration files will only be allowed to sp... | apache-2.0 | -2,030,665,841,630,464,300 | 38.805797 | 79 | 0.592806 | false | 3.684733 | false | false | false |
ve7cxz/PyAPRSd | aprs/client.py | 1 | 2336 | #!/usr/bin/env python
from twisted.internet.protocol import ClientFactory
from twisted.protocols.basic import LineReceiver
from twisted.internet import reactor
from twisted.internet.task import LoopingCall
import sys, re
# Connector class
class Client:
def __init__(self, core, name):
self.version = "PyAPRSd (a... | bsd-3-clause | 609,478,180,646,508,000 | 29.337662 | 123 | 0.682791 | false | 3.835796 | false | false | false |
Jorge-Rodriguez/ansible | lib/ansible/module_utils/facts/virtual/freebsd.py | 31 | 2052 | # 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 in the hope that ... | gpl-3.0 | 7,314,445,263,512,565,000 | 35.642857 | 121 | 0.701754 | false | 4.055336 | false | false | false |
UASLab/ImageAnalysis | scripts/lib/camera.py | 1 | 5686 | #!/usr/bin/python
import math
import numpy as np
from props import getNode
from .logger import log
from . import transformations
# camera parameters are stored in the global property tree, but this
# class provides convenient getter/setter functions
d2r = math.pi / 180.0
r2d = 180.0 / math.pi
camera_node = getNod... | mit | -3,556,851,521,709,333,000 | 33.460606 | 77 | 0.608336 | false | 3.024468 | false | false | false |
390910131/Misago | misago/users/api/userendpoints/create.py | 7 | 4292 | from django.contrib.auth import authenticate, get_user_model, login
from django.core.exceptions import PermissionDenied
from django.utils.translation import ugettext as _
from django.views.decorators.csrf import csrf_protect
from rest_framework import status
from rest_framework.response import Response
from misago.co... | gpl-2.0 | -4,032,580,736,499,001,300 | 34.471074 | 72 | 0.61137 | false | 4.475495 | false | false | false |
yanheven/ucloud-python-sdk | ucloudclient/utils/shell_utils.py | 1 | 3656 | import json
import os
import textwrap
import time
import six
import prettytable
def add_arg(func, *args, **kwargs):
"""Bind CLI arguments to a shell.py `do_foo` function."""
if not hasattr(func, 'arguments'):
func.arguments = []
if (args, kwargs) not in func.arguments:
func.arguments.in... | apache-2.0 | 1,845,138,390,497,710,000 | 23.536913 | 76 | 0.536926 | false | 3.704154 | false | false | false |
apikler/VideoStore | site/userprofile/tests.py | 1 | 7735 | import os
from django.test import TestCase
from django.test.utils import override_settings
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.models import User, Group
from userprofile.forms import USERNAME_MIN_LENGTH
from userprofile.models import Producer, UserI... | bsd-2-clause | 3,171,552,396,241,173,000 | 25.399317 | 124 | 0.692696 | false | 3.020305 | true | false | false |
evodify/genotype-files-manipulations | vcf_to_SIFT4G.py | 1 | 2978 | #! /usr/bin/env python2
'''
This script converts a VCF file to SIFT4G input.
#Example input:
#CHROM POS ID REF
scaffold_1 1 . C
scaffold_1 2 . CAA
scaffold_1 3 . T
scaffold_1 4 . A
scaffold_1 5 . A
scaffold_1 6 . A
scaffold_1 7 . C
scaffold_1 8 . C
scaffold_1 9 . C
#Ex... | mit | -6,278,089,764,786,632,000 | 25.828829 | 96 | 0.462055 | false | 2.549658 | false | false | false |
tweekmonster/moult | moult/__init__.py | 1 | 1086 | '''A utility for finding Python packages that may not be in use.
'''
from __future__ import print_function
import os
import sys
import codecs
__all__ = ('__version__', 'main')
__version__ = '0.1.2'
if sys.stdout.encoding is None:
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
if sys.stderr.encoding is None:... | mit | 85,206,168,975,489,870 | 27.578947 | 85 | 0.632597 | false | 3.596026 | false | false | false |
amentis/Rexi | RxAPI/RxGUI/PasswordEdit.py | 1 | 2488 | __author__ = 'amentis'
from RxAPI.RxGUI import LineEdit
class PasswordEdit(LineEdit):
"""
password input field
"""
def __init__(self, parent, name, text=" "):
"""
@param parent: RxGUIObject parent REXI object
@param name: str name of the REXI object
@param text: str va... | apache-2.0 | 2,143,450,686,837,399,300 | 32.186667 | 105 | 0.463023 | false | 3.675037 | false | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/baremetal/test_inspect_chassis_parallel.py | 1 | 7394 | '''
Test chassis operation
@author chenyuan.xu
'''
import zstackwoodpecker.operations.baremetal_operations as baremetal_operations
import zstackwoodpecker.operations.account_operations as acc_ops
import zstackwoodpecker.operations.resource_operations as res_ops
import zstackwoodpecker.operations.cluster_operations as ... | apache-2.0 | -8,604,302,266,106,535,000 | 44.085366 | 178 | 0.670273 | false | 3.091137 | true | false | false |
carragom/modoboa | modoboa/admin/models/alias.py | 1 | 7566 | """Models related to aliases management."""
import hashlib
import random
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.encoding import python_2_unicode_compatible, smart_text
from django.utils.translation import ugettext as _, ugettext_lazy
from reversion import revision... | isc | 4,114,785,793,027,873,000 | 32.039301 | 78 | 0.572297 | false | 4.301308 | false | false | false |
brentjens/pyautoplot | pyautoplot/angle.py | 1 | 5154 | from pylab import pi,floor,sign
class Angle:
lower_bound = 0.0
upper_bound = 2*pi
include_upper_bound = False
cyclical = True
value = None
def __init__(self, value, lower_bound=0, upper_bound=2*pi, include_upper_bound=False,type='rad', cyclical=True):
"""type may be 'rad' 'hms' or... | gpl-3.0 | -8,822,151,369,592,561,000 | 31.2125 | 116 | 0.513388 | false | 3.086228 | false | false | false |
openrtc/OpenHRIVoice | openhrivoice/RecaiusSpeechRecogRTC/recaius.py | 1 | 8687 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
import time,wave
import math
import json
import urllib
import urllib.request, urllib.error
import cookielib
import base64
class RecaiusAsr():
def __init__(self, service_id="", passwd=""):
self._baseAuthUrl="https://api.recaius.jp/auth/v2/"
sel... | epl-1.0 | 4,033,529,528,936,008,700 | 28.648464 | 121 | 0.590307 | false | 3.485955 | false | false | false |
antkillerfarm/antkillerfarm_crazy | deep-visualization-toolbox/find_maxes/max_tracker.py | 2 | 16175 | #! /usr/bin/env python
import os
import ipdb as pdb
import errno
from datetime import datetime
#import caffe
from loaders import load_imagenet_mean, load_labels, caffe
from jby_misc import WithTimer
from caffe_misc import shownet, RegionComputer, save_caffe_image
import numpy as np
default_layers = ['conv1', 'con... | gpl-3.0 | 5,780,497,485,178,496,000 | 45.479885 | 161 | 0.560185 | false | 3.366285 | false | false | false |
kcah27/HnTool | HnTool/modules/ssh.py | 1 | 4380 | # -*- coding: utf-8 -*-
#
# HnTool rules - ssh
# Copyright (C) 2009-2010 Hugo Doria <mail@hugodoria.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, ... | gpl-2.0 | 6,856,863,774,101,900,000 | 43.252525 | 87 | 0.556849 | false | 4.596013 | false | false | false |
ioanpocol/superdesk-core | apps/publish/content/published_package_items.py | 3 | 4573 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2017 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from apps.archive.... | agpl-3.0 | -5,276,377,140,319,257,000 | 38.765217 | 113 | 0.599169 | false | 3.94905 | false | false | false |
nickmab/async_util | tests/test_web.py | 1 | 1215 | import nickmab.async_util.web as w
from _utils import expect_specific_err as _expect_specific_err
'''To be run by executing py.test in the parent dir'''
def test_json_query_pool():
q = {
'ip': 'http://ip.jsontest.com/',
'headers': 'http://headers.jsontest.com/',
}
p = w.JSONQueryPool(1, q... | mit | -7,170,860,915,303,611,000 | 31.837838 | 79 | 0.62716 | false | 3.131443 | true | false | false |
simonneuville/runamic_server | djangoserver/server/logic/graph/debug.py | 1 | 1482 | from server.logic.grid.interval import into_interval
###############################################################################
# DEBUGGING AND PRINTING STATIC DATA #
###############################################################################
def store_coverage(grid)... | mit | -2,306,100,298,810,906,600 | 46.806452 | 89 | 0.433198 | false | 3.641278 | false | false | false |
blaze/distributed | distributed/protocol/numba.py | 1 | 2079 | import weakref
import numba.cuda
import numpy as np
from .cuda import cuda_deserialize, cuda_serialize
from .serialize import dask_deserialize, dask_serialize
try:
from .rmm import dask_deserialize_rmm_device_buffer
except ImportError:
dask_deserialize_rmm_device_buffer = None
@cuda_serialize.register(numb... | bsd-3-clause | -5,956,785,714,963,355,000 | 29.573529 | 87 | 0.68254 | false | 3.321086 | false | false | false |
jamespic/pyspark-flame | setup.py | 1 | 1110 | #!/usr/bin/env python
from setuptools import setup, find_packages
long_description = open('README.md').read()
setup(
name='pyspark-flame',
description='A low-overhead sampling profiler for PySpark, that outputs Flame Graphs',
long_description=long_description,
long_description_content_type='text/markdo... | mit | 9,076,966,231,941,691,000 | 34.806452 | 90 | 0.636937 | false | 3.894737 | false | false | false |
tnarik/malmo | Malmo/test/PythonTests/test_agent_host.py | 1 | 2418 | # ------------------------------------------------------------------------------------------------
# Copyright (c) 2016 Microsoft Corporation
#
# 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 ... | mit | -6,713,641,080,522,435,000 | 52.733333 | 114 | 0.72043 | false | 4.219895 | false | false | false |
tugluck/galah | galah/sheep/components/maintainer.py | 1 | 5361 | # Copyright 2012-2013 John Sullivan
# Copyright 2012-2013 Other contributers as noted in the CONTRIBUTERS file
#
# This file is part of Galah.
#
# Galah is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, e... | agpl-3.0 | 6,315,060,890,248,796,000 | 33.811688 | 80 | 0.590561 | false | 4.460067 | true | false | false |
peoplepower/botlab | virtual_devices/virtual_light_bulb.py | 3 | 8809 | #!/usr/bin/env python
# encoding: utf-8
'''
Created on June 19, 2016
@author: David Moss
'''
# This module will emulate a light bulb device.
# input function behaves differently in Python 2.x and 3.x. And there is no raw_input in 3.x.
if hasattr(__builtins__, 'raw_input'):
input=raw_input
import requests
import... | apache-2.0 | -6,061,434,898,965,593,000 | 33.143411 | 197 | 0.615166 | false | 3.846725 | false | false | false |
janusnic/dj-21v | unit_04/mysite/blog/views.py | 1 | 1547 | from django.shortcuts import render
from .models import Article
def special_case_2016(request):
item = {'title':'Special Case 2016','topics':10}
return render(request, "blog/special_case_2016.html", {'item':item})
def year_archive(request,yy):
item = {'title':'Year Archive','content':yy}
retur... | mit | 1,106,943,980,245,187,200 | 34.976744 | 72 | 0.670976 | false | 3.453125 | false | false | false |
EliotBerriot/1flow | oneflow/settings/snippets/celery.py | 2 | 6468 | # -*- coding: utf-8 -*-
#
# NOTE: this snippet should come *after* the other celery_*
# because it uses the BROKER_URL that should have been
# defined in these.
#
"""
Copyright 2013 Olivier Cortès <oc@1flow.io>
This file is part of the 1flow project.
1flow is free software: you can redistribut... | agpl-3.0 | 4,121,572,665,075,342,000 | 33.866279 | 79 | 0.651492 | false | 2.78671 | false | false | false |
imiolek-ireneusz/eduActiv8 | classes/dialog.py | 1 | 1959 | # -*- coding: utf-8 -*-
import os
import pygame
class Dialog:
def __init__(self, game_board):
self.game_board = game_board
self.color = (255, 255, 255, 150)
self.scheme = "white"
if self.game_board.mainloop.scheme is not None:
if self.game_board.mainloop.scheme.dark:
... | gpl-3.0 | -3,685,039,538,835,087,000 | 35.277778 | 99 | 0.574273 | false | 3.259567 | false | false | false |
cpcloud/ibis | ibis/bigquery/tests/test_compiler.py | 1 | 17279 | import datetime
import pandas as pd
import pytest
import ibis
import ibis.expr.datatypes as dt
pytestmark = pytest.mark.bigquery
pytest.importorskip('google.cloud.bigquery')
def test_timestamp_accepts_date_literals(alltypes, project_id):
date_string = '2009-03-01'
param = ibis.param(dt.timestamp).name('par... | apache-2.0 | -8,058,123,059,573,430,000 | 29.260946 | 143 | 0.583599 | false | 3.254049 | true | false | false |
bl8/bockbuild | packages/monomac.py | 1 | 1143 | class MonoMacPackage (Package):
def __init__ (self):
self.pkgconfig_version = '1.0'
self.maccore_tag = '0b71453'
self.maccore_source_dir_name = 'mono-maccore-0b71453'
self.monomac_tag = 'ae428c7'
self.monomac_source_dir_name = 'mono-monomac-ae428c7'
Package.__init__ (self, 'monomac', self.monomac_tag)
... | mit | -122,618,690,322,472,420 | 34.71875 | 226 | 0.669291 | false | 2.54 | false | false | false |
SanPen/GridCal | src/research/three_phase/Engine/Devices/transformer.py | 1 | 8052 | from research.three_phase.Engine.Devices.branch import *
from research.three_phase.Engine.Devices.bus import *
class TransformerType1p:
def __init__(self, name, conn_f: Connection, conn_t: Connection, r, x, Vf_rate, Vt_rate, rating=1e-6):
"""
Single phase transformer constructor
:param c... | gpl-3.0 | 3,492,071,755,751,888,400 | 31.337349 | 113 | 0.532787 | false | 3.21694 | false | false | false |
Stargrazer82301/CAAPR | CAAPR/CAAPR_AstroMagic/PTS/pts/do/evolve/rastrigin.py | 1 | 1161 |
from pts.evolve.simplega import GAEngine, RawScoreCriteria
from pts.evolve.genomes.list1d import G1DList
from pts.evolve import Mutators, Initializators
from pts.evolve import Selectors
from pts.evolve import Consts
import math
# This is the Rastrigin Function, a deception function
def rastrigin(genome):
n = ... | mit | 1,056,363,318,468,586,100 | 25.409091 | 84 | 0.722653 | false | 3 | false | false | false |
lwcook/horsetail-matching | horsetailmatching/hm.py | 1 | 37268 | import pdb
import time
import math
import copy
import warnings
import numpy as np
class HorsetailMatching(object):
'''Class for using horsetail matching within an optimization. The main
functionality is to evaluate the horsetail matching
metric (and optionally its gradient) that can be used with external... | mit | -5,351,763,803,765,133,000 | 36.644444 | 91 | 0.546018 | false | 3.593482 | false | false | false |
cloudnull/genastack_roles | genastack_roles/postgres_connector/__init__.py | 1 | 1983 | # =============================================================================
# Copyright [2013] [Kevin Carter]
# License Information :
# This software has no warranty, it is provided 'as is'. It is your
# responsibility to validate the behavior of the routines and its accuracy
# using the code provided. Consult the ... | gpl-3.0 | 135,704,277,564,554,050 | 26.929577 | 79 | 0.508321 | false | 3.672222 | false | false | false |
danielfrg/libhdfs3.py | setup.py | 2 | 3161 | import os
import sys
import versioneer
from distutils.core import setup
from setuptools import find_packages
from distutils.extension import Extension
from distutils.command.sdist import sdist as _sdist
from distutils.command.install import install as _install
try:
import numpy as np
except:
print("ERROR: Nu... | apache-2.0 | -3,048,544,748,393,052,700 | 26.25 | 102 | 0.663714 | false | 3.547699 | false | false | false |
3cky/horus | src/horus/engine/calibration/calibration.py | 1 | 2379 | # -*- coding: utf-8 -*-
# This file is part of the Horus Project
__author__ = 'Jesús Arroyo Torrens <jesus.arroyo@bq.com>'
__copyright__ = 'Copyright (C) 2014-2015 Mundo Reader S.L.'
__license__ = 'GNU General Public License v2 http://www.gnu.org/licenses/gpl2.html'
import cv2
import time
import struct
import platfor... | gpl-2.0 | 4,559,464,497,284,393,500 | 28 | 83 | 0.678722 | false | 4.003367 | false | false | false |
endlessm/chromium-browser | third_party/chromite/cli/cros/cros_deploy.py | 1 | 4618 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""cros deploy: Deploy the packages onto the target device."""
from __future__ import print_function
import sys
from chromi... | bsd-3-clause | 3,510,769,170,832,194,000 | 36.241935 | 79 | 0.666522 | false | 4.043783 | false | false | false |
the/interesting | document.py | 1 | 1568 | #!/usr/bin/env python3
import textutil, source
from json import JSONEncoder
class DocumentEncoder(JSONEncoder):
def default(self, document):
if isinstance(document, Document):
return {'interesting': document.interesting, 'data': document.data}
else:
return json.JSONEncoder.d... | mit | -5,643,662,184,138,353,000 | 21.724638 | 120 | 0.589923 | false | 4.307692 | false | false | false |
studywolf/NDMPS-paper | code/models/ndmps_fs_rhythmic_spa_frontend_poppybot.py | 1 | 10088 | import numpy as np
import nengo
import nengo.utils.function_space
import nengo.spa as spa
from nengo.spa import Vocabulary
from . import forcing_functions
from . import oscillator
from . import point_attractor
nengo.dists.Function = nengo.utils.function_space.Function
nengo.FunctionSpace = nengo.utils.function_space... | gpl-3.0 | 7,006,290,674,394,505,000 | 44.237668 | 82 | 0.55343 | false | 3.431293 | true | false | false |
opennode/nodeconductor-assembly-waldur | src/waldur_mastermind/google/tests/factories.py | 1 | 1275 | import factory
from rest_framework.reverse import reverse
from waldur_mastermind.marketplace.tests import factories as marketplace_factories
from .. import models
class GoogleCredentialsFactory(factory.DjangoModelFactory):
class Meta:
model = models.GoogleCredentials
service_provider = factory.SubF... | mit | 7,733,533,077,950,991,000 | 31.692308 | 87 | 0.644706 | false | 4.411765 | false | false | false |
Kami/sgrstats.com | sgrstats/static.py | 1 | 2595 | # General
CLASS_CATEGORIES = (
(0, 'Stargate Command'),
(1, 'System Lords')
)
USER_AGENT = 'UE3-SGB'
IP_TO_COUNTRY_URL = 'http://api.hostip.info/get_html.php?ip='
# FireSky API related constants
SERVER_LIST_URL = 'http://ws.firesky.com/SGBLogin/ServerListAll'
OBJECTIVE_LIST_URL = 'http://rep1.... | apache-2.0 | 7,282,969,398,000,927,000 | 56.688889 | 127 | 0.667437 | false | 2.932203 | false | false | false |
toshywoshy/ansible | lib/ansible/modules/network/f5/bigip_device_dns.py | 23 | 16644 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -7,647,549,319,754,465,000 | 29.097649 | 91 | 0.564708 | false | 4.223294 | false | false | false |
francois2metz/trac-forge | tracforge/tracenv.py | 1 | 3572 | # -*- coding: utf-8 -*-
#
# This file is part of TracForge Project
#
# Copyright (C) 2008 TracForge Project
#
# See AUTHORS for more informations
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Fou... | agpl-3.0 | -1,910,465,382,730,507,300 | 29.529915 | 77 | 0.600224 | false | 4.027057 | false | false | false |
justinwp/croplands | croplands_api/views/upload.py | 1 | 2312 | from flask import Blueprint, request, current_app, jsonify
from flask_restless.helpers import to_dict
from flask_jwt import current_user
from werkzeug.utils import secure_filename
from werkzeug.exceptions import BadRequest
from croplands_api.utils.s3 import upload_image
import uuid
import cStringIO
from croplands_api.m... | mit | 2,072,080,127,286,894,300 | 29.038961 | 93 | 0.637543 | false | 3.931973 | false | false | false |
mojolab/cowmesh | tools/copy_all.py | 1 | 1150 | #!/usr/bin/python
import os,sys
def get_hosts(hostfile):
hosts=[]
f=open(hostfile,"r")
lines=f.readlines()
for line in lines:
dictionary={}
ip=line.strip().split("\t")[0].lstrip().rstrip()
hostname=line.strip().split("\t")[1].lstrip().rstrip()
dictionary['IP']=ip
dictionary['HOSTNAME']=hostname
hosts.... | gpl-3.0 | 8,341,001,560,533,604,000 | 26.380952 | 101 | 0.549565 | false | 3.304598 | false | false | false |
ajc158/beeworld | gigerommatidiamodel_ardrone.py | 1 | 5185 | import matplotlib.pyplot as plt
import math
import numpy
from mpl_toolkits.mplot3d import Axes3D
def vert(x):
return (0.000734*(x**2))-(0.1042253*x)+4.9
def horr(x):
if x>60:
return (0.00037*(x**2))-(0.04462*x)+3.438
else:
return (0.00069*(x**2))-(0.08333*x)+4.6
def radialDistortion(x,y):
camYaw=0.0/180.0*... | gpl-3.0 | 7,730,899,044,652,040,000 | 22.151786 | 117 | 0.646287 | false | 2.078156 | false | false | false |
nugget/python-insteonplm | insteonplm/messages/standardReceive.py | 1 | 4245 | """INSTEON Standard Receive Message Type 0x50."""
from insteonplm.constants import (
MESSAGE_STANDARD_MESSAGE_RECEIVED_0X50,
MESSAGE_STANDARD_MESSAGE_RECIEVED_SIZE,
)
from insteonplm.address import Address
from insteonplm.messages.message import Message
from insteonplm.messages.messageFlags import MessageFlags... | mit | -1,070,795,497,733,683,500 | 28.075342 | 78 | 0.59788 | false | 4.03901 | false | false | false |
franck-talbart/codelet_tuning_infrastructure | src/cti_hapi/entry.py | 1 | 53444 | # Codelet Tuning Infrastructure
# Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ
#
# 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... | gpl-3.0 | 8,115,307,585,429,338,000 | 48.211786 | 202 | 0.495004 | false | 4.186761 | false | false | false |
kenjitoyama/gleba | frontend/scale.py | 1 | 5249 | #!/usr/bin/python
"""
Copyright (C) 2010 Simon Dawson, Meryl Baquiran, Chris Ellis
and Daniel Kenji Toyama
Copyright (C) 2011 Simon Dawson, Daniel Kenji Toyama
This file is part of Gleba
Gleba is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | gpl-3.0 | 8,699,751,246,541,654,000 | 35.706294 | 73 | 0.599352 | false | 3.834186 | false | false | false |
82488059/python | maze.py | 1 | 2422 | # -*- coding:utf-8 -*-
from random import randint
import pygame
from pygame.locals import *
MAZE_MAX = 50
map1 = {}
for x in xrange(0, MAZE_MAX + 2):
map1[x] = {}
for y in xrange(0, MAZE_MAX + 2):
map1[x][y] = 0
def search(xx, yy):
d = {0: {0: 0, 1: 1}, 1: {0: 1, 1: 0}, 2: {0: 0, 1: -1}, 3: {0... | apache-2.0 | -446,380,809,162,350,340 | 25.021505 | 78 | 0.468182 | false | 2.709966 | false | false | false |
iksaif/biggraphite | biggraphite/cli/web/namespaces/bgutil.py | 2 | 6180 | #!/usr/bin/env python
# Copyright 2018 Criteo
#
# 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 agree... | apache-2.0 | -6,869,944,384,110,115,000 | 29.594059 | 87 | 0.637055 | false | 4.131016 | false | false | false |
ttanner/mucmiete | miete/migrations/0001_initial.py | 2 | 1857 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-02 16:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Miete',... | agpl-3.0 | -7,057,971,694,058,361,000 | 50.388889 | 175 | 0.62 | false | 3.670635 | false | false | false |
RoboCupULaval/StrategyIA | Engine/Tracker/Filters/ball_kalman_filter.py | 1 | 1563 |
import numpy as np
from Engine.Tracker.Filters import KalmanFilter
class BallFilter(KalmanFilter):
def __init__(self, id=None):
super().__init__(id)
self.transition_model = np.array([[1, 0.05, 0, 0], # Position x
[0, 1, 0, 0], # Speed x
... | mit | -7,774,829,474,369,940,000 | 32.255319 | 84 | 0.472169 | false | 3.263048 | false | false | false |
NeurodataWithoutBorders/api-python | nwb/validate.py | 1 | 2376 |
# program to validate nwb files using specification language definition
import sys
import nwb.nwb_file as nwb_file
# import cProfile # for profiling
def validate_file(name, core_spec="nwb_core.py", extensions=None, verbosity="all"):
"""
Parameters
----------
name: string
Name (including ... | bsd-3-clause | -517,344,264,413,211,300 | 37.95082 | 102 | 0.626684 | false | 3.895082 | false | false | false |
rackerlabs/horizon | openstack_dashboard/dashboards/admin/users/forms.py | 1 | 6735 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | -8,654,885,836,584,753,000 | 40.067073 | 78 | 0.585598 | false | 4.70979 | false | false | false |
doutib/lobpredict | lobpredictrst/rf.py | 1 | 4920 |
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import json
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import confusion_matrix
from sklearn.metrics import log_loss
from sklearn.metrics import precision_score
from sklearn.metrics import f1_score
from sklearn.metrics import re... | isc | -1,199,366,332,976,579,300 | 32.479452 | 103 | 0.639525 | false | 3.951496 | true | false | false |
zdot/django-attachments | attachments/tests/test_views.py | 1 | 5323 | import os
import shutil
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import Client
from django.test import TestCase
from .testapp.models import Test
from .utils import (
create_superuser,
create_img_file,
create_doc_file,
create_attachments_img,
c... | bsd-3-clause | -7,059,460,205,979,703,000 | 27.934783 | 146 | 0.569979 | false | 4.324127 | true | false | false |
ThomasSweijen/yadesolute2 | scripts/checks-and-tests/collider-perf/mkGraph.py | 11 | 1417 | #encoding: utf-8
dta={'QS':{},'IS':{},'ISS':{}}
import sys
for f in sys.argv[1:]:
print f,'',
N=f.split('.')[1];
assert(N[-1]=='k'); N=1000*int(N[:-1])
if '.q.' in f: collider='QS'
elif '.i.' in f: collider='IS'
elif '.is.' in f: collider='ISS'
else: raise RuntimeError("Unknown collider type for file "+f)
for l... | gpl-2.0 | 996,433,351,646,900,100 | 36.289474 | 84 | 0.612562 | false | 2.270833 | false | false | false |
mugurrus/ally-py-common | content/content/resource/api/item_resource.py | 1 | 1338 | '''
Created on Nov 8, 2013
@package: content
@copyright: 2013 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Mugur Rus
API specifications for content resource item.
'''
from ally.api.config import query, service
from ally.api.criteria import AsLikeOrdered
from ally.support.api.entity ... | gpl-3.0 | -7,069,189,514,972,627,000 | 26.306122 | 70 | 0.61435 | false | 4.104294 | false | false | false |
ecclesianuernberg/genesis | app/__init__.py | 1 | 1845 | """Init Genesis APP."""
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.migrate import Migrate
from flask_bootstrap import Bootstrap, WebCDN
from flask.ext.misaka import Misaka
from flask.ext.moment import Moment
from flask.ext.pagedown import... | mit | -226,164,232,809,177,440 | 19.965909 | 70 | 0.725203 | false | 3.248239 | true | false | false |
waynew/salmon | salmon/queue.py | 1 | 5957 | """
Simpler queue management than the regular mailbox.Maildir stuff. You
do get a lot more features from the Python library, so if you need
to do some serious surgery go use that. This works as a good
API for the 90% case of "put mail in, get mail out" queues.
"""
import errno
import hashlib
import logging
import ma... | gpl-3.0 | 6,217,779,450,568,227,000 | 31.2 | 100 | 0.569078 | false | 4.13968 | false | false | false |
andersinno/django-form-designer-ai | form_designer/admin.py | 2 | 5663 | from __future__ import unicode_literals
from django.conf.urls import url
from django.contrib import admin
from django.http import Http404
from django.utils.module_loading import import_string
from django.utils.translation import ugettext_lazy as _
from form_designer import settings
from form_designer.forms import For... | bsd-3-clause | -8,079,326,923,427,912,000 | 41.261194 | 174 | 0.61893 | false | 3.876112 | false | false | false |
luv/impulse-cube | deps/pyudev-0.16.1/tests/plugins/fake_monitor.py | 3 | 2985 | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Sebastian Wiesner <lunaryorn@gmail.com>
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the License, or (at your
# opti... | gpl-3.0 | -5,750,070,377,000,877,000 | 29.459184 | 78 | 0.657286 | false | 4.089041 | false | false | false |
dubourg/openturns | python/test/t_ANCOVA_std.py | 1 | 2529 | #! /usr/bin/env python
from __future__ import print_function
from openturns import *
from math import *
TESTPREAMBLE()
try:
RandomGenerator.SetSeed(0)
# Problem parameters
inputDimension = 2
outputDimension = 1
rho = 0.3
a = 4.
b = 5.
# Reference analytical values
covTh = a * a... | gpl-3.0 | 2,120,990,334,853,272,600 | 29.46988 | 70 | 0.654804 | false | 3.517385 | false | false | false |
sravel/scripts | local/concatFastasFile.py | 1 | 4126 | #!/usr/bin/python3.5
# -*- coding: utf-8 -*-
# @package concatFastasFile.py
# @author Sebastien Ravel
"""
The concatFastasFile script
===========================
:author: Sebastien Ravel
:contact: sebastien.ravel@cirad.fr
:date: 11/07/2016
:version: 0.1
Script description
------------------
This Programme c... | gpl-3.0 | -3,484,823,142,266,870,000 | 31.722222 | 194 | 0.589619 | false | 3.632599 | false | false | false |
vlegoff/tsunami | src/primaires/scripting/actions/pratiquer_talent.py | 1 | 4053 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | -7,051,584,805,071,670,000 | 41.452632 | 80 | 0.708654 | false | 3.610564 | false | false | false |
joel-wright/DDRPi | plugins/pong.py | 1 | 15592 | __authors__ = ['Joel Wright']
import logging
import pygame
import pygame.time
import random
from DDRPi import DDRPiPlugin
from pygame.locals import *
class PongPlugin(DDRPiPlugin):
# Static map from joypad to player name
__player__ = {
0: 'player1',
1: 'player2'
}
__numbers__ = {
0: lambda (x,y): [(x,y),(... | mit | 4,827,851,382,131,166,000 | 31.756303 | 135 | 0.626668 | false | 2.541898 | false | false | false |
agaldona/odoomrp-utils | mrp_show_related_attachment/models/mrp_production.py | 11 | 1925 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class MrpProducti... | agpl-3.0 | 1,237,425,684,104,883,200 | 39.104167 | 78 | 0.583896 | false | 4.405034 | false | false | false |
gurneyalex/odoo | addons/l10n_ch/tests/test_swissqr.py | 4 | 6315 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from odoo.addons.account.tests.account_test_classes import AccountingTestCase
from odoo.exceptions import ValidationError
from odoo.tests import tagged
CH_IBAN = 'CH15 3881 5158 3845 3843 7'
QR_IBAN = 'CH21 ... | agpl-3.0 | -6,397,917,698,106,496,000 | 34.672316 | 94 | 0.507602 | false | 3.758333 | true | false | false |
tdanhillman/random_stock_tickers | random_stock_tickers.py | 1 | 1735 | import random
import csv
import urllib2
class RandomStockTickers():
def __init__(self, number_of_stocks):
self.number_of_stocks = number_of_stocks
#Fetches CSV from a specified URL and converts its contents to a list
def get_list_csv_from_url(self, url):
response = urllib2.urlopen(url)
... | mit | 4,593,407,864,598,954,500 | 41.317073 | 114 | 0.648415 | false | 3.548057 | false | false | false |
Smile-SA/odoo_addons | smile_account_asset/models/account_asset_history.py | 1 | 4211 | # -*- coding: utf-8 -*-
# (C) 2019 Smile (<http://www.smile.fr>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.exceptions import UserError
class AccountAssetHistory(models.Model):
_name = 'account.asset.history'
_description = 'Asset history'
... | agpl-3.0 | 454,639,426,100,922,700 | 39.490385 | 79 | 0.628354 | false | 3.623924 | false | false | false |
zcoinofficial/zcoin | qa/rpc-tests/dip4-coinbasemerkleroots.py | 1 | 14287 | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Dash Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from collections import namedtuple
from test_framework.mininode import *
from test_framework.test_framework ... | mit | 8,334,294,554,285,475,000 | 47.761092 | 169 | 0.669 | false | 3.476156 | true | false | false |
swpease/Flavify | flavify/settings/base.py | 1 | 4725 | """
Django settings for flavify project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
f... | mit | -990,427,445,329,009,200 | 25.110497 | 91 | 0.697778 | false | 3.536677 | false | false | false |
kalmanolah/925r | ninetofiver/management/commands/send_missing_performance_reminders.py | 2 | 2734 | """Send a reminder about working days with missing performance."""
import logging
from django.core.management.base import BaseCommand
from django.contrib.auth import models as auth_models
from django.utils.translation import ugettext as _
from django.db.models import Q
import calendar
import datetime
import requests
fr... | gpl-3.0 | 3,164,749,273,511,271,000 | 44.583333 | 167 | 0.639722 | false | 4.312303 | false | false | false |
cbg-ethz/WES_Cancer_Sim | sim_cancer/tools/Wessim_beta/__sub_wessim1.py | 1 | 22695 | import sys
import random
import bisect
import pysam
import gzip
import cPickle
import numpy
from time import time
import argparse
import math
inds={'A':0,'T':1,'G':2,'C':3,'N':4,'a':0,'t':1,'g':2,'c':3,'n':4}
def main(argv):
t0 = time()
parser = argparse.ArgumentParser(description='sub-wessim: a sub-program for Wes... | apache-2.0 | -5,262,012,517,263,366,000 | 26.710623 | 219 | 0.658427 | false | 2.457499 | false | false | false |
ebachelet/pyLIMA | pyLIMA/microlmagnification.py | 1 | 18392 | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 8 14:37:33 2015
@author: ebachelet
"""
from __future__ import division
import numpy as np
from scipy import integrate
import os
import VBBinaryLensing
import time
VBB = VBBinaryLensing.VBBinaryLensing()
VBB.Tol = 0.001
VBB.RelTol = 0.001
VBB.minannuli=2 # stabilizing ... | gpl-3.0 | 198,981,766,812,138,430 | 34.712621 | 118 | 0.638973 | false | 3.164487 | false | false | false |
hbirchtree/coffeecutie | tools/code-tools/opengl-wrapper/commands.py | 1 | 5554 | from versioning import GLVersion
from command_filtering import GLType, GLBaseType, GLBaseTypes
import re
class GLExtension:
def __init__(self):
self.name = None # str
self.api = [] # [str]
def __str__(self):
return 'GLExtension(' + self.name + ')'
def __repr__(self):
r... | mit | 2,736,659,255,595,101,000 | 30.202247 | 108 | 0.541232 | false | 3.590175 | false | false | false |
hirokiky/oauthlib | tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py | 27 | 4330 | """Ensure all tokens are associated with a resource owner.
"""
from __future__ import absolute_import, unicode_literals
import json
import mock
from .test_utils import get_query_credentials, get_fragment_credentials
from ....unittest import TestCase
from oauthlib.oauth2 import RequestValidator
from oauthlib.oauth2 im... | bsd-3-clause | 9,108,921,668,085,554,000 | 39.849057 | 91 | 0.645035 | false | 4.088763 | true | false | false |
CPS-Inc/MsAccessToCal | calExample.py | 1 | 5128 | #!/usr/bin/python
#
# Copyright 2012 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 ... | bsd-3-clause | 4,748,721,688,115,393,000 | 36.166667 | 128 | 0.704368 | false | 3.896657 | false | false | false |
NumesSanguis/MLTensor | adience/adience.py | 1 | 18728 | """Builds the Adience network.
Summary of available functions:
# Compute input images and labels for training. If you would like to run
# evaluations, use input() instead.
inputs, labels = distorted_inputs()
# Compute inference on the model inputs to make a prediction.
predictions = inference(inputs)
# Comput... | apache-2.0 | 4,289,414,121,911,946,000 | 38.098121 | 107 | 0.621262 | false | 3.811152 | false | false | false |
joshthecoder/mousetrap | bottle.py | 2 | 40019 | # -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with url parameter support, templates,
key/value databases, a built-in HTTP Server and adapters for many third party
WSGI/HTTP-server and template engines - all in a single file and... | mit | 4,136,460,199,202,673,000 | 31.588762 | 137 | 0.570204 | false | 4.021606 | false | false | false |
hippo91/XVOF | xfv/src/cohesive_model/cohesive_law.py | 1 | 2628 | # -*- coding: utf-8 -*-
"""
Definition of CohesiveLaw class
"""
import numpy as np
class CohesiveLaw:
"""
A class for cohesive law implementation
"""
def __init__(self, cohesive_law_points: np.array):
"""
Build a cohesive zone model object
:param cohesive_law_points: array des... | gpl-3.0 | -2,708,214,251,575,524,400 | 40.666667 | 96 | 0.595048 | false | 3.947368 | false | false | false |
celian-m/localizator | localizator.py | 1 | 5086 | from __future__ import print_function
try:
import httplib2
import urllib3
from apiclient import errors
except ImportError:
print("run pip3 install httplib2")
import os
try:
from apiclient import discovery
except ImportError:
print("run `pip3 install google-api-python-client`\n "
"or... | apache-2.0 | 4,042,349,023,391,345,700 | 30.596273 | 120 | 0.637239 | false | 3.973438 | false | false | false |
graingert/maluroam | maluroam/eduroam_snort/forms.py | 1 | 3349 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# forms.py
#
# Copyright 2012 Thomas Grainger <tagrain@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation; version 3.
# ... | agpl-3.0 | -1,916,995,472,691,249,200 | 32.49 | 78 | 0.584354 | false | 4.25 | false | false | false |
libreosteo/Libreosteo | libreosteoweb/apps.py | 2 | 1640 |
# This file is part of Libreosteo.
#
# Libreosteo 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.
#
# Libreosteo is distribute... | gpl-3.0 | -720,141,338,454,691,800 | 36.139535 | 80 | 0.672561 | false | 3.961353 | false | false | false |
thetoine/eruditorg | erudit/base/backends.py | 1 | 2297 | import types
import crypt
from django.contrib.auth.backends import ModelBackend
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.contrib.auth import get_user_model
from erudit.utils.mandragore import (
get_user_from_mandragore,
update_user_password
)
def set_pa... | gpl-3.0 | -9,041,349,023,317,980,000 | 29.626667 | 80 | 0.650414 | false | 3.960345 | false | false | false |
ioam/holoviews | holoviews/core/data/dictionary.py | 2 | 16115 | from collections import OrderedDict, defaultdict
try:
import itertools.izip as zip
except ImportError:
pass
import numpy as np
from .interface import Interface, DataError
from ..dimension import dimension_name
from ..element import Element
from ..dimension import OrderedDict as cyODict
from ..ndmapping import... | bsd-3-clause | -5,965,940,515,533,648,000 | 38.692118 | 106 | 0.565498 | false | 4.20977 | false | false | false |
ufaks/pos-addons | tg_pos_message/tg_pos_message.py | 11 | 7592 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 - Thierry Godin. All Rights Reserved
# @author Thierry Godin <thierry@lapinmoutardepommedauphine.com>
#
# This program is free software: yo... | lgpl-3.0 | 5,683,423,739,182,704,000 | 37.155779 | 130 | 0.400026 | false | 4.712601 | true | false | false |
CSNE/Markov-Graphic-Text-Generator | main.py | 1 | 26879 | from tkinter import *
from tkinter.ttk import *
from random import random, shuffle, choice
from math import *
from time import time, sleep
from threading import Thread
import time_profile
from bisect import insort, bisect_left
from SimpleMaths import linear_map
from animation import AnimatedValue
class EndOfChainErr... | mit | 438,111,981,046,687,940 | 33.197201 | 118 | 0.644109 | false | 3.37083 | true | false | false |
Clarify/clarify_python | features/steps/bundle.py | 1 | 5556 | from behave import *
import time
from clarify_python.helper import get_link_href, get_embedded
@when('I request a list of bundles without authentication')
def step_impl(context):
try:
context.result = context.customer.client().get_bundle_list()
except Exception as e:
context.exception = e
@w... | mit | -623,055,743,822,710,100 | 32.269461 | 116 | 0.672606 | false | 3.500945 | false | false | false |
lucasb-eyer/DeepFried2 | examples/MultipleInputs/train.py | 3 | 1262 | import DeepFried2 as df
import numpy as np
from examples.utils import make_progressbar
def train(Xtrain, ytrain, model, optimiser, criterion, epoch, batch_size, mode='train'):
progress = make_progressbar('Training ({}) epoch #{}'.format(mode, epoch), len(Xtrain))
progress.start()
shuffle = np.random.per... | mit | -3,391,321,430,025,726,000 | 35.057143 | 91 | 0.634707 | false | 3.595442 | false | false | false |
purduesigbots/pros-cli | pros/conductor/depots/depot.py | 1 | 1946 | from datetime import datetime, timedelta
from typing import *
import pros.common.ui as ui
from pros.common import logger
from pros.config.cli_config import cli_config
from ..templates import BaseTemplate, Template
class Depot(object):
def __init__(self, name: str, location: str, config: Dict[str, Any] = None,
... | mpl-2.0 | 2,826,501,642,808,918,000 | 47.65 | 117 | 0.633094 | false | 3.868787 | true | false | false |
DataDog/integrations-core | pgbouncer/datadog_checks/pgbouncer/pgbouncer.py | 1 | 6838 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import re
import psycopg2 as pg
from psycopg2 import extras as pgextras
from six.moves.urllib.parse import urlparse
from datadog_checks.base import AgentCheck, ConfigurationError, is_affirmative
from datadog_c... | bsd-3-clause | 1,315,462,248,526,771,500 | 36.163043 | 116 | 0.559813 | false | 4.172056 | false | false | false |
rainbowbismuth/euphoria-py | euphoria/state_machines/nick_and_auth.py | 1 | 3112 | # euphoria-py
# Copyright (C) 2015 Emily A. Bellows
#
# 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.
#
# This program ... | gpl-3.0 | -1,801,401,637,931,006,200 | 30.755102 | 110 | 0.642031 | false | 4.005148 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.