repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
KenjiTakahashi/gayeogi | gayeogi/main.py | 1 | 18805 | # -*- coding: utf-8 -*-
# This is a part of gayeogi @ http://github.com/KenjiTakahashi/gayeogi/
# Karol "Kenji Takahashi" Woźniak © 2010 - 2012
#
# 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, ... | gpl-3.0 | 8,449,969,891,091,645,000 | 37.21748 | 78 | 0.5898 | false | 3.901037 | false | false | false |
dereknewman/cancer_detection | cube_writer.py | 1 | 5978 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 10 22:22:17 2017
@author: derek
"""
import numpy as np
import tensorflow as tf
def get_image_binary(filename):
image_cube = np.load(filename)
image_cube = np.asarray(image_cube,np.int16)
shape = np.array(image_cube.shape, np.int32)
... | mit | -6,577,436,787,872,455,000 | 39.120805 | 95 | 0.659752 | false | 3.423826 | false | false | false |
migueldiascosta/pymatgen-db | matgendb/vv/validate.py | 1 | 25272 | """
Collection validator
"""
__author__ = "Dan Gunter"
__copyright__ = "Copyright 2012-2013, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Dan Gunter"
__email__ = "dkgunter@lbl.gov"
__status__ = "Development"
__date__ = "1/31/13"
import pymongo
import random
import re
import sys
import collections
from... | mit | 5,023,407,409,135,420,000 | 33.809917 | 113 | 0.578585 | false | 4.292849 | false | false | false |
vfiebig/rpaas | rpaas/ssl_plugins/le_authenticator.py | 1 | 2219 | """RPAAS plugin."""
import logging
import pipes
import time
import zope.interface
from acme import challenges
from letsencrypt import interfaces
from letsencrypt.plugins import common
import rpaas
logger = logging.getLogger(__name__)
class RpaasLeAuthenticator(common.Plugin):
"""RPAAS Authenticator.
Th... | bsd-3-clause | 441,820,940,751,737,340 | 27.088608 | 76 | 0.638125 | false | 3.819277 | false | false | false |
lixiangning888/whole_project | modules/processing/procmemory.py | 1 | 4103 | # Copyright (C) 2010-2015 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import os
import struct
PAGE_NOACCESS = 0x00000001
PAGE_READONLY = 0x00000002
PAGE_READWRITE = 0x00000004
PAGE_WRITECOPY ... | lgpl-3.0 | 8,511,867,462,212,490,000 | 33.771186 | 144 | 0.528638 | false | 3.595968 | false | false | false |
inf0-warri0r/soccer_playing_ai | soccer_game.py | 1 | 9422 | """
Author : tharindra galahena (inf0_warri0r)
Project: soccer playing ai agents using finite state machines
Blog : http://www.inf0warri0r.blogspot.com
Date : 21/07/2013
License:
Copyright 2013 Tharindra Galahena
This is free software: you can redistribute it and/or modify it under
the terms of the GNU Gener... | gpl-3.0 | -226,032,285,302,610,240 | 31.944056 | 79 | 0.486945 | false | 3.208035 | false | false | false |
jerome-nexedi/dream | dream/plugins/UpdateWIP.py | 1 | 5830 | from copy import copy
from dream.plugins import plugin
import datetime
# XXX HARDCODED
MACHINE_TYPE_SET = set(["Dream.MachineJobShop", "Dream.MouldAssembly"])
class UpdateWIP(plugin.InputPreparationPlugin):
""" Input preparation
reads the data from external data base and updates the WIP
"""
def getWIPI... | gpl-3.0 | -1,498,681,226,819,017,000 | 48.837607 | 210 | 0.630703 | false | 4.289919 | false | false | false |
whitepyro/debian_server_setup | sickbeard/providers/thepiratebay.py | 1 | 15022 | # Author: Mr_Orange <mr_orange@hotmail.it>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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 Lic... | gpl-3.0 | 5,021,381,175,579,323,000 | 37.419437 | 143 | 0.569498 | false | 3.957323 | false | false | false |
edx/edx-enterprise | integrated_channels/degreed/exporters/learner_data.py | 1 | 3284 | # -*- coding: utf-8 -*-
"""
Learner data exporter for Enterprise Integrated Channel Degreed.
"""
from datetime import datetime
from logging import getLogger
from django.apps import apps
from integrated_channels.catalog_service_utils import get_course_id_for_enrollment
from integrated_channels.integrated_channel.expo... | agpl-3.0 | -1,071,006,453,224,120,000 | 45.253521 | 116 | 0.654385 | false | 4.605891 | false | false | false |
jaakkojulin/potku | Widgets/MatplotlibImportTimingWidget.py | 1 | 6288 | # coding=utf-8
'''
Created on 6.6.2013
Updated on 29.8.2013
Potku is a graphical user interface for analyzation and
visualization of measurement data collected from a ToF-ERD
telescope. For physics calculations Potku uses external
analyzation components.
Copyright (C) Timo Konu
This program is free software; you... | gpl-2.0 | 6,802,219,075,643,110,000 | 37.808642 | 111 | 0.561794 | false | 4.250845 | false | false | false |
yugangw-msft/azure-cli | src/azure-cli/azure/cli/command_modules/keyvault/security_domain/security_domain.py | 3 | 1632 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | 1,255,597,909,136,702,700 | 30.384615 | 94 | 0.505515 | false | 3.659193 | false | false | false |
zyga/schnibble | schnibble/arch/msp430/registers.py | 1 | 1087 | """MSP430 registers."""
class R0(object):
"""
Register 0, program counter.
Points to the next instruction to be executed.
Bit 0 is always unset.
"""
index = 0
class R1(object):
"""Register 1, stack pointer."""
index = 1
class R2(object):
"""Register 2, status."""
index = 2... | gpl-3.0 | -8,235,729,149,018,171,000 | 11.639535 | 50 | 0.538178 | false | 3.506452 | false | false | false |
us-ignite/us_ignite | us_ignite/actionclusters/forms.py | 1 | 4590 | from urlparse import urlparse, parse_qs
from django import forms
from django.contrib.auth.models import User
from django.core.validators import validate_email
from django.forms.models import inlineformset_factory
from django.utils import html
from us_ignite.actionclusters.models import (
ActionCluster,
Action... | bsd-3-clause | -1,189,987,755,096,135,400 | 31.785714 | 80 | 0.657516 | false | 4.051192 | false | false | false |
veteman/thepython2blob | polynom.py | 1 | 12360 | #Copyright 2015 B. Johan G. Svensson
#Licensed under the terms of the MIT license (see LICENSE).
'''
#Generic methods and wrappers
removeunused() Polynom only
copy()
degree()
iszero()
neg() Polynom only
#getcoeff/setcoeff - normally only for internal use
getcoeff(n)
setcoeff(n, val)
#Four bas... | mit | 6,761,289,637,767,737,000 | 29.611253 | 131 | 0.498463 | false | 3.693963 | false | false | false |
rackerlabs/django-DefectDojo | dojo/tools/nikto/parser.py | 2 | 5143 | __author__ = 'aaronweaver'
import re
from defusedxml import ElementTree as ET
import hashlib
from urllib.parse import urlparse
from dojo.models import Finding, Endpoint
class NiktoXMLParser(object):
def __init__(self, filename, test):
dupes = dict()
self.items = ()
if filename is None:... | bsd-3-clause | -7,994,457,130,637,868,000 | 38.561538 | 534 | 0.445849 | false | 4.036892 | false | false | false |
Alshain-Oy/Cloudsnake-Application-Server | code_examples/libHashRing_caps.py | 1 | 2782 | #!/usr/bin/env python
# Cloudsnake Application server
# Licensed under Apache License, see license.txt
# Author: Markus Gronholm <markus@alshain.fi> Alshain Oy
#import hashlib, bisect, copy
class HashRing( object ):
def __init__( self, replicas = 1, track_changes = False ):
self.replicas = replicas
self.ring =... | apache-2.0 | 5,255,672,477,656,797,000 | 21.435484 | 81 | 0.646298 | false | 2.978587 | false | false | false |
alirizakeles/tendenci | tendenci/apps/site_settings/context_processors.py | 1 | 3303 | from django.core.cache import cache
from django.conf import settings as d_settings
from django.template import Context, Template, TemplateDoesNotExist
from django.template.loader import get_template
from tendenci import __version__ as version
from tendenci.apps.site_settings.models import Setting
from tendenci.apps.si... | gpl-3.0 | -9,005,293,677,698,286,000 | 33.768421 | 98 | 0.598244 | false | 3.979518 | false | false | false |
DantestyleXD/MVM5B_BOT | plugins/msg.py | 1 | 1336 | # -*- coding: utf-8 -*-
from config import *
print(Color(
'{autored}[{/red}{autoyellow}+{/yellow}{autored}]{/red} {autocyan} msg.py importado.{/cyan}'))
@bot.message_handler(commands=['msg'])
def command_msg(m):
cid = m.chat.id
uid = m.from_user.id
try:
send_udp('msg')
except Exception ... | gpl-2.0 | 4,006,866,989,434,939,000 | 32.325 | 99 | 0.458365 | false | 3.622283 | false | false | false |
mysociety/pombola | pombola/core/management/merge.py | 1 | 5929 | # This base class is to make it easier to write management commands
# for merging object in Pombola (e.g. Person and Organisation at the
# moment).
from optparse import make_option
import sys
from django.contrib.contenttypes.models import ContentType
from django.core.management.base import BaseCommand, CommandError
f... | agpl-3.0 | -3,477,062,285,332,210,000 | 39.333333 | 86 | 0.580368 | false | 4.395107 | false | false | false |
leesdolphin/rentme | swagger/__main__.py | 1 | 22084 | import asyncio
import json
from pprint import pprint as pp
import re
from urllib.parse import urljoin
import aioutils.aiohttp
import aiohttp
import bs4
from bs4 import BeautifulSoup
import more_itertools
from aioutils.task_queues import SizeBoundedTaskList
from .parse_types import load_enum_into_item, parse_type_form... | agpl-3.0 | 2,496,726,057,175,298,600 | 32.865031 | 190 | 0.526404 | false | 3.992767 | false | false | false |
boudewijnrempt/HyvesDesktop | 3rdparty/socorro/scripts/config/commonconfig.py | 1 | 1521 | import socorro.lib.ConfigurationManager as cm
import datetime
databaseHost = cm.Option()
databaseHost.doc = 'the hostname of the database servers'
databaseHost.default = '127.0.0.1'
databaseName = cm.Option()
databaseName.doc = 'the name of the database within the server'
databaseName.default = 'socorro'
databaseUse... | gpl-2.0 | -4,978,995,620,722,430,000 | 34.372093 | 91 | 0.78238 | false | 3.504608 | false | false | false |
andarms/pyweek22 | bulletml/collision.py | 1 | 3119 | """Simple collision check.
This module provides simple collision checking appropriate for
shmups. It provides routines to check whether two moving circles
collided during the past frame.
An equivalent C-based version will be used automatically if it was
compiled and installed with the module. If available, it will be... | mit | -1,800,408,118,301,877,000 | 26.848214 | 75 | 0.621994 | false | 3.34298 | false | false | false |
linuxwhatelse/pyloader | tests/test_dlable.py | 1 | 1916 | from context import pyloader
import os
import json
import unittest
_current = os.path.dirname(os.path.abspath(__file__))
paths = {
'writable': os.path.join(_current, 'downloads', 'write_access'),
'not_writable': os.path.join(_current, 'downloads', 'no_write_access')
}
class TestDLable(unittest.TestCase):
... | gpl-3.0 | 8,621,170,405,861,588,000 | 23.564103 | 74 | 0.529749 | false | 4.138229 | true | false | false |
ingfy/FisherSimulation | gui/worldmap.py | 1 | 7210 | import wx
import math
from BufferedCanvas import BufferedCanvas
def gradient(min_color, max_color, fraction):
return tuple(a + (b - a) * fraction for a, b in zip(min_color, max_color))
class WorldMap(BufferedCanvas):
min_vote_color = (0, 128, 0)
max_vote_color = (128, 0, 0)
def __init__(se... | mit | -2,952,585,843,266,592,300 | 36.983784 | 92 | 0.468932 | false | 3.234634 | false | false | false |
rrader/cdr-tools | generator/cdrgen/test.py | 1 | 8689 | import csv
from io import StringIO
import numpy as np
from sklearn.cluster import MiniBatchKMeans, KMeans
from cdrgen.generate import CDRStream
from cdrgen.sources import UniformSource, UserProfileSource, UserProfile, UserProfileChangeBehaviorSource
from cdrgen.utils import asterisk_like, csv_to_cdr, time_of_day, day_o... | mit | -7,144,471,955,658,401,000 | 35.154812 | 119 | 0.600579 | false | 3.181149 | true | false | false |
TOCyna/tabelinha | flask/lib/python2.7/site-packages/flask_wtf/recaptcha/widgets.py | 32 | 1798 | # -*- coding: utf-8 -*-
from flask import current_app, Markup
from flask import json
JSONEncoder = json.JSONEncoder
RECAPTCHA_HTML = u'''
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="g-recaptcha" data-sitekey="%(public_key)s"></div>
<noscript>
<div style="width: 302px; height: 352px;"... | gpl-2.0 | 6,034,015,994,903,162,000 | 33.576923 | 85 | 0.603448 | false | 3.444444 | false | false | false |
audax/kll | funcparserlib/lexer.py | 5 | 4412 | # -*- coding: utf-8 -*-
# Copyright (c) 2008/2013 Andrey Vlasovskikh
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, ... | gpl-3.0 | 1,815,964,259,012,011,500 | 32.172932 | 80 | 0.538985 | false | 3.471282 | false | false | false |
crazystick/py-hub-ctrl | hub_ctrl.py | 1 | 8063 | #! /usr/bin/python2
"""
hub_ctrl.py - a tool to control port power/led of USB hub
Copyright (C) 2006, 2011 Free Software Initiative of Japan
Author: NIIBE Yutaka <gniibe@fsij.org>
This file is a part of Gnuk, a GnuPG USB Token implementation.
Gnuk is free software: you can redistribute it and/or modify it
under t... | gpl-2.0 | 7,415,764,359,881,032,000 | 31.643725 | 119 | 0.488776 | false | 3.675023 | false | false | false |
guillaume-florent/aoc-utils | aocutils/fixes.py | 1 | 5033 | # coding: utf-8
r"""Fixing methods for shapes, faces, tolerance, continuity and
curve resampling
"""
import logging
# import ast
from OCC.Core.GCPnts import GCPnts_UniformDeflection
from OCC.Core.GeomAbs import GeomAbs_C2
from OCC.Core.GeomAbs import GeomAbs_C0, GeomAbs_C1 # dynamically built code
from OCC.Core.Ge... | lgpl-3.0 | 7,753,895,359,617,903,000 | 28.781065 | 79 | 0.667197 | false | 3.577114 | false | false | false |
tw-ddis/tweet_parser | tweet_parser/getter_methods/tweet_links.py | 1 | 4932 | # Copyright 2018 Twitter, Inc.
# Licensed under the MIT License
# https://opensource.org/licenses/MIT
from tweet_parser.tweet_checking import is_original_format
def get_tweet_links(tweet):
"""
Get the links that are included in the Tweet as "urls"
(if there are no links in the Tweet, this returns an empty... | mit | 8,992,743,042,978,524,000 | 41.153846 | 147 | 0.589011 | false | 3.898814 | false | false | false |
chuckSMASH/django-geohashing | geohashing/views.py | 1 | 1055 | """
API views for the geohashing app
"""
import datetime
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from .models import Day
from . import serializers
@api_view(['GET',])
def get_geohash(request, year, month, day, format=None):
""... | mit | -2,380,809,722,700,656,000 | 26.763158 | 75 | 0.688152 | false | 3.808664 | false | false | false |
arbenson/mrtsqr | dumbo/hyy-python-hadoop/examples/TestText.py | 1 | 1261 | #!/usr/bin/env python
# ========================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF l... | bsd-2-clause | -4,914,641,547,376,163,000 | 35.028571 | 74 | 0.694687 | false | 4.245791 | false | false | false |
nickfishman/autobahn-tests | pubsub/server.py | 1 | 1277 | import argparse
import sys
from twisted.python import log
from twisted.internet import reactor
from twisted.web.server import Site
from twisted.web.static import File
from autobahn.websocket import listenWS
from autobahn.wamp import WampServerFactory, \
WampServerProtocol
parser = argparse.... | mit | 2,841,313,547,885,588,500 | 31.769231 | 128 | 0.732185 | false | 3.617564 | false | false | false |
gsi-upm/SmartSim | smartbody/data/examples/GazeDemo.py | 1 | 4382 | print "|--------------------------------------------|"
print "| Starting Gaze Demo |"
print "|--------------------------------------------|"
# Add asset paths
scene.addAssetPath('mesh', 'mesh')
scene.addAssetPath("script", "behaviorsets")
scene.addAssetPath('motion', 'ChrBrad')
scene.ad... | apache-2.0 | 9,040,150,471,584,670,000 | 31.19697 | 113 | 0.693063 | false | 2.5083 | false | false | false |
ccubed/EvenniaGames | FSuns/server/conf/settings.py | 1 | 5190 | """
Evennia settings file.
The full options are found in the default settings file found here:
{settings_default}
Note: Don't copy more from the default file than you actually intend to
change; this will make sure that you don't overload upstream updates
unnecessarily.
"""
# Use the defaults from Evennia unless ex... | mit | -3,653,495,970,787,921,400 | 32.057325 | 87 | 0.634682 | false | 3.509128 | false | false | false |
frankosan/pypers | pypers/steps/utils/split.py | 1 | 2381 | import os
from pypers.core.step import CmdLineStep
from pypers.utils import utils
class Split(CmdLineStep):
spec = {
"name": "split",
"version": "1.0",
"descr": [
"Splits an input file in several chuncks"
],
"args":
{
"inputs": [
... | gpl-3.0 | 2,558,659,611,822,990,300 | 29.922078 | 100 | 0.409492 | false | 4.297834 | false | false | false |
dsibournemouth/autoweka | scripts/boxplot.py | 2 | 2652 | #!/usr/bin/python
import argparse
import os
import sqlite3
import sys
import matplotlib as mpl
mpl.use('Agg')
mpl.rc('font', family='Liberation Serif')
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import rcParams
from pylab import *
from collections import OrderedDict
from config import *
def ... | gpl-3.0 | -6,118,261,727,262,887,000 | 28.797753 | 99 | 0.556184 | false | 3.569314 | false | false | false |
google-aai/tf-serving-k8s-tutorial | testing/estimator_eager_example.py | 1 | 1165 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -6,809,092,252,593,347,000 | 33.264706 | 74 | 0.747639 | false | 3.770227 | false | false | false |
douzepouze/django-markdown-tag | setup.py | 1 | 1405 | #!/usr/bin/env python
import sys
import os
from setuptools import setup, find_packages
_top_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(_top_dir, "lib"))
try:
import markdown_tag
finally:
del sys.path[0]
README = open(os.path.join(_top_dir, 'README.md')).read()
setup(name... | mit | -2,465,374,674,965,124,600 | 32.404762 | 116 | 0.66144 | false | 3.597436 | false | false | false |
homhei/glance | glance/utils/memcached.py | 1 | 1958 | #!/usr/bin/env python
#encode=utf-8
#vim: tabstop=4 shiftwidth=4 softtabstop=4
#Created on 2013-8-17
#Copyright 2013 nuoqingyun xuqifeng
import datetime
import calendar
import time
from oslo.config import cfg
memcache_opts = [
cfg.ListOpt('memcached_servers',
default=['127.0.0.1:11211'],
... | apache-2.0 | -6,917,844,398,799,297,000 | 25.821918 | 86 | 0.578141 | false | 3.673546 | false | false | false |
darvelo/chime | test/unit/app.py | 1 | 149653 | # -- coding: utf-8 --
from __future__ import absolute_import
from unittest import main, TestCase
from tempfile import mkdtemp
from os.path import join, exists, dirname, isdir, abspath, sep
from urlparse import urlparse, urljoin
from os import environ, mkdir
from shutil import rmtree, copytree
from re import search, s... | bsd-3-clause | -1,849,253,213,281,568,800 | 54.81523 | 542 | 0.620662 | false | 3.973453 | true | false | false |
Yipit/excellent | excellent/backends/xl_backend.py | 1 | 4473 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright <2013> Gabriel Falcao <gabriel@yipit.com>
# Copyright <2013> Suneel Chakravorty <suneel@yipit.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... | gpl-3.0 | 1,392,645,152,268,931,300 | 35.072581 | 103 | 0.646546 | false | 3.666393 | false | false | false |
GabrielBrascher/cloudstack | test/integration/component/test_ldap_auto_import.py | 3 | 22445 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 5,542,287,763,679,164,000 | 36.533445 | 98 | 0.573624 | false | 4.434894 | true | false | false |
bzhou26/leetcode_sol | p102_Binary_Tree_Level_Order_Traversal.py | 1 | 1201 | '''
- Leetcode problem: 102
- Difficulty: Medium
- Brief problem description:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree [3,9,20,null,null,15,7],
3
/ \
9 20
/ \
15 7
return its level order t... | mit | -3,779,501,425,278,980,000 | 19.016667 | 117 | 0.537885 | false | 3.511696 | false | false | false |
bardin-lab/readtagger | readtagger/cli/plot_coverage.py | 1 | 1420 | import click
from matplotlib.style import available
from readtagger.plot_coverage import plot_coverage_in_regions
from readtagger import VERSION
@click.command('Plot relative coverage for alignment files.')
@click.option('-f',
'--file',
type=(str, str, int),
multiple=True,
... | mit | -8,497,225,324,329,508,000 | 33.634146 | 74 | 0.575352 | false | 4.045584 | false | false | false |
metacloud/python-troveclient | troveclient/utils.py | 1 | 8166 | # 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 | 6,266,213,611,314,955,000 | 27.652632 | 78 | 0.600906 | false | 3.977594 | false | false | false |
Sylvermyst-Technologies/BreezyNS | src/pycfdmesh/mesh.py | 1 | 13794 | '''
This file is a part of BreezyNS - a simple, general-purpose 2D airflow calculator.
Copyright (c) 2013, Brendan Gray
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | mit | -9,068,800,193,180,801,000 | 38.1875 | 119 | 0.600623 | false | 4.330926 | false | false | false |
shepdelacreme/ansible | lib/ansible/modules/cloud/scaleway/scaleway_server_facts.py | 48 | 6590 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# 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 | 9,159,558,939,065,263,000 | 33.684211 | 113 | 0.511836 | false | 3.298298 | false | false | false |
TheMOOCAgency/edx-platform | lms/djangoapps/instructor/views/instructor_dashboard.py | 1 | 52741 | """
Instructor Dashboard Views
"""
import logging
import datetime
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
import uuid
import pytz
import json
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_POST,require_GET
from djang... | agpl-3.0 | -3,936,923,478,577,118,700 | 39.632512 | 278 | 0.628012 | false | 3.861829 | false | false | false |
gdimitris/ChessPuzzlerBackend | Virtual_Environment/lib/python2.7/site-packages/sqlalchemy/engine/base.py | 49 | 79380 | # engine/base.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import with_statement
"""Defines :class:`.Connection` and :class:`.En... | mit | -5,926,298,786,782,750,000 | 36.197751 | 84 | 0.589242 | false | 4.764992 | false | false | false |
QuantConnect/Lean | Algorithm.Python/EmaCrossFuturesFrontMonthAlgorithm.py | 3 | 3852 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licen... | apache-2.0 | -205,375,199,850,199,550 | 41.8 | 100 | 0.671859 | false | 3.987578 | false | false | false |
ActiveState/code | recipes/Python/578296_Treat_Win32_Registry_like_Pythdict__pure/recipe-578296.py | 1 | 7506 | # From the recipe at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/573466
# A backwards compatible enhancement has been made to allow full access to registry types still through the dictionary metaphor
# converted to use _winreg instead of Win32 API from PyWin32
"""Slightly magical Win32api Registry -> Dicti... | mit | 2,110,155,171,997,337,300 | 30.940426 | 127 | 0.555156 | false | 4.172318 | false | false | false |
danmergens/mi-instrument | mi/instrument/wetlabs/fluorometer/flord_d/test/test_driver.py | 4 | 19945 | """
@package mi.instrument.wetlabs.fluorometer.flord_d.test.test_driver
@file marine-integrations/mi/instrument/wetlabs/fluorometer/flort_d/driver.py
@author Tapana Gupta
@brief Test cases for flord_d driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/test_driver
$ bin/test_driv... | bsd-2-clause | -6,637,229,697,888,127,000 | 46.375297 | 110 | 0.620857 | false | 4.218486 | true | false | false |
gajim/gajim | gajim/common/modules/bits_of_binary.py | 1 | 6373 | # Copyright (C) 2018 Emmanuel Gil Peyrot <linkmauve AT linkmauve.fr>
#
# This file is part of Gajim.
#
# Gajim 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; version 3 only.
#
# Gajim is distributed in the ho... | gpl-3.0 | 107,577,102,495,828,690 | 30.240196 | 77 | 0.577279 | false | 3.809325 | false | false | false |
sql-viewer/SQLGlimpse | sqlviewer/urls.py | 1 | 2544 | """untitled URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | gpl-2.0 | -6,223,715,915,570,532,000 | 52 | 157 | 0.692217 | false | 3.061372 | false | false | false |
demisto/content | Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3_test.py | 1 | 1261 | # -*- coding: iso-8859-1 -*-
import base64
from MailListener_POP3 import parse_mail_parts
def test_parse_mail_parts():
"""
Given
- Email data
When
- Email contains special characters
Then
- run parse_mail_parts method
- Validate The result body.
"""
class MockEmailPart:
... | mit | 4,606,614,345,251,001,300 | 22.792453 | 71 | 0.63521 | false | 3.74184 | true | false | false |
mardix/Webmaster | webmaster/app-skel/templates/advanced/views.py | 1 | 3244 | """
Webmaster: Your Application's View
"""
from webmaster import (View, flash, abort, session, request, url_for,
redirect, flash_data, get_flashed_data)
from webmaster.decorators import (route, menu, template, plugin, methods,
render_as_json, render_as_xml,
... | mit | -4,195,237,211,000,279,000 | 30.192308 | 96 | 0.527744 | false | 4.268421 | false | false | false |
Lugoues/beets-lyrics | beetsplug/lyrics/engines/engine_cdmi.py | 1 | 1070 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Filename: engine_cdmi.py
import engine,urllib2,urllib,re
class cdmi(engine.engine):
def __init__(self,proxy,locale=None):
engine.engine.__init__(self,proxy,locale)
self.netEncoder='utf8'
def request(self,artist,title):
url = '%s - %s' % (str(unicode(artist,s... | mit | -794,352,447,713,741,300 | 27.157895 | 113 | 0.652336 | false | 2.729592 | false | false | false |
IRIM-Technology-Transition-Lab/ur_cb2 | ur_cb2/receive/cb2_receive.py | 1 | 19023 | """A module to receive data from UR CB2 robots."""
# The MIT License (MIT)
#
# Copyright (c) 2016 GTRC.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including witho... | mit | -9,197,845,572,874,843,000 | 43.76 | 80 | 0.585449 | false | 4.433232 | false | false | false |
hilgroth/fiware-IoTAgent-Cplusplus | tests/e2e_tests/common/user_steps.py | 1 | 17001 | from iotqautils.gtwRest import Rest_Utils_SBC
from common.gw_configuration import CBROKER_URL,CBROKER_HEADER,CBROKER_PATH_HEADER,IOT_SERVER_ROOT,DEF_ENTITY_TYPE,MANAGER_SERVER_ROOT
from lettuce import world
iotagent = Rest_Utils_SBC(server_root=IOT_SERVER_ROOT+'/iot')
iota_manager = Rest_Utils_SBC(server_root=MAN... | agpl-3.0 | -420,944,151,459,074,800 | 45.761236 | 199 | 0.529792 | false | 4.273756 | false | false | false |
thanhphat11/android_kernel_xiaomi_msm8996 | toolchains/aarch64-linux-gnu/libc/lib/libstdc++.so.6.0.20-gdb.py | 6 | 2599 | # -*- python -*-
# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# 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 versio... | gpl-2.0 | 6,082,350,582,808,913,000 | 42.316667 | 186 | 0.725279 | false | 3.53125 | false | false | false |
riggsd/davies | examples/compass_cumulative_mileage.py | 1 | 1086 | #!/usr/bin/env python
"""
Print cumulative survey footage over a project's history
"""
import sys
import os.path
from collections import Counter
from davies.compass import *
def print_cumulative_footage(datfiles):
total = 0.0 # miles
monthly_stats = Counter() # feet per month
cumulative_s... | mit | 1,601,293,054,113,382,000 | 29.166667 | 83 | 0.619705 | false | 3.415094 | false | false | false |
Rob-van-B/CarbonFoodweb | OwnRothC/PLOT/plot.py | 1 | 3692 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ploty.py
#
# Copyright 2016 rob <rob@Novu>
#
# 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... | gpl-2.0 | -1,941,707,459,599,803,100 | 30.288136 | 94 | 0.616197 | false | 2.999188 | false | false | false |
ifduyue/sentry | src/sentry/api/endpoints/organization_release_file_details.py | 4 | 5867 | from __future__ import absolute_import
import posixpath
from rest_framework import serializers
from rest_framework.exceptions import PermissionDenied
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint
from sent... | bsd-3-clause | 8,733,847,621,237,979,000 | 33.715976 | 91 | 0.613261 | false | 5.070873 | false | false | false |
seecr/meresco-components | test/log/logfileservertest.py | 1 | 4301 | # -*- coding: utf-8 -*-
## begin license ##
#
# "Meresco Components" are components to build searchengines, repositories
# and archives, based on "Meresco Core".
#
# Copyright (C) 2006-2011 Seek You Too (CQ2) http://www.cq2.nl
# Copyright (C) 2006-2011, 2020 Stichting Kennisnet https://www.kennisnet.nl
# Copyright (C) ... | gpl-2.0 | -4,408,019,703,212,857,000 | 45.247312 | 108 | 0.683562 | false | 3.513889 | true | false | false |
selentd/pythontools | pytools/src/IndexEval/evalresult.py | 1 | 8460 | '''
Created on 21.10.2015
@author: selen00r
'''
class ExcludeTransaction:
'''
Base class for strategies to exclude transactions while calculating results from the transaction history
'''
def exclude(self, idxData):
return False
class ExcludeAvg200Low(ExcludeTransaction):
def __init__(se... | apache-2.0 | 7,615,614,308,887,554,000 | 30.449814 | 130 | 0.623759 | false | 3.900415 | false | false | false |
ciarams87/CloudTools | CloudTools.py | 1 | 2133 | #!/usr/bin/env python
"""
This is a console-driven menu program for management of some AWS and OpenStack cloud services
"""
import time
from Menu_Option_1 import menu_1
from Menu_Option_2 import menu_2
from Menu_Option_3 import menu_3
from Menu_Option_4 import menu_4
from Menu_Option_5 import menu_5
def... | gpl-3.0 | -3,578,840,255,257,954,000 | 26.065789 | 93 | 0.596812 | false | 3.652397 | false | false | false |
itfoundry/hindkit | lib/hindkit/__init__.py | 1 | 2210 | import os, sys, functools, shutil, errno
def relative_to_interpreter(path):
return os.path.join(os.path.dirname(sys.executable), path)
def relative_to_package(path):
return os.path.join(__path__[0], path)
def relative_to_cwd(path):
return os.path.join(os.getcwd(), path)
def memoize(obj):
memoized = ... | mit | -2,916,077,420,419,986,000 | 28.078947 | 219 | 0.639819 | false | 3.646865 | false | false | false |
mikefullerton/Piecemeal-Scripts | Scripts/utils/repo.py | 1 | 2971 | #!/usr/bin/python
# begin boilerplate
import sys
import os
scriptName = os.path.basename(sys.argv[0])
scriptPath = os.path.dirname(sys.argv[0])
sharedPath = os.path.join(scriptPath, "../shared/")
sys.path.append(os.path.abspath(sharedPath))
import Pieces
import GitHelper
import Scripts
import Utils
#end boilerplat
... | mit | -900,394,647,457,741,800 | 19.783217 | 260 | 0.628745 | false | 3.180942 | false | false | false |
rcatwood/Savu | savu/plugins/filters/raven_filter.py | 2 | 3483 | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | gpl-3.0 | 6,595,525,374,976,213,000 | 34.540816 | 78 | 0.645134 | false | 3.298295 | false | false | false |
manhtuhtk/mlpy | mlpy/dimred.py | 1 | 24673 | ## This code is written by Davide Albanese, <albanese@fbk.eu>.
## (C) 2011 mlpy Developers.
## 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 op... | unlicense | -3,130,848,422,209,936,400 | 28.233412 | 79 | 0.545657 | false | 3.715813 | false | false | false |
ccapudev/django-padlock | padlock/middleware.py | 1 | 4658 | # -*- coding: utf-8 -*-
from uuid import uuid4
from django.conf import settings
from django import http
from django.contrib.auth.views import logout_then_login
from django.core.urlresolvers import reverse, reverse_lazy
from django.core.exceptions import ImproperlyConfigured
try:
from django.utils.deprecation imp... | gpl-3.0 | -8,411,344,404,613,324,000 | 30.673469 | 91 | 0.734751 | false | 3.087533 | false | false | false |
osm-fr/osmose-backend | plugins/TagFix_MultipleTag_Lang_es.py | 4 | 3001 | #-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Frédéric Rodrigo 2014 ##
## ... | gpl-3.0 | -7,155,217,066,608,390,000 | 38.933333 | 129 | 0.451753 | false | 4.470149 | false | false | false |
tropo/tropo-webapi-python | samples/gh-25.conference.py | 1 | 1720 | #!/usr/bin/env python
"""
Hello world script for Session API ( https://www.tropo.com/docs/webapi/sessionapi.htm )
Upon launch, it will trigger a message to be sent via Jabber to the addess specified in
'number'.
"""
# Sample application using the itty-bitty python web framework from:
# http://github.com/toastdriven/... | mit | 4,612,223,179,358,499,000 | 38.090909 | 124 | 0.719186 | false | 3.017544 | false | false | false |
napalm-automation/napalm-yang | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/__init__.py | 1 | 26641 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | apache-2.0 | -742,716,316,089,213,000 | 39.860429 | 418 | 0.5719 | false | 4.205367 | true | false | false |
googleapis/googleapis-gen | google/cloud/dialogflow/v2/dialogflow-v2-py/tests/unit/gapic/dialogflow_v2/test_conversation_profiles.py | 1 | 98122 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 4,401,206,355,911,624,000 | 40.020903 | 249 | 0.675027 | false | 4.193069 | true | false | false |
alphagov/notifications-utils | notifications_utils/template.py | 1 | 28788 | import math
from abc import ABC, abstractmethod
from datetime import datetime
from functools import lru_cache
from html import unescape
from os import path
from jinja2 import Environment, FileSystemLoader
from markupsafe import Markup
from notifications_utils import LETTER_MAX_PAGE_COUNT, SMS_CHAR_COUNT_LIMIT
from no... | mit | -2,500,035,368,561,753,600 | 30.313384 | 120 | 0.59975 | false | 4.16575 | false | false | false |
maciekswat/Twedit | Plugins/CC3DMLHelper/adhesionflexdlg.py | 1 | 2715 | import re
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import PyQt4.QtCore as QtCore
import ui_adhesionflexdlg
import sys
import string
MAC = "qt_mac_set_native_menubar" in dir()
class AdhesionFlexDlg(QDialog,ui_adhesionflexdlg.Ui_AdhesionFlexDlg):
#signals
# gotolineSignal = QtCore.py... | gpl-3.0 | 7,394,871,278,212,216,000 | 31.518519 | 143 | 0.579742 | false | 4.151376 | false | false | false |
rochefort-lab/fissa | fissa/roitools.py | 1 | 14357 | """
Functions used for ROI manipulation.
Authors:
- Sander W Keemink <swkeemink@scimail.eu>
"""
from __future__ import division
import numpy as np
from past.builtins import basestring
from skimage.measure import find_contours
try:
from collections import abc
except ImportError:
import collections as abc... | gpl-3.0 | -5,895,978,743,753,075,000 | 28.724638 | 85 | 0.594135 | false | 3.746608 | false | false | false |
mefly2012/platform | src/clean_validate/qylogo.py | 1 | 3122 | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from common import public
class qylogo():
"""中标"""
need_check_ziduan = [
u'key',
u'_id',
u'data_source',
u'bbd_version',
u'bbd_url',
u'rawdata',
u'bbd_uptime',
u'c... | apache-2.0 | 3,653,252,823,672,933,400 | 20.25 | 55 | 0.483737 | false | 2.931034 | false | false | false |
Mir4r/ProjectMimir | MTFconfig.py | 1 | 2323 | #Collection of operations on the MTF config
#2015, K Schweiger
import os
import sys
import sharedfunctions
#returns a list. With following entrys:
#0: A list with specs that should be printed
def configreader(workdir):
lines = sharedfunctions.readFile(workdir, 'MTF.cfg')
config = {}
for line in lines:
... | mit | 5,431,476,628,116,495,000 | 37.081967 | 89 | 0.50409 | false | 4.032986 | true | false | false |
PalNilsson/pilot2 | pilot/user/atlas/resource/manytoone.py | 1 | 2447 | #!/usr/bin/env python
# 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
#
# Authors:
# - Paul Nilsson, paul.nilsson@cern.ch, 2019
import os
# from p... | apache-2.0 | 2,694,031,994,876,218,000 | 32.986111 | 110 | 0.682877 | false | 3.701967 | false | false | false |
google/ci_edit | app/log.py | 1 | 5614 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 4,760,439,883,177,038,000 | 22.588235 | 84 | 0.59031 | false | 3.386007 | false | false | false |
ackalker/ocrfeeder | src/ocrfeeder/feeder/documentGeneration.py | 1 | 18043 | # -*- coding: utf-8 -*-
###########################################################################
# OCRFeeder - The complete OCR suite
# Copyright (C) 2009 Joaquim Rocha
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | gpl-3.0 | 8,515,736,416,175,934,000 | 39.913832 | 276 | 0.59458 | false | 3.725583 | false | false | false |
goyoregalado/OMSTD | examples/develop/io/001/io-001-s1.py | 2 | 3626 | # -*- coding: utf-8 -*-
"""
Project name: Open Methodology for Security Tool Developers
Project URL: https://github.com/cr0hn/OMSTD
Copyright (c) 2014, cr0hn<-AT->cr0hn.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ... | bsd-2-clause | -69,709,552,672,010,790 | 37.574468 | 755 | 0.636514 | false | 4.487624 | false | false | false |
mattjmorrison/logilab-common-clone | test/unittest_decorators.py | 1 | 4634 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | gpl-2.0 | -9,145,041,881,857,837,000 | 34.374046 | 82 | 0.56107 | false | 3.801477 | true | false | false |
LTS5/connectomeviewer | cviewer/plugins/codeoracle/actions.py | 1 | 11325 | import logging
from apptools.io.api import File
from pyface.api import FileDialog, OK
from pyface.action.api import Action
from traits.api import Any
from cviewer.plugins.text_editor.editor.text_editor import TextEditor
from cviewer.plugins.ui.preference_manager import preference_manager
# Logging imports
import log... | bsd-3-clause | 8,568,969,510,888,972,000 | 30.545961 | 88 | 0.586402 | false | 3.857289 | false | false | false |
ninjasftw/libertyproxybeat | vendor/github.com/elastic/beats/packetbeat/tests/system/test_0053_amqp_channel_error.py | 11 | 1528 | from packetbeat import BaseTest
class Test(BaseTest):
def test_amqp_channel_error(self):
self.render_config_template(
amqp_ports=[5672],
)
self.run_packetbeat(pcap="amqp_channel_error.pcap",
debug_selectors=["amqp,tcp,publish"])
... | apache-2.0 | 7,701,928,987,731,056,000 | 37.179487 | 90 | 0.537958 | false | 3.537037 | false | false | false |
janusnic/creator | creator/macro.py | 2 | 20924 | # Copyright (C) 2015 Niklas Rosenstein
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | mit | 8,583,543,912,065,867,000 | 28.142061 | 79 | 0.654034 | false | 3.986283 | false | false | false |
netroby/vitess | test/queryservice_tests/cases_framework.py | 9 | 7554 | import ast
import json
import os
import re
import time
import urllib2
import environment
import framework
import utils
def cases_iterator(cases):
for case in cases:
if isinstance(case, MultiCase):
for c in case:
yield c
else:
yield case
class Log(object):
def __init__(self, line):
... | bsd-3-clause | -104,220,655,460,630,460 | 31.843478 | 114 | 0.631454 | false | 3.568257 | false | false | false |
ursky/metaWRAP | bin/metawrap-scripts/binning_refiner.py | 1 | 13714 | #!/usr/bin/env python2.7
# Copyright (C) 2017, Weizhi Song, Torsten Thomas.
# songwz03@gmail.com
# t.thomas@unsw.edu.au
# Binning_refiner is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version... | mit | 2,044,512,113,421,620,700 | 41.722741 | 158 | 0.645545 | false | 3.061844 | false | false | false |
mobarski/sandbox | kv/kcv_x1_test.py | 1 | 5709 | import unittest
from kcv_x1 import KCV
def pairs(text,dlm=' ',dlm2=':',cast=str):
for row in text.split(dlm):
cols = row.split(dlm2)
yield cols[0],cast(cols[1])
class test_memory_kcv(unittest.TestCase):
def setUp(self):
pass
#self.db = KCV()
#self.db.set_items('k1',pairs('a:3 b:1 c:2 d:0 e:5 f:4'))
#... | mit | -4,320,885,981,795,332,000 | 26.713592 | 85 | 0.60501 | false | 2.191555 | true | false | false |
uchicago-voth/cgmap | test/molecular_map_test/same_molecules_shared_map_naive_com/test_same_molecules_shared_map_naive_com.py | 1 | 2338 | #!/usr/bin/env python2
import sys
sys.path.append('../../../src/')
import cgmap as cg
import mdtraj as md
import md_check as check
############################### config #####################################
input_traj = "dppc.trr"
input_top = "dppc.pdb"
input_maps = ["mapping_bead_1_dppc",
"mapping_... | apache-2.0 | -9,123,794,050,362,970,000 | 30.594595 | 80 | 0.557742 | false | 3.34 | false | false | false |
seims/SEIMS | preprocess/build_db.py | 2 | 5586 | #! /usr/bin/env python
# coding=utf-8
# Import all model parameters and spatial datasets to MongoDB
# Author: Junzhi Liu
# Revised: Liang-Jun Zhu
#
from pymongo import MongoClient
from pymongo.errors import ConnectionFailure
from gridfs import *
from config import *
from find_sites import FindSites
from gen_subbasins... | gpl-2.0 | 4,762,656,225,364,247,000 | 37.510345 | 119 | 0.668517 | false | 3.337717 | true | false | false |
Azure/azure-sdk-for-python | sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py | 1 | 321292 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | -1,920,390,849,565,047,300 | 40.975699 | 517 | 0.657248 | false | 4.012915 | true | false | false |
noironetworks/group-based-policy | gbpservice/neutron/services/grouppolicy/drivers/cisco/apic/aim_mapping.py | 1 | 110494 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | -2,766,098,963,838,720,500 | 43.806975 | 85 | 0.58033 | false | 3.867348 | false | false | false |
rudolfbyker/cart-converters | parse_rs_email.py | 1 | 1219 | #!/usr/bin/env python2
import sys
import os
import unicodecsv as csv
input_filename = sys.argv[1]
output_filename = os.path.splitext(input_filename)[0] + ".csv"
start = False
lines = []
items = []
header = [
"Unit price",
"Qty",
"RS Stock No.",
"Manufacturer Part Number",
"Manufacturer",
"Desc... | mit | 8,708,309,153,482,511,000 | 22.901961 | 76 | 0.548811 | false | 3.376731 | false | false | false |
gulopine/steel | examples/images/bmp.py | 1 | 1701 | import steel
COMPRESSION_TYPES = (
(0, 'No compression'),
(1, '8-bit RLE'),
(2, '4-bit RLE'),
(3, 'Bit Field'),
(4, 'JPEG'), # Generally not supported for screen display
(5, 'PNG'), # Generally not supported for screen display
)
class PaletteColor(steel.Structure):
blue = ... | bsd-3-clause | 8,662,351,827,459,457,000 | 34.978261 | 82 | 0.634333 | false | 3.092727 | false | false | false |
samba-team/samba | python/samba/tests/gpo.py | 1 | 82209 | # Unix SMB/CIFS implementation. Tests for smb manipulation
# Copyright (C) David Mulder <dmulder@suse.com> 2018
#
# 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,... | gpl-3.0 | -4,109,212,890,846,621,000 | 43.150913 | 96 | 0.578379 | false | 3.672504 | true | false | false |
Motwani/firefox-ui-tests | firefox_ui_tests/functional/security/test_safe_browsing_notification.py | 3 | 6433 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import time
from marionette_driver import By, expected, Wait
from firefox_puppeteer.testcases import FirefoxTestCase
... | mpl-2.0 | 7,661,383,468,471,206,000 | 45.615942 | 96 | 0.609358 | false | 3.988221 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.