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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ByrdOfAFeather/AlphaTrion | Community/migrations/0034_auto_20171121_1316.py | 1 | 1619 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-11-21 18:16
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | mit | 4,240,877,986,806,022,000 | 42.756757 | 169 | 0.575664 | false | 3.597778 | false | false | false |
sergpolly/FluUtils | FluDB_coding_aln/subsample_msa_random.py | 1 | 2581 | import re
import os
import sys
from Bio import Seq
from Bio import SeqIO
import pandas as pd
import itertools
import numpy as np
import random
import subprocess as sub
def get_least_gaps_seq(seq_dict,length,side='left'):
middle = length/2
min_gaps = length
min_key = ''
# for all sequences check number of gaps in ... | mit | -1,590,030,344,426,314,000 | 12.728723 | 155 | 0.673382 | false | 2.913093 | false | false | false |
dtroyer/python-openstacksdk | openstack/identity/v3/role_domain_group_assignment.py | 1 | 1276 | # 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 | -8,509,374,455,824,138,000 | 36.529412 | 75 | 0.717085 | false | 4.037975 | false | false | false |
YouAreTheHat/pngr | pngr.py | 1 | 17939 |
### ### ### ### ### ### ### IMPORTANT ### ### ### ### ### ### ###
# #
# This module is a work in progress. Comments, particularly the #
# ones preceding a class or function definition, are intended #
# to represent the desired end result of this code. Unt... | lgpl-3.0 | -588,470,887,037,475,200 | 38.864444 | 78 | 0.564468 | false | 3.910835 | false | false | false |
be-cloud-be/horizon-addons | partner-contact/partner_external_map/tests/test_partner_external_map.py | 1 | 3467 | # -*- coding: utf-8 -*-
# © 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp.tests import common
from openerp.exceptions import Warning as UserError
from ..hooks import set_default_map_settings
class TestPartnerExternalMap(common.Transaction... | agpl-3.0 | -35,478,124,546,341,290 | 40.261905 | 79 | 0.632141 | false | 3.55123 | true | false | false |
Linaro/lava-dispatcher | lava_dispatcher/test/test_uboot_ums.py | 1 | 2817 | # Copyright (C) 2018 Linaro Limited
#
# Author: Matthew Hart <matthew.hart@linaro.org>
#
# This file is part of LAVA Dispatcher.
#
# LAVA Dispatcher 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 versi... | gpl-2.0 | 2,561,922,625,065,863,000 | 42.338462 | 109 | 0.707845 | false | 3.701708 | true | false | false |
php1ic/inch | scripts/randomChart.py | 1 | 7115 | #!/usr/bin/env python3
"""
Create chart(s) with random parameters
Using either the executable provided, or
searching for it in standard locations,
and farm the creation on multiple threads
"""
import argparse
import multiprocessing
import os
import random
import shutil
import subprocess
import colorama
from joblib ... | gpl-3.0 | -8,901,250,184,690,402,000 | 28.279835 | 93 | 0.583275 | false | 4.122248 | false | false | false |
neelchauhan/OnionLauncher | OnionLauncher/main.py | 1 | 2902 | import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox
from PyQt5.uic import loadUi
from var import values, version
import torctl
from fn_handle import detect_filename
class MainWindow(QMainWindow):
def __init__(self, *args):
super(MainWindow, self).__init__(*args)
# Load .ui file
loadUi... | bsd-2-clause | 8,074,531,801,412,537,000 | 29.547368 | 100 | 0.709511 | false | 3.192519 | false | false | false |
bsarsgard/blackrocktickets | texas/forms.py | 1 | 1312 | """
Texas - Ticket Sales System
Copyright (C) 2010 Ben Sarsgard
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 ... | apache-2.0 | -4,711,378,940,113,325,000 | 40 | 78 | 0.730945 | false | 4.049383 | false | false | false |
cbouilla/3sum-pool | share.py | 1 | 5451 | import time
import struct
import random
from hashlib import sha256
from binascii import hexlify, unhexlify
JOB_TYPES = ['FOO', 'BAR', 'FOOBAR']
def sha256d(x):
return sha256(sha256(x).digest()).digest()
def swap_endian_words(hex_words):
'''Swaps the endianness of a hexidecimal string of words and converts t... | gpl-3.0 | -3,494,661,404,866,030,600 | 39.080882 | 135 | 0.616401 | false | 3.307646 | false | false | false |
stackforge/python-monascaclient | monascaclient/tests/v2_0/shell/test_alarm_definitions.py | 1 | 5743 | # 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -7,564,279,838,991,846,000 | 33.806061 | 75 | 0.587672 | false | 3.368328 | true | false | false |
dahebolangkuan/ToughRADIUS | radiusd/plugins/acct_stop_process.py | 1 | 3010 | #!/usr/bin/env python
#coding=utf-8
from twisted.python import log
from pyrad import packet
from store import store
from settings import *
import logging
import decimal
import datetime
import utils
decimal.getcontext().prec = 11
decimal.getcontext().rounding = decimal.ROUND_UP
def process(req=None,user=None,runstat=N... | bsd-2-clause | -922,994,961,154,856,700 | 36.17284 | 111 | 0.599336 | false | 3.781407 | false | false | false |
alvason/infectious-pulse | code/sir_array_cross_immunity.py | 1 | 10364 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# # Infectious Pulse
# https://github.com/alvason/infectious-pulse/
#
# ### Many-strain SIR evolution --- its equilibrium state and infectious pulse due to mutation and cross-immunity
# <codecell>
'''
author: Alvason Zhenhua Li
date: 03/23/2015
... | gpl-2.0 | 7,623,518,905,974,450,000 | 39.484375 | 231 | 0.623794 | false | 2.53151 | false | false | false |
e7dal/hexy | hexy/commands/cmd_point.py | 1 | 1476 | # -*- coding: utf-8 -*-
# Part of hexy. See LICENSE file for full copyright and licensing details.
import click
from ..cli import pass_hexy
from .. import Hexy
@click.command('point',
short_help='Put a single point on a grid and show grid in hexy tool')
@click.option('--xsize',
'-x',
... | gpl-3.0 | -5,836,573,175,946,536,000 | 29.75 | 87 | 0.553523 | false | 3.49763 | false | false | false |
unstko/adventofcode2016 | 01/solution.py | 1 | 3446 | from lib import solution
from lib.point import Point2D
from lib.map import Map
import copy
class Solution(solution.Solution):
def __init__(self, nr):
super().__init__(nr)
self.instructions = []
self.directions = ['N', 'E', 'S', 'W']
self.face = 0
self.source = Point2D(0, 0)... | mit | -315,879,149,843,139,140 | 31.205607 | 74 | 0.525537 | false | 3.762009 | false | false | false |
wadobo/socializa | backend/socializa/settings.py | 1 | 9337 | """
Django settings for socializa project.
Generated by 'django-admin startproject' using Django 1.10.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import ... | agpl-3.0 | 583,695,365,934,439,000 | 28.269592 | 95 | 0.678912 | false | 3.556952 | false | false | false |
mfussenegger/python-prompt-toolkit | prompt_toolkit/key_bindings/vi.py | 1 | 35929 | from __future__ import unicode_literals
from ..enums import IncrementalSearchDirection, InputMode
from ..keys import Keys
from ..line import ClipboardData, ClipboardDataType, SelectionType, indent, unindent
from ..selection import SelectionType
from .basic import basic_bindings
from .utils import create_handle_decorat... | bsd-3-clause | 7,872,446,468,992,112,000 | 34.19001 | 128 | 0.583234 | false | 3.73017 | false | false | false |
google/vae-seq | vaeseq/examples/text/text.py | 1 | 4187 | # Copyright 2018 Google, Inc.,
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | -6,422,594,320,282,468,000 | 31.207692 | 74 | 0.657511 | false | 3.775473 | false | false | false |
3cky/netdata | collectors/python.d.plugin/python_modules/bases/charts.py | 1 | 12932 | # -*- coding: utf-8 -*-
# Description:
# Author: Ilya Mashchenko (ilyam8)
# SPDX-License-Identifier: GPL-3.0-or-later
from bases.collection import safe_print
CHART_PARAMS = ['type', 'id', 'name', 'title', 'units', 'family', 'context', 'chart_type', 'hidden']
DIMENSION_PARAMS = ['id', 'name', 'algorithm', 'multiplier'... | gpl-3.0 | -8,566,432,299,610,067,000 | 30.773956 | 113 | 0.564259 | false | 4.093701 | false | false | false |
roaet/wafflehaus.neutron | tests/test_neutron_context.py | 1 | 11693 | # Copyright 2013 Openstack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -5,572,070,798,425,745,000 | 48.130252 | 78 | 0.642863 | false | 3.934388 | true | false | false |
wgwoods/fedup2 | setup.py | 1 | 2636 | #!/usr/bin/python
from distutils.core import setup, Command
from distutils.util import convert_path
from distutils.command.build_scripts import build_scripts
from distutils import log
import os
from os.path import join, basename
from subprocess import check_call
class Gettext(Command):
description = "Use po/POTF... | gpl-2.0 | -929,589,590,876,869,800 | 28.954545 | 76 | 0.581942 | false | 3.691877 | false | false | false |
hopshadoop/hops-util-py | hops/experiment_impl/distribute/parameter_server_reservation.py | 1 | 11016 | from __future__ import absolute_import
from __future__ import division
from __future__ import nested_scopes
from __future__ import print_function
import logging
import pickle
import select
import socket
import struct
import threading
import time
from hops import util
from hops.experiment_impl.util import experiment_u... | apache-2.0 | 5,554,518,278,654,147,000 | 25.291169 | 105 | 0.590051 | false | 3.97546 | false | false | false |
sloria/osf.io | osf/migrations/0113_add_view_collectionprovider_to_admin_perm.py | 1 | 2258 | from __future__ import unicode_literals
import logging
from django.core.management.sql import emit_post_migrate_signal
from django.db import migrations
from django.db.models import Q
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
logger = logging.getLogger(__file__)
d... | apache-2.0 | 860,804,156,702,227,200 | 33.738462 | 90 | 0.723206 | false | 3.866438 | false | false | false |
rlbabyuk/integration_tests | scripts/cleanup_edomain_templates.py | 1 | 12391 | #!/usr/bin/env python2
"""This script takes an provider and edomain as optional parameters, and
searches for old templates on specified provider's export domain and deletes
them. In case of no --provider parameter specified then this script
traverse all the rhevm providers in cfme_data.
"""
import argparse
import dat... | gpl-2.0 | -5,913,989,060,310,183,000 | 35.444118 | 99 | 0.60665 | false | 4.04406 | false | false | false |
katakumpo/niceredis | tests/test_lock.py | 1 | 5521 | from __future__ import with_statement
import time
import pytest
from redis.exceptions import LockError, ResponseError
from redis.lock import Lock, LuaLock
class TestLock(object):
lock_class = Lock
def get_lock(self, redis, *args, **kwargs):
kwargs['lock_class'] = self.lock_class
return redi... | mit | -6,382,778,191,388,930,000 | 31.863095 | 76 | 0.587031 | false | 3.580415 | true | false | false |
apipanda/openssl | app/helpers/marshmallow/convert.py | 1 | 10248 | # -*- coding: utf-8 -*-
import functools
import inspect
import uuid
import marshmallow as ma
import sqlalchemy as sa
from marshmallow import fields, validate
from sqlalchemy.dialects import mssql, mysql, postgresql
from .exceptions import ModelConversionError
from .fields import Related
def _is_field(value):
re... | mit | -2,935,554,774,744,383,000 | 33.857143 | 100 | 0.613388 | false | 4.104125 | false | false | false |
kkanellis/uthportal-server | uthportal/tasks/base.py | 1 | 11926 |
import sys
from abc import ABCMeta, abstractmethod
from datetime import datetime
import feedparser
import requests
from requests.exceptions import ConnectionError, Timeout
from uthportal.database.mongo import MongoDatabaseManager
from uthportal.logger import get_logger
from uthportal.util import truncate_str
class ... | gpl-3.0 | -1,328,568,271,007,929,600 | 35.470948 | 107 | 0.536643 | false | 4.686051 | false | false | false |
crccheck/project_runpy | project_runpy/heidi.py | 1 | 4119 | """
Heidi: Helpers related to visuals.
"""
import logging
__all__ = ['ColorizingStreamHandler', 'ReadableSqlFilter']
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license.
# https://gist.github.com/758430
class ColorizingStreamHandler(logging.StreamHandler):
# color names... | apache-2.0 | -28,892,168,273,902,668 | 30.442748 | 126 | 0.531925 | false | 3.975869 | false | false | false |
kimlaborg/NGSKit | ngskit/utils/__pycache__/fasta_tools.py | 1 | 2263 | """Fasta Tools
"""
def write_fasta_sequence(sequence_data, file_output, write_mode='a'):
"""Add sequences to a file, in Fasta Format.
Parameters
----------
sequence_data : str
Sequence to add to the fasta file. if only the sequence is provided,
assume the header is not relevant and a rando... | mit | 7,169,794,591,417,631,000 | 26.26506 | 83 | 0.613787 | false | 4.055556 | false | false | false |
Shpilevskiy/mobile_family_budget | backend/django_service/mobile_family_budget/purchaseManager/migrations/0001_initial.py | 1 | 1567 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-01-21 21:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('account', '0001_initial'),
]
o... | gpl-3.0 | 7,832,930,612,681,314,000 | 35.928571 | 123 | 0.583495 | false | 4.237705 | false | false | false |
intelaligent/tctb | tctb/classes/agent.py | 1 | 4353 | #!/usr/bin/env python2
"""
@file connection.py
@author Bo Gao
@date 2017-07-25
@version alpha
Intersection control agent
Copyright (C) 2017 Transport Research Group, University of Southampton
Intersection Control Test Bed
"""
# if "SUMO_HOME" in os.environ:
# tools = os.path.join(os.environ["SUMO_HOME"], ... | gpl-3.0 | -1,551,814,368,528,722,000 | 28.02 | 100 | 0.612221 | false | 3.305239 | false | false | false |
grnet/synnefo | docs/conf.py | 1 | 1973 | import sys, os
sys.path.insert(0, os.path.abspath('../snf-cyclades-app'))
import synnefo
reload(synnefo)
import synnefo.versions
reload(synnefo.versions)
from synnefo.versions.app import __version__
project = u'synnefo'
copyright = u'2010-2017, GRNET S.A.'
version = __version__
release = __version__
html_title = 'syn... | gpl-3.0 | -5,990,170,465,250,381,000 | 28.893939 | 95 | 0.631019 | false | 2.9273 | false | false | false |
FogCreek/solari-board | example_realtime/liveFogbugz.py | 1 | 1937 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import print_function
import sys, os
import cgi
import time
def cgi_callback():
params = cgi.parse_qs(os.environ['QUERY_STRING'])
# lastts is the last modified date that this browser has already loaded, 0 means this is an initial request
last... | mit | -8,826,270,226,747,974,000 | 29.746032 | 111 | 0.579763 | false | 3.874 | false | false | false |
ucloud/uai-sdk | examples/tensorflow-2.0/imagenet/train/code/imagenet.py | 1 | 3432 | import os
import vgg_preprocessing
import tensorflow as tf
_DEFAULT_IMAGE_SIZE = 224
_NUM_CHANNELS = 3
_LABEL_CLASSES = 1001
_FILE_SHUFFLE_BUFFER = 1024
_SHUFFLE_BUFFER = 1500
class ImagenetDataSet(object):
"""Imagenet data set
"""
def __init__(self, data_dir, subset='train', use_distortion=True):
self.d... | apache-2.0 | -8,043,587,197,140,686,000 | 33.676768 | 87 | 0.644814 | false | 3.498471 | false | false | false |
OpenTwinCities/site_bot | app/Meetup/RSS.py | 1 | 1767 | # -*- coding: utf8 -*-
import feedparser
from bs4 import BeautifulSoup
from datetime import datetime
from time import mktime
class MeetupRSS:
MEETUP_DOMAIN = 'www.meetup.com'
def __init__(self, group_id):
self.group_id = group_id
self.__rss__ = None
self.__events__ = None
@proper... | mit | -47,412,677,332,010,296 | 28.949153 | 99 | 0.578947 | false | 3.91796 | false | false | false |
cernbox/smashbox | lib/test_slowwrite.py | 1 | 2941 | import os
import time
import tempfile
__doc__ = """
Synchronize local folder while writing into the file.
This is a testcase for:
https://github.com/owncloud/mirall/issues/2210 (corrupted file upload if file modified during transfer)
owncloudcmd will delay syncing of the file if the file is modified every 2 seco... | agpl-3.0 | -6,707,239,179,517,909,000 | 24.353448 | 137 | 0.658279 | false | 3.407879 | false | false | false |
MIT-LCP/false-alarm-reduction | pyfar/utils.py | 1 | 5165 | from __future__ import print_function
import wfdb
import json
def abs_value(x, y):
return abs(x-y)
def is_true_alarm_fields(fields):
return fields['comments'][1] == 'True alarm'
def is_true_alarm(data_path, sample_name):
sig, fields = wfdb.srdsamp(data_path + sample_name)
return is_true_alarm_field... | mit | -8,308,017,992,821,407,000 | 23.712919 | 117 | 0.619942 | false | 3.298212 | false | false | false |
max4260/HydroP | python/script.py | 1 | 1197 | import webiopi
import datetime
import sqlite3
import subprocess
import sys
GPIO = webiopi.GPIO
AUTO = 1
SCRIPT_PATH = "/home/pi/HydroP/python/"
LIGHT1 = 17 # GPIO pin using BCM numbering
dbconn = sqlite3.connect(SCRIPT_PATH + "hydro.db")
dbconn.row_factory = sqlite3.Row
dbcursor = dbconn.cursor()
# setup function i... | gpl-2.0 | 1,823,126,588,863,554,300 | 25.622222 | 84 | 0.721805 | false | 3.530973 | false | false | false |
zhenjiawang157/BART_Py2 | BART/AUCcalc.py | 1 | 6820 | # Time-stamp: <2017-08-10>
'''Module for calculating ROC-AUC values for all TF datasets
Copyright (c) 2017, 2018 Chongzhi Zang, Zhenjia Wang <zhenjia@virginia.edu>
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License.
@status: release candidate
@version: $Id$
@auth... | bsd-2-clause | -6,984,467,226,184,872,000 | 29.58296 | 109 | 0.57478 | false | 3.12844 | false | false | false |
timbooo/traktforalfred | trakt/mapper/summary.py | 1 | 3161 | from trakt.mapper.core.base import Mapper
class SummaryMapper(Mapper):
@classmethod
def movies(cls, client, items, **kwargs):
if not items:
return None
return [cls.movie(client, item, **kwargs) for item in items]
@classmethod
def movie(cls, client, item, **kwa... | mit | 3,495,584,519,128,426,500 | 22.129771 | 77 | 0.506485 | false | 4.427171 | false | false | false |
mmetince/akgulyzer | akgulyzer.py | 1 | 3279 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Mehmet Dursun Ince
from argparse import ArgumentParser
from random import choice, randint
import locale
locale.setlocale(locale.LC_ALL, "tr_TR")
class Akgulyzer(object):
def __init__(self, args):
"""
Kurucu Akgulyzer
:param args:
:re... | gpl-2.0 | 1,414,536,402,941,925,000 | 38.192771 | 231 | 0.583948 | false | 2.997235 | false | false | false |
janpipek/pyearcal | pyearcal/image_sources.py | 1 | 1485 | import abc
import os
import fnmatch
import random
from typing import Dict
from collections import OrderedDict
class ImageDirectory(abc.ABC):
def __getitem__(self, index: int) -> str:
return self.images[index]
images: Dict[int, str]
def __iter__(self):
# yield from self.images.values()
... | mit | -7,820,184,735,028,925,000 | 28.117647 | 86 | 0.607407 | false | 4.046322 | false | false | false |
wdv4758h/rst2html5slides | test/test_output_dir.py | 1 | 4833 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from io import open
from os import makedirs, urandom
from os.path import join, exists
from shutil import rmtree
from tempfile import mkdtemp
from rst2html5slides import SlideWriter
from docutils.core import publish_file, publish_string
presen... | mit | 6,010,415,876,726,808,000 | 29.974359 | 99 | 0.641349 | false | 3.2 | false | false | false |
RexFuzzle/sfepy | sfepy/discrete/iga/extmods/setup.py | 1 | 1281 | #!/usr/bin/env python
def configuration(parent_package='', top_path=None):
import os.path as op
from numpy.distutils.misc_util import Configuration
from sfepy import Config
site_config = Config()
os_flag = {'posix' : 0, 'windows' : 1}
auto_dir = op.dirname(__file__)
auto_name = op.split(... | bsd-3-clause | 5,189,118,304,611,245,000 | 32.710526 | 72 | 0.568306 | false | 3.490463 | true | false | false |
c0710204/mirrorsBistu | pypi/bandersnatch/lib/python2.7/site-packages/pyrepl/reader.py | 1 | 20539 | # Copyright 2000-2010 Michael Hudson-Doyle <micahel@gmail.com>
# Antonio Cuni
# Armin Rigo
#
# All Rights Reserved
#
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose is hereby granted without fe... | mit | 4,925,212,020,770,701,000 | 31.19279 | 78 | 0.528263 | false | 3.775551 | false | false | false |
mmisiewicz/slask | limbo/plugins/pager.py | 1 | 3469 | import re
import urllib2
import json
def pager_response(text):
"""!oncall|!pager (add "link" for url to pager rotation page)"""
match = re.match('!oncall|!pager', text, re.IGNORECASE)
if not match:
return False
if "link" in match.string:
return "https://corpwiki.appnexus.com/x/xxsaAQ"
... | mit | -5,478,028,948,386,106,000 | 42.911392 | 137 | 0.62237 | false | 3.153636 | false | false | false |
mathiasertl/django-xmpp-server-list | xmpplist/settings.py | 1 | 8688 | # This file is part of django-xmpp-server-list
# (https://github.com/mathiasertl/django-xmpp-server-list).
#
# django-xmpp-server-list 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 Li... | gpl-3.0 | 222,943,038,920,344,300 | 30.478261 | 108 | 0.637776 | false | 3.735168 | false | false | false |
muharif/vpp | vpp-api/java/jvpp/gen/jvpp_gen.py | 1 | 5128 | #!/usr/bin/env python
#
# Copyright (c) 2016 Cisco and/or its affiliates.
# 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
# l
# Unless requir... | apache-2.0 | 5,746,196,769,455,145,000 | 35.368794 | 157 | 0.656786 | false | 3.165432 | false | false | false |
ferdyrod/basic-ecommerce | ecommerce/settings/local.py | 1 | 2918 | # Django settings for ecommerce project.
from os.path import dirname, abspath, join
PROJECT_ROOT = dirname(dirname(dirname(abspath(__file__))))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.... | apache-2.0 | 275,103,391,602,662,940 | 31.422222 | 127 | 0.665182 | false | 3.602469 | false | false | false |
google/iree-llvm-sandbox | runners/test/python/experts.py | 1 | 3643 | #
# import time
from typing import List
from search import *
from transforms import *
class Assignments:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
class Expert:
def __init__(self, **asignments):
self.assignments = Assignments(**asignments)
def _pre_transform(self, module, boilerpl... | apache-2.0 | 5,863,396,034,825,331,000 | 25.208633 | 76 | 0.622289 | false | 3.513018 | false | false | false |
ubvu/orcid-monitor | orcid-usage/analyze.py | 1 | 6196 | import codecs
import os
import sys
from multiprocessing import Process, Queue
from lxml import etree
import tablib
COLNAME_MODIFIED_DATE = 'last modified date'
COLNAME_CREATION_DATE = 'creation date'
COLNAME_KEYWORDS = 'keywords'
COLNAME_EMAIL = 'email'
COLNAME_WORKS = 'works'
COLNAME_FUNDING = 'funding'
COLNAME_AFFIL... | mit | 147,770,138,063,816,770 | 40.583893 | 212 | 0.643157 | false | 3.187243 | false | false | false |
szendrei/django-unleashed | codesnippets/snippets/models.py | 1 | 1482 | from django.db import models
from pygments.lexers import get_all_lexers
from django.core.urlresolvers import reverse
LEXERS = [item for item in get_all_lexers() if item[1]]
LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS])
class Snippet(models.Model):
create_date = models.DateTimeField('creat... | gpl-3.0 | -2,873,390,856,656,632,000 | 37 | 79 | 0.62888 | false | 4.005405 | false | false | false |
enen92/script.sportscenter | resources/lib/calendar.py | 1 | 14046 | import xbmc,xbmcgui,xbmcaddon,xbmcplugin
import urllib
import thesportsdb
import datetime
import os
import re
import threading
from random import randint
from centerutils.common_variables import *
from centerutils.datemanipulation import *
import competlist as competlist
import teamview as teamview
import contextmenubu... | gpl-2.0 | -670,272,421,011,220,700 | 45.664452 | 174 | 0.698206 | false | 3.177828 | false | false | false |
ramineni/my_congress | congress/tests/datasources/fakes.py | 1 | 6195 | # Copyright (c) 2014 VMware, 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 b... | apache-2.0 | 7,589,944,185,511,851,000 | 37.962264 | 78 | 0.54318 | false | 3.722957 | false | false | false |
caperren/Archives | OSU Robotics Club/Mars Rover 2016-2017/common/soil-sensor-test.py | 1 | 2721 | #!/usr/bin/env python
import sys
import math
import struct
import serial
import signal
import os
import time
import struct
SerialPath="/dev/ttyUSB0"
class SoilSensor():
def __init__(self, path):
self.path = path
self.__tty = serial.Serial(port=self.path,
baudrate=960... | gpl-3.0 | 7,409,158,072,236,962,000 | 25.23 | 68 | 0.586182 | false | 2.907051 | false | false | false |
YzPaul3/h2o-3 | h2o-py/h2o/connection.py | 1 | 29700 | """
An H2OConnection represents the latest active handle to a cloud. No more than a single
H2OConnection object will be active at any one time.
"""
from __future__ import print_function
from __future__ import absolute_import
import requests
import math
import tempfile
import os
import re
import sys
import time
import s... | apache-2.0 | -7,047,899,726,068,955,000 | 39.189445 | 151 | 0.615623 | false | 3.491243 | false | false | false |
ebigelow/LOTlib | LOTlib/Inference/Samplers/AdaptiveParallelTempering.py | 1 | 3107 | from scipy import interpolate
from ParallelTempering import ParallelTemperingSampler
class AdaptiveParallelTemperingSampler(ParallelTemperingSampler):
"""
Adaptive setting of the temperatures via
Katzgraber, H. G., Trebst, S., Huse, D. A., & Troyer, M. (2006). Feedback-optimized parallel tempering monte... | gpl-3.0 | 4,413,269,540,533,469,700 | 32.419355 | 189 | 0.632121 | false | 3.498874 | false | false | false |
dnsbob/pynet_testz | test_telnet.py | 1 | 1310 | #!/usr/bin/env python
# test_telnet.py
import telnetlib
import time
import socket
import sys
TELNET_PORT=23
TELNET_TIMEOUT=6
def telnet_connect(ip_addr, TELNET_PORT, TELNET_TIMEOUT):
try:
return telnetlib.Telnet(ip_addr, TELNET_PORT, TELNET_TIMEOUT)
except socket.timeout:
sys.exit("Connection... | apache-2.0 | 3,303,492,153,968,261,600 | 22.818182 | 69 | 0.676336 | false | 3.25062 | false | false | false |
saullocastro/pyNastran | pyNastran/bdf/bdf_interface/write_mesh.py | 1 | 45439 | # coding: utf-8
"""
This file defines:
- WriteMesh
"""
from __future__ import (nested_scopes, generators, division, absolute_import,
print_function, unicode_literals)
import sys
import io
from codecs import open
from six import string_types, iteritems, itervalues, PY2, StringIO
#from pyNastra... | lgpl-3.0 | 4,066,461,600,381,241,000 | 43.201362 | 98 | 0.54286 | false | 3.635411 | false | false | false |
SUSE/kiwi | test/unit/xml_state_test.py | 1 | 39351 | import logging
from collections import namedtuple
from mock import (
patch, Mock
)
from pytest import (
raises, fixture
)
from kiwi.xml_state import XMLState
from kiwi.xml_description import XMLDescription
from kiwi.exceptions import (
KiwiTypeNotFound,
KiwiDistributionNameError,
KiwiProfileNotFou... | gpl-3.0 | -1,623,195,503,704,412,200 | 38.628399 | 80 | 0.597139 | false | 3.673201 | true | false | false |
ironsmile/tank4eta | pathfinding/core/node.py | 1 | 1197 | # -*- coding: utf-8 -*-
class Node(object):
"""
basic node, saves X and Y coordinates on some grid and determine if
it is walkable.
"""
def __init__(self, x=0, y=0, walkable=True, see_through=True):
# Coordinates
self.x = x
self.y = y
# Whether this node can be walke... | mit | -6,834,358,347,663,112,000 | 24.468085 | 71 | 0.552214 | false | 3.92459 | false | false | false |
speric/simplehttp | pysimplehttp/src/file_to_simplequeue.py | 1 | 6682 | import tornado.ioloop
import tornado.httpclient
import os
import functools
import gzip
import logging
import urllib
try:
import ujson as json
except ImportError:
import json
class FileToSimplequeue(object):
http = tornado.httpclient.AsyncHTTPClient(max_simultaneous_connections=50, max_clients=50)
def _... | mit | 1,708,702,651,177,100,500 | 39.993865 | 143 | 0.601766 | false | 4.173641 | false | false | false |
bitcraft/pyglet | pyglet/media/avbin.py | 1 | 20165 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | bsd-3-clause | -6,378,432,242,768,156,000 | 33.235993 | 83 | 0.583635 | false | 3.923152 | false | false | false |
anetasie/sherpa | sherpa/astro/xspec/utils.py | 3 | 5433 | #
# Copyright (C) 2017, 2018, 2019 Smithsonian Astrophysical Observatory
#
#
# 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 late... | gpl-3.0 | 8,876,311,769,032,798,000 | 42.814516 | 108 | 0.692987 | false | 4.271226 | false | false | false |
KorolevskyMax/TestFrameworkTemplate | pages/base_page.py | 1 | 1954 | from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.common.exceptions import NoSuchElementException
from webium import BasePage as WebiumBasePage, Find
class BasePage(WebiumBasePage):
url_path = None
a... | mit | 8,327,454,099,560,124,000 | 38.877551 | 126 | 0.669396 | false | 3.618519 | false | false | false |
eltoncarr/tubular | tubular/scripts/retrieve_base_ami.py | 1 | 2964 | #! /usr/bin/env python3
"""
Command-line script used to retrieve the last base AMI ID used for an environment/deployment/play.
"""
# pylint: disable=invalid-name
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from os import path
import io
import sy... | agpl-3.0 | 7,992,221,647,808,419,000 | 30.2 | 103 | 0.643387 | false | 3.654747 | false | false | false |
tim-janik/tobin | LogParser.py | 1 | 3770 | # Licensed GNU Affero GPL v3 or later: http://www.gnu.org/licenses/agpl.html
import sys, calendar, re, heapq, tempfile
_month_dict = { 'Jan' : 1, 'Feb' : 2, 'Mar' : 3, 'Apr' : 4, 'May' : 5, 'Jun' : 6,
'Jul' : 7, 'Aug' : 8, 'Sep' : 9, 'Oct' : 10, 'Nov' : 11, 'Dec' : 12 }
def _parse_logtime (string):
... | agpl-3.0 | 5,767,667,281,494,441,000 | 44.421687 | 128 | 0.513793 | false | 3.097781 | false | false | false |
InUrSys/PescArt2.0 | src/Reports/Relatorio_SaidasPorProvinica.py | 1 | 1633 | '''
Created on 01/02/2018
@author: chernomirdinmacuvele
'''
import ReportAPI
from ui_Relatorio_SaidasPorProvincia import Ui_Form
import FuncSQL
from PyQt5.Qt import QPlainTextEdit, QComboBox
class Relatorio_SaidasPorProvincia(ReportAPI.JasperReports, Ui_Form):
def __init__(self, parent=None, dbcon=None):
... | gpl-3.0 | 6,905,557,344,856,947,000 | 31.68 | 118 | 0.63319 | false | 3.312373 | false | false | false |
voanna/Deep-Features-or-Not | src/extract_features_no_finetune_temperature.py | 1 | 1123 | #!/usr/bin/env python
from __future__ import print_function
from extractCaffeActivations import features
import argparse
import HONHelpers as hon
import itertools
import os
import glob
layers = [
'pool1',
'pool2',
'pool3',
'pool4',
'pool5',
'fc6',
'fc7',
]
parser = argparse.Argu... | mit | -2,117,628,950,225,300,000 | 23.413043 | 108 | 0.693678 | false | 2.955263 | false | false | false |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/motifs/meme.py | 1 | 11510 | # Copyright 2008 by Bartek Wilczynski
# Adapted from Bio.MEME.Parser by Jason A. Hackney. 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.
from __future__ import print_function
... | apache-2.0 | 5,834,909,790,318,722,000 | 32.753666 | 117 | 0.611295 | false | 3.960771 | false | false | false |
CaliOpen/CaliOpen | src/backend/components/py.pi/caliopen_pi/tests/test_spam.py | 1 | 1631 | """Test spam privacy feature extraction."""
import unittest
import os
from caliopen_storage.config import Configuration
if 'CALIOPEN_BASEDIR' in os.environ:
conf_file = '{}/src/backend/configs/caliopen.yaml.template'. \
format(os.environ['CALIOPEN_BASEDIR'])
else:
conf_file = '../../../../../... | gpl-3.0 | -8,242,803,574,089,239,000 | 29.773585 | 66 | 0.652361 | false | 3.522678 | true | false | false |
cmancone/mygrations | mygrations/formats/mysql/file_reader/database.py | 1 | 3315 | import os
import glob
from .reader import reader as sql_reader
from mygrations.formats.mysql.definitions.database import database as database_definition
class database(database_definition):
def __init__(self, strings):
""" Constructor. Accepts a string or list of strings with different possible contents
... | mit | -7,812,337,197,021,024,000 | 32.15 | 108 | 0.569231 | false | 4.742489 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-dns/azure/mgmt/dns/models/srv_record.py | 1 | 1365 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 6,262,782,456,267,802,000 | 33.125 | 76 | 0.562637 | false | 4.23913 | false | false | false |
dodobas/osm-export-tool2 | jobs/presets.py | 1 | 11550 | # -*- coding: utf-8 -*-
import logging
import pdb
from collections import OrderedDict
from StringIO import StringIO
from lxml import etree
logger = logging.getLogger(__name__)
class PresetParser():
types = {
'node': 'point',
'way': 'line',
'area': 'polygon',
'closedway': 'polygo... | bsd-3-clause | 1,925,800,538,163,020,300 | 36.5 | 102 | 0.524848 | false | 3.962264 | false | false | false |
lukasjuhrich/sipa | sipa/blueprints/generic.py | 1 | 10785 | # -*- coding: utf-8 -*-
import logging
import os
from flask import render_template, request, redirect, \
url_for, flash, session, abort, current_app, jsonify
from flask.blueprints import Blueprint
from flask_babel import gettext, format_date
from flask_login import current_user, login_user, logout_user, \
logi... | mit | 2,989,018,427,990,838,000 | 31.753799 | 80 | 0.627691 | false | 3.740368 | false | false | false |
brunobraga/termsaver | termsaverlib/plugins/exampleplugin/constants.py | 1 | 2886 | ###############################################################################
#
# file: constants.py
#
# Purpose: refer to module documentation for details
#
# Note: This file is part of Termsaver-Example plugin, and should not be
# used or executed separately.
#
###################################... | apache-2.0 | 6,038,243,330,889,457,000 | 28.44898 | 86 | 0.646223 | false | 4.544882 | false | false | false |
bl4ckh0l3z/droidtrail | droidtrail/trails/androguard/arscrestableconfig.py | 1 | 2720 | # This file is part of DroidTrail.
#
# bl4ckh0l3 <bl4ckh0l3z at gmail.com>
#
# DroidTrail 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 of the License, or
# (at your option) any later... | gpl-2.0 | -5,226,607,345,617,743,000 | 38.434783 | 283 | 0.60625 | false | 3.358025 | false | false | false |
reynoldpj/sysadmrepo | mariadb/dump_stat_info.py | 1 | 3676 | #!/usr/bin/python
import MySQLdb
import json
from ConfigParser import ConfigParser
LIMIT = 7
user_and_client_stat_columns = ('TOTAL_CONNECTIONS', 'CONCURRENT_CONNECTIONS', 'CONNECTED_TIME', 'BUSY_TIME', 'CPU_TIME', 'BYTES_RECEIVED', 'BYTES_SENT', 'BINLOG_BYTES_WRITTEN', 'ROWS_READ', 'ROWS_SENT', 'ROWS_DELETED', 'ROWS... | gpl-2.0 | 2,162,547,570,938,539,800 | 53.058824 | 432 | 0.701034 | false | 3.190972 | false | false | false |
lmyrefelt/CouchPotatoServer | couchpotato/core/notifications/plex/main.py | 1 | 2834 | from couchpotato.core.event import addEvent
from couchpotato.core.helpers.encoding import tryUrlencode
from couchpotato.core.helpers.variable import cleanHost
from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification
from urllib2 import URLError
from xml.dom import minidom
i... | gpl-3.0 | -4,482,584,000,044,181,500 | 30.488889 | 125 | 0.575865 | false | 4.242515 | true | false | false |
mission-peace/interview | python/dynamic/coin_change_num_ways.py | 1 | 2081 | """
Problem Statement
=================
Given a total and coins of certain denominations find number of ways total can be formed from coins assuming infinity
supply of coins.
Analysis
--------
* Runtime : O(num_of_coins * total)
Video
-----
* https://youtu.be/_fgjrs570YE
Reference
---------
* http://www.geeksforgee... | apache-2.0 | -4,793,228,212,112,853,000 | 26.025974 | 117 | 0.575204 | false | 3.236392 | false | false | false |
JackGavin13/octoprint-test-not-finished | src/octoprint/plugins/pluginmanager/__init__.py | 1 | 39848 | # coding=utf-8
from __future__ import absolute_import, division, print_function
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
fr... | agpl-3.0 | -7,321,240,752,470,460,000 | 38.024486 | 209 | 0.68723 | false | 3.528828 | false | false | false |
opendatakosovo/data-centar | import-budzet.py | 1 | 4132 | import argparse
from importer.rashodi_manager import RashodiDataImporter
from importer.prihodi_manager import PrihodiDataImporter
rashodi_importer = RashodiDataImporter()
prihodi_importer = PrihodiDataImporter()
def main_importer(data, municipalities):
mun_list = municipalities.split(",")
data_source = data.s... | gpl-2.0 | 7,470,330,547,350,416,000 | 42.505263 | 106 | 0.571152 | false | 3.440466 | false | false | false |
IdeaSolutionsOnline/ERP4R | core/objs/linha_entrega.py | 1 | 4855 | # !/usr/bin/env python3
# -*- encoding: utf-8 -*-
"""
ERP+
"""
__author__ = 'António Anacleto'
__credits__ = []
__version__ = "1.0"
__maintainer__ = "António Anacleto"
__status__ = "Development"
__model_name__ = 'linha_entrega.LinhaEntrega'
import auth, base_models
from orm import *
from form import *
try:
from my_... | mit | -3,195,471,058,506,067,000 | 48.510204 | 218 | 0.599959 | false | 3.364771 | false | false | false |
endlessm/chromium-browser | third_party/chromite/utils/attrs_freezer_unittest.py | 1 | 2645 | # -*- coding: utf-8 -*-
# Copyright 2019 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.
"""Test the attrs_freezer module."""
from __future__ import print_function
import six
from chromite.lib import cros_test_lib
fr... | bsd-3-clause | -4,560,031,592,534,890,000 | 30.86747 | 72 | 0.699811 | false | 3.778571 | true | false | false |
ArcherSys/ArcherSys | Lib/lzma.py | 1 | 58253 | <<<<<<< HEAD
<<<<<<< HEAD
"""Interface to the liblzma compression library.
This module provides a class for reading and writing compressed files,
classes for incremental (de)compression, and convenience functions for
one-shot (de)compression.
These classes and functions support both the XZ and legacy LZMA
container f... | mit | -5,395,204,604,067,377,000 | 36.851202 | 84 | 0.584073 | false | 4.235658 | false | false | false |
primoz-k/parilis | config/wsgi.py | 1 | 1723 | """
WSGI config for parilis project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... | bsd-3-clause | -8,953,276,399,421,357,000 | 41.02439 | 79 | 0.785258 | false | 4.243842 | false | false | false |
gloryofrobots/opparse | parsers/ipy/lexicon.py | 1 | 6194 | from opparse.lexicon import Lexicon, token, keyword
class IpyLexicon(Lexicon):
# TOKEN TYPES
TT_INT = "TT_INT"
TT_STR = "TT_STR"
TT_NAME = "TT_NAME"
TT_FUN = "TT_FUN"
TT_FOR = "TT_FOR"
TT_WHILE = "TT_WHILE"
TT_BREAK = "TT_BREAK"
TT_CONTINUE = "TT_CONTINUE"
TT_CLASS = "TT_CLA... | gpl-3.0 | -1,211,293,951,085,114,400 | 24.285714 | 68 | 0.481757 | false | 2.450158 | false | false | false |
mucow24/roboviva | roboviva/latex.py | 1 | 7662 | # Roboviva - Better cue sheets for everyone
# Copyright (C) 2015 Mike Kocurek
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | agpl-3.0 | -8,903,511,516,372,346,000 | 30.792531 | 121 | 0.623466 | false | 3.237009 | false | false | false |
chrinide/PyFV | pyfv/portfolio/mean_variance.py | 1 | 2360 | # -*- coding: utf-8 -*-
'''
@author: Hung-Hsin Chen
@mail: chenhh@par.cse.nsysu.edu.tw
Markowitz mean variance model
'''
from __future__ import division
from coopr.pyomo import *
from time import time
from datetime import date
import numpy as np
import pandas as pd
import os
import time
from coopr.opt import SolverF... | gpl-2.0 | -3,923,712,547,247,650,300 | 26.137931 | 79 | 0.618644 | false | 3.430233 | false | false | false |
pjryan126/solid-start-careers | store/api/zillow/venv/lib/python2.7/site-packages/pandas/sandbox/qtpandas.py | 1 | 4363 | '''
Easy integration of DataFrame into pyqt framework
@author: Jev Kuznetsov
'''
# flake8: noqa
# GH9615
import warnings
warnings.warn("The pandas.sandbox.qtpandas module is deprecated and will be "
"removed in a future version. We refer users to the external package "
"here: https://git... | gpl-2.0 | -1,997,314,913,183,287,800 | 29.089655 | 84 | 0.595691 | false | 4.054833 | false | false | false |
radiasoft/radtrack | radtrack/ui/rbcbt.py | 1 | 5681 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'radtrack/ui/rbcbt.ui'
#
# Created: Thu Jun 16 05:40:41 2016
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
exc... | apache-2.0 | -5,649,579,195,361,632,000 | 48.833333 | 127 | 0.71924 | false | 3.867257 | false | false | false |
gplib/gplib | gplib/apps/extauth/ldapauth.py | 1 | 16002 | # -*- coding: utf-8 -*-
# Este archivo es parte de GPLib - http://gplib.org/
#
# GPlib es software libre desarrollado en la Facultad de Filosofía y Letras de
# la Universidad de Buenos Aires y liberado bajo los términos de la licencia
# GPLIB FILO www.gplib.org/licencia bajo los términos de GPL de GNU. Usted
# puede ... | gpl-3.0 | 2,061,814,885,940,155,600 | 42.407609 | 127 | 0.605922 | false | 3.890404 | false | false | false |
DimaWittmann/Regenschirm | regenschirm/settings.py | 1 | 2379 | """
Django settings for regenschirm project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... | gpl-2.0 | -3,644,200,480,265,471,000 | 24.042105 | 71 | 0.711223 | false | 3.263374 | false | false | false |
nguyenkims/projecteuler-python | src/p85.py | 1 | 1049 |
def f(m,n):
'''return the number of rectangles that a m x n contains'''
s=0
for a in range(1,m+1):
for b in range(1,n+1):
s+= (m-a+1)*(n-b+1)
return s
print f(1,1),f(2,4), f(3,3)
def g(m,n):
''' the same as f(m,n) except g(m,n) is calculated recursively'''
if m==0:
return 0
elif m == 1 :
return n * ... | mit | -4,020,211,150,527,830,000 | 20.428571 | 68 | 0.481411 | false | 1.924771 | false | false | false |
mindbody/API-Examples | SDKs/Python/swagger_client/models/add_client_response.py | 1 | 3305 | # coding: utf-8
"""
MINDBODY Public API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
impor... | bsd-2-clause | 4,975,355,453,291,282,000 | 26.773109 | 119 | 0.554614 | false | 4.270026 | false | false | false |
jabelone/Unearthed2017 | tensorflowshit/helloworld.py | 1 | 3595 | '''
HelloWorld example using TensorFlow library.
Author: Aymeric Damien
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''
from __future__ import print_function
import tensorflow as tf
import csv
import time
def getNetGraph(X, h1size):
with tf.name_scope('hidden'):
weights = tf.Variab... | gpl-3.0 | 6,357,136,693,624,156,000 | 32.598131 | 99 | 0.625035 | false | 3.562934 | true | false | false |
smattis/BET-1 | examples/FEniCS/BET_multiple_serial_models_script.py | 1 | 5328 | #! /usr/bin/env python
# Copyright (C) 2014-2019 The BET Development Team
r"""
This example requires the following external packages not shipped
with BET:
(1) An installation of FEniCS that can be run using the same
python as used for installing BET. See http://fenicsproject.org/
for more information.
(2) ... | gpl-3.0 | 435,122,958,647,670,100 | 34.052632 | 81 | 0.70458 | false | 3.480078 | false | false | false |
fengbeihong/tempest_automate_ironic | tempest/services/baremetal/v1/json/baremetal_client.py | 1 | 15425 | # 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
# d... | apache-2.0 | -6,374,396,648,853,870,000 | 31.610994 | 84 | 0.580097 | false | 4.338959 | true | false | false |
anchore/anchore-engine | tests/unit/anchore_engine/apis/test_oauth.py | 1 | 6264 | import pytest
import time
from anchore_engine.apis.oauth import merge_client_metadata
from anchore_engine.apis.oauth import (
setup_oauth_client,
OAuth2Client,
CLIENT_GRANT_KEY,
ANONYMOUS_CLIENT_ID,
)
@pytest.mark.parametrize(
"existing_metadata, meta_to_add, expected_output",
[
(
... | apache-2.0 | -2,403,788,572,274,175,000 | 27.472727 | 142 | 0.554598 | false | 3.812538 | true | false | false |
Sriee/epi | data_structures/backtracking/combination_sums.py | 1 | 5229 | def combination_sum(candidates, target):
"""
Leet code. Solution -> Accepted
Run Time: 100 ms. Not optimal but this gives a template for writing backtracking
problems
Given an array without duplicates. Find the list of candidates which are equal to
the target sum. Each element can be repeated ... | gpl-3.0 | 4,889,357,968,295,173,000 | 23.665094 | 96 | 0.544081 | false | 4.081967 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.