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 |
|---|---|---|---|---|---|---|---|---|---|---|
ninuxorg/netdiff | tests/test_batman.py | 1 | 4523 | import os
import networkx
from netdiff import BatmanParser, diff
from netdiff.exceptions import ParserError
from netdiff.tests import TestCase
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
iulinet = open('{0}/static/batman.json'.format(CURRENT_DIR)).read()
iulinet2 = open('{0}/static/batman-1+1.json'.for... | mit | -7,793,895,834,004,656,000 | 37.991379 | 81 | 0.608004 | false |
RyanChinSang/ECNG3020-ORSS4SCVI | BETA/dev02/test3.py | 1 | 4947 | from __future__ import print_function
from threading import Thread
import sys
import cv2
import numpy as np
import queue
from BETA.dev02.test2 import avg_color
from BETA.dev02.test4 import t2s_say
class VideoStream:
def __init__(self, src=None, height=None, width=None, ratio=None):
cv2.setUseOptimized(Tru... | gpl-3.0 | -4,433,979,133,669,497,000 | 34.092199 | 110 | 0.538508 | false |
wangtaoking1/hummer | backend/kubernetes/k8sclient.py | 1 | 9953 | import json
import requests
import logging
from backend.kubernetes.namespace import Namespace
from backend.kubernetes.replicationcontroller import Controller
from backend.kubernetes.service import Service
from backend.kubernetes.volume import PersistentVolume, PersistentVolumeClaim
from backend.kubernetes.autoscaler i... | apache-2.0 | -1,566,903,951,912,053,800 | 32.969283 | 80 | 0.594394 | false |
martijnvermaat/rpclib | src/rpclib/util/etreeconv.py | 1 | 3585 |
#
# rpclib - Copyright (C) Rpclib contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This lib... | lgpl-2.1 | 138,900,269,373,878,800 | 32.194444 | 80 | 0.660251 | false |
prymitive/upaas-admin | upaas_admin/apps/applications/models.py | 1 | 31729 | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2013-2014 by Łukasz Mierzwa
:contact: l.mierzwa@gmail.com
"""
from __future__ import unicode_literals
import os
import datetime
import logging
import tempfile
import shutil
import time
import re
from copy import deepcopy
from mongoengine import (Document, Dat... | gpl-3.0 | 8,420,968,401,472,349,000 | 36.952153 | 79 | 0.579078 | false |
googleapis/googleapis-gen | google/cloud/billing/budgets/v1/billing-budgets-v1-py/google/cloud/billing/budgets/__init__.py | 1 | 2304 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -5,013,858,049,998,541,000 | 44.176471 | 105 | 0.796875 | false |
Fokko/incubator-airflow | airflow/hooks/hive_hooks.py | 1 | 39213 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 80,130,069,523,703,410 | 38.291583 | 93 | 0.543468 | false |
facom/GeoTrans | system.py | 1 | 1241 | from geotrans import *
System=dict2obj(dict(\
#########################################
#SYSTEM PRIMARY PARAMETERS
#########################################
#//////////////////////////////
#DETECTOR
#//////////////////////////////
Ddet=0.5,#Aperture, m
qeff=1.0,#Quantum efficiency
#//////////////////////////////
#STAR... | gpl-2.0 | -1,497,280,718,787,404,000 | 21.981481 | 41 | 0.446414 | false |
elego/tkobr-addons | tko_project_task_status/models/project_task.py | 1 | 5572 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# ThinkOpen Solutions Brasil
# Copyright (C) Thinkopen Solutions <http://www.tkobr.com>.
#
# This... | agpl-3.0 | 3,694,331,997,314,282,500 | 43.935484 | 170 | 0.618988 | false |
v-legoff/accertin | lyntin/ui/message.py | 1 | 1613 | #######################################################################
# This file is part of Lyntin.
# copyright (c) Free Software Foundation 2001, 2002
#
# Lyntin is distributed under the GNU General Public License license. See the
# file LICENSE for distribution details.
# $Id: message.py,v 1.1 2003/08/01 00:14:52... | gpl-3.0 | -5,694,003,833,159,969,000 | 25.883333 | 78 | 0.578425 | false |
loads/molotov | molotov/tests/test_sharedconsole.py | 1 | 2723 | import unittest
import asyncio
import sys
import os
import re
import io
from molotov.util import multiprocessing
from molotov.sharedconsole import SharedConsole
from molotov.tests.support import dedicatedloop, catch_output
OUTPUT = """\
one
two
3
TypeError\\("unsupported operand type(.*)?
TypeError\\("unsupported op... | apache-2.0 | 5,061,824,458,593,446,000 | 26.505051 | 82 | 0.59126 | false |
rbooth200/DiscEvolution | DiscEvolution/driver.py | 1 | 12630 | # driver.py
#
# Author: R. Booth
# Date: 17 - Nov - 2016
#
# Combined model for dust, gas and chemical evolution
################################################################################
from __future__ import print_function
import numpy as np
import os
from .photoevaporation import FixedExternalEvaporation
from... | gpl-3.0 | -6,679,079,293,049,471,000 | 31.976501 | 190 | 0.553286 | false |
bcoca/ansible | lib/ansible/modules/dnf.py | 1 | 53556 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2015 Cristian van Ee <cristian at cvee.org>
# Copyright 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com>
# Copyright 2018 Adam Miller <admiller@redhat.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future_... | gpl-3.0 | -6,126,044,989,395,313,000 | 38.495575 | 156 | 0.546064 | false |
ppietrasa/grpc | tools/distrib/check_copyright.py | 1 | 5538 | #!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# 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 of source code must retain the above copyright
# notice, this li... | bsd-3-clause | 5,643,336,900,783,706,000 | 30.465909 | 83 | 0.631636 | false |
foosel/OctoPrint | src/octoprint/access/users.py | 1 | 40260 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
from flask_login im... | agpl-3.0 | -4,884,698,765,578,790,000 | 30.650943 | 214 | 0.663214 | false |
QuantEcon/QuantEcon.py | quantecon/quad.py | 1 | 31180 | """
Defining various quadrature routines.
Based on the quadrature routines found in the CompEcon toolbox by
Miranda and Fackler.
References
----------
Miranda, Mario J, and Paul L Fackler. Applied Computational Economics
and Finance, MIT Press, 2002.
"""
import math
import numpy as np
import scipy.linalg as la
from ... | bsd-3-clause | -5,027,179,250,230,418,000 | 25.135792 | 78 | 0.56982 | false |
mosbys/Clone | Cloning_v1/drive.py | 1 | 3838 | import argparse
import base64
import json
import numpy as np
import socketio
import eventlet
import eventlet.wsgi
import time
from PIL import Image
from PIL import ImageOps
from flask import Flask, render_template
from io import BytesIO
from random import randint
from keras.models import model_from_json
... | gpl-2.0 | 8,273,103,825,005,780,000 | 32.285714 | 112 | 0.663627 | false |
EarthLifeConsortium/elc_api | swagger_server/elc/geog.py | 1 | 2706 | """Functions related to geographic coordinates and paleo conversions."""
def get_geog(coords, age, options):
"""Parse paleo geography parameters."""
from ..elc import ages
modern = [x.strip() for x in coords.split(',')]
if '' in modern or len(modern) != 2:
msg = 'Second parameter not found in... | apache-2.0 | -4,612,773,691,188,010,000 | 29.404494 | 74 | 0.570214 | false |
bisguzar/lolasistan | src/lang.py | 1 | 1635 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import config
connectFailed = {
'en': 'connect failed',
'tr': 'bağlantı başarısız'
}
connected = {
'en': '[System] Connected',
'tr': '[Sistem] Bağlanıldı'
}
authFailed = {
'en': 'auth failed',
'tr': 'giriş başarısız'
}
authSucces = {
'en': '[System] auth succesf... | gpl-3.0 | -653,396,016,554,987,500 | 19.253165 | 89 | 0.61375 | false |
aplicatii-romanesti/allinclusive-kodi-pi | .kodi/addons/plugin.video.salts/scrapers/watch8now_scraper.py | 1 | 3879 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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.
T... | apache-2.0 | -4,866,924,595,996,970,000 | 38.181818 | 199 | 0.601444 | false |
jstasiak/travis-solo | setup.py | 1 | 2016 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
from setuptools import setup
from os.path import abspath, dirname, join
PROJECT_ROOT = abspath(dirname(__file__))
with open(join(PROJECT_ROOT, 'README.rst')) as f:
readme = f.read()
with open(join(PROJECT_ROOT, 'travis_solo.p... | mit | -6,734,856,298,556,025,000 | 31 | 88 | 0.613095 | false |
SymbiFlow/edalize | edalize/yosys.py | 1 | 4456 | # Copyright edalize contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
from edalize.edatool import Edatool
logger = logging.getLogger(__name__)
class Yosys(Edatool):
argtypes = ['vlogdefine', 'vlogparam']
@... | bsd-2-clause | -3,073,453,257,561,716,000 | 41.037736 | 119 | 0.467235 | false |
Hpower96/Power | backend/thread.py | 1 | 1338 | #!/usr/bin/env python
from multiprocessing import Process,Lock
import sys,os,time
script = sys.argv[0]
list = [1000,1200,1400,1600,1800,10000]
Proce_num_list = []
def worker(num):
try:
#print p.name, p.pid, os.getppid()
if int(num) == int(list[-1]):
print 'Check out automatically exit... | gpl-3.0 | 2,627,051,263,523,876,000 | 28.733333 | 91 | 0.480568 | false |
johanvdw/niche_vlaanderen | niche_vlaanderen/spatial_context.py | 1 | 7681 | from affine import Affine
from textwrap import dedent
import warnings
class SpatialContextError(Exception):
"""
"""
class SpatialContext(object):
"""Stores the spatial context of the grids in niche
This class is based on the rasterio model of a grid.
Attributes
----------
transform: A... | mit | 4,143,655,543,510,224,000 | 32.395652 | 79 | 0.573102 | false |
pdf/beets | setup.py | 1 | 2918 | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation th... | mit | -138,347,469,473,975,420 | 30.376344 | 71 | 0.605552 | false |
dokterbob/django-shopkit | shopkit/core/utils/fields.py | 1 | 2814 | # Copyright (C) 2010-2011 Mathijs de Bruin <mathijs@mathijsfietst.nl>
#
# This file is part of django-shopkit.
#
# django-shopkit 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 2, or (at... | agpl-3.0 | 908,442,149,540,644,500 | 32.105882 | 86 | 0.680526 | false |
DataDog/integrations-core | nfsstat/datadog_checks/nfsstat/config_models/shared.py | 1 | 1331 | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel, root_validator, validator
from datadog_checks.base.utils.functions import identity
from datadog_checks.base... | bsd-3-clause | 6,975,200,206,133,944,000 | 29.25 | 108 | 0.695718 | false |
clchiou/garage | py/nanomsg/tests/test_errors.py | 1 | 1124 | import unittest
from nanomsg import errors
from nanomsg.constants import Error
class ErrorsTest(unittest.TestCase):
def test_errors(self):
varz = vars(errors)
lookup_table = varz['_ERRORS']
for error in Error:
self.assertIn(error.name, errors.__all__)
self.asse... | mit | 8,170,660,661,994,059,000 | 26.414634 | 71 | 0.598754 | false |
chroth/domainhog | main.py | 1 | 1860 | import sys
import logging
import data_handler
def update_data(context):
print 'Update data'
data_handler.update()
return 0, ""
def search(context):
if not data_handler.has_data():
context["logger"].debug("Data is missing")
update_data(context)
search_word = context['arguments'][1... | mit | -1,027,535,432,958,796,500 | 23.473684 | 78 | 0.585484 | false |
Wikidata/QueryAnalysis | tools/QueryAnalysis.py | 1 | 7379 | import argparse
import calendar
from datetime import datetime
import glob
import os
import shutil
import subprocess
import sys
import gzip
import unifyQueryTypes
from utility import utility
import config
os.nice(19)
months = {'january': [1, 31],
'february': [2, 28],
'march': [3, 31],
'ap... | apache-2.0 | -7,126,092,825,844,727,000 | 40.460674 | 191 | 0.589511 | false |
beiko-lab/gengis | bin/Lib/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/large_scale.py | 1 | 1436 | from __future__ import division, print_function, absolute_import
from scipy import array, arange, ones, sort, cos, pi, rand, \
set_printoptions, r_
from scipy.sparse.linalg import lobpcg
from scipy import sparse
from pylab import loglog, show, xlabel, ylabel, title
set_printoptions(precision=8,linewidth=90... | gpl-3.0 | 3,670,805,974,696,404,500 | 24.592593 | 102 | 0.627437 | false |
t-animal/helfertool | web/views/helfer.py | 1 | 11105 | # -*- coding: utf-8 -*-
from web.utils import render_template, expose, url_for, run_command_output, invalid_form_error
from web.session_utils import create_session, is_user_admin
from web.login_utils import require_login, require_admin, check_login_credentials, _find_userid_byname, _find_username_byid
from werkzeug i... | gpl-2.0 | 5,990,155,164,621,906,000 | 34.174603 | 294 | 0.718231 | false |
MyRobotLab/pyrobotlab | home/moz4r/deprecated/Inmoov/InmoovScript_InmoovAI/INMOOV-AI_WeatherMap_Meteo.py | 1 | 2432 | global cur_temperature
global low_temperature
global high_temperature
global todayforecast
cur_temperature=0
low_temperature=0
high_temperature=0
todayforecast=0
def Meteo(Town_Parameter):
try:
if Town_Parameter=="0":
Town_Parameter=Town
print "http://api.openweathermap.org/data/2.5/weather?q=" + Town_Paramete... | apache-2.0 | 2,056,180,113,262,557,000 | 35.848485 | 292 | 0.659128 | false |
kyprizel/certificate-transparency | python/ct/client/log_client.py | 1 | 39425 | """RFC 6962 client API."""
import base64
import json
import collections
from ct.client.db import database
from ct.crypto import verify
from ct.proto import client_pb2
import gflags
import httplib
import httplib2
import logging
import random
import urllib
import urlparse
from twisted.internet import defer
from twisted.... | apache-2.0 | -5,996,517,393,769,708,000 | 38.189861 | 98 | 0.576791 | false |
alexaltair/calico | calico/felix/fsocket.py | 1 | 8141 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 Metaswitch Networks
# 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/LIC... | apache-2.0 | -2,236,228,492,208,511,500 | 33.205882 | 79 | 0.557548 | false |
sserrot/champion_relationships | venv/Lib/site-packages/IPython/extensions/sympyprinting.py | 1 | 1075 | """
**DEPRECATED**
A print function that pretty prints sympy Basic objects.
:moduleauthor: Brian Granger
Usage
=====
Once the extension is loaded, Sympy Basic objects are automatically
pretty-printed.
As of SymPy 0.7.2, maintenance of this extension has moved to SymPy under
sympy.interactive.ipythonprinting, any m... | mit | -2,789,169,341,588,938,000 | 32.59375 | 78 | 0.541395 | false |
rhelmer/socorro-lib | socorro/external/postgresql/crontabber_state.py | 1 | 2109 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
import logging
from socorro.external.postgresql.base import PostgreSQLBase
from socorro.lib import datetime... | mpl-2.0 | 177,145,684,015,338,780 | 29.565217 | 78 | 0.497392 | false |
ralphhughes/TempLogger | DHT22.py | 1 | 7329 | #!/usr/bin/env python
# 2014-07-11 DHT22.py
import time
import atexit
import sys
import pigpio
class sensor:
"""
A class to read relative humidity and temperature from the
DHT22 sensor. The sensor is also known as the AM2302.
The sensor can be powered from the Pi 3V3 or the Pi 5V rail.
Powering fr... | mit | -9,112,710,096,243,817,000 | 25.363309 | 80 | 0.541957 | false |
rzarzynski/tempest | tempest/api/compute/keypairs/test_keypairs_negative.py | 1 | 4517 | # Copyright 2012 OpenStack Foundation
# Copyright 2013 IBM Corp
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICE... | apache-2.0 | -3,770,412,985,485,290,500 | 43.284314 | 78 | 0.659951 | false |
ESSS/conda-devenv | tests/test_include.py | 1 | 2737 | import pytest
import yaml
from conda_devenv.devenv import handle_includes, render_jinja
def obtain_yaml_dicts(root_yaml_filename):
contents = open(root_yaml_filename, "r").read()
contents = render_jinja(contents, filename=root_yaml_filename, is_included=False)
root_yaml = yaml.safe_load(contents)
di... | mit | -339,116,720,365,899,650 | 27.510417 | 85 | 0.61308 | false |
joxer/Baka-No-Voltron | tmp/android.dist/private/renpy/display/gesture.py | 1 | 3800 | # Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | gpl-2.0 | 7,992,540,546,767,366,000 | 26.737226 | 92 | 0.61 | false |
CGATOxford/proj029 | documentation/source/conf.py | 1 | 10796 | # -*- coding: utf-8 -*-
#
# Combined microbiome and host profiling in a mouse model of colitis suggests host immune activity drives changes in the gut micro-environment that influence both community structure and gene expression documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 20 13:43:... | bsd-3-clause | -2,652,090,745,792,702,000 | 36.880702 | 342 | 0.729159 | false |
WanderingStar/rpi | shutdown_button.py | 1 | 2040 | #!/usr/bin/python
# This script is used with an LED and a momentary button, perhaps the same,
# like https://www.sparkfun.com/products/10440
# The LED should be wired to GPIO pin 23 and the button to pin 24.
# The idea is that it is run at startup (for example, from rc.local)
# It turns the LED on to indicate that it'... | mit | -1,626,048,357,948,252,000 | 28.142857 | 79 | 0.676961 | false |
tanglu-org/merge-o-matic | deb/controlfile.py | 1 | 5047 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# deb/controlfile.py - parse debian control files
#
# Copyright © 2008 Canonical Ltd.
# Author: Scott James Remnant <scott@ubuntu.com>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of version 3 of the GNU General Public Licen... | gpl-3.0 | -9,124,939,611,046,515,000 | 31.346154 | 71 | 0.551724 | false |
phobson/conda-env | conda_env/exceptions.py | 1 | 2210 | class CondaEnvException(Exception):
pass
class CondaEnvRuntimeError(RuntimeError, CondaEnvException):
pass
class EnvironmentFileNotFound(CondaEnvException):
def __init__(self, filename, *args, **kwargs):
msg = '{} file not found'.format(filename)
self.filename = filename
super(En... | bsd-3-clause | -7,228,944,400,857,512,000 | 33 | 80 | 0.669683 | false |
cancerregulome/gidget | commands/feature_matrix_construction/main/parse_tcga_repeat_features.py | 1 | 20264 | '''
Created on Jun 18, 2012
this is a refactoring of sheila's new_Level3_matrix script into an OO
approach
this test version duplicates features to test tsvIO.duplicateFeatureLabels()
@author: m.miller
'''
import ConfigParser
from datetime import datetime
import os
import sys
import traceback
import miscIO
import ... | mit | 728,553,990,787,473,900 | 39.206349 | 194 | 0.577625 | false |
mganeva/mantid | Framework/PythonInterface/test/python/mantid/geometry/ComponentInfoTest.py | 1 | 20085 | # 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 | 8,748,822,791,729,085,000 | 35.584699 | 119 | 0.614439 | false |
abhikeshav/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_drivers_media_eth_oper.py | 1 | 182469 | """ Cisco_IOS_XR_drivers_media_eth_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR drivers\-media\-eth package operational data.
This module contains definitions
for the following management objects\:
ethernet\-interface\: Ethernet operational data
Copyright (c) 2013\-2015 by Cisco Sy... | apache-2.0 | 5,103,785,533,784,643,000 | 29.011349 | 325 | 0.500112 | false |
gurneyalex/odoo | addons/stock/wizard/stock_picking_return.py | 4 | 10775 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_round
class ReturnPickingLine(models.TransientModel):
_name = "stock.return.picking.line"
_... | agpl-3.0 | 6,509,121,793,401,225,000 | 54.225641 | 198 | 0.58297 | false |
cliixtech/bigorna | tests/tasks/test_task_factory.py | 1 | 1725 | from unittest import TestCase
from unittest.mock import create_autospec
from nose.tools import istest, raises
from bigorna.commons.config import Config
from bigorna.tasks import TaskFactory, TaskDefinition
class TaskFactoryTest(TestCase):
def setUp(self):
TestCase.setUp(self)
self.out = "%s.out"... | gpl-3.0 | 6,829,806,794,336,506,000 | 30.363636 | 89 | 0.627246 | false |
hrishioa/Aviato | flask/Scripts/gdal_polygonize.py | 1 | 6499 | #!C:\Users\SeanSaito\Dev\aviato\flask\Scripts\python.exe
# -*- coding: utf-8 -*-
#******************************************************************************
# $Id$
#
# Project: GDAL Python Interface
# Purpose: Application for converting raster data to a vector polygon layer.
# Author: Frank Warmerdam, warm... | gpl-2.0 | -8,949,319,689,744,370,000 | 28.274775 | 99 | 0.511002 | false |
3ffusi0on/Addicted-to-XDCC | Addict7ed.py | 1 | 3211 | #!/usr/bin/env python3.4
import sys
from PyQt4 import QtGui
import re
import os, sys
import subprocess
import urllib.request
import urllib.error
import hashlib
#TODO
#-input for the link of xdcc server
#-dl button ? or automatize the action
#- /!\ Configuration file /!\
def get_hash(name):
readsize = 64 * 1024
... | gpl-2.0 | -566,545,068,900,936,960 | 29.875 | 119 | 0.624416 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_express_route_service_providers_operations.py | 1 | 5203 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 8,445,812,758,290,213,000 | 45.044248 | 135 | 0.648472 | false |
Firefly-Automation/Firefly | Firefly/automation/door_motion_triggered_lights/metadata.py | 1 | 1710 | AUTHOR = 'Zachary Priddy. (me@zpriddy.com)'
TITLE = 'Motion/Door Triggered Lights'
METADATA = {
'title': TITLE,
'author': AUTHOR,
'commands': ['execute'],
'interface': {
'sensors': {
'motion': {
'context': 'motion sensors to use to trigger light',
'filter': {
'mot... | apache-2.0 | -654,213,190,019,018,900 | 22.108108 | 75 | 0.433918 | false |
fp12/achallonge | challonge/enums.py | 1 | 1529 | from enum import Enum
class TournamentState(Enum):
""" State a tournament can be in """
pending = 'pending'
open_ = 'open' #: can't use `open`
complete = 'complete'
in_progress = 'in progress'
class TournamentType(Enum):
""" Type of a tournament """
single_elimination = 'single eliminat... | mit | 7,507,871,851,981,742,000 | 26.8 | 105 | 0.657292 | false |
BhallaLab/moose | moose-gui/plugins/kkitOrdinateUtil.py | 1 | 19921 | __author__ = "HarshaRani"
__credits__ = ["Upi Lab"]
__license__ = "GPL3"
__version__ = "1.0.0"
__maintainer__ = "HarshaRani"
__email__ = "hrani@ncbs.res.in"
__status__ = "Development"
__updated__ = "Oct 26 2018"
'''
2018
Oct 26: xfer molecules are not put into screen
Se... | gpl-3.0 | -3,179,577,821,720,425,000 | 39.821721 | 159 | 0.560765 | false |
shigin/radist | radist/content.py | 1 | 10660 | """This module contains method to handle varios URI scheme."""
import os, sys
import re
import itertools
import urllib2
import ftplib
import socket
import netrc
from warnings import warn
from radist.helpers import R_SUB2
scheme = re.compile('(?P<scheme>[a-z]+)://(?P<host>[a-z:0-9.]+)/(?P<path>.*)')
localhost = socket.g... | bsd-2-clause | -7,608,309,640,738,216,000 | 27.810811 | 87 | 0.57636 | false |
danakj/chromium | build/gyp_environment.py | 2 | 1214 | # Copyright 2014 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.
"""
Sets up various automatic gyp environment variables. These are used by
gyp_chromium and landmines.py which run at different stages of runhooks. To
make s... | bsd-3-clause | -993,198,361,419,077,900 | 36.9375 | 77 | 0.740527 | false |
strongswan/strongTNC | apps/devices/paging.py | 1 | 5001 | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import math
from .models import Device, Product
from apps.core.models import Session
from apps.devices.models import Device
from apps.swid.models import Event
from apps.front.paging import ProducerFactory
# PA... | agpl-3.0 | -8,092,494,106,131,860,000 | 34.978417 | 92 | 0.634473 | false |
openstack/sahara | sahara/utils/files.py | 1 | 1190 | # 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 | 3,584,808,584,476,616,000 | 28.75 | 69 | 0.708403 | false |
adviti/melange | thirdparty/google_appengine/google/storage/speckle/python/django/backend/base.py | 1 | 8172 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -9,148,859,095,146,350,000 | 33.05 | 80 | 0.706681 | false |
imclab/confer | server/auth.py | 1 | 12729 | import json, sys, re, hashlib, smtplib, base64, urllib, os
from django.http import *
from django.shortcuts import render_to_response
from django.views.decorators.csrf import csrf_exempt
from django.core.context_processors import csrf
from django.core.validators import email_re
from django.db.utils import IntegrityErro... | mit | -7,501,670,995,491,163,000 | 30.585608 | 237 | 0.623537 | false |
ingadhoc/odoo-support | server_mode/__manifest__.py | 1 | 1354 | ##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | lgpl-3.0 | 2,360,634,318,469,988,000 | 33.717949 | 78 | 0.559823 | false |
PuckCh/battlenet | battlenet/__init__.py | 1 | 1307 | from .connection import Connection
from .constants import UNITED_STATES
from .constants import EUROPE
from .constants import KOREA
from .constants import TAIWAN
from .constants import CHINA
from .enums import RACE
from .enums import CLASS
from .enums import QUALITY
from .enums import RACE_TO_FACTION
from .enums impor... | mit | 3,427,076,931,640,688,000 | 25.673469 | 41 | 0.821729 | false |
apple/llvm-project | lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py | 5 | 5715 | import unittest2
import gdbremote_testcase
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
mydir = TestBase.compute_mydir(__file__)
THREAD_COUNT = 5
def gather_... | apache-2.0 | -9,150,978,879,917,957,000 | 39.531915 | 96 | 0.583552 | false |
RealTimeWeb/wikisite | MoinMoin/action/thread_monitor.py | 1 | 1932 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - Thread monitor action
Shows the current traceback of all threads.
@copyright: 2006 MoinMoin:AlexanderSchremmer
@license: GNU GPL, see COPYING for details.
"""
import os, time
from StringIO import StringIO
from MoinMoin import Page, wikiutil
from MoinMoin.ut... | apache-2.0 | 5,275,388,841,327,920,000 | 30.16129 | 88 | 0.64234 | false |
avrem/ardupilot | libraries/AP_Terrain/tools/create_terrain.py | 1 | 11287 | #!/usr/bin/env python
'''
create ardupilot terrain database files
'''
from MAVProxy.modules.mavproxy_map import srtm
import math, struct, os, sys
import crc16, time, struct
# MAVLink sends 4x4 grids
TERRAIN_GRID_MAVLINK_SIZE = 4
# a 2k grid_block on disk contains 8x7 of the mavlink grids. Each
# grid block overlaps... | gpl-3.0 | 3,621,082,822,801,622,500 | 36.749164 | 124 | 0.602552 | false |
sxslex/rows | rows/utils.py | 1 | 4354 | # coding: utf-8
# Copyright 2014-2015 Álvaro Justen <https://github.com/turicas/rows/>
#
# 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 yo... | gpl-3.0 | -4,946,662,462,204,558,000 | 29.229167 | 78 | 0.643924 | false |
bpwook/auto-cert-kit | autocertkit/testbase.py | 1 | 16772 | # Copyright (c) Citrix Systems Inc.
# 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 of source code must retain the above
# copyright notice, this list of condition... | bsd-2-clause | 6,737,944,345,618,041,000 | 38.463529 | 103 | 0.563797 | false |
Azure/azure-sdk-for-python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/operations/_queue_operations.py | 1 | 22466 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 1,946,883,023,803,050,200 | 51.861176 | 214 | 0.645153 | false |
deseret-tech/litecoin-python | src/litecoinrpc/config.py | 1 | 2715 | # Copyright (c) 2010 Witchspace <witchspace81@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | mit | 7,992,244,416,752,432,000 | 35.2 | 97 | 0.659669 | false |
goosechooser/cps2-zmq | cps2zmq/gather/Broker.py | 1 | 10126 | # pylint: disable=E1101
"""
Contains Broker, WorkerRepresentative, and ServiceQueue classes.
"""
import sys
import logging
import zmq
from zmq.eventloop.zmqstream import ZMQStream
from zmq.eventloop.ioloop import IOLoop, PeriodicCallback
from cps2zmq.gather import mdp, log
HB_INTERVAL = 1000
HB_LIVENESS = 3
class Bro... | mit | 1,896,932,177,797,409,500 | 29.408408 | 99 | 0.569326 | false |
NicolasKiely/Ackermann | Ackermann.py | 1 | 3454 | ''' Evaluates Ackermann function
Adopted from here: http://www.eprg.org/computerphile/recursion.htm
Usage:
python Ackermann.py <brute|cache> <m> <n>
Where
<brute|cache> specifies whether to enable the cache
<m> is the first parameter of the Ackermann function
<n> is the second paramete... | mit | 879,025,367,012,459,400 | 27.081301 | 74 | 0.571801 | false |
leliel12/scikit-criteria | skcriteria/tests/madm/test__dmaker.py | 1 | 3411 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Cabral, Juan; Luczywo, Nadia
# 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 of source code must retai... | bsd-3-clause | 5,228,993,042,200,737,000 | 33.806122 | 79 | 0.583113 | false |
alberthdev/nclayer | nc_diag_attr/nc_diag_attr.py | 1 | 9821 | # nc_diag_attr
from netCDF4 import Dataset, getlibversion
import netCDF4
import argparse
import sys
import traceback
import numpy
try:
import ujson as json
except:
import json
# Version information
__version__ = "0.9b"
VERSION_STR = 'nc_diag_attr v' + __version__ + "\n\n" + \
"Using the following librar... | apache-2.0 | 8,458,928,210,845,927,000 | 36.060377 | 115 | 0.562875 | false |
BitcoinUnlimited/BitcoinUnlimited | qa/rpc-tests/excessive.py | 1 | 14205 | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Unlimited developers
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import test_framework.loginit
# Test emergent c... | mit | -6,959,768,802,692,988,000 | 40.173913 | 155 | 0.600282 | false |
UCSD-E4E/radio_collar_tracker_drone | scripts/ground_control_software/heatMap.py | 1 | 1174 | #!/usr/bin/env python3
import generateKML
import pos_estimate
import numpy as np
import utm
def findMax( someList ):
tempMax = someList[0]
for i in someList:
if tempMax < i:
tempMax = i
return tempMax
def findMin( someList ):
tempMin = someList[0]
for i in someList:
if tempMin > i:
tempMin = i
return ... | gpl-3.0 | 1,732,163,343,495,752,000 | 26.952381 | 78 | 0.626917 | false |
kooksee/myblog | BAE.py | 1 | 11250 | # -*- coding=utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import tornado.wsgi
import tornado.options
import os.path,os,datetime,sys,time,codecs
import markdown
import tohtml
import db
import json
import tohtml
import base64
import uuid
def conf(): #全局设定信息
global NAME,Subtitle,description,key... | gpl-2.0 | 1,647,006,971,386,371,600 | 37.166667 | 190 | 0.525109 | false |
tmetsch/pyssf | docs/source/conf.py | 1 | 8255 | # -*- coding: utf-8 -*-
#
# pyssf documentation build configuration file, created by
# sphinx-quickstart on Fri Feb 25 10:29:07 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | lgpl-3.0 | 2,553,244,000,291,390,500 | 31.5 | 80 | 0.709267 | false |
reclosedev/mitm_relay | socket_relay.py | 1 | 6570 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import select
import logging
log = logging.getLogger(__name__)
class Server:
def __init__(self, relays, timeout=0.3):
self._relays = list(relays)
self.timeout = timeout
self.input_map = {}
self.links = {}
def main_... | mit | -6,196,941,404,122,939,000 | 31.524752 | 115 | 0.576712 | false |
erpletzerp/letzerpcore | frappe/core/doctype/user/user.py | 1 | 15029 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, now, get_gravatar
from frappe import throw, msgprint, _
from frappe.auth import _update_password
from frappe.desk.notifications imp... | mit | 3,309,310,681,578,158,600 | 32.621924 | 188 | 0.682214 | false |
edm1/error-aware-demultiplexer | src/demultiplexer.py | 1 | 16772 | # -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Edward Mountjoy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | mit | 5,872,654,845,560,061,000 | 35.30303 | 93 | 0.599273 | false |
t-wissmann/qutebrowser | tests/helpers/stubs.py | 1 | 17146 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | gpl-3.0 | 7,100,110,923,038,181,000 | 25.217125 | 79 | 0.613904 | false |
cloudwatt/contrail-controller | src/config/device-manager/device_manager/physical_router_config.py | 1 | 18986 | #
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
"""
This file contains implementation of inetconf interface for physical router
configuration manager
"""
from lxml import etree
from ncclient import manager
import copy
class PhysicalRouterConfig(object):
# mapping from contrail family names t... | apache-2.0 | 3,724,265,717,954,849,300 | 45.879012 | 115 | 0.577952 | false |
FedoraScientific/salome-paravis | test/VisuPrs/CutLines/E8.py | 1 | 1502 | # Copyright (C) 2010-2014 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library ... | lgpl-2.1 | -1,939,744,444,780,391,400 | 37.512821 | 81 | 0.733023 | false |
sgnn7/sgfc | communication/comms.py | 1 | 2263 | #!/usr/bin/env python2
import time
from devices.zigbee_xbee import XBeeCommDevice
from protobufs import sgfc_pb2 as fc_proto
def test_comms():
dev1 = None
dev2 = None
fc_message = fc_proto.FlightMessage()
fc_message.sender = "Me"
payload = fc_proto.Payload()
payload.type = fc_proto.GPS_PO... | lgpl-2.1 | 3,578,514,160,517,611,000 | 23.333333 | 60 | 0.549271 | false |
dyve/django-leaflet | setup.py | 1 | 1651 |
import os
from setuptools import setup, find_packages
import sys
here = os.path.abspath(os.path.dirname(__file__))
import codecs
requires = ['Django']
if sys.version_info < (2, 7):
requires += ['ordereddict']
setup(
name='django-leaflet',
version='0.18.1.dev0',
author='Mathieu Leplatre',... | lgpl-3.0 | -4,729,816,257,460,421,000 | 37.395349 | 68 | 0.522108 | false |
daisychainme/daisychain | daisychain/channel_dropbox/tests/test_models.py | 1 | 1492 | from django.contrib.auth.models import User
from django.test import TestCase
from .models import DropboxAccount, DropboxUser
class TestModelsDropboxAccount(TestCase):
def test_account_str_len(self):
user = User.objects.create_user('John')
dbx_account = DropboxAccount(
user = user,
... | mit | 4,904,110,218,897,328,000 | 32.909091 | 90 | 0.577748 | false |
cloudkeep/symantecssl | symantecssl/order.py | 1 | 4443 | from __future__ import absolute_import, division, print_function
import requests
from lxml import etree
from symantecssl.request_models import RequestEnvelope as ReqEnv
class FailedRequest(Exception):
def __init__(self, response):
super(FailedRequest, self).__init__()
self.response = response
... | apache-2.0 | -4,661,121,772,519,694,000 | 33.984252 | 79 | 0.684898 | false |
Dangerpuss/Dumpster | winDATget/Forget.py | 1 | 1457 | from subprocess import Popen
import os
import csv
srcfile = "/" + input('File Input Name: ')
dirpath = os.path.dirname(__file__)
srcpath = os.path.dirname(__file__) + srcfile
with open(srcpath, newline='') as f:
reader = csv.reader(f)
for row in reader:
host = (row[0])
user = (row[1])
newpath = os.path.dir... | gpl-2.0 | 2,042,619,565,739,580,000 | 39.472222 | 156 | 0.607412 | false |
BillFoland/daisyluAMR | system/daisylu_system.py | 1 | 13721 |
import os
import sys
import pickle
import pandas as pd
import numpy as np
import hashlib
import os.path
from daisylu_config import *
from daisylu_vectors import *
from sentences import *
from daisylu_output import *
""
def addWikificationToDFrames(sents, sTypes, sentenceAttr):
# nee... | mit | 6,644,411,702,054,767,000 | 47.487633 | 142 | 0.501494 | false |
novafloss/django-formidable | formidable/forms/__init__.py | 1 | 7650 | # -*- coding: utf-8 -*-
"""
This module exposes everything needed to generate a standard django form class
from a formidable object.
Given a formidable object, you can use :func:`get_dynamic_form_class` to get
its corresponding django form class.
"""
from __future__ import unicode_literals
from collections import Or... | mit | -4,146,912,984,624,898,000 | 34.091743 | 79 | 0.642484 | false |
zenefits/sentry | src/sentry/api/urls.py | 1 | 23038 | from __future__ import absolute_import, print_function
from django.conf.urls import include, patterns, url
from .endpoints.api_tokens import ApiTokensEndpoint
from .endpoints.auth_index import AuthIndexEndpoint
from .endpoints.broadcast_index import BroadcastIndexEndpoint
from .endpoints.catchall import CatchallEndpo... | bsd-3-clause | -7,951,625,677,568,653,000 | 53.852381 | 129 | 0.685433 | false |
SleepyDeveloper/alexa-cookbook | tools/TestFlow/sampleskill3/index.py | 2 | 7822 | """
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well
as testing instructions are located at http://amzn.to/1LzFrj6
For additional samples, visit the Alexa Skills Kit Getting Started guide at
http://amzn.to/1LG... | apache-2.0 | 4,030,710,574,117,284,000 | 37.156098 | 106 | 0.623114 | false |
MG-group-tools/MGFunc | mgfunc_v2/swiss2tab.py | 1 | 7278 | from __future__ import division
import argparse
from Bio import SeqIO
from datetime import datetime as dt
import time
import os
import sys
import gzip
class main:
def __init__(self):
self.start = time.time()
self.d_ = dt.today()
self.timestarted = self.d_.strftime("%d-%m-%Y %H:%M:%S")
self.parseArgs()
def pa... | gpl-3.0 | 3,271,182,841,077,309,400 | 36.515464 | 423 | 0.554411 | false |
arkem/pyflag | src/pyflag/ColumnTypes.py | 1 | 53873 | #!/usr/bin/env python
# ******************************************************
# Copyright 2004: Commonwealth of Australia.
#
# Developed by the Computer Network Vulnerability Team,
# Information Security Group.
# Department of Defence.
#
# Michael Cohen <scudette@users.sourceforge.net>
#
# ****************************... | gpl-2.0 | -698,840,353,569,850,500 | 37.953724 | 193 | 0.529152 | false |
UrbanCCD-UChicago/plenario | plenario/sensor_network/api/ifttt.py | 1 | 6149 | import json
import time
import uuid
from os import environ
from dateutil.parser import parse
from flask import make_response, request
from plenario.api.common import crossdomain, unknown_object_json_handler
from plenario.api.response import bad_request
from plenario.api.validator import IFTTTValidator, sensor_network... | mit | 2,408,303,469,001,245,000 | 34.137143 | 120 | 0.593267 | false |
bycoffe/django-liveblog | models.py | 1 | 1303 | import datetime
from django.db import models
from django.conf import settings
from django.template import loader, Context
from markdown import markdown
blog = __import__(settings.BLOG_APP)
Entry = blog.models.__getattribute__(settings.BLOG_ENTRY_MODEL)
if Entry.objects.count():
default_blog_entry = Entry.objects... | bsd-3-clause | 335,256,228,754,973,900 | 34.216216 | 81 | 0.584804 | false |
cgmb/d2lmf | d2lmf/d2lmf.py | 1 | 11079 | # -*- coding: utf-8 -*-
# Copyright (C) 2015-2018 Cordell Bloor
#
# 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.
#
# Th... | gpl-3.0 | -6,830,093,550,474,210,000 | 37.203448 | 90 | 0.601498 | false |
codingforentrepreneurs/DjangoGap | src/postings/migrations/0003_auto_20141113_2257.py | 1 | 1504 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('postings', '0002_auto_20141111_0540'),
]
operations = [
migrations.Alt... | gpl-2.0 | 6,243,464,691,273,709,000 | 30.333333 | 130 | 0.563165 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.