repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rwl/openpowersystem | rdflib/syntax/serializers/PrettyXMLSerializer.py | 1 | 5434 | from rdflib import RDF
from rdflib import URIRef, Literal, BNode
from rdflib.util import first, uniq, more_than
from rdflib.Collection import Collection
from rdflib.syntax.serializers import Serializer
from rdflib.syntax.serializers.XMLWriter import XMLWriter
XMLLANG = "http://www.w3.org/XML/1998/namespacelang"
# T... | agpl-3.0 | -3,809,299,180,690,471,000 | 38.093525 | 98 | 0.568826 | false | 4.299051 | false | false | false |
drx/Feel2 | compression/nemesis.py | 1 | 2950 | import struct
from array import array
from compression.exceptions import *
def decompress(compressed):
pointer = {'value': 0}
compressed_array = array('B', compressed)
def get_next_byte():
try:
val = compressed_array[pointer['value']]
except Exception:
val = 0
... | mit | -1,277,434,155,256,452,600 | 33.302326 | 92 | 0.446441 | false | 3.516091 | false | false | false |
CristianCantoro/wikipedia-tags-in-osm | data_manager.py | 2 | 23836 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 Simone F. <groppo8@gmail.com>
#
# This file is part of wikipedia-tags-in-osm.
# wikipedia-tags-in-osm 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 Foun... | gpl-3.0 | -7,906,262,465,947,982,000 | 40.671329 | 160 | 0.588564 | false | 4.145391 | false | false | false |
QingChenmsft/azure-cli | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/commands.py | 3 | 4582 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | -4,060,854,216,882,857,500 | 57 | 98 | 0.640332 | false | 3.68328 | false | false | false |
GianlucaBortoli/krafters | configure_daemon_tester.py | 1 | 2955 | #!/usr/bin/python3.4
# Built only to test configure_daemon functionalities on localhost
from configure_daemon import CONFIGURE_DAEMON_PORT
from provisioner import get_free_random_port
import xmlrpc.client
import json
# some useful constants
RPC_PORT = 12345
CONFIG_FILE = './masterConfig.json'
CONSENSUS_ALGORITHM_POR... | mit | 888,205,660,552,234,100 | 35.95 | 87 | 0.568866 | false | 3.764331 | true | false | false |
deepmind/reverb | reverb/server.py | 1 | 12311 | # Lint as: python3
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | apache-2.0 | 8,171,492,533,242,523,000 | 35.96997 | 80 | 0.692308 | false | 4.31662 | false | false | false |
SalesforceFoundation/HEDAP | robot/EDA/resources/CourseConnectionsSettingsPageObject.py | 1 | 10504 | from BaseObjects import BaseEDAPage
from EDA import eda_lex_locators
from cumulusci.robotframework.pageobjects import BasePage
from cumulusci.robotframework.utils import selenium_retry, capture_screenshot_on_error
from cumulusci.robotframework.pageobjects import pageobject
import time
@pageobject("Course_Connections"... | bsd-3-clause | -1,842,284,271,724,475,400 | 56.398907 | 135 | 0.653751 | false | 4.122449 | false | false | false |
Patola/Cura | plugins/CuraDrive/src/DrivePluginExtension.py | 2 | 6852 | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
from datetime import datetime
from typing import Any, cast, Dict, List, Optional
from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal
from UM.Extension import Extension
from UM.Logger import Logg... | lgpl-3.0 | -7,449,819,115,755,287,000 | 41.296296 | 201 | 0.685347 | false | 3.974478 | false | false | false |
mikrosimage/rez | src/rezgui/widgets/VariantVersionsWidget.py | 7 | 7362 | from rezgui.qt import QtCore, QtGui
from rezgui.util import create_pane
from rezgui.widgets.VariantVersionsTable import VariantVersionsTable
from rezgui.widgets.PackageLoadingWidget import PackageLoadingWidget
from rezgui.widgets.ChangelogEdit import ChangelogEdit
from rezgui.mixins.ContextViewMixin import ContextViewM... | lgpl-3.0 | -4,467,730,771,627,623,000 | 37.747368 | 83 | 0.621434 | false | 4.250577 | false | false | false |
mpimenov/omim | tools/python/post_generation/inject_promo_ids.py | 4 | 4244 | import json
import logging
import os
import re
import sys
from multiprocessing import Pool
from mwm import Mwm
from mwm.ft2osm import read_osm2ft
class PromoIds(object):
def __init__(self, countries, cities, mwm_path, types_path, osm2ft_path):
self.countries = countries
self.cities = cities
... | apache-2.0 | -8,017,681,964,335,548,000 | 28.068493 | 86 | 0.553252 | false | 3.381673 | false | false | false |
batxes/4Cin | Six_mouse_models/Six_mouse_models_final_output_0.2_-0.1_11000/mtx1_models/Six_mouse_models22789.py | 4 | 18210 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 | -5,135,619,431,043,884,000 | 45.335878 | 70 | 0.699561 | false | 2.670871 | false | false | false |
nmillerns/tinygame | examples/tetris.py | 1 | 14592 | """
Tetris
"""
import sys
import random # use this module to get random next blocks
import copy # use this module to make copies of the canonical Tetrominos
sys.path.extend(['.', '..'])
import tinygame as tg
class Tetromino():
"""
Class representing the Tetromino, the basic unit of Tetris. See http://en.wikipedia.or... | mit | 6,801,221,743,495,665,000 | 44.31677 | 197 | 0.603961 | false | 3.148899 | false | false | false |
LukasWoodtli/PyMarkdownGen | PyMarkdownGen/Document.py | 1 | 6899 | # -*- coding: utf-8 -*-
"""This file contains the API for a Markdown
document. It's a simple Object Oriented API."""
__author__ = 'Lukas Woodtli'
from . import PyMarkdownGen as pmg
class Document(object):
"""This class represents a Markdown document.
Usually a document is saved in a single file.
"""
... | epl-1.0 | -1,653,295,796,460,268,800 | 23.727599 | 75 | 0.552834 | false | 4.261272 | false | false | false |
OpenTechFund/WebApp | opentech/public/funds/migrations/0007_add_rfp_models_for_public.py | 1 | 2232 | # Generated by Django 2.0.2 on 2018-08-03 09:31
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import opentech.public.funds.blocks
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.documents.blocks
import wagtail.embeds.blocks
import wagtail.imag... | gpl-2.0 | 4,459,865,204,156,309,000 | 33.338462 | 222 | 0.616039 | false | 4.342412 | false | false | false |
coreos/depot_tools | gclient.py | 1 | 74363 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Meta checkout manager supporting both Subversion and GIT."""
# Files
# .gclient : Current client configuration, written b... | bsd-3-clause | 2,911,591,898,175,784,400 | 38.179663 | 80 | 0.624679 | false | 3.857802 | true | false | false |
lucas-flowers/snutree | examples/custom/custom_module.py | 1 | 2077 | from itertools import product
from voluptuous import Schema, Required, Coerce
from snutree.utilities.voluptuous import NonEmptyString
from snutree.tree import Member
def to_Members(dicts, **conf):
Class.initialize_names(conf['start_year'], conf['last_year'] + 1)
yield from (SubMember.from_dict(dct) for dct in ... | gpl-3.0 | 670,979,471,503,119,100 | 25.320513 | 74 | 0.570872 | false | 3.415973 | false | false | false |
pansapiens/mytardis | tardis/tardis_portal/south_migrations/0023_object_acl_2.py | 3 | 20609 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.contrib.contenttypes import generic
class Migration(DataMigration):
def forwards(self, orm):
gfk = generic.GenericForeignKey('content_type', 'object_id')
gfk... | bsd-3-clause | 4,960,038,936,354,919,000 | 76.477444 | 182 | 0.551652 | false | 3.747772 | false | false | false |
huntxu/neutron-qos | neutron_qos/db/migration/alembic_migrations/qos_init_ops.py | 2 | 3487 | # Copyright (c) 2015 Eayun, 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 ... | apache-2.0 | 2,663,420,081,840,384,500 | 44.285714 | 78 | 0.641526 | false | 3.536511 | false | false | false |
ivanhorvath/openshift-tools | openshift/installer/vendored/openshift-ansible-3.9.40/roles/lib_openshift/src/class/oc_configmap.py | 46 | 6206 | # pylint: skip-file
# flake8: noqa
# pylint: disable=too-many-arguments
class OCConfigMap(OpenShiftCLI):
''' Openshift ConfigMap Class
ConfigMaps are a way to store data inside of objects
'''
def __init__(self,
name,
from_file,
from_literal,
... | apache-2.0 | -5,625,195,400,215,335,000 | 31.492147 | 102 | 0.529004 | false | 4.262363 | true | false | false |
pajlada/pajbot | pajbot/web/routes/base/pleblist.py | 2 | 4285 | import logging
from flask import redirect
from flask import render_template
from pajbot.managers.db import DBManager
from pajbot.models.pleblist import PleblistSong
from pajbot.models.stream import Stream
from pajbot.models.stream import StreamChunk
from pajbot.utils import find
from pajbot.web.utils import seconds_t... | mit | 5,104,762,135,558,962,000 | 41.85 | 119 | 0.565928 | false | 4.0197 | false | false | false |
ekumenlabs/terminus | terminus/city_generation_process.py | 1 | 6540 | """
Copyright (C) 2017 Open Source Robotics Foundation
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... | apache-2.0 | -8,111,413,562,373,880,000 | 42.892617 | 139 | 0.59159 | false | 4.139241 | false | false | false |
digideskio/lets-encrypt-preview | letsencrypt/tests/client_test.py | 1 | 5727 | """Tests for letsencrypt.client."""
import os
import unittest
import pkg_resources
import shutil
import tempfile
import configobj
import mock
from letsencrypt import account
from letsencrypt import configuration
from letsencrypt import le_util
KEY = pkg_resources.resource_string(
__name__, os.path.join("testdat... | apache-2.0 | -6,122,819,508,945,864,000 | 36.677632 | 79 | 0.659682 | false | 3.718831 | true | false | false |
supernifty/mgsa | mgsa/pipeline_test.py | 1 | 3135 |
#####################################
# Pipeline for evaluating an aligner
#
# requires a config file on the command line
# config file is of the form (all params optional):
# mult 1
# snp_prob 0.01
# insert_prob 0
# delete_prob 0
# max_insertion_len 1
# max_deletion_len 1
# see bio.Config for full list
# This file s... | mit | -6,184,723,678,736,409,000 | 40.25 | 250 | 0.639553 | false | 2.860401 | true | false | false |
aftab90/py-web-graph | setup.py | 1 | 1665 | #!/usr/bin/env python
from distutils.core import setup
from os import walk
from os.path import join
docs_src = 'docs/_build/html/'
docs_dst = 'docs/html'
doc_files = []
for dirpath, dirnames, filenames in walk( docs_src ):
if '.svn' in dirnames: dirnames.remove( '.svn' )
fs = []
for f in filenames:
if not f.star... | gpl-3.0 | -5,191,172,440,523,197,000 | 38.642857 | 89 | 0.703904 | false | 3.147448 | false | false | false |
flyte/static-future | tests/static_future/analysis/tests.py | 1 | 8894 | import __future__
import textwrap
import unittest
from static_future.analysis import future_imports, features, compiler_flags
class FutureImportsTests(unittest.TestCase):
def test_extract_single_future_import(self):
"""Extract a single import from __future__"""
code = textwrap.dedent("""\
... | unlicense | 3,249,068,098,769,832,000 | 39.986175 | 78 | 0.605127 | false | 4.66387 | true | false | false |
apporc/neutron | neutron/plugins/ml2/config.py | 1 | 3898 | # Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | -4,758,580,176,168,419,000 | 50.973333 | 79 | 0.568497 | false | 4.884712 | false | false | false |
danmergens/mi-instrument | mi/platform/test/test_node_mission_exec.py | 9 | 10489 | # #!/usr/bin/env python
#
# """
# @package ion.agents.platform.test.test_node_mission_exec
# @file ion/agents/platform/test/test_node_mission_exec.py
# @author Edward Hunter
# @brief Test cases for RSN node missions.
# """
#
# __author__ = 'Edward Hunter'
# __license__ = 'Apache 2.0'
#
# # bin/nosetests -sv --nol... | bsd-2-clause | 6,450,051,604,953,257,000 | 37.281022 | 157 | 0.620174 | false | 3.496333 | true | false | false |
ds-hwang/chromium-crosswalk | chrome/common/extensions/docs/server2/app_engine_handler.py | 37 | 1700 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import webapp2
from handler import Handler
from servlet import Request
class AppEngineHandler(webapp2.RequestHandler):
'''Top-level handl... | bsd-3-clause | 3,038,733,491,554,311,700 | 29.357143 | 74 | 0.648235 | false | 4.228856 | false | false | false |
eltoncarr/tubular | tubular/scripts/create_release_candidate.py | 1 | 7229 | #! /usr/bin/env python3
"""
Command-line script to create a release candidate for an application
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import io
from os import path
import sys
import logging
import datetime
import click
import yaml
# Add top-level module path to sys.path... | agpl-3.0 | 5,515,384,275,490,476,000 | 29.37395 | 119 | 0.588325 | false | 3.892838 | false | false | false |
rgbconsulting/rgb-addons | pos_receipt_custom/__openerp__.py | 2 | 1514 | # -*- coding: utf-8 -*-
##############################################################################
#
# POS Receipt Custom
# Copyright 2015 RGB Consulting, SL
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publishe... | agpl-3.0 | 5,213,111,532,060,544,000 | 30.541667 | 78 | 0.5786 | false | 4.005291 | false | false | false |
qedsoftware/commcare-hq | corehq/apps/app_manager/tests/test_form_versioning.py | 1 | 6203 | from django.test.testcases import TestCase, SimpleTestCase
from corehq.apps.app_manager.suite_xml import xml_models as suite_models
from corehq.apps.app_manager.models import Application, Module, Form, import_app, FormLink
from corehq.apps.app_manager.tests.util import add_build, patch_default_builds
from corehq.apps.b... | bsd-3-clause | 3,353,629,579,238,724,600 | 39.019355 | 212 | 0.615025 | false | 3.245945 | true | false | false |
frankyrumple/ope | laptop_credential/winsys/_lsa.py | 2 | 1896 | import win32security
from winsys import accounts, constants, core, exc, utils
__all__ = ['LogonSession', 'LSA', 'x_lsa']
class x_lsa (exc.x_winsys):
"Base for all LSA-related exceptions"
WINERROR_MAP = {
}
wrapped = exc.wrapper (WINERROR_MAP, x_lsa)
def principal (account):
try:
return accounts.principal (... | mit | -8,298,801,780,616,038,000 | 27.313433 | 88 | 0.652426 | false | 3.144279 | false | false | false |
mgharvey/misc_python | bin/dadi/xAndes_SeqCap.py | 1 | 1511 |
"""
File: xAndes.py
Author: Michael G. Harvey
Description: Run dadi 5x on fs from sequence capture data.
Usage: python xAndes_SeqCap.py
"""
import os, sys
import numpy
from numpy import array
import dadi
import matplotlib
import matplotlib.pyplot as plt
import demographic_models
for i in range(5):
dir = (... | bsd-3-clause | 4,695,190,023,512,581,000 | 24.627119 | 243 | 0.684977 | false | 2.505804 | false | false | false |
imperial-genomics-facility/data-management-python | igf_data/utils/tools/fastp_utils.py | 1 | 7263 | import os,subprocess,re
from shlex import quote,split
from igf_data.utils.fastq_utils import identify_fastq_pair
from igf_data.utils.fileutils import get_temp_dir,remove_dir,copy_local_file,check_file_path
class Fastp_utils:
'''
A class for running fastp tool for a list of input fastq files
:param fastp_exe: ... | apache-2.0 | -6,890,919,063,469,743,000 | 44.4 | 133 | 0.561751 | false | 3.917476 | false | false | false |
wanderknight/trading-with-python | cookbook/downloadVixFutures.py | 77 | 1313 | #-------------------------------------------------------------------------------
# Name: download CBOE futures
# Purpose: get VIX futures data from CBOE and save to user directory
#
#
# Created: 15-10-2011
# Copyright: (c) Jev Kuznetsov 2011
# Licence: GPL v2
#------------------------------... | bsd-3-clause | -2,706,961,337,495,714,300 | 29.309524 | 92 | 0.527037 | false | 3.446194 | false | false | false |
moddevices/mod-pacmanager | pacman/torrent.py | 1 | 7315 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, json, base64, shutil
from hashlib import md5
from . import crypto
from . import json_handler
class InvalidFile(Exception):
pass
class TorrentGenerator(object):
def __init__(self, path, piece_length=None):
self.path = path
if not pi... | gpl-3.0 | -3,847,380,387,590,523,000 | 29.995763 | 105 | 0.578674 | false | 3.969072 | false | false | false |
TD22057/T-Home | python/tHome/eagle/messages/__init__.py | 1 | 1629 | #===========================================================================
#
# RainForest Eagle XML messages
#
#===========================================================================
__doc__ = """Decodes Eagle XML messages.
One class per message type. Use the eagle.parse() function to do the
conversions.
"""
... | bsd-2-clause | -8,709,558,391,475,607,000 | 32.244898 | 76 | 0.590546 | false | 4.654286 | false | false | false |
becomejapan/yahooads-python-lib | examples/RetargetingListService/RetargetingListService_get.py | 1 | 8455 | # Copyright 2017 Become Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 8,422,585,450,293,923,000 | 31.898833 | 695 | 0.485038 | false | 3.910731 | false | false | false |
hiidef/hiiguid | setup.py | 1 | 1115 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setup script for hiiguid."""
from setuptools import setup, find_packages
from hiiguid import VERSION
version = '.'.join(map(str, VERSION))
# some trove classifiers:
# License :: OSI Approved :: MIT License
# Intended Audience :: Developers
# Operating System :: POSI... | mit | 5,828,967,210,849,858,000 | 24.930233 | 77 | 0.629596 | false | 3.729097 | false | false | false |
chirilo/kuma | vendor/packages/translate/storage/ini.py | 24 | 4064 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007,2009 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; e... | mpl-2.0 | 8,901,373,948,740,028,000 | 28.028571 | 121 | 0.628691 | false | 4 | false | false | false |
ktdreyer/teuthology | teuthology/orchestra/opsys.py | 10 | 4270 | import ast
import re
class OS(object):
"""
Class that parses either /etc/os-release or the output of 'lsb_release -a'
and provides OS name and version information.
Must be initialized with OS.from_lsb_release or OS.from_os_release
"""
__slots__ = ['name', 'version', 'codename', 'package_type... | mit | -3,078,823,574,975,193,000 | 28.047619 | 79 | 0.530445 | false | 3.964717 | false | false | false |
google/embedding-tests | models/albert/tokenization.py | 1 | 13558 | # coding=utf-8
# Copyright 2019 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 ... | apache-2.0 | -4,566,605,349,607,888,400 | 30.020595 | 80 | 0.642667 | false | 3.57301 | false | false | false |
tcalmant/demo-ipopo-qt | pc/details/compass.py | 1 | 11180 | #!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
Compass component
:author: Thomas Calmant
:copyright: Copyright 2013, isandlaTech
:license: GPLv2
:version: 0.1
:status: Alpha
"""
# Module version
__version_info__ = (0, 1, 0)
__version__ = ".".join(map(str, __version_info__))
# Documentation strings format
__do... | gpl-2.0 | 6,463,666,343,879,667,000 | 26.19708 | 80 | 0.520308 | false | 4.304197 | false | false | false |
zen/solar | examples/solar_agent/example.py | 3 | 2631 | import click
import sys
import time
from solar.core import resource
from solar.core import signals
from solar.core.resource import virtual_resource as vr
from solar.dblayer.model import ModelMeta
def run():
ModelMeta.remove_all()
node = vr.create('node', 'resources/ro_node', {'name': 'first' + str(time.time... | apache-2.0 | -8,121,679,400,637,279,000 | 42.131148 | 106 | 0.49981 | false | 4.091757 | false | false | false |
clay584/Harvester | Harvester/Harvester.py | 1 | 1522 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import csv
from devices.ciscoace import CiscoAce
def write_csv(header_row, data, filename):
'''Write list of tuples into CSV file.'''
# Open file
with open(filename, 'w') as out:
csv_out = csv.writer(out)
csv_out.writerow(head... | bsd-3-clause | -1,565,615,871,953,046,000 | 26.672727 | 74 | 0.604468 | false | 3.805 | false | false | false |
willre/homework | day24/madking/asset/migrations/0002_auto_20160501_0012.py | 1 | 21922 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-01 00:12
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('asset', '0001_initial'),
... | gpl-2.0 | -720,739,414,257,691,300 | 64.634731 | 406 | 0.581699 | false | 3.372097 | false | false | false |
affan2/django-follow | follow/templatetags/follow_tags.py | 1 | 6762 | from django import template
from django.core.urlresolvers import reverse
from django.contrib.contenttypes.models import ContentType
from follow.models import Follow
from follow import utils
import re
register = template.Library()
@register.tag
def follow_url(parser, token):
"""
Returns either a link to follo... | mit | -3,611,874,462,552,272,000 | 31.509615 | 120 | 0.637681 | false | 3.820339 | false | false | false |
Nyto035/Konza_backend | users/models.py | 1 | 13643 | import reversion
import datetime
import uuid
from django.db import models
from django.utils import timezone, encoding
from django.core.validators import (
validate_email, RegexValidator, ValidationError
)
from django.contrib.auth.models import make_password
from django.contrib.postgres.fields import ArrayField
fro... | mit | -5,332,630,558,054,048,000 | 32.68642 | 109 | 0.634758 | false | 4.1081 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/sysconfig.py | 1 | 20689 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: sysconfig.py
"""Provide access to Python's configuration information.
"""
import sys
import os
from os.path import pardir, realpath
_INSTALL_SCHEMES... | unlicense | 5,325,493,077,787,734,000 | 34.857886 | 114 | 0.511963 | false | 3.864214 | true | false | false |
tfheen/pglistener | starter.py | 1 | 1397 | #!/usr/bin/env python
# Postgres Listener, writes out flatfiles when SQL NOTIFYs are triggered
# Copyright (C) 2005 Rob Bradford <rob@robster.org.uk>
# Copyright (C) 2007-8 Robert McQueen <robert.mcqueen@bluelinux.co.uk>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of t... | gpl-2.0 | -5,140,741,210,245,399,000 | 31.488372 | 74 | 0.730136 | false | 3.725333 | true | false | false |
joodicator/PageBot | page/chanserv.py | 1 | 1107 | import channel
import util
import re
link, l_install, uninstall = util.LinkSet().triple()
EVICT_FILE = 'conf/chanserv_evict.txt'
PASSWORD_FILE = 'conf/chanserv_password.py'
def install(bot):
l_install(bot)
for chan in channel.track_channels.iterkeys():
evict_chanserv(bot, chan)
@link('OTHER_... | lgpl-3.0 | 6,142,526,387,084,734,000 | 26 | 72 | 0.635953 | false | 2.959893 | false | false | false |
DIRACGrid/DIRAC | tests/Integration/TornadoServices/Services/UserHandler.py | 2 | 1970 | """ Dummy Service is a service for testing new dirac protocol
This file must be copied in FrameworkSystem/Service to run tests
"""
from DIRAC.Core.Tornado.Server.TornadoService import TornadoService
from DIRAC import S_OK, gLogger
# You need to copy ../DB/UserDB in DIRAC/FrameworkSystem/DB
from DIRAC.FrameworkSystem... | gpl-3.0 | 2,843,859,333,423,916,500 | 24.25641 | 101 | 0.665482 | false | 3.543165 | false | false | false |
socialplanning/opencore | opencore/account/join.py | 1 | 10774 | """
Join Views
* normal join view
* separate pre-confirmed view for folks already invited to a project
"""
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile
from opencore.account import browser
from opencore.ac... | gpl-3.0 | 8,265,698,013,955,627,000 | 39.656604 | 190 | 0.606646 | false | 4.266931 | false | false | false |
bing-ads-sdk/BingAds-Python-SDK | bingads/v12/bulk/bulk_operation.py | 1 | 14933 | import time
import contextlib
import ssl
import requests
import zipfile
import os
import six
import sys
import shutil
from .bulk_operation_status import *
from .bulk_operation_progress_info import *
from .exceptions import *
from bingads.util import _PollingBlocker, errorcode_of_exception, ratelimit_retry_duration
fr... | mit | 9,050,992,145,092,073,000 | 38.821333 | 129 | 0.615683 | false | 4.583487 | false | false | false |
mikelum/pyspeckit | pyspeckit/wrappers/h2co_opfitter.py | 2 | 1730 | from __future__ import print_function
import numpy as np
try:
import astropy.io.fits as pyfits
except ImportError:
import pyfits
from ..spectrum import models
from . import fith2co
path_to_data = "/Users/adam/work/h2co/radex/troscompt_grid_March2012"
texgrid1 = pyfits.getdata(path_to_data+'/1-1_2-2_T=5to55_lv... | mit | -7,794,931,394,726,457,000 | 49.882353 | 102 | 0.682081 | false | 2.601504 | false | true | false |
kakarukeys/algo-fa | tests/miner/test_wsj.py | 1 | 4280 | import unittest
from unittest.mock import patch, MagicMock
import os.path
from fa.miner import wsj
from fa.miner.exceptions import SymbolError, ScrapingError, PreprocessingError
class TestWSJ(unittest.TestCase):
def test_get_report_url(self):
url = wsj._get_report_url("C6L.SI", "annual", "balance-sheet")... | gpl-2.0 | 7,257,568,967,015,779,000 | 52.5 | 125 | 0.644393 | false | 3.310131 | true | false | false |
vintasoftware/python-pagseguro | pagseguro/configs.py | 1 | 5223 | # coding: utf-8
import abc
class AbstractConfig(object):
__metaclass__ = abc.ABCMeta
@classmethod
def get(self, key, default=None):
return getattr(self, key, default)
@abc.abstractproperty
def BASE_URL(self):
return self._BASE_URL
@BASE_URL.setter
def B... | mit | -2,408,226,851,766,436,000 | 26.232432 | 81 | 0.639671 | false | 3.762968 | false | false | false |
achm6174/kaggle-physics-tau | semi_strong_model/semi_strong_ensemble.py | 1 | 4112 | """
@author: achm
Finding best ensemble of strong models using grid search, based on evaluation sets
"""
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier
import sys
import cPickle
import time
import copy
from sklearn.metrics import log_los... | mit | 434,840,488,962,141,900 | 29.630769 | 139 | 0.61284 | false | 3.150958 | true | false | false |
hachreak/cookiecutter-invenio-module | {{ cookiecutter.project_shortname }}/setup.py | 1 | 3390 | {% include 'misc/header.py' %}
"""{{ cookiecutter.description }}"""
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
readme = open('README.rst').read()
history = open('CHANGES.rst').read()
tests_require = [
'check-manifest>=0.25',
'cove... | gpl-2.0 | -2,848,478,070,673,071,600 | 27.016529 | 85 | 0.597345 | false | 3.721186 | true | false | false |
darxen/Gltk | src/examples/pytest.py | 2 | 1616 | #!/usr/bin/python
import gltk
from gltkdriver import GlutWindowDriver as WindowDriver
from OpenGL.GLU import *
from OpenGL.GL import *
class CustomWidget(gltk.Widget):
__gsignals__ = {"render": "override",
"size-request": "override"}
def do_size_request(self, size):
#FIXME siz... | gpl-3.0 | 5,178,286,080,980,016,000 | 22.764706 | 55 | 0.587252 | false | 3.352697 | false | false | false |
sborenst/ansible_agnostic_deployer | tools/archive/configs/RHCLS-ScalableInfra-demo/examples/common.py | 2 | 2568 | #!/usr/bin/env python
# A Ravello SDK example for creating and publishing applications from a blueprint
#
# Copyright 2011-2016 Ravello Systems, 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 L... | gpl-3.0 | 6,499,507,659,355,487,000 | 32.789474 | 97 | 0.676791 | false | 3.896813 | false | false | false |
flux-framework/flux-sched | src/cmd/flux-ion-R.py | 1 | 2409 | #!/bin/false
##############################################################
# Copyright 2021 Lawrence Livermore National Security, LLC
# (c.f. AUTHORS, NOTICE.LLNS, LICENSE)
#
# This file is part of the Flux resource manager framework.
# For details, see https://github.com/flux-framework.
#
# SPDX-License-Identifier: ... | gpl-2.0 | 7,093,076,267,536,581,000 | 22.38835 | 69 | 0.604815 | false | 3.666667 | false | false | false |
martinohanlon/PhilbinSS | philbinss/multiplexers.py | 1 | 3269 | from interfaces import Interface
from components import Split
from logicgates import Not, And, Not, Or
from mixins import InputAMixin, InputBMixin, InputCMixin, InputDMixin, OutputMixin, OutputAMixin, OutputBMixin, OutputCMixin, OutputDMixin
class TwoToOneMultiplexer(Interface, InputAMixin, InputBMixin, OutputMixin):
... | mit | -1,629,063,868,173,168,000 | 29.277778 | 138 | 0.588865 | false | 3.3946 | false | false | false |
frolv/xyzzy | xyzzy/pwgen.py | 1 | 1266 | #
# xyzzy/pwgen.py
# Copyright (C) 2017 Alexei Frolov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program... | gpl-3.0 | 8,154,986,953,830,181,000 | 30.65 | 73 | 0.7109 | false | 3.859756 | false | false | false |
boedy1996/SPARC | geonode/maps/urls.py | 1 | 4070 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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 versio... | gpl-3.0 | -3,159,580,514,517,918,700 | 45.781609 | 97 | 0.37543 | false | 4.74359 | false | false | false |
PhilippeGeek/CodINSALyon | LoLAI.py | 1 | 1851 | import sys
from base_ai import BaseAI
from command import MoveCommand
from command import LandCommand
from command import ExchangeResourcesCommand
from command import DropMilitarsCommand
from command import ExchangeResourcesCommand
from model import Base
from model import Coord
from model import Plane
from model.Base ... | gpl-3.0 | 4,996,927,441,139,783,000 | 28.380952 | 76 | 0.603998 | false | 3.377737 | false | false | false |
helicontech/zoo | Zoocmd/core/installer_apis/python.py | 1 | 1663 | # -*- coding: utf-8 -*-
import os
import os.path
import logging
class PythonApi(object):
"""
Helper class for installing python apps.
Instance with name 'python' is available in install_commands.
Example:
python.create_virtual_env()
"""
python_install_path = None
def __init__(self, ... | apache-2.0 | -167,571,810,657,881,000 | 32.26 | 112 | 0.607336 | false | 3.788155 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-batch/azure/batch/models/pool_statistics.py | 1 | 2175 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 8,970,364,790,397,221,000 | 38.545455 | 97 | 0.618851 | false | 4.215116 | false | false | false |
LaurentRDC/scikit-ued | skued/__main__.py | 1 | 1577 | # -*- coding: utf-8 -*-
"""
scikit-ued command-line utilities
"""
import argparse
import sys
from pathlib import Path
from crystals import Crystal
from . import __version__
from .io import WITH_PYQTGRAPH, diffshow
parser = argparse.ArgumentParser(
prog="skued", description=f"scikit-ued {__version__} command-line ... | mit | -2,952,187,195,663,846,000 | 28.203704 | 98 | 0.69182 | false | 3.54382 | false | false | false |
ivmech/iviny-scope | lib/xlsxwriter/test/styles/test_styles03.py | 1 | 3927 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ..helperfunctions import _xml_to_list
from ...styles import Styles
from ...workbook import Wo... | gpl-3.0 | -6,805,186,682,581,337,000 | 33.447368 | 118 | 0.440285 | false | 4.259219 | true | false | false |
MediaKraken/MediaKraken_Deployment | source/common/common_hardware_roku_network.py | 1 | 2584 | """
Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
... | gpl-3.0 | -2,899,622,256,567,514,600 | 30.901235 | 96 | 0.654799 | false | 3.317073 | false | false | false |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/pythonwin/pywin/Demos/objdoc.py | 17 | 1555 | # This is a sample file, and shows the basic framework for using an "Object" based
# document, rather than a "filename" based document.
# This is referenced by the Pythonwin .html documentation.
# In the example below, the OpenObject() method is used instead of OpenDocumentFile,
# and all the core MFC document open fu... | gpl-3.0 | 48,251,493,510,461,180 | 30.734694 | 84 | 0.726688 | false | 3.373102 | false | false | false |
maweigert/spimagine | spimagine/gui/glwidget.py | 1 | 30824 | #!/usr/bin/env python
"""
The rendering widget
It renderes a projection via the OpenCL (defined in volumerender.py)
into a texture which is drawn by simple OpenGL calls onto the canvas.
It should handle all user interaction via a transformation model.
author: Martin Weigert
email: mweigert@mpi-cbg.de
understandi... | bsd-3-clause | -7,044,877,459,076,589,000 | 32.179763 | 170 | 0.569621 | false | 3.607256 | false | false | false |
dhardtke/pyAssets | tests/test_definitions.py | 1 | 1786 | from unittest import TestCase
from mock import patch
from app.definitions import Definitions
class TestDefinitions(TestCase):
def setUp(self):
# create a basic Definitions object
self.definitions = Definitions()
def tearDown(self):
self.definitions.clear()
@patch("os.path", aut... | mit | -3,751,540,191,348,844,500 | 33.365385 | 124 | 0.637178 | false | 4.212264 | true | false | false |
planetA/interference | scripts/conf/planetaos_ampi.py | 1 | 3027 | import os
import socket
import manager
from .miniapp import Miniapp
class PlanetaOS_AMPI(manager.Machine):
def __init__(self, args):
base = "/home/desertfox/research/projects/ffmk/interference-bench/"
common_params = {
'nodes': (1,),
'schedulers': ("cfs",),
'a... | mit | 4,594,282,441,995,110,000 | 35.914634 | 106 | 0.443013 | false | 3.841371 | false | false | false |
omarkhan/opencraft | opencraft/settings.py | 1 | 11328 | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <xavier@opencraft.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | agpl-3.0 | 6,963,893,860,351,960,000 | 30.466667 | 110 | 0.592779 | false | 3.763455 | true | false | false |
Outernet-Project/outernet-csds | ra/outernet_facebook.py | 1 | 2967 | """ Outernet Facebook Page Adaptor
This adaptor collects requests from the Outernet Facebook Page dedicated to
content requests.
The module contains a single adaptor class: ``OuternetFacebookAdaptor``.
"""
from __future__ import unicode_literals, print_function
import datetime
import calendar
import facebook
from... | gpl-3.0 | 2,824,081,621,558,461,400 | 33.905882 | 78 | 0.633637 | false | 3.987903 | false | false | false |
mhugent/Quantum-GIS | python/plugins/processing/gui/MultipleFileInputDialog.py | 3 | 4613 | # -*- coding: utf-8 -*-
"""
***************************************************************************
MultipleExternalInputDialog.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
(C) 2013 by CS Systemes d'informatio... | gpl-2.0 | -5,573,092,014,218,080,000 | 40.936364 | 118 | 0.58682 | false | 4.364238 | false | false | false |
darcamo/pyphysim | apps/ia/simple_maxsinr_quantized.py | 1 | 10162 | #!/usr/bin/env python
"""module docstring"""
import numpy as np
import pyphysim.channels.multiuser
from pyphysim.ia import algorithms
from pyphysim.modulators import fundamental
from pyphysim.progressbar import ProgressbarText2
from pyphysim.util import misc
from pyphysim.util.conversion import dB2Linear
# noinspec... | gpl-2.0 | -2,959,550,998,246,060,500 | 32.537954 | 85 | 0.645345 | false | 3.537069 | false | false | false |
strands-project/aaf_deployment | aaf_walking_group/scripts/wait_for_participant.py | 4 | 1498 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
import actionlib
from std_srvs.srv import Empty, EmptyResponse
from aaf_walking_group.msg import EmptyAction
import strands_webserver.client_utils
class WaitForParticipant(object):
def __init__(self, name):
rospy.loginfo("Starting node: %s" % nam... | mit | -7,120,018,136,455,136,000 | 31.565217 | 99 | 0.607477 | false | 3.726368 | false | false | false |
kirankoduru/arachne-ui | helpers/extensions.py | 1 | 2003 | from scrapy import signals
from models.spiders import add_stats, get_spider
from helpers.database import ScrapyStats, db
from helpers.config_reader import SERVER_NAME
class StatsCollectorExt(object):
"""
Collect stats for each spider in DB
"""
def __init__(self, stats):
self.stats = stats
... | apache-2.0 | 3,625,195,268,859,494,400 | 33.534483 | 80 | 0.599101 | false | 4.207983 | false | false | false |
foospidy/DbDat | plugins/mysql/check_privilege_user_grantables.py | 1 | 1740 | class check_privilege_user_grantables():
"""
check_privilege_user_grantables:
Privileges the application account can grant.
"""
# References:
# http://dbadiaries.com/no-mysql-show-users-how-to-list-mysql-user-accounts-and-their-privileges
# http://www.java2s.com/Code/SQL/User-Permission/MySQ... | gpl-2.0 | -4,833,751,445,367,810,000 | 33.8 | 186 | 0.542529 | false | 3.866667 | false | false | false |
ppp2006/runbot_number0 | qbo_pymouth/src/qbo_pymouth.py | 2 | 8379 | #!/usr/bin/env python
import roslib; roslib.load_manifest('qbo_pymouth')
import rospy
import sys
import re
from qbo_arduqbo.msg import Mouth as Mouth_msg #Cambiar
#import MySQLdb
import sqlite3
import os
import types
def numberToMouthArray(shapeNumber):
#create shape array from string number
#shapeNumber = int... | lgpl-2.1 | -4,629,955,033,848,482,000 | 38.154206 | 123 | 0.583005 | false | 3.240139 | false | false | false |
Mec-iS/chronostriples-backup | main.py | 1 | 2642 | """
Main entrypoint for the chronostriples app.
Publishing at http://hypermedia.projectchronos.eu
FORKED FROM https://github.com/mr-niels-christensen/rdflib-appengine/blob/master/src/example/httpserver.py
"""
__author__ = ['niels', 'lorenzo']
import os
import sys
sys.path.insert(0, 'lib')
import webapp2
import urll... | apache-2.0 | -1,436,603,897,296,222,500 | 30.831325 | 106 | 0.6919 | false | 3.485488 | false | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/virtualrouter/pub_l3_vm/test_pub_vm_multi_nic.py | 2 | 1534 | '''
@author: FangSun
'''
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.test_util as test_util
from zstackwoodpecker.operations import net_operations as net_ops
test_stub = test_lib.lib_get_test_stub()
test_obj_dict = test_state.TestStateDict()... | apache-2.0 | 1,623,090,303,279,178,000 | 34.674419 | 144 | 0.6897 | false | 2.478191 | true | false | false |
infrae/moai | moai/provider/file.py | 1 | 1901 | import os
import time
import fnmatch
class FileBasedContentProvider(object):
"""Provides content by reading directories of files
Implements the :ref:`IContentProvider` interface
"""
def __init__(self, uri, content_filter="*"):
assert uri.startswith('file://'), 'unknown uri format'
path... | bsd-3-clause | -8,289,093,768,836,352,000 | 29.66129 | 62 | 0.516044 | false | 4.3903 | false | false | false |
mpetyx/pyapi-as-as-a-service | server/settings.py | 1 | 2339 | """
Django settings for server project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | mit | -9,046,547,985,734,253,000 | 24.703297 | 75 | 0.719538 | false | 3.341429 | false | false | false |
lino-framework/extjs6 | lino_extjs6/extjs/__init__.py | 1 | 7681 | # -*- coding: UTF-8 -*-
# Copyright 2009-2020 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""The Lino user interface based on ExtJS 6.
When your Lino application uses the ExtJS user interface, then you may
need a `commercial license from Sencha
<https://www.sencha.com... | bsd-2-clause | 1,225,445,600,392,326 | 40.518919 | 106 | 0.607343 | false | 3.547806 | false | false | false |
LaurentClaessens/mazhe | src_yanntricks/yanntricksQuelCote.py | 1 | 1174 | from yanntricks import *
def QuelCote():
pspict,fig = SinglePicture("QuelCote")
pspict.dilatation(2)
x=var('x')
f1=phyFunction(x+1/x+1)
f2=phyFunction(x+1/(2*x**2)+1)
llamI=-2
llamF=-0.7
llam = -1.2
curve=ParametricCurve(f1,f2).graph(llamI,llamF)
P=curve.get_point(llam)
nor... | gpl-3.0 | 7,336,821,878,687,355,000 | 32.542857 | 83 | 0.678876 | false | 2.546638 | false | false | false |
foxmask/django-th-ansible | roles/dummy/templates/django-th-dummy/th_dummy/my_dummy.py | 1 | 3111 | # coding: utf-8
# add here the call of any native lib of python like datetime etc.
{% if external_api %}
# add the python API here if needed
from {{ external_api }} import {{ external_api_class }}
{% endif %}
# django classes
{% if oauth_version %}
from django.conf import settings
{% endif %}
from django.core.cache im... | bsd-2-clause | 956,193,813,834,810,100 | 30.11 | 109 | 0.583735 | false | 4.003861 | false | false | false |
DolphinDream/sverchok | nodes/modifier_change/relax_mesh.py | 2 | 7151 | # This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
#
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
import bpy
from bpy.props import... | gpl-3.0 | -6,971,122,147,385,296,000 | 37.037234 | 135 | 0.56146 | false | 3.924808 | false | false | false |
richardfontana/corgi | corgi/__init__.py | 1 | 2192 |
import argparse
import email
import mimetypes
import os
from collections import namedtuple
from email import message
import idna
corgi_cfg = "config.yml"
alias_dict = {}
def get_arg_parser():
parser = argparse.ArgumentParser(prog = 'corgi')
parser.add_argument('-A', metavar='alias', nargs='+',
... | gpl-3.0 | 1,363,456,231,177,991,400 | 24.488372 | 84 | 0.542427 | false | 3.79896 | false | false | false |
cpsaltis/pythogram-core | src/gramcore/data/tests/test_arrays.py | 1 | 5818 | """Tests for module gramcore.data.arrays"""
import os
import numpy
from PIL import Image
from nose.tools import assert_equal, assert_almost_equal, raises
from gramcore.data import arrays
def setup():
"""Create array fixtures for test_load_*"""
arr = numpy.zeros((20, 10), dtype='float')
arr[10, 5] = 249.... | mit | -4,525,621,417,837,257,000 | 24.295652 | 77 | 0.609488 | false | 3.216142 | true | false | false |
leleobhz/phonetica | high_experimental/cepstrum_snack.py | 1 | 3388 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 distri... | gpl-2.0 | 1,719,045,758,020,403,200 | 29.8 | 96 | 0.682704 | false | 2.958952 | false | false | false |
KurtJacobson/hazzy | hazzy/modules/Operation/MDI/mdi.py | 2 | 5528 | #!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# <kurtcjacobson@gmail.com>
#
# This file is part of Hazzy.
#
# Hazzy 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 o... | gpl-2.0 | -1,663,516,391,895,701,800 | 37.657343 | 92 | 0.638929 | false | 3.608355 | false | false | false |
windprog/requestspool | requestspool/http.py | 1 | 1892 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2014 windpro
Author : windpro
E-mail : windprog@gmail.com
Date : 14/12/26
Desc : 发起http请求的相关方法和http信息
"""
import requests
from wsgiref.util import is_hop_by_hop
from . import config
from . import httpinfo
from .interface import BaseHttpInfo
... | mit | 8,352,488,766,715,544,000 | 30.586207 | 117 | 0.669214 | false | 3.306859 | false | false | false |
grbot/agd | richard/debug_findNovel_Variants/findNovelVariants_1.py | 1 | 1798 | import getopt
import sys
import vcf
pathLoc = None
outFName = None
options, args = getopt.getopt(sys.argv[1:], 'p:o:h')
for opt, par in options:
if opt == '-h':
print 'options:'
print '-h: print this help and exit'
print '-p: <pathLoc> specify path (path/) where vcf file is located'
... | mit | -7,242,670,244,032,631,000 | 35.714286 | 122 | 0.613459 | false | 2.981758 | false | false | false |
davy39/eric | Plugins/VcsPlugins/vcsMercurial/QueuesExtension/Ui_HgQueuesDefineGuardsDialog.py | 1 | 7094 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesDefineGuardsDialog.ui'
#
# Created: Tue Nov 18 17:53:57 2014
# by: PyQt5 UI code generator 5.3.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCor... | gpl-3.0 | 4,574,684,129,870,879,000 | 62.90991 | 146 | 0.760784 | false | 4.003386 | false | false | false |
bdestombe/flopy-1 | flopy/modflow/mfbcf.py | 1 | 16424 | import os
import sys
import numpy as np
from ..pakbase import Package
from ..utils import Util2d, Util3d
class ModflowBcf(Package):
"""
MODFLOW Block Centered Flow Package Class.
Parameters
----------
model : model object
The model object (of type :class:`flopy.modflow.M... | bsd-3-clause | -2,784,437,587,303,554,600 | 36.018519 | 88 | 0.488005 | false | 3.734425 | false | false | false |
akimtke/arke | python/serialDriver.py | 1 | 3654 | # -*- coding: utf-8 -*-
import serial
import time
class serialDriver(object):
def __init__(self, port, baud):
self.port = port
self.baud = baud
self.err = False
self.errMessage = ""
def open(self):
try:
self.ser = serial.Serial(self.port, self.baud, timeout... | gpl-3.0 | 481,909,005,009,079,040 | 29.198347 | 122 | 0.482485 | false | 4.505549 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.