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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mrachinskiy/blender-addon-booltron | object_utils.py | 1 | 1558 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# Booltron super add-on for super fast booleans.
# Copyright (C) 2014-2019 Mikhail Rachinskiy
#
# 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, eith... | mit | 7,013,193,063,922,342,000 | 31.458333 | 73 | 0.654044 | false | 3.540909 | false | false | false |
jnishi/chainer | chainer/functions/connection/depthwise_convolution_2d.py | 1 | 2945 | import chainer
def depthwise_convolution_2d(x, W, b=None, stride=1, pad=0):
"""Two-dimensional depthwise convolution function.
This is an implementation of two-dimensional depthwise convolution.
It takes two or three variables: the input image ``x``, the filter weight
``W``, and optionally, the bias ... | mit | 1,446,797,509,145,635,600 | 39.342466 | 79 | 0.611885 | false | 3.39677 | false | false | false |
zengchunyun/s12 | day10/homework/rabbitmq_management/modules/rabbitmq_client.py | 1 | 5848 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: zengchunyun
"""
import pika
import subprocess
import threading
import time
import sys
class RabbitMQClient(object):
def __init__(self, host="localhost", port=5672, timeout=15, host_id=None, binding_keys=None):
"""
:param host: rabbitmq服务器... | gpl-2.0 | -1,399,667,292,976,872,700 | 30.974522 | 112 | 0.565538 | false | 2.684492 | false | false | false |
hvnsweeting/GitPython | git/test/lib/helper.py | 1 | 10757 | # helper.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from __future__ import print_function
import os
import sys
from unittest import TestCase
import time
i... | bsd-3-clause | 7,220,957,404,321,188,000 | 34.737542 | 118 | 0.601934 | false | 4.076165 | true | false | false |
kunz07/fyp2017 | Ubidots-Finaltest.py | 1 | 4091 | # FYP2017
# Program to establish ZigBee communication between raspberry Pi and arduino
# Complete control of HVAC elements based on commands sent from the Pi
# Author: Kunal Jagadeesh
# License: Public Domain
import time
import serial
from ubidots import ApiClient
one = 1
zero = 0
f = open('Ubidots_APIkey.txt', 'r')... | mit | -7,591,887,865,722,326,000 | 24.72956 | 76 | 0.565143 | false | 3.059835 | false | false | false |
poeschlr/kicad-3d-models-in-freecad | cadquery/FCAD_script_generator/Buzzer_Beeper/cq_parameters_StarMicronics_HMB_06_HMB_12.py | 1 | 10133 | # -*- coding: utf-8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating PDIP models in X3D format
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
# This is a
# Dimensions are from Microchips Packaging Specification document:
# DS00000049BY. Body drawing is the same as QFP ... | gpl-2.0 | -1,566,509,898,174,940,400 | 38.585938 | 136 | 0.509425 | false | 3.664738 | false | false | false |
lafranceinsoumise/api-django | agir/events/migrations/0012_event_coordinates_type.py | 1 | 1120 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-09-28 14:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("events", "0011_notifications_enabled_fields")]
operations = [
migrations.AddField(
... | agpl-3.0 | 6,383,591,920,982,683,000 | 34.709677 | 85 | 0.551942 | false | 3.953571 | false | false | false |
Bismarrck/tensorflow | tensorflow/python/keras/optimizer_v2/adadelta.py | 1 | 5855 | # Copyright 2018 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 | 1,039,043,600,235,876,000 | 38.033333 | 80 | 0.663877 | false | 3.774984 | false | false | false |
noironetworks/group-based-policy | gbpservice/neutron/services/grouppolicy/common/constants.py | 1 | 1627 | # 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
# d... | apache-2.0 | 628,923,062,867,018,500 | 29.698113 | 78 | 0.72649 | false | 3.081439 | false | false | false |
vmahuli/contrail-controller | src/config/schema-transformer/test/test_service.py | 1 | 69059 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
import gevent
sys.path.append("../common/tests")
from testtools.matchers import Equals, Contains, Not
from test_utils import *
import test_common
import test_case
from vnc_api.vnc_api import *
try:
import to_bgp
except ImportError:
... | apache-2.0 | 1,834,423,797,736,134,400 | 43.872645 | 139 | 0.583993 | false | 3.155685 | true | false | false |
yanikou19/pymatgen | pymatgen/io/gwwrapper/GWworkflows.py | 1 | 15024 | # coding: utf-8
from __future__ import unicode_literals, division, print_function
"""
Workflows for GW calculations:
VaspGWFWWorkFlow fireworks wf for vasp
SingleAbinitGWWorkFlow workflow for abinit
Under construction:
general GW workflow that should manage all the code independent logic
"""
__author__ = "Michie... | mit | -4,241,482,951,457,405,000 | 40.617729 | 123 | 0.563632 | false | 3.792024 | true | false | false |
vane/django_tornado | django_tornado.py | 1 | 1266 | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'michal@vane.pl'
import os
import logging
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.wsgi
import sockjs.tornado
from django.core.handlers import wsgi
import pusher
import constraint
import logging as _
SETTINGS_PATH="d... | bsd-3-clause | -9,177,310,851,977,519,000 | 23.823529 | 95 | 0.699842 | false | 3.394102 | false | false | false |
stormi/tsunami | src/secondaires/magie/editeurs/spedit/supprimer.py | 1 | 2985 | # -*-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 | 6,382,476,464,064,139,000 | 42.779412 | 79 | 0.659053 | false | 3.84129 | false | false | false |
alepulver/my-thesis | results-tables/aggregators/events.py | 1 | 1601 | from .order import Order
class Events:
def __init__(self, stage):
self.stage = stage
self.elements = stage.stage_elements()
def count_by_type(self, event_type):
stage = self.stage
counts = {}
for e in self.elements:
counts[e] = 0
events = stage._da... | mit | -5,279,545,875,092,008,000 | 27.087719 | 68 | 0.511555 | false | 4.327027 | false | false | false |
brclark-usgs/flopy | examples/Tutorials/Tutorial01/tutorial01.py | 1 | 2026 |
import numpy as np
import flopy
# Assign name and create modflow model object
modelname = 'tutorial1'
mf = flopy.modflow.Modflow(modelname, exe_name='mf2005')
# Model domain and grid definition
Lx = 1000.
Ly = 1000.
ztop = 0.
zbot = -50.
nlay = 1
nrow = 10
ncol = 10
delr = Lx/ncol
delc = Ly/nrow
delv = (ztop - zbot)... | bsd-3-clause | 3,929,625,849,699,004,000 | 26.013333 | 74 | 0.6846 | false | 2.492005 | false | false | false |
zetaops/ulakbus | ulakbus/views/ogrenci/kayit_silme.py | 1 | 10710 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 ZetaOps Inc.
#
# This file is licensed under the GNU General Public License v3
# (GPLv3). See LICENSE.txt for details.
#
from zengine.forms import JsonForm
from ulakbus.models import OgrenciProgram, Ogrenci, Role, User, AbstractRole
from zengine.forms import fields
from z... | gpl-3.0 | -5,817,750,396,697,596,000 | 39.135659 | 100 | 0.653501 | false | 2.542976 | false | false | false |
quequino/Revolution | script.tvguidedixie/resetChannels.py | 1 | 1281 | #
# Copyright (C) 2014 Richard Dean
#
# 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, or (at your option)
# any later version.
#
# This Program is distributed in the ... | gpl-2.0 | -2,896,224,920,902,057,000 | 29.5 | 129 | 0.704137 | false | 3.618644 | false | false | false |
Nexedi/neoppod | neo/storage/checker.py | 1 | 9034 | #
# Copyright (C) 2012-2019 Nexedi SA
#
# 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 program is distributed... | gpl-2.0 | -8,196,660,110,818,209,000 | 42.854369 | 80 | 0.538189 | false | 4.40898 | false | false | false |
AO-StreetArt/BlenderSync | src/ui/obj_mgmt_ui.py | 1 | 1552 | '''
Copyright (C) 2018 Alex Barry
aostreetart9@gmail.com
Created by Alex Barry
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) an... | gpl-3.0 | 3,091,828,068,023,817,000 | 33.488889 | 73 | 0.671392 | false | 3.677725 | false | false | false |
lightnarcissus/AnimalNet | browser/Python site-packages/pyshark/packet/layer.py | 1 | 8658 | import os
import binascii
import py
from pyshark.packet.common import Pickleable
class LayerField(object):
"""
Holds all data about a field of a layer, both its actual value and its name and nice representation.
"""
# Note: We use this object with slots and not just a dict because
# it'... | apache-2.0 | -1,271,595,539,323,519,700 | 30.548872 | 124 | 0.548741 | false | 4.176556 | false | false | false |
sc3/cookcountyjail | tests/scraper/test_http.py | 1 | 2309 |
import httpretty
from random import randint
from scraper.http import Http, COOK_COUNTY_JAIL_INMATE_DETAILS_URL, BAD_URL_NETWORK_PROBLEM
INMATE_URL = COOK_COUNTY_JAIL_INMATE_DETAILS_URL + '2014-0118034'
class Test_Http:
@httpretty.activate
def test_get_succeeds(self):
number_of_attempts = 2
... | gpl-3.0 | -4,212,042,254,834,498,000 | 35.078125 | 100 | 0.633175 | false | 3.436012 | false | false | false |
fishilico/shared | shellcode/shellcode.py | 1 | 8969 | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
# Copyright (c) 2015 Nicolas Iooss
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
... | mit | -9,078,079,875,954,633,000 | 37.165957 | 79 | 0.60553 | false | 2.875601 | false | false | false |
bingjin/CloudTesting | test_cos/download.py | 1 | 1617 | #!usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: EarlGrey@codingpy.com
# Copyright: Public Domain
#
import time
import requests
import oss2
from qcloud_cos import StatFileRequest
from qcloud_cos import CosClient
def download_oss(file):
access_key = '# 根据自己的情况填写'
access_secret = '# 根据自己的情况填写'
aut... | mit | 6,060,852,200,900,478,000 | 24.245614 | 64 | 0.632384 | false | 2.459829 | false | false | false |
luci/recipes-py | unittests/autoroll_test.py | 2 | 20801 | #!/usr/bin/env vpython
# Copyright 2016 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 __future__ import print_function
import json
import sys
from google.protobuf import json_format as jsonpb
import te... | apache-2.0 | -3,812,016,209,446,625,000 | 34.018519 | 80 | 0.650161 | false | 3.705201 | true | false | false |
openstack/networking-odl | doc/source/conf.py | 1 | 2835 | # -*- coding: utf-8 -*-
# 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... | apache-2.0 | -4,264,224,869,683,919,400 | 30.853933 | 79 | 0.694533 | false | 3.78 | false | false | false |
fhartwig/adhocracy3.mercator | src/adhocracy_core/adhocracy_core/rest/views.py | 1 | 46505 | """GET/POST/PUT requests processing."""
from collections import defaultdict
from copy import deepcopy
from logging import getLogger
from colander import Invalid
from colander import MappingSchema
from colander import SchemaNode
from colander import SequenceSchema
from substanced.interfaces import IUserLocator
from sub... | agpl-3.0 | -7,723,900,045,183,047,000 | 36.055777 | 79 | 0.607053 | false | 4.423992 | true | false | false |
kurli/blink-crosswalk | Source/bindings/scripts/interface_dependency_resolver.py | 1 | 15639 | # Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | -6,499,466,371,629,865,000 | 49.775974 | 121 | 0.655988 | false | 5.346667 | false | false | false |
grafeas/client-python | grafeas/models/api_vulnerability_type.py | 1 | 5261 | # coding: utf-8
"""
An API to insert and retrieve metadata on cloud artifacts.
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1alpha1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
... | apache-2.0 | -6,049,898,657,363,391,000 | 29.766082 | 187 | 0.592663 | false | 4.202077 | false | false | false |
araseyuta/Newsstand-analytics | app/views.py | 1 | 13173 | import os
import re
import csv
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from google.appengine.ext import db
from google.appengine.ext.db import djangoforms
from google.appengine.api import urlfetch
from google.appengine.api import ... | apache-2.0 | -2,135,317,619,511,722,800 | 29.282759 | 110 | 0.48774 | false | 3.802829 | false | false | false |
TurkuNLP/Finnish-dep-parser | conv_u_09.py | 1 | 1760 | import sys
import argparse
ID,FORM,LEMMA,UCPOS,UPOS,UFEAT,UHEAD,UDEPREL,UDEPS,UMISC=range(10)
ID,FORM,LEMMA,PLEMMA,POS,PPOS,FEAT,PFEAT,HEAD,PHEAD,DEPREL,PDEPREL=range(12)
if __name__=="__main__":
parser = argparse.ArgumentParser(description='Convert conllu to conll09 and back. Infers the direction on its own if n... | gpl-2.0 | -676,060,049,442,735,100 | 43 | 196 | 0.543182 | false | 3.591837 | false | false | false |
jrg365/gpytorch | gpytorch/lazy/mul_lazy_tensor.py | 1 | 6031 | #!/usr/bin/env python3
import torch
from ..utils.broadcasting import _matmul_broadcast_shape
from ..utils.memoize import cached
from .lazy_tensor import LazyTensor
from .root_lazy_tensor import RootLazyTensor
class MulLazyTensor(LazyTensor):
def _check_args(self, left_lazy_tensor, right_lazy_tensor):
if... | mit | -299,347,341,140,442,200 | 43.345588 | 111 | 0.628917 | false | 3.600597 | false | false | false |
GitExl/WhackEd4 | src/whacked4/ui/editors/miscframe.py | 1 | 7083 | #!/usr/bin/env python
#coding=utf8
from whacked4 import utils
from whacked4.ui import editormixin, windows
import copy
import wx
class MiscFrame(editormixin.EditorMixin, windows.MiscFrameBase):
"""
Misc editor window.
"""
def __init__(self, parent):
windows.MiscFrameBase.__init__(self, paren... | bsd-2-clause | 5,606,244,057,570,175,000 | 26.034351 | 73 | 0.550755 | false | 3.828649 | false | false | false |
Skaper/RMCStudio | scrips_robot/old/progSound.py | 1 | 1658 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygame import mixer
import threading, random, socket
play = 0
file = 0
sock = socket.socket()
sock.bind(('', 6000))
sock.listen(1)
conn, addr = sock.accept()
#sock.settimeout(.01)
def soundPlayer(arg3, soundPlayer_stop):
global file
global play
while 1... | apache-2.0 | -6,256,733,322,677,014,000 | 21.726027 | 76 | 0.571773 | false | 3.418557 | false | false | false |
anthony-jclark/adabot | adabot_localization/scripts/velocity_smoother.py | 1 | 1405 | #!/usr/bin/env python
"""
This node is responsible for turning smoothing the velocity
odometry data using a moving average.
"""
from collections import deque
import rospy
from std_msgs.msg import Float64
from nav_msgs.msg import Odometry
MAX_LEN = 10
vxs = deque(maxlen=MAX_LEN)
vxs.append(0)
total = 0
def odomet... | mit | -1,786,540,024,791,006,700 | 22.032787 | 87 | 0.676868 | false | 3.495025 | false | false | false |
interpretml/slicer | slicer/slicer_internal.py | 1 | 20627 | """ Lower level layer for slicer.
Mom's spaghetti.
"""
# TODO: Consider boolean array indexing.
from typing import Any, AnyStr, Union, List, Tuple
from abc import abstractmethod
import numbers
class AtomicSlicer:
""" Wrapping object that will unify slicing across data structures.
What we support:
Ba... | mit | -3,487,946,828,939,720,700 | 32.377023 | 117 | 0.573132 | false | 3.800811 | false | false | false |
ssato/python-anyconfig | tests/base/utils.py | 1 | 3492 | #
# Copyright (C) 2021 Satoru SATOH <satoru.satoh@gmail.com>
# License: MIT
#
"""File based test data collector.
"""
import ast
import importlib.util
import json
import pathlib
import typing
import warnings
from .datatypes import (
DictT, MaybePathT, TDataPaths
)
def target_by_parent(self: str = __file__):
"... | mit | -5,399,448,639,285,853,000 | 27.859504 | 73 | 0.570447 | false | 3.726788 | false | false | false |
dawsonjon/Chips-Demo | demo/build_tools.py | 1 | 7582 | #!/usr/bin/env python
"""compile, build and download the ATLYS demo to the ATLYS development kit"""
import sys
import os
import shutil
from user_settings import ise, vivado
def build_ise(chip, bsp, working_directory):
"""Build using Xilinx ISE an FPGA using the specified BSP
chip is a chip instance.
... | mit | 4,379,624,543,296,484,400 | 35.805825 | 126 | 0.639409 | false | 3.435433 | false | false | false |
evildmp/Arkestra | news_and_events/lister.py | 1 | 13293 | import operator
from datetime import datetime, timedelta
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from arkestra_utilities.generic_lister import (
ArkestraGenericLister, ArkestraGenericList, ArkestraGenericFilterSet,
ArkestraGenericPluginLister
)
from arkestra... | bsd-2-clause | -7,668,943,796,908,751,000 | 31.421951 | 94 | 0.576168 | false | 3.958606 | false | false | false |
jdhorne/pycarwings2 | pycarwings2/pycarwings2.py | 1 | 13350 | # Copyright 2016 Jason Horne
#
# 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 | -7,215,533,815,677,567,000 | 29.974478 | 102 | 0.703071 | false | 3.041695 | false | false | false |
zaafar/bcc | examples/tracing/tcpv4connect.py | 1 | 2519 | #!/usr/bin/python
#
# tcpv4connect Trace TCP IPv4 connect()s.
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: tcpv4connect [-h] [-t] [-p PID]
#
# This is provided as a basic example of TCP connection & socket tracing.
#
# All IPv4 connection attempts are traced, even if they ultimately fail.
#
# Copyright (c) 2015... | apache-2.0 | -5,699,068,462,233,235,000 | 22.764151 | 79 | 0.622072 | false | 2.5889 | false | false | false |
gtaylor/dockerized-image-crawler | crawler/webapi_service/lib/url_parse_fsm.py | 1 | 1641 | """
Contains a really cheezy quasi-FSM for parsing URL bodies.
"""
def parse_linebreakless_url_str(url_str):
"""
Muddle through a string that contains at least one properly formed URL.
The example submission method results in the URLs running into one long,
un-delimited string.
Rather than requir... | bsd-3-clause | -3,473,299,123,087,814,700 | 28.303571 | 76 | 0.611213 | false | 3.679372 | false | false | false |
egbertbouman/tribler-g | Tribler/Core/dispersy/debug.py | 1 | 17013 | import socket
from authentication import NoAuthentication
from bloomfilter import BloomFilter
from crypto import ec_generate_key, ec_to_public_bin, ec_to_private_bin
from destination import CommunityDestination, AddressDestination
from distribution import DirectDistribution, LastSyncDistribution, FullSyncDistrib... | lgpl-2.1 | -4,876,651,679,844,654,000 | 48.33432 | 154 | 0.625051 | false | 4.393853 | false | false | false |
m4tx/techswarm-receiver | tsparser/panorama.py | 1 | 4962 | import subprocess
import shutil
from PIL import Image
from tsparser.utils import StatisticDataCollector
PARAMS = {
'pto_gen': (),
'cpfind': ('--multirow',
'--celeste' # Ignore clouds
),
'cpclean': (),
'linefind': (),
'autooptimiser': ('-a', # Auto align
... | mit | 3,860,691,852,866,815,000 | 33.458333 | 80 | 0.638855 | false | 3.782012 | false | false | false |
vlegoff/tsunami | src/secondaires/navigation/commandes/rames/tenir.py | 1 | 2899 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 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
# ... | bsd-3-clause | 6,961,421,554,475,576,000 | 40.884058 | 79 | 0.694118 | false | 3.792651 | false | false | false |
cnwzhjs/onemake | lib/job_manager.py | 1 | 3124 | import thread
import threading
import os.path
ALL_JOBS={}
JOBS_COUNT={
'pending': 0,
'working': 0,
'error': 0,
'done': 0,
'source': 0
}
JOBS_LOCK=thread.allocate_lock()
JOBS_COND=threading.Condition()
class Job(object):
def __init__(self, job_type, dest, depends, args=None):
... | bsd-2-clause | 8,658,479,901,913,993,000 | 22.030769 | 97 | 0.529449 | false | 3.666667 | false | false | false |
openstack/neutron-lib | neutron_lib/api/definitions/dhcpagentscheduler.py | 1 | 2226 | # Copyright (c) 2013 OpenStack Foundation.
# 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... | apache-2.0 | 8,052,478,717,131,474,000 | 33.78125 | 78 | 0.650943 | false | 3.785714 | false | false | false |
imeteora/cocos2d-x-3.x-Qt | tools/cocos2d-console/plugins/project_run/project_run.py | 1 | 4469 | #!/usr/bin/python
# ----------------------------------------------------------------------------
# cocos "install" plugin
#
# Authr: Luis Parravicini
#
# License: MIT
# ----------------------------------------------------------------------------
'''
"run" plugin for cocos command line tool
'''
__docformat__ = 'restruc... | gpl-2.0 | 2,125,554,945,817,964,500 | 29.609589 | 105 | 0.585142 | false | 3.903057 | false | false | false |
yabirgb/caucab | src/urls.py | 1 | 1654 | """src URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | mit | -8,059,594,152,844,142,000 | 42.526316 | 84 | 0.679565 | false | 3.519149 | false | false | false |
widowild/messcripts | exercice/python2/chap18/canon_cible_after.py | 1 | 7820 | # -*- coding:Latin-1 -*-
#####################################
# Bombardement d'une cible mobile #
# (C) G. Swinnen - Avril 2004 - GPL #
#####################################
from Tkinter import *
from math import sin, cos, pi
from random import randrange
from threading import Thread
class Canon:
"""Petit cano... | gpl-3.0 | 7,332,927,941,599,991,000 | 39.102564 | 79 | 0.534015 | false | 3.09703 | false | false | false |
rasmadeus/Equre | src/equre/equre.py | 1 | 5197 | # -*- coding: utf-8 -*-
__author__="rasmadeus"
__date__ ="$14.10.2014 20:00:10$"
class EqurePoint:
def __init__(self, x, y, value):
self._x = x
self._y = y
self._value = value
def x(self):
return self._x
def y(self):
return self._y
... | gpl-2.0 | 3,393,329,533,278,369,300 | 30.125749 | 109 | 0.469694 | false | 3.23599 | false | false | false |
arek125/remote-GPIO-control-server | rgc-server1_1.py | 1 | 40098 | import socket
import sys
import hashlib
from datetime import datetime
import os
import signal
import glob
import sqlite3
import threading
import time
import RPi.GPIO as GPIO
HOST = ''
PORT = 8888
PASSWORD = ''
ENC_KEY = ''
exitapp = False
break_ = -1
db_path = 'rgc-server.db3'
CODE_VERSION = 2
def stringToint(str... | mit | 7,529,238,602,961,676,000 | 57.794721 | 297 | 0.504314 | false | 3.422207 | false | false | false |
aaalgo/picpac | examples/tensorflow/fcn.py | 1 | 6379 | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
import picpac
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_float('learning_rate', 0.01, 'Initial learning rate.')
flags.DEFINE_integer('max_step... | bsd-2-clause | 740,049,538,521,144,300 | 38.621118 | 96 | 0.532685 | false | 3.6809 | false | false | false |
OpenKMIP/PyKMIP | kmip/services/kmip_client.py | 1 | 74179 | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | apache-2.0 | -8,223,827,019,652,129,000 | 39.915058 | 79 | 0.583467 | false | 4.932114 | true | false | false |
fstagni/DIRAC | WorkloadManagementSystem/Service/JobStateUpdateHandler.py | 1 | 13370 | """ JobStateUpdateHandler is the implementation of the Job State updating
service in the DISET framework
The following methods are available in the Service interface
setJobStatus()
"""
from __future__ import absolute_import
import six
from six.moves import range
__RCSID__ = "$Id$"
import time
from DI... | gpl-3.0 | -2,354,184,175,611,544,600 | 33.194373 | 113 | 0.614211 | false | 4.143167 | false | false | false |
mcallaghan/tmv | BasicBrowser/BasicBrowser/settings.py | 1 | 4724 | """
Django settings for BasicBrowser project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
impo... | gpl-3.0 | -1,989,559,241,619,876,600 | 25.244444 | 91 | 0.678662 | false | 3.415763 | false | false | false |
spzala/tosca-parser | parser/tests/test_scalarunit.py | 1 | 12137 | # 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
# d... | apache-2.0 | -1,158,263,557,762,250,000 | 33.776504 | 78 | 0.510917 | false | 4.384754 | true | false | false |
cdd1969/pygwa | lib/flowchart/nodes/n14_overheadplot/node_plot_overheadvsriverwl.py | 1 | 7043 | #!/usr/bin python
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtCore
from pyqtgraph import BusyCursor
from lib.functions import plot_pandas
from lib.functions.general import getCallableArgumentList, isNumpyNumeric
from lib.flowchart.nodes.generalNode import NodeWithCtrlWidget, NodeCtrlWidget
class plotGWLvsWLNo... | gpl-2.0 | -1,190,005,362,130,740,700 | 60.780702 | 350 | 0.556297 | false | 3.548111 | false | false | false |
openlmi/openlmi-doc | doc/conf.py | 1 | 9713 | # -*- coding: utf-8 -*-
#
# OpenLMI documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 12 11:07:33 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 file.
#
# All... | gpl-2.0 | -3,956,538,577,392,688,600 | 30.13141 | 95 | 0.701431 | false | 3.718606 | true | false | false |
sonya/eea | py/common/config.py | 1 | 1080 | DEBUG_MODE = True
#DEBUG_MODE = False
# GNUPlot options
DEFAULT_IMAGE_TYPE = "png" # png, eps
SUPPRESS_PLOT_TITLES = True
DB_NAME = "eea"
DB_PORT = ":5432"
TEST_SCHEMA = "test" # schema for creating verification tables
PROJECT_ROOT = __PROJECT_ROOT__
# things below here probably don't need to be changed much
DAT... | apache-2.0 | 4,881,714,132,381,469,000 | 26 | 63 | 0.625 | false | 2.634146 | false | false | false |
Aharobot/inmoov_ros | robbie_sim/node/get_beer.py | 1 | 18206 | #!/usr/bin/env python
"""
get_beer.py - Version 0.1 2015-03-11
pick up the beer can and deliver it another
"""
import rospy, sys
import moveit_commander
from geometry_msgs.msg import PoseStamped, Pose
from moveit_commander import MoveGroupCommander, PlanningSceneInterface
from moveit_msgs.msg import Pla... | bsd-3-clause | -6,091,614,471,985,841,000 | 36.155102 | 121 | 0.569263 | false | 3.689159 | false | false | false |
richardcornish/conference | emojiweather/emojiweather/settings.py | 1 | 4647 | # Settings
# https://docs.djangoproject.com/en/2.0/topics/settings/
# https://docs.djangoproject.com/en/2.0/ref/settings/
# https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
import os
import django_heroku
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = os.environ... | mit | 5,700,339,176,886,210,000 | 24.255435 | 91 | 0.685388 | false | 3.182877 | false | true | false |
cpennington/edx-platform | lms/djangoapps/course_blocks/transformers/start_date.py | 1 | 2952 | """
Start Date Transformer implementation.
"""
from lms.djangoapps.courseware.access_utils import check_start_date
from openedx.core.djangoapps.content.block_structure.transformer import (
BlockStructureTransformer,
FilteringTransformerMixin
)
from xmodule.course_metadata_utils import DEFAULT_START_DATE
from... | agpl-3.0 | 5,717,390,971,665,340,000 | 34.566265 | 81 | 0.670054 | false | 4.265896 | false | false | false |
stz-online/VVSPuentklichkeit | vvs_crawler/vvs_crawler/settings.py | 1 | 3315 | """
Django settings for vvs_crawler project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... | gpl-3.0 | 4,491,424,426,170,239,000 | 26.625 | 150 | 0.659729 | false | 3.485804 | false | false | false |
kromain/chromium-tools | recipes/psdriver.py | 1 | 2297 | # Copyright (c) 2014 Sony Network Entertainment Intl. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: di... | bsd-3-clause | -7,069,908,839,805,119,000 | 22.927083 | 118 | 0.524597 | false | 3.501524 | false | false | false |
collab-project/django-encode | encode/tasks.py | 1 | 4623 | # Copyright Collab 2012-2016
# See LICENSE for details.
"""
Tasks.
"""
from __future__ import unicode_literals
from celery import Task
from celery.utils.log import get_task_logger
from encode.models import MediaBase
from encode.util import fqn, short_path
from encode import EncodeError, UploadError
from encode.enco... | mit | -7,000,919,595,200,251,000 | 29.215686 | 78 | 0.574951 | false | 4.065963 | false | false | false |
hugobarzano/NoInventory | Selenium/test_item_1.py | 1 | 3045 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException... | gpl-3.0 | 6,154,920,643,843,559,000 | 44.41791 | 142 | 0.654946 | false | 3.426802 | true | false | false |
BeenzSyed/tempest | tempest/api/orchestration/stacks/test_rackconnect.py | 1 | 5346 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | apache-2.0 | 2,207,363,008,343,079,700 | 45.903509 | 118 | 0.587542 | false | 4.153846 | true | false | false |
shengqh/ngsperl | lib/scRNA/clonotype_cell.py | 1 | 2601 | import argparse
import logging
import os
import sys
import re
import json
def initialize_logger(logfile, args):
logger = logging.getLogger('clonotype_cell')
loglevel = logging.INFO
logger.setLevel(loglevel)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)-8s - %(message)s')
# creat... | apache-2.0 | 192,097,637,951,968,420 | 30.337349 | 128 | 0.666282 | false | 3.408912 | false | false | false |
SunskyF/EasyPR-python | models/easypr/net/lenet.py | 1 | 1738 | from .layer import *
class Lenet:
def __init__(self):
self.num_classes = 65
self.x = None
self.y = None
self.keep_prob = None
self.pred_logits = None
self.pred_labels = None
self.accuracy = None
self.l2_loss = None
self.weights = []
... | apache-2.0 | 3,350,835,448,973,280,000 | 27.491803 | 84 | 0.571922 | false | 3.361702 | false | false | false |
tdsymonds/project-euler | scripts/problem50.py | 1 | 2019 | # https://projecteuler.net/problem=50
import math
def get_prime_list(n):
"""
Returns a list of primes < n
Function taken from:
http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n/3035188#3035188
"""
sieve = [True] * n
for i in xrange(3,int(... | mit | 5,817,782,502,286,328,000 | 26.871429 | 114 | 0.594849 | false | 3.49308 | false | false | false |
bluepeppers/dectest | dectest/config.py | 1 | 9920 | """
The configurations system for dectest. Offers two different methods of
configuration; as a python file or from a dict. Each method is implemented in a
different class, but they all provide the same interface.
"""
import imp
import re
DEFAULTS = {
'testing': {
'testasrun': True,
'sideaffects': ... | lgpl-3.0 | 6,663,564,968,980,631,000 | 30.897106 | 80 | 0.520766 | false | 4.739608 | true | false | false |
karthikrish/django-utils | djutils/decorators.py | 1 | 3986 | import atexit
import Queue
import re
import time
import threading
from django.conf import settings
from django.core.cache import cache
from django.http import HttpResponseForbidden, HttpResponseRedirect
from django.utils.functional import wraps
from djutils.cache import key_from_args
class EmptyObject(object):
... | mit | 6,624,859,138,889,896,000 | 26.874126 | 82 | 0.540642 | false | 4.299892 | false | false | false |
babble/babble | include/jython/Lib/pkgutil.py | 1 | 18826 | """Utilities to support packages."""
# NOTE: This module must remain compatible with Python 2.3, as it is shared
# by setuptools for distribution with Python 2.3 and up.
import os
import sys
import imp
import os.path
from types import ModuleType
from org.python.core import imp as _imp, BytecodeLoader
__all__ = [
... | apache-2.0 | 1,416,052,986,150,676,500 | 33.354015 | 84 | 0.597472 | false | 4.3169 | false | false | false |
Cuuuurzel/KiPyCalc | sympy_old/statistics/distributions.py | 2 | 11156 | from sympy.core import sympify, Lambda, Dummy, Integer, Rational, oo, Float, pi
from sympy.functions import sqrt, exp, erf
from sympy.printing import sstr
import random
class Sample(tuple):
"""
Sample([x1, x2, x3, ...]) represents a collection of samples.
Sample parameters like mean, variance and stddev c... | mit | -1,953,693,750,331,349,500 | 29.903047 | 105 | 0.547598 | false | 3.803614 | false | false | false |
DigitalSlideArchive/HistomicsTK | histomicstk/annotations_and_masks/pyrtree/rect.py | 1 | 5357 | """
# Modified from: https://code.google.com/archive/p/pyrtree/ .
# Copyright Google
# Under The 3-Clause BSD License
#
# 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 th... | apache-2.0 | -7,042,509,289,810,102,000 | 28.11413 | 79 | 0.582416 | false | 3.559468 | false | false | false |
holgerd77/django-public-project | public_project/models.py | 1 | 42740 | # coding=UTF-8
import os
import shutil
import subprocess
from datetime import datetime
from itertools import chain
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey, Ge... | bsd-3-clause | -5,233,854,238,499,547,000 | 40.294686 | 172 | 0.621175 | false | 3.886515 | true | false | false |
ekorian/deploypl | deployer/ping.py | 1 | 2563 | """
ping.py
pinger module
@author: K.Edeline
"""
import re
import subprocess
_pingopt_count = "-c"
_pingopt_deadline = "-w"
_pingopt_quiet = "-q"
regex1 = re.compile(r'PING ([a-zA-Z0-9.\-]+) \(')
regex2 = re.compile(r'(\d+) packets transmitted, (\d+) received')
regex3 = re.compile(r'(\d+.\d+)/(\d+.\d+)/(\d+.\d+... | bsd-3-clause | 7,018,626,121,032,329,000 | 27.477778 | 89 | 0.616855 | false | 3.515775 | false | false | false |
knightsamar/github-edu-effectiveness | event_utils.py | 1 | 10612 | from store import connect
from github import Github, NamedUser
from settings import COURSE_REPO, COURSE_REPO_NAME
class GitHubEventsInfo(object):
username = None
commits_made = None
pull_requests_made = None
forks_created = None
issues_created = None
issues_resolved = None
repositories_crea... | gpl-2.0 | 2,656,363,513,471,674,000 | 34.972881 | 163 | 0.516773 | false | 4.013616 | false | false | false |
bwc126/MLND-Subvocal | pcf8591read.py | 1 | 1785 | #! /usr/bin/env python3
"""
This file is for gathering EMG data using the Q2W I2C PCF8591 ADC Breakout Board with a Raspberry PI. It's best used in conjunction with a script to control recording flow. See "simple_svr.py" for the actual control flow used.
"""
import sys, time
from quick2wire.parts.pcf8591 import *
from... | mit | 6,554,003,415,954,009,000 | 34.7 | 227 | 0.538375 | false | 3.773784 | false | false | false |
uclouvain/osis | education_group/ddd/domain/service/postpone_group.py | 1 | 3713 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | -980,645,893,848,153,000 | 49.849315 | 113 | 0.66945 | false | 4.276498 | false | false | false |
botswana-harvard/edc-call-manager | edc_call_manager/mixins.py | 1 | 1561 | from django.apps import apps as django_apps
from django.core.exceptions import MultipleObjectsReturned
from django.db import models
app_config = django_apps.get_app_config('edc_call_manager')
class CallLogLocatorMixin(models.Model):
"""A Locator model mixin that has the Locator model update the Log if changed."... | gpl-2.0 | -4,849,253,839,757,369,000 | 35.302326 | 87 | 0.61499 | false | 4.12963 | false | false | false |
ucsd-ccbb/Oncolist | src/server/TCGA/IDAppender.py | 1 | 5654 | __author__ = 'guorongxu'
import os
import sys
## To process JSON files and append an id for each document.
def process_louvain_cluster_json(workspace, data_set):
root_json_dir = workspace + "/" + data_set + "/louvain_json_files"
##id number rule:
# the first digital "2" is the cluster index id;
# the ... | mit | -3,096,008,627,221,445,000 | 42.160305 | 96 | 0.514857 | false | 4.11799 | false | false | false |
openstack/vitrage | vitrage/entity_graph/scheduler.py | 1 | 2977 | # Copyright 2018 - Nokia
#
# 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... | apache-2.0 | -1,596,756,444,141,159,000 | 34.86747 | 77 | 0.675512 | false | 4.022973 | false | false | false |
robinandeer/chanjo-report | chanjo_report/server/blueprints/report/utils.py | 1 | 6697 | from __future__ import division
import itertools
import logging
from flask import abort, flash
from sqlalchemy.exc import OperationalError
from sqlalchemy import func
from chanjo.store.models import Transcript, TranscriptStat, Sample
from chanjo.sex import predict_sex
from chanjo_report.server.constants import LEVELS... | mit | 223,761,722,041,765,950 | 35.2 | 92 | 0.620427 | false | 3.695916 | false | false | false |
liangwang/m5 | src/arch/x86/isa/insts/general_purpose/input_output/string_io.py | 1 | 4234 | # Copyright (c) 2007-2008 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware imp... | bsd-3-clause | -5,485,469,004,281,648,000 | 36.803571 | 72 | 0.705716 | false | 3.292379 | false | false | false |
pjryan126/solid-start-careers | store/api/zillow/venv/lib/python2.7/site-packages/pandas/computation/ops.py | 1 | 15283 | """Operator classes for eval.
"""
import operator as op
from functools import partial
from datetime import datetime
import numpy as np
import pandas as pd
from pandas.compat import PY3, string_types, text_type
import pandas.core.common as com
import pandas.lib as lib
from pandas.core.base import StringMixin
from pan... | gpl-2.0 | 6,329,813,673,056,946,000 | 27.727444 | 79 | 0.543676 | false | 3.871074 | false | false | false |
MathGaron/mean_average_precision | mean_average_precision/ap_accumulator.py | 1 | 1262 | """
Simple accumulator class that keeps track of True positive, False positive and False negative
to compute precision and recall of a certain class
"""
class APAccumulator:
def __init__(self):
self.TP, self.FP, self.FN = 0, 0, 0
def inc_good_prediction(self, value=1):
self.TP += valu... | mit | 3,655,848,321,890,244,000 | 27.066667 | 97 | 0.543582 | false | 3.78979 | false | false | false |
AugustoLD/SearchAlgorithms-IA | graph_search.py | 1 | 4000 | #*************************************************************************
# Copyright (C) 2015
#
# Augusto Lopez Dantas - augustold42@gmail.com
# Daniel Yang Chow - danielyc95@gmail.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pu... | gpl-2.0 | 18,317,909,692,897,096 | 28.62963 | 78 | 0.59075 | false | 3.759398 | false | false | false |
bluezd/pkg-build-tool | libpkgbuild/compareRPMRH.py | 1 | 2550 | #!/usr/bin/python
import os
from rpmUtils.miscutils import splitFilename
from library import Environment, CommandLineUI
class CompareRPMRH(Environment):
"""docstring for CompareRPMRH"""
def __init__(self):
super(CompareRPMRH, self).__init__()
self.ui = CommandLineUI(echoResponses=False)
... | apache-2.0 | 6,371,365,530,659,757,000 | 41.5 | 107 | 0.479608 | false | 4.066986 | false | false | false |
DedMemez/ODS-August-2017 | gettext.py | 1 | 14996 | # Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: gettext
import locale, copy, os, re, struct, sys
from errno import ENOENT
__all__ = ['NullTranslations',
'GNUTranslations',
'Catalog',
'find',
'translation',
'install',
'textdomain',
'bindtextdomain',
'dgettext',
'dngettext',
'gettext',
... | apache-2.0 | 4,187,896,059,054,283,300 | 28.29899 | 109 | 0.520339 | false | 4.127718 | false | false | false |
yeyanchao/calibre | setup/translations.py | 1 | 11821 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os, tempfile, shutil, subprocess, glob, re, time, textwrap
from functools impo... | gpl-3.0 | -5,298,192,980,952,734,000 | 34.286567 | 82 | 0.497335 | false | 3.54985 | false | false | false |
Martin819/salt-formula-horizon | horizon/files/local_settings/csb_settings.py | 1 | 2058 | import os
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard import exceptions
{%- from "horizon/map.jinja" import server with context %}
{%- set app = salt['pillar.get']('horizon:server:app:'+app_name) %}
HORIZON_CONFIG = {
'dashboards': ({% if app.plugin is defined %}{% for plugin_... | apache-2.0 | -4,526,805,969,484,877,000 | 35.122807 | 219 | 0.62585 | false | 3.464646 | false | false | false |
Alecardv/College-projects | Metodos Numericos 2012/trapecioCompuesto.py | 1 | 1525 | import function
from matplotlib.pyplot import *
from pylab import *
import numpy as np
import math
class TrapecioComp:
def __init__(self, fun, xi, xf,n):
self.fun = function.Function(fun,'x')
self.a,self.b = xi,xf
self.n = n
self.fig, self.ax = subplots()
def relativeError(self):
f = self.fun.getDerivate(... | gpl-3.0 | -3,655,874,263,635,416,000 | 28.326923 | 108 | 0.628852 | false | 2.249263 | false | false | false |
convexengineering/gplibrary | gpkitmodels/SP/SimPleAC/SimPleAC_multimission.py | 1 | 3535 | from builtins import range
import numpy as np
from gpkit import Model, Variable, SignomialsEnabled, SignomialEquality, \
VarKey, units, Vectorize, settings
from gpkitmodels.SP.SimPleAC.SimPleAC_mission import Mission, SimPleAC
from gpkitmodels.SP.atmosphere.atmosphere import Atmosphere
# SimPleAC with multimission... | mit | -2,871,719,499,142,976,000 | 41.083333 | 96 | 0.539745 | false | 3.065915 | false | false | false |
whtsky/Waterspout | waterspout/tests/test_auth.py | 1 | 1042 | from waterspout.app import Waterspout
from waterspout.web import RequestHandler
from waterspout.auth import login_required, permission_required
class LoginHandler(RequestHandler):
def get(self):
if not self.session["id"]:
self.session["id"] = 1
else:
self.session["id"] = 2... | mit | -8,224,585,704,073,168,000 | 20.708333 | 64 | 0.639155 | false | 3.734767 | false | false | false |
chromium/chromium | third_party/blink/web_tests/external/wpt/docs/wpt_lint_rules.py | 11 | 2635 | from docutils.parsers.rst import Directive, nodes
from docutils.utils import new_document
from recommonmark.parser import CommonMarkParser
import importlib
import textwrap
class WPTLintRules(Directive):
"""A docutils directive to generate documentation for the
web-platform-test-test's linting tool from its sou... | bsd-3-clause | -4,440,553,942,413,397,000 | 32.782051 | 105 | 0.589374 | false | 4.466102 | false | false | false |
crossroadchurch/paul | tests/helpers/songfileimport.py | 1 | 8465 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | 1,231,135,504,004,555,800 | 52.917197 | 118 | 0.586297 | false | 4.093327 | true | false | false |
codelikeagirlcny/python-lessons-cny | code-exercises-etc/section_04_(lists)/ajm.lists03_quadrants-noloop.20170218.py | 1 | 2739 | ## raw input basics!
## see also: https://github.com/codelikeagirlcny/python-lessons-cny/blob/master/code-exercises-etc/_raw_input.py
# name = raw_input("what is your name? ")
# print name
# User, tell me one DC address.
# I save that address as "address_1"
# I evaluate address_1 and add it to the appropriate "list_of... | mit | -6,704,597,456,898,369,000 | 32 | 112 | 0.682366 | false | 3.00989 | false | true | false |
aurarad/auroracoin | test/functional/feature_maxuploadtarget.py | 1 | 6687 | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test behavior of -maxuploadtarget.
* Verify tha... | mit | 5,233,787,545,358,649,000 | 39.527273 | 107 | 0.651114 | false | 3.488263 | true | false | false |
kapilgarg1996/roadrunner | superuser/views.py | 1 | 14421 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.db import connection
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework import viewsets
from MySQLdb.cursors import SSDictCursor
from django.core.mail i... | gpl-3.0 | -7,027,963,181,900,104,000 | 37.050132 | 134 | 0.523542 | false | 4.559279 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.