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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mekkablue/Glyphs-Scripts | Build Glyphs/Quote Manager.py | 1 | 20549 | #MenuTitle: Quote Manager
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
__doc__="""
Build double quotes from single quotes, and insert #exit and #entry anchors in the single quotes for auto-alignment.
"""
import vanilla
from Foundation import NSPoint
names = {
"quotesinglb... | apache-2.0 | 2,217,539,419,846,548,700 | 39.133072 | 302 | 0.708246 | false | 3.3585 | false | false | false |
openstack/oslo.cache | oslo_cache/core.py | 1 | 16849 | # Copyright 2013 Metacloud
#
# 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, s... | apache-2.0 | -3,830,316,320,941,976,000 | 37.822581 | 79 | 0.664312 | false | 4.017406 | true | false | false |
matichorvat/pydelphin | delphin/mrs/dmrx.py | 1 | 8902 |
# DMRX codec
# Summary: This module implements serialization and deserialization of the
# XML encoding of Distributed Minimal Recusion Semantics (DMRS). It
# provides standard Pickle API calls of load, loads, dump, and dumps
# for serializing and deserializing DMRX corpora. Further,
# ... | mit | -8,480,411,096,646,843,000 | 33.909804 | 79 | 0.552572 | false | 3.595315 | false | false | false |
tectronics/yellowbox | yblib/statparser.py | 1 | 2423 | """A simple parser library for statistics messages produced by Yellowbox.
This module exports a function and an exception raised by that function.
Function:
statparse - Parses a Yellowbox stat message
Exception:
InvalidMessageException - Raised when statparse is passed something
that isn't a Yellowbox stat messa... | bsd-3-clause | -835,843,933,377,879,400 | 32.652778 | 78 | 0.707388 | false | 3.355956 | false | false | false |
macmanes-lab/GeosmithiaComparativeGenomics | Scripts4PAML/6_removehashtag_TA.py | 1 | 1423 | #!/usr/bin/python3
# A program for adding hashtags to the "foreground" species.
# USAGE: ./6_removehashtag_TA.py --input path_to_input_directory
# Author: Taruna Aggarwal
# Contact: ta2007@wildcats.unh.edu
# Affiliation: University of New Hampshire, Durham, NH, USA
# Date: 1/27/2016
# Purpose is to remove '#1' from th... | cc0-1.0 | 5,111,911,443,499,973,000 | 38.527778 | 107 | 0.665495 | false | 3.531017 | false | false | false |
Xi-Plus/Xiplus-Wikipedia-Bot | push/edit.py | 1 | 4521 | # -*- coding: utf-8 -*-
import argparse
import os
from config import cfg # pylint: disable=E0611,W0614
from func import file_get_contents
os.environ['TZ'] = 'UTC'
parser = argparse.ArgumentParser()
parser.add_argument('--auto', action='store_true')
parser.add_argument('--no-diff', action='store_true')
parser.add_ar... | mit | -5,548,971,069,188,324,000 | 24.542373 | 104 | 0.561823 | false | 3.64303 | false | false | false |
GabrielDumbrava/django-categories | categories/base.py | 1 | 5807 | """
This is the base class on which to build a hierarchical category-like model
with customizable metadata and its own name space.
"""
from django.contrib import admin
from django.db import models
from django import forms
from django.utils.encoding import force_unicode
from django.utils.translation import ugettext as ... | apache-2.0 | -402,155,265,483,884,540 | 34.845679 | 114 | 0.608404 | false | 4.317472 | false | false | false |
DMAshura/porcupyne | resources.py | 1 | 1891 | from pyglet import resource, media, image
import os
import string
class Resource:
def __init__(self):
self.sound_dict = {}
self.image_dict = {}
self.image_filetypes = ('.jpg', '.gif', '.bmp', '.png')
self.sound_filetypes = ('.wav', '.mp3')
self.filetypes = []
... | gpl-3.0 | -3,408,408,742,811,772,000 | 32.175439 | 80 | 0.495505 | false | 3.898969 | false | false | false |
sjlehtin/django | django/core/management/__init__.py | 1 | 15287 | import functools
import os
import pkgutil
import sys
from collections import OrderedDict, defaultdict
from contextlib import suppress
from importlib import import_module
import django
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.... | bsd-3-clause | -3,926,000,415,800,669,700 | 40.540761 | 98 | 0.604501 | false | 4.436158 | true | false | false |
NCBI-Hackathons/Cancer_Epitopes_CSHL | src/imm_predict/fred2_background.py | 1 | 3414 | #!/usr/bin/env python2
"""
Given a protein FASTA file, compute immunogenicity for all posible 9-mer peptides.
Usage:
fred2_background.py [--alleles=<alleles_list> --top_N=N] --input=FILE_IN --output=FILE_OUT
fred2_background.py -h | --help
Arguments:
--input=FILE_IN Input fasta file, can be retri... | mit | -4,794,265,332,252,624,000 | 39.164706 | 108 | 0.660808 | false | 3.120658 | false | false | false |
dougiefresh1233/MyoTurtle | Turtle1.py | 1 | 1796 | #!/usr/bin/python
''' DON'T TOUCH THESE FIRST LINES! '''
''' ============================== '''
from PyoConnect import *
myo = Myo(sys.argv[1] if len(sys.argv) >= 2 else None)
''' ============================== '''
''' OK, edit below to make your own fancy script ^.^ '''
# Edit here:
import time
import os
import tur... | mit | 5,862,014,549,615,499,000 | 19.179775 | 56 | 0.603007 | false | 2.420485 | false | false | false |
1200wd/1200wd_addons | account_bank_match/models/account_bank_match.py | 1 | 10826 | # -*- coding: utf-8 -*-
##############################################################################
#
# Account Bank Match
# Copyright (C) 2016 May
# 1200 Web Development
# http://1200wd.com/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | agpl-3.0 | -1,092,523,175,278,956,900 | 46.69163 | 220 | 0.626362 | false | 4.189628 | false | false | false |
teampopong/pokr.kr | pokr/scripts/meeting.py | 1 | 5785 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import argparse
from datetime import datetime
import hashlib
import json
import logging
import re
from popong_models import Base
from popong_data_utils import guess_person
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
from pokr.data... | apache-2.0 | 7,019,730,062,019,335,000 | 30.005376 | 89 | 0.608635 | false | 3.744805 | false | false | false |
sofianehaddad/gosa | pygosa/tests/ishigami_uc.py | 1 | 1769 | # -*- Python -*-
#
# @file ishigami_uc.py
# @brief Ishigami use case, probabilistic and functions models
#
# Copyright (C) 2017 Airbus-IMACS
#
# Written by Sofiane Haddad, haddad@imacs.polytechnique.fr
# Nabil Rachdi, nabil.rachdi@airbus.com
#
# This progr... | lgpl-3.0 | 7,691,787,042,618,716,000 | 33.019231 | 100 | 0.66987 | false | 3.363118 | false | false | false |
kennel209/bilibili-download-helper | bilibili_download_helper.py | 1 | 10476 | #! /usr/bin/env python3
# coding: utf8
import sys
import os
import argparse
from helpers.utils import debug,set_debug
from helpers.utils import show_size
from helpers.url_generater import generate_urls, get_url_index
from helpers import downloaders
from helpers import bilibili_info_extractor
from helpers import video_... | gpl-3.0 | 6,170,788,742,443,519,000 | 31.211838 | 122 | 0.46441 | false | 4.383213 | false | false | false |
siavashk/pycpd | pycpd/emregistration.py | 1 | 6331 | from __future__ import division
import numpy as np
import numbers
from warnings import warn
def initialize_sigma2(X, Y):
(N, D) = X.shape
(M, _) = Y.shape
diff = X[None, :, :] - Y[:, None, :]
err = diff ** 2
return np.sum(err) / (D * M * N)
class EMRegistration(object):
"""
Expectation m... | mit | 3,315,548,524,244,623,000 | 33.407609 | 115 | 0.607013 | false | 4.119063 | false | false | false |
etingof/pysnmp | pysnmp/carrier/asyncore/dispatch.py | 1 | 1809 | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysnmp/license.html
#
from asyncore import loop
from asyncore import socket_map
from sys import exc_info
from time import time
from traceback import format_exception
from pysnmp.carrie... | bsd-2-clause | 8,699,179,269,854,278,000 | 31.303571 | 79 | 0.666667 | false | 4.380145 | false | false | false |
thinkst/canarytokend | canarytokend/canarytoken.py | 1 | 1648 | import sys
import requests
class Canarytoken(object):
def _setup_token(self,module=None, email=None):
print "Generating a new canarytoken for {module}".format(module=module)
while True:
if not email:
print "Please enter an email address for receiving alerts: ",
... | bsd-3-clause | -7,144,678,589,862,736,000 | 40.2 | 82 | 0.551578 | false | 4.490463 | false | false | false |
idlesign/django-sitetree | sitetree/tests/test_other.py | 1 | 3701 | from sitetree.settings import ALIAS_TRUNK
def test_stress(template_render_tag, template_context, template_strip_tags, build_tree, common_tree):
build_tree(
{'alias': 'othertree'},
[{'title': 'Root', 'url': '/', 'children': [
{'title': 'Other title', 'url': '/contacts/russia/web/privat... | bsd-3-clause | 5,155,784,559,334,490,000 | 40.943182 | 120 | 0.665673 | false | 3.478794 | false | false | false |
unho/translate | translate/tools/build_tmdb.py | 1 | 3300 | # -*- coding: utf-8 -*-
#
# Copyright 2008 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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 Lice... | gpl-2.0 | -8,015,180,154,348,064,000 | 32 | 88 | 0.630909 | false | 4.04908 | false | false | false |
imh/gnss-analysis | gnss_analysis/constants.py | 1 | 1307 | #!/usr/bin/env python
# Copyright (C) 2015 Swift Navigation Inc.
# Contact: Ian Horn <ian@swiftnav.com>
# Bhaskar Mookerji <mookerji@swiftnav.com>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS ... | lgpl-3.0 | 2,165,102,039,560,454,100 | 23.660377 | 78 | 0.739097 | false | 2.910913 | false | false | false |
mjabri/holoviews | holoviews/plotting/bokeh/annotation.py | 1 | 1889 | import numpy as np
from ...element import HLine, VLine
from .element import ElementPlot, text_properties, line_properties
class TextPlot(ElementPlot):
style_opts = text_properties
_plot_method = 'text'
def get_data(self, element, ranges=None):
mapping = dict(x='x', y='y', text='text')
r... | bsd-3-clause | -4,677,658,642,166,076,000 | 28.984127 | 73 | 0.553732 | false | 3.268166 | false | false | false |
kingrodriguez/oni-optimizer | settings.py | 1 | 1579 | def settings(dictionary):
with open('data/settings.json') as data_file:
settingsjsonold = json.load(data_file)
settingsjsonnew = {}
answerwrong = True
while answerwrong:
settingsanswer = input('Run Settingsprogramm? (yes/no/exit)')
if settingsanswer == "exit":
sys.exi... | gpl-3.0 | -1,534,550,448,599,295,200 | 46.878788 | 173 | 0.474351 | false | 4.888545 | false | false | false |
micmc/compta | lib/compta/server/api/compte.py | 1 | 4506 | #!/usr/bin/python
# -*- coding: utf8 -*-
""" Application to create server for compta """
from compta.server.api.bottle import response, request, abort
from json import dumps, loads
#from sqlalchemy import desc
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.exc import IntegrityError
#from sqlalchemy.sql ... | mit | -1,812,105,595,531,268,000 | 29.445946 | 76 | 0.550155 | false | 3.57619 | false | false | false |
quantling/pyndl | setup.py | 1 | 2509 | from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as _build_ext
import sys
# bootstrap numpy
# https://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installation-in-setup-py
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_... | mit | 1,888,463,503,035,786,200 | 32.453333 | 94 | 0.644081 | false | 3.538787 | false | false | false |
patrickwestphal/owlapy | owlapy/vocab/namespaces.py | 1 | 4322 | from enum import Enum
import owlapy.model
class Status(Enum):
LEGACY = 0,
IN_USE = 1
class BuiltIn(Enum):
BUILT_IN = 0,
NOT_BUILT_IN = 1
class Namespaces(Enum):
OWL2 = ("owl2", "http://www.w3.org/2006/12/owl2#", Status.LEGACY)
OWL11XML = ("owl11xml", "http://www.w3.org/2006/12/owl11-xml#"... | gpl-3.0 | -180,400,546,160,131,170 | 39.392523 | 79 | 0.568024 | false | 2.577221 | false | false | false |
Bilingual-Annotation-Task-Force/Scripts | Retagger.py | 1 | 1875 | #This code modifies a language identified gold standard from a 2-tag system (Eng|Span) to a 3-tag system(Eng|Span|Other)
#INPUT csv file with TOKEN, POS, LANG
##Lang = Eng | Span
##delimiter= , quotechar= "
#OUTPUT csv with TOKEN, POS, Lang
##Lang = Eng | Span | Other
##delimiter= , quotechar= "
##file name = i... | mit | 2,357,846,533,083,225,000 | 33.090909 | 120 | 0.693867 | false | 3.194208 | false | false | false |
hellodmp/segmentnet | utilities.py | 1 | 5019 | import numpy as np
import SimpleITK as sitk
import matplotlib.pyplot as plt
def hist_match(source, template):
"""
Adjust the pixel values of a grayscale image such that its histogram
matches that of a target image
Arguments:
-----------
source: np.ndarray
Image to transform; th... | gpl-3.0 | 7,049,072,567,237,776,000 | 35.107914 | 185 | 0.706316 | false | 3.321641 | false | false | false |
jenfly/atmos-read | scripts/fram/run1_2014.py | 1 | 9884 | """
3-D variables:
--------------
Instantaneous:
['U', 'V', 'OMEGA', 'T', 'QV', 'H']
Time-average:
['DUDTANA']
2-D variables:
--------------
Time-average surface fluxes:
['PRECTOT', 'EVAP', 'EFLUX', 'HFLUX', 'QLML', 'TLML']
Time-average vertically integrated fluxes:
['UFLXQV', 'VFLXQV', 'VFLXCPT', 'VFLXPHI']
Instan... | mit | -3,528,073,911,942,544,400 | 32.733788 | 79 | 0.578207 | false | 3.044041 | false | false | false |
ypid/subuser | logic/subuserlib/classes/installedImages.py | 1 | 2797 | #!/usr/bin/env python
# This file should be compatible with both Python 2 and 3.
# If it is not, please file a bug report.
"""
This is the set of installed images that bellongs to a given user.
"""
#external imports
import os,json,collections,sys
#internal imports
import subuserlib.classes.installedImage,subuserlib.c... | lgpl-3.0 | 7,330,101,416,160,461,000 | 40.132353 | 132 | 0.720772 | false | 4.041908 | false | false | false |
dhcrzf/zulip | tools/zulint/printer.py | 1 | 1070 | from __future__ import print_function
from __future__ import absolute_import
import sys
import os
from itertools import cycle
if False:
# See https://zulip.readthedocs.io/en/latest/testing/mypy.html#mypy-in-production-scripts
from typing import Union, Text
# Terminal Color codes for use in differentiatng lint... | apache-2.0 | 7,560,309,869,632,877,000 | 25.75 | 93 | 0.627103 | false | 3.005618 | false | false | false |
matthewwardrop/formulaic | tests/parser/types/test_token.py | 1 | 2289 | import pytest
from formulaic.parser.types import Term, Token
class TestToken:
@pytest.fixture
def token_a(self):
return Token('a', kind='name')
@pytest.fixture
def token_b(self):
return Token('log(x)', kind='python', source='y ~ log(x)', source_start=4, source_end=9)
@pytest.fix... | mit | -7,858,089,015,185,385,000 | 29.413333 | 96 | 0.577817 | false | 3.194678 | true | false | false |
UnitedThruAction/Data | Tools/SuffolkParser.py | 1 | 8507 | """Parse Suffolk County data file and emit OpenElections CSV.
@author n.o.franklin@gmail.com
@date 2017-07-11
"""
import sys
def parse_information_record(line):
"""Type I. Read and parse information record data."""
information = line[5:].rstrip()
return {'information': information}
def parse_office_r... | apache-2.0 | -8,484,805,993,741,460,000 | 36.977679 | 79 | 0.508522 | false | 3.895147 | false | false | false |
AhmedHani/Kaggle-Machine-Learning-Competitions | Easy/What's Cooking/get_data.py | 1 | 2057 | __author__ = 'Ahmed Hani Ibrahim'
import json
import scipy as sc
import numpy as np
def get_train_data():
with open('./train.json') as r:
data = json.load(r)
r.close()
return data
def get_test_data():
with open('./test.json') as r:
data = json.load(r)
r.close()
retu... | mit | 2,965,865,717,847,519,000 | 27.971831 | 105 | 0.644628 | false | 3.439799 | false | false | false |
qiqi/fds | tests/test_autonomous_system/test_vida_automomous_system.py | 1 | 1891 | import os
import sys
import shutil
import string
import subprocess
from numpy import *
my_path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(my_path, '../..'))
from fds.cti_restart_io import *
ref_fname = os.path.join(my_path, '..', 'data', 'cti-sample-restart-file.les')
initial_state = ... | gpl-3.0 | 3,876,874,120,806,105,000 | 36.82 | 80 | 0.586991 | false | 3.05 | false | false | false |
sga001/cinch | exploits/CVE-2016-3138.py | 1 | 1952 | #!/usr/bin/env python3
from USB import *
from USBDevice import *
from USBConfiguration import *
from USBInterface import *
from USBEndpoint import *
class PwnUSBDevice(USBDevice):
name = "USB device"
def handle_buffer_available(self, lll):
return
def __init__(self, maxusb_app, verbose=0):
... | cc0-1.0 | 1,698,712,239,874,196,700 | 28.575758 | 72 | 0.412398 | false | 5.083333 | false | false | false |
nion-software/nionswift | nion/swift/model/Project.py | 1 | 19701 | # standard libraries
import functools
import logging
import pathlib
import typing
import uuid
import weakref
# local libraries
from nion.swift.model import Changes
from nion.swift.model import Connection
from nion.swift.model import DataGroup
from nion.swift.model import Symbolic
from nion.swift.model import DataItem
... | gpl-3.0 | 7,469,101,055,885,551,000 | 48.5 | 173 | 0.649662 | false | 4.032133 | false | false | false |
richrd/bx | modules/autochanmode.py | 1 | 1311 | from mod_base import*
class AutoChanMode(Listener):
"""Automatically manage channel modes according to config."""
def init(self):
self.events = [
IRC_EVT_CHAN_USER_MODE_CHANGE,
IRC_EVT_CHAN_MODE_CHANGE,
]
self.all_modes = "... | apache-2.0 | 7,036,446,650,438,043,000 | 30.238095 | 78 | 0.546911 | false | 3.601648 | false | false | false |
mompiou/stereo-proj | schmidUI.py | 1 | 3558 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'schmidUI.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
... | gpl-2.0 | -1,922,772,828,520,830,500 | 45.207792 | 98 | 0.681001 | false | 3.451018 | false | false | false |
fnurl/alot | alot/helper.py | 1 | 20813 | # -*- coding: utf-8 -*-
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com>
# Copyright © 2017 Dylan Baker
# This file is released under the GNU GPL, version 3 or a later revision.
# For further details see the COPYING file
from __future__ import absolute_import
from __future__ import division
from dat... | gpl-3.0 | 5,192,336,678,170,296,000 | 32.567742 | 79 | 0.617769 | false | 3.959665 | false | false | false |
ArcherSys/ArcherSys | Lib/unittest/test/testmock/__init__.py | 1 | 1535 | <<<<<<< HEAD
<<<<<<< HEAD
import os
import sys
import unittest
here = os.path.dirname(__file__)
loader = unittest.defaultTestLoader
def load_tests(*args):
suite = unittest.TestSuite()
for fn in os.listdir(here):
if fn.startswith("test") and fn.endswith(".py"):
modname = "unittest.test.tes... | mit | -7,664,057,494,624,798,000 | 25.929825 | 61 | 0.631922 | false | 3.753056 | true | false | false |
Alaxe/judgeSystem | users/migrations/0003_auto_20150628_1423.py | 1 | 1618 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('users', '0002_auto_20150628_1254'),
]
operations = [
migrations.Remove... | gpl-2.0 | -1,409,407,466,053,704,200 | 28.962963 | 110 | 0.566749 | false | 4.085859 | false | false | false |
prestodb/presto-admin | tests/unit/test_topology.py | 1 | 4727 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | -4,119,446,143,831,137,300 | 38.391667 | 78 | 0.562513 | false | 4.231871 | true | false | false |
lol/BCI-BO-old | plot_iii3b_old.py | 1 | 4787 | import numpy as np
import matplotlib.pyplot as plt
import math
from pylab import figure
from my_plotter import *
import os
import sys
sys.path.append('./BCI_Framework')
import Main
import Single_Job_runner as SJR
import os
import re
if __name__ == '__main__':
bciciv1 = Main.Main('BCI_Framework','BCICIII3b... | gpl-3.0 | -2,834,472,925,079,466,500 | 46.88 | 180 | 0.597034 | false | 2.97514 | true | false | false |
coreknowledge2016/multi-agent-hrl | learning.py | 1 | 7187 | #from flat_game import carmunk
import carmunk
import numpy as np
import random
import csv
from nn import neural_net, LossHistory
import os.path
import timeit
NUM_INPUT = 6
GAMMA = 0.9 # Forgetting.
TUNING = False # If False, just use arbitrary, pre-selected params.
def train_net(model, params):
filename = para... | mit | 8,669,900,673,622,070,000 | 30.384279 | 88 | 0.554056 | false | 3.69132 | false | false | false |
murych/lambdaweb | team/migrations/0001_initial.py | 1 | 6857 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-09 17:59
from __future__ import unicode_literals
import ckeditor_uploader.fields
import colorfield.fields
import django.db.models.deletion
import filebrowser.fields
from django.conf import settings
from django.db import migrations, models
class Migratio... | mit | 8,095,969,056,012,038,000 | 49.48062 | 160 | 0.534091 | false | 3.808187 | false | false | false |
MalmoUniversity-DA366A/calvin-base | calvin/tutorial/dist-1.py | 1 | 1306 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | 3,418,883,178,260,327,400 | 33.368421 | 96 | 0.725881 | false | 3.455026 | false | false | false |
arunkgupta/gramps | gramps/plugins/tool/extractcity.py | 1 | 26002 | # -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General... | gpl-2.0 | 1,880,201,087,278,255,900 | 40.255962 | 88 | 0.432139 | false | 2.881092 | false | false | false |
hugovincent/pirate-swd | SWDCommon.py | 1 | 4282 | import time
class DebugPort:
def __init__ (self, swd):
self.swd = swd
# read the IDCODE
# Hugo: according to ARM DDI 0316D we should have 0x2B.. not 0x1B.., but
# 0x1B.. is what upstream used, so leave it in here...
if self.idcode() not in [0x1BA01477, 0x2BA01477]:
... | bsd-3-clause | 1,786,803,907,590,919,400 | 34.683333 | 81 | 0.578001 | false | 2.988137 | false | false | false |
oscurart/BlenderAddons | oscurart_delta_to_global.py | 1 | 1400 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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.
#
# This program is distrib... | gpl-2.0 | 6,044,060,806,490,240,000 | 35.842105 | 83 | 0.692143 | false | 3.5 | false | false | false |
dorotapalicova/GoldDigger | gold_digger/data_providers/grandtrunk.py | 1 | 2755 | # -*- coding: utf-8 -*-
from datetime import datetime, date
from collections import defaultdict
from ._provider import Provider
class GrandTrunk(Provider):
"""
Service offers day exchange rates based on Federal Reserve and European Central Bank.
It is currently free for use in low-volume and non-commercia... | apache-2.0 | 8,640,422,715,685,752,000 | 45.694915 | 132 | 0.587659 | false | 3.986975 | false | false | false |
caktus/aws-web-stacks | stack/load_balancer.py | 1 | 4262 | from troposphere import GetAtt, If, Join, Output, Ref
from troposphere import elasticloadbalancing as elb
from . import USE_ECS, USE_GOVCLOUD
from .security_groups import load_balancer_security_group
from .template import template
from .utils import ParameterWithDefaults as Parameter
from .vpc import public_subnet_a, ... | mit | 8,519,122,697,732,304,000 | 27.039474 | 81 | 0.635852 | false | 4.1139 | false | false | false |
technige/py2neo | test/integration/test_types.py | 1 | 4086 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2021, Nigel Small
#
# 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
#
# Unle... | apache-2.0 | 5,860,425,260,002,688,000 | 25.36129 | 103 | 0.631424 | false | 3.157651 | true | false | false |
hirokihamasaki/irma | probe/modules/antivirus/clamav/clam.py | 1 | 3588 | #
# Copyright (c) 2013-2016 Quarkslab.
# This file is part of IRMA project.
#
# 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 in the top-level directory
# of this distribution and at:
#
# http:... | apache-2.0 | 4,104,439,727,466,220,000 | 37.170213 | 78 | 0.516165 | false | 4.349091 | false | false | false |
mccormickmichael/laurel | scaffold/cf/net.py | 1 | 1726 | #!/usr/bin/python
# Common functions and builders for VPC Templates
import troposphere as tp
import troposphere.ec2 as ec2
CIDR_ANY = '0.0.0.0/0'
CIDR_NONE = '0.0.0.0/32'
HTTP = 80
HTTPS = 443
SSH = 22
EPHEMERAL = (32767, 65536)
NAT = (1024, 65535)
ANY_PORT = (0, 65535)
TCP = '6'
UDP = '17'
ICMP = '1'
ANY_PROTOCO... | unlicense | -5,010,251,801,299,284,000 | 25.96875 | 85 | 0.562572 | false | 3.332046 | false | false | false |
warriorframework/warriorframework | warrior/Framework/ClassUtils/rest_utils_class.py | 1 | 26837 | '''
Copyright 2017, Fujitsu Network Communications, 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 w... | apache-2.0 | 2,335,298,934,855,537,700 | 47.096774 | 115 | 0.571077 | false | 4.552502 | false | false | false |
pelikanchik/edx-platform | cms/djangoapps/contentstore/views/item.py | 1 | 18095 | # -*- coding: utf-8 -*-
"""Views for items (modules)."""
import json
import logging
from uuid import uuid4
from functools import partial
from static_replace import replace_static_urls
from xmodule_modifiers import wrap_xblock
from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators imp... | agpl-3.0 | -2,731,989,271,063,219,000 | 42.186158 | 122 | 0.6336 | false | 4.345581 | false | false | false |
amureki/lunch-with-channels | places/migrations/0001_initial.py | 1 | 1222 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-31 20:24
from __future__ import unicode_literals
from django.db import migrations, models
import django_extensions.db.fields
import stdimage.models
import stdimage.utils
class Migration(migrations.Migration):
initial = True
dependencies = [
... | mit | -6,530,141,570,635,881,000 | 36.030303 | 156 | 0.615385 | false | 4.199313 | false | false | false |
smartboyathome/Wonderland-Engine | install_check_to_white_rabbit.py | 1 | 1971 | #!/usr/bin/env python2
"""
Copyright (c) 2012 Alexander Abbott
This file is part of the Cheshire Cyber Defense Scoring Engine (henceforth
referred to as Cheshire).
Cheshire is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as publi... | agpl-3.0 | 2,859,696,470,728,600,000 | 39.244898 | 100 | 0.674277 | false | 3.754286 | false | false | false |
Andrwe/py3status | py3status/constants.py | 1 | 7015 | # This file contains various useful constants for py3status
GENERAL_DEFAULTS = {
"color_bad": "#FF0000",
"color_degraded": "#FFFF00",
"color_good": "#00FF00",
"color_separator": "#333333",
"colors": False,
"interval": 5,
"output_format": "i3bar",
}
MAX_NESTING_LEVELS = 4
TIME_FORMAT = "%Y... | bsd-3-clause | -4,436,011,993,799,610,400 | 26.727273 | 152 | 0.556522 | false | 2.704318 | false | false | false |
ikargis/horizon_fod | horizon/templatetags/sizeformat.py | 1 | 2802 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | -9,080,420,568,618,808,000 | 31.206897 | 78 | 0.654176 | false | 3.859504 | false | false | false |
zerotired/kotori | kotori/vendor/hydro2motion/database/mongo.py | 2 | 4486 | # -*- coding: utf-8 -*-
# (c) 2015 Andreas Motl, Elmyra UG <andreas.motl@elmyra.de>
import txmongo
from autobahn.twisted.wamp import ApplicationRunner, ApplicationSession
from twisted.internet.defer import inlineCallbacks
from twisted.internet.interfaces import ILoggingContext
from twisted.python import log
from zope.i... | agpl-3.0 | 2,517,970,087,876,669,000 | 42.134615 | 703 | 0.569996 | false | 3.453426 | false | false | false |
enriquepablo/terms | terms/core/tests.py | 1 | 2966 | # Copyright (c) 2007-2012 by Enrique Pérez Arnaud <enriquepablo@gmail.com>
#
# This file is part of the terms project.
# https://github.com/enriquepablo/terms
#
# The terms project 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 S... | gpl-3.0 | -4,042,667,240,511,713,300 | 32.693182 | 75 | 0.619224 | false | 3.937583 | true | false | false |
pmacosta/putil | sbin/compare_image_dirs.py | 1 | 3856 | #!/usr/bin/env python
# compare_image_dirs.py
# Copyright (c) 2013-2016 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0111
# Standard library imports
from __future__ import print_function
import argparse
import glob
import os
import sys
# PyPI imports
import numpy
import scipy
import scipy.misc
# ... | mit | 1,650,487,592,812,506,000 | 29.125 | 76 | 0.582469 | false | 3.373578 | false | false | false |
kmshi/miroguide | channelguide/subscriptions/views.py | 1 | 1962 | from django.conf import settings
from django.core.urlresolvers import resolve, Resolver404
from django.views.decorators.cache import never_cache
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from channelguide import util
from channelguide.channels.models import Channel
from chann... | agpl-3.0 | -7,790,385,285,968,047,000 | 40.744681 | 77 | 0.634557 | false | 4.183369 | false | false | false |
vincent-noel/libSigNetSim | libsignetsim/model/math/DAE.py | 1 | 2339 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br)
#
# This file is part of libSigNetSim.
#
# libSigNetSim 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 Fou... | gpl-3.0 | 506,651,916,005,281,900 | 25.885057 | 93 | 0.730654 | false | 3.434655 | false | false | false |
Wireless-Innovation-Forum/Spectrum-Access-System | src/harness/testcases/WINNF_FT_S_PPR_testcase.py | 1 | 30790 | # Copyright 2018 SAS Project 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 requ... | apache-2.0 | 6,128,459,033,703,096,000 | 41.120383 | 98 | 0.64102 | false | 3.636901 | true | false | false |
h4/fuit-webdev | projects/logger/logger/settings.py | 1 | 5341 | # Django settings for logger project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psyco... | mit | 1,071,628,346,005,622,400 | 33.458065 | 101 | 0.681333 | false | 3.742817 | false | false | false |
daniestevez/gr-satellites | tools/clang_format.py | 1 | 26734 | #!/usr/bin/env python
# Copyright (C) 2015,2016 MongoDB Inc.
# Copyright (C) 2018 Free Software Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3,
# as published by the Free Software Foundation.
#
# This program ... | gpl-3.0 | -4,323,851,137,709,461,500 | 31.404848 | 106 | 0.584312 | false | 4.172624 | false | false | false |
ruthbrenk/DrugPred2.0 | cl_startdock.py | 1 | 1537 | #!/usr/bin/python
#run as array job
#if files are bzipped -> copy to local disk and unzip there
import os,sys
db_dir = sys.argv[1]
zipped = sys.argv[2] #are files bzipped?
if zipped == 'True':
zipped = True
else:
zipped = False
files = os.listdir(db_dir)
file = '#$ -S /bin/tcsh\n#$ -cwd\n#$ -V\n'
path = os.g... | gpl-2.0 | 5,979,030,986,141,396,000 | 25.050847 | 100 | 0.659727 | false | 2.515548 | false | false | false |
overfl0/Bulletproof-Arma-Launcher | src/view/messagebox.py | 1 | 1628 | # Bulletproof Arma Launcher
# Copyright (C) 2016 Lukasz Taczuk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# b... | gpl-3.0 | -136,472,453,782,485,700 | 32.22449 | 80 | 0.693489 | false | 3.733945 | false | false | false |
DISMGryphons/GryphonCTF2017-Challenges | challenges/programming/AutoEncryptSys/generate/make.py | 1 | 1166 | from Crypto.Cipher import AES
import base64
import random
k="../distrib/"
def randomword(length):
return ''.join(random.choice("QWERTYUIOPASDFGHJKLZXCVBNM1234567890__________") for i in range(length))
def randomword1():
return ''.join(random.choice("QWERTYUIOPLKJHGFDSAZXCVBNM") for i in range(4))
def filename(... | gpl-3.0 | 4,262,148,654,617,338,000 | 28.15 | 107 | 0.702401 | false | 2.692841 | false | false | false |
amcgregor/WebCore-Tutorial | web/app/wiki/root.py | 1 | 2314 | # Python's standard date + time object.
from datetime import datetime
# HTTP status code exception for "302 Found" redirection.
from webob.exc import HTTPFound
# MongoDB exceptions that may be raised when manipulating data.
from pymongo.errors import DuplicateKeyError
# Get a reference to our Article resource class ... | mit | -5,330,814,030,077,170,000 | 32.536232 | 100 | 0.689283 | false | 3.714286 | false | false | false |
timesqueezer/mdfork | mooddiary/bundles.py | 1 | 1999 | from flask.ext.assets import Bundle
js = Bundle(
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-sanitize/angular-sanitize.js',
... | mit | 5,983,798,227,055,680,000 | 38.196078 | 89 | 0.728364 | false | 3.065951 | false | true | false |
newmediamedicine/indivo_server_1_0 | indivo/views/reports/immunization.py | 1 | 2097 | """
.. module:: views.reports.immunization
:synopsis: Indivo view implementations for the immunization report.
.. moduleauthor:: Daniel Haas <daniel.haas@post.harvard.edu>
.. moduleauthor:: Ben Adida <ben@adida.net>
"""
from django.http import HttpResponseBadRequest, HttpResponse
from indivo.lib.view_decorators i... | gpl-3.0 | 8,928,572,799,692,341,000 | 31.261538 | 77 | 0.692895 | false | 3.489185 | false | false | false |
zhanxw/bench | scripts/monitor.py | 1 | 10275 | #!/usr/bin/env python
import sys, os
from itertools import chain
# d is a pandas.DataFrame
def printTable(d, sep = ' ', outFile = sys.stderr):
cols = d.columns
col_widths = list(max(len(str(elem)) for elem in chain(d[col], [col])) for col in cols)
print >> sys.stderr, ' '.join('{value:>{width}}'.format(... | gpl-2.0 | -1,233,636,329,327,026,400 | 34.926573 | 163 | 0.493917 | false | 3.439906 | false | false | false |
LLNL/spack | var/spack/repos/builtin/packages/util-linux/package.py | 1 | 2266 | # 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 UtilLinux(AutotoolsPackage):
"""Util-linux is a suite of essential utilities for any Linux... | lgpl-2.1 | 1,896,356,911,546,345,500 | 44.32 | 97 | 0.704766 | false | 2.818408 | false | false | false |
yeyanchao/calibre | setup/installer/osx/app/main.py | 1 | 23748 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import sys, os, shutil, plistlib, subprocess, glob, zipfile, tempfile, \
py_compi... | gpl-3.0 | 4,389,795,545,550,242,300 | 35.423313 | 116 | 0.542909 | false | 3.539723 | true | false | false |
Tecktron/quickmailer | quickmail.py | 1 | 3408 | import argparse
import os
import re
import sys
if __name__ == "__main__":
if sys.version_info < (3, 0):
print("This script requires version 3+ of python. Please try running it with command 'python3' instead")
exit(8)
parser = argparse.ArgumentParser(
description="Quick Mailer"
)
... | mit | -8,947,849,462,155,596,000 | 39.094118 | 120 | 0.60446 | false | 4.191882 | false | false | false |
siquick/mostplayed | mp/ss_playlist.py | 1 | 2275 | import requests
import json
import hashlib # used to generate the key for the insert
import base64
def req_auth():
# request authorization
auth_code = base64.b64encode('2b9b835a9d2d45eab79778233e9142e4:6783d4b5790a4f5aaa94b863c30fc215')
headers = {'Authorization': 'Basic ' + auth_code}
auth_url = 'ht... | gpl-3.0 | 4,837,883,844,478,587,000 | 35.693548 | 102 | 0.57978 | false | 3.645833 | false | false | false |
sonofmun/DissProject | Chapter_3/graph_cs_corps.py | 1 | 1217 | __author__ = 'matt'
"""
Bar chart demo with pairs of bars grouped for easy comparison.
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#corps = [('NT', (0, 1, 2, 3, 4, 5)), ('LXX', (0, 1, 2, 3, 4, 5)), ('Josephus', (0, 1, 2, 3, 4, 5)), ('Philo', (0, 1, 2, 3, 4, 5)), ('Plutarch', (0, 1, 2, ... | gpl-3.0 | -7,344,222,544,633,724,000 | 32.833333 | 198 | 0.598192 | false | 2.562105 | false | false | false |
joelvbernier/hexrd-sandbox | multipanel_ff/spot_montage.py | 1 | 4998 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 19 15:29:27 2017
@author: bernier2
"""
import argparse
import numpy as np
import h5py
from matplotlib import pyplot as plt
"""
# UNCOMMENT IF YOU HAVE A SANE LATEX ENV AND WANT NICE FIG LABELS
#
# Options
params = {'text.usete... | gpl-3.0 | 2,192,930,690,850,654,200 | 29.055901 | 79 | 0.473589 | false | 3.393075 | false | false | false |
WoLpH/EventGhost | eg/Core.py | 1 | 12315 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost 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 versio... | gpl-2.0 | 5,448,933,114,497,041,000 | 29.939698 | 78 | 0.687835 | false | 3.687931 | true | false | false |
milo-minderbinder/jira | jira/client.py | 1 | 110052 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
"""
This module implements a friendly (well, friendlier) interface between the raw JSON
responses from JIRA and the Resource/dict abstractions provided by this library. Users
will construct a JIRA ob... | bsd-2-clause | -7,322,391,625,200,059,000 | 38.108742 | 243 | 0.592792 | false | 4.245178 | false | false | false |
sbeparey/CloudBot | plugins/foods.py | 1 | 14374 | import codecs
import json
import os
import random
import asyncio
import re
from cloudbot import hook
from cloudbot.util import textgen
nick_re = re.compile("^[A-Za-z0-9_|.\-\]\[\{\}]*$", re.I)
cakes = ['Chocolate', 'Ice Cream', 'Angel', 'Boston Cream', 'Birthday', 'Bundt', 'Carrot', 'Coffee', 'Devils', 'Fruit',
... | gpl-3.0 | -8,647,342,310,235,884,000 | 39.379213 | 120 | 0.599416 | false | 3.091848 | false | false | false |
berlotto/bolao-futebol | bolao/settings.py | 1 | 2001 | """
Django settings for bolao project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impo... | lgpl-3.0 | -7,687,704,100,187,002,000 | 23.108434 | 71 | 0.718141 | false | 3.196486 | false | false | false |
Onager/plaso | plaso/parsers/sqlite_plugins/chrome_cookies.py | 1 | 8029 | # -*- coding: utf-8 -*-
"""SQLite parser plugin for Google Chrome cookies database files."""
from dfdatetime import webkit_time as dfdatetime_webkit_time
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import definitions
# Register the cookie plugins.
from plaso.parsers imp... | apache-2.0 | -3,767,058,547,770,239,000 | 36.872642 | 79 | 0.668078 | false | 3.79084 | false | false | false |
jonatascastro12/django-dashboard_view | django_select2_extension/fields.py | 1 | 3839 | from django.db.models.query_utils import Q
from django.forms.models import ModelChoiceIterator
from django_select2.fields import ChoiceMixin, AutoModelSelect2MultipleField, AutoModelSelect2Field
from django_select2_extension.widgets import AutoPhotoHeavySelect2MultipleWidget, AutoPhotoHeavySelect2Widget
class Filtera... | gpl-2.0 | -1,333,794,018,231,232,500 | 41.197802 | 109 | 0.648085 | false | 4.453596 | false | false | false |
rh-lab-q/conflab | wsgi/openshift/confla/utils.py | 1 | 1275 | import os
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from django.utils.deconstruct import deconstructible
@deconstructible
class ConfRenamePath(object):
def __init__(self, path):
self.path = path
def __call__(self, instance, filename):
... | gpl-3.0 | -7,650,763,214,364,231,000 | 28.651163 | 62 | 0.661176 | false | 3.663793 | false | false | false |
group-policy/rally | rally/plugins/openstack/scenarios/murano/utils.py | 1 | 9884 | # Copyright 2015: Mirantis 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 | -1,880,708,867,045,607,000 | 35.072993 | 79 | 0.625152 | false | 4.379265 | false | false | false |
cgstudiomap/cgstudiomap | main/eggs/python_stdnum-1.2-py2.7.egg/stdnum/iban.py | 1 | 3897 | # iban.py - functions for handling International Bank Account Numbers (IBANs)
#
# Copyright (C) 2011, 2012, 2013 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ... | agpl-3.0 | -2,954,733,184,539,268,600 | 32.886957 | 77 | 0.699769 | false | 3.642056 | false | false | false |
mysociety/manchester-survey | survey/migrations/0003_auto__chg_field_user_email.py | 1 | 1991 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'User.email'
db.alter_column(u'survey_user', 'email', s... | agpl-3.0 | -6,821,724,920,916,634,000 | 44.272727 | 119 | 0.5555 | false | 3.574506 | false | false | false |
MediaMath/qasino | lib/data_manager.py | 1 | 15026 | # Copyright (C) 2014 MediaMath, Inc. <http://www.mediamath.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 5,960,669,923,601,375,000 | 36.753769 | 235 | 0.55943 | false | 4.053412 | false | false | false |
jjdmol/LOFAR | LCS/PyCommon/postgres.py | 1 | 11659 | #!/usr/bin/python
# Copyright (C) 2012-2015 ASTRON (Netherlands Institute for Radio Astronomy)
# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it and/or
# modify it under the terms of the GNU General ... | gpl-3.0 | 248,377,241,846,325,470 | 38.388514 | 137 | 0.560854 | false | 4.501544 | false | false | false |
MegaShow/college-programming | Homework/Principles of Artificial Neural Networks/Week 8 Object Detection/datasets.py | 1 | 2942 | import torch
from torch.utils.data import Dataset
import json
import os
from PIL import Image
from utils import transform
class PascalVOCDataset(Dataset):
"""
A PyTorch Dataset class to be used in a PyTorch DataLoader to create batches.
"""
def __init__(self, data_folder, split, keep_difficult=False)... | mit | -8,096,475,863,341,076,000 | 33.611765 | 125 | 0.616927 | false | 3.917443 | false | false | false |
jeffmurphy/cif-db | src/DB/Exploder/Indexer.py | 1 | 10137 | import syslog
from datetime import datetime
import time
import re
import sys
import threading
import happybase
import struct
import hashlib
import base64
sys.path.append('/usr/local/lib/cif-protocol/pb-python/gen-py')
import msg_pb2
import feed_pb2
import control_pb2
import RFC5070_IODEF_v1_pb2
import MAEC_v2_pb2
imp... | bsd-3-clause | -6,272,114,305,446,935,000 | 39.710843 | 191 | 0.494722 | false | 4.122407 | false | false | false |
Zen-CODE/kivy | kivy/core/clipboard/__init__.py | 1 | 3959 | '''
Clipboard
=========
Core class for accessing the Clipboard. If we are not able to access the
system clipboard, a fake one will be used.
Usage example::
>>> from kivy.core.clipboard import Clipboard
>>> Clipboard.get_types()
['TIMESTAMP', 'TARGETS', 'MULTIPLE', 'SAVE_TARGETS', 'UTF8_STRING',
'COMP... | mit | 7,110,245,703,573,393,000 | 28.766917 | 79 | 0.591816 | false | 3.896654 | false | false | false |
mscook/BanzaiDB | src/BanzaiDB/core.py | 1 | 12137 | # Copyright 2013 Mitchell Stanton-Cook Licensed under the
# Educational Community 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.osedu.org/licenses/ECL-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -6,192,113,771,092,387,000 | 39.188742 | 89 | 0.517673 | false | 4.037591 | false | false | false |
jaantollander/CrowdDynamics | crowddynamics/core/geometry.py | 1 | 4119 | """Functions for manipulating Shapely geometry objects
References:
- http://toblerity.org/shapely/manual.html
"""
from collections import Iterable
from functools import reduce
from itertools import chain
from typing import Callable
import numpy as np
import shapely.geometry as geometry
import skimage.draw
from sh... | gpl-3.0 | 8,994,286,143,035,750,000 | 29.511111 | 78 | 0.61714 | false | 3.373464 | false | false | false |
Riverscapes/pyBRAT | SupportingTools/BatchScripts/01_BatchInputPrep/07_MergePerennialCanals_Batch.py | 1 | 2133 | #----------------------------------------------------------------------------
# Name: Merge Perennial & Canals (Batch)
#
# Purpose: Merges perennial network and canals/ditches shapefile
#
# Date: March 2019
# Author: Maggie Hallerud
#---------------------------------------------------------------------------... | gpl-3.0 | -4,074,758,029,799,556,000 | 34.55 | 102 | 0.593999 | false | 3.56689 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.