repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
tiwillia/openshift-tools | openshift/installer/vendored/openshift-ansible-3.5.5/roles/lib_openshift/library/oc_secret.py | 2 | 52800 | #!/usr/bin/env python
# pylint: disable=missing-docstring
# flake8: noqa: T001
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ ... | apache-2.0 | -5,882,913,405,720,118,000 | 31.734036 | 244 | 0.520909 | false |
Onager/plaso | tests/output/tln.py | 1 | 8070 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the TLN output class."""
import io
import os
import unittest
from dfvfs.lib import definitions as dfvfs_definitions
from dfvfs.path import factory as path_spec_factory
from plaso.lib import definitions
from plaso.output import tln
from tests.containers imp... | apache-2.0 | -3,306,304,721,288,736,300 | 34.707965 | 79 | 0.674473 | false |
jptomo/rpython-lang-scheme | rpython/rlib/parsing/makepackrat.py | 1 | 24419 | from __future__ import with_statement
import py
import sys
from rpython.rlib.parsing.tree import Nonterminal, Symbol, RPythonVisitor
from rpython.rlib.parsing.codebuilder import Codebuilder
from rpython.rlib.objectmodel import we_are_translated
class BacktrackException(Exception):
def __init__(self, error=None):
... | mit | -3,646,075,986,021,694,500 | 31.645722 | 81 | 0.528113 | false |
mancoast/CPythonPyc_test | fail/311_test_builtin.py | 1 | 44506 | # Python test set -- built-in functions
import test.support, unittest
from test.support import fcmp, TESTFN, unlink, run_unittest, \
run_with_locale
from operator import neg
import sys, warnings, random, collections, io, fractions
warnings.filterwarnings("ignore", "hex../oct.. of negati... | gpl-3.0 | 7,221,118,868,111,259,000 | 33.608087 | 105 | 0.526199 | false |
skirpichev/omg | diofant/combinatorics/perm_groups.py | 1 | 111562 | from itertools import islice
from math import log
from random import choice, randrange
from ..core import Basic
from ..functions import factorial
from ..ntheory import sieve
from ..utilities import has_variety
from ..utilities.iterables import is_sequence, uniq
from ..utilities.randtest import _randrange
from .permuta... | bsd-3-clause | 75,722,258,632,304,220 | 33.023178 | 106 | 0.514781 | false |
lkmnds/dickord | console.py | 1 | 1195 | import logging
import traceback
import asyncio
import requests
import dickord
route = dickord.route
import config
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('userbot')
benis = dickord.Dicker(user_pass=('luna@localhost', 'fuck'))
@benis.sensor('READY')
async def ready_for_work(payload):
... | mit | -1,654,092,541,386,538,200 | 24.425532 | 90 | 0.68954 | false |
samuelefiorini/cgm-tools | scripts/run_kf.py | 1 | 2960 | """KF experiments development."""
from cgmtools import utils
from cgmtools import plotting
from cgmtools.forecast import kf
import datetime
import numpy as np
import pickle as pkl
###############################################################################
# Load full data set from pickle file (see data_wrangler.p... | gpl-3.0 | 4,648,840,799,209,392,000 | 35.54321 | 79 | 0.565203 | false |
ftomassetti/plaid | app/views/decorators.py | 1 | 1552 | from functools import wraps
from flask import render_template, request, url_for
from app.models import PatchState
def filterable(f):
"""Filter a query"""
@wraps(f)
def wrapped(*args, **kwargs):
d = f(*args, **kwargs)
q = d['query']
state = request.args.get('state', None, type=str)... | gpl-2.0 | -1,112,586,424,140,818,000 | 24.442623 | 75 | 0.52384 | false |
citizenlabsgr/voter-engagement | api/core/management/commands/gendata.py | 1 | 4551 | import random
from contextlib import suppress
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.core.management.base import BaseCommand
from django.db.utils import IntegrityError
from faker import Faker
from api.elections.models i... | mit | -1,028,694,120,705,746,800 | 32.711111 | 80 | 0.566249 | false |
RCPRG-ros-pkg/control_subsystem | common/set_big_stiffness.py | 1 | 5158 | #!/usr/bin/env python
# Copyright (c) 2014, Robot Control and Pattern Recognition Group, Warsaw University of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions o... | bsd-3-clause | 521,373,026,289,866,900 | 40.596774 | 130 | 0.722373 | false |
boada/planckClusters | MOSAICpipe/bpz-1.99.3/priors/prior_hdfn_gen.py | 1 | 2464 | from __future__ import division
from past.utils import old_div
from bpz_tools import *
def function(z, m, nt):
"""HDFN prior from Benitez 2000
for Ellipticals, Spirals, and Irregular/Starbursts
Returns an array pi[z[:],:nt]
The input magnitude is F814W AB
"""
global zt_at_a
nz = len(z)
... | mit | -1,657,587,623,260,758,800 | 27 | 77 | 0.520292 | false |
pjiangtw/HOPE | WishCplex/WISHCPLEX.py | 1 | 2949 | #----------------------------------------------------------------------------------------
# Copyright, 2013:
#
# Stefano Ermon - Cornell University , ermonste@cs.cornell.edu
# Ashish Sabharwal - IBM Watson Research Center , ashish.sabharwal@us.ibm.com
#-----------------------------------------------------------... | apache-2.0 | 4,981,883,023,722,491,000 | 32.511364 | 162 | 0.631061 | false |
dsedivec/ansible-plugins | filter_plugins/hash.py | 1 | 1283 | # Copyright 2013 Dale Sedivec
#
# 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 in the h... | gpl-3.0 | 2,962,180,769,414,720,000 | 31.897436 | 71 | 0.71629 | false |
abigailStev/lag_spectra | simple_cross_spectra.py | 1 | 30460 | #!/usr/bin/env
"""
Read in two extracted light curves (interest band and reference band), split
into segments, compute the power spectra per band and cross spectrum of each
segment, averages cross spectrum of all the segments, and computes frequency
lags between the two bands.
Example call:
python simple_cross_spectra... | mit | -7,282,821,186,421,364,000 | 35.090047 | 80 | 0.588969 | false |
mahyarap/httpclient | httpclient/httpclient.py | 1 | 1653 | #!/usr/bin/env python3
import sys
import argparse
from httpclient.http import HttpRequest
__version__ = '0.1.0'
def parse_cmd_options(args):
"""Parse the command line arguments."""
parser = argparse.ArgumentParser()
parser.add_argument('url', help='URL to send the request to')
parser.add_argument... | gpl-3.0 | 8,312,854,801,826,824,000 | 28 | 66 | 0.503932 | false |
mackal/faction.py | faction3.py | 1 | 35996 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 Michael Cook <mcook@mackal.net>
#
# GPLv3
"""
Processes an eqlog file and generates SQL to update factions
Should work with a full log, but cleaning up the log will be quicker
The file needs at least the zone enter messages, faction ... | gpl-3.0 | -6,577,107,049,170,106,000 | 29.844045 | 80 | 0.576969 | false |
Tilapiatsu/modo-tila_batchexporter | lxserv/Tila_BatchTransform.py | 1 | 2520 | #!/usr/bin/env python
import modo
import lx
import lxu.command
import lxu.select
import traceback
import Tila_BatchExportModule as t
from Tila_BatchExportModule import user_value
from Tila_BatchExportModule import batch_export
class CmdBatchExport(lxu.command.BasicCommand):
def __init__(self):
lxu.comman... | mit | -7,176,125,561,679,100,000 | 28.658824 | 76 | 0.483333 | false |
no13bus/btcproject | btc/tasks.py | 1 | 13215 | #encoding=utf-8
from __future__ import absolute_import
from celery import shared_task
# from celery.task import task
from btcproject import celery_app
from btc.lib.okcoin import *
from btc.lib.btceapi import *
from btc.lib.bitfinex import *
from btc.lib.huobi import *
from btc.lib.btcchina import *
fr... | mit | -85,900,734,797,334,750 | 36.043353 | 179 | 0.697713 | false |
valuesandvalue/valuesandvalue | vavs_project/fbdata/fields.py | 1 | 2071 | # fbdata.fields
# DJANGO
from django.db import models
from django.utils import six
# SOUTH
from south.modelsinspector import add_introspection_rules
class IntegerListField(models.Field):
description = "Integer List"
__metaclass__ = models.SubfieldBase
def __init__(self, *args, **kwargs):
k... | mit | 5,486,886,093,068,114,000 | 30.378788 | 74 | 0.593916 | false |
jcurry/ZenPacks.ZenSystems.Juniper | ZenPacks/ZenSystems/Juniper/modeler/plugins/JuniperFPCMap.py | 1 | 6265 | ##########################################################################
# Author: Jane Curry, jane.curry@skills-1st.co.uk
# Date: February 28th, 2011
# Revised: Extra debugging added Aug 23, 2011
#
# JuniperFPC modeler plugin
#
# This program can be used under the GNU General Public L... | gpl-2.0 | 707,825,517,397,618,400 | 43.75 | 116 | 0.444054 | false |
kussj/mesosbeat | scripts/generate_field_docs.py | 1 | 2634 | #!/usr/bin/env python
"""
This script generates markdown documentation from the fields yml file.
Usage: python generate_field_docs.py file.yml file.asciidoc
"""
import sys
import yaml
SECTIONS = [
("env", "Common"),
("cluster_health", "Contains elasticsearch cluster health statistics"),
("cluster_stats", "Con... | apache-2.0 | -3,599,554,905,244,448,000 | 24.572816 | 77 | 0.629461 | false |
fragaria/BorIS | post_migration_restart.py | 1 | 2733 | """
This is script should bring existing installations in line with the state
in repository. It is supposed to be run after:
1. The migration_restart branch has been merged to master and deployed.
2. south_migrationhistory has been truncated.
3. The initial migrations for clients and services have been faked.
"... | mit | -3,734,604,905,836,807,700 | 32.329268 | 81 | 0.716429 | false |
ars599/mom5 | test/test_bit_reproducibility.py | 1 | 1741 |
from __future__ import print_function
import os
import sys
import re
from model_test_setup import ModelTestSetup
from test_run import tests as test_specs
class TestBitReproducibility(ModelTestSetup):
def __init__(self):
super(TestBitReproducibility, self).__init__()
def checksums_to_dict(self, fil... | gpl-2.0 | 3,605,980,634,809,117,700 | 26.203125 | 77 | 0.546238 | false |
ATenderholt/cclib | test/bridge/testpyquante.py | 1 | 2276 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
import unittest
import numpy
from cclib.bridge import cclib2pyquante
from ..test_data import getdatafile
from cclib.pars... | bsd-3-clause | -8,485,751,219,183,631,000 | 29.756757 | 100 | 0.631371 | false |
Zlash65/erpnext | erpnext/controllers/item_variant.py | 1 | 11842 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cstr, flt
import json, copy
from six import string_types
class ItemVariantExistsError(frap... | gpl-3.0 | 1,849,677,033,109,478,400 | 33.932153 | 121 | 0.708326 | false |
FlorianLudwig/scope | setup.py | 1 | 2287 | # -*- coding: utf-8 -*-
import os
import sys
from distutils.command.sdist import sdist
from setuptools import setup, find_packages
import setuptools.command.test
class TestCommand(setuptools.command.test.test):
def finalize_options(self):
setuptools.command.test.test.finalize_options(self)
self.t... | apache-2.0 | -363,262,786,118,607,400 | 31.211268 | 89 | 0.601224 | false |
lewisodriscoll/sasview | src/sas/sascalc/simulation/pointsmodelpy/tests/testlores2d.py | 3 | 3235 | from __future__ import print_function
def test_lores2d(phi):
from sasModeling.pointsmodelpy import pointsmodelpy
from sasModeling.iqPy import iqPy
from sasModeling.geoshapespy import geoshapespy
#lores model is to hold several geometric objects
lm = pointsmodelpy.new_loresmodel(0.1)
#generate single ge... | bsd-3-clause | 863,925,136,733,527,400 | 26.415254 | 62 | 0.705719 | false |
zhaochao/fuel-web | nailgun/nailgun/utils/zabbix.py | 1 | 3931 | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | apache-2.0 | -6,961,527,353,915,873,000 | 30.198413 | 78 | 0.568303 | false |
lixiangning888/whole_project | modules/signatures_orginal_20151110/multiple_ua.py | 1 | 2186 | # Copyright (C) 2015 KillerInstinct
#
# 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 in... | lgpl-3.0 | 7,584,770,034,356,479,000 | 36.050847 | 90 | 0.63495 | false |
maclogan/VirtualPenPal | chatterbot/conversation/statement.py | 1 | 4801 | # -*- coding: utf-8 -*-
from .response import Response
from datetime import datetime
class Statement(object):
"""
A statement represents a single spoken entity, sentence or
phrase that someone can say.
"""
def __init__(self, text, **kwargs):
self.text = text
self.in_response_to = ... | bsd-3-clause | 6,238,078,572,523,169,000 | 29.579618 | 96 | 0.580712 | false |
mozman/ezdxf | examples/render/render_ellipse.py | 1 | 1255 | # Copyright (c) 2018-2019, Manfred Moitzi
# License: MIT License
from math import radians
import ezdxf
from ezdxf.render.forms import ellipse
from ezdxf.math import Matrix44
NAME = 'ellipse.dxf'
doc = ezdxf.new('R12', setup=True)
msp = doc.modelspace()
def render(points):
msp.add_polyline2d(list(points))
def t... | mit | -3,324,645,544,781,303,000 | 24.612245 | 107 | 0.641434 | false |
tochev/obshtestvo.bg | projects/admin.py | 1 | 20632 | from django.contrib import admin
from django.contrib.contenttypes.generic import GenericTabularInline
from django.forms import ModelForm
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from suit.widgets import *
from pagedown.widgets import AdminPag... | unlicense | -5,973,505,790,476,279,000 | 33.61745 | 148 | 0.612253 | false |
MarkWh1te/xueqiu_predict | crawler/stock.py | 1 | 2487 | from flask import Flask
from flask import render_template, request
from utils import Base,engine
from sqlalchemy.orm import scoped_session, sessionmaker
from models import Stock, StockDetail
from flask_bootstrap import Bootstrap
from flask import Blueprint
from flask_paginate import Pagination,get_page_args
from sqlalc... | mit | -7,122,884,169,626,361,000 | 32.608108 | 103 | 0.51347 | false |
jsilter/scipy | scipy/linalg/special_matrices.py | 1 | 27627 | from __future__ import division, print_function, absolute_import
import math
import numpy as np
from scipy.lib.six import xrange
from scipy.lib.six import string_types
__all__ = ['tri', 'tril', 'triu', 'toeplitz', 'circulant', 'hankel',
'hadamard', 'leslie', 'all_mat', 'kron', 'block_diag', 'companion',
... | bsd-3-clause | 4,770,515,006,507,963,000 | 27.07622 | 79 | 0.508452 | false |
rthouvenin/meteography | meteography/neighbors.py | 1 | 2176 | # -*- coding: utf-8 -*-
"""
Wrapper around sklearn k-neighbors estimators that can work in batches on
pytables arrays (or other disk-backed arrays that support slicing)
"""
import numpy as np
from sklearn.neighbors import NearestNeighbors as SKNN
from meteography.dataset import PIXEL_TYPE
class NearestNeighbors:
... | mit | 2,629,343,150,644,379,000 | 30.536232 | 78 | 0.554688 | false |
MTG/essentia | test/src/unittests/standard/test_nsgiconstantq.py | 1 | 4838 | #!/usr/bin/env python
# Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), e... | agpl-3.0 | -3,107,686,161,840,203,300 | 36.215385 | 89 | 0.641794 | false |
nickretallack/babel | babel/messages/pofile.py | 1 | 17024 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | bsd-3-clause | 6,471,569,443,023,267,000 | 34.101031 | 84 | 0.520266 | false |
drallensmith/neat-python | examples/xor/evolve-feedforward-parallel.py | 1 | 3373 | """
A parallel version of XOR using neat.parallel.
Since XOR is a simple experiment, a parallel version probably won't run any
faster than the single-process version, due to the overhead of
inter-process communication.
If your evaluation function is what's taking up most of your processing time
(and you should check ... | bsd-3-clause | -4,725,489,445,653,296,000 | 35.27957 | 82 | 0.688111 | false |
IDNoise/NoiseIDE | NoiseIDEPython/idn_snippet_completer.py | 1 | 1650 | import os
from idn_completer import Completer
import core
import yaml
class SnippetCompleter(Completer):
def __init__(self, stc):
Completer.__init__(self, stc)
self.snippets = []
for path in [os.path.join(core.MainFrame.cwd, "data", "erlang", "ide_snippets.yaml"),
os.... | gpl-2.0 | 3,293,013,052,869,466,000 | 32 | 100 | 0.555152 | false |
activityhistory/TracesVisualizer | dayview/scripts/extract.py | 1 | 8057 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# TESTING FILE made.by.a.fox. 12.2.15
# Updated by acrule 01.21.16
#FEATURE LIST
# Y connect to db
# Y write to file
# Y Write JSON format
# Accept input date parameter
#KNOWN ISSUES
# 2. no formatting or conversion of datetime stamps
import re
import os
i... | gpl-2.0 | -7,282,651,105,888,489,000 | 32.995781 | 363 | 0.52563 | false |
solanolabs/rply | rply/parser.py | 1 | 2619 | from rply.errors import ParsingError
class LRParser(object):
def __init__(self, lr_table, error_handler):
self.lr_table = lr_table
self.error_handler = error_handler
def parse(self, tokenizer, state=None):
from rply.token import Token
lookahead = None
lookaheadstack =... | bsd-3-clause | 457,821,966,247,470,600 | 35.887324 | 80 | 0.450554 | false |
cortesi/pry | libpry/explain.py | 1 | 3089 | """
A module for printing "nice" messages from assertion statements.
"""
import tokenize, parser
class _Wrap:
def __init__(self, *lines):
self.lines = list(lines)
def __call__(self):
if not self.lines:
raise StopIteration
else:
return self.lines.pop(0)
cla... | mit | 6,707,783,616,712,852,000 | 31.861702 | 80 | 0.471997 | false |
davidmarin/msd | msd/category_data.py | 1 | 3297 | # Copyright 2014-2015 SpendRight, 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 wri... | apache-2.0 | -2,630,639,732,445,051,000 | 26.247934 | 74 | 0.605096 | false |
ThomasMarcel/selection-naturelle | user/models.py | 1 | 1507 | import json
import logging
from google.appengine.ext import ndb
from lib import tools
default_permissions = {'reader': 0, 'administrator': 0}
class User(ndb.Model):
username = ndb.StringProperty()
email = ndb.StringProperty()
password=ndb.StringProperty()
first_name = ndb.StringProperty()
last_... | apache-2.0 | -5,442,921,198,355,938,000 | 28 | 75 | 0.624419 | false |
viz4biz/PyDataNYC2015 | enaml/mpl_canvas.py | 1 | 2532 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | apache-2.0 | -4,969,528,589,405,369,000 | 31.050633 | 87 | 0.600711 | false |
LiGhT1EsS/cobra | cobra/scheduler/report.py | 1 | 4364 | # -*- coding: utf-8 -*-
"""
scheduler.report
~~~~~~~~~~~~~~~~
Implements automation report Cobra data
:author: Feei <feei@feei.cn>
:homepage: https://github.com/wufeifei/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2017 Feei. All rights reserved
"""
i... | mit | 8,891,019,861,325,576,000 | 29.405594 | 139 | 0.548298 | false |
gsnedders/Template-Python | t/directive_test.py | 1 | 4424 | from template import Template
from template.test import TestCase, main
class DirectiveTest(TestCase):
def testDirectives(self):
ttobjs = (('tt', Template()),
('pre', Template({ 'PRE_CHOMP': 1 })),
('post', Template({ 'POST_CHOMP': 1 })),
('trim', Template({ 'INCLUDE_PAT... | artistic-2.0 | 1,009,830,628,860,374,400 | 11.288889 | 76 | 0.419304 | false |
AlexStarov/Shop | applications/delivery2/migrations/0002_auto_20161124_2123.py | 1 | 4727 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import applications.delivery2.models
class Migration(migrations.Migration):
dependencies = [
('delivery2', '0001_initial'),
]
operations = [
migrations.CreateModel(
name=... | apache-2.0 | -7,083,899,874,331,063,000 | 50.380435 | 213 | 0.609477 | false |
mammix2/ccoin-dev | contrib/pyminer/pyminer.py | 1 | 6435 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | mit | 8,596,083,419,467,708,000 | 24.535714 | 84 | 0.648951 | false |
John-Lin/invoice-net | website.py | 1 | 1459 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from bottle import route, run, template, view
#from bottle import jinja2_view
from invoice_prize import *
@route('/hello')
def hello():
return "Hello World!"
@route('/invoice')
@view('invoice_template')
def invoive():
(results, date) = get_result()
date = date... | mit | 5,745,852,764,212,994,000 | 27.607843 | 62 | 0.655243 | false |
jeonghoonkang/BerePi | apps/data.go.kr/get_public_micro_particle.py | 1 | 3613 | # -*- coding: utf-8 -*-
# Author : https://github.com/kmlee408
# https://github.com/jeonghoonkang
'''
부산 URL= http://openapi.airkorea.or.kr/openapi/services/rest/ArpltnInforInqireSvc/getCtprvnRltmMesureDnsty?serviceKey=fCRWi0DoCfoCPMHyDwai3trva10y4qb8mh9aysoHzvLKDWw6Q2bWOsvuM4%2BsRdvE4dPiKqBFD7vj7%2F... | bsd-2-clause | 2,974,692,860,236,816,000 | 36.134146 | 300 | 0.560601 | false |
cysuncn/python | spark/crm/PROC_O_LNA_XDXT_ENT_AUTH.py | 1 | 2786 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_O_LNA_XDXT_ENT_AUTH').setMaster(sys.argv[2])
sc = SparkContext(conf = conf)
s... | gpl-3.0 | 4,066,141,725,929,621,000 | 37.140845 | 170 | 0.574225 | false |
rowinggolfer/openmolar2 | src/lib_openmolar/admin/db_orm/admin_teeth_present.py | 1 | 3093 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
## ##
## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ##
## ... | gpl-3.0 | -1,188,628,920,479,698,700 | 41.369863 | 79 | 0.515681 | false |
dormouse/read | database/models.py | 1 | 5390 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
from sqlalchemy import Column, ForeignKey
from sqlalchemy.dialects.sqlite import INTEGER, TEXT, DATETIME, BOOLEAN
from sqlalchemy.orm import column_property, relationship
from sqlalchemy.sql import func
from sqlalchemy import and_
from database.database im... | lgpl-3.0 | 7,813,540,119,064,889,000 | 27.839779 | 79 | 0.615134 | false |
fengkaicnic/traffic | traffic/crypto.py | 1 | 12797 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | -3,505,826,213,502,774,300 | 34.64624 | 79 | 0.616238 | false |
arpitmathur/CourseAvailabilityChecker | courseCheck.py | 1 | 1898 | __author__ = 'Arpit'
import find
import time
import sys
import gmailer
#initialize datastructures
courses = []
semester = []
email = []
flag = 0
#parse changeme
with open('CHANGEME.txt') as fp:
for line in fp:
if(line[0] == "\n" or line[0] == "#"):
continue
line = line.rstrip()
... | mit | 7,397,628,063,815,961,000 | 27.343284 | 186 | 0.494731 | false |
argonnexraydetector/RoachFirmPy | Roach2DevelopmentTree/pyfiles/pca.py | 1 | 3520 | import numpy as np
from scipy import linalg
import random as rnd
import matplotlib
import matplotlib.pyplot
'''
execfile('pca.py')
p = pulseTrain(1000)
e = eigens(p)
plot(e['eigenvectors'][0])
plot(e['eigenvectors'][1])
testan(e,2);
'''
print 'running pca.py'
def makePulse(L=100.0,t1=10.0,t2=1.0,a1=1.0,a2=1.... | gpl-2.0 | -1,943,123,093,516,862,700 | 20.469512 | 75 | 0.537216 | false |
why2pac/dp-tornado | dp_tornado/helper/io/image/__init__.py | 1 | 12413 | # -*- coding: utf-8 -*-
import tempfile
from dp_tornado.engine.helper import Helper as dpHelper
class ImageHelper(dpHelper):
def compare(self, i1, i2, error=0):
i1 = self.load(i1)
i2 = self.load(i2)
if not i1 or not i2:
return None
s1 = i1.size
s2 = i2.size... | mit | 5,356,887,573,378,849,000 | 29.649383 | 118 | 0.498107 | false |
kgarrison343/recipe-site | polls/views.py | 1 | 1213 | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from .models import Question, Choice
# Create your views here.
class IndexView(generic.ListView):
template_name = 'polls/inde... | mit | -1,490,559,948,873,557,200 | 30.921053 | 82 | 0.693322 | false |
mads-bertelsen/McCode | tools/Python/mcrun/mcrun.py | 1 | 12659 | #!/usr/bin/env python3
from os import mkdir
from os.path import isfile, isdir, abspath, dirname, basename, join
from shutil import copyfile
from optparse import OptionParser, OptionGroup, OptionValueError
from decimal import Decimal, InvalidOperation
from datetime import datetime
from mccode import McStas, Process
fro... | gpl-2.0 | 2,498,550,659,349,612,000 | 30.967172 | 106 | 0.598704 | false |
bobmcwhirter/drools | lib/utility-scripts/docbot-masseur.py | 1 | 2159 | #!/usr/bin/python
#
# This script will flatten out a folder based docbook manual into a docbot friendly "flat" structure
# (and update links in files accordingly)
# Author: Michael Neale
#
import os, sys, shutil
def flatten(root, output) :
if not os.path.isdir(output):
os.mkdir(output)
if not os.pa... | apache-2.0 | 6,316,199,486,616,234,000 | 31.223881 | 123 | 0.552571 | false |
enthought/traitsgui | enthought/pyface/i_directory_dialog.py | 1 | 1873 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | 852,909,260,676,528,000 | 33.685185 | 79 | 0.619861 | false |
ristorantino/fiscalberry | Traductores/TraductorFiscal.py | 1 | 7099 | # -*- coding: utf-8 -*-
from Traductores.TraductorInterface import TraductorInterface
import math
class TraductorFiscal(TraductorInterface):
def dailyClose(self, type):
"Comando X o Z"
# cancelar y volver a un estado conocido
self.comando.cancelAnyDocument()
self.comando.start()
... | mit | -7,636,467,503,041,819,000 | 36.539683 | 133 | 0.552361 | false |
k-j-m/Pyxon | pyxon/decode.py | 1 | 5564 | # Dict of the form:
# { cls: [propname]}
# cls: class that has been written with the @sprop annotation
# propname: name of the property
class_sprops = {}
# Dict of the form:
# {cls: {name:(fn, inv_fn)}}
# cls: class that has been written with @cprop annotations
# name: class attribute name
# fn: function to turn... | mit | 950,680,876,732,445,200 | 28.913978 | 102 | 0.663192 | false |
twitter/pants | src/python/pants/subsystem/subsystem_client_mixin.py | 1 | 6246 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import object
from twitter.common.collections import OrderedSet
from pant... | apache-2.0 | 7,956,763,797,131,338,000 | 36.401198 | 108 | 0.686519 | false |
thieme/rxnconcompiler | tests/test_data/bngl_rules/mapk_data/rules_mapk_bind_data.py | 1 | 2006 | #!/usr/bin/env python
"""
rules_mapk_bind_data.py contains dictionary with BIND reactions from MAPK network.
{rxncon_quick_string: 'Rules': [rule1, rule2 ...], 'Tags': [rtype ...]}
"""
MAPK_BIND_DATA = {
# ASSOCCIATION
# BIND no contingencies
'Hot1_BIND_Hot1Site': {
'Rules':[
'Hot1(AssocHot1Site) + Hot1Sit... | lgpl-3.0 | -9,080,213,258,389,551,000 | 30.857143 | 127 | 0.590229 | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extension_images_operations.py | 1 | 10932 | # 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 | -586,315,393,133,818,900 | 43.620408 | 181 | 0.644621 | false |
kamailio/kamcli | kamcli/commands/cmd_db.py | 1 | 28309 | import os
import sys
import click
from sqlalchemy import create_engine
from sqlalchemy.sql import text
from sqlalchemy.exc import SQLAlchemyError
from kamcli.cli import pass_context
from kamcli.ioutils import ioutils_dbres_print
from kamcli.ioutils import ioutils_formats_list
from kamcli.dbutils import dbutils_exec_sql... | gpl-2.0 | 5,029,327,672,222,936,000 | 26.863189 | 99 | 0.560528 | false |
aidin36/beneath-a-binary-sky | src/actions/water_action.py | 1 | 2052 | # This file is part of Beneath a Binary Sky.
# Copyright (C) 2016, Aidin Gharibnavaz <aidin@aidinhut.com>
#
# Beneath a Binary Sky 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
# Lice... | gpl-3.0 | 8,472,158,464,183,048,000 | 35 | 93 | 0.679825 | false |
mdsalman729/flexpret_project | emulator/concurrit-poplsyntax/concurrit-poplsyntax/bench/pfscan/inputs/in2/config/getpthreadfunctions.py | 1 | 1909 | ##
# getpthreadfunctions.py - outputs the pthread man page to mapthread.txt
# parses the latter, creates a dictionary with pairs
# (functionname, list of function args where last element is result type)
# marshals dictionary to pthreaddict file
#
# Author - Christos Stergiou (chster@eecs.berkeley.edu)
#
import os,re,... | bsd-3-clause | -8,134,398,863,236,522,000 | 33.709091 | 103 | 0.566789 | false |
henaras/sahara | sahara/service/volumes.py | 1 | 8618 | # Copyright (c) 2013 Mirantis 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 writ... | apache-2.0 | -8,491,081,074,740,166,000 | 34.465021 | 79 | 0.640752 | false |
niboshi/chainer | chainerx/_docs/routines.py | 1 | 127367 | import chainerx
from chainerx import _docs
def set_docs():
_docs_creation()
_docs_evaluation()
_docs_indexing()
_docs_linalg()
_docs_logic()
_docs_loss()
_docs_manipulation()
_docs_math()
_docs_sorting()
_docs_statistics()
_docs_connection()
_docs_normalization()
_d... | mit | 5,753,944,707,664,617,000 | 31.275539 | 86 | 0.637194 | false |
jeremiedecock/snippets | python/pygtk/python_gtk3_pygobject/tree_view_cellrender_text_ellipsize.py | 1 | 2818 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
This is a simple Python GTK+3 TreeView CellRenderText snippet.
See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/cellrenderers.html#cellrenderertext
"""
from gi.repository import Gtk as gtk
from gi... | mit | -8,133,782,412,095,077,000 | 39.228571 | 188 | 0.620384 | false |
ikosenn/sms-log-handler | sms_log_handler/sms_handler.py | 1 | 2049 | import datetime
import logging
from typing import Dict
from .utils import import_from_string
class SMSHandler(logging.Handler):
def __init__(self, provider_config: Dict) -> None:
"""
Initializes the SMSHandler
params:
provider_config: The provider configurations.
... | mit | 6,605,223,552,672,128,000 | 33.728814 | 79 | 0.564178 | false |
mistoll/ros_buildfarm | ros_buildfarm/jenkins.py | 1 | 11344 | # Copyright 2014-2016 Open Source Robotics Foundation, 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 applicabl... | apache-2.0 | -2,348,657,980,131,072,000 | 36.071895 | 92 | 0.596703 | false |
MatanRubin/my.vim | virgene/config_mgr.py | 1 | 4165 | import json
import os
from os import path
from typing import List
import jinja2
from virgene.common_defs import SRC_DIR, TEMPLATES_DIR, FEATURES_DIR
from virgene.config import Config
from virgene.default_encoder import DefaultEncoder
from virgene.feature_decoder import FeatureDecoder
class ConfigMgr:
def __init... | gpl-3.0 | -4,063,867,231,558,727,700 | 35.535088 | 80 | 0.612485 | false |
QLRace/minqlx-plugins | spec_delay.py | 1 | 2290 | # 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.
"""
Stops people spectating then quickly joining the 'free' team.
This ... | gpl-3.0 | 6,870,827,062,680,719,000 | 41.407407 | 103 | 0.653275 | false |
vnsofthe/odoo-dev | addons/rhwl_gene/rhwl_gene_check.py | 1 | 1376 | # -*- coding: utf-8 -*-
snp_check={
"rs1042713":["A","G"],
"rs1050152":["C","T"],
"rs1051266":["C","T"],
"rs1136410":["A","G"],
"rs1229984":["C","T"],
"rs1234315":["C","T"],
"rs12720461":["C","T"],
"rs13306517":["A","G"],
"rs1544410":["C","T"],
"rs16944":["A","G"],
"rs1695":["A","G"],
"rs1799724":["C","T"],
"rs1799782"... | agpl-3.0 | -3,808,686,540,482,914,000 | 20.5 | 23 | 0.457122 | false |
cmancone/mygrations | tests/formats/mysql/definitions/test_database.py | 1 | 3304 | import unittest
from mygrations.formats.mysql.file_reader.database import database as database_reader
from mygrations.formats.mysql.file_reader.create_parser import create_parser
class test_database(unittest.TestCase):
def _get_sample_db(self):
strings = [
"""
CREATE TABLE `logs` (... | mit | 6,008,796,254,061,185,000 | 31.07767 | 85 | 0.521186 | false |
Tsumiki-Chan/Neko-Chan | commands/purge.py | 1 | 1524 | from functions import search, logger
DESC = "Delete x messages"
USAGE="purge [*amount*] [*user* `optional`]"
async def init(bot):
chat=bot.message.channel
try:
if len(bot.args) == 0:
await bot.sendMessage( "Didn't receive any arguments! Usage: {}".format(USAGE))
return False
... | gpl-3.0 | -421,751,238,183,873,100 | 33.636364 | 92 | 0.509186 | false |
gigglearrows/anniesbot | pajbot/models/twitter.py | 1 | 5731 | import logging
from datetime import datetime
from pajbot.tbutil import time_since, tweet_prettify_urls
from pajbot.models.db import DBManager, Base
import tweepy
from sqlalchemy import Column, Integer, String
log = logging.getLogger('pajbot')
class TwitterUser(Base):
__tablename__ = 'tb_twitter_following'
... | mit | -5,920,211,949,906,276,000 | 38.524138 | 162 | 0.583842 | false |
mSOHU/http2 | test/benchmark2.py | 1 | 1422 | # -*- coding: utf-8 -*-
"""
copied from https://github.com/bdarnell/tornado_http2/blob/master/tornado_http2/test/benchmark.py
"""
import time
import logging
from tornado.ioloop import IOLoop
from tornado.options import define, options, parse_command_line, enable_pretty_logging
from http2 import SimpleAsyncHTTP2Cl... | apache-2.0 | -6,296,171,402,591,293,000 | 25.830189 | 97 | 0.658228 | false |
JenningsWu/personality-extractor | Classifier.py | 1 | 8693 |
# Classify partited data
# sentences description type(desc_type):action(0), speech(1), description(2)
# Character Personality type(personality):
# [impulsive(1)/calm(0),Extrovert(1)/Introvert(0),
# Optimistic(1)/pessimistic(0)]
import glob
import json
import io
# Data Structures
# {word:[probability of 3 ... | gpl-3.0 | 8,126,149,522,154,109,000 | 33.224409 | 80 | 0.484643 | false |
masasin/advent_of_code_2015 | day_11.py | 1 | 3790 | """
http://adventofcode.com/day/10
--- Day 11: Corporate Policy ---
Santa's previous password expired, and he needs help choosing a new one.
To help him remember his new password after the old one expires, Santa has
devised a method of coming up with a password based on the previous one.
Corporate policy dictates th... | mit | 9,128,645,441,959,390,000 | 31.956522 | 80 | 0.683113 | false |
NicolasHug/Surprise | surprise/dataset.py | 1 | 9634 | """
The :mod:`dataset <surprise.dataset>` module defines the :class:`Dataset` class
and other subclasses which are used for managing datasets.
Users may use both *built-in* and user-defined datasets (see the
:ref:`getting_started` page for examples). Right now, three built-in datasets
are available:
* The `movielens-... | bsd-3-clause | 877,863,226,206,800,500 | 34.289377 | 79 | 0.585219 | false |
dpressel/baseline | api-examples/layers_classify_pytorch.py | 1 | 6102 | import argparse
import baseline.embeddings
from eight_mile.confusion import ConfusionMatrix
import baseline
from eight_mile.pytorch.optz import OptimizerManager, EagerOptimizer
import baseline.pytorch.embeddings
import eight_mile.pytorch.layers as L
import torch.nn.functional as F
from torch.utils.data import Dataset, ... | apache-2.0 | 7,061,987,987,167,613,000 | 36.666667 | 182 | 0.653228 | false |
usc-isi/extra-specs | nova/api/openstack/compute/contrib/quotas.py | 1 | 3875 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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/... | apache-2.0 | -5,099,529,885,917,966,000 | 33.598214 | 79 | 0.634065 | false |
isotoma/alm.solrindex | alm/solrindex/schema.py | 1 | 2814 |
"""Parser of a Solr schema.xml"""
from alm.solrindex.interfaces import ISolrField
from alm.solrindex.interfaces import ISolrFieldHandler
from alm.solrindex.interfaces import ISolrSchema
from elementtree.ElementTree import parse
from zope.component import getUtility
from zope.component import queryUtility
from zope.in... | bsd-3-clause | 2,881,713,634,405,479,000 | 29.586957 | 75 | 0.569652 | false |
yaukwankiu/armor | tests/modifiedMexicanHatTest5a.py | 1 | 2438 | # supplementing modifiedMexicanHatTest5.py
# outputing the charts, given the results
import numpy as np
import matplotlib.pyplot as plt
from armor import pattern
from armor import defaultParameters as dp
dbz = pattern.DBZ
DS = pattern.DBZstream
dataFolder = dp.root + "labLogs/2014-5-2-modifiedMexicanHatTest5/"
o... | cc0-1.0 | -1,526,503,526,948,186,400 | 38.967213 | 113 | 0.609516 | false |
Abdoctor/behave | behave/i18n.py | 1 | 27520 | # -*- coding: UTF-8 -*-
# -- FILE GENERATED BY: convert_i18n_yaml.py with i18n.yml
# pylint: disable=line-too-long
languages = \
{'ar': {'and': [u'*', u'\u0648'],
'background': [u'\u0627\u0644\u062e\u0644\u0641\u064a\u0629'],
'but': [u'*', u'\u0644\u0643\u0646'],
'examples': [u'\u0627\u0645\u06... | bsd-2-clause | -8,859,400,245,196,874,000 | 43.820847 | 149 | 0.470712 | false |
ingwinlu/simpleMediaCenter | test/test_AutoPlayerSelect.py | 1 | 2359 | from simpleMediaCenter.interface.Interface import InterfaceListable
from simpleMediaCenter.player.Omxplayer import Omxplayer
from simpleMediaCenter.player.Twitchplayer import Twitchplayer
from simpleMediaCenter.player.Youtubeplayer import Youtubeplayer
from simpleMediaCenter.browser.Browser import *
import logging
impo... | gpl-2.0 | -2,013,993,086,357,953,300 | 35.859375 | 114 | 0.64858 | false |
matthiaskrgr/cppcheck | addons/naming.py | 1 | 2383 | #!/usr/bin/env python
#
# cppcheck addon for naming conventions
#
# Example usage (variable name must start with lowercase, function name must start with uppercase):
# $ cppcheck --dump path-to-src/
# $ python addons/naming.py --var='[a-z].*' --function='[A-Z].*' path-to-src/*.dump
#
import cppcheckdata
import sys
imp... | gpl-3.0 | -6,974,778,811,751,254,000 | 34.567164 | 116 | 0.5577 | false |
scbzyhx/sdn_access_network | log_info.py | 1 | 1618 | # Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | gpl-2.0 | -2,271,025,446,576,273,400 | 33.425532 | 69 | 0.68047 | false |
enthought/traitsgui | enthought/pyface/action/action_item.py | 1 | 4849 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | 2,791,425,329,490,104,300 | 32.673611 | 79 | 0.541761 | false |
simleo/pydoop-features | pyfeatures/app/deserialize.py | 1 | 2362 | # BEGIN_COPYRIGHT
#
# Copyright (C) 2014-2017 Open Microscopy Environment:
# - University of Dundee
# - CRS4
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/lice... | apache-2.0 | 2,729,805,358,433,821,700 | 29.675325 | 77 | 0.664691 | false |
lakshmi-kannan/st2 | st2common/st2common/models/api/action.py | 1 | 24297 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | 578,311,950,099,190,000 | 34.52193 | 100 | 0.503519 | false |
cagriulas/algorithm-analysis-17 | w3/complexity_graphic.py | 1 | 3297 | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import random
import time
def maxsubsumOn(vector):
max_ending_here = max_so_far = vector[0]
for x in vector[1:]:
max_ending_here = max(x, max_ending_here + x)
max_so_far = max(max_so_f... | unlicense | -8,398,150,691,713,920,000 | 25.376 | 58 | 0.533374 | false |
mvaled/sentry | src/sentry/south_migrations/0504_fix_state.py | 1 | 139898 | # -*- 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):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... | bsd-3-clause | -5,910,418,855,912,723,000 | 94.820548 | 255 | 0.579794 | false |
maas/maas | src/maasserver/models/tests/test_filesystemgroup.py | 1 | 104094 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for `FilesystemGroup`."""
import random
import re
from unittest import skip
from uuid import uuid4
from django.core.exceptions import PermissionDenied, ValidationE... | agpl-3.0 | 4,331,299,812,725,828,600 | 36.123395 | 79 | 0.574106 | false |
MGEScan/mgescan | mgescan/utils.py | 1 | 1147 | import time
import os, errno
import subprocess as sub
def get_abspath(path):
try:
return os.path.abspath(path)
except:
# print [DEBUG] Failed to convert a path to an absolute path
return path
def create_directory(path, skipifexists=True):
if not os.path.exists(path):
os.mak... | gpl-3.0 | 8,974,377,971,734,298,000 | 25.674419 | 79 | 0.61116 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.