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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lmazuel/azure-sdk-for-python | azure-batch/azure/batch/models/application_get_options.py | 1 | 1743 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -6,436,945,429,809,833,000 | 43.692308 | 106 | 0.659208 | false | 4.2 | false | false | false |
Vgr255/Wolfbot | settings/wolfgame.py | 1 | 23664 | import botconfig
#####################################################################################
PING_WAIT = 300 # seconds #
PING_MIN_WAIT = 30 # amount of time between first !join and !pi... | bsd-2-clause | 7,256,666,831,428,034,000 | 55.748201 | 185 | 0.440585 | false | 3.617795 | false | false | false |
thelectronicnub/redditswapbot | util/flair_sql_import.py | 1 | 1111 | #!/usr/bin/env python2
import sys, os
import json
import argparse
import sqlite3 as lite
con = None
def extant_file(x):
if not os.path.exists(x):
raise argparse.ArgumentError("{0} does not exist".format(x))
return x
def main():
parser = argparse.ArgumentParser(description="Import flairs")
pa... | gpl-3.0 | -6,648,211,901,216,044,000 | 22.638298 | 139 | 0.648065 | false | 3.296736 | false | false | false |
lesina/labs2016 | Laba19/G.py | 1 | 1494 | def makeAdjacencyMatrix():
for i in range(size):
adjacency_matrix.append([1000000] * size)
for i in range(n):
vertex1, vertex2, weight = list(map(int, input().split()))
adjacency_matrix[vertex1][vertex2] = weight
adjacency_matrix[vertex2][vertex1] = weight
def Dexter(size, adja... | gpl-3.0 | 6,825,533,243,467,289,000 | 30.808511 | 86 | 0.591031 | false | 3.410959 | false | false | false |
RAPD/RAPD | src/old_agents/rapd_agent_integrate.py | 1 | 129537 | """
RAPD agent for fast integration with XDS
"""
__license__ = """
This file is part of RAPD
Copyright (C) 2011-2018, Cornell University
All rights reserved.
RAPD is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foun... | agpl-3.0 | 9,169,712,204,212,176,000 | 41.180723 | 148 | 0.501756 | false | 3.645746 | false | false | false |
vencejo/LSystem-en-Minecraft- | math3D.py | 1 | 3574 | ''' Programa basado en el trabajo de Daniel Bates http://www.cl.cam.ac.uk/~db434/
cuyo codigo fuente se puede ver en: http://www.cl.cam.ac.uk/~db434/files/setblockdemo.py '''
from math import sin, cos, radians,degrees, sqrt, pow , acos
class coordinate3d:
"""Class used to represent a point in 3D space."""
def __... | gpl-2.0 | 2,883,782,418,861,403,600 | 35.10101 | 110 | 0.547566 | false | 3.397338 | false | false | false |
EDUlib/edx-platform | common/djangoapps/student/migrations/0031_auto_20200317_1122.py | 1 | 1461 | # Generated by Django 1.11.29 on 2020-03-17 11:22
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('student', '0030_userpr... | agpl-3.0 | -8,898,915,915,143,417,000 | 47.7 | 355 | 0.622861 | false | 4.440729 | false | false | false |
sunnynarayan/Complaint-Redressal | crs/wardenOffice/views.py | 1 | 12845 | from django.shortcuts import render
from django.shortcuts import render, redirect
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.template import RequestContext, loader
from django.contrib import auth
from django.core.context_processors import csrf
from django.con... | mit | -603,925,967,535,629,800 | 45.224265 | 376 | 0.720125 | false | 3.046004 | false | false | false |
tingelst/pymanopt | pymanopt/manifolds/complexcircle.py | 1 | 2567 | from __future__ import division
import warnings
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
from pymanopt.manifolds.manifold import Manifold
class ComplexCircle(Manifold):
"""
The manifold of complex numbers with unit-modulus.
Description of vectors z in C^n (complex) such ... | bsd-3-clause | -8,596,242,755,595,871,000 | 24.929293 | 76 | 0.558239 | false | 3.192786 | false | false | false |
DorianDepriester/mtex2abaqus | MTEX2abaqus/AbaqusImport.py | 1 | 2602 | import string
import csv
import os
from abaqusConstants import *
from part import *
from material import *
from section import *
from assembly import *
from load import *
from mesh import *
from visualization import *
def importEBSD(inpFileName):
while True:
fileName, file_extension = os.path.splitext... | mit | -6,537,968,607,731,280,000 | 31.818182 | 208 | 0.684858 | false | 2.904018 | false | false | false |
xor-xor/electre_diviz | ElectreTriClassAssignments/ElectreTriClassAssignments.py | 1 | 4490 | #!/usr/bin/env python
"""
ElectreTriClassAssignments - computes assignments according to the Electre TRI
method. It generates separate outputs for the conjuctive ('pessimistic') and
disjunctive ('optimistic') assignments.
Usage:
ElectreTriClassAssignments.py -i DIR -o DIR
Options:
-i DIR Specify input di... | mit | 3,253,285,074,870,855,700 | 37.376068 | 82 | 0.58686 | false | 4.07441 | false | false | false |
zlohner/TournamentOrganizer | model/player.py | 1 | 2904 | #!/usr/bin/env python3
WIN_MATCH_POINTS = 3
LOSE_MATCH_POINTS = 0
DRAW_MATCH_POINTS = 1
import sys
import random
import numpy
class Player(object):
def __init__(self, name, user):
self.name = name
self.user = user
self.match_wins = 0
self.match_losses = 0
self.match_draws = 0
self.game_wins = 0
self.g... | gpl-3.0 | 1,534,049,206,389,733,400 | 23.610169 | 90 | 0.65668 | false | 2.693878 | false | false | false |
AltSchool/django-allauth | allauth/account/adapter.py | 1 | 19322 | from __future__ import unicode_literals
import hashlib
import json
import time
import warnings
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import (
authenticate,
get_backends,
login as django_login,
logout as django_logout,
)
f... | mit | -2,770,081,460,482,284,500 | 36.518447 | 78 | 0.568782 | false | 4.558151 | false | false | false |
albertoconnor/apisdk | relateiq/lists.py | 1 | 3641 | from .riq_obj import RIQObject
from .riq_base import RIQBase
from .listitems import ListItems
from .listitem import ListItem
# TODO: Add version, externalId, category
# TODO: Payload exception if missing required fields
class List(RIQObject,RIQBase) :
# Object Attributes
_id = None
_modifiedDate = None
... | apache-2.0 | -4,409,821,769,299,002,400 | 27.677165 | 89 | 0.552046 | false | 3.931965 | false | false | false |
hgn/hippod | hippod/report_generator.py | 1 | 27079 | import os
import shutil
import markdown
import tempfile
import datetime
import json
import re
import tempfile
import logging
import glob
import hippod.api_shared
import hippod.error_object
log = logging.getLogger()
class ReportGenerator(object):
LAST_ACHIEVEMENTS = 1
FILTER_BY_ANCHOR = 2
FILTER_BY_CHOIC... | mit | 7,860,579,975,598,945,000 | 45.932409 | 162 | 0.518778 | false | 4.197644 | true | false | false |
anovak10/plots | DDTmethod/DDT.py | 1 | 3479 | #
import os
import ROOT
from ROOT import *
from array import array
import math
from math import *
import sys
import pdb
def ComputeDDT(name, point, nPtBins, nRhoBins, H):
DDT = TH2F(name, "", nRhoBins, 50, 250 , nPtBins, 380, 1000)
DDT.SetStats(0)
nXb = H.GetXaxis().GetNbins()
nYb = H.GetYaxis().GetNbins()
for x ... | mit | 8,447,145,614,358,003,000 | 27.516393 | 109 | 0.652774 | false | 2.117468 | false | false | false |
fredokun/TikZ-Editor | tikz_editor/tools/documentIO/template.py | 1 | 1780 | # Copyright 2012 (C) Mickael Menu <mickael.menu@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 published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This pr... | gpl-2.0 | 7,310,290,482,443,180,000 | 33.901961 | 97 | 0.738764 | false | 3.449612 | false | false | false |
MISP/misp-modules | misp_modules/modules/expansion/joesandbox_query.py | 1 | 2330 | # -*- coding: utf-8 -*-
import jbxapi
import json
from joe_parser import JoeParser
misperrors = {'error': 'Error'}
inputSource = ['link']
moduleinfo = {'version': '0.2', 'author': 'Christian Studer',
'description': 'Query Joe Sandbox API with a report URL to get the parsed data.',
'module... | agpl-3.0 | 5,023,869,576,487,750,000 | 29.657895 | 102 | 0.632189 | false | 3.568147 | true | false | false |
Twangist/log_calls | log_calls/proxy_descriptors.py | 1 | 4911 | __author__ = 'brianoneill'
__doc__ = """
Module version = '0.1.14'
See docstrings for install_proxy_descriptor and ClassInstanceAttrProxy.
"""
from itertools import product, chain
__all__ = ['install_proxy_descriptor', 'ClassInstanceAttrProxy' ]
def install_proxy_descriptor(proxy_obj, attr_name_proxied_inst... | mit | -3,673,459,081,506,548,700 | 43.243243 | 107 | 0.598656 | false | 4.270435 | false | false | false |
neuroidss/nupic.vision | parameters.py | 1 | 5662 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... | gpl-3.0 | -6,478,117,063,875,853,000 | 29.771739 | 80 | 0.656658 | false | 4.289394 | false | false | false |
YudinYury/Python_Netology_homework | les16_hw_2.py | 1 | 3666 | '''lesson_1_6 homework «Разбор алгоритмических задач с собеседований»
решение задач с HackerRank
'''
#TODO 2:
# CSS colors are defined using a hexadecimal (HEX) notation for the combination of Red, Green, and Blue color values (RGB).
# Specifications of HEX Color Code
#
# ■ It must start with a '#' symbol.
# ■ It can ... | gpl-3.0 | -8,185,796,143,026,287,000 | 22.369128 | 137 | 0.525847 | false | 2.635882 | false | false | false |
xpostudio4/red-de-emprendimiento | app/institutions/forms.py | 1 | 7474 |
# -*- encoding: utf-8 -*-
#core Django Imports
from django import forms
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField, AuthenticationForm
from django.forms.extras import widgets
#Third party apps
#Project ap... | mit | 2,371,676,960,138,874,400 | 35.975248 | 105 | 0.597269 | false | 4.518451 | false | false | false |
cmusatyalab/isr-next | vmnetx/define.py | 1 | 2225 | #
# vmnetx.define - Creation of a new VMNetX-compatible VM
#
# Copyright (C) 2013 Carnegie Mellon University
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as published
# by the Free Software Foundation. A copy of the GNU Gen... | gpl-2.0 | 898,212,150,496,650,500 | 34.887097 | 77 | 0.659775 | false | 4.090074 | false | false | false |
pyro-ppl/numpyro | numpyro/contrib/funsor/infer_util.py | 1 | 9920 | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from collections import defaultdict
from contextlib import contextmanager
import functools
import re
import funsor
import numpyro
from numpyro.contrib.funsor.enum_messenger import (
infer_config,
plate as enum_plate,
trace... | apache-2.0 | -2,505,284,325,910,366,000 | 35.336996 | 91 | 0.594758 | false | 3.885625 | true | false | false |
davidastephens/zipline | zipline/utils/tradingcalendar.py | 1 | 11044 | #
# Copyright 2013 Quantopian, 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 wr... | apache-2.0 | -441,858,406,999,512,400 | 26.679198 | 103 | 0.605397 | false | 3.196527 | false | false | false |
monk-ee/puppetdb-python | puppetdb/v4/reports.py | 1 | 3924 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Arcus, Inc.
#
# 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 | 27,615,388,178,460,460 | 35.333333 | 137 | 0.675331 | false | 3.169628 | false | false | false |
laurentb/weboob | modules/serebii/module.py | 1 | 2111 | # -*- coding: utf-8 -*-
# Copyright(C) 2019-2020 Célande Adrien
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the ... | lgpl-3.0 | -6,983,604,243,544,496,000 | 30.447761 | 77 | 0.710014 | false | 3.583333 | false | false | false |
jamiebull1/eppy | eppy/tests/test_IDF.py | 1 | 2313 | # Copyright (c) 2012 Santosh Philip
# =======================================================================
# Distributed under the MIT License.
# (See accompanying file LICENSE or copy at
# http://opensource.org/licenses/MIT)
# =======================================================================
"""py.test fo... | mit | -7,503,793,358,429,532,000 | 30.684932 | 73 | 0.609166 | false | 3.262341 | true | false | false |
oblalex/django-workflow | src/workflow/migrations/0004_auto__add_field_version_object_type.py | 1 | 6324 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Version.object_type'
db.add_column('workflow_version', 'object_type',
... | mit | -7,054,477,247,670,684 | 70.067416 | 182 | 0.555503 | false | 3.717813 | false | false | false |
masahir0y/barebox-yamada | scripts/remote/ratp.py | 6 | 21432 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import crcmod
import logging
import struct
from enum import Enum
from time import sleep
try:
from time import monotonic
except:
from .missing import monotonic
csum_func = crcmod.predefined.mkCrcFu... | gpl-2.0 | -2,351,006,769,777,201,700 | 27.015686 | 89 | 0.474524 | false | 3.462918 | false | false | false |
mstritt/orbit-image-analysis | src/main/python/deeplearn/export2tensorboard.py | 1 | 1049 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import sys
from tensorflow.core.framework import graph_pb2
from tensorflow.python.client import session
from tensorflow.python.framework import importer
from tensorflow.python.framework import ... | gpl-3.0 | 359,202,195,924,344,060 | 32.83871 | 94 | 0.741659 | false | 3.693662 | false | false | false |
whitehorse-io/encarnia | pyenv/lib/python2.7/site-packages/hyperlink/_url.py | 3 | 49264 | # -*- coding: utf-8 -*-
u"""Hyperlink provides Pythonic URL parsing, construction, and rendering.
Usage is straightforward::
>>> from hyperlink import URL
>>> url = URL.from_text(u'http://github.com/mahmoud/hyperlink?utm_source=docs')
>>> url.host
u'github.com'
>>> secure_url = url.replace(scheme=u'htt... | mit | -4,986,171,367,355,831,000 | 36.006762 | 114 | 0.571382 | false | 3.945846 | false | false | false |
disqus/sentry-graphite | sentry_graphite/__init__.py | 1 | 3332 | """
sentry_graphite
~~~~~~~~
:copyright: (c) 2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from django import forms
from sentry.conf import settings
from sentry.plugins import Plugin
from pystatsd import Client
NOTSET = object()
class GraphiteConfigurationForm(forms.Form):
host ... | apache-2.0 | -4,973,079,646,618,907,000 | 31.990099 | 93 | 0.634754 | false | 3.95255 | false | false | false |
dionbosschieter/NetworkMonitor | samples/sniff.py | 1 | 3578 | #! /usr/bin/env python3
"""
Example to sniff all HTTP traffic on eth0 interface:
sudo ./sniff.py eth0 "port 80"
"""
import sys
import pcap
import time
import socket
import struct
if sys.version_info[0] > 2:
IPPROTO = bytes ((0x08, 0x00))
bord = int
else:
IPPROTO = '\x08\x00'
bord = ord
protoc... | mit | -4,214,800,356,882,184,000 | 30.672566 | 102 | 0.536333 | false | 3.166372 | false | false | false |
butla/PyDAS | tests/integrated/test_service.py | 1 | 6259 | import copy
import json
import time
from urllib.parse import urljoin
import requests
from data_acquisition.consts import ACQUISITION_PATH, UPLOADER_REQUEST_PATH
from data_acquisition.resources import get_download_callback_url, get_metadata_callback_url
from data_acquisition.acquisition_request import AcquisitionReque... | mit | 4,670,217,954,056,264,000 | 37.635802 | 96 | 0.681099 | false | 3.448485 | true | false | false |
pearkes/stripe-hooks | shared/parser.py | 1 | 2270 | import stripe
from .app import app
from shared.mail import send_notification, send_receipt
from shared.helpers import CleanParseException, format_stripe_object
def parse_hook(payload):
"""Parses a dictionary representation of the stripe webhook
by requesting a new version of the event by it's ID from the stri... | mit | 6,396,329,389,875,048,000 | 29.266667 | 73 | 0.701322 | false | 3.975482 | false | false | false |
thewisenerd/pymoviedb | src/pymoviedb/__main__.py | 1 | 2130 | #! /usr/bin/env python3
# Copyright (c) 2015 - thewisenerd <thewisenerd@protonmail.com>
# 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 optio... | gpl-2.0 | 1,112,315,185,582,330,800 | 26.662338 | 85 | 0.696244 | false | 3.317757 | false | false | false |
rush2catch/algorithms-leetcode | Trees/leet_104_MaxDepthOfBinaryTree.py | 1 | 1493 | # Problem: Maximum Depth of Binary Tree
# Difficulty: Easy
# Category: Tree
# Leetcode 104: https://leetcode.com/problems/maximum-depth-of-binary-tree/#/description
# Description:
"""
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to... | mit | 8,618,353,277,831,722,000 | 23.491803 | 114 | 0.656397 | false | 2.827652 | false | false | false |
AlfredoSequeida/sendanywherecli | sendanywherecli.py | 1 | 3713 | from splinter import Browser
from selenium import webdriver
from pyvirtualdisplay import Display
import pyvirtualdisplay
import pyqrcode
import argparse
import os
import time
import urllib
import sys
# allow for graceful exit
try:
# file to send
file_to_send = ''
# file receive code
file_receive... | mit | 8,244,624,096,845,569,000 | 23.427632 | 102 | 0.595475 | false | 3.871741 | false | false | false |
bt3gl/Numerical-Methods-for-Physics | homework6_rayleigh-taylor_instability/compressible/unsplitFluxes.py | 1 | 20308 | """
Implementation of the Colella 2nd order unsplit Godunov scheme. This
is a 2-dimensional implementation only. We assume that the grid is
uniform, but it is relatively straightforward to relax this
assumption.
There are several differen... | apache-2.0 | -1,976,983,250,665,921,000 | 38.664063 | 111 | 0.429043 | false | 2.826051 | false | false | false |
pmoleri/memorize-accesible | speak/voice.py | 1 | 3767 | # Speak.activity
# A simple front end to the espeak text-to-speech engine on the XO laptop
# http://wiki.laptop.org/go/Speak
#
# Copyright (C) 2008 Joshua Minor
# This file is part of Speak.activity
#
# Parts of Speak.activity are based on code from Measure.activity
# Copyright (C) 2007 Arjun Sarwal - arjun@laptop.or... | gpl-2.0 | -5,171,734,326,967,312,000 | 27.11194 | 95 | 0.617202 | false | 3.604785 | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/searchparameter.py | 1 | 7798 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/SearchParameter) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class SearchParameter(domainresource.DomainResource):
""" Search Parameter for a resource.
A ... | bsd-3-clause | -2,993,350,882,617,828,400 | 35.269767 | 107 | 0.574506 | false | 4.484186 | false | false | false |
gammapy/gamma-sky | make.py | 1 | 2880 | #!/usr/bin/env python
"""Make gamma-sky.net input data.
"""
import click
import gammasky
@click.group()
def cli():
"""The gamma-sky.net Python cli"""
pass
@cli.group()
def cat():
"""Dump catalog to JSON"""
@cli.group()
def source():
"""Dump source objects to JSON"""
@cat.command('all')
@click.pa... | mit | -9,101,641,954,529,314,000 | 19.425532 | 102 | 0.655556 | false | 2.990654 | false | false | false |
jualjiman/knowledge-base | src/knowledge_base/settings/staging.py | 1 | 2155 | # -*- coding: utf-8 -*-
"""
Django staging settings for knowledge_base project.
"""
import os
import urlparse
from . import * # noqa
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = [
'kb.pythonballz.com'
]
# Application definition
INSTALLED_APPS += (
'opbeat.contrib.django',
)
MIDDLEWARE_CLASSES +=... | apache-2.0 | -418,241,262,382,939,200 | 22.423913 | 77 | 0.634339 | false | 3.197329 | false | false | false |
kapilt/cloud-custodian | tools/c7n_azure/tests_azure/test_actions_mark-for-op.py | 1 | 2151 | # Copyright 2019 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | 8,334,312,290,813,750,000 | 35.457627 | 98 | 0.670386 | false | 3.834225 | false | false | false |
RianFuro/vint | vint/linting/policy/prohibit_encoding_opt_after_scriptencoding.py | 1 | 1158 | import re
from vint.ast.node_type import NodeType
from vint.linting.level import Level
from vint.linting.policy.abstract_policy import AbstractPolicy
from vint.linting.policy_registry import register_policy
@register_policy
class ProhibitEncodingOptionAfterScriptEncoding(AbstractPolicy):
def __init__(self):
... | mit | -3,076,817,734,591,732,700 | 29.473684 | 79 | 0.684801 | false | 3.847176 | false | false | false |
wziyong/casperfpga | src/casperfpga.py | 1 | 17912 | """
Created on Feb 28, 2013
@author: paulp
"""
import logging
import struct
import time
import register
import sbram
import snap
import tengbe
import qdr
from attribute_container import AttributeContainer
from utils import parse_fpg
LOGGER = logging.getLogger(__name__)
# known CASPER memory-accessible devices and ... | gpl-2.0 | 1,421,237,457,292,584,200 | 42.581509 | 130 | 0.566771 | false | 3.904098 | false | false | false |
frippe12573/geonode | geonode/catalogue/models.py | 1 | 4616 | #########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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
#... | gpl-3.0 | -4,810,848,301,429,058,000 | 34.236641 | 80 | 0.6276 | false | 4.219378 | false | false | false |
bitmazk/django-multilingual-news | multilingual_news/south_migrations/0004_auto__add_field_newsentry_image_width__add_field_newsentry_image_heigh.py | 1 | 13838 | # flake8: noqa
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'NewsEntry.image_width'
db.add_column(u'multilingual_news_newsentry', 'image_w... | mit | -2,912,040,837,918,217,000 | 76.307263 | 192 | 0.561497 | false | 3.634883 | false | false | false |
google/apis-client-generator | src/googleapis/codegen/utilities/__init__.py | 1 | 3526 | #!/usr/bin/python2.7
# Copyright 2011 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 requi... | apache-2.0 | 7,937,206,098,041,840,000 | 26.123077 | 78 | 0.650879 | false | 3.609007 | false | false | false |
django-de/django-de-v2 | django_de/apps/aggregator/views.py | 1 | 2922 | # -*- coding: utf-8 -*-
from django.db.models import get_model
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.template.defaultfilters import mark_safe
from django.utils.translation import... | bsd-3-clause | 4,984,823,657,608,090,000 | 35.525 | 118 | 0.616016 | false | 4.075314 | false | false | false |
erikrose/more-itertools | setup.py | 1 | 1967 | from re import sub
from setuptools import setup
from more_itertools import __version__
def get_long_description():
# Fix display issues on PyPI caused by RST markup
readme = open('README.rst').read()
version_lines = []
with open('docs/versions.rst') as infile:
next(infile)
for line ... | mit | 1,240,349,848,939,387,100 | 34.763636 | 78 | 0.614133 | false | 4.080913 | false | false | false |
anish/buildbot | worker/buildbot_worker/__init__.py | 1 | 4662 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 2,448,081,944,275,590,700 | 33.029197 | 138 | 0.639211 | false | 3.765751 | false | false | false |
kevin-coder/tensorflow-fork | tensorflow/python/tpu/tensor_tracer.py | 1 | 67356 | # 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 | 968,700,902,319,309,300 | 37.911612 | 82 | 0.626032 | false | 3.658068 | false | false | false |
pamfilos/invenio | modules/websearch/lib/websearchadminlib.py | 1 | 168088 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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
## Lic... | gpl-2.0 | 325,945,467,182,998,340 | 45.626352 | 507 | 0.570987 | false | 3.60851 | false | false | false |
coinchon/crc-dabmod | src/crc-dwap.py | 1 | 21796 | #!/usr/bin/env python
# Copyright (C) 2006, 2007, 2008, 2009,-2010 Her Majesty the Queen in
# Right of Canada (Communications Research Center Canada)
# This file is part of CRC-DADMOD.
#
# CRC-DADMOD is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# pu... | gpl-3.0 | -4,136,697,583,841,737,000 | 38.846435 | 80 | 0.49376 | false | 3.782714 | false | false | false |
madmax983/h2o-3 | h2o-py/tests/testdir_algos/deeplearning/pyunit_weights_and_distributions_deeplearning.py | 1 | 1284 | import sys, os
sys.path.insert(1, os.path.join("..",".."))
import h2o
from tests import pyunit_utils
from h2o.estimators.deeplearning import H2ODeepLearningEstimator
def weights_and_distributions():
htable = h2o.upload_file(pyunit_utils.locate("smalldata/gbm_test/moppe.csv"))
htable["premiekl"] = htable["premiek... | apache-2.0 | -2,314,508,829,679,752,700 | 32.815789 | 82 | 0.732087 | false | 2.993007 | false | false | false |
uschille/FabSim | python/lib/DataAnalysis.py | 1 | 3679 | import numpy as np
from scipy.optimize import leastsq
def derivatives(x, y):
num_x = len(x);
deriv = np.zeros((len(x)))
# If there for two input points, use a straight line as the derivative.
if num_x == 2:
deriv[0] = (y[1] - y[0]) / (x[1] - x[0])
deriv[1] = deriv[0]
return deriv
# Calculate ... | lgpl-3.0 | 584,378,390,467,305,900 | 28.44 | 114 | 0.568905 | false | 2.660159 | false | false | false |
gentimouton/swarch | server-master/server.py | 1 | 4410 | """
Server master:
The server is almighty.
Every frame, it receives player inputs from clients,
executes these inputs to update the game state,
and sends the whole game state to all the clients for display.
"""
from __future__ import division # So to make division be float instead of int
from network import Listener... | mit | 2,149,018,377,298,858,800 | 30.726619 | 82 | 0.547846 | false | 3.539326 | false | false | false |
bebound/linovel | novel.py | 1 | 2503 | from abc import ABC, abstractmethod, abstractstaticmethod
import requests
from bs4 import BeautifulSoup
class AbstractNovel(ABC):
"""
abstract novel class
Attributes:
url: The novel url
single_thread: A bool represent whether use single thread grab novel information
volume_name: ... | mit | 2,969,921,192,952,360,000 | 31.089744 | 108 | 0.623252 | false | 4.445826 | false | false | false |
zzw922cn/Automatic_Speech_Recognition | speechvalley/models/dynamic_brnn.py | 1 | 7057 | # encoding: utf-8
# ******************************************************
# Author : zzw922cn
# Last modified: 2017-12-09 11:00
# Email : zzw922cn@gmail.com
# Filename : dynamic_brnn.py
# Description : Dynamic Bidirectional RNN model for Automatic Speech Recognition
# ********************************... | mit | 5,569,468,753,389,374,000 | 49.769784 | 119 | 0.552784 | false | 3.888154 | false | false | false |
ljcooke/dotfiles | python/pythonrc.py | 1 | 2186 | # -----------------------------------------------------------------------------
# Python repl config
# -----------------------------------------------------------------------------
import datetime
import math
import os
import random
import re
import sys
from math import *
from pydoc import pager
try:
from see imp... | mit | -3,096,192,023,812,464,000 | 21.306122 | 79 | 0.522873 | false | 3.383901 | false | false | false |
edx/edx-e2e-tests | regression/pages/enterprise/enterprise_const.py | 1 | 1142 | """
URLs and constants for enterprise stuff
"""
import os
ENTERPRISE_PORTAL_LOGIN_URL = "https://pmsalesdemo8.successfactors.com/login?company=SFPART011327#/login"
DEFAULT_ENTERPRISE_NAME = 'SuccessFactors'
ENTERPRISE_NAME = os.environ.get('ENTERPRISE_NAME', DEFAULT_ENTERPRISE_NAME)
DEFAULT_IDP_CSS_ID = 'bestrun'... | agpl-3.0 | 7,302,774,754,136,636,000 | 27.55 | 105 | 0.744308 | false | 2.572072 | false | false | false |
amillar2/light-django | esp/mqtt_init.py | 1 | 2256 | import paho.mqtt.client as mqtt
import json
from .models import Switch, Device, PWM
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
#subscribe to status and discovery topics
client.subsc... | mit | -4,793,063,382,847,781,000 | 30.774648 | 79 | 0.719858 | false | 3.016043 | false | false | false |
felix9064/python | Demo/utils/route.py | 1 | 1139 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# mac 同时上内外网的路由设置,将以下代码保存为py文件,使用sudo跑py文件
import os
import re
def route():
# 获取路由表的网关IP地址
data = os.popen("netstat -rn|awk '{print $2}'").readlines()
# 外网网关IP的正则表达式
re_ip1 = re.compile(r'172.16.\d{1,3}.\d{1,3}')
# 内网网关IP的正则表达式
re_ip2 = re.com... | mit | 3,120,792,054,979,646,500 | 20.311111 | 76 | 0.514077 | false | 1.957143 | false | false | false |
btxgit/gazee | specproc.py | 1 | 3211 | import sqlite3
import os
if __name__ == '__main__':
# with open('/tmp/out.txt', 'rb') as fd:
# s = fd.read()
# ll = s.split('\n')
# otl = []
# s = '''UPDATE all_comics SET width=?, height=?, ratio=? WHERE comicid=?;'''
#
# with sqlite3.connect('data/gazee_comics.db') as con:
#
# ... | gpl-3.0 | 2,409,360,383,570,491,400 | 33.526882 | 164 | 0.379321 | false | 3.211 | false | false | false |
bponsler/icsv | icsv/tests/writeReadTests.py | 1 | 1580 | from os import unlink
from os.path import exists
from unittest import TestCase
from icsv import icsv, Row
class WriteReadTests(TestCase):
def setUp(self):
pass
def test_filter(self):
filename = "/tmp/testCsv.csv"
headers = ["one", "two", "three"]
csv = icsv(headers)
... | mit | 7,776,429,499,276,794,000 | 27.214286 | 63 | 0.570886 | false | 4.061697 | true | false | false |
SomewhatDamaged/Damaged-Cogs | persistentname.py | 1 | 2155 | import discord
from discord.ext import commands
import asyncio
import os
from .utils import checks
from .utils.dataIO import fileIO
class Persistentname:
"""When a user changes their account name, and no nickname is set, this will set their nickname to their old account name."""
def __init__(sel... | mit | 9,112,897,618,856,068,000 | 38.698113 | 142 | 0.646868 | false | 3.983364 | false | false | false |
Manolaru/Python_train | Les_2/Task_6/fixture/user.py | 1 | 2775 | class UserHelper:
def __init__(self,app):
self.app = app
def create_user(self, user):
wd = self.app.wd
self.app.open_home_page()
# open user form
wd.find_element_by_link_text("add new").click()
# fill user form
wd.find_element_by_name("firstname").click()
... | apache-2.0 | 1,534,537,264,706,128,100 | 46.844828 | 104 | 0.606486 | false | 3.215527 | false | false | false |
simonspa/django-datacollect | datacollect/questionnaire/migrations/0015_auto_20170324_1600.py | 1 | 2504 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-24 15:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('questionnaire', '0014_auto_20170323_2344'),
]
operations = [
migrations.AlterF... | gpl-3.0 | 2,766,687,761,227,599,000 | 44.527273 | 282 | 0.594249 | false | 3.906396 | false | false | false |
redhat-openstack/manila | manila/tests/share/drivers/test_glusterfs.py | 1 | 29189 | # Copyright (c) 2014 Red Hat, 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 require... | apache-2.0 | -4,747,165,154,843,611,000 | 39.48405 | 78 | 0.590908 | false | 3.541065 | true | false | false |
boxed/python-terminal-menu | terminal_menu.py | 1 | 2331 | import os
import sys
import termios
import fcntl
from blessings import Terminal
def getch():
fd = sys.stdin.fileno()
oldterm = termios.tcgetattr(fd)
newattr = termios.tcgetattr(fd)
newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO
termios.tcsetattr(fd, termios.TCSANOW, newattr)
oldfl... | mit | 3,803,221,867,195,180,500 | 24.075269 | 91 | 0.510511 | false | 3.5 | false | false | false |
pingdynasty/OwlProgram | Tools/Heavy/uploader.py | 1 | 24501 | #!/usr/bin/env python
# Copyright (c) 2015-2017 Enzien Audio, Ltd. (info@enzienaudio.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-2.0 | -762,648,957,300,477,000 | 39.835 | 238 | 0.5621 | false | 3.961358 | false | false | false |
erikabarros/naguil | backend/appengine/routes/formacaos/edit.py | 1 | 1215 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from config.template_middleware import TemplateResponse
from gaebusiness.business import CommandExecutionException
from gaepermission.decorator import login_not_required
from tekton import router
from gaecookie.decorator import no_csrf
fro... | mit | 1,807,663,158,633,435,000 | 39.5 | 115 | 0.766255 | false | 3.248663 | false | false | false |
ClaudioNahmad/Servicio-Social | Parametros/CosmoMC/prerrequisitos/plc-2.0/.waf-1.8.8-eab538dea2e33915d3770ff3f393b18b/waflib/Tools/cxx.py | 1 | 1212 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
from waflib import TaskGen,Task,Utils
from waflib.Tools import c_preproc
from waflib.Tools.ccroot import link_task,stlink_task
@TaskGen.extension('.cpp','.cc','.cxx','.C','.c++')
def cxx_hook(self,no... | gpl-3.0 | 5,481,147,303,242,751,000 | 45.615385 | 298 | 0.695545 | false | 2.589744 | false | false | false |
Oxygem/canaryd | canaryd/__main__.py | 1 | 3515 | # canaryd
# File: canaryd/__main__.py
# Desc: entry point for canaryd
import logging
import signal
from time import time
from canaryd_packages import click
from canaryd.daemon import run_daemon
from canaryd.log import logger, setup_logging, setup_logging_from_settings
from canaryd.plugin import (
get_and_prepar... | mit | -8,296,029,549,149,108,000 | 26.460938 | 80 | 0.675676 | false | 3.84153 | false | false | false |
DavideCanton/Python3 | quadtree/gui.py | 1 | 1615 | __author__ = 'davide'
from random import randint
from quadtree import QuadTree, Rect
import pygame
from pygame.constants import *
from pygame.color import THECOLORS
from pygame.draw import rect, circle, line
W = 800
H = 600
R = 2
N = 100
def col(name):
"""
@type name: str
@return the color as a tuple
... | gpl-3.0 | -9,208,982,842,127,232,000 | 19.987013 | 65 | 0.52322 | false | 3.549451 | false | false | false |
joshuamckenty/yolo-octo-wookie | nova/cloudpipe/pipelib.py | 1 | 3846 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | 5,067,773,451,058,629,000 | 37.46 | 114 | 0.629485 | false | 3.694524 | false | false | false |
imec-myhdl/pycontrol-gui | BlockEditor/supsisim/pysim.py | 1 | 1404 | #!/usr/bin/python
# aim for python 2/3 compatibility
from __future__ import (division, print_function, absolute_import,
unicode_literals)
from Qt import QtGui, QtWidgets, QtCore # see https://github.com/mottosso/Qt.py
import sys
import os
#try:
# sip.setapi('QString', 1)
#except ValueErro... | lgpl-2.1 | 6,907,061,759,329,544,000 | 26.529412 | 81 | 0.608974 | false | 3.646753 | false | false | false |
ddaan/django-arctic | tests/test_layout_mixin.py | 1 | 4936 | import pytest
from collections import OrderedDict
from arctic.mixins import LayoutMixin
from articles.forms import ArticleForm
from tests.conftest import get_form
from tests.factories import ArticleFactory
@pytest.fixture
def layout():
class Layout(LayoutMixin):
layout = None
def __init__(self)... | mit | 3,694,713,306,793,887,000 | 38.174603 | 75 | 0.569692 | false | 3.556196 | true | false | false |
rdo-management/tuskar-ui | tuskar_ui/utils/utils.py | 1 | 4279 | # -*- coding: utf8 -*-
#
# 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... | apache-2.0 | -1,079,681,464,923,149,700 | 29.564286 | 78 | 0.580743 | false | 3.875906 | false | false | false |
nonZero/OpenCommunity | src/issues/views.py | 1 | 44889 | from django.contrib.auth.views import redirect_to_login
from django.db.models.aggregates import Max
from django.http.response import HttpResponse, HttpResponseBadRequest, \
HttpResponseForbidden
from django.shortcuts import get_object_or_404, render, redirect
from django.template import RequestContext
from django.t... | bsd-3-clause | 5,895,209,078,495,821,000 | 37.366667 | 121 | 0.57239 | false | 3.975996 | false | false | false |
ctogle/dilapidator | test/geometry/vec3_tests.py | 1 | 16823 | import dilap.geometry.tools as dpr
from dilap.geometry.vec3 import vec3
from dilap.geometry.quat import quat
import dilap.core.plotting as dtl
import matplotlib.pyplot as plt
import unittest,numpy,math,random
#python3 -m unittest discover -v ./ "*tests.py"
class test_vec3(unittest.TestCase):
# given a vec3, ... | mit | -3,662,958,737,619,010,600 | 36.88964 | 80 | 0.579326 | false | 2.292587 | true | false | false |
csadorf/signac | signac/common/validate.py | 1 | 1660 | # Copyright (c) 2017 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
import logging
from .configobj.validate import Validator
from .configobj.validate import VdtValueError
logger = logging.getLogger(__name__)
def version(value, *args, **k... | bsd-3-clause | 8,211,791,766,496,821,000 | 22.714286 | 76 | 0.640964 | false | 3.747178 | false | false | false |
zacharylawrence/ENEE408I-Team-9 | pi/arduino.py | 1 | 4379 | #!/usr/bin/env python
# encoding: utf-8
"""
Control All Arduino Functions
"""
from pymata_aio.pymata3 import PyMata3
from pymata_aio.constants import Constants
import constants
class Arduino():
# Define Pin Constants
# SPI (for pixy) uses pins 10-13
_MOTOR1 = 3
_MOTOR1_DIR_A = 2
_MOTOR1_DIR_B = 4
_MOTOR... | mit | -2,159,931,330,257,782,800 | 29.622378 | 109 | 0.651975 | false | 2.871475 | false | false | false |
TeamSpen210/srctools | srctools/sndscript.py | 1 | 12138 | """Reads and writes Soundscripts."""
from enum import Enum
from chunk import Chunk as WAVChunk
from srctools import Property, conv_float
from typing import (
Optional, Union, TypeVar, Callable,
List, Tuple, Dict,
TextIO, IO,
)
__all__ = [
'SND_CHARS', 'Pitch', 'VOL_NORM', 'Channel', 'Level',
'Soun... | unlicense | -6,019,161,793,720,176,000 | 31.196286 | 137 | 0.511781 | false | 3.509107 | false | false | false |
allanlei/rhinocloud-utils | rhinocloud/views/mixins/formset.py | 1 | 2115 | from django.forms.models import modelformset_factory
from django.core.exceptions import ImproperlyConfigured
class ModelFormSetFactoryMixin(object):
formset_fields = None
formset_exclude = None
formset_extra = 1
def get_formset_model(self):
if self.formset_model:
model = self.... | bsd-3-clause | -6,625,479,159,177,680,000 | 34.847458 | 96 | 0.631678 | false | 4.130859 | false | false | false |
balloob/pychromecast | pychromecast/controllers/youtube.py | 1 | 3736 | """
Controller to interface with the YouTube-app.
Use the media controller to play, pause etc.
"""
import threading
from casttube import YouTubeSession
from . import BaseController
from ..error import UnsupportedNamespace
from ..config import APP_YOUTUBE
YOUTUBE_NAMESPACE = "urn:x-cast:com.google.youtube.mdx"
TYPE_GE... | mit | 7,168,021,507,368,404,000 | 32.963636 | 83 | 0.621253 | false | 3.796748 | false | false | false |
soplerproject/sopler | sopler/settings.py | 1 | 7823 | # -*- coding: utf-8 -*-
# Django settings for sopler project.
import os.path
PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SESSION_SAVE_EVERY_REQUEST = True
#Set "True" if all non-SSL requests should be permanently redirected to SSL.
SECURE_SSL_REDIRECT... | agpl-3.0 | -6,497,830,003,044,947,000 | 33.29386 | 127 | 0.698043 | false | 3.719791 | false | false | false |
Pbartek/pyobd-pi-TFT | obd_gui.py | 1 | 17289 | #!/usr/bin/env python
###########################################################################
# obd_gui.py
#
# Created by Paul Bartek (pbartek@cowfishstudios.com)
#
###########################################################################
#--------------------------------------------------------------------------... | gpl-2.0 | -4,817,368,613,607,881,000 | 27.863105 | 93 | 0.515588 | false | 3.920408 | false | false | false |
skosukhin/spack | var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py | 1 | 1662 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -7,378,908,064,907,632,000 | 38.571429 | 78 | 0.661853 | false | 4.073529 | false | false | false |
enritoomey/DiagramaDeRafagasyManiobras | calculos.py | 1 | 15303 | # TODO: turn this into a set of functions
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import fsolve
def plot_diagrama_de_rafagas(ax, Vb, Vc, Vd, n_25fts, n_50fts, n_60fts, dv, units, vel_label):
ax.plot(np.arange(0, Vb[units], dv), [1 + n_60fts(vel) for vel in np.arange(0, Vb[u... | mit | 6,982,465,582,770,812,000 | 40.041209 | 135 | 0.52493 | false | 2.373294 | false | false | false |
hpcuantwerpen/easybuild-easyblocks | easybuild/easyblocks/b/boost.py | 1 | 17638 | ##
# Copyright 2009-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | 8,498,834,797,141,491,000 | 45.785146 | 120 | 0.589806 | false | 3.856987 | true | false | false |
pacoqueen/ginn | ginn/formularios/partes_de_fabricacion_bolsas.py | 1 | 117840 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2005-2020 Francisco José Rodríguez Bogado, #
# Diego Muñoz Escalante. #
# (pacoqueen@users.sourceforge.ne... | gpl-2.0 | -6,043,880,975,479,553,000 | 46.973039 | 134 | 0.493912 | false | 3.665928 | false | false | false |
hackerspace-silesia/cebulany-manager | cebulany/resources/payment_summary.py | 1 | 1554 |
from flask_restful import fields, marshal_with
from flask_restful.reqparse import RequestParser
from cebulany.auth import token_required
from cebulany.queries.payment_summary import PaymentSummaryQuery
from cebulany.resources.model import ModelListResource
resource_fields = {
'payments': fields.List(fields.Neste... | mit | 7,752,611,034,030,863,000 | 32.782609 | 79 | 0.666667 | false | 3.52381 | false | false | false |
vprnet/iframe | app/views.py | 1 | 2454 | from app import app
from flask import render_template, request
from config import BASE_URL
import csv
# Not being used anywhere
@app.route('/connect-choropleth')
def connect():
page_url = BASE_URL + request.path
return render_template('health-connect-choropleth.html', page_url=page_url)
@app.route('/sewage'... | apache-2.0 | -876,918,957,947,200,600 | 23.54 | 79 | 0.628769 | false | 2.917955 | false | false | false |
foursquare/pants | src/python/pants/backend/jvm/tasks/analysis_extraction.py | 1 | 6308 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import json
import os
from collections import defaultdict
from pants.backend.jvm.subsyst... | apache-2.0 | -4,502,153,119,825,968,600 | 40.5 | 102 | 0.677394 | false | 3.932668 | false | false | false |
anarchih/SmallProject | project1-1/evaluator.py | 1 | 5529 | # import pandas as pd
import datetime as dt
# import matplotlib.pyplot as plt
from collections import Counter
import csv
class Cluster(object):
def __init__(self, capacity):
self.week = [0] * 60
class Evaluater(object):
def __init__(self, filename, k, dist, capacity, date_range):
self.data = s... | gpl-3.0 | 891,766,790,229,226,900 | 35.513333 | 121 | 0.466314 | false | 3.410336 | true | false | false |
google/digitalbuildings | tools/validators/instance_validator/validate/handler.py | 1 | 8569 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | apache-2.0 | 6,749,910,311,691,980,000 | 34.704167 | 80 | 0.690629 | false | 4.49109 | true | false | false |
salv-orlando/MyRepo | nova/api/openstack/common.py | 1 | 13765 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | apache-2.0 | -6,424,597,816,870,545,000 | 31.011628 | 78 | 0.609517 | false | 3.825737 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.