repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ap--/python-oceanoptics | oceanoptics/spectrometers/XXX2000.py | 1 | 6349 | # XXX: USB2000 tested, HR2000 untested
#----------------------------------------------------------
from oceanoptics.base import OceanOpticsBase as _OOBase
from oceanoptics.defines import OceanOpticsError as _OOError
import time
import struct
#----------------------------------------------------------
class _XXX2000(_... | mit | -8,373,773,717,375,064,000 | 39.698718 | 76 | 0.526855 | false | 3.94103 | false | false | false |
dermoth/gramps | gramps/gui/configure.py | 1 | 71428 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Raphael Ackermann
# Copyright (C) 2010 Benny Malengier
# Copyright (C) 2010 Nick Hall
# Copyright (C) 2012 Doug Blank <doug.blank@gmail.com>
#
# This program is free software; ... | gpl-2.0 | -260,752,478,197,228,930 | 40.431555 | 141 | 0.541958 | false | 3.963818 | true | false | false |
ElofssonLab/TOPCONS2 | topcons2_webserver/workflow/mydb_common.py | 1 | 9693 | #!/usr/bin/env python
# Description:
# A collection of classes and functions used by the class MyDB
#
# Author: Nanjiang Shu (nanjiang.shu@scilifelab.se)
#
# Address: Science for Life Laboratory Stockholm, Box 1031, 17121 Solna, Sweden
import sys
import os
from array import array
import mybase
FORMAT_BINARY = 0
FO... | gpl-2.0 | -8,450,380,070,537,769,000 | 32.773519 | 87 | 0.537501 | false | 3.688356 | false | false | false |
deepmind/dm_control | dm_control/utils/transformations.py | 1 | 17790 | # Copyright 2020 The dm_control Authors.
#
# 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 i... | apache-2.0 | 8,169,289,240,770,107,000 | 27.373206 | 79 | 0.604947 | false | 2.754296 | false | false | false |
dholm/voidwalker | voidwalker/backends/gdb/parameter.py | 1 | 4546 | # (void)walker GDB backend
# Copyright (C) 2012-2013 David Holm <dholmster@gmail.com>
# 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 ... | gpl-3.0 | -6,632,740,729,766,815,000 | 38.877193 | 77 | 0.58161 | false | 4.578046 | false | false | false |
Fillll/telegraph_digest | telegraph_digest/utils.py | 1 | 3781 | # encoding:utf-8
from urllib.parse import urlparse
import requests
import os
import imghdr
from imgurpython import ImgurClient
import yaml
TYPE_IMG = 'img'
CONTENT_JPEG = 'image/jpeg'
CONTENT_PNG = 'image/png'
TYPE_GIF = 'gif'
CONTENT_GIF = 'image/gif'
CONTENT_MP4 = 'video/mp4'
TYPE_TEXT = 'text'
... | mit | -6,864,975,083,804,446,000 | 30.042373 | 110 | 0.496165 | false | 3.600952 | false | false | false |
jakesyl/BitTornado | BitTornado/Network/Encrypter.py | 1 | 21788 | import socket
import urllib
from binascii import hexlify
from .BTcrypto import Crypto, padding
DEBUG = False
MAX_INCOMPLETE = 8
protocol_name = b'\x13BitTorrent protocol'
option_pattern = bytes(8)
def make_readable(s):
if not s:
return ''
if urllib.parse.quote(s).find('%') >= 0:
return hexl... | mit | -6,626,172,757,637,322,000 | 33.529319 | 78 | 0.530384 | false | 3.967225 | true | false | false |
tobes/py3status | tests/test_composite.py | 5 | 2079 | from py3status.composite import Composite
# Composite initialize
def test_Composite_init_1():
result = Composite('moo').get_content()
assert result == [{'full_text': 'moo'}]
def test_Composite_init_2():
result = Composite({'full_text': 'moo'}).get_content()
assert result == [{'full_text': 'moo'}]
... | bsd-3-clause | 3,203,980,493,031,513,000 | 23.458824 | 65 | 0.572872 | false | 3.20339 | true | false | false |
simpeg/simpeg | SimPEG/EM/NSEM/Utils/dataUtils.py | 1 | 16498 | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import matplotlib.pyplot as plt
import numpy as np
import numpy.lib.recfunctions as recFunc
from scipy.constants import mu_0
from scipy import interpolate as sciint
import SimPEG as simpeg
from SimPEG.EM.NSEM.... | mit | -5,120,500,669,842,626,000 | 35.259341 | 115 | 0.565584 | false | 3.16296 | false | false | false |
mittya/duoclub | duoclub/jobs/migrations/0001_initial.py | 1 | 2927 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-01-24 09:02
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):
initial = True
dependencies = [
migratio... | mit | -6,148,018,615,404,412,000 | 44.918033 | 166 | 0.554088 | false | 3.623545 | false | false | false |
trangel/OPTpy | setup.py | 1 | 1900 | from __future__ import print_function
import sys
import os
import shutil
if sys.version[0:3] < '2.7':
sys.stderr.write("Python version 2.7 or above is required. Exiting.")
sys.exit(1)
try:
import setuptools
except ImportError:
sys.stderr.write(
"Please install setuptools before running this script... | gpl-3.0 | -707,537,089,402,458,400 | 26.536232 | 79 | 0.468421 | false | 4.428904 | true | false | false |
karaoulanis/nemesis | setup.py | 1 | 5800 | #!/usr/bin/env python2.7
from __future__ import print_function
import subprocess as sp
import os
import re
import argparse
makefile_def_default ="""
CXX = g++
CXXFLAGS = -g -O2 -Wno-deprecated -Wall -Wextra \\
-Wc++0x-compat -pedantic -ansi -Weffc++
CPPFLAGS = -Isrc -I/u... | gpl-3.0 | -4,238,458,737,355,697,700 | 36.908497 | 79 | 0.502586 | false | 3.446227 | true | false | false |
liosha2007/temporary-groupdocs-python3-sdk | groupdocs/SignatureApi.py | 1 | 208226 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law ... | apache-2.0 | -532,825,439,338,106,800 | 42.717405 | 219 | 0.563969 | false | 4.888164 | false | false | false |
dhp-denero/LibrERP | hr_document/report/hr_document_expiry_report.py | 2 | 2827 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Dhaval Patel (dhpatel82 at gmail.com)
# All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole ... | agpl-3.0 | -8,025,836,477,145,870,000 | 42.492308 | 177 | 0.639901 | false | 3.877915 | false | false | false |
caktus/rapidsms | rapidsms/router/db/router.py | 1 | 5160 | from django.conf import settings
from django.db import transaction
from django.db.models import Q
from rapidsms.router.blocking import BlockingRouter
from rapidsms.router.db.tasks import receive_async, send_transmissions
from rapidsms.messages.incoming import IncomingMessage
from rapidsms.messages.outgoing import Outg... | bsd-3-clause | 3,069,981,644,754,027,000 | 44.263158 | 78 | 0.597674 | false | 4.550265 | false | false | false |
ikn/farragone | farragone/core/warnings.py | 1 | 7185 | """Farragone problem checking and warning generation.
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."""
import itertools
impo... | gpl-3.0 | -427,179,610,093,958,850 | 29.189076 | 80 | 0.614614 | false | 3.939145 | false | false | false |
espenhgn/nest-simulator | pynest/nest/import_libs.py | 21 | 2753 | # -*- coding: utf-8 -*-
#
# import_libs.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or... | gpl-2.0 | 3,792,284,845,289,591,000 | 32.987654 | 86 | 0.652016 | false | 3.882934 | false | false | false |
Aravinthu/odoo | addons/mail/models/mail_notification.py | 36 | 1319 | # -*- coding: utf-8 -*-
from odoo import api, fields, models
class Notification(models.Model):
_name = 'mail.notification'
_table = 'mail_message_res_partner_needaction_rel'
_rec_name = 'res_partner_id'
_log_access = False
_description = 'Message Notifications'
mail_message_id = fields.Many2... | agpl-3.0 | -8,976,240,935,006,511,000 | 42.966667 | 214 | 0.654284 | false | 3.507979 | false | false | false |
bobbycyiii/carrot | mom.py | 1 | 5562 | import regina
import fault
def isCommonAxisCommutator(expr):
l = expr.terms()
if len(l) != 4 or \
l[0] != l[2].inverse() or \
l[1] != l[3].inverse():
return False
else:
return True
def isCommonAxisEquation(expr):
l = expr.terms()
return len(l) == 2
def isCommonAxisPr... | gpl-3.0 | 5,042,174,260,876,632,000 | 30.072626 | 115 | 0.547465 | false | 3.332534 | false | false | false |
observerss/yamo | yamo/cache.py | 1 | 2081 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import types
import pickle
import functools
from pymongo.cursor import Cursor
class CachedModel(object):
""" Used in Model.cached
:param timeout: timeout in seconds
:param cache_none: whether to cache None results
"""
# cls -> (cache_ti... | mit | 4,761,201,103,095,766,000 | 28.728571 | 74 | 0.501682 | false | 4.371849 | false | false | false |
rlworkgroup/metaworld | metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_open_v2.py | 1 | 4112 | import numpy as np
from gym.spaces import Box
from metaworld.envs import reward_utils
from metaworld.envs.asset_path_utils import full_v2_path_for
from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set
class SawyerFaucetOpenEnvV2(SawyerXYZEnv):
def __init__(self):
... | mit | 3,177,973,918,519,678,000 | 30.151515 | 93 | 0.553988 | false | 3.220047 | false | false | false |
reflog/pyterm | pte/commands.py | 1 | 4116 | ### Copyright (C) 2002-2006 Eli Yukelzon <reflog@gmail.com>
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
##... | gpl-2.0 | -5,462,188,245,238,915,000 | 30.181818 | 97 | 0.622206 | false | 3.180835 | false | false | false |
ahmetcemturan/SFACT | skeinforge_application/skeinforge_plugins/craft_plugins/outset.py | 8 | 6581 | """
This page is in the table of contents.
Outset outsets the edges of the slices of a gcode file. The outside edges will be outset by half the edge width, and the inside edges will be inset by half the edge width. Outset is needed for subtractive machining, like cutting or milling.
==Operation==
The default 'Activa... | agpl-3.0 | -6,403,592,667,155,378,000 | 38.172619 | 242 | 0.772831 | false | 3.298747 | false | false | false |
medic15/baremail | src/bare_maildir.py | 1 | 3728 | import logging
import os
import os.path
import tempfile
# create logger
log = logging.getLogger('baremail.maildir')
def _sync_flush(f):
"""Ensure changes to file f are physically on disk."""
f.flush()
if hasattr(os, 'fsync'):
os.fsync(f.fileno())
def _sync_close(f):
"""Close file f, ensuring ... | gpl-3.0 | 8,635,668,941,117,841,000 | 30.59322 | 71 | 0.528165 | false | 4.008602 | false | false | false |
DShaience/zapPrice | LoggerInstancesManager.py | 1 | 2911 | import logging
import sys
class LoggerNames:
'''
LoggerNames class is used to store handler names used by logging.
Problem: Wanting to produce several singleton loggers using logging. Logging module is by default a singleton
by itself, but supports creating separate logging handlers. These handlers c... | gpl-3.0 | 823,860,089,902,628,400 | 33.654762 | 117 | 0.722089 | false | 4.548438 | false | false | false |
KAMI911/loec | examples/Sharpen/binaries-windows-python25/WbmpImagePlugin.py | 3 | 2762 | #
# The Python Imaging Library.
# $Id$
#
# WBMP file handling
#
# This format is used by mobile phones supporting the WAP protocol.
#
__version__ = "0.1"
import Image, ImageFile, ImagePalette
import string
def _tomb(val):
''' Convert val to a multi-byte encoded string. '''
l = [chr(val & 0x7f... | gpl-3.0 | -8,239,326,009,521,385,000 | 24.304762 | 75 | 0.540188 | false | 3.418317 | false | false | false |
inercia/evy | tests/test_pools.py | 1 | 7840 | #
# Evy - a concurrent networking library for Python
#
# Unless otherwise noted, the files in Evy are under the following MIT license:
#
# Copyright (c) 2012, Alvaro Saurin
# Copyright (c) 2008-2010, Eventlet Contributors (see AUTHORS)
# Copyright (c) 2007-2010, Linden Research, Inc.
# Copyright (c) 2005-2006, Bob Ippo... | mit | 524,466,535,811,059,000 | 28.473684 | 86 | 0.59949 | false | 3.88311 | true | false | false |
michael-lazar/rtv | scripts/build_authors.py | 1 | 1388 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Scrape the project contributors list from Github and update AUTHORS.rst
"""
from __future__ import unicode_literals
import os
import time
import logging
import requests
_filepath = os.path.dirname(os.path.relpath(__file__))
FILENAME = os.path.abspath(os.path.join(_... | mit | 7,463,595,096,749,468,000 | 22.525424 | 81 | 0.616715 | false | 3.671958 | false | false | false |
Cynary/tree_of_knowledge | main.py | 2 | 3073 | #!/usr/bin/python
import tornado.ioloop as ioloop
import tornado.web as web
import tornado.websocket as websocket
import threading
import socket
class closedIndicator:
def __init__(self):
self.closed = False
def isClosed(self):
return self.closed
def close(self):
self.closed ... | mit | 5,432,196,273,633,139,000 | 28.266667 | 90 | 0.60755 | false | 4.663126 | false | false | false |
HoverHell/mcomix-0 | mcomix/thumbbar.py | 1 | 12001 | """thumbbar.py - Thumbnail sidebar for main window."""
import urllib
import Queue
import gtk
import gobject
import threading
from mcomix.preferences import prefs
from mcomix import image_tools
from mcomix import tools
from mcomix import constants
from mcomix import callback
from mcomix import thumbnail_view
class T... | gpl-2.0 | 1,807,847,503,824,692,700 | 35.588415 | 98 | 0.617282 | false | 4.097303 | false | false | false |
rosskarchner/wendy_lucy | wendy_lucy/storybits/migrations/0001_initial.py | 1 | 1612 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Choice',
fields=[
('id', models.AutoField(verbo... | gpl-3.0 | 7,849,658,187,033,297,000 | 31.24 | 114 | 0.529156 | false | 4.686047 | false | false | false |
tesseract2048/tju_gpa | src/gpa.py | 1 | 2261 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@author: hty0807@gmail.com
"""
from optparse import OptionParser
from importutils import getstragety
# Parse command line options
parser = OptionParser()
parser.add_option("-s", "--school", action="store",
dest="school",
help="dete... | gpl-2.0 | -7,895,463,670,511,812,000 | 30.84507 | 84 | 0.610349 | false | 3.532813 | false | false | false |
fred-dbg/fred | fred/personality/personalityGdb.py | 1 | 13951 | ###############################################################################
# Copyright (C) 2009, 2010, 2011, 2012 by Kapil Arya, Gene Cooperman, #
# Tyler Denniston, and Ana-Maria Visan #
# {kapil,gene,tyler,amvisan}@ccs.neu.edu #
... | gpl-3.0 | -3,008,966,206,341,187,000 | 45.348837 | 93 | 0.536306 | false | 3.808627 | false | false | false |
AugurProject/augur-core | tests/sandbox.py | 1 | 5393 | from binascii import hexlify
from ethereum import utils as u
from ethereum.abi import ContractTranslator
from ethereum.config import config_metropolis, Env
from ethereum.tools import tester
from ethereum.tools.tester import ABIContract
from json import dumps as json_dumps
from os import remove as os_remove
from solc im... | gpl-3.0 | 2,959,068,075,832,695,000 | 29.128492 | 109 | 0.599666 | false | 3.468167 | false | false | false |
johnygomez/AtariRL | lib/NFQ/NFQ.py | 1 | 5396 | import numpy as np
import os
from keras.callbacks import EarlyStopping
from keras.layers import Input, Dense
from keras.layers.advanced_activations import PReLU
from keras.layers.core import Activation, Dense, Dropout
from keras.layers.normalization import BatchNormalization
from keras.models import model_from_json
fro... | mit | 5,869,440,659,566,445,000 | 34.973333 | 98 | 0.53762 | false | 4.115942 | false | false | false |
IgowWang/ML_python3 | tensorgo/cifar/cifar10_eval.py | 2 | 4592 | # -*- coding: utf-8 -*-
# 模型评价
#
# Author: Igor
from datetime import datetime
import math
import time
import numpy as np
import tensorflow as tf
from tensorgo.cifar import cifar10
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string("eval_dir", 'data/cifar10_eval',
"Directory where to wr... | gpl-3.0 | 3,506,403,537,687,707,000 | 35.380952 | 82 | 0.588133 | false | 3.835983 | false | false | false |
PierreBarre/visualCaptchaBreaker | visual_captcha_breaker.py | 1 | 2170 | from PIL import Image
import requests
from json import loads
from io import BytesIO
class VisualCaptchaBreaker:
def __init__(self):
self.captcha_url = 'http://demo.visualcaptcha.net/'
self.assets_path = './assets/'
self.how_many = 4
self.image_type = '.png'
def image_diff_perc... | mit | 7,765,967,029,921,874,000 | 30 | 92 | 0.5447 | false | 3.773913 | false | false | false |
pyblish/pyblish-win | lib/Python27/Lib/test/test_httplib.py | 6 | 27667 | import httplib
import array
import StringIO
import socket
import errno
import os
import unittest
TestCase = unittest.TestCase
from test import test_support
here = os.path.dirname(__file__)
# Self-signed cert file for 'localhost'
CERT_localhost = os.path.join(here, 'keycert.pem')
# Self-signed cert file for 'fakehost... | lgpl-3.0 | -2,332,433,125,279,747,600 | 37.479833 | 91 | 0.586005 | false | 3.940046 | true | false | false |
hedin/paraboard-back | paraboard/accounts/views.py | 1 | 1328 | import json
import redis
from rest_framework import viewsets, filters
from rest_framework.response import Response
from rest_framework.decorators import detail_route
from rest_framework.permissions import IsAuthenticated
from .serializers import AccountSerializer, CommonAccountSerializer
from .filters import AccountFil... | apache-2.0 | -7,567,935,083,470,154,000 | 33.947368 | 77 | 0.676205 | false | 4.242812 | false | false | false |
ProjectCalla/SomeCrawler | somecrawler/utils/Color.py | 1 | 1122 | __author__ = 'j'
import random
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = "\033[1m"
COLORS = [
"\0330;30m","\033[0;31m","\033[0;32m","\033[0;33m","\033[0;34m","\033[0;35m","\033[0;36m","\033[0;37m","\033[1;30m",
"\033[1;31m","\033... | gpl-3.0 | 3,715,557,393,972,809,700 | 50.045455 | 121 | 0.538324 | false | 1.800963 | false | false | false |
Royalxm/PololuRaspberry | test.py | 1 | 1242 | import pyrebase
import RPi.GPIO as GPIO
from picamera import PiCamera
import time
#Configuration Firebase
config = {
"apiKey": "AIzaSyDVft5fm1neJ27jwQmPDhFiE-ewjKB9DNs",
"authDomain": "robotics-17a2b.firebaseapp.com",
"databaseURL": "https://robotics-17a2b.firebaseio.com",
"storageBucket": "robotics-1... | apache-2.0 | 8,927,490,026,350,605,000 | 24.833333 | 106 | 0.660484 | false | 2.737307 | false | false | false |
ColumbiaDVMM/ColumbiaImageSearch | tests/kinesis/test_boto3_kinesis.py | 1 | 3512 | from __future__ import print_function
# # To avoid warnings when VERIFY_CERTIFICATES is False
# import urllib3
# urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# import requests
# from requests.packages.urllib3.exceptions import InsecureRequestWarning
# requests.packages.urllib3.disable_warnings(... | apache-2.0 | 397,556,842,682,145,150 | 35.968421 | 102 | 0.659453 | false | 3.195632 | false | false | false |
nerdyLawman/mud-board | startup.py | 1 | 2879 | #!/usr/bin/env python
from blessed import Terminal
import time
def main():
screen = ""
line = 0
col = 0
out = ""
term = Terminal()
print(term.clear())
for i in range(50):
out = term.bright_cyan("loop: ") + term.bright_yellow(str(i))
print(term.move(line,col) + screen + ou... | mit | -7,522,909,587,563,344,000 | 28.377551 | 74 | 0.549149 | false | 3.089056 | false | false | false |
ebrelsford/v2v | vacant_to_vibrant/libapps/organize/views.py | 1 | 2009 | """
Generic views for editing participants.
"""
from django.contrib import messages
from django.views.generic.base import ContextMixin
from django.views.generic.edit import DeleteView
from .models import get_organizer_model, get_watcher_model
class EditParticipantMixin(ContextMixin):
def get_context_data(self... | gpl-3.0 | 559,371,169,497,027,400 | 32.483333 | 111 | 0.66003 | false | 3.916179 | false | false | false |
altai/altai-api | altai_api/entry_points.py | 1 | 2843 |
# vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab autoindent
# Altai API Service
# Copyright (C) 2012-2013 Grid Dynamics Consulting Services, Inc
# All Rights Reserved
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License ... | lgpl-2.1 | 4,250,052,335,842,175,000 | 34.5375 | 73 | 0.658459 | false | 3.621656 | false | false | false |
voddan/kotlin-web-site | src/Navigaton.py | 3 | 1610 | import re
from flask import request
class NavItem:
def __init__(self, config):
if 'url' in config:
url = config['url']
if not url.startswith("http") and not url.startswith('/'):
url = '/' + url
self.url = url
else:
self.url = None
... | apache-2.0 | 6,650,601,965,666,718,000 | 26.758621 | 94 | 0.531677 | false | 4.075949 | true | false | false |
apanda/modeling | mcnet/components/security_groups.py | 1 | 1358 | from . import Core
import z3
class SecurityGroups (Core):
def _init (self, name, security_groups, ctx, net):
"""Name is used to name this oracle in z3. Allows multiple mappings """
self.name = name
self.constraints = list ()
self.ctx = ctx
self.net = net
self.ctx.Add... | bsd-3-clause | 3,640,813,255,898,801,000 | 35.702703 | 83 | 0.574374 | false | 3.621333 | false | false | false |
zetaops/ulakbus | ulakbus/views/personel/isten_ayrilma.py | 1 | 11911 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 ZetaOps Inc.
#
# This file is licensed under the GNU General Public License v3
# (GPLv3). See LICENSE.txt for details.
#
"""
İşten ayrılan personelin modelde arsiv alanı True yapılır.
Modeldeki notlar alanı ile de işten ayrılan personel ile ilgili açıklama girme
... | gpl-3.0 | -1,812,451,146,020,579,300 | 40.338028 | 116 | 0.616014 | false | 2.897335 | false | false | false |
OnBeep/pygster | pygster/parsers/Log4jPygster.py | 1 | 3704 | ### Author: Mike Babineau <michael.babineau@gmail.com>, EA2D <http://ea2d.com>
###
### A sample pygster parser file that can be used to count the number
### of events for each log level in a log4j log.
###
### Example (note WARN,ERROR,FATAL is default):
### sudo ./pygster --output=stdout Log4jPygster /var/log/exam... | gpl-3.0 | -5,566,149,636,118,073,000 | 39.26087 | 116 | 0.613661 | false | 4.143177 | false | false | false |
sarvex/tensorflow | tensorflow/python/keras/feature_column/dense_features_v2.py | 8 | 6288 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,478,336,374,430,172,000 | 38.3 | 109 | 0.689408 | false | 4.24578 | false | false | false |
hacklabr/mapaguarani | mapaguarani/core/migrations/0036_auto_20180412_1154.py | 1 | 1612 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-12 11:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('boundaries', '0002_country_iso_code'),
('protected_areas', '0002_auto_20160105_2337'),... | agpl-3.0 | -6,530,832,159,745,499,000 | 25 | 92 | 0.442928 | false | 4.990712 | false | false | false |
mushkevych/scheduler | synergy/system/performance_tracker.py | 1 | 6476 | __author__ = 'Bohdan Mushkevych'
import time
import os
import psutil
from synergy.system.repeat_timer import RepeatTimer
from synergy.conf import settings
class FootprintCalculator(object):
def __init__(self):
self.pid = os.getpid()
@property
def document(self):
ps = psutil.Process(sel... | bsd-3-clause | 529,299,814,489,831,940 | 30.590244 | 120 | 0.604385 | false | 3.492988 | false | false | false |
xyguo/scikit-learn | sklearn/ensemble/bagging.py | 22 | 36582 | """Bagging meta-estimator."""
# Author: Gilles Louppe <g.louppe@gmail.com>
# License: BSD 3 clause
from __future__ import division
import itertools
import numbers
import numpy as np
from warnings import warn
from abc import ABCMeta, abstractmethod
from ..base import ClassifierMixin, RegressorMixin
from ..externals.... | bsd-3-clause | -6,343,218,935,293,088,000 | 37.185804 | 85 | 0.588705 | false | 4.420251 | false | false | false |
ptitjes/quodlibet | quodlibet/ext/events/advanced_preferences.py | 1 | 6298 | # Copyright 2015 Christoph Reiter
# 2016-17 Nick Boultbee
# 2019 Peter Strulo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | gpl-2.0 | -5,063,055,347,617,132,000 | 31.632124 | 79 | 0.568434 | false | 4.137976 | true | false | false |
martin-g/FrameworkBenchmarks | frameworks/Python/bottle/app.py | 58 | 5667 | from functools import partial
from operator import attrgetter, itemgetter
from random import randint
import os
import sys
from bottle import Bottle, route, request, run, template, response
from bottle.ext import sqlalchemy
from sqlalchemy import create_engine, Column, Integer, Unicode
from sqlalchemy.ext.declarative ... | bsd-3-clause | -8,013,717,442,965,961,000 | 28.061538 | 112 | 0.641962 | false | 3.457596 | false | false | false |
pprett/statsmodels | statsmodels/tsa/vector_ar/plotting.py | 1 | 7191 | import numpy as np
import statsmodels.tsa.vector_ar.util as util
class MPLConfigurator(object):
def __init__(self):
self._inverse_actions = []
def revert(self):
for action in self._inverse_actions:
action()
def set_fontsize(self, size):
import matplotlib as mpl
... | bsd-3-clause | -2,009,466,799,043,465,200 | 26.764479 | 81 | 0.524545 | false | 3.401608 | true | false | false |
Endika/wfuzz | framework/ui/console/common.py | 11 | 5025 | import sys
from framework.core.facade import version
exec_banner = '''********************************************************\r
* Wfuzz %s - The Web Bruteforcer *\r
********************************************************\r\n''' % version
help_banner = '''***************************************... | gpl-2.0 | -3,817,247,530,713,688,600 | 47.786408 | 153 | 0.605174 | false | 3.184411 | false | false | false |
lsingal/leetcode | python/backtracking/WordLadderII.py | 2 | 1987 | class Solution:
# @param start, a string
# @param end, a string
# @param dict, a set of string
# @return a list of lists of string
# @remark prevMap = {cog:[log, dog], log:[lot], dog:[dot], lot:[hot], hot:[hit]}
def __init__(self):
self.prevMap = {}
self.result = []
self.... | mit | 5,983,621,214,143,312,000 | 33.258621 | 94 | 0.482637 | false | 4.113872 | false | false | false |
rew4332/tensorflow | tensorflow/examples/learn/random_forest_mnist.py | 9 | 2862 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,055,145,290,128,778,000 | 35.692308 | 80 | 0.690077 | false | 3.816 | false | false | false |
Dangetsu/vnr | Frameworks/Sakura/py/scripts/getcabocha.py | 1 | 4889 | # coding: utf8
# getcabocha.py
# Get CaboCha model for MeCab dictionaries
# 2/14/2014 jichi
if __name__ == '__main__':
import initrc
initrc.chcwd()
initrc.initenv()
import os
title = os.path.basename(__file__)
initrc.settitle(title)
import os
from sakurakit import skos
from sakurakit.skdebug import dprin... | gpl-3.0 | 7,001,900,223,147,965,000 | 25.570652 | 127 | 0.624054 | false | 2.867449 | false | false | false |
AndiDog/git-cola | cola/widgets/filetree.py | 1 | 1318 | from __future__ import absolute_import, division, unicode_literals
from qtpy import QtCore
from qtpy import QtWidgets
from .. import icons
from . import standard
# pylint: disable=too-many-ancestors
class FileTree(standard.TreeWidget):
def __init__(self, parent=None):
standard.TreeWidget.__init__(self,... | gpl-2.0 | -7,619,744,217,457,678,000 | 27.652174 | 66 | 0.632018 | false | 4.080495 | false | false | false |
pmitche/it3105-aiprogramming | project1/common/astar.py | 1 | 4262 | __author__ = 'paulpm'
class Astar(object):
def __init__(self):
# variable used to determined search function
self.nodes_expanded= 0
self.nodes_created = 0
self.closedlist = []
self.opendict = dict()
self.closeddict = dict()
self.openlist = self.generate_ope... | mit | -3,761,691,279,950,471,000 | 34.231405 | 85 | 0.616847 | false | 4.133851 | false | false | false |
andreymal/mini_fiction | mini_fiction/story_voting/base.py | 1 | 5104 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
class BaseVoting:
def __init__(self, app):
pass
def get_default_vote_value(self):
'''Данный метод должен возвращать целое число — значение рейтинга,
которое будет присвоено только что созданному рассказу
(``vote_value``).
... | gpl-3.0 | -3,463,352,697,326,991,000 | 34.11215 | 83 | 0.639606 | false | 1.982586 | false | false | false |
akretion/sale-tax-included-excluded | sale_tax_included_excluded/sale.py | 1 | 1993 | # -*- coding: utf-8 -*-
##############################################################################
#
# Sale Tax Included Excluded module for Odoo
# Copyright (C) 2014-2015 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | agpl-3.0 | 4,506,226,416,451,295,000 | 44.295455 | 78 | 0.610637 | false | 3.930966 | false | false | false |
matrix-org/synapse | synapse/config/redis.py | 1 | 1853 | # Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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 a... | apache-2.0 | 6,419,101,805,250,423,000 | 33.314815 | 81 | 0.656233 | false | 4.309302 | true | false | false |
openhealthcare/randomise.me | rm/userprofiles/migrations/0005_auto__add_field_rmuser_name__add_field_rmuser_dob__add_field_rmuser_ge.py | 1 | 3093 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'RMUser.name'
db.add_column(u'userprofiles_rmuser', 'name',
self.gf('dj... | agpl-3.0 | 5,274,593,697,158,158,000 | 46.6 | 125 | 0.56838 | false | 3.634548 | false | false | false |
tobi-wan-kenobi/bumblebee-status | bumblebee_status/modules/core/redshift.py | 1 | 3557 | # pylint: disable=C0111,R0903
"""Displays the current color temperature of redshift
Requires the following executable:
* redshift
Parameters:
* redshift.location : location provider, either of 'auto' (default), 'geoclue2',
'ipinfo' or 'manual'
'auto' uses whatever redshift is configured to do
... | mit | -2,600,319,863,666,812,000 | 30.477876 | 91 | 0.574923 | false | 3.866304 | false | false | false |
DanLipsitt/python-tdbus | examples/avahi.py | 1 | 1521 | #!/usr/bin/env python
#
# This file is part of python-tdbus. Python-tdbus is free software
# available under the terms of the MIT license. See the file "LICENSE" that
# was provided together with this source file for the licensing terms.
#
# Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a
# co... | mit | 4,833,220,264,876,934,000 | 28.823529 | 95 | 0.715319 | false | 3.222458 | false | false | false |
tecan/xchat-rt | plugins/scripts/Supybot-0.83.4.1-bitcoinotc-bot/build/lib/supybot/plugins/Scheduler/plugin.py | 14 | 5076 | ###
# Copyright (c) 2003-2004, Jeremiah Fincher
# 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 list of co... | gpl-2.0 | 5,941,363,963,240,134,000 | 38.65625 | 79 | 0.640859 | false | 4.290786 | false | false | false |
treycucco/bidon | bidon/spreadsheet/open_document.py | 1 | 3230 | """The spreadsheet.open_document module contains the OpenDocument implementation for the
bidon.spreadsheet model. It requires the ezodf library.
"""
import re
import ezodf
from bidon.spreadsheet.base import CellMode, WorksheetBase, WorkbookBase
__all__ = ["OpenDocumentWorksheet", "OpenDocumentWorkbook"]
_DATE_REG... | mit | -5,340,593,922,242,026,000 | 33.731183 | 88 | 0.648297 | false | 3.537788 | false | false | false |
Tesora/tesora-python-troveclient | troveclient/v1/root.py | 3 | 3681 | # Copyright 2011 OpenStack Foundation
# Copyright 2013 Rackspace Hosting
# 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/lice... | apache-2.0 | -2,488,150,698,421,342,000 | 38.580645 | 79 | 0.650095 | false | 4.216495 | false | false | false |
jswhit/pyks | KS.py | 1 | 2151 | import numpy as np
class KS(object):
#
# Solution of 1-d Kuramoto-Sivashinsky equation, the simplest
# PDE that exhibits spatio-temporal chaos
# (https://www.encyclopediaofmath.org/index.php/Kuramoto-Sivashinsky_equation).
#
# u_t + u*u_x + u_xx + diffusion*u_xxxx = 0, periodic BCs on [0,2*pi*L... | mit | -1,729,086,875,129,869,600 | 44.765957 | 85 | 0.605765 | false | 2.9875 | false | false | false |
pjwerneck/device-mesh | mesh/models/__init__.py | 1 | 1614 | # -*- coding: utf-8 -*-
#
# contributor : Pedro Werneck
# name : Python file template .... :
__author__ = "Pedro Werneck (pjwerneck@gmail.com)"
__date__ = "Sun Sep 29 20:42:27 2013"
from datetime import datetime
from werkzeug.exceptions import NotFound, BadRequest, Unauthorized, Forbidden, NotImplemented
from sqla... | apache-2.0 | -931,514,942,660,709,600 | 24.619048 | 93 | 0.63259 | false | 3.842857 | false | false | false |
ryanpdwyer/jittermodel | docs/conf.py | 1 | 9215 | # -*- coding: utf-8 -*-
#
# Jitter Model documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 17 10:55:06 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | mit | 412,356,850,612,561,300 | 30.131757 | 113 | 0.697233 | false | 3.69635 | true | false | false |
totoro72/pt1 | ep/item_32_use_get_attr_for_lazy_attributes.py | 1 | 1559 | # __get_attr__ and __set_attr__ for lazy attributes
"""
__get_attr__ is called
1. if it's defined, AND
2. if it does not exists in instance.__dict__ (that's when AttributeError occurs)
__get_attribute__ is called
1. if it's defined
2. when the attribute exists OR does NOT exist in instance.__dict__
__get_attr__ and... | mit | 8,516,626,499,357,180,000 | 26.350877 | 81 | 0.561899 | false | 4.049351 | false | false | false |
mbokulic/bmt_parser | bmt_parser/collaborators.py | 1 | 2298 | '''
transforms the csv output that was parsed from Blue Mountain
'''
import pandas as pd
import numpy as np
import itertools
def get_collaborators(data):
'''
takes a pandas DataFrame that is the output of 01_parse_xml.py and
transforms it into a df that counts the number of collaborations btw two
aut... | mit | 4,947,962,970,387,863,000 | 29.64 | 78 | 0.642298 | false | 3.875211 | false | false | false |
rodrigob/visiongrader | datasets/pedestrians/caltech/test.py | 1 | 6748 | #!/usr/bin/python
import sys
import os
# parameters
vgsrc = os.path.dirname(os.path.abspath(__file__)) + '/../../../src/'
gt_parser = '--groundtruth_parser eblearn --gt_whratio .43'
sampling = "--sampling 50" # curve approx to avoid computing all possible thresh
format = '--xmin 0.003 --xmax 102 --ymin 0.01 --ymax 1... | gpl-3.0 | 8,550,897,226,958,564,000 | 37.340909 | 81 | 0.548014 | false | 3.144455 | false | false | false |
aswarren/GOGranny | GOGranny/XGraphWeighters/ICWeighter.py | 1 | 2972 | ## \package XGraphWeighters.InformationContent
# A graph weighter that uses Information Content to assign
# weights to edges.
# \author Brian Muller <mullerb@musc.edu>
from WeightingInterface import WeightingInterface
from networkx import topological_sort
from math import log
class ICWeighter(WeightingInterface... | gpl-2.0 | -3,641,134,365,162,775,000 | 42.705882 | 145 | 0.679341 | false | 4.082418 | false | false | false |
Edmonton-Public-Library/centennial | timemap/management/commands/story_import.py | 1 | 2629 | import csv
from optparse import make_option
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from timemap.models import Story, Branch
from django.core.files import File
from django.core.exceptions import ObjectDoesNotExist
CONTENT_TYPE = {"text" : "T",
"... | mit | 5,801,632,171,938,322,000 | 34.527027 | 104 | 0.500571 | false | 3.977307 | false | false | false |
ricardodeazambuja/BrianConnectUDP | examples/Spikes2Baxter.py | 1 | 5345 | '''
This is the input node that receives spikes and converts to Baxter joint angles.
'''
import argparse
from brian_multiprocess_udp import BrianConnectUDP
def from_spikes_to_baxter(spikes_pipe_in, spikes_pipe_out):
"""
This function substitutes the run_brian_simulation and converts the received spikes in... | cc0-1.0 | -124,294,996,824,154,020 | 34.397351 | 147 | 0.634799 | false | 3.58004 | false | false | false |
blaggacao/odoo | addons/portal_project/project.py | 103 | 1769 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 | -1,651,498,910,368,064,000 | 45.552632 | 99 | 0.605427 | false | 4.400498 | false | false | false |
onyb/veritrans-payment-portals | core/api/views/endpoints.py | 1 | 7152 | #! /usr/bin/env python
# coding:utf-8
from flask import Module, jsonify, request
from flask.views import MethodView
from core.api import API
from core.api.decorators import jsonp
from core.api.utils.RequestValidator import PaymentDataValidator
api = Module(
__name__,
url_prefix='/api'
)
def jsonify_status_... | mit | 2,596,201,180,974,219,300 | 22.760797 | 104 | 0.408138 | false | 4.764823 | false | false | false |
richard-roberts/Mocappie | src/animation/animation.py | 1 | 4856 | from typing import List, Tuple
import numpy as np
from src.animation.frame import Frame
from src.animation.timeline import Timeline
from src.scene.coordinates.coordinate import Coordinate
from src.scene.coordinates.joint import Joint
from src.scene.coordinates.value import Value
from src.scene.things.character import... | gpl-3.0 | 7,011,230,131,539,643,000 | 32.722222 | 102 | 0.601524 | false | 3.96732 | false | false | false |
StellarCN/py-stellar-base | stellar_sdk/sep/stellar_toml.py | 1 | 2517 | """
SEP: 0001
Title: stellar.toml
Author: stellar.org
Status: Active
Created: 2017-10-30
Updated: 2019-06-12
Version: 2.1.0
"""
from typing import Union, Any, Coroutine, Dict
import toml
from .exceptions import StellarTomlNotFoundError
from ..client.base_async_client import BaseAsyncClient
from ..client.base_sync_cli... | apache-2.0 | -8,139,018,842,631,934,000 | 32.56 | 99 | 0.689313 | false | 3.457418 | false | false | false |
ThomasHSmith/PhosphoProTools | src/phosphoprotools/siteannotation.py | 1 | 20444 | # Filename: siteannotation.py
# Author: Thomas H. Smith 2017
import pandas as pd
from tqdm import tqdm_notebook
import numpy as np
import pandas as pd
import urllib2
from urllib2 import HTTPError, URLError
from multiprocessing.dummy import Pool as ThreadPool
from requests.exceptions import ReadTimeout
from data import... | mit | 5,755,062,968,341,785,000 | 39.086275 | 118 | 0.616954 | false | 3.504886 | false | false | false |
trek10inc/awsume | test/unit/awsume/awsumepy/lib/test_cache.py | 1 | 5995 | import os
import json
import pytest
from datetime import datetime, timedelta
from unittest.mock import patch, MagicMock
from awsume.awsumepy.lib import cache, constants
@patch('os.chmod')
@patch('os.makedirs')
@patch('os.path.exists')
def test_ensure_cache_dir(exists: MagicMock, makedirs: MagicMock, chmod: MagicMock... | mit | -115,829,583,128,822,300 | 27.014019 | 147 | 0.657548 | false | 3.394677 | true | false | false |
fedorpatlin/ansible | lib/ansible/utils/encrypt.py | 35 | 6560 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | -8,579,087,484,033,885,000 | 39.245399 | 159 | 0.648628 | false | 3.935213 | false | false | false |
ajm/seance | seance/cluster.py | 1 | 6791 | import sys
import os
import collections
import logging
from seance.system import System
from seance.tools import Pagan
from seance.progress import Progress
from seance.system import System
class Cluster(object) :
def __init__(self, db, similiarity_threshold, verbose) :
self.db = db
self.similarit... | gpl-3.0 | -7,590,158,621,431,045,000 | 27.061983 | 125 | 0.515388 | false | 3.955154 | false | false | false |
FR4NK-W/osourced-scion | python/lib/packet/path_mgmt/ifstate.py | 1 | 2633 | # Copyright 2016 ETH Zurich
#
# 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, sof... | apache-2.0 | 8,569,653,772,921,929,000 | 29.264368 | 80 | 0.64755 | false | 3.510667 | false | false | false |
smilusingjavascript/blink | Source/bindings/scripts/utilities.py | 2 | 6377 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions (file reading, simple IDL parsing by regexes) for IDL build.
Design doc: http://www.chromium.org/developers/design-documents/idl-build
... | bsd-3-clause | 4,914,844,420,699,138,000 | 36.958333 | 108 | 0.617218 | false | 4.010692 | false | false | false |
int32bit/cinder-quota-sync | resources/quotas.py | 1 | 1107 | from sqlalchemy import and_
from sqlalchemy import select
from sqlalchemy import Table
def get_resources_usage(resources, meta, project_id=None, volume_type_id=None):
quota_usages = Table('quota_usages', meta, autoload=True)
if project_id:
resource_quota_usage = select(
columns=[
... | mit | -3,464,130,312,242,193,000 | 38.535714 | 79 | 0.590786 | false | 3.99639 | false | false | false |
AresS31/SCI | src/utils/register_operation.py | 1 | 1105 | # Copyright (C) 2015 Alexandre Teyar
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writi... | apache-2.0 | 4,557,155,837,929,988,000 | 28.864865 | 79 | 0.676018 | false | 3.863636 | false | false | false |
bnjones/Mathics | mathics/settings.py | 1 | 3589 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
import pkg_resources
import sys
import os
from os import path
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# set only to True in DEBUG mode
DEBUG_MAIL = True
PROPAGATE_EXCEPTIONS = True
DISPLAY_EXCEP... | gpl-3.0 | -5,845,897,087,145,675,000 | 26.607692 | 78 | 0.714126 | false | 3.301748 | false | false | false |
johndoe31415/joeecc | ecc/Polynomial.py | 1 | 8864 | #
# joeecc - A small Elliptic Curve Cryptography Demonstration.
# Copyright (C) 2011-2016 Johannes Bauer
#
# This file is part of joeecc.
#
# joeecc 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; this program... | gpl-3.0 | -8,046,899,961,464,879,000 | 25.698795 | 90 | 0.669111 | false | 3.254038 | false | false | false |
HyperBaton/ansible | lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py | 16 | 3449 | #!/usr/bin/python
# Copyright: (c) 2018, Johannes Brunswicker <johannes.brunswicker@gmail.com>
# 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... | gpl-3.0 | -1,511,489,384,851,368,000 | 26.15748 | 92 | 0.608002 | false | 4.18568 | false | false | false |
kalgynirae/musictheory | musictheory.py | 1 | 11008 | from collections import namedtuple
import re
class Pitch:
"""A musical pitch, defined by a pitch class, octave, and transposition
Pitches by name:
>>> p = Pitch('a4')
>>> (p.pitch_class, p.octave)
('a', 4)
Pitches by base_pitch_id:
>>> p = Pitch(base_pitch_id=0)
>>> (p.pitch_class, p.... | gpl-3.0 | -6,880,194,040,101,869,000 | 31.853731 | 81 | 0.514719 | false | 3.676019 | false | false | false |
iulian787/spack | var/spack/repos/builtin/packages/r-bumphunter/package.py | 5 | 1713 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RBumphunter(RPackage):
"""Bump Hunter.
Tools for finding bumps in genomic data"""
... | lgpl-2.1 | -1,572,743,955,348,419,600 | 41.825 | 73 | 0.654407 | false | 2.736422 | false | false | false |
moodpulse/l2 | refprocessor/age_parser.py | 1 | 6268 | import re
from typing import Tuple, Union, List
from refprocessor.common import RANGE_REGEXP, SIGN_GT, SIGN_GTE, SIGN_LT, SIGN_LTE, get_sign_by_string, ValueRange, POINT_STRICT, Value, RANGE_IN
class AgeRight:
MODE_DAY = "day"
MODE_MONTH = "month"
MODE_YEAR = "year"
MODE_UNKNOWN = "unknow"
DAY_O... | mit | -6,290,945,639,665,087,000 | 29.643564 | 145 | 0.527464 | false | 3.331539 | false | false | false |
grawity/hacks | windows/fingerd.py | 1 | 2253 | #!python
# a Finger daemon for Windows NT
import socket as so
import win32api as api
#import win32con as con
import win32ts as ts
def reListSessions(outFh):
protocols = {
ts.WTS_PROTOCOL_TYPE_CONSOLE: "console",
ts.WTS_PROTOCOL_TYPE_ICA: "citrix",
ts.WTS_PROTOCOL_TYPE_RDP: "rdp",
}
... | mit | 4,996,193,411,457,682,000 | 27.518987 | 105 | 0.633822 | false | 3.303519 | false | false | false |
Ictp/indico | bin/utils/changeCreatorToReservation.py | 1 | 4132 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 | 5,215,825,622,834,660,000 | 30.30303 | 111 | 0.67667 | false | 3.599303 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.