repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pogin503/vbautil | language/python/eigen.py | 1 | 2057 | #!/usr/bin/env python
# coding=utf-8
import numpy
# a = numpy.array([[2,2]])
# # print a
# length = numpy.linalg.norm(a)
# print length
#length=>2.8284271247461903
#ベクトルの正規化
# print (a / numpy.linalg.norm(a))
def eigen_mul(A,x):
return numpy.dot(A,x)
def eigen_div(A,x):
A1 = eigen_mul(A,x)
it = numpy.n... | mit | 1,240,409,395,451,466,800 | 23.566265 | 85 | 0.579696 | false | 2.245595 | false | false | false |
antmat/cocaine-tools | tests/test_jsonrpc.py | 2 | 2357 | import mock
import tornado
from tornado.httpclient import HTTPRequest
from tornado.httputil import HTTPServerRequest, ResponseStartLine, HTTPHeaders
from tornado.testing import AsyncTestCase
from cocaine.proxy.jsonrpc import JSONRPC
from cocaine.proxy.logutils import NULLLOGGER
class TestJSONRPC(AsyncTestCase):
... | lgpl-3.0 | -3,470,344,589,388,436,000 | 38.283333 | 120 | 0.632584 | false | 3.974705 | true | false | false |
kool814/MLB-Player-Valuations | main.py | 1 | 15422 | #This is the file that we will use to parse the Batter, Pitcher, and Salary data
#Dictionary with key: Player and value: Dictionary containing key:Team and value: stats
import math
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets, linear_model
from sklearn.linear_model import LinearReg... | mit | 2,948,810,523,205,661,700 | 38.442455 | 173 | 0.563805 | false | 3.147989 | false | false | false |
CvvT/crawler_sqlmap | crawler/browser/headlessBrowser.py | 1 | 4521 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import json
import traceback
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import NoAlertPresentException, WebDriverException
from .decorator impo... | apache-2.0 | -1,019,815,129,644,435,300 | 29.972414 | 104 | 0.559118 | false | 4.193277 | false | false | false |
Razvy000/aiception_webinar | aiception.py | 1 | 2399 | import logging
from pprint import pformat
import requests
import time
logger = logging.getLogger('aiception')
FORMAT = '%(message)s'
logging.basicConfig(level=logging.WARNING, format=FORMAT)
logging.getLogger("requests").setLevel(logging.WARNING)
def face_age(token, image_url):
data = {'image_url': image_url}
... | mit | 2,607,893,442,304,315,000 | 30.155844 | 147 | 0.658608 | false | 3.446839 | false | false | false |
eliasrg/SURF2017 | code/system.py | 1 | 4012 | # Copyright (c) 2017 Elias Riedel Gårding
# Licensed under the MIT License
from scipy.stats import bernoulli
class Plant:
"""The system {x(t+1) = α x(t) + w(t) + u(t); y(t) = x(t) + v(t)}."""
def __init__(self, alpha, x1_distr, w_distr, v_distr,
w_sequence=None, v_sequence=None, x1=None):
... | mit | 131,507,367,116,492,160 | 27.211268 | 80 | 0.541188 | false | 3.217671 | false | false | false |
moijes12/oh-mainline | vendor/packages/python-social-auth/social/backends/reddit.py | 69 | 1770 | """
Reddit OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/reddit.html
"""
import base64
from social.backends.oauth import BaseOAuth2
class RedditOAuth2(BaseOAuth2):
"""Reddit OAuth2 authentication backend"""
name = 'reddit'
AUTHORIZATION_URL = 'https://ssl.reddit.com/api/v1/autho... | agpl-3.0 | -1,491,782,079,752,820,000 | 32.396226 | 78 | 0.585311 | false | 3.582996 | false | false | false |
google/timesketch | importer_client/python/timesketch_import_client/importer_test.py | 1 | 6404 | # Copyright 2019 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 required by applicable law or a... | apache-2.0 | -2,894,064,908,954,441,000 | 31.841026 | 74 | 0.575422 | false | 3.762632 | true | false | false |
amylittleyang/OtraCAD | cadnano25/cadnano/strandset/createstrandcmd.py | 1 | 2458 | from cadnano.cnproxy import UndoCommand
from cadnano.strand import Strand
from cadnano.oligo import Oligo
import cadnano.preferences as prefs
import random
from strandrep.domain import Domain
class CreateStrandCommand(UndoCommand):
"""
Create a new Strand based with bounds (base_idx_low, base_idx_high),
an... | mit | -8,933,343,064,290,052,000 | 41.396552 | 97 | 0.683483 | false | 3.457103 | false | false | false |
yeagob/Manta-Sensores | WSManta.py | 1 | 18089 | ##
## WSManta
##
## Levantar un servidor Autobahn y comunicar por serial mediante Twisted
##
## Recepción de los valores de cada sensor, de una matriz de sensores
## de tamaño variable, por serial, enviados por una microcontroladora (Arduino)
##
## Procesamiento de la información, dependiendo del estado,
## para... | gpl-2.0 | -8,976,141,635,610,856,000 | 35.814664 | 158 | 0.611972 | false | 3.225553 | false | false | false |
verloop/rasa_nlu | rasa_nlu/train.py | 1 | 2986 | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import argparse
import logging
import os
import typing
from typing import Text
from typing import Tuple
from rasa_nlu.components import ComponentBuilder
from rasa_nlu.co... | apache-2.0 | 6,493,327,616,119,309,000 | 34.547619 | 111 | 0.695914 | false | 3.833119 | true | false | false |
SiLab-Bonn/fe65_p2 | fe65p2/scan_base.py | 1 | 7735 | import logging
import basil
from fe65p2 import fe65p2
from fifo_readout import FifoReadout
from contextlib import contextmanager
import time
import os
import tables as tb
import yaml
class MetaTable(tb.IsDescription):
index_start = tb.UInt32Col(pos=0)
index_stop = tb.UInt32Col(pos=1)
data_length = tb.UInt... | gpl-2.0 | -4,309,377,933,678,683,000 | 36.548544 | 174 | 0.587072 | false | 3.245909 | false | false | false |
xassbit/zorn | tests/unit/test_page.py | 1 | 11399 | import os
import pytest
from zorn import elements, errors
def test_page_abstraction():
page = elements.PageAbstraction('Test', 'test')
assert str(page) == 'Test'
assert page.save_html('test_dir') is None
assert page.get_path_to_root() is None
assert page.get_relative_path(elements.PageAbstractio... | mit | -8,865,654,049,989,372,000 | 38.996491 | 117 | 0.651022 | false | 3.034878 | true | false | false |
asurunis/CrisisMappingToolkit | cmt/domain.py | 1 | 27956 | # -----------------------------------------------------------------------------
# Copyright * 2014, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The Crisis Mapping Toolkit (CMT) v1 platform is licensed under the Apache
#... | apache-2.0 | -8,080,993,552,401,383,000 | 44.309562 | 147 | 0.566533 | false | 4.170048 | false | false | false |
google-code/acute-dbapi | acute/util.py | 2 | 4446 | """ Utility functions for the acute DBAPI testsuite """
import config
def import_module(driver_name):
""" Import a database module by name. SQLite requires special handling.
There may be others.. if so, please add them here!
"""
if driver_name not in ['sqlite3', 'pysqlite2']:
driver_module = _... | mit | -3,152,374,054,885,333,000 | 30.309859 | 80 | 0.605488 | false | 4.078899 | false | false | false |
showerst/openstates | openstates/md/legislators.py | 2 | 2899 | import re
from collections import defaultdict
import lxml.html
from billy.scrape.legislators import LegislatorScraper, Legislator
def _get_table_item(doc, name):
""" fetch items out of table that has a left column of th """
return doc.xpath('//th[contains(text(), "%s")]/following-sibling::td' % name)[0]
cla... | gpl-3.0 | 4,949,191,475,216,065,000 | 35.2375 | 91 | 0.528113 | false | 3.66962 | false | false | false |
bjamesv/pymoldmaker | test/test_cube_flipped.py | 1 | 14887 | """
this file is a part of pymoldmaker
Copyright (C) 2015-2016 Brandon J. Van Vaerenbergh
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any lat... | gpl-3.0 | -4,642,703,441,754,707,000 | 42.276163 | 134 | 0.519648 | false | 3.081557 | true | false | false |
jsyk/spnsyn-demo | ftl/types.py | 1 | 3106 | from ftl.ast import *
from ftl.atrav import DefaultTrav, PrintTrav
True_Bool_t = '\'1\''
False_Bool_t = '\'0\''
# Bool_t = NAp('std_ulogic', [])
# Integer_t = NAp('integer', [])
Bool_t = 'std_ulogic'
Integer_t = 'integer'
def resolve_types(t1, t2):
if t1 is None:
return t2
if t2 is None:
ret... | gpl-2.0 | 6,016,773,553,226,630,000 | 29.45098 | 103 | 0.552157 | false | 2.975096 | false | false | false |
Nukesor/spacesurvival | server/schemas/module.py | 1 | 1444 | """Module schema for serialization and validation."""
from server.schemas import Schema
from marshmallow import validates_schema, ValidationError, fields
class ModuleSchema(Schema):
"""Module Schema."""
id = fields.UUID()
pod_id = fields.UUID()
base_id = fields.UUID()
type = fields.Str(required=... | mit | 4,513,360,918,554,412,500 | 37 | 102 | 0.614266 | false | 3.63728 | false | false | false |
altvod/classical | classical/descriptors.py | 1 | 7241 | """
Descriptors/properties for classes
"""
import copy
from typing import Optional, Tuple
from .subclass import argumented_subclass, attributed_subclass
class FactoryProperty:
"""
A descriptor that returns an object related to the owner class
and created by ``factory`` when accessed.
:param factory... | mit | 7,551,543,690,020,222,000 | 29.944444 | 93 | 0.603922 | false | 4.292235 | false | false | false |
andytopham/podplayer | uoled.py | 1 | 3340 | ''' uoled.py
Completely replaces oled.py.
Called by infodisplay.py
Now threaded.
The text to be written is placed in a queue,
and then the run method works through this.
'''
import gaugette.ssd1306
import time, sys, logging, datetime
from time import gmtime, strftime
import threading, Queue
# Setting some variab... | mit | -5,169,271,702,359,954,000 | 28.043478 | 109 | 0.667964 | false | 2.794979 | false | false | false |
heynemann/ea | tictactoeea.py | 1 | 9658 | import random
import math
from deap import base, tools
SMART_ALGO = False
def drawBoard(board):
# This function prints out the board that it was passed.
board = [item or ' ' for item in board]
message = ""
# "board" is a list of 10 strings representing the board (ignore index 0)
message += ('... | mit | -5,037,665,697,740,939,000 | 30.054662 | 108 | 0.562849 | false | 3.65972 | false | false | false |
omegachysis/Chronicles-Of-Oracle-I | BanishmentBlade/engine.py | 1 | 2947 |
from BanishmentBlade.printer import *
import sys
##def playMusic(music):
## clip = mp3play.load(r"BanishmentBlade/music/" + music)
## clip.play()
def gotoWorld(world, data):
data["world"] = world
exec ("from BanishmentBlade.worlds import " + \
data["world"].replace(" ", ""))
exec (data["w... | apache-2.0 | 4,897,745,130,536,126,000 | 25.54955 | 76 | 0.470309 | false | 3.758929 | false | false | false |
cheng10/Shanbay_Clone | Shanbay_Clone/settings.py | 1 | 3522 | """
Django settings for Shanbay_Clone project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import... | gpl-3.0 | 2,155,885,836,921,101,300 | 24.897059 | 91 | 0.684554 | false | 3.452941 | false | false | false |
angea/corkami | src/angecryption/misc/dupe_eocd.py | 1 | 1165 | # duplicate & adjust the EoCD of a ZIP archive at the bottom of the file
# to increase compatibility in the case of big appended data
#Ange Albertini, BSD Licence 2014
import struct
def GetExtraEoCD(data, delta):
"""returns the adjusted EoCD of a ZIP file"""
#Locate the signature of End of Central D... | bsd-2-clause | 7,492,065,425,013,116,000 | 27.125 | 79 | 0.593991 | false | 2.941919 | false | false | false |
TheMitchWorksPro/DataTech_Playground | Python_Misc/TMWP_CSV_Manipulation/file_fuser.py | 1 | 4349 | #!/usr/bin/env python
"""
Fuse csv files into one single file.
"""
## file_fuser.py
### fuse individual files into one giant file
import pandas as pd
import os
import argparse
from abc import ABCMeta, abstractmethod
class CsvFuserAbs(object, metaclass=ABCMeta):
## This object initialized from command line a... | mit | -2,157,774,136,760,457,500 | 43.377551 | 166 | 0.620372 | false | 3.97532 | false | false | false |
ChuanleiGuo/AlgorithmsPlayground | LeetCodeSolutions/python/289_Game_of_Life.py | 1 | 1048 | class Solution(object):
def gameOfLife(self, board):
"""
:type board: List[List[int]]
:rtype: void Do not return anything, modify board in-place instead.
"""
if not board or len(board) == 0 or not board[0] or len(board[0]) == 0:
return
m, n = len(board), ... | mit | -6,400,941,672,696,200,000 | 30.757576 | 78 | 0.367366 | false | 3.413681 | false | false | false |
ctrautma/Xena-VSPerf | core/results/results_constants.py | 1 | 2954 | # Copyright 2015 Intel 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 writ... | apache-2.0 | -6,204,513,006,665,304,000 | 35.02439 | 77 | 0.655383 | false | 3.307951 | false | false | false |
tralpha/Computer-Vision-Gatech | ps0_python/ps0.py | 1 | 5911 | #!/usr/bin/python
import numpy as np
import cv2
import matplotlib.pyplot as plt
def show_img(img):
"""
Shows an image in RGB using matplotlib pyplot
Args:
img: An opencv instance of the image to be displayed
"""
if img.ndim == 3:
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
... | apache-2.0 | -3,808,445,469,713,310,000 | 29.005076 | 80 | 0.589917 | false | 3.5587 | false | false | false |
sidnarayanan/BAdNet | train/gen/baseline/models/particle_dense_models/train_v1.py | 1 | 4059 | #!/usr/local/bin/python2.7
from sys import exit, stdout, argv
from os import environ, system
environ['KERAS_BACKEND'] = 'tensorflow'
import numpy as np
import signal
from keras.layers import Input, Dense, Dropout, concatenate, LSTM, BatchNormalization, Conv1D, Flatten
from keras.models import Model
from keras.callb... | mit | -6,540,987,353,581,639,000 | 32.545455 | 137 | 0.671101 | false | 3.229117 | true | false | false |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/radical.utils-0.7.7-py2.7.egg/radical/utils/misc.py | 1 | 4806 |
import os
import regex
import pymongo
import url as ruu
# ------------------------------------------------------------------------------
#
def split_dburl (dburl, default_dburl=None) :
"""
we split the url into the base mongodb URL, and the path element, whose
first element is the database name, and the... | apache-2.0 | -4,547,872,154,996,061,700 | 26.94186 | 86 | 0.536621 | false | 4.245583 | false | false | false |
samueladam/worldgame | src/worldgame/templatetags/map_tags.py | 1 | 2504 | import subprocess
from hashlib import md5
from django.conf import settings
from django import template
from django.template.loader import render_to_string
from django.core.files.storage import FileSystemStorage
from django.core.files.base import ContentFile
register = template.Library()
fs = FileSystemStorage()
de... | bsd-3-clause | -9,186,940,827,285,307,000 | 23.54902 | 73 | 0.53115 | false | 3.704142 | false | false | false |
atomman/nmrglue | nmrglue/process/proc_autophase.py | 1 | 5411 | """
Automated phase correction
These functions provide support for automatic phasing of NMR data. They
consist of the core `autops` function which performs the optimisation and
a set of private functions for calculating a spectral phase quality score
for a provided spectrum.
"""
from __future__ import print_function
... | bsd-3-clause | -4,392,011,219,400,019,000 | 24.167442 | 78 | 0.600998 | false | 3.224672 | false | false | false |
carthage-college/django-djforms | djforms/polisci/iea/registration/views.py | 2 | 4472 | from django.conf import settings
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from djforms.polisci.iea.registration.forms import RegistrationContactForm
from djforms.polisci.iea.registration.forms import RegistrationOrderForm
from ... | unlicense | 2,950,585,115,592,359,400 | 37.575221 | 78 | 0.509168 | false | 4.663191 | false | false | false |
jeffmarcom/checkbox | checkbox/contrib/gdk.py | 2 | 1768 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Python-XRandR provides a high level API for the XRandR extension of the
# X.org server. XRandR allows to configure resolution, refresh rate, rotation
# of the screen and multiple outputs of graphics cards.
#
# This module allows to get information for gtk.gdk.Screen object... | gpl-3.0 | -6,943,125,966,140,299,000 | 37.413043 | 80 | 0.748727 | false | 3.526946 | false | false | false |
LifeDJIK/S.H.I.V.A. | containers/shiva/S.H.I.V.A..py | 1 | 2694 | #!/usr/bin/python
# coding=utf-8
# pylint: disable=I0011,C0103,E1101,R0201,R0903
"""
S.H.I.V.A. - Social network History & Information Vault & Analyser
Application entry point
"""
import jinja2
import cherrypy
import platform
from pymongo import MongoClient
from pymongo import ReadPreference
from engine.tools impo... | mit | 2,501,638,909,810,175,000 | 27.659574 | 78 | 0.644766 | false | 3.904348 | false | false | false |
ning/collector | src/utils/py/imap2coll.py | 2 | 4876 | #
# Copyright 2011 Ning, Inc.
#
# Ning licenses this file to you 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 ... | apache-2.0 | -7,831,484,042,299,031,000 | 32.627586 | 119 | 0.687449 | false | 3.929089 | false | false | false |
Dangetsu/vnr | Frameworks/Sakura/py/libs/voicetext/online.py | 1 | 7402 | # coding: utf8
# online.py
# 10/9/2014 jichi
#
# API: http://dws.voicetext.jp/tomcat/data.xml
#
# See: http://voicetext.jp/
#
# Example:
#
# HIKARI (ja) Normal:
# Text: 憎しみは憎しみしか生まない。
# POST http://dws.voicetext.jp/tomcat/servlet/vt [HTTP/1.1 200 OK 587ms]
# - X-Requested-With: XMLHttpRequest
# - Referer: http://dws.vo... | gpl-3.0 | -2,328,591,324,035,099,000 | 41.017341 | 370 | 0.648507 | false | 2.078045 | false | false | false |
edasi/kool | setup.py | 1 | 1216 | # coding=utf-8
from setuptools import setup, find_packages
from codecs import open
import os
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
return open(path, encoding='utf-8').read()
setup(
name="Kool",
version="0.0.2",
packages=find_packages(),
# development metadat... | mit | 3,097,130,859,181,259,300 | 27.952381 | 84 | 0.627467 | false | 3.973856 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/coghq/DistributedFactory.py | 1 | 6177 | from panda3d.core import *
from panda3d.direct import *
from toontown.toonbase.ToontownGlobals import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
import random
from otp.level import DistributedLevel
from direct.directnotify import DirectNotifyGlobal
import FactoryBase
impo... | apache-2.0 | 8,115,014,504,253,949,000 | 36.895706 | 158 | 0.69095 | false | 3.727821 | false | false | false |
lafranceinsoumise/api-django | agir/mailing/migrations/0002_auto_20190308_1859.py | 1 | 1265 | # Generated by Django 2.1.7 on 2019-03-08 17:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("groups", "0032_auto_20190128_1550"), ("mailing", "0001_initial")]
operations = [
migrations.RenameField(
model_name="segment",
ol... | agpl-3.0 | -4,470,500,207,905,591,300 | 29.780488 | 88 | 0.533281 | false | 4.459364 | false | false | false |
jimi-c/ansible | lib/ansible/modules/cloud/google/gcp_compute_backend_service.py | 2 | 37934 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | -5,149,406,320,489,894,000 | 42.702765 | 140 | 0.573259 | false | 4.78421 | false | false | false |
bluec0re/pascal-utils | filter.py | 1 | 3536 | #!/usr/bin/env python3
# encoding: utf-8
from pathlib import Path
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PIL import Image, ImageDraw, ImageQt
from filter_gui import Ui_MainWindow
from pascal import PascalClass
class MainWindow(Ui_MainWindow, QMainWindow):
def __... | gpl-3.0 | -5,915,464,481,974,767,000 | 36.617021 | 147 | 0.625848 | false | 3.50446 | false | false | false |
abstractfactory/about | about/bin/windows_contextmenu.py | 1 | 2152 | """
Description
Generate registry patch for adding "Open in About"
to the Windows right-click menu.
"""
template = r'''Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\About]
@="Open in &About"
[HKEY_CLASSES_ROOT\Directory\shell\About\command]
@="{executable} {about_dir}\\bin\\about.... | gpl-3.0 | -7,690,997,113,627,372,000 | 19.11215 | 71 | 0.587825 | false | 3.465378 | false | false | false |
matrix65537/lab | pylib/scplib/core/log.py | 1 | 3285 | #!/usr/bin/python
#coding:utf8
import sys
import time
import argparse
import consolecolor as ccc
__all__ = ["Log", "verbose", "develop", "debug", "info", "warning", "error", "set_log_level", "set_log_file", "get_log_level", "get_log_file"]
#############################################################################... | mit | -2,506,679,432,646,482,000 | 24.269231 | 142 | 0.48828 | false | 3.502132 | false | false | false |
solvo/derb | report_builder/Observation/ObservationView.py | 1 | 2599 | import random
from django.views.generic.list import ListView
from report_builder.models import Observation
from report_builder.models import Answer
from django.shortcuts import get_object_or_404
from report_builder.shortcuts import get_reportbyproject_questions
from report_builder.shortcuts import get_active_reviewer
f... | gpl-3.0 | -730,038,079,061,772,500 | 44.596491 | 122 | 0.644479 | false | 3.998462 | false | false | false |
rtucker-mozilla/WhistlePig | whistlepig/whistlepig/views.py | 1 | 6938 | import commonware
from django.core.urlresolvers import reverse
from django.db.models import Q
import operator
from django.shortcuts import render
from models import StatusUpdate
from django.http import HttpResponse, HttpResponseForbidden
from django.template import RequestContext
from django.shortcuts import render_to_... | bsd-3-clause | -6,360,908,232,967,277,000 | 37.977528 | 207 | 0.638657 | false | 3.730108 | false | false | false |
DeveloperMal/wger | wger/nutrition/views/bmi.py | 1 | 3596 | # -*- coding: utf-8 -*-
# This file is part of wger Workout Manager.
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | agpl-3.0 | -7,780,675,151,198,406,000 | 30.823009 | 78 | 0.628198 | false | 3.494655 | false | false | false |
ASMlover/study | python/imp-lang/imp_lexer.py | 1 | 2313 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2016 ASMlover. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright... | bsd-2-clause | 3,573,632,378,112,731,600 | 33.014706 | 70 | 0.674881 | false | 4.167568 | false | false | false |
rwl/muntjac | muntjac/demo/gae.py | 1 | 1800 |
import logging
import warnings
from muntjac.demo.HelloWorld \
import HelloWorld
from muntjac.demo.Calc \
import Calc
from muntjac.demo.SimpleAddressBook \
import SimpleAddressBook
from muntjac.demo.MuntjacTunesLayout \
import MuntjacTunesLayout
from muntjac.demo.sampler.SamplerApplication \
i... | apache-2.0 | -9,064,437,224,574,570,000 | 22.076923 | 77 | 0.76 | false | 3.377111 | false | false | false |
19kestier/taiga-back | taiga/base/neighbors.py | 2 | 2396 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 8,057,655,767,947,785,000 | 33.681159 | 98 | 0.67781 | false | 3.721617 | false | false | false |
GoldenLine/gtlaunch | gtlaunch/main.py | 1 | 1059 | #!/usr/bin/env python
import argparse
import sys
from gtlaunch import __version__
from launcher import Launcher, LauncherError
def run():
parser = argparse.ArgumentParser()
parser.add_argument(
'-c', '--config', metavar='FILE', help="path to configuration file",
default="~/gtlaunch.json",
... | mit | -3,968,648,591,233,066,000 | 24.829268 | 76 | 0.583569 | false | 3.782143 | false | false | false |
hroest/pymzML | pymzml/spec.py | 1 | 66104 | # -*- coding: utf-8 -*-
# encoding: utf-8
"""
The spectrum class offers a python object for mass spectrometry data.
The spectrum object holds the basic information on the spectrum and offers
methods to interrogate properties of the spectrum.
Data, i.e. mass over charge (m/z) and intensity decoding is performed on deman... | lgpl-3.0 | -3,483,909,747,708,976,600 | 39.554601 | 196 | 0.538545 | false | 4.164556 | false | false | false |
fumitoh/modelx | modelx/core/cells.py | 1 | 25343 | # Copyright (c) 2017-2021 Fumito Hamamura <fumito.ham@gmail.com>
# This library is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version 3.
#
# This library is distributed in the hope that it will be use... | gpl-3.0 | 7,737,334,741,142,558,000 | 28.991716 | 79 | 0.549422 | false | 4.2133 | false | false | false |
thecableguy11492/pynet_practice | class4/exercise2.py | 1 | 1188 | #!/usr/bin/env python
import paramiko
import exercise1
import time
def conf_cisco(pre_conn, remote_conn, *args):
for cmd in args:
remote_conn.send(cmd + '\n')
time.sleep(2)
while remote_conn.recv_ready():
output = remote_conn.recv(2000)
print output
def set_junipe... | apache-2.0 | 5,642,577,835,677,649,000 | 35 | 116 | 0.607744 | false | 3.318436 | false | false | false |
apache/avro | lang/py/avro/name.py | 2 | 6835 | #!/usr/bin/env python3
##
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
... | apache-2.0 | 378,441,842,350,867,600 | 40.424242 | 148 | 0.657937 | false | 4.080597 | false | false | false |
flypy/flypy | flypy/support/dynd_support.py | 1 | 2005 | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from dynd import nd, ndt
import ctypes
from .. import types
_from_dynd_typemap = {
'bool' : types.bool_,
'int8' : types.int8,
'int16' : types.int16,
'int32' : types.int32,
'int64' : types.int64,
'uint8' :... | bsd-2-clause | 8,501,636,405,309,472,000 | 27.239437 | 74 | 0.618454 | false | 2.800279 | false | false | false |
akrherz/iem | htdocs/plotting/auto/scripts100/p195.py | 1 | 3838 | """Storm Motion 2D Histogram."""
import datetime
from collections import OrderedDict
from pandas.io.sql import read_sql
from pyiem.util import get_autoplot_context, get_dbconn, convert_value
from pyiem.exceptions import NoDataFound
import seaborn as sns
PDICT = OrderedDict(
(
("TO", "Tornado Warning"),
... | mit | -7,291,450,863,572,834,000 | 28.751938 | 79 | 0.527619 | false | 3.387467 | false | false | false |
Falldog/django-miner | lib/test_base.py | 1 | 1115 | import re
import os
import logging
import sqlparse
from django.db import connections
from django.conf import settings
from django.test import TestCase
logger = logging.getLogger('miner')
class MinerTestCase(TestCase):
def setUp(self):
super(MinerTestCase, self).setUp()
# force set DEBUG to True... | apache-2.0 | 440,580,152,596,752,960 | 28.342105 | 94 | 0.598206 | false | 3.766892 | true | false | false |
jaantollander/Legendre | src_legacy/theory/convergence_rates.py | 4 | 1289 | # coding=utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from sympy import sympify, S, Union, Interval, FiniteSet, oo, Eq
class Convergence:
r"""
Convergence is bounded by $ \epsilon(x) \leq C(x) p^{-\a... | mit | -5,743,022,036,339,501,000 | 25.306122 | 75 | 0.552366 | false | 4.003106 | false | false | false |
vjmac15/Lyilis | lib/youtube_dl/extractor/clippit.py | 38 | 2551 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
parse_iso8601,
qualities,
)
import re
class ClippitIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?clippituser\.tv/c/(?P<id>[a-z]+)'
_TEST = {
'url': 'https://www.clippituse... | gpl-3.0 | 2,083,159,147,622,789,000 | 33.472973 | 84 | 0.486476 | false | 3.762537 | false | false | false |
eunchong/build | scripts/tools/actions_parser.py | 2 | 10078 | #!/usr/bin/env python2.7
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Parses BuildBot `actions.log' and extracts events.
These events can be uploaded as JSON to monitoring endpoints.
"""
import ar... | bsd-3-clause | -4,653,529,615,329,711,000 | 32.042623 | 80 | 0.655586 | false | 3.803019 | false | false | false |
hufsm/tu_gen2_libsigrokdecode | decoders/nunchuk/pd.py | 1 | 7539 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2010-2014 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of t... | gpl-3.0 | 5,291,853,342,012,266,000 | 35.592233 | 80 | 0.515256 | false | 3.130399 | false | false | false |
emitrom/integra-openstack-ui | schedules/workflows/add_schedule.py | 1 | 2484 | import traceback
from horizon import workflows, forms, exceptions
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard.dashboards.integra.schedules import utils
class SetPostDetailsAction(workflows.Action):
name = forms.CharField(
label=_("Name"),
required=True,
... | apache-2.0 | 7,491,783,331,649,499,000 | 27.883721 | 67 | 0.577697 | false | 4.350263 | false | false | false |
fernjager/pyclimb | lib/world.py | 1 | 4910 | #PyClimb - "The Only Way is Up"
#Copyright (C) 2007 wegstar
#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... | gpl-2.0 | 4,595,147,727,205,348,000 | 31.091503 | 120 | 0.650102 | false | 2.7507 | false | false | false |
engdan77/edoAutoHomeMobile | twisted/test/test_failure.py | 6 | 31142 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for the L{twisted.python.failure} module.
"""
from __future__ import division, absolute_import
import re
import sys
import traceback
import pdb
import linecache
from twisted.python.compat import NativeStringIO, _PY3
from twisted.... | mit | 7,169,141,282,513,614,000 | 30.488372 | 80 | 0.601053 | false | 4.427353 | true | false | false |
fkorotkov/pants | src/python/pants/backend/codegen/thrift/python/apache_thrift_py_gen.py | 6 | 1437 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from pant... | apache-2.0 | -8,023,653,252,806,983,000 | 38.916667 | 93 | 0.734864 | false | 3.675192 | false | false | false |
nxvl/tools | printcProfile.py | 1 | 1335 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""Reads the output file generated by the following cProfile call:
python -m cProfile -o OUTPUT_FILE SCRIPT.py
and prints the results in the stdin.
Usage:
python printcProfile -l NUMBER_OF_LINES -s SORT_OPTION OUTPUT_FILE
Nicolas Valcarcel <nvalcarcel@gmail.com>"""
imp... | bsd-3-clause | 8,054,514,430,621,815,000 | 35.081081 | 79 | 0.559551 | false | 4.12037 | false | false | false |
lift-project/lift | scripts/createKernelParametersFromJSON.py | 1 | 5581 | #!/usr/bin/python
import json
import sys
from pprint import pprint
from collections import OrderedDict
if len(sys.argv) <= 2:
print("Usage: python createKernelParametersFromJSON.py <json-file> <output-file>")
sys.exit()
json_file = sys.argv[1]
c_file = sys.argv[2]
# json strings
sizeString = "sizes"
param... | mit | -3,224,226,230,458,651,000 | 34.322785 | 96 | 0.584662 | false | 2.962314 | false | false | false |
rdempsey/pyspark-for-data-processing | scripts/csv_group_by_count_distinct.py | 1 | 1607 | """
Read the CSV file and get a distinct count of records for each value in the
parameter_name field, show the results on the console and save them to a
single csv file.
Expected output:
+--------------------+------+
| parameter_name| count|
+--------------------+------+
| Benzene|469375|
|Chromium ... | mit | -1,649,062,953,408,332,000 | 29.903846 | 83 | 0.637834 | false | 2.916515 | false | false | false |
VAMDC/NodeSoftware | nodes/oacagliari/node/queryfunc.py | 4 | 7666 | # -*- coding: utf-8 -*-
#
# This module (which must have the name queryfunc.py) is responsible
# for converting incoming queries to a database query understood by
# this particular node's database schema.
#
# This module must contain a function setupResults, taking a sql object
# as its only argument.
#
# library im... | gpl-3.0 | 7,097,765,248,909,539,000 | 38.312821 | 192 | 0.62288 | false | 4.062533 | false | false | false |
dbaty/Poulda | poulda/models.py | 2 | 1595 | """This module is only used if the support for the Nginx Upload
Progress module has been disabled. If the support is enabled, we do
not need a database and this module only exports dummy symbols.
"""
try:
from sqlalchemy import create_engine
from sqlalchemy import Column
from sqlalchemy import Integer
... | bsd-3-clause | 2,243,019,675,731,036,700 | 28.537037 | 69 | 0.680251 | false | 4.54416 | false | false | false |
StoneOffStones/plugin.video.xstream | sites/gute-filme_to.py | 2 | 6167 | # -*- coding: utf-8 -*-
from resources.lib.gui.gui import cGui
from resources.lib.gui.guiElement import cGuiElement
from resources.lib.handler.requestHandler import cRequestHandler
from resources.lib.parser import cParser
from resources.lib import logger
from resources.lib.handler.ParameterHandler import ParameterHandl... | gpl-3.0 | -8,398,588,825,649,954,000 | 40.952381 | 139 | 0.632885 | false | 3.151252 | false | false | false |
ParkJinSang/SIMONFramework | src/SIMON_Py/SIMON/utils/SIMONFileStream.py | 1 | 1241 | __author__ = 'PARKJINSANG'
import os
import csv
def TextReadStream(fileName):
fIn = open(fileName, 'r')
text = fIn.read()
fIn.close()
return text
def TextWriteStream(fileName, text):
fOut = open(fileName, 'w')
fOut.write(text)
fOut.close()
def TextAppendStream(fileName, text):
fOut... | apache-2.0 | 6,533,382,829,593,961,000 | 24.854167 | 89 | 0.621273 | false | 3.437673 | false | false | false |
comic/comic-django | app/grandchallenge/challenges/migrations/0008_auto_20180808_1338.py | 1 | 7391 | # Generated by Django 2.0.8 on 2018-08-08 13:38
import django.contrib.postgres.fields.citext
from django.contrib.postgres.operations import CITextExtension
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("challenges", "0007_auto_2... | apache-2.0 | 2,715,372,240,239,411,000 | 32.292793 | 83 | 0.448654 | false | 5.410688 | false | false | false |
charlesbrandt/medley | medley/playlist.py | 1 | 15002 | from __future__ import print_function
from __future__ import absolute_import
from builtins import str
from builtins import next
from builtins import object
import os, codecs, re
from .helpers import save_json, load_json
from .content import Content
class Position(object):
"""
more than just a number of an item... | mit | 6,154,147,099,531,390,000 | 29.064128 | 94 | 0.573657 | false | 4.472868 | false | false | false |
davidhrbac/spacewalk | backend/server/test/unit-test/rhnSQL/test_rhnServerGroup.py | 2 | 2645 | #!/usr/bin/python
#
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should... | gpl-2.0 | -8,160,847,084,125,336,000 | 31.256098 | 84 | 0.660491 | false | 3.643251 | true | false | false |
dshlai/oyprojectmanager | oyProjectManager/utils/create_file_list.py | 3 | 14946 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Erkan Ozgur Yilmaz
#
# This module is part of oyProjectManager and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause
"""
The backup script for the system.
It accepts a ``project`` name and an ``output_path`` whic... | bsd-2-clause | -1,564,389,136,288,308,200 | 34.585714 | 90 | 0.508497 | false | 4.518138 | false | false | false |
Rhaptos/integration-tests | selenium/python/osc_collection.py | 1 | 3761 | import unittest
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
import datetime
class Importing(unittest.TestCase):
'''
This test...
* Creates a collection called "Selenium Test Book" plus the date and time
* Adds module called "Selenium Test Page'
* C... | agpl-3.0 | -3,142,350,410,060,353,500 | 39.010638 | 132 | 0.630949 | false | 3.841675 | true | false | false |
DamCB/tyssue | tyssue/config/dynamics/__init__.py | 2 | 2616 | from ..json_parser import load_spec
import os
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
def quasistatic_bulk_spec():
specfile = os.path.join(CURRENT_DIR, "bulk_qs.json")
return load_spec(specfile)
def quasistatic_plane_spec():
"""Default specification for the dynamics
of a sheet vert... | gpl-3.0 | 979,954,487,579,017,200 | 23.222222 | 70 | 0.469419 | false | 3.549525 | false | false | false |
chipsecintel/chipsec | source/tool/chipsec/modules/tools/vmm/xen/define.py | 1 | 7094 | #CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2016, Intel Corporation
#
#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; Version 2.
#
#This program is distributed in the hope... | gpl-2.0 | 2,725,078,795,863,218,000 | 50.405797 | 137 | 0.44446 | false | 3.729758 | false | false | false |
nagyistoce/phoshare | tilutil/confirmmanager.py | 8 | 2374 | '''Prompt user for confirmations based on file names, and keeps track of
previous choices.
'''
import tilutil.systemutils as su
class ConfirmManager:
'''Class to prompt user for file operation confirmations, and remember the
patterns for future prompts.
'''
def __init__(self):
self.ap... | apache-2.0 | -8,975,955,055,988,235,000 | 34.432836 | 81 | 0.5754 | false | 4.372007 | false | false | false |
wearpants/twiggy | twiggy/formats.py | 1 | 2348 | import copy
from .lib.converter import ConversionTable, Converter
from .lib import iso8601time
#: a default line-oriented converter
line_conversion = ConversionTable([
Converter(key='time',
# ISO 8601 - it sucks less!
convert_value=iso8601time,
convert_item='{1}'.format,
... | bsd-3-clause | -1,649,530,009,164,239,600 | 30.72973 | 95 | 0.618399 | false | 3.926421 | false | false | false |
mainecivichackday/RISE_Survey | rise/apps/surveys/views.py | 1 | 3424 | import json
from datetime import datetime, timedelta
from django.views.generic.edit import CreateView, UpdateView, FormView
from django.views.generic import DetailView, ListView, View, TemplateView
from django.core import serializers
from django.core.urlresolvers import reverse
from django.template.loader import render... | bsd-3-clause | -1,018,100,012,909,534,100 | 32.90099 | 96 | 0.663259 | false | 4.014068 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/virtual_network_peerings_operations.py | 1 | 18470 | # 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 | -8,946,934,927,575,089,000 | 48.918919 | 225 | 0.661668 | false | 4.360246 | true | false | false |
brzegorz/simple-movie-recommender | Main.py | 1 | 2905 | import SetsCreator
import RecommendationTreeCreator
import time
import concurrent
from matplotlib.pyplot import *
from graph_tool.all import *
from MovieRecommender import generateRecommendations, computeMeanAveragePrecision
k = 1
print("Count of iterations before averaging results: " + str(k))
for numberOfAnalysedM... | gpl-3.0 | 8,491,586,774,793,295,000 | 43.015152 | 118 | 0.617556 | false | 3.947011 | false | false | false |
ckelly/pyomniar | pyomniar/auth.py | 1 | 1300 | # Pyomniar
# Copyright 2011 Chris Kelly
# See LICENSE for details.
import urllib
from urllib2 import Request, urlopen
from pyomniar.error import OmniarError
class AuthHandler(object):
def apply_auth(self, url, method, headers, parameters):
"""Apply authentication headers to request"""
raise NotI... | mit | -2,250,263,375,988,365,000 | 27.911111 | 62 | 0.618462 | false | 4.220779 | false | false | false |
viennacl/pyviennacl-dev | pyversions.py | 2 | 1199 | import os
import platform
import sys
def do_help():
print("Requires one argument:")
print(" python -- to get the Python version")
print(" boost -- to get the Boost Python component name")
def main(argv):
if len(argv) < 2:
do_help()
return os.EX_CONFIG
if argv[1] == "python":
... | mit | 3,046,314,163,231,144,400 | 26.883721 | 63 | 0.496247 | false | 3.983389 | false | false | false |
jffm/pyanalyzer | metrics/PercentageOfComments.py | 1 | 2346 | # Copyright (c) 2008-2009 Junior (Frederic) FLEURIAL MONFILS
#
# This file is part of PyAnalyzer.
#
# PyAnalyzer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (a... | gpl-3.0 | -8,422,972,845,179,586,000 | 37.762712 | 91 | 0.654305 | false | 3.808442 | false | false | false |
NSLS-II-SRX/ipython_ophyd | profile_xf05id1/startup/97-maia.py | 1 | 9874 | # from ophyd import Device, Component as Cpt
# from ophyd.signal import Signal
# import bluesky.plans as bp
# import numpy as np
# from bluesky.examples import Mover, NullStatus
# from collections import OrderedDict
# import time as ttime
#
#
#
# class EncoderAxis(Device):
# pos = Cpt(Signal)
#
#
# class Encod... | bsd-2-clause | -5,141,545,209,729,744,000 | 34.646209 | 76 | 0.541827 | false | 2.855408 | true | false | false |
mehmetalianil/Kreveik | example.py | 1 | 1562 |
import os
os.chdir("../../")
import kreveik
import logging
import numpy as num
import shelve
logging.basicConfig(level=logging.INFO)
os.chdir("examples/example1/")
petri = kreveik.classes.Family()
motiflist = []
scores = []
degrees = []
mean_distance = []
allmotifs = kreveik.network.motif.all_conn_motifs(3)
for i i... | apache-2.0 | 6,678,018,124,715,532,000 | 31.541667 | 85 | 0.663892 | false | 3.124 | false | false | false |
CottageLabs/OpenArticleGauge | openarticlegauge/licenses.py | 1 | 42229 | """
A list of licenses based on the http://www.opendefinition.org/ list.
Defines license attributes such as name, url and rights granted.
"""
from collections import OrderedDict
# Not all licenses may have rights / requirements declared, but for those that
# do, this is what the keys mean
license_rights_info = {
'BY'... | bsd-3-clause | 533,479,888,093,535,700 | 27.246823 | 210 | 0.556442 | false | 3.156836 | false | false | false |
skim1420/spinnaker | testing/citest/citest_contrib/dcos_testing/dcoscli_agent.py | 3 | 1793 | # Copyright 2017 Cerner Corporation 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 applicable l... | apache-2.0 | 5,093,942,060,560,118,000 | 36.354167 | 114 | 0.715561 | false | 4.002232 | false | false | false |
blenderskool/kaleidoscope | client.py | 1 | 9903 | #Client System for the Spectrum and Intensity Node
#Used for Saving, Deleting Files by Kaleidoscope
import bpy
import math
try:
import ctypes
except:
pass
import json, os, requests
import urllib.request
from collections import OrderedDict
from . import spectrum, intensity
if "bpy" in locals():
import import... | gpl-3.0 | -1,246,152,790,597,674,500 | 34.117021 | 140 | 0.624356 | false | 3.674583 | false | false | false |
eamonnmag/hepdata3 | hepdata/modules/permissions/api.py | 1 | 7148 | # This file is part of HEPData.
# Copyright (C) 2016 CERN.
#
# HEPData 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.
#
# HEPData is d... | gpl-2.0 | -5,388,299,432,531,876,000 | 36.424084 | 113 | 0.66648 | false | 4.082239 | false | false | false |
jbest/digitization_tools | analyze/categorize.py | 1 | 1699 | import argparse
import glob
import features
import cv2
import pickle
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--images", required = True,
help = "Path to the directory that contains the images representing model categories.")
ap.add_argument("-m", "--models", required = True,
help = "Path to locat... | mit | 7,418,009,640,379,252,000 | 35.934783 | 128 | 0.679812 | false | 3.554393 | false | false | false |
dcarrot2/DjangoSunstreet | botvin_lifeskills/models.py | 1 | 2067 | from django.db import models
from django.utils import timezone
class School(models.Model):
school_code = models.CharField(max_length=15)
count = models.IntegerField(default=0)
def __unicode__(self):
return self.school_code
class Botvin_Section(models.Model):
section_letter = models.CharFiel... | gpl-2.0 | -7,271,643,448,661,801,000 | 28.528571 | 107 | 0.682632 | false | 3.691071 | false | false | false |
eedf/jeito | members/views.py | 1 | 19270 | from collections import Counter, OrderedDict
from datetime import date, timedelta
from django.contrib.auth.mixins import LoginRequiredMixin
from django.conf import settings
from django.db.models import Count, Sum, F, ExpressionWrapper, DecimalField
from django.http import JsonResponse
from django.utils.formats import d... | mit | -6,145,799,249,615,626,000 | 38.71134 | 110 | 0.597144 | false | 3.546308 | false | false | false |
HaraldWeber/client | src/trueSkill/FactorGraphs/Variable.py | 1 | 1889 | #-------------------------------------------------------------------------------
# Copyright (c) 2012 Gael Honorez.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available at
# http://w... | gpl-3.0 | 2,223,677,268,132,954,400 | 25.236111 | 80 | 0.583377 | false | 4.423888 | false | false | false |
MapofLife/MOL | earthengine/google-api-python-client/samples/searchforshopping/histograms.py | 1 | 1822 | #!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Query with ranked results against the shopping search API"""
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main():
"""Get and prin... | bsd-3-clause | 6,474,371,942,521,765,000 | 30.413793 | 78 | 0.692097 | false | 3.544747 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.