repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ltowarek/rpi-dehumidifier | rpi-dehumidifier.py | 1 | 1035 | import time
import lcddriver
import RPi.GPIO as GPIO
from Adafruit_BME280 import BME280, BME280_OSAMPLE_8
RELAY_PIN = 21
LIMIT = 60
try:
GPIO.setmode(GPIO.BCM)
GPIO.setup(RELAY_PIN, GPIO.OUT)
lcd = lcddriver.lcd()
while True:
sensor = BME280(mode=BME280_OSAMPLE_8)
degrees = sensor.r... | gpl-2.0 | 7,420,419,066,889,055,000 | 24.875 | 63 | 0.608696 | false | 2.982709 | false | false | false |
ajrbyers/paywallwatch | src/blog/views.py | 1 | 1718 | from django.shortcuts import redirect, render, get_object_or_404
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from blog import models
from blog import forms
# Create your views here.
@login... | gpl-2.0 | 8,025,140,357,845,172,000 | 23.197183 | 80 | 0.715367 | false | 3.235405 | false | false | false |
zestrada/nova-cs498cc | nova/network/api.py | 1 | 22070 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2013 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apa... | apache-2.0 | -876,188,785,188,179,500 | 40.407129 | 79 | 0.603761 | false | 4.255688 | false | false | false |
philterphactory/prosthetic-runner | gaeauth/backends.py | 1 | 1594 | from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.backends import ModelBackend
from google.appengine.api import users
class GoogleAccountBackend(ModelBackend):
"""
backend for authentication via Google Accounts on Google
App Engine
A Django auth.co... | mit | 494,470,673,728,323,100 | 30.88 | 64 | 0.564617 | false | 4.786787 | false | false | false |
yetone/script-manager | script_manager/compat/__init__.py | 1 | 2603 | __author__ = 'yetone'
import sys
import inspect
from collections import OrderedDict
PY2 = sys.version_info[0] == 2
if not PY2:
text_type = str
izip = zip
def iteritems(dict):
return iter(dict.items())
else:
text_type = unicode
from itertools import izip
def iteritems(dict):
... | mit | -3,799,375,042,173,222,000 | 27.922222 | 76 | 0.542451 | false | 4.029412 | false | false | false |
all-umass/graphs | graphs/construction/incremental.py | 1 | 1809 | from __future__ import absolute_import
import numpy as np
from sklearn.metrics import pairwise_distances
from graphs import Graph
__all__ = ['incremental_neighbor_graph']
def incremental_neighbor_graph(X, precomputed=False, k=None, epsilon=None,
weighting='none'):
'''See neighbor_g... | mit | 130,368,169,209,905,540 | 27.714286 | 80 | 0.60199 | false | 3.218861 | false | false | false |
rosenvladimirov/addons | product_margin_classification_bg/models/purchase.py | 1 | 3601 | # -*- coding: utf-8 -*-
#
#
# Copyright 2017 Rosen Vladimirov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any l... | agpl-3.0 | 5,857,277,351,039,150,000 | 40.872093 | 136 | 0.600944 | false | 3.782563 | false | false | false |
psiinon/addons-server | src/olympia/constants/applications.py | 1 | 5984 | import re
from django.utils.translation import ugettext_lazy as _
from .base import (
ADDON_DICT, ADDON_EXTENSION, ADDON_LPAPP, ADDON_PLUGIN,
ADDON_SEARCH, ADDON_STATICTHEME, ADDON_THEME)
from olympia.versions.compare import version_int as vint
class App(object):
@classmethod
def matches_user_agent... | bsd-3-clause | 8,852,225,759,784,380,000 | 31 | 78 | 0.643382 | false | 3.105345 | false | false | false |
ardi69/pyload-0.4.10 | pyload/plugin/hoster/DebridItaliaCom.py | 1 | 1486 | # -*- coding: utf-8 -*-
import re
from pyload.plugin.internal.MultiHoster import MultiHoster
class DebridItaliaCom(MultiHoster):
__name = "DebridItaliaCom"
__type = "hoster"
__version = "0.17"
__pattern = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+'
__config = [("use_premium", "... | gpl-3.0 | -7,252,663,072,103,607,000 | 35.243902 | 98 | 0.502692 | false | 3.480094 | false | false | false |
timopulkkinen/BubbleFish | tools/telemetry/telemetry/core/chrome/browser_backend.py | 1 | 7157 | # 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.
import urllib2
import httplib
import socket
import json
import re
import sys
from telemetry.core import util
from telemetry.core import exceptions
from ... | bsd-3-clause | 5,739,832,004,754,966,000 | 32.759434 | 80 | 0.685203 | false | 3.962901 | false | false | false |
justanothercoder/LSTM-Optimizer-TF | optimizees/booth.py | 1 | 1578 | import numpy as np
import tensorflow as tf
from . import optimizee
class Booth(optimizee.Optimizee):
name = 'booth'
def __init__(self, low=2, high=10):
super(Booth, self).__init__()
self.low = low
self.high = high
def get_x_dim(self):
return self.dim
def build(self... | mit | 8,666,483,127,483,528,000 | 26.206897 | 88 | 0.507605 | false | 3.017208 | false | false | false |
caulagi/py-ras | test/test_slogan_manager.py | 1 | 2519 | """
Tests for interaction with db for slogans
"""
import asyncio
import asyncpg
from asynctest import TestCase, ignore_loop
from server.const import connection_url
from server.slogan_manager import SloganManager
from server.util import random_string
class SloganManagerTest(TestCase):
@classmethod
def setUp... | mit | 8,327,923,591,910,263,000 | 32.586667 | 96 | 0.608972 | false | 3.709867 | true | false | false |
bobisjan/django-shanghai | shanghai/mixins/dispatcher.py | 1 | 2174 | import sys
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from shanghai.http import HttpResponseNotImplemented
from shanghai.utils import setattrs
class DispatcherMixin(object):
def action_not_implemented(self):
return HttpResponseNotImplemented()
def resolve... | mit | 7,950,718,102,252,483,000 | 25.839506 | 79 | 0.599356 | false | 4.148855 | false | false | false |
peterwilletts24/Python-Scripts | plot_scripts/EMBRACE/plot_from_pp_interp_p_levs_temp_geop_sp_hum_the_rest.py | 1 | 13214 | """
Load pp, plot and save
8km difference
"""
import os, sys
#%matplotlib inline
#%pylab inline
import matplotlib
matplotlib.use('Agg')
# Must be before importing matplotlib.pyplot or pylab!
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcParams
from mpl_to... | mit | -485,869,482,436,297,540 | 35.910615 | 163 | 0.517179 | false | 3.536938 | false | false | false |
helixyte/TheLMA | thelma/repositories/rdb/mappers/labisorequest.py | 1 | 2209 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Lab ISO request mapper.
"""
from sqlalchemy.orm import relationship
from everest.repositories.rdb.utils import mapper
from thelma.entities.experiment import... | mit | 4,018,588,075,209,770,500 | 43.18 | 80 | 0.615663 | false | 4.382937 | false | false | false |
carquois/blobon | blobon/punns/management/commands/sample_utils.py | 1 | 4481 | #!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | mit | 4,576,329,098,788,045,000 | 32.691729 | 78 | 0.743807 | false | 3.862931 | false | false | false |
nagisa/Feeds | trifle/utils/sqlite.py | 1 | 2461 | from gi.repository import GLib, GObject
import os
import sqlite3
import logging
import threading
import queue
logger = logging.getLogger('trifle')
from trifle.utils import const, async, get_data_path
class SQLite(threading.Thread):
def __init__(self, *args, **kwargs):
super(SQLite, self).__init__()
... | gpl-2.0 | -3,084,343,001,645,565,000 | 31.381579 | 70 | 0.567249 | false | 3.833333 | false | false | false |
sbuss/TigerShark | tigershark/facade/enums/common.py | 1 | 146273 | quantity_qualifier = {
"01": "Discrete Quantity",
"02": "Cumulative Quantity",
"03": "Discreet Quantity - Rejected Material",
"04": "Discrete Quantity - Rejected Material: Disposition Replacement",
"05": "Discrete Quantity - Rejected Material: Disposition Credit",
"06": "Discrete Quantity - Reje... | bsd-3-clause | -3,367,867,814,516,382,700 | 36.845537 | 79 | 0.616177 | false | 3.238421 | false | false | false |
matthiaskramm/corepy | examples/spu_write_mbox.py | 1 | 3062 | # Copyright (c) 2006-2009 The Trustees of Indiana University.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without ... | bsd-3-clause | 5,050,079,665,438,841,000 | 43.376812 | 80 | 0.610059 | false | 4.368046 | false | false | false |
ATNF/askapsdp | Tools/Dev/epicsdb/askapdev/epicsdb/sphinxext.py | 1 | 7822 | """
:class:`EpicsDbDirective` implements the ``epicsdb`` -directive.
"""
import os, sys, re
import encodings
from docutils.parsers.rst import Directive, directives
from docutils import nodes, utils
from sphinx import addnodes
from sphinx.locale import _
#TODO handle expand keyword
def normalize_ref(text):
ret = ... | gpl-2.0 | 576,053,415,792,885,570 | 33.008696 | 116 | 0.520967 | false | 4.10173 | false | false | false |
WikiWatershed/gwlf-e | gwlfe/MultiUse_Fxns/Runoff/CNumImpervReten.py | 1 | 2166 | from numpy import repeat
from numpy import tile
from numpy import where
from numpy import zeros
from gwlfe.Input.LandUse.NLU import NLU
from gwlfe.Input.WaterBudget.Water import Water, Water_f
from gwlfe.Memoization import memoize
from gwlfe.MultiUse_Fxns.Runoff.CNI import CNI, CNI_f
from gwlfe.MultiUse_Fxns.Runoff.CN... | apache-2.0 | 2,952,450,171,647,139,300 | 45.085106 | 111 | 0.564635 | false | 2.566351 | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/organization.py | 1 | 5006 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/Organization) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class Organization(domainresource.DomainResource):
""" A grouping of people or organizations with a common... | bsd-3-clause | 6,798,010,589,699,098,000 | 38.109375 | 103 | 0.621055 | false | 4.489686 | false | false | false |
goord/ece2cmor3 | ece2cmor3/components.py | 1 | 1721 | import os
import logging
# Logger instance
log = logging.getLogger(__name__)
table_file = "table_file"
realms = "realms"
# List of components, used to determine the script arguments and used by task loader.
# Add your NEWCOMPONENT to this dictionary if you want to extend ece2cmor3 to more models.
models = {"ifs": {r... | apache-2.0 | -4,729,310,459,605,378,000 | 51.151515 | 146 | 0.524114 | false | 3.106498 | false | false | false |
4Kaylum/Steamfront | steamfront/client.py | 1 | 4423 | from requests import get as _get
from .app import App as _App
from .user import User as _User
from .errors import AppNotFound as _AppNotFound
from .errors import MissingArguments as _MissingArguments
class Client(object):
'''
Provides a client for you to get apps, users, and other miscellania with.
:para... | mit | 6,877,528,099,360,987,000 | 37.46087 | 173 | 0.620393 | false | 3.935053 | false | false | false |
goldhand/onegreek | onegreek/old.comments/moderation.py | 1 | 13491 | """
A generic comment-moderation system which allows configuration of
moderation options on a per-model basis.
To use, do two things:
1. Create or import a subclass of ``CommentModerator`` defining the
options you want.
2. Import ``moderator`` from this module and register one or more
models, passing the model... | bsd-3-clause | 898,591,411,687,910,100 | 36.789916 | 132 | 0.663924 | false | 4.518084 | false | false | false |
vjFaLk/frappe | frappe/core/doctype/prepared_report/prepared_report.py | 1 | 2876 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import base64
import json
import frappe
from frappe.model.document import Document
from frappe.utils.background_jobs import enqueue
from frappe.... | mit | -1,897,790,314,647,639,300 | 30.26087 | 105 | 0.749305 | false | 3.351981 | false | false | false |
babyliynfg/cross | tools/project-creator/Python2.6.6/Lib/test/test_extcall.py | 1 | 7096 | # -*- coding: utf-8 -*-
"""Doctest for method/function calls.
We're going the use these types for extra testing
>>> from UserList import UserList
>>> from UserDict import UserDict
We're defining four helper functions
>>> def e(a,b):
... print a, b
>>> def f(*a, **k):
... ... | mit | -570,431,911,954,967,740 | 23.159574 | 77 | 0.475828 | false | 3.36575 | true | false | false |
fedora-conary/conary | conary/deps/deps.py | 1 | 63625 | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | -5,890,892,836,971,758,000 | 33.151906 | 95 | 0.590365 | false | 4.10908 | false | false | false |
ecdavis/pantsmud | test/pantsmud/driver/test_command_manager.py | 1 | 7606 | import mock
import string
from unittest import TestCase
from pantsmud.driver.command import CommandManager
class TestCommandManagerAdd(TestCase):
def setUp(self):
self.func = lambda: None
self.name = "test"
self.command_manager = CommandManager(self.name)
def test_command_exists_after... | apache-2.0 | -848,871,119,468,146,700 | 42.215909 | 141 | 0.671444 | false | 3.717498 | true | false | false |
Stanford-Legal-Tech-Design/legaltech-rapidpro | temba/formax.py | 2 | 1690 | from django.core.urlresolvers import resolve
from django.http import HttpResponseRedirect
from django.template import RequestContext, loader
import time
from orgs.context_processors import user_group_perms_processor
from django.conf import settings
class FormaxMixin(object):
def derive_formax_sections(self, form... | agpl-3.0 | -1,518,895,608,231,386,400 | 32.8 | 84 | 0.630178 | false | 3.967136 | false | false | false |
obicho/ebook | tests/test_txt_index.py | 1 | 1704 | import unittest
from TxtReader import TxtReader
from TxtIndex import TxtIndex
class TestTxtIndex(unittest.TestCase):
def setUp(self):
fh = open('sense.txt')
self.index = TxtIndex(fh)
def testStopWordsAreExcluded(self):
self.assertEquals(None, self.index.get_pointers('a'))
def test... | apache-2.0 | 3,902,883,459,808,402,400 | 35.255319 | 78 | 0.641432 | false | 3.672414 | true | false | false |
ZeitOnline/zeit.content.quiz | src/zeit/content/quiz/updater.py | 1 | 1196 |
import urllib
import urllib2
import zope.app.appsetup.product
import zope.interface
import zope.component
import zeit.content.quiz.interfaces
class Updater(object):
zope.component.adapts(zeit.content.quiz.interfaces.IQuiz)
zope.interface.implements(zeit.content.quiz.interfaces.IQuizUpdater)
def __init_... | bsd-3-clause | 7,931,774,756,033,927,000 | 27.47619 | 79 | 0.672241 | false | 3.456647 | false | false | false |
khaledhosny/psautohint | python/psautohint/otfFont.py | 1 | 57646 | # Copyright 2014 Adobe. All rights reserved.
"""
Utilities for converting between T2 charstrings and the bez data format.
"""
import copy
import logging
import os
import re
import subprocess
import tempfile
import itertools
from fontTools.misc.psCharStrings import (T2OutlineExtractor,
... | apache-2.0 | -5,200,578,984,855,039,000 | 37.201458 | 79 | 0.557419 | false | 3.700237 | false | false | false |
jpn--/larch | larch/data_services/h5/h5pod/generic.py | 1 | 31510 |
import os
from pathlib import Path
import tables as tb
import numpy
import pandas
import logging
from ....util import Dict
from ....util.aster import asterize
from ....util.text_manip import truncate_path_for_display
from ... import _reserved_names_
from ...pod import Pod
from ...general import _sqz_same, selector_len... | gpl-3.0 | 3,610,165,919,703,294,500 | 29.181992 | 185 | 0.650428 | false | 3.039745 | false | false | false |
kyrsjo/AcdOpti | src/acdOpti/AcdOptiMeshTemplate.py | 1 | 8600 | # -*- coding: utf8 -*-
#
# Copyright 2011 Kyrre Ness Sjøbæk
# This file is part of AcdOpti.
#
# AcdOpti 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 you... | gpl-3.0 | -3,208,652,159,724,971,500 | 37.044248 | 108 | 0.625843 | false | 4.292561 | false | false | false |
jumpinjackie/fdotoolbox | Thirdparty/IronPython/Tutorial/wfdemo.py | 1 | 1157 | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Microsoft Public License. A
# copy of the license can be found in the License.html file at the root of this... | lgpl-2.1 | 764,337,017,331,379,100 | 32.057143 | 97 | 0.624028 | false | 4.00346 | false | false | false |
platformio/platformio-core | platformio/project/helpers.py | 1 | 5897 | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 7,943,287,062,079,929,000 | 31.401099 | 87 | 0.658301 | false | 3.651393 | true | false | false |
cloudwalkio/docker-aws-cli | aws_cli.py | 1 | 1450 | #!/usr/bin/python
""" Tool to setup AWS CLI.
"""
import os
import sys
from subprocess import check_output
def setup_s3(s3_access_key, s3_secret_key):
"""Create S3 configuration file."""
home = os.path.expanduser("~")
aws_dir = os.path.join(home, '.aws')
if not os.path.exists(aws_dir):
os.makedi... | mit | -4,588,440,829,602,186,000 | 31.222222 | 126 | 0.641379 | false | 3.251121 | false | false | false |
josuebrunel/myql-cli | myql-cli.py | 1 | 6924 | #!/usr/bin/env python
import os, sys
import cmd
import argparse
import importlib
from utils import pretty_xml, pretty_json
from utils import create_init_file, create_tables_file, create_directory, get_module
from utils import create_config_file, read_config_file, config_file_exists
from myql import MYQL
from myql.co... | mit | 1,900,856,855,279,807,700 | 28.589744 | 122 | 0.536973 | false | 4.324797 | true | false | false |
openstack/os-win | os_win/utils/io/ioutils.py | 1 | 10627 | # Copyright 2014 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | 3,435,588,681,736,873,500 | 39.253788 | 79 | 0.584455 | false | 4.353544 | false | false | false |
DaveTCode/CreatureRogue | CreatureRogue/models/battle_creature.py | 1 | 3117 | from CreatureRogue.models.creature import Creature
from CreatureRogue.data_layer.data import StaticGameData, HP_STAT
from CreatureRogue.data_layer.pokeball import Pokeball
from CreatureRogue.data_layer.stat import Stat
class BattleCreature:
"""
When in battle a creature can have stat adjustments and other val... | mit | -7,488,282,965,211,967,000 | 41.69863 | 136 | 0.623997 | false | 3.773608 | false | false | false |
maqnius/compscie-mc | setup.py | 1 | 4429 | # particlesim
# Copyright (C) 2017 Mark Niehues, Stefaan Hessmann, Jaap Pedersen,
# Simon Treu, Hanna Wulkow, Thomas Hadler
#
# 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 | -7,637,551,307,956,457,000 | 37.181034 | 134 | 0.632423 | false | 3.902203 | true | false | false |
simplereach/nsq2kafka | nsq2kafka/__main__.py | 1 | 3204 | """
USAGE: nsq2kafka [OPTIONS]
EXAMPLES:
# Basic example
nsq2kafka --nsq-topic=test --nsq-nsqd-tcp-addresses=localhost:4150
# Realistic example
nsq2kafka --nsq-topic=json_clicks \
--nsq-lookupd-http-addresses=lookupd1.example.com:4161,lookupd2.example.com:4161 \
--nsq-max-i... | apache-2.0 | -6,539,842,116,995,485,000 | 43.5 | 120 | 0.505306 | false | 4.697947 | false | false | false |
kain88-de/mdanalysis | package/MDAnalysis/analysis/encore/similarity.py | 1 | 64696 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under th... | gpl-2.0 | -8,989,456,600,809,411,000 | 36.353349 | 190 | 0.612341 | false | 4.281668 | false | false | false |
grnet/synnefo | snf-cyclades-app/synnefo/volume/management/commands/volume-detach.py | 1 | 3271 | # Copyright (C) 2010-2017 GRNET S.A.
#
# 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 is distributed i... | gpl-3.0 | 2,331,411,874,501,529,600 | 35.752809 | 77 | 0.593397 | false | 4.321004 | false | false | false |
princeofdarkness76/libcmaes | python/cma_multiplt.py | 1 | 3443 | #!/usr/bin/env python
"""In a OS shell::
python cma_multiplt.py data_file_name
or in a python shell::
import cma_multiplt as lcmaplt
lcmaplt.plot(data_file_name)
"""
# CMA-ES, Covariance Matrix Adaptation Evolution Strategy
# Copyright (c) 2014 Inria
# Author: Emmanuel Benazera <emmanuel.benazer... | lgpl-3.0 | 8,315,465,058,020,034,000 | 28.93913 | 130 | 0.641301 | false | 3.282173 | false | false | false |
eljost/pysisyphus | tests_staging/test_prfo/prfo.py | 1 | 3942 | #!/usr/bin/env python3
# Johannes Steinmetzer, April 2019
# See [1] https://pubs.acs.org/doi/pdf/10.1021/j100247a015
# Banerjee, 1985
# [2]
#
import matplotlib.pyplot as plt
import numpy as np
import sympy as sym
def make_funcs():
x, y, = sym.symbols("x y")
f_ = (1 - y)*x**2*sym.exp(-x**2) + (1/... | gpl-3.0 | -8,698,081,270,007,493,000 | 26.381944 | 76 | 0.538305 | false | 2.698152 | false | false | false |
leaffan/pynhldb | _check_player_stats.py | 1 | 3669 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from operator import attrgetter
from sqlalchemy import and_, String, cast
from db.common import session_scope
from db.player import Player
from db.team import Team
from db.player_game import PlayerGame
from db.player_season import PlayerSeason
# TODO: co... | mit | -6,396,806,094,362,557,000 | 32.972222 | 77 | 0.579722 | false | 4.076667 | false | false | false |
metpy/MetPy | metpy/cbook.py | 1 | 3238 | # Copyright (c) 2008,2015,2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Collection of generally useful utility code from the cookbook."""
import os
import numpy as np
import pooch
from . import __version__
try:
string_type = basestri... | bsd-3-clause | 2,880,880,812,459,009,000 | 27.910714 | 91 | 0.633416 | false | 3.863962 | false | false | false |
catmaid/CATMAID | django/applications/catmaid/control/label.py | 1 | 18054 | # -*- coding: utf-8 -*-
from collections import defaultdict
import json
from typing import Any, DefaultDict, List, Optional, Union
from django.db import connection
from django.http import HttpRequest, Http404, JsonResponse, HttpResponse
from django.shortcuts import get_object_or_404
from rest_framework.decorators i... | gpl-3.0 | -8,427,443,500,740,408,000 | 37.742489 | 129 | 0.597153 | false | 4.025418 | false | false | false |
lzw120/django | mysite/mysite/books/models.py | 1 | 1105 | from django.db import models
# Create your models here.
class Publisher(models.Model):
name = models.CharField(max_length = 30)
address = models.CharField(max_length = 50)
city = models.CharField(max_length = 60)
state_province = models.CharField(max_length = 30)
country = models.CharField(max_len... | bsd-3-clause | -6,974,113,854,544,279,000 | 28.864865 | 67 | 0.638009 | false | 3.733108 | false | false | false |
sunlightlabs/sitegeist | sitegeist/data/census/migrations/0003_auto__add_field_tract_B08301_001E__add_field_tract_B08301_002E__add_fi.py | 1 | 39582 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Tract.B08301_001E'
db.add_column('census_tract', 'B08301_001E',
self.g... | bsd-3-clause | -209,414,603,140,993,950 | 98.454774 | 150 | 0.562958 | false | 3.129012 | false | false | false |
Anaethelion/django-mapentity | mapentity/urls.py | 1 | 1523 | from django.conf import settings
from django.conf.urls import patterns, url, include
from . import app_settings
from . import registry
from .views import (map_screenshot, history_delete,
serve_attachment, JSSettings, Convert)
if app_settings['ACTION_HISTORY_ENABLED']:
from .models import LogEnt... | bsd-3-clause | -6,971,764,326,602,294,000 | 32.844444 | 124 | 0.662508 | false | 3.591981 | false | false | false |
tanmoy7989/candidacy_plot_scripts | plot_transferability.py | 1 | 3441 | import os, sys
import numpy as np
import pickle
import matplotlib
import matplotlib.cm as cm
from matplotlib.ticker import MaxNLocator
import matplotlib.pyplot as plt
# Build dependencies
import setup
axlbls = setup.lbl_dict
units = setup.units_dict
matplotlib.rcParams.update(setup.params)
# Data and target locations... | gpl-2.0 | 1,855,099,025,161,924,000 | 36.402174 | 120 | 0.617262 | false | 2.679907 | false | false | false |
JohnUrban/poreminion | poreminion/winner.py | 1 | 3048 | from poretools import *
import sys
## Nov 4, 2014
## TODO for pipeline Id want both the "details" and the "fa" files
## This would require a --saveas option -- and it will save both.
## Might also want it to save the fastas to their own files when --each
#logging
import logging
logger = logging.getLogger('poreminion'... | mit | 6,711,413,643,191,066,000 | 41.929577 | 122 | 0.472441 | false | 4.488954 | false | false | false |
jeremiedecock/snippets | python/urllib/get_html_setup_http_headers_basic_shutil_version.py | 1 | 3087 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
# 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 | 8,728,841,368,720,717,000 | 41.260274 | 106 | 0.694327 | false | 3.707933 | false | false | false |
anaran/olympia | apps/users/helpers.py | 1 | 3160 | import random
from django.utils.encoding import smart_unicode
import jinja2
from jingo import register, env
from tower import ugettext as _
import amo
@register.function
def emaillink(email, title=None, klass=None):
if not email:
return ""
fallback = email[::-1] # reverse
# inject junk somewh... | bsd-3-clause | -6,784,174,316,505,766,000 | 26.008547 | 78 | 0.618671 | false | 3.434783 | false | false | false |
schollii/pypubsub | src/pubsub/utils/misc.py | 1 | 1149 | """
Provides useful functions and classes. Most useful are probably
printTreeDocs and printTreeSpec.
:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE_BSD_Simple.txt for details.
"""
import sys
__all__ = ('printImported', 'Callback')
def printImported():
"""... | bsd-2-clause | 7,571,920,059,007,329,000 | 28.461538 | 87 | 0.637946 | false | 3.624606 | false | false | false |
Acurus/PVDB | pnvdb/models/objekt_type.py | 1 | 5437 | # -*- coding: utf-8 -*-
""" Provide the ObjektType class """
import json
import logging
from .util import _fetch_data, build_name2id
class ObjektType(object):
""" Class for individual nvdb-object types. (Data catalogue) """
def __init__(self, nvdb, objekt_type, meta=None):
self.nvdb = nvdb
... | mit | -8,835,561,781,146,418,000 | 31.73494 | 97 | 0.54251 | false | 3.565617 | false | false | false |
leapp-to/prototype | leapp/libraries/stdlib/call.py | 1 | 9615 | from __future__ import print_function
import codecs
import os
from leapp.compat import string_types
from leapp.libraries.stdlib.eventloop import POLL_HUP, POLL_IN, POLL_OUT, POLL_PRI, EventLoop
STDIN = 0
STDOUT = 1
STDERR = 2
def _multiplex(ep, read_fds, callback_raw, callback_linebuffered,
encoding... | lgpl-2.1 | -6,441,964,478,796,059,000 | 43.308756 | 115 | 0.604784 | false | 4.126609 | false | false | false |
our-city-app/oca-backend | src/solutions/common/integrations/timeblockr/models.py | 1 | 1400 | # -*- coding: utf-8 -*-
# Copyright 2021 Green Valley NV
#
# 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 l... | apache-2.0 | 6,770,343,659,073,634,000 | 32.333333 | 102 | 0.747143 | false | 3.713528 | false | false | false |
mganeva/mantid | scripts/AbinsModules/IOmodule.py | 1 | 19826 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 4,607,640,801,790,355,000 | 41.004237 | 119 | 0.58968 | false | 4.343996 | false | false | false |
kickstandproject/ripcord | ripcord/tests/db/domain/test_create.py | 1 | 2322 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2013 PolyBeacon, 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... | apache-2.0 | 3,682,769,967,210,309,000 | 34.723077 | 76 | 0.625754 | false | 3.588872 | false | false | false |
wbthomason/cs3240-onedir | server.py | 1 | 10957 | import os
import json
import time
from subprocess import call
from twisted.web.server import Site, NOT_DONE_YET
from twisted.internet import ssl, reactor
from twisted.web.resource import Resource
import db_access
class FileServerResource(Resource):
def __init__(self):
Resource.__init__(self)
sel... | mit | -6,860,069,166,581,717,000 | 42.137795 | 135 | 0.544401 | false | 3.743423 | false | false | false |
jbrambleDC/simulacrum | simulacrum/dataset.py | 1 | 6131 | import pandas as pd
from faker import Faker
from uuid import uuid4
import logging
import numpy as np
from datetime import datetime
class DataSet:
def __init__(self, length, **kwargs):
self.data = self.create(length, **kwargs)
def get_data(self):
return self.data
def num_data(self, ty, le... | mit | -2,031,743,940,998,872,600 | 32.140541 | 108 | 0.536617 | false | 3.800992 | false | false | false |
monovertex/ygorganizer | ygo_cards/tasks/sets.py | 1 | 8666 | from __future__ import absolute_import
from celery import shared_task
from ygo_cards.models import Card, CardVersion, CardSet, UserCardVersion
from ygo_core.utils import process_string, slugify
from ygo_variables.models import Variable
import unirest
import urllib
from ygo_cards.utils import sn_has_language_code, sn_n... | mit | 2,607,918,986,943,571,500 | 34.371429 | 79 | 0.452804 | false | 4.735519 | false | false | false |
MichaelMGonzalez/MagneticFieldLocalization | SerialCommunication/PIDLerner.py | 1 | 4531 | from Communicator import *
from PID_Q_Lerner import *
import json
import os
import time
import atexit
t_fmt = "{00:g}"
inf = float("inf")
stable_factor = 40
timeout = 13
timeout_penalty = 100
count_until = 2
class PIDLerner:
def __init__(self, learning_factor = .1):
self.arduino = SerialComm()
self.log_... | gpl-3.0 | -9,066,643,630,799,897,000 | 30.685315 | 63 | 0.590598 | false | 2.858675 | false | false | false |
quarkslab/arybo | benchs/cmp.py | 1 | 1673 | #!/usr/bin/env python3
#
import sys
if len(sys.argv) <= 2:
print("Usage: %s ref new" % sys.argv[0])
sys.exit(1)
reff = sys.argv[1]
newf = sys.argv[2]
class BenchRes:
def __init__(self, name, time_ms, mem_mb):
self.name = name
self.time_ms = time_ms
self.mem_mb = mem_mb
def ... | bsd-3-clause | 1,771,513,749,114,655,000 | 24.348485 | 174 | 0.558279 | false | 2.22178 | false | false | false |
lab11/M-ulator | platforms/HT_m3/programming/mbus_message.py | 1 | 2878 | #!/usr/bin/python
import sys
import logging
from m3_common import m3_common
m3_common.configure_root_logger()
logger = logging.getLogger(__name__)
class mbus_message_generator(m3_common):
TITLE = "MBus Message Generator"
def parse_args(self):
if len(sys.argv) not in (2,):
logger.info("U... | gpl-3.0 | -2,066,246,356,386,461,400 | 32.465116 | 97 | 0.615705 | false | 3.212054 | false | false | false |
eunchong/build | scripts/slave/ios/host_info.py | 1 | 4450 | #!/usr/bin/python
# Copyright 2015 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.
"""Print information about the tools present on this machine.
Usage:
./host_info.py -j /tmp/out.json
Writes a json dictionary contain... | bsd-3-clause | -480,386,654,096,618,500 | 22.670213 | 78 | 0.650562 | false | 3.62969 | false | false | false |
Secure-Trading/PythonAPI | securetrading/__init__.py | 1 | 1328 | # Secure Trading Python API
# Authors: Secure Trading Ltd
# Configuration variables
from __future__ import unicode_literals
from .requestobject import Request
from .requestobject import Requests
from .responseobject import Response
from .exceptions import SecureTradingError
from .exceptions import ApiError
from .excep... | mit | -7,403,021,655,991,908,000 | 29.883721 | 66 | 0.723645 | false | 4 | false | true | false |
john-mcnamara-intel/dpdk | usertools/dpdk-devbind.py | 2 | 28205 | #! /usr/bin/env python
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
#
from __future__ import print_function
import sys
import os
import getopt
import subprocess
from os.path import exists, abspath, dirname, basename
# The PCI base class for all devices
network_class = {'Class': '... | mit | -2,125,751,032,921,621,200 | 37.063428 | 113 | 0.577664 | false | 3.747675 | false | false | false |
gerrit-review/gerrit | tools/download_file.py | 1 | 5139 | #!/usr/bin/env python
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -685,302,445,222,360,700 | 28.534483 | 77 | 0.654602 | false | 3.290013 | false | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.5/Lib/re.py | 1 | 12232 | #
# Secret Labs' Regular Expression Engine
#
# re-compatible interface for the sre matching engine
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# This version of the SRE library can be redistributed under CNRI's
# Python 1.6 license. For any other use, please contact Secret Labs
# AB (info@py... | mit | 3,808,175,959,281,925,000 | 37.831746 | 78 | 0.649035 | false | 3.966278 | false | false | false |
sgtnasty/python | list/list.py | 1 | 1958 | #!/usr/bin/env python
# https://pymotw.com/3/os.path/
import os
import os.path
import time
import argparse
APPNAME='lister'
__version__ = '0.0.1'
def config_args():
"""
Configure command line arguments
"""
parser = argparse.ArgumentParser(description=APPNAME,
epilog=("Version {}".format(__... | gpl-3.0 | 822,235,792,198,670,000 | 32.186441 | 111 | 0.621042 | false | 3.51526 | true | false | false |
schenkd/webdev-project | app/main/views.py | 1 | 7169 | # ~*~ encoding: utf-8 ~*~
from app.main import main
from flask import render_template, request, flash, redirect, url_for
from app.main.forms import EngpassForm, ContactForm, ClassifyForm, classified
from app.models import Engpass, User, Drug, Producer, Contact, Log
from flask_login import login_required, current_user
f... | mit | -664,967,691,219,463,400 | 36.3125 | 130 | 0.650056 | false | 3.360225 | false | false | false |
sniperganso/python-manilaclient | manilaclient/tests/functional/test_shares_listing.py | 1 | 8081 | # Copyright 2015 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -5,230,246,703,347,627,000 | 37.117925 | 79 | 0.610073 | false | 3.648307 | true | false | false |
johnowhitaker/bobibabber | sklearn/hmm.py | 1 | 48255 | # Hidden Markov Models
#
# Author: Ron Weiss <ronweiss@gmail.com>
# and Shiqiao Du <lucidfrontier.45@gmail.com>
# API changes: Jaques Grobler <jaquesgrobler@gmail.com>
"""
The :mod:`sklearn.hmm` module implements hidden Markov models.
**Warning:** :mod:`sklearn.hmm` is orphaned, undocumented and has known
numerical s... | mit | 8,186,882,143,462,571,000 | 36.435997 | 82 | 0.575505 | false | 4.16099 | false | false | false |
Vivaq/g2p | g2p_project/g2p_project/settings.py | 1 | 1969 | import os
SETTINGS_DIR = os.path.dirname(__file__)
PROJECT_PATH = os.path.join(SETTINGS_DIR, os.pardir)
PROJECT_ROOT = os.path.abspath(PROJECT_PATH)
TEMPLATE_DIRS = (
os.path.join(PROJECT_ROOT, 'templates'),
)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
LOGIN_URL = '/login/'
LOGOUT_URL = '/logout/'
S... | bsd-2-clause | 4,745,019,941,371,833,000 | 20.637363 | 65 | 0.653123 | false | 3.043277 | false | true | false |
lopiola/integracja_wypadki | scripts/db_api/person.py | 1 | 3215 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Manipulates the person table
"""
from psycopg2 import connect
import common
constraints = {
'sex': ['MALE', 'FEMALE', 'UNKNOWN'],
'injury_level': ['FATAL', 'SERIOUS', 'SLIGHT', 'NONE', 'UNKNOWN'],
'type': ['DRIVER', 'PASSENGER', 'PEDESTRIAN', 'UNKNOWN'],
... | mit | 430,964,396,947,975,200 | 22.136691 | 98 | 0.536236 | false | 3.377101 | false | false | false |
betterlife/flask-psi | psi/app/views/inventory_transaction.py | 2 | 6267 | from datetime import datetime
from flask_admin.contrib.sqla.ajax import QueryAjaxModelLoader
from flask_admin.model.fields import AjaxSelectField
from psi.app.models import Product
from psi.app import service
from psi.app.models import InventoryTransactionLine, InventoryTransaction
from psi.app.utils import security_... | mit | 1,161,510,000,624,890,400 | 43.133803 | 119 | 0.62502 | false | 4.266167 | false | false | false |
unicefuganda/edtrac | edtrac_project/rapidsms_contact/contact/migrations/0002_auto__add_field_flag_words__add_field_flag_rule__add_field_flag_rule_r.py | 1 | 13099 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Flag.words'
db.add_column('contact_flag', 'words', self.gf('django.db.models.fields.CharFi... | bsd-3-clause | 8,817,603,443,012,260,000 | 73.851429 | 182 | 0.551187 | false | 3.642659 | false | false | false |
codelv/enaml-native | src/enamlnative/android/android_bottom_sheet_dialog.py | 1 | 1316 | """
Copyright (c) 2017, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file LICENSE, distributed with this software.
Created on Jan 29, 2018
@author: jrm
"""
from atom.api import Typed, set_default
from enamlnative.widgets.bottom_sheet_dialog import ProxyBottomSheetDialog
... | mit | 1,975,408,620,800,349,200 | 29.604651 | 79 | 0.631459 | false | 4.553633 | false | false | false |
jcarbaugh/django-blogdor | blogdor/templatetags/blog.py | 1 | 3930 | from blogdor import utils
from blogdor.models import Post
from django import template
from django.conf import settings
from django.db.models import Count
from django.template.loader import render_to_string
from django.contrib.contenttypes.models import ContentType
from tagging.models import Tag
register = template.Lib... | bsd-3-clause | 1,578,761,664,994,745,000 | 32.02521 | 136 | 0.643511 | false | 3.625461 | false | false | false |
d120/pyTUID | pyTUID/models.py | 1 | 1337 | import ast
from django.db import models
from django.utils.translation import ugettext as _
class TUIDUser(models.Model):
"""Represents a TUID user with various properties returned from CAS"""
class Meta:
verbose_name = _('TUID User')
verbose_name_plural = _('TUID Users')
uid = models.Char... | mit | -224,083,952,602,156,320 | 37.2 | 119 | 0.628272 | false | 3.864162 | false | false | false |
lsp84ch83/PyText | Appium/appium-framwork/script/test_Anewnotest1.py | 1 | 2759 | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2018/4/1 16:24
# @Author : Soner
# @version : 1.0.0
# @license : Copyright(C), Your Company
from appium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
import unittest
import xlutils,xlrd,xlwt
class Anewnotest1(unittest.T... | gpl-3.0 | 7,042,348,827,297,111,000 | 32.714286 | 152 | 0.524855 | false | 3.013937 | false | false | false |
tboyce021/home-assistant | tests/components/airly/test_init.py | 1 | 4179 | """Test init of Airly integration."""
from datetime import timedelta
from homeassistant.components.airly.const import DOMAIN
from homeassistant.config_entries import (
ENTRY_STATE_LOADED,
ENTRY_STATE_NOT_LOADED,
ENTRY_STATE_SETUP_RETRY,
)
from homeassistant.const import STATE_UNAVAILABLE
from . import API... | apache-2.0 | 8,017,846,302,526,744,000 | 30.186567 | 87 | 0.643934 | false | 3.580977 | true | false | false |
cnamejj/PyProc | regentest/self_maps.py | 1 | 1217 | #!/usr/bin/env python
"""Handle records from /proc/self/maps data files"""
import regentest as RG
import ProcHandlers as PH
PFC = PH.ProcFieldConstants
# ---
def re_self_maps(inprecs):
"""Iterate through parsed records and re-generate data file"""
__leadtemp = "{st:08x}-{en:08x} {fl:4s} {offset:08x} \
{m... | gpl-2.0 | -2,877,985,667,914,708,000 | 27.97619 | 80 | 0.518488 | false | 2.830233 | false | false | false |
robwebset/script.videoextras | resources/lib/CacheCleanup.py | 1 | 1858 | # -*- coding: utf-8 -*-
import re
import traceback
import xbmc
import xbmcvfs
import xbmcaddon
# Import the common settings
from settings import Settings
from settings import log
from settings import os_path_join
ADDON = xbmcaddon.Addon(id='script.videoextras')
PROFILE_DIR = xbmc.translatePath(ADDON.getAddonInfo('pro... | gpl-2.0 | 8,544,385,020,276,670,000 | 33.407407 | 83 | 0.588267 | false | 4.222727 | false | false | false |
AragurDEV/yowsup | yowsup/layers/protocol_notifications/layer.py | 1 | 1890 | from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer
from .protocolentities import *
from yowsup.layers.protocol_acks.protocolentities import OutgoingAckProtocolEntity
class YowNotificationsProtocolLayer(YowProtocolLayer):
def __init__(self):
handleMap = {
"notification": (self.r... | gpl-3.0 | -6,190,608,310,758,386,000 | 42.953488 | 96 | 0.642328 | false | 4.532374 | false | false | false |
zaina/nova | nova/virt/vmwareapi/vmops.py | 1 | 87594 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2012 VMware, Inc.
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. Yo... | apache-2.0 | 4,759,720,369,780,155,000 | 46.017713 | 79 | 0.537571 | false | 4.329264 | true | false | false |
albanatita/data-process | ishtarTools.py | 1 | 2664 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 17 10:49:02 2015
@author: admin
"""
import os, datetime, time
import ConvertFiles
import sqlite3
import readHdf5
def massConversion():
path=r"D:"+os.sep+"DATA"+os.sep+"Acquired_data"
# listFiles=['00823_Data']
iteration=range(10,46)
... | gpl-2.0 | 3,389,679,518,884,044,300 | 26.666667 | 94 | 0.541291 | false | 3.24878 | false | false | false |
vir-mir/aiovalidator | aiovalidator/middlewares/validator.py | 1 | 1514 | import asyncio
import itertools
import json
import sys
from functools import wraps
from aiovalidator.fields.base import BaseField
from aiovalidator.fields.manager import ManagerField
PY_35 = sys.version_info >= (3, 5)
if PY_35:
from json import JSONDecodeError
else:
JSONDecodeError = ValueError
__all__ = ['v... | apache-2.0 | -7,801,116,108,073,615,000 | 24.233333 | 66 | 0.597754 | false | 4.426901 | false | false | false |
josircg/raizcidadanista | raizcidadanista/financeiro/migrations/0009_auto__chg_field_despesa_valor__chg_field_projeto_orcamento.py | 1 | 18530 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Despesa.valor'
db.alter_column('financeiro_despesa', '... | gpl-3.0 | 4,204,574,867,102,121,500 | 81.36 | 184 | 0.549973 | false | 3.404998 | false | false | false |
mazvv/travelcrm | travelcrm/forms/vats.py | 1 | 3033 | # -*-coding: utf-8 -*-
import colander
from . import(
Date,
SelectInteger,
ResourceSchema,
BaseForm,
BaseSearchForm,
BaseAssignForm,
)
from ..resources.vats import VatsResource
from ..models import DBSession
from ..models.vat import Vat
from ..models.service import Service
from ..models.accou... | gpl-3.0 | -5,373,886,258,973,040,000 | 25.840708 | 68 | 0.572371 | false | 3.749073 | false | false | false |
DaveMDS/epymc | epymc/sdb.py | 1 | 5661 | #!/usr/bin/env python
# This Python file uses the following encoding: utf-8
#
# Copyright (C) 2010-2018 Davide Andreoli <dave@gurumeditation.it>
#
# This file is part of EpyMC, an EFL based Media Center written in Python.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 | -2,831,570,294,776,829,400 | 26.480583 | 91 | 0.561208 | false | 3.647552 | false | false | false |
dstenb/pylaunchr-svtplay | format.py | 1 | 1106 | import datetime
def format_published_at(episode):
if not episode.published_at:
return ""
elif episode.published_today():
format = "Published today %H:%M"
return episode.published_at.strftime(format)
elif episode.published_yesterday():
format = "Published yesterday %H:%M"
... | mit | 4,477,413,895,579,498,500 | 25.97561 | 59 | 0.597649 | false | 4.126866 | false | false | false |
deltachat/deltachat-pages | tools/create-local-help.py | 1 | 4317 | #!/usr/bin/env python3
# the structure of the help files is:
# - ANY_DIR/help/LANG/help.html (files generated by deltachat-pages)
# - ANY_DIR/help/help.css (file is should be provided by deltachat-UI, not generated by deltachat-pages)
from shutil import copyfile
import sys
import os
import re
# list all files t... | gpl-3.0 | 219,344,217,322,062,800 | 34.105691 | 105 | 0.552235 | false | 3.448083 | false | false | false |
mibofra/olifant | gui.py | 1 | 26152 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Sat Mar 31 15:44:43 2012
import wx
import os
import sys
from olifant import Olifant
from olifantException import OlifantException
# begin wxGlade: extracode
# end wxGlade
def showError(label,text):
dial = wx.MessageDialog(None, text , lab... | gpl-3.0 | 8,529,343,343,583,915,000 | 45.951526 | 169 | 0.66645 | false | 2.974522 | false | false | false |
boldprogressives/django-opendebates | opendebates/opendebates/utils.py | 1 | 2781 | import json
import random
from .models import Voter
def get_voter(request):
if request.user.is_authenticated():
try:
voter = request.user.voter
except Voter.DoesNotExist:
return {}
return {'email': request.user.email,
'zip': voter.zip,
}
... | apache-2.0 | 4,563,523,322,794,240,000 | 30.247191 | 68 | 0.563107 | false | 3.593023 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.