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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
insertion/opinion-mining | Spider/scrapy/getComment/getComment/spiders/getcomment.py | 1 | 2917 | # -*- coding: utf-8 -*-
import scrapy
import json
from getComment.items import GetcommentItem
import codecs
#需要加入cookie,不然有些页面没有权限
class GetcommentSpider(scrapy.Spider):
name = "getComment"
allowed_domains = ["douban.com"]
cookie={ '__utma':"30149280.901747088.1445074673.1463148044.1463205092.69",
... | mit | 7,418,473,381,262,514,000 | 46.116667 | 195 | 0.576937 | false | 2.728764 | false | false | false |
OrbitzWorldwide/droned | droned/lib/droned/responders/events.py | 1 | 2722 | ###############################################################################
# Copyright 2006 to the present, Orbitz Worldwide, 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... | apache-2.0 | -4,877,406,572,939,446,000 | 39.029412 | 126 | 0.646951 | false | 4.14939 | false | false | false |
mohanprasath/Course-Work | data_analysis/uh_data_analysis_with_python/hy-data-analysis-with-python-spring-2020/part02-e07_file_extensions/test/test_file_extensions.py | 1 | 1537 | #!/usr/bin/env python3
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load, get_out
module_name="src.file_extensions"
file_extensions = load(module_name, "file_extensions")
main = load(module_name, "main")
class FileExtensions(unittest.TestCase):
@points('p02-07.1... | gpl-3.0 | -542,415,368,093,614,340 | 33.931818 | 101 | 0.595316 | false | 3.785714 | true | false | false |
brchiu/tensorflow | tensorflow/python/ops/metrics_impl.py | 1 | 162465 | # Copyright 2016 The TensorFlow Authors. 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 applica... | apache-2.0 | -4,886,929,974,480,028,000 | 43.016527 | 80 | 0.658819 | false | 4.06325 | false | false | false |
marzig76/blexplor | opcode.py | 1 | 3840 | """A simple module housing Bitcoin Script OP Code values."""
class opcode(object):
"""Define Bitcoin Script OP Code values."""
opcodes = {}
# Constants
opcodes['OP_FALSE'] = 0x00
opcodes['OP_1NEGATE'] = 0x4f
opcodes['OP_TRUE'] = 0x51
opcodes['OP_2'] = 0x52
opcodes['OP_3'] = 0x53
... | gpl-3.0 | 5,800,116,986,678,497,000 | 26.826087 | 60 | 0.589323 | false | 2.696629 | false | false | false |
shadycuz/cloudatcost-ansible-module | cac_inv.py | 1 | 6017 | #!/usr/bin/env python
"""
CloudAtCost external inventory script. Automatically finds hosts and
returns them under the host group 'cloudatcost'
Some code borrowed from linode.py inventory script by Dan Slimmon
"""
import os.path
# import re
import sys
import argparse
# from time import time
from cacpy import CACPy
# ... | mit | -8,786,081,238,855,413,000 | 32.243094 | 131 | 0.525179 | false | 4.41129 | false | false | false |
joferkington/tutorials | 1412_Tuning_and_AVO/tuning_wedge_v2.py | 1 | 10772 | """
Python script to generate a zero-offset synthetic from a 3-layer wedge model.
Created by: Wes Hamlyn
Create Date: 19-Aug-2014
Last Mod: 5-Feb-2015
-addition of bandpass wavelet
This script is provided without warranty of any kind.
"""
import numpy as np
imp... | apache-2.0 | -3,679,153,622,030,970,000 | 24.79602 | 91 | 0.562755 | false | 2.808133 | false | false | false |
d-Rickyy-b/Python-BlackJackBot | blackjack/game/card.py | 1 | 1732 | # -*- coding: utf-8 -*-
from enum import Enum
class Card(object):
class Type(Enum):
NUMBER = "card_number"
JACK = "card_jack"
QUEEN = "card_queen"
KING = "card_king"
ACE = "card_ace"
symbols = ["♥", "♦", "♣", "♠"]
value_str = ["2", "3", "4", "5", "6", "7", "8", "9... | gpl-3.0 | -4,021,522,245,757,826,600 | 26.806452 | 95 | 0.493039 | false | 3.040564 | false | false | false |
luboslenco/cyclesgame | blender/arm/handlers.py | 1 | 5807 | import os
import sys
import bpy
import importlib
from bpy.app.handlers import persistent
import arm.utils
import arm.props as props
import arm.make as make
import arm.make_state as state
import arm.api
@persistent
def on_depsgraph_update_post(self):
if state.proc_build != None:
return
# Recache
if... | lgpl-3.0 | -1,077,355,546,783,990,800 | 37.713333 | 200 | 0.610126 | false | 3.370284 | false | false | false |
cloudify-cosmo/softlayer-python | SoftLayer/CLI/loadbal/service_add.py | 1 | 1663 | """Adds a new load balancer service."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import loadbal
import click
@click.command()
@click.argument('identifier')
@click.option('--enabled / --disabled',
required=True,
... | mit | 6,626,000,125,855,541,000 | 30.980769 | 78 | 0.591702 | false | 4.136816 | false | false | false |
ppyordanov/HCI_4_Future_Cities | Server/src/virtualenv/Lib/encodings/koi8_r.py | 1 | 13245 | """ Python Character Mapping Codec koi8_r generated from 'MAPPINGS/VENDORS/MISC/KOI8-R.TXT' with gencodec.py.
""" # "
import codecs
# ## Codec APIs
class Codec(codecs.Codec):
def encode(self, input, errors='strict'):
return codecs.charmap_encode(input, errors, encoding_table)
def decode(self, inpu... | mit | 2,934,191,392,544,551,000 | 41.588424 | 109 | 0.595092 | false | 2.853911 | false | false | false |
LamCiuLoeng/fd | rpac/controllers/pdf.py | 1 | 2302 | # -*- coding: utf-8 -*-
import os
import json
# turbogears imports
from tg import expose, redirect, validate, flash, session, request, config
from tg.decorators import *
# third party imports
from repoze.what import authorize
from repoze.what.predicates import not_anonymous, in_group, has_permission
from sqlalchemy.... | mit | -5,420,445,439,386,341,000 | 31.422535 | 119 | 0.632493 | false | 3.767594 | false | false | false |
anyonedev/anyonedev-monitor-agent | monitor/metrics/log/Nginx.py | 1 | 2320 | '''
Created on 2014-11-18
@author: hongye
'''
import re
import time
from metrics.log.AgentParser import detect
class NginxAccessLogLineParser(object):
ipP = r"?P<ip>[\d.]*"
timeP = r"""?P<time>\[[^\[\]]*\]"""
requestP = r"""?P<request>\"[^\"]*\""""
statusP = r"?P<status>\d+"
bodyBytesSentP = r"?... | gpl-2.0 | 4,690,549,868,023,794,000 | 34.151515 | 166 | 0.471983 | false | 3.717949 | false | false | false |
jcollado/pic2map | tests/test_cli.py | 1 | 6128 | # -*- coding: utf-8 -*-
"""Command Line Interface test cases."""
import argparse
import logging
import os
import tempfile
import unittest
from StringIO import StringIO
from mock import (
MagicMock as Mock,
patch,
)
from pic2map.cli import (
add,
count,
main,
parse_arguments,
remove,
... | mit | -5,578,770,176,831,160,000 | 29.79397 | 79 | 0.615862 | false | 4.191518 | true | false | false |
USF-COT/trdi_adcp_readers | trdi_adcp_readers/readers.py | 1 | 28613 | import numpy as np
import dask.array as darr
from dask import compute, delayed
from dask.bag import from_delayed, from_sequence
from pandas import Timedelta
from xarray import Variable, IndexVariable, DataArray, Dataset
from trdi_adcp_readers.pd0.pd0_parser_sentinelV import (ChecksumError,
... | mit | -928,729,607,118,611,300 | 36.648684 | 168 | 0.567924 | false | 3.372186 | false | false | false |
stratton-oakcoin/oakcoin | contrib/devtools/security-check.py | 1 | 8216 | #!/usr/bin/env python
# Copyright (c) 2015-2016 The Oakcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Perform basic ELF security checks on a series of executables.
Exit status will be 0 if successful, and ... | mit | -7,381,608,130,979,772,000 | 37.037037 | 163 | 0.617454 | false | 3.603509 | false | false | false |
dims/oslo.utils | oslo/utils/openstack/common/log.py | 1 | 26577 | # Copyright 2011 OpenStack Foundation.
# 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 compliance w... | apache-2.0 | 858,290,176,509,701,200 | 35.506868 | 79 | 0.588027 | false | 4.144238 | true | false | false |
benfitzpatrick/cylc | lib/cylc/gui/combo_logviewer.py | 1 | 3938 | #!/usr/bin/env python
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) 2008-2016 NIWA
#
# 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 you... | gpl-3.0 | -7,878,608,303,728,449,000 | 34.477477 | 79 | 0.611732 | false | 3.841951 | false | false | false |
icyflame/batman | scripts/spamremove.py | 1 | 3721 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to remove links that are being or have been spammed.
Usage:
python pwb.py spamremove www.spammedsite.com
It will use Special:Linksearch to find the pages on the wiki that link to
that site, then for each page make a proposed change consisting of removing
all t... | mit | -2,946,422,371,415,227,400 | 29.008065 | 79 | 0.552808 | false | 4.277011 | false | false | false |
diegojromerolopez/djanban | src/djanban/apps/dev_times/migrations/0009_auto_20170515_1731.py | 1 | 1516 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-15 15:31
from __future__ import unicode_literals
from django.db import migrations
def adjust_spent_time(member, spent_time, date):
spent_time_factors = member.spent_time_factors.all()
for spent_time_factor in spent_time_factors:
if (spent_... | mit | 604,419,573,935,151,400 | 37.871795 | 126 | 0.668206 | false | 3.437642 | false | false | false |
azumimuo/family-xbmc-addon | plugin.video.citerkita/resources/lib/googledocs.py | 1 | 2310 | # -*- coding: utf-8 -*-
'''
Genesis Add-on
Copyright (C) 2015 lambda
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 ... | gpl-2.0 | -8,715,977,691,981,637,000 | 32 | 87 | 0.554545 | false | 3.521341 | false | false | false |
dpineo/gadann | gadann/model.py | 1 | 7347 | #
# GADANN - GPU Accelerated Deep Artificial Neural Network
#
# Copyright (C) 2014 Daniel Pineo (daniel@pineo.net)
#
# 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 restricti... | mit | 8,249,523,668,082,480,000 | 39.275281 | 127 | 0.572887 | false | 4.205495 | false | false | false |
Jellby/ASEP-MD | Tests/scripts/gen2gromacs.py | 1 | 9989 | #!/usr/bin/python
# Modify the solute geometry and charges in Gromacs .gro and .top files
# Use with 5 arguments:
# 1 (read): generic system file
# 2 (read): .top file
# 3 (read): .gro file
# 4 (write): modified .top file
# 5 (write): modified .gro file
import sys
import re
import math
import copy
#===========... | gpl-3.0 | 6,437,913,414,592,867,000 | 30.11838 | 138 | 0.513565 | false | 2.36538 | false | false | false |
gammapy/enrico | enrico/plotting.py | 1 | 25543 | import os
from distutils.version import LooseVersion
import numpy as np
try:
import astropy.io.fits as fits
except ImportError:
import pyfits as fits
import pyLikelihood
import matplotlib
matplotlib.use('Agg')
matplotlib.rc('font', **{'family': 'serif', 'serif': ['Computer Modern'], 'size': 15})
matplotlib.rc('... | bsd-3-clause | 6,686,314,298,672,276,000 | 39.803514 | 238 | 0.565086 | false | 3.093122 | true | false | false |
auth0/auth0-python | auth0/v3/authentication/delegated.py | 1 | 1118 | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
"""Delegated authentication endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def get_token(self, client_id, target, api_type, grant_type,
id_token=None, refresh_token=Non... | mit | -5,919,315,672,139,504,000 | 29.216216 | 92 | 0.538462 | false | 4.171642 | false | false | false |
maas/maas | src/maasserver/exceptions.py | 1 | 6877 | # Copyright 2012-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Exceptions."""
__all__ = [
"ClusterUnavailable",
"MAASException",
"MAASAPIBadRequest",
"MAASAPIException",
"MAASAPINotFound",
"NodeStateViolation",... | agpl-3.0 | -2,348,278,307,039,550,500 | 26.842105 | 87 | 0.703359 | false | 4.140277 | false | false | false |
mscook/pyParaTools | ParaUtils.py | 1 | 8999 | """Utility methods for paramagnetic observables """
import math
from numpy import *
def ZXZRot(A, B, G, scal=1.0):
"""
Builds the ZXZ rotation matrix given 3 Euler Angles. See:
http://mathworld.wolfram.com/EulerAngles.html
@param A : The (A)lpha angle
@type A : float
@param B :... | apache-2.0 | -5,894,408,450,203,394,000 | 32.206642 | 137 | 0.536615 | false | 2.737755 | false | false | false |
nathanielvarona/airflow | airflow/utils/log/json_formatter.py | 1 | 2206 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 8,733,983,074,481,377,000 | 37.034483 | 89 | 0.644152 | false | 4.146617 | false | false | false |
pgroudas/pants | src/python/pants/option/option_value_container.py | 1 | 4590 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.option.ra... | apache-2.0 | 3,330,725,136,526,867,000 | 38.568966 | 99 | 0.698475 | false | 4.309859 | false | false | false |
rdo-management/ironic-discoverd | ironic_discoverd_ramdisk/discover.py | 1 | 8663 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | apache-2.0 | -1,589,015,766,572,319,500 | 32.191571 | 78 | 0.587441 | false | 3.796231 | false | false | false |
0x90/pyroute2 | pyroute2/netlink/nl80211/__init__.py | 2 | 26383 | '''
NL80211 module
================
TODO
'''
from pyroute2.common import map_namespace
from pyroute2.netlink import genlmsg
from pyroute2.netlink.generic import GenericNetlinkSocket
from pyroute2.netlink.nlsocket import Marshal
from pyroute2.netlink import nla
from pyroute2.netlink import nla_base
# import pdb
impor... | apache-2.0 | -3,365,363,244,516,462,000 | 43.118729 | 95 | 0.544479 | false | 2.992967 | false | false | false |
arksu/a2client | etc/blender_exporter/export_a1.py | 1 | 20410 | # coding=utf-8
import struct
import bpy
import bmesh
from bpy_extras.io_utils import ExportHelper
import mathutils
import os.path
import math
#===========================================================================
# Custom exception class
#==========================================================================... | gpl-3.0 | -2,436,140,333,795,629,600 | 32.747927 | 146 | 0.549069 | false | 3.50603 | false | false | false |
stormi/tsunami | src/primaires/salle/editeurs/redit/edt_repos.py | 1 | 5551 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# l... | bsd-3-clause | -8,722,783,594,387,688,000 | 37.151724 | 79 | 0.601952 | false | 3.727763 | false | false | false |
MSLNZ/msl-qt | tests/test_utils.py | 1 | 1695 | from msl.qt import utils, QtCore, QtWidgets, Qt, QtGui
def test_screen_geometry():
# just check that these don't raise an exception
assert isinstance(utils.screen_geometry(), QtCore.QRect)
assert isinstance(utils.screen_geometry(QtWidgets.QLabel()), QtCore.QRect)
assert isinstance(utils.screen_geometr... | mit | -982,922,349,157,547,000 | 34.3125 | 105 | 0.673746 | false | 3.216319 | false | false | false |
allenai/document-qa | docqa/elmo/run_on_user_text.py | 1 | 3809 | import argparse
import tensorflow as tf
from docqa.data_processing.qa_training_data import ParagraphAndQuestion, ParagraphAndQuestionSpec
from docqa.data_processing.text_utils import NltkAndPunctTokenizer
from docqa.elmo.lm_qa_models import ElmoQaModel
from docqa.model_dir import ModelDir
"""
Script to run a model o... | apache-2.0 | 85,362,426,133,489,180 | 45.463415 | 98 | 0.716461 | false | 3.730656 | false | false | false |
woodmd/haloanalysis | extpipe/utils.py | 1 | 7826 | import copy
import re
import glob
import numpy as np
from numpy.core import defchararray
from scipy.interpolate import RegularGridInterpolator
from astropy.io import fits
from astropy.table import Table, Column
def stack_files(files, outfile, new_cols=None):
h = fits.open(files[0])
tables = []
for hdu i... | bsd-3-clause | -7,118,146,222,372,312,000 | 25.80137 | 89 | 0.523256 | false | 3.72135 | false | false | false |
eReuse/DeviceHub | ereuse_devicehub/scripts/updates/snapshot_software.py | 1 | 1290 | from contextlib import suppress
from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of... | agpl-3.0 | 4,927,501,792,348,379,000 | 45.071429 | 123 | 0.655039 | false | 4.372881 | false | false | false |
Makeystreet/makeystreet | woot/apps/catalog/migrations/0139_auto__add_field_makey_is_staff_pick__add_field_makey_added_time_staff_.py | 1 | 70054 | # -*- 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 'Makey.is_staff_pick'
db.add_column(u'catalog_makey', 'is_staff_pick',
... | apache-2.0 | -7,416,513,312,088,065,000 | 83.607488 | 229 | 0.54261 | false | 3.656836 | false | false | false |
okolisny/integration_tests | cfme/tests/configure/test_display_settings.py | 1 | 1849 | # -*- coding: utf-8 -*-
import pytest
from cfme import test_requirements
from cfme.configure.settings import visual
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import ColorGroup, form_buttons
from cfme.utils.appliance import current_appliance
from cfme.utils.appliance.implementations.ui import na... | gpl-2.0 | 1,625,218,247,549,686,800 | 25.414286 | 98 | 0.652244 | false | 3.604288 | true | false | false |
suyashphadtare/test | erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py | 1 | 15406 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, flt, cint, nowdate, add_days, comma_and
from frappe import msgprint, _
from frappe.model.document impo... | agpl-3.0 | -4,334,333,021,142,938,000 | 37.039506 | 113 | 0.652084 | false | 2.918909 | false | false | false |
chronicle/api-samples-python | common/chronicle_auth.py | 1 | 2712 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -6,668,738,066,000,931,000 | 36.666667 | 102 | 0.760324 | false | 4.011834 | false | false | false |
dc3-plaso/plaso | plaso/analysis/unique_domains_visited.py | 1 | 2742 | # -*- coding: utf-8 -*-
"""A plugin to generate a list of domains visited."""
import sys
if sys.version_info[0] < 3:
import urlparse
else:
from urllib import parse as urlparse # pylint: disable=no-name-in-module
from plaso.analysis import interface
from plaso.analysis import manager
from plaso.containers import... | apache-2.0 | -1,282,014,892,101,884,400 | 32.036145 | 77 | 0.710795 | false | 3.889362 | false | false | false |
fmierlo/Xamarin.Helpers | Helpers/update-version.py | 1 | 1430 | import sys
import xml.etree.ElementTree as ElementTree
def log(msg):
sys.stderr.write(msg + '\n')
class Project:
Filename = 'Helpers.csproj'
Schema = '{http://schemas.microsoft.com/developer/msbuild/2003}'
RootTag = Schema + 'Project'
Property = Schema + 'PropertyGroup'
Release = Schema + 'Re... | mit | 6,353,014,324,797,405,000 | 27 | 94 | 0.60084 | false | 3.923077 | false | false | false |
libracore/erpnext | erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py | 1 | 5006 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe import _
from frappe.model.document import Document
from frappe.utils import get_request_session
f... | gpl-3.0 | 6,692,700,997,614,586,000 | 36.081481 | 118 | 0.696764 | false | 3.067402 | false | false | false |
cfbolz/parsimony | src/tm/tm4/tm4_meta/tm4_simulator.py | 1 | 1445 | import string
import sys
from state import *
from tmsim import *
if __name__ == "__main__":
name = sys.argv[-1]
fileName = name + ".tm4"
path = "../tm4_files/" + fileName
try:
assert len(sys.argv) > 1
for flag in sys.argv[2:-1]:
if not (flag in ["-q", "-s", "-f"]):
... | mit | -8,676,187,172,972,371,000 | 29.744681 | 129 | 0.555709 | false | 3.705128 | false | false | false |
sloria/osf.io | osf/models/user.py | 1 | 64823 | import datetime as dt
import logging
import re
import urllib
import urlparse
import uuid
from copy import deepcopy
from os.path import splitext
from flask import Request as FlaskRequest
from framework import analytics
from guardian.shortcuts import get_perms
# OSF imports
import itsdangerous
import pytz
from dirtyfie... | apache-2.0 | -4,507,992,747,545,736,000 | 38.744329 | 152 | 0.62157 | false | 4.235967 | false | false | false |
NMTHydro/SWACodingMeeting | src/meeting3/be.py | 1 | 1317 | # ===============================================================================
# Copyright 2016 ross
#
# 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 | -8,939,215,115,441,067,000 | 34.594595 | 81 | 0.538345 | false | 4.39 | false | false | false |
postlund/home-assistant | homeassistant/components/konnected/binary_sensor.py | 1 | 2668 | """Support for wired binary sensors attached to a Konnected device."""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_STATE,
CONF_BINARY_SENSORS,
CONF_DEVICES,
CONF_NAME,
CONF_TYPE,
)
from homeassistant... | apache-2.0 | 1,640,747,530,150,869,800 | 28.644444 | 88 | 0.631184 | false | 3.883552 | false | false | false |
pgmillon/ansible | lib/ansible/module_utils/basic.py | 1 | 107336 | # Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013
# Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
FILE_ATTRIBUTE... | gpl-3.0 | 8,027,137,637,342,028,000 | 39.065696 | 155 | 0.554055 | false | 4.144727 | false | false | false |
kcompher/abstract_rendering | examples/numpyDemo.py | 1 | 3768 | #!/usr/bin/env python
"""
Draws a colormapped image plot
- Left-drag pans the plot.
- Mousewheel up and down zooms the plot in and out.
- Pressing "z" brings up the Zoom Box, and you can click-drag a rectangular
region to zoom. If you use a sequence of zoom boxes, pressing alt-left-arrow
and alt-right-arrow m... | bsd-3-clause | 3,856,248,107,765,127,700 | 35.230769 | 119 | 0.538482 | false | 4.069114 | false | false | false |
jmgilman/Neolib | neolib/inventory/UserInventory.py | 1 | 2623 | """:mod:`UserInventory` -- Provides an interface for a user inventory
.. module:: UserInventory
:synopsis: Provides an interface for a user inventory
.. moduleauthor:: Joshua Gilman <joshuagilman@gmail.com>
"""
from neolib.exceptions import parseException
from neolib.exceptions import invalidUser
from neolib.inven... | mit | 2,876,575,541,733,346,300 | 31.7875 | 106 | 0.556615 | false | 4.709156 | false | false | false |
ddanier/django_price | django_price/models.py | 1 | 1728 | # coding: utf-8
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django_deferred_polymorph.models import SubDeferredPolymorphBaseModel
import decimal
import datetime
from .manager import TaxManager
# TODO: Versionized Tax (Tax should NEVER get changed, as this may
# create an ... | bsd-3-clause | -4,973,895,535,541,663,000 | 27.327869 | 81 | 0.656829 | false | 3.900677 | false | false | false |
develersrl/rooms | editor/structdata/area.py | 1 | 1839 | #!/usr/bin/env python
from origin import OriginData
from structdata.project import g_project
class Area(OriginData):
"""
Area gestisce coordinate e dimensione fisiche. Nell'xml le informazioni
sono in coordinate logiche; al momento del caricamento del progetto viene
fatta la conversione
"""
t... | mit | 4,306,555,536,022,000,600 | 37.3125 | 86 | 0.567156 | false | 3.55706 | false | false | false |
abadger/Bento | doc/source/conf.py | 1 | 6743 | # -*- coding: utf-8 -*-
#
# Bento documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 3 12:53:13 2010.
#
# 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... | bsd-3-clause | -7,131,424,483,700,285,000 | 32.381188 | 148 | 0.71437 | false | 3.721302 | true | false | false |
jpinsonault/imdb_cast_matcher | match_cast.py | 1 | 1055 | #!/usr/bin/env python
import argparse
import sys
from imdb import IMDb
args = None
def parse_args():
global args
parser = argparse.ArgumentParser()
parser.add_argument('first_movie')
parser.add_argument('second_movie')
args = parser.parse_args()
def main():
imdb = IMDb()
# Get 2 movi... | mit | -4,238,202,857,582,957,000 | 20.55102 | 88 | 0.629384 | false | 3.552189 | false | false | false |
wbphelps/ISSTracker | showGPS.py | 1 | 4984 | # show GPS page
from datetime import datetime, timedelta
import pygame
from pygame.locals import *
import math
from plotSky import plotSky
R90 = math.radians(90) # 90 degrees in radians
class showGPS():
def getxy(self, alt, azi): # alt, az in radians
# thanks to John at Wobbleworks for the algorithm
r = (R90 ... | gpl-2.0 | 6,263,011,145,181,974,000 | 31.789474 | 140 | 0.62179 | false | 2.854525 | false | false | false |
adist/drunken-sansa | openerp/addons/pln_dprr/hr_employee.py | 1 | 2048 | '''
Created on Feb 18, 2015
@author: adista@bizoft
'''
from openerp.osv import fields, osv
class hr_employee_category(osv.osv):
_inherit = 'hr.employee.category'
_columns = {
'code' : fields.char(string='Kode'),
'type' : fields.selection([('area', 'Area'), ('unitup', 'Unit Up')], string='Tipe... | agpl-3.0 | 7,014,781,787,241,007,000 | 38.403846 | 109 | 0.561523 | false | 3.413333 | false | false | false |
claudep/translate | translate/convert/xliff2odf.py | 1 | 6253 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004-2014 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2... | gpl-2.0 | 5,758,427,300,691,318,000 | 39.869281 | 96 | 0.629778 | false | 3.874226 | false | false | false |
yarikoptic/Fail2Ban-Old-SVNGIT | server/filter.py | 1 | 15235 | # This file is part of Fail2Ban.
#
# Fail2Ban is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Fail2Ban is distributed in the hope t... | gpl-2.0 | 3,093,289,645,956,499,000 | 24.519263 | 93 | 0.679685 | false | 3.212102 | false | false | false |
sumedh123/debatify | app/models.py | 1 | 6706 | import hashlib
from werkzeug.security import generate_password_hash, check_password_hash
from flask import request
#from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from flask_login import UserMixin,AnonymousUserMixin
from app import login_manager
from app import db
from datetime import datetime
... | mit | 5,551,581,122,385,706,000 | 33.932292 | 170 | 0.697435 | false | 2.93865 | false | false | false |
frustreated/VDiscover | vdiscover/Backtrace.py | 1 | 2987 |
from ptrace.ctypes_tools import formatAddress, formatWordHex
from ptrace.cpu_info import CPU_WORD_SIZE, CPU_MAX_UINT
from ptrace import PtraceError
#from ptrace.six.moves import xrange
class BacktraceFrame(object):
"""
Backtrace frame.
Attributes:
- ip: instruction pointer
- name: name of the f... | gpl-3.0 | 5,460,198,075,991,017,000 | 24.75 | 92 | 0.585872 | false | 4.036486 | false | false | false |
belokop/indico_bare | indico/modules/events/contributions/util.py | 1 | 15345 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | 8,352,198,904,003,203,000 | 46.953125 | 119 | 0.647703 | false | 4.147297 | false | false | false |
deathglitch/metarigging | python/rigging/rig_cog.py | 1 | 1030 | import pymel.core as pm
import grip
import metautil.miscutil as miscutil
import metautil.rigutil as rigutil
import metautil.shapeutil as shapeutil
def rig_cog_chain(start_joint, end_joint, scale):
start_joint = pm.PyNode(start_joint)
end_joint = pm.PyNode(end_joint)
chain = miscutil.get_nodes_between(start... | mit | 4,577,479,774,416,454,000 | 33.366667 | 100 | 0.658252 | false | 3.280255 | false | false | false |
tgfjt/Sublime-clipboardRound | clipboardround.py | 1 | 3963 | import sublime, sublime_plugin
history = []
menuitems = []
history_index = 0
def getClipboardData():
try:# win32
import win32clipboard
win32clipboard.OpenClipboard()
data = win32clipboard.GetClipboardData()
win32clipboard.CloseClipboard()
except:
pass
try:# windows... | mit | -1,768,667,037,384,106,800 | 26.143836 | 94 | 0.604088 | false | 3.943284 | false | false | false |
wavelets/ThinkStats2 | code/density.py | 1 | 2742 | """This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function
import math
import random
import scipy.stats
import brfss
import first
import thinks... | gpl-3.0 | 8,302,440,263,507,806,000 | 25.114286 | 76 | 0.633844 | false | 3.169942 | false | false | false |
SitiBanc/1061_NCTU_IOMDS | Final/autoencoder_keras.py | 1 | 4171 | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 7 14:02:01 2018
@author: jie-yu
"""
import numpy as np
np.random.seed(1337) # for reproducibility
#from keras.datasets import mnist
from keras.models import Model
from keras.layers import Dense, Input
import matplotlib.pyplot as plt
from PIL import Image... | apache-2.0 | 8,473,934,033,202,787,000 | 28.659259 | 90 | 0.595554 | false | 2.64304 | true | false | false |
ckclark/leetcode | py/count-of-smaller-numbers-after-self.py | 1 | 1182 | class Solution(object):
def deduceRemain(self, segment_tree, n):
for l in segment_tree:
if n < len(l):
l[n] -= 1
n >>= 1
def countRemainFirstN(self, segment_tree, n):
ans = 0
for l in segment_tree:
if n == 0:
break
... | apache-2.0 | 578,514,358,702,732,300 | 28.55 | 113 | 0.450085 | false | 3.54955 | false | false | false |
StephenLujan/Naith | game/plugins/pointlight/pointlight.py | 1 | 1351 | # Copyright Tom SF Haines, Reinier de Blois
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 7,548,093,377,534,899,000 | 31.166667 | 107 | 0.712065 | false | 3.490956 | false | false | false |
monikagrabowska/osf.io | kinto/kinto/core/authorization.py | 1 | 9913 | import functools
from pyramid.settings import aslist
from pyramid.security import IAuthorizationPolicy, Authenticated
from zope.interface import implementer
from kinto.core import utils
from kinto.core.storage import exceptions as storage_exceptions
from kinto.core.authentication import prefixed_userid
# A permissio... | apache-2.0 | 5,708,944,877,151,772,000 | 39.96281 | 79 | 0.616261 | false | 4.501817 | false | false | false |
ducted/duct | duct/service.py | 1 | 10144 | """
.. module:: service
:synopsis: Core service classes
.. moduleauthor:: Colin Alston <colin@imcol.in>
"""
import time
import sys
import os
import importlib
import re
import copy
from twisted.application import service
from twisted.internet import task, reactor, defer
from twisted.python import log
class DuctS... | mit | 7,231,771,732,266,448,000 | 30.799373 | 80 | 0.51735 | false | 4.534645 | true | false | false |
interlegis/sigi | sigi/apps/parlamentares/views.py | 1 | 4616 | # coding: utf-8
import datetime
import csv
from django.template import Context, loader
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.conf import settings
from django.shortcuts import render, get_list_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.views.d... | gpl-2.0 | 6,510,522,160,181,261,000 | 29.496689 | 98 | 0.636699 | false | 3.388521 | false | false | false |
tfXYZ/tfXYZ | core/losses.py | 1 | 1634 | import tensorflow as tf
from .blocks import gather_nd
tf.app.flags.DEFINE_float('alpha', 1.0, '')
tf.app.flags.DEFINE_float('beta', 1.0, '')
FLAGS = tf.app.flags.FLAGS
def ce_loss(logits, labels, **kwargs):
"""
The standard classification loss. Applies softmax on the logits and computes the loss.
"""
cross_... | gpl-3.0 | 3,675,278,564,448,912,000 | 31.039216 | 108 | 0.70257 | false | 3.25498 | false | false | false |
klahnakoski/esReplicate | pyLibrary/sql/redshift.py | 1 | 5408 | # encoding: utf-8
#
#
# 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/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import
from __... | mpl-2.0 | -9,127,470,044,056,634,000 | 29.382022 | 105 | 0.54253 | false | 4.047904 | false | false | false |
jimsize/PySolFC | pysollib/kivy/toolbar.py | 1 | 10827 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------#
# Copyright (C) 2016-2017 LB
#
# 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 F... | gpl-3.0 | 5,466,700,252,095,288,000 | 32.103976 | 78 | 0.506328 | false | 4.117535 | false | false | false |
treyhunner/django-simple-history | docs/conf.py | 1 | 8369 | # -*- coding: utf-8 -*-
#
# django-simple-history documentation build configuration file, created by
# sphinx-quickstart on Sun May 5 16:10:02 2013.
#
# 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... | bsd-3-clause | -8,592,172,093,522,146,000 | 30.700758 | 80 | 0.690644 | false | 3.853131 | true | false | false |
ecreall/lagendacommun | lac/views/services_processes/moderation_service/see_service.py | 1 | 2407 | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPFound
from dace.util import getSite
from dace.processinstance.core import DEFAULTMAPPING_A... | agpl-3.0 | -3,885,177,443,963,789,300 | 33.385714 | 100 | 0.726215 | false | 3.714506 | false | false | false |
rv816/serrano_night | serrano/resources/stats.py | 1 | 3399 | from django.core.urlresolvers import reverse
from django.conf.urls import patterns, url
from django.views.decorators.cache import never_cache
from restlib2.params import Parametizer, BoolParam, StrParam
from avocado.models import DataContext, DataField
from avocado.query import pipeline
from .base import BaseResource, ... | bsd-2-clause | 6,553,799,984,254,183,000 | 30.472222 | 77 | 0.596646 | false | 4.391473 | false | false | false |
radjkarl/appBase | appbase/Launcher.py | 1 | 22087 | # coding=utf-8
from __future__ import print_function
from builtins import str
# -*- coding: utf-8 -*-
###############
# The launcher class is not updated any more
# I might remove it
###############
# own
import appbase
from fancytools.os.PathStr import PathStr
from fancywidgets.pyQtBased.Dialogs import ... | gpl-3.0 | -3,223,180,019,371,425,300 | 35.950172 | 101 | 0.568841 | false | 4.123786 | true | false | false |
CospanDesign/nysa | nysa/tools/nysa_cli.py | 1 | 7013 | #! /usr/bin/python
#Distributed under the MIT licesnse.
#Copyright (c) 2014 Dave McCoy (dave.mccoy@cospandesign.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, includ... | mit | 2,666,145,066,565,960,000 | 28.970085 | 125 | 0.62541 | false | 3.631797 | false | false | false |
smyrman/django-jquery-widgets | jquery_widgets/admin.py | 1 | 3264 | # -*- coding: utf-8 -*-
# Based on code from: Jannis Leidal, 2008 (http://jannisleidel.com/),
# Copyright (C) 2010: Sindre Røkenes Myren,
# This file is part of KiKrit wich is distrebuted under GPLv3. See the file
# COPYING.txt for more details.
import operator
from django.db import models
from django.http import Ht... | mit | -4,657,023,323,136,276,000 | 28.133929 | 75 | 0.703953 | false | 3.174125 | false | false | false |
openstack/os-win | os_win/utils/network/networkutils.py | 1 | 42102 | # Copyright 2013 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,369,183,737,832,306,000 | 40.155425 | 79 | 0.600898 | false | 3.844932 | false | false | false |
google-research/language | language/emql/cm_sketch.py | 1 | 5160 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 | 4,624,487,439,419,646,000 | 25.326531 | 76 | 0.642636 | false | 3.519782 | false | false | false |
AmericanResearchInstitute/ari-backup | ari_backup/__init__.py | 1 | 16849 | import os
import settings
import subprocess
import shlex
from logger import Logger
'''Wrapper around rdiff-backup
This module provides facilites for centrally managing a large set of
rdiff-backup backup jobs. Backup job management is built around common tools
like cron, run-parts, and xargs. The base features incl... | bsd-3-clause | 7,867,966,649,929,638,000 | 38.366822 | 111 | 0.599442 | false | 4.233417 | false | false | false |
stccenter/datadiscovery | ranking/evaluation.py | 1 | 12251 | # -*- coding: utf-8 -*-
"""
Created on Tue May 30 13:13:44 2017
@author: larakamal
total evaluation evalutes the sorted documents
using precision and NDCG
change the directory of the sorted documents from lines 79-87
change the directory of the precision and NDCG graphs from
line 345 and 352
"""
from math import log... | apache-2.0 | -4,196,124,341,994,484,000 | 32.939058 | 214 | 0.548119 | false | 3.10545 | false | false | false |
ufo2mstar/PersonalPys | GreyscriptNB15.py | 1 | 2408 | #-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Kyu
#
# Created: 01/11/2012
# Copyright: (c) Kyu 2012
# Licence: <your licence>
#-------------------------------------------------------------------------------
# Combi Try!
imp... | gpl-2.0 | 4,172,745,439,984,703,000 | 28.012048 | 86 | 0.405316 | false | 3.197875 | false | false | false |
f0rki/cb-multios | original-challenges/A_Game_of_Chance/support/dealer.py | 1 | 9666 | #!/usr/bin/env python
#
# Copyright (C) 2014 Narf Industries <info@narfindustries.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
# th... | mit | -238,666,694,014,413,470 | 31.22 | 117 | 0.542727 | false | 3.403521 | true | false | false |
bhrzslm/uncertainty-reasoning | my_engine/others/GrMPy/lib/GrMPy/Tests/test_BNET_sumproduct.py | 1 | 3633 | # Author: Almero Gouws <14366037@sun.ac.za>
"""
This is a tutorial on how to create a Bayesian network, and perform
exact MAX-SUM inference on it.
"""
"""Import the required numerical modules"""
import numpy as np
from sprinkler_data import sprinkler_evidence, sprinkler_probs
"""Import the GrMPy modules"""
i... | mit | -8,610,013,309,501,509,000 | 27.778689 | 79 | 0.517754 | false | 3.466603 | false | false | false |
kartikshah1/Test | courseware/serializers.py | 1 | 2712 | """
Serializers for the courseware API
"""
from rest_framework import serializers
from courseware import models
from video.serializers import VideoSerializer
from quiz.serializers import QuizSerializer
from document.serializers import DocumentSerializer
class AddGroupSerializer(serializers.ModelSerializer):
cl... | mit | -2,709,606,381,594,734,600 | 28.16129 | 84 | 0.707965 | false | 4.535117 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201811/reconciliation_line_item_report_service/get_reconciliation_line_item_reports_for_reconciliation_report.py | 1 | 3086 | #!/usr/bin/env python
#
# Copyright 2017 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 requir... | apache-2.0 | 3,541,868,690,910,024,000 | 40.146667 | 79 | 0.680817 | false | 4.192935 | false | false | false |
elewis33/doorstop | doorstop/core/test/test_builder.py | 1 | 2041 | """Unit tests for the doorstop.core.builder module."""
import unittest
from unittest.mock import patch, Mock
from doorstop.core.tree import Tree
from doorstop.core.builder import build, find_document, find_item, _clear_tree
from doorstop.core.test import FILES, EMPTY
from doorstop.core.test import MockDocumentSkip, ... | lgpl-3.0 | -8,596,280,262,397,212,000 | 37.509434 | 78 | 0.677119 | false | 3.580702 | true | false | false |
juliakreutzer/bandit-neuralmonkey | neuralmonkey/model/stateful.py | 1 | 3523 | """Module that provides classes that encapsulate model parts with states.
There are three classes: `Stateful`, `TemporalStateful`, and `SpatialStateful`.
Model parts that do not keep states in time but have a single tensor on the
output should be instances of `Stateful`. Model parts that keep their hidden
states in a... | bsd-3-clause | -9,093,537,448,114,825,000 | 33.539216 | 79 | 0.68805 | false | 4.229292 | false | false | false |
crevetor/vcrwrapper | vcrwrapper/vcrutils.py | 1 | 2982 | from contextlib import contextmanager
import inspect
import json
import vcr
def json_query_matcher(r1, r2):
"""
Match two queries by decoding json-encoded query args and comparing them
"""
if len(r1.query) != len(r2.query):
return False
for i,q in enumerate(r1.query):
if q[0] !=... | gpl-2.0 | 6,299,087,452,579,828,000 | 28.524752 | 81 | 0.597586 | false | 3.872727 | true | false | false |
flavour/eden | modules/s3/codecs/xls.py | 1 | 49164 | # -*- coding: utf-8 -*-
"""
S3 Microsoft Excel codec
@copyright: 2011-2019 (c) Sahana Software Foundation
@license: MIT
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 wi... | mit | -3,162,987,197,995,865,000 | 34.964887 | 124 | 0.467252 | false | 4.751981 | false | false | false |
denisenkom/django | tests/serializers_regress/tests.py | 1 | 21745 | """
A test spanning all the capabilities of all the serializers.
This class defines sample data and a dynamically generated
test case that is capable of testing the capabilities of
the serializers. This includes all valid data values, plus
forward, backwards and self references.
"""
from __future__ import unicode_lite... | bsd-3-clause | -7,877,821,534,166,548,000 | 38.826007 | 115 | 0.668935 | false | 3.377077 | true | false | false |
ErickMurillo/geodjango-example | world/migrations/0001_initial.py | 1 | 1422 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='WorldBorder',
fields... | mit | -1,354,117,714,438,932,500 | 39.628571 | 114 | 0.563291 | false | 4.232143 | false | false | false |
shiquanwang/numba | numba/support/cffi_support.py | 1 | 2857 | # -*- coding: utf-8 -*-
"""
Support for CFFI. Allows checking whether objects are CFFI functions and
obtaining the pointer and numba signature.
"""
from __future__ import print_function, division, absolute_import
from numba import *
from numba.minivect.minitypes import *
from numba.minivect import minitypes, minierror... | bsd-2-clause | 2,206,667,430,541,992,200 | 31.83908 | 79 | 0.559328 | false | 3.653453 | false | false | false |
CosmosID/cosmosid-cli | cosmosid/api/analysis.py | 1 | 3803 | """Representation of Analysis."""
import logging
import requests
from cosmosid.api.files import Runs
from cosmosid.helpers.exceptions import (AuthenticationFailed,
CosmosidException,
NotFoundException)
LOGGER = logging.getLogger(__name_... | mit | 7,192,464,085,135,019,000 | 40.336957 | 78 | 0.546148 | false | 4.045745 | false | false | false |
dongweiming/flask_reveal | social/strategies/base.py | 1 | 6213 | import time
import random
import hashlib
from social.utils import setting_name
from social.store import OpenIdStore
class BaseTemplateStrategy(object):
def __init__(self, strategy):
self.strategy = strategy
def render(self, tpl=None, html=None, context=None):
if not tpl and not html:
... | bsd-3-clause | -2,883,652,518,667,524,000 | 33.709497 | 74 | 0.617576 | false | 4.479452 | false | false | false |
FEniCS/ufl | ufl/finiteelement/hdivcurl.py | 1 | 4145 | # -*- coding: utf-8 -*-
# Copyright (C) 2008-2016 Andrew T. T. McRae
#
# This file is part of UFL (https://www.fenicsproject.org)
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# Modified by Massimiliano Leoni, 2016
from ufl.finiteelement.finiteelementbase import FiniteElementBase
from ufl.sobolevspace import HDi... | lgpl-3.0 | 472,424,525,507,834,050 | 33.256198 | 116 | 0.626055 | false | 3.892019 | false | false | false |
python-control/python-control | control/tests/modelsimp_test.py | 1 | 9062 | """modelsimp_array_test.py - test model reduction functions
RMM, 30 Mar 2011 (based on TestModelSimp from v0.4a)
"""
import numpy as np
import pytest
from control import StateSpace, forced_response, tf, rss, c2d
from control.exception import ControlMIMONotImplemented
from control.tests.conftest import slycotonly, m... | bsd-3-clause | -5,015,453,693,631,061,000 | 39.81982 | 79 | 0.537188 | false | 2.980921 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.