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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SasiAR/state-manager | src/unittest/python/statemanager_test/sendback_tests.py | 1 | 5489 | import unittest
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from statemanager import api
import os
from statemanager.error import NoStateDefinedError, NoWorkflowDefined
class TestWorkflowState(unittest.TestCase):
def setUp(self):
engine = create_engine("sqlite://", echo=Fa... | mit | 6,791,032,276,644,185,000 | 44.741667 | 117 | 0.642922 | false | 3.585238 | true | false | false |
fuyajun1983cn/emacs.d | download_3rd_package.py | 1 | 2276 | #!/usr/bin/env python3
import os
import inspect
cur_dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
def git_clone(url, dest_dir):
'''
download third party packaged that cannot get from elpa
'''
save_path = os.path.join(cur_dir, "src", dest_dir)
if os.path.exists(save_path):
... | gpl-3.0 | -2,309,331,799,313,304,000 | 49.577778 | 106 | 0.695518 | false | 2.765492 | false | false | false |
meshy/framewirc | framewirc/messages.py | 1 | 5745 | from collections import deque
from . import commands, exceptions
from .strings import to_bytes, to_unicode
from .utils import LINEFEED
ACTION_START = b'\1ACTION '
ACTION_END = b'\1'
MAX_LENGTH = 512 # The largest legal size of an IRC command.
class ReceivedMessage(bytes):
"""A message recieved from the IRC ne... | bsd-2-clause | -5,844,683,607,712,469,000 | 32.208092 | 79 | 0.602263 | false | 3.814741 | false | false | false |
vijayaganesh/Kanjoos-HackGT | django-webapp/kanjoos/myapp/src/helper/utilities.py | 1 | 3128 | import tensorflow as tf
import numpy as np
import os,glob,cv2
import sys,argparse
from google.cloud import vision
from google.cloud.vision import types
import webcolors
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__),'..','constants'))
import Constant
# print(Constant.Classifier_Model)
def predict... | mit | 3,413,454,535,507,966,000 | 31.247423 | 116 | 0.703005 | false | 2.999041 | false | false | false |
cqychen/quants | quants/loaddata/skyeye_ods_classified_gem.py | 1 | 1132 | #coding=utf8
import tushare as ts;
import pymysql;
import time as dt
from datashape.coretypes import string
from pandas.io.sql import SQLDatabase
import sqlalchemy
import datetime
from sqlalchemy import create_engine
from pandas.io import sql
import threading
import pandas as pd;
import sys
sys.path.append('../') #添加配... | epl-1.0 | -688,086,088,919,487,100 | 27.777778 | 100 | 0.562741 | false | 3.129909 | false | false | false |
luci/recipes-py | recipe_modules/context/tests/luci_context.py | 2 | 1679 | # Copyright 2020 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from PB.go.chromium.org.luci.lucictx import sections as sections_pb2
DEPS = [
'assertions',
'context',
'path',
'step',
]
def RunSteps(ap... | apache-2.0 | 4,952,863,850,282,686,000 | 31.288462 | 75 | 0.675998 | false | 3.228846 | false | false | false |
leonardocsantoss/ehventos | lib/uni_form/templatetags/uni_form.py | 1 | 6972 | # -*- coding:utf-8 -*-
from django.template import Context, Template
from django.template.loader import get_template
from django import template
from django.template.defaultfilters import slugify
register = template.Library()
###################################################
# Core as_uni_form filter.
# You will... | gpl-2.0 | -6,937,055,389,311,617,000 | 30.405405 | 167 | 0.565261 | false | 4.343925 | false | false | false |
lgt1001/eztest | setup.py | 1 | 1714 | """eztest - A python package to do performance/load test
Copyright (C) 2018 lgt, version 1.0 by lgt
* https://github.com/lgt1001/eztest
"""
from setuptools import setup
setup(
name="eztest",
version="2.0.2",
description="eztest is a Python package and execution used for performance testing or load testing... | gpl-2.0 | 3,180,612,447,811,982,300 | 37.954545 | 105 | 0.628938 | false | 4.014052 | true | false | false |
AdamantLife/alcustoms | alcustoms/sql/objects/graphdb.py | 1 | 12988 | """ GraphDB- A Graph-managing Database
GraphDB is a Connection object which allows for a flexible implementation of
graph-structured data.
Consider the following Example Database:
Table: Country (name)
Table: Person (name)
Table: AnimalSpecies (name)
Table: Food (name)
There are ... | gpl-3.0 | 6,016,475,637,134,377,000 | 45.224199 | 185 | 0.654373 | false | 4.099747 | false | false | false |
luthur/keptrans-api | api/api/views/v_0_1_0/__init__.py | 1 | 1523 | # coding:utf-8
import json
from cryptacular.bcrypt import BCRYPTPasswordManager
from webob import exc
from webob.response import Response
def convert_datetime(model_object):
model_object['pubDate'] = model_object['pubDate'].strftime("%Y-%m-%d %H:%M:%S")
model_object['modifiedDate'] = model_object['modifiedDat... | mit | -9,094,790,806,310,079,000 | 27.222222 | 93 | 0.659882 | false | 3.509217 | false | false | false |
arve0/fijibin | fijibin/macro.py | 1 | 6825 | # encoding: utf-8
"""
Run Fiji is just ImageJ macros headless with python.
"""
import pydebug, subprocess, os, re
from tempfile import mkstemp
import fijibin
# debug with DEBUG=fijibin python script.py
debug = pydebug.debug('fijibin')
##
# Running macros
##
def run(macro, output_files=[], force_close=True):
"""
... | mit | -3,014,095,169,963,931,000 | 32.62069 | 85 | 0.630623 | false | 3.91791 | false | false | false |
programa-stic/barf-project | barf/core/reil/reil.py | 1 | 13618 | # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... | bsd-2-clause | 7,773,172,938,790,265,000 | 23.715064 | 104 | 0.567044 | false | 3.922235 | false | false | false |
shakamunyi/fig | compose/cli/multiplexer.py | 1 | 1764 | from __future__ import absolute_import
from __future__ import unicode_literals
from threading import Thread
from six.moves import _thread as thread
try:
from Queue import Queue, Empty
except ImportError:
from queue import Queue, Empty # Python 3.x
from compose.cli.signals import ShutdownException
STOP = o... | apache-2.0 | 9,156,157,170,443,170,000 | 25.727273 | 77 | 0.560091 | false | 4.534704 | false | false | false |
lajanki/quote_randomizer | run_bot.py | 1 | 1529 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tweets quotes randomized by quotes.py.
https://twitter.com/quote_bot_6
"""
import json
import os
import argparse
import logging
import twython
from src import quotes
from src import utils
PATH_TO_LOG = os.path.join(utils.PATH_TO_SRC, "..", "bot_quotes.log")
PATH_TO_KE... | gpl-2.0 | -5,780,982,211,857,534,000 | 22.166667 | 102 | 0.654022 | false | 3.316703 | false | false | false |
superchilli/webapp | app/main/forms.py | 1 | 2559 | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, BooleanField, SelectField,\
SubmitField, FileField
from wtforms.validators import Required, Length, Email, Regexp
from wtforms import ValidationError
from flask_pagedown.fields import PageDownField
from ..models import Role, User
clas... | mit | 5,832,116,005,839,267,000 | 37.208955 | 78 | 0.639312 | false | 4.222772 | false | false | false |
475Cumulus/TBone | tbone/resources/mongo.py | 1 | 10381 | #!/usr/bin/env python
# encoding: utf-8
import asyncio
import logging
from functools import singledispatch
from bson.objectid import ObjectId
from bson.errors import InvalidId
from tbone.data.fields.mongo import DBRefField
from tbone.db.models import MongoCollectionMixin, post_save
from tbone.dispatch.channels.mongo i... | mit | 6,813,595,939,800,529,000 | 35.812057 | 133 | 0.587805 | false | 4.389429 | false | false | false |
pklaus/brother_ql | brother_ql/reader.py | 1 | 14472 | #!/usr/bin/env python
import struct
import io
import logging
import sys
from PIL import Image
from PIL.ImageOps import colorize
from builtins import bytes
logger = logging.getLogger(__name__)
OPCODES = {
# signature name following bytes description
b'\x00': ("preamble", ... | gpl-3.0 | -6,390,855,485,168,162,000 | 39.997167 | 131 | 0.501382 | false | 3.86229 | false | false | false |
danielmcd/hacks | marketpatterns/find_move.py | 1 | 4599 | #!/usr/bin/python
# Find examples of a movement
# Copyright 2015 Daniel McDonald, All rights reserved
# ============================================================================
from __future__ import print_function
from __future__ import division
import csv
import datetime
import glob
import numpy as np
import os
i... | gpl-3.0 | 5,270,679,518,953,879,000 | 30.5 | 116 | 0.623614 | false | 3.107432 | false | false | false |
lexdene/hbml | hbml/lang_struct.py | 1 | 6700 | class LangStructBase(object):
def __init__(self, parse_tree):
self._parse_tree = parse_tree
class Tag(LangStructBase):
_DEFAULT_TAG_NAME = 'div'
def compile(self, block, env):
tag_name = self._DEFAULT_TAG_NAME
class_names = []
_id = None
_filter = None
att... | gpl-3.0 | -5,360,333,973,847,073,000 | 27.273128 | 79 | 0.49813 | false | 3.559623 | false | false | false |
0todd0000/rft1d | rft1d/examples/val_broken_0_gauss.py | 1 | 1486 |
import numpy as np
from matplotlib import pyplot
import rft1d
#(0) Set parameters:
np.random.seed(0)
nResponses = 10000
nNodes = 101
FWHM = 13.1877
### generate a field mask:
nodes_full = np.array([True]*nNodes) #nothing masked out
nodes = nodes_full.copy()
nodes[20:45] = False #thi... | gpl-3.0 | -2,370,105,765,108,783,000 | 28.137255 | 71 | 0.658143 | false | 2.597902 | false | false | false |
eroicaleo/LearningPython | interview/leet/143_Reorder_List.py | 1 | 1331 | #!/usr/bin/env python3
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
from linklist import *
class Solution(object):
def reorderList(self, head):
"""
:type head: ListNode
:rtype: None Do not ret... | mit | -1,029,493,818,960,199,000 | 26.729167 | 74 | 0.558978 | false | 3.636612 | false | false | false |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentDC.py | 1 | 3115 | # -*- 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 "Lic... | apache-2.0 | -3,497,611,184,995,681,000 | 41.671233 | 100 | 0.688283 | false | 4.663174 | false | false | false |
alykhank/Tunezout | songs/admin.py | 1 | 1087 | from django.contrib import admin
from django.contrib.auth.models import User
from songs.models import Genre, Song, TwitterProfile
class SongInline(admin.TabularInline):
model = Song
class GenreAdmin(admin.ModelAdmin):
search_fields = ['name']
inlines = [SongInline]
class SongAdmin(admin.ModelAdmin):
list_display... | mit | -4,305,210,017,805,202,000 | 31.939394 | 87 | 0.733211 | false | 3.293939 | false | false | false |
endlessm/chromium-browser | third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators_test.py | 2 | 1809 | #!/usr/bin/env python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import decorators
import logging
import unittest
from trace_test import TraceTest
#from .trace_test import TraceTest
def generator():
... | bsd-3-clause | -2,259,553,590,832,479,700 | 27.714286 | 72 | 0.698729 | false | 3.706967 | true | false | false |
ngageoint/scale | scale/trigger/migrations/0001_initial.py | 1 | 2163 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import util.deprecation
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='TriggerEvent',
... | apache-2.0 | 4,418,623,670,557,185,000 | 39.811321 | 130 | 0.560333 | false | 4.396341 | false | false | false |
jbenden/ansible | lib/ansible/modules/cloud/amazon/redshift_subnet_group.py | 1 | 5940 | #!/usr/bin/python
# Copyright 2014 Jens Carl, Hothead Games Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'stat... | gpl-3.0 | -5,619,237,272,447,529,000 | 32.184358 | 122 | 0.630303 | false | 4.159664 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201805/product_service/update_products.py | 1 | 2253 | #!/usr/bin/env python
#
# Copyright 2015 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 | 4,614,115,110,883,678,000 | 32.132353 | 76 | 0.694186 | false | 4.11883 | false | false | false |
oshtaier/robottelo | tests/foreman/cli/test_docker.py | 1 | 26579 | """Unit tests for the Docker feature."""
from ddt import ddt
from fauxfactory import gen_string
from robottelo import entities
from robottelo.cli.docker import Docker
from robottelo.cli.factory import (
CLIFactoryError,
make_org,
make_product,
make_repository,
)
from robottelo.cli.repository import Repo... | gpl-3.0 | 7,278,253,763,525,163,000 | 26.457645 | 80 | 0.621318 | false | 4.334475 | true | false | false |
jparicka/recloud | devel/views.py | 1 | 1269 | # -*- coding: utf-8 -*-
import os
import time
import pickle
import logging
import datetime
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.http import HttpResponseForbidden
from django.http import HttpResponse, HttpRe... | mit | -1,147,228,683,607,538,700 | 21.678571 | 148 | 0.776202 | false | 4.106796 | false | false | false |
JarbasAI/JarbasAI | jarbas_skills/service_object_recognition/label_map_util.py | 1 | 4419 | # Copyright 2017 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... | gpl-3.0 | 3,453,932,987,950,560,000 | 34.071429 | 80 | 0.675945 | false | 3.942016 | false | false | false |
tuergeist/HackerRank | challenges/sherlock_and_array.py | 1 | 1898 |
'''NO
NO
YES
YES
YES
YES
NO
YES
NO
NO'''
def main():
# t tests
# n elems
#t, case = readFromFile('sherlock_and_array_sample3.input.txt')
t, case = readFromStdin()
for n in range(t):
#print("processing ", n)
if findIndex(case[n]): print("YES")
else: print("NO")
def readFro... | gpl-3.0 | 5,511,664,852,286,034,000 | 20.1 | 76 | 0.467861 | false | 3.41982 | false | false | false |
DTMilodowski/EO_data_processing | src/plot_EO_data/plot_forest_loss_maps.py | 1 | 2311 | # This function plots up a series of maps illustrating forest loss through time,
# as modelled based on global forest watch annual forest loss distributed temporally
# based on the "seasonality" of FORMA
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
from mpl_toolkits.basemap import Basemap, s... | gpl-3.0 | -8,041,421,110,807,346,000 | 35.109375 | 134 | 0.688014 | false | 2.407292 | false | false | false |
lycying/seeking | sklib/startup.py | 1 | 4281 | # coding:utf-8
#
# Copyright (c) 2010, guo.li <lycying@gmail.com>
# Site < http://code.google.com/p/seeking/ >
# All rights reserved.
# vim: set ft=python sw=2 ts=2 et:
#
import sys
from PyQt5.QtCore import QDir
from PyQt5.QtCore import QLocale
from PyQt5.QtCore import QTranslator
from PyQt5.QtCore import SIGNAL
from... | gpl-2.0 | 2,460,224,171,646,259,700 | 25.103659 | 83 | 0.654053 | false | 3.79858 | false | false | false |
excid3/logbot | logbot.py | 1 | 15638 | #!/usr/bin/env python
# coding: utf-8
"""
LogBot
A minimal IRC log bot
Written by Chris Oliver
Includes python-irclib from http://python-irclib.sourceforge.net/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as publishe... | gpl-2.0 | 6,217,561,240,693,873,000 | 32.608602 | 232 | 0.543768 | false | 3.463652 | false | false | false |
renalreg/radar | radar/api/serializers/group_users.py | 1 | 2305 | from cornflake import fields
from cornflake.exceptions import ValidationError
from cornflake.sqlalchemy_orm import ModelSerializer
from radar.api.serializers.common import (
EnumLookupField,
GroupField,
MetaMixin,
StringLookupField,
UserMixin,
)
from radar.exceptions import PermissionDenied
from ra... | agpl-3.0 | -7,541,290,508,817,129,000 | 31.928571 | 116 | 0.667245 | false | 4.340866 | false | false | false |
zenodo/invenio | invenio/modules/access/mailcookie.py | 1 | 6491 | # This file is part of Invenio.
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013, 2015 CERN.
#
# Invenio 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)... | gpl-2.0 | 4,242,368,885,382,790,700 | 34.861878 | 79 | 0.6888 | false | 3.982209 | false | false | false |
AtnNn/rethinkdb | drivers/python/rethinkdb/ast.py | 1 | 17368 | import ql2_pb2 as p
import types
import sys
from errors import *
from net import Connection
class RqlQuery(object):
# Instantiate this AST node with the given pos and opt args
def __init__(self, *args, **optargs):
self.args = [expr(e) for e in args]
self.optargs = {}
for k in optargs.... | agpl-3.0 | 631,783,892,108,233,900 | 23.705548 | 130 | 0.590742 | false | 3.324019 | false | false | false |
NinjaMSP/crossbar | crossbar/adapter/rest/common.py | 1 | 21280 | #####################################################################################
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g.
# you have purchased a commercial license), the license terms below apply.
#
# Should you enter ... | agpl-3.0 | -8,341,868,396,865,175,000 | 35.753022 | 147 | 0.536889 | false | 4.496091 | false | false | false |
tiliv/django-field-permissions | field_permissions/backends.py | 1 | 1024 | class InstancePermissionBackend(object):
supports_object_permissions = True
supports_anonymous_user = True
supports_inactive_user = True
def authenticate(self, username, password):
""" Abstain from offering user authentication. """
return None
def has_perm(self, user_obj, perm, obj... | mit | 8,668,085,930,937,320,000 | 34.310345 | 99 | 0.635742 | false | 4.413793 | false | false | false |
briancurtin/python-openstacksdk | openstack/tests/unit/compute/v2/test_availability_zone.py | 1 | 1755 | # 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 t... | apache-2.0 | 2,675,795,328,834,731,500 | 36.340426 | 75 | 0.704843 | false | 3.823529 | true | false | false |
pierre-haessig/sysdiag | transfer_func.py | 1 | 7843 | #!/usr/bin/python
# -*- coding: utf-8 -*-
""" Compute the tranfer function of a system
based on SymPy for equation handling and solving
Pierre Haessig — September 2013
"""
from __future__ import division, print_function
import sympy
from sympy import symbols, Eq
import blocks
def laplace_output(syst, input_var):
... | mit | -8,476,373,503,644,178,000 | 35.737089 | 87 | 0.582492 | false | 3.341161 | false | false | false |
Alkemic/webpage | module/static_page/models.py | 1 | 2482 | # -*- coding:utf-8 -*-
"""Models related to static pages"""
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from taggit.managers import TaggableManager
from postmarkup import render_bbcode
from uuslug import uuslug as slugify
from module.static_page.m... | mit | -2,342,548,324,400,133,600 | 28.047059 | 75 | 0.620089 | false | 3.462833 | false | false | false |
snswa/swsites | dashboard/views.py | 1 | 3850 | import datetime
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from dashboard import digests
from dashboard.forms import Digest... | apache-2.0 | 391,442,457,298,745,600 | 34.321101 | 118 | 0.670649 | false | 3.78937 | false | false | false |
carthagecollege/django-djforms | djforms/settings_default.py | 1 | 10338 | # -*- coding: utf-8 -*-
import os.path
from datetime import datetime
from djzbar.settings import INFORMIX_EARL as INFORMIX_EARL
DEBUG = False
INFORMIX_DEBUG = ''
REQUIRED_ATTRIBUTE = False
ADMINS = (
('', ''),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'HOST': '127.0.0.1',
... | unlicense | -5,101,783,893,202,775,000 | 26.716667 | 96 | 0.584156 | false | 3.117612 | false | false | false |
cherry-wb/SideTools | examples/itemviews/stardelegate/stardelegate.py | 1 | 7802 | #!/usr/bin/python
"""**************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** Yo... | apache-2.0 | 1,672,075,524,553,423,400 | 42.594286 | 81 | 0.614586 | false | 4.327232 | false | false | false |
mouton5000/DiscreteEventApplicationEditor | game/Registeries/RectRegistery.py | 1 | 1991 | __author__ = 'mouton'
from collections import defaultdict
import pygame
from pygame import Color
from pygame.rect import Rect
DEFAULT_WIDTH = 1
DEFAULT_COLOR = '000000'
_rectsList = defaultdict(list)
_rectsToUpdate = []
def init():
reinit()
def reinit():
_rectsList.clear()
del _rectsToUpdate[:]
def... | mit | 5,608,806,390,712,400,000 | 22.162791 | 108 | 0.585133 | false | 3.140379 | false | false | false |
111pontes/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_pbr_vservice_mgr_oper.py | 1 | 153123 |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI... | apache-2.0 | -8,325,778,066,808,826,000 | 58.212297 | 277 | 0.579234 | false | 3.65894 | false | false | false |
shadowmint/nwidget | lib/cocos2d-0.5.5/samples/tetrico/levels.py | 1 | 1105 | from colors import *
class Level( object ):
pass
class LevelLens( Level ):
speed = 0.5
blocks = [ Colors.LENS ]
lines = 10
prob = 0.07
class LevelScale( Level ):
speed = 0.5
blocks = [ Colors.SCALE ]
lines = 10
prob = 0.07
class LevelLiquid( Level ):
speed =... | apache-2.0 | -6,653,848,157,226,644,000 | 18.462963 | 115 | 0.569231 | false | 3.166189 | false | false | false |
indrz/indrz | indrz/buildings/views.py | 1 | 10734 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
import geojson
from django.contrib.gis.geos import GEOSGeometry
from django.http import HttpResponse
from geojson import Feature, FeatureCollection, Point
from rest_framework import viewsets
from rest_framework.decorators import api_view
from re... | gpl-3.0 | -8,270,988,629,206,406,000 | 33.184713 | 118 | 0.64319 | false | 3.844556 | false | false | false |
kartikgupta0909/build-mozharness | mozharness/mozilla/structuredlog.py | 1 | 7097 | # ***** BEGIN LICENSE BLOCK *****
# 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/.
# ***** END LICENSE BLOCK *****
import json
from mozharness.base import log
from mozha... | mpl-2.0 | 586,396,493,938,821,200 | 41.244048 | 94 | 0.618008 | false | 4.211869 | true | false | false |
aldur/MatasanoCrypto | matasano/challenges.py | 1 | 39072 | #!/usr/bin/env python
# encoding: utf-8
"""The main file."""
import matasano.util
import matasano.stats
import matasano.blocks
import matasano.oracle
import matasano.attacker
import matasano.prng
import matasano.mac
import matasano.math
import matasano.public
import matasano.hash
import base64
import binascii
import... | mit | -5,840,100,728,337,750,000 | 28.961656 | 118 | 0.612746 | false | 3.343603 | false | false | false |
borysiasty/inasafe | safe/impact_functions/inundation/flood_raster_population/test/test_flood_raster_population.py | 1 | 4174 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid and World Bank
- **Test for Flood Population Evacuation Raster Impact Function.**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Genera... | gpl-3.0 | -5,799,760,202,324,135,000 | 37.293578 | 78 | 0.646143 | false | 3.857671 | true | false | false |
fuxiang90/kaggle | src/check.py | 1 | 3677 | # coding=utf-8
#! /usr/bin/python
import config
import json
import train_input
import test_input
def main():
train_business_dict = {}
train_input.get_business(config.train_business, train_business_dict)
test_business_dict = {}
test_input.get_test_business(config.test_business, test_b... | bsd-3-clause | 8,991,766,278,279,158,000 | 24.892857 | 82 | 0.605241 | false | 3.574951 | true | false | false |
StyXman/ayrton | ayrton/importer.py | 1 | 3597 | # -*- coding: utf-8 -*-
# (c) 2016 Marcos Dione <mdione@grulic.org.ar>
# This file is part of ayrton.
#
# ayrton 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... | gpl-3.0 | -895,047,886,038,074,800 | 32.877358 | 88 | 0.630744 | false | 3.623613 | false | false | false |
SANDEISON/Python | Exercicios/03 Exercício de Programação - DESAFIO [Opcional]/02-Exercicio.py | 1 | 1061 | ''' Indique como um troco deve ser dado utilizando-se um número mínimo de notas.
Seu algoritmo deve ler o valor da conta a ser paga e o valor do pagamento efetuado desprezando os centavos.
Suponha que as notas para troco sejam as de 50, 20, 10, 5, 2 e 1 reais, e que nenhuma delas esteja em falta no caixa.
'''
... | gpl-2.0 | 8,669,939,731,593,588,000 | 26.153846 | 121 | 0.555241 | false | 2.640898 | false | false | false |
pmlrsg/PySpectra | PySpectra/usgs.py | 1 | 2157 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# This file has been created by ARSF Data Analysis Node and
# is licensed under the MIT Licence. A copy of this
# licence is available to download with this file.
#
# Author: Robin Wilson
# Created: 2015-11-16
import sys
import numpy as np
# Python 2/3 imports
try:
... | mit | -9,057,306,966,139,500,000 | 24.376471 | 108 | 0.609643 | false | 3.607023 | false | false | false |
fifabsas/talleresfifabsas | python/Extras/Dinamica_no_Lineal/mapas/logistic_map.py | 1 | 1057 | # -*- coding: UTF-8 -*-
from matplotlib import pyplot as plt
import numpy as np
################################################################################
def logistic(x, r):
"""Logistic map, with parameter r."""
return r * x * (1 - x)
def bif_plot(x0, rs, axes):
"""Bifurcation plot for the logist... | mit | 790,216,473,869,444,000 | 26.815789 | 80 | 0.444655 | false | 3.570946 | false | false | false |
ALSchwalm/sparqllib | examples/filter_example.py | 1 | 1100 | #!/usr/bin/env python
'''
A script to demonstrate the various SPARQL filter query components by
determining the relationship between Michelle and Barack Obama
'''
from sparqllib import *
from rdflib import BNode, Literal
from rdflib.namespace import FOAF
from pprint import pprint
def main():
# Create the necessa... | mit | -5,817,797,206,930,264 | 27.947368 | 71 | 0.693636 | false | 3.353659 | false | false | false |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/polys/rootoftools.py | 1 | 22400 | """Implementation of RootOf class and related tools. """
from sympy.core import (S, Expr, Integer, Float, I, Add, Lambda, symbols,
sympify, Rational)
from sympy.polys.polytools import Poly, PurePoly, factor
from sympy.polys.rationaltools import together
from sympy.polys.polyfuncs import symmetrize, viete
fro... | gpl-3.0 | 5,023,572,719,451,224,000 | 30.111111 | 95 | 0.541027 | false | 3.891591 | false | false | false |
tdfischer/lets-encrypt-preview | letsencrypt/auth_handler.py | 1 | 20080 | """ACME AuthHandler."""
import itertools
import logging
import time
import zope.component
from acme import challenges
from acme import messages
from letsencrypt import achallenges
from letsencrypt import constants
from letsencrypt import errors
from letsencrypt import interfaces
logger = logging.getLogger(__name__... | apache-2.0 | -8,557,672,848,522,989,000 | 34.289982 | 83 | 0.623506 | false | 4.071371 | false | false | false |
gautamMalu/rootfs_xen_arndale | usr/lib/python3/dist-packages/aptdaemon/loop.py | 1 | 1100 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Main loop for aptdaemon."""
# Copyright (C) 2008-2009 Sebastian Heinlein <devel@glatzor.de>
#
# 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; eit... | gpl-2.0 | -785,503,816,671,618,000 | 32.333333 | 73 | 0.729091 | false | 3.571429 | false | false | false |
spiside/docker-luigi | docker/base/scripts/generate_config.py | 1 | 1790 | #!/usr/bin/env python
"""
Reads from environment variables and generates the luigi
config file to /etc/luigi/client.cfg using python's configparser.
Environment variables to be written should follow this standard:
LUIGI_<section>_<key>=<value>
eg.
LUIGI_CORE_DEFAULT-SCHEDULER-URL=http://localhost:8082
... | mit | -6,448,594,132,325,383,000 | 28.833333 | 77 | 0.647486 | false | 3.721414 | true | false | false |
AndreiRegiani/algorithms | problem-1/solution.py | 1 | 1421 | #!/usr/bin/env python3
""" Solution by Andrei Regiani - https://regiani.xyz """
import sys
import doctest
def special_sort(line_input):
"""
>>> special_sort('1')
'1'
>>> special_sort('car truck bus')
'bus car truck'
>>> special_sort('8 4 6 1 -2 9 5')
'-2 1 4 5 6 8 9'
>>> special_so... | gpl-3.0 | -378,610,361,227,783,800 | 20.861538 | 62 | 0.522871 | false | 3.375297 | false | false | false |
nazcahawk/my-machine-learning-journey | Algorithms/Resampling Methods/resampling-methods.py | 1 | 1839 | import pandas as pd
from sklearn import model_selection
from sklearn.linear_model import LogisticRegression
def loadData():
col_names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']
dataframe = pd.read_csv("./pima-indians-diabetes.data.txt", names = col_names)
array = dataframe.v... | gpl-3.0 | 7,304,567,308,098,086,000 | 31.280702 | 113 | 0.664492 | false | 3.08557 | true | false | false |
srio/shadow3-scripts | fresnel_zone_plate.py | 1 | 5456 | """
Example of how to trace a Fresnel Zone Plate
by Lucia Alianelli and Manuel Sanchez del Rio.
1) The source is from get_beam(), is a collimated source of squared cross section (800 microns),
monochromatic (1.54 A)
2) fresnel_zone_plane() calculates a fzp, centered at (0,0). It returns a new shadow3 beam
cont... | mit | -3,930,223,089,856,317,000 | 25.362319 | 111 | 0.60099 | false | 2.889831 | false | false | false |
cwi-dis/igor | igor/std-plugins/watchdog/igorplugin.py | 1 | 1949 | """Linux kernel watchdog support"""
import time
import _thread
class WatchdogClass:
_singleton = None
def __init__(self):
self.watchdog_device = None
self.watchdog_timeout = 60
self.stop_feeding = time.time() + self.watchdog_timeout
WatchdogClass._singleton = self
... | mit | 5,609,317,664,189,174,000 | 32.603448 | 88 | 0.583889 | false | 3.993852 | false | false | false |
koadman/proxigenomics | graph/src/hic.py | 1 | 5674 | import vcf
#
# Simple method to count the number of records in a
# VCF file. This is useful for providing progress on
# very large runs.
#
def count_vcf_records(fname):
return len([rec for rec in vcf.Reader(filename=fname)])
#
# Represents the placement of a read within an
# assembly or mapping.
#
class ReadPlac... | gpl-2.0 | -4,197,486,720,476,214,000 | 26.278846 | 115 | 0.602573 | false | 3.684416 | false | false | false |
UMUNC/UMUNC | umunc_iris/view.py | 1 | 12946 | #coding=utf-8
import string, random, time
from django.http import HttpResponseRedirect,HttpResponse,Http404
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login,logout
from... | gpl-2.0 | 4,903,219,674,929,317,000 | 36.201166 | 619 | 0.689185 | false | 2.944842 | false | false | false |
the-gigi/book-tracker | models.py | 1 | 1370 | from datetime import datetime
from sqlalchemy import (Column,
DateTime,
ForeignKey,
Integer,
String,
Boolean,
Index)
from sqlalchemy.ext.declarative import declarative_base
fr... | mit | -6,815,357,815,406,935,000 | 29.466667 | 85 | 0.629927 | false | 4.202454 | false | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/multihosts/vm_snapshots/paths/xsky_path8.py | 1 | 1641 | import zstackwoodpecker.test_state as ts_header
import os
TestAction = ts_header.TestAction
def path():
return dict(initial_formation="template5", checking_point=8, path_list=[
[TestAction.create_vm, 'vm1', ],
[TestAction.create_volume, 'volume1', 'flag=scsi'],
[TestAction.attach_volume, 'vm1', 'volume1'],
... | apache-2.0 | 4,953,529,768,538,772,000 | 36.295455 | 185 | 0.691651 | false | 2.663961 | true | false | false |
ckelly/django-resume | resume/migrations/0001_initial.py | 1 | 4894 | # Generated by Django 2.0.2 on 2018-02-17 04:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Accomplishment',
fields=[
... | mit | 9,172,293,473,632,564,000 | 40.82906 | 135 | 0.519207 | false | 4.506446 | false | false | false |
davisd50/sparc.utils | sparc/utils/requests/request.py | 1 | 1507 | import requests
import warnings
from zope.component import getSiteManager
from zope.component.factory import Factory
from zope.interface import implementer
from zope.interface import implements
from zope.schema.fieldproperty import FieldProperty
from interfaces import IRequest
from sparc.entity.entity import BaseSchema... | mit | 2,045,606,421,133,598,000 | 36.7 | 72 | 0.71931 | false | 4.318052 | false | false | false |
Balannen/LSMASOMM | atom3/Kernel/GraphGrammar/GGLListRule1.py | 1 | 4090 | # _ GGLlistRule1.py ______________________________________________________
# Simple Graph Grammar rule for inserting an element in the list
# _______________________________________________________________________
from GGrule import *
from ASG_LinkedListMM import *
from Element import *
from B... | gpl-3.0 | -3,004,780,335,116,040,000 | 41.978495 | 101 | 0.620293 | false | 3.054518 | false | false | false |
yujikato/DIRAC | src/DIRAC/Resources/Computing/InProcessComputingElement.py | 1 | 4486 | ########################################################################
# File : InProcessComputingElement.py
# Author : Stuart Paterson
########################################################################
""" The simplest of the "inner" CEs (meaning it's used by a jobAgent inside a pilot)
A "InProcess" CE... | gpl-3.0 | -1,801,642,850,830,887,200 | 34.888 | 104 | 0.600981 | false | 4.276454 | false | false | false |
RetailMeNot/acky | setup.py | 1 | 1085 | from __future__ import print_function
from setuptools import setup, find_packages
from acky import __version__
import sys
if sys.version_info <= (2, 7):
error = "ERROR: acky requires Python 2.7 or later"
print(error, file=sys.stderr)
sys.exit(1)
with open('README.rst') as f:
long_description = f.read(... | mit | -6,813,822,627,591,228,000 | 27.552632 | 54 | 0.609217 | false | 3.807018 | false | true | false |
HazyResearch/metal | metal/multitask/mt_label_model.py | 1 | 4032 | import numpy as np
from scipy.sparse import issparse
from metal.label_model import LabelModel
from metal.label_model.lm_defaults import lm_default_config
from metal.multitask import MTClassifier
from metal.multitask.task_graph import TaskGraph
from metal.utils import recursive_merge_dicts
class MTLabelModel(MTClassi... | apache-2.0 | -7,107,710,309,165,409,000 | 37.037736 | 80 | 0.563244 | false | 3.449102 | false | false | false |
unioslo/cerebrum | contrib/statistics/generate_manual_affiliations_report.py | 1 | 10311 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016-2018 University of Oslo, Norway
#
# This file is part of Cerebrum.
#
# Cerebrum 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 | 8,576,409,972,899,144,000 | 33.37 | 79 | 0.586364 | false | 3.801991 | false | false | false |
bally12345/enigma2 | lib/python/Components/Converter/ServiceOrbitalPosition.py | 1 | 1396 | # -*- coding: utf-8 -*-
from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr
from Components.Element import cached
class ServiceOrbitalPosition(Converter, object):
FULL = 0
SHORT = 1
def __init__(self, type):
Converter.__init__(self, t... | gpl-2.0 | -5,284,013,900,266,894,000 | 27.489796 | 83 | 0.695559 | false | 3.123043 | false | false | false |
nanjj/softlayer-python | SoftLayer/CLI/vpn/ipsec/translation/add.py | 1 | 1533 | """Add an address translation to an IPSEC tunnel context."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
# from SoftLayer.CLI.exceptions import ArgumentError
# from SoftLayer.CLI.exceptions import CLIHalt
@click.command()
@click.argument('contex... | mit | 271,850,128,478,966,880 | 33.840909 | 73 | 0.60013 | false | 4.355114 | false | false | false |
polarmobile/polar.paywall.test | src/polar/paywall/test/schemas.py | 1 | 3096 | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2012, Polar Mobile.
# 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
# ... | bsd-3-clause | -1,451,032,653,089,704,400 | 31.25 | 78 | 0.57655 | false | 4.183784 | false | false | false |
jouvin/release | src/documentation_builder/lib/quattordocbuild/sourcehandler.py | 1 | 3530 | """
Module to handle 'source' related actions.
It contains functions to run maven clean and compile,
scan a whole tree for files and find '.pan' files and perl
files, where when there is a duplicate between '.pod' and
'.pl', the pod file has the preference.
"""
import os
from vsc.utils import fancylogger
from vsc.ut... | apache-2.0 | -4,200,295,582,493,911,000 | 28.416667 | 81 | 0.609065 | false | 3.997735 | false | false | false |
jesboat/fbthrift | thrift/lib/py/server/TAsyncioServer.py | 1 | 9957 | # @lint-avoid-pyflakes2
# @lint-avoid-python-3-compatibility-imports
import asyncio
import functools
import logging
from io import BytesIO
import struct
import warnings
from .TServer import TServer, TServerEventHandler, TConnectionContext
from thrift.Thrift import TProcessor
from thrift.transport.TTransport import TM... | apache-2.0 | -2,799,939,794,218,665,500 | 30.213166 | 79 | 0.626092 | false | 4.32913 | false | false | false |
lutris/lutris | lutris/runners/jzintv.py | 1 | 2783 | # Standard Library
import os
from gettext import gettext as _
# Lutris Modules
from lutris.runners.runner import Runner
from lutris.util import system
class jzintv(Runner):
human_name = _("jzIntv")
description = _("Intellivision Emulator")
platforms = [_("Intellivision")]
runner_executable = "jzintv/... | gpl-3.0 | -984,113,275,935,674,000 | 31.360465 | 70 | 0.483651 | false | 3.936351 | false | false | false |
Paul-St-Young/QMC | gamess_analyze.py | 1 | 1909 | #!/usr/bin/env python
"""
GAMESS output analysis script
Author: Paul Young
Last Modified: July 28 2014
"""
ENTRIES=["TOTAL ENERGY =", "FINAL MCSCF ENERGY IS","COMPUTING THE HAMILTONIAN FOR"]
import sys
class GAMESS:
def __init__(self,gmsout):
self.gmsout = gmsout
def grab(self,entry,line):
# prints out the ... | mit | 3,760,194,635,565,968,400 | 23.474359 | 83 | 0.618649 | false | 2.622253 | false | false | false |
bboot/doorman | action.py | 1 | 16021 | # Copyright 2017 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 or agreed to in writing, ... | apache-2.0 | 2,543,621,096,917,283,000 | 33.904139 | 100 | 0.59216 | false | 3.896158 | false | false | false |
demisto/content | Packs/IntSight/Integrations/IntSight/IntSight.py | 1 | 45839 | from CommonServerPython import *
import os
URL = demisto.getParam('server')
if URL[-1] != '/':
URL += '/'
if not demisto.getParam('proxy'):
del os.environ['HTTP_PROXY']
del os.environ['HTTPS_PROXY']
del os.environ['http_proxy']
del os.environ['https_proxy']
VALIDATE_CERT = not demisto.params().g... | mit | 2,684,224,134,671,546,400 | 38.721837 | 122 | 0.599031 | false | 3.476075 | false | false | false |
roymno2/mmd_material_searcher | search_run.py | 1 | 3905 | #! -*-coding=gbk-*-
import os
import subprocess
import sys
import commands
import time
def walk_in_dir(root_path):
assd=""
try:
for root, dirs, files in os.walk(root_path, True):
for name in files:
if len(name)>0:
if name[0]!="$":
... | cc0-1.0 | 4,331,324,545,141,451,300 | 34.18018 | 96 | 0.400256 | false | 4.154255 | false | false | false |
wpoa/wiki-imports | lib/python2.7/site-packages/mwparserfromhell/wikicode.py | 1 | 27082 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 Ben Kurtovic <ben.kurtovic@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 ... | gpl-3.0 | -7,413,086,825,576,524,000 | 45.451115 | 79 | 0.59226 | false | 4.220196 | false | false | false |
mobarski/sandbox | kdb/kdb2.py | 1 | 2477 | import sqlite3
def sanitize(x):
return x
class KDB:
def __init__(self,db):
self.db = db
#
def create(self,*keys):
for key in keys:
key = sanitize(key)
self.execute('create table if not exists {} (k primary key) without rowid'.format(key))
def drop(self,*keys):
for key in keys:
key = sanitize(key)
... | mit | -7,873,545,486,563,843,000 | 28.152941 | 99 | 0.625353 | false | 2.566839 | false | false | false |
anandha2017/udacity | nd101 Deep Learning Nanodegree Foundation/DockerImages/11_miniflow/06_cost/notebooks/miniflow.py | 1 | 4894 | import numpy as np
class Node(object):
"""
Base class for nodes in the network.
Arguments:
`inbound_nodes`: A list of nodes with edges into this node.
"""
def __init__(self, inbound_nodes=[]):
"""
Node's constructor (runs when the object is instantiated). Sets
pro... | mit | 4,252,226,177,772,334,600 | 26.340782 | 118 | 0.548835 | false | 3.946774 | false | false | false |
madformuse/api | api/oauth.py | 1 | 2374 |
from api import *
from datetime import datetime
# OAuth2 resource mapping
def current_user():
try:
if 'id' in session:
uid = int(session['id'])
return User.get(User.id == uid)
except ValueError:
pass
return None
@oauth.usergetter
def user_get(username, password, c... | gpl-3.0 | 2,845,156,840,187,432,000 | 27.60241 | 76 | 0.625105 | false | 3.936982 | false | false | false |
odeke-em/ldappy | ldapUsage/constants.py | 1 | 1852 | # Author: Emmanuel Odeke <odeke@ualberta.ca>
# Resource file for constants
import sys
############################CONSTANTS####################################
UALBERTA_DOMAIN_KEY = "ualberta.ca"
DATE_KEY = "date"
LAST_NAME_KEY = "lastname"
FIRST_NAME_KEY = "firstname"
SPEED_CODE_KEY = "speedCode" #code for acco... | mit | 6,495,661,489,442,663,000 | 26.235294 | 79 | 0.714903 | false | 2.801815 | false | false | false |
psycane/django-calendar | scheduler/views.py | 1 | 21376 | from .models import Event
import calendar
import datetime
from django.conf import settings
from django.db.models import Q
from django.http import Http404, HttpResponse, HttpResponseBadRequest
from django.shortcuts import render
from django.template.defaulttags import register
from django.template.loader import render_t... | mit | 8,058,490,695,554,118,000 | 39.56167 | 142 | 0.484328 | false | 5.028464 | false | false | false |
tobast/sysdig-full | processor/main.py | 1 | 4370 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import alu
import flags
import op1processor
import op2processor
import opcodeGetter
import registers
import memory_unit
import result_selector
import constants
from netlist import *
ENABLE_DEBUG = False
def show(pin, name):
if ENABLE_DEBUG:
push_context(name)
o = fresh... | gpl-3.0 | 2,248,279,515,306,278,700 | 23.550562 | 76 | 0.702746 | false | 2.515832 | false | false | false |
scott-maddox/fdint | scripts/gen__dgfd_pxd.py | 1 | 1365 | # Copyright (c) 2015, Scott J Maddox. All rights reserved.
# Use of this source code is governed by the BSD-3-Clause
# license that can be found in the LICENSE file.
import os
import sys
fpath = os.path.abspath(os.path.join(os.path.dirname(__file__),
'../fdint/_dgfd.pxd'))
with ope... | bsd-3-clause | -6,445,373,933,480,000,000 | 41.6875 | 85 | 0.484982 | false | 2.973856 | false | false | false |
Pointedstick/ReplicatorG | skein_engines/skeinforge-44/fabmetheus_utilities/geometry/manipulation_paths/segment.py | 1 | 6682 | """
Add material to support overhang or remove material at the overhang angle.
"""
from __future__ import absolute_import
#Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
import __init__
from fabmetheus_utili... | gpl-2.0 | -8,035,484,972,065,297,000 | 42.109677 | 157 | 0.776115 | false | 3.316129 | false | false | false |
googleapis/python-aiplatform | google/cloud/aiplatform_v1/types/model.py | 1 | 32277 | # -*- 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 | 3,624,728,981,931,930,600 | 52 | 126 | 0.649193 | false | 4.433045 | true | false | false |
dayatz/taiga-back | taiga/base/api/views.py | 1 | 18548 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... | agpl-3.0 | 5,930,852,295,475,852,000 | 36.54251 | 112 | 0.647094 | false | 4.524518 | false | false | false |
johnnykv/mnemosyne | normalizer/modules/kippo_events.py | 1 | 2086 | # Copyright (C) 2012 Johnny Vestergaard <jkv@unixcluster.dk>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This ... | gpl-3.0 | 7,506,185,033,417,648,000 | 34.355932 | 67 | 0.603068 | false | 4.172 | false | false | false |
QuLogic/meson | mesonbuild/compilers/swift.py | 1 | 4808 | # Copyright 2012-2017 The Meson development team
# 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 agree... | apache-2.0 | 4,217,364,798,761,059,300 | 36.858268 | 121 | 0.619592 | false | 3.590739 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.