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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gaia3D/QGIS | python/plugins/processing/algs/qgis/DeleteHoles.py | 1 | 2935 | # -*- coding: utf-8 -*-
"""
***************************************************************************
DeleteHoles.py
---------------------
Date : April 2015
Copyright : (C) 2015 by Etienne Trimaille
***************************************************************************... | gpl-2.0 | -8,316,699,685,901,509,000 | 35.246914 | 75 | 0.527768 | false | 4.899833 | false | false | false |
lowitty/eeep | insertdb/insertmodeldata.py | 1 | 6340 | #encoding=utf-8
import MySQLdb, os
from django.core.checks.registry import Tags
def insertDomain(db):
cursor = db.cursor()
sql = "insert into %(table)s (%(para)s) values ('%(value)s')"
insertValues = {'table' : 'quotation_domain', 'para' : 'name', 'value' : 'CD'}
f = open(os.path.dirname(os.path.abspa... | mit | -8,395,665,122,548,171,000 | 37.90184 | 218 | 0.519085 | false | 3.506637 | false | false | false |
googleapis/googleapis-gen | google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/services/entity_types/client.py | 1 | 38725 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 7,160,798,180,582,101,000 | 44.345433 | 180 | 0.601704 | false | 4.701918 | false | false | false |
CloudVE/djcloudbridge | djcloudbridge/drf_routers.py | 1 | 1991 | from django.conf.urls import url
from rest_framework import routers, viewsets
from rest_framework_nested import routers as nested_routers
class HybridRoutingMixin(object):
"""
Extends functionality of DefaultRouter adding possibility to register
simple API views, not just Viewsets.
Based on:
htt... | mit | 7,499,356,688,837,228,000 | 29.630769 | 104 | 0.64892 | false | 4.328261 | false | false | false |
Disiok/poetry-seq2seq | model.py | 1 | 22939 | #! /usr/bin/env python
#-*- coding:utf-8 -*-
# standard
import os
from IPython import embed
# framework
import tensorflow as tf
from tensorflow.contrib import seq2seq, rnn
from tensorflow.python.layers.core import Dense
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
class Seq2SeqModel:
"""
Seq2Seq model based on... | mit | -8,786,661,998,776,761,000 | 39.314587 | 128 | 0.594097 | false | 4.148101 | true | false | false |
examachine/pisi | tests/constantstests.py | 1 | 2098 | # Copyright (C) 2005, TUBITAK/UEKAE
#
# 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 later version.
#
# Please read the COPYING file.
... | gpl-3.0 | -8,041,903,705,030,690,000 | 29.852941 | 79 | 0.585796 | false | 4.316872 | true | false | false |
promediacorp/flask-blog | post.py | 1 | 6890 | import datetime
import cgi
from bson.objectid import ObjectId
from helper_functions import *
class Post:
def __init__(self, default_config):
self.collection = default_config['POSTS_COLLECTION']
self.response = {'error': None, 'data': None}
self.debug_mode = default_config['DEBUG']
de... | mit | -2,047,660,337,586,939,400 | 36.650273 | 99 | 0.475907 | false | 4.193548 | false | false | false |
andrewharvey/asgs-stylesheets | configure.py | 1 | 4492 | #!/usr/bin/env python
# Copyright (c) 2011, Development Seed, Inc.
# 2011, Andrew Harvey <andrew.harvey4@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#... | cc0-1.0 | 5,764,988,682,530,616,000 | 42.61165 | 168 | 0.672752 | false | 3.434251 | false | false | false |
locationlabs/confab | confab/options.py | 1 | 4182 | """
Options for managing Confab.
"""
from os import getcwd
from os.path import basename
from fabric.api import env, task
from fabric.utils import _AttributeDict
from difflib import unified_diff
from magic import Magic
from re import match
def _should_render(mime_type):
"""
Return whether a template file of ... | apache-2.0 | -6,501,699,333,116,751,000 | 24.345455 | 96 | 0.646341 | false | 3.836697 | false | false | false |
jpartogi/django-job-board | job_board/urls.py | 1 | 1230 | from django.conf.urls.defaults import *
from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap
from job_board.models import Job
from job_board.feeds import JobFeed
from job_board.forms import JobForm
from job_board.views import JobFormPreview, job_list, job_detail, job_search
feeds = {
'jobs': JobFee... | bsd-3-clause | 4,233,101,760,313,957,000 | 23.137255 | 86 | 0.604065 | false | 3.435754 | false | true | false |
coco-project/coco | coco/core/auth/authentication_backends.py | 1 | 3945 | from coco.contract.errors import AuthenticationError, ConnectionError, \
UserNotFoundError
from coco.core.helpers import get_internal_ldap_connected, get_user_backend_connected
from coco.core.models import BackendGroup, BackendUser, \
CollaborationGroup
from django.contrib.auth.models import User
from django.co... | bsd-3-clause | -1,043,595,838,817,111,200 | 33.008621 | 106 | 0.586565 | false | 4.587209 | false | false | false |
Harmon758/discord.py | discord/client.py | 1 | 48861 | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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 to use, copy, modify, merg... | mit | -2,710,249,609,055,593,000 | 32.238776 | 144 | 0.579951 | false | 4.513301 | false | false | false |
twoodford/audiovisualizer | build-movie.py | 1 | 1391 | import os
import os.path
import subprocess
import sys
from PIL import Image
LISTF = "_list.txt"
def get_dimensions(fpath):
#print(fpath)
return Image.open(fpath).size
def run(folder, outfile, framerate=30, outres=(1920,1080)):
jpglist = [os.path.join(folder, f) for f in os.listdir(folder) if f.startswith(... | apache-2.0 | -3,590,627,063,179,411,500 | 37.638889 | 112 | 0.594536 | false | 2.759921 | false | false | false |
dsweet04/rekall | rekall-lib/rekall_lib/registry.py | 1 | 5206 | # Rekall Memory Forensics
# Copyright (C) 2011
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Michael Cohen <scudette@gmail.com>
#
# ******************************************************
#
# * This program is free software; you can redistribute it and/or
# * modify it under the terms of the GNU General Public... | gpl-2.0 | -1,171,829,265,467,452,700 | 33.939597 | 87 | 0.619478 | false | 4.400676 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/available_providers_list_country.py | 1 | 1381 | # 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 | -3,422,688,781,120,634,400 | 36.324324 | 77 | 0.604634 | false | 4.426282 | false | false | false |
utam0k/c3os | c3os/client.py | 1 | 1344 | import socket
import json
import time
import multiprocessing as mp
from c3os import utils
from c3os import conf
from c3os import db
from c3os.api.type import APITYPE
CONF = conf.CONF
def start():
""" Start client service """
mp.Process(target=client).start()
def client():
""" client main routine """
... | mit | -5,227,906,240,231,535,000 | 23.888889 | 75 | 0.594494 | false | 3.536842 | false | false | false |
plotly/python-api | packages/python/plotly/plotly/figure_factory/_annotated_heatmap.py | 1 | 10195 | from __future__ import absolute_import, division
from plotly import exceptions, optional_imports
import plotly.colors as clrs
from plotly.figure_factory import utils
from plotly.graph_objs import graph_objs
from plotly.validators.heatmap import ColorscaleValidator
# Optional imports, may be None for users that only u... | mit | -5,518,445,393,110,075,000 | 32.316993 | 87 | 0.567043 | false | 3.934774 | false | false | false |
gangadhar-kadam/sapphire_app | accounts/report/budget_variance_report/budget_variance_report.py | 1 | 4626 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import _, msgprint
from webnotes.utils import flt
import time
from accounts.utils import get_fiscal_year
from controllers.trends import ... | agpl-3.0 | 6,781,928,573,172,004,000 | 35.722222 | 93 | 0.68396 | false | 3.119353 | false | false | false |
Hammer2900/SunflowerX | application/tools/find_files.py | 1 | 13799 | import os
import gtk
import user
import pango
import gobject
from threading import Thread, Event
class Column:
ICON = 0
NAME = 1
DIRECTORY = 2
class FindFiles(gobject.GObject):
"""Find files tool"""
__gtype_name__ = 'Sunflower_FindFiles'
__gsignals__ = {
'notify-start': (gobject.SI... | gpl-3.0 | -399,886,151,447,045,440 | 32.250602 | 94 | 0.560838 | false | 4.158831 | false | false | false |
bdang2012/taiga-back-casting | tests/unit/test_timeline.py | 1 | 3510 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2015 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under ... | agpl-3.0 | -5,399,271,881,389,798,000 | 42.296296 | 111 | 0.687482 | false | 3.679958 | true | false | false |
trnewman/VT-USRP-daughterboard-drivers_python | gr-wxgui/src/python/numbersink.py | 1 | 25273 | #!/usr/bin/env python
#
# Copyright 2003,2004,2005,2006,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, ... | gpl-3.0 | 1,420,374,950,807,376,000 | 40.161238 | 158 | 0.585328 | false | 3.38644 | false | false | false |
icebreaker/pyGLox | demo/particlesystem.py | 1 | 1664 | """
Copyright (c) 2011, Mihail Szabolcs
All rights reserved.
See LICENSE for more information.
"""
import random
import math
from pyglet.gl import *
class Particle(object):
def __init__(self):
self.p = [0,0,0]
self.a = 1
self.dx = (random.random() - 0.5)
self.dy = (random.random() - 0.5)
def update(s... | mit | 7,980,364,552,582,119,000 | 21.794521 | 57 | 0.640625 | false | 2.340366 | false | false | false |
andrewsosa/hackfsu_com | api/api/views/hackathon/get/stats.py | 2 | 4468 | """
Get public statistics for current hackathon
"""
from django import forms
from django.http.request import HttpRequest
from hackfsu_com.views.generic import ApiView
from hackfsu_com.util import acl
from api.models import Hackathon, HackerInfo, MentorInfo, JudgeInfo, OrganizerInfo, AttendeeStatus
from django.utils... | apache-2.0 | 7,364,637,496,740,350,000 | 47.043011 | 113 | 0.643912 | false | 3.597424 | false | false | false |
sevein/archivematica | src/dashboard/src/contrib/utils.py | 1 | 2104 | # This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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 ... | agpl-3.0 | 4,646,505,071,088,285,000 | 32.396825 | 123 | 0.681559 | false | 3.710758 | false | false | false |
basak/netkeyscript | netkeyscript-send.py | 1 | 2002 | #!/usr/bin/python
# Copyright 2012 Robie Basak
#
# 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 to use, copy, modify, merge, p... | mit | -4,701,440,638,697,542,000 | 32.932203 | 78 | 0.720779 | false | 3.763158 | false | false | false |
algolia/algoliasearch-django | tests/settings.py | 1 | 2390 | """
Django settings for core project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
import os
BAS... | mit | 176,922,860,896,906,560 | 25.555556 | 70 | 0.667364 | false | 3.556548 | false | false | false |
all-of-us/raw-data-repository | rdr_service/tools/update_release_tracker.py | 1 | 2190 | #!/usr/bin/env python
"""Updates JIRA release notes when deploying to an environment.
This requires the
JIRA_API_USER_PASSWORD and
JIRA_API_USER_NAME
environment variables to be set, and flags for version and instance to be provided.
"""
import logging
import os
import sys
import jira
from rdr_service.main_... | bsd-3-clause | -2,994,243,296,558,638,600 | 36.118644 | 113 | 0.66895 | false | 3.416537 | false | false | false |
AdaptivePELE/AdaptivePELE | AdaptivePELE/analysis/crossValidationClustering.py | 1 | 3872 | from __future__ import absolute_import, division, print_function, unicode_literals
import os
import argparse
import matplotlib.pyplot as plt
import numpy as np
import pyemma.coordinates as coor
import pyemma.msm as msm
from AdaptivePELE.freeEnergies import cluster
plt.switch_backend("pdf")
plt.style.use("ggplot")
def... | mit | -8,509,077,382,591,035,000 | 44.552941 | 102 | 0.612603 | false | 3.396491 | false | false | false |
cloew/KaoJson | kao_json/Test/test_conversion_config.py | 1 | 1361 | from .class_hierarchy import A, AChild, AGrandchild
from ..conversion_config import ConversionConfig
import unittest
class find(unittest.TestCase):
""" Test cases of find """
def test_matchingClassFound(self):
""" Test that a matching class is found properly """
expected = "Dummy Conf... | mit | -7,443,373,079,876,724,000 | 33.05 | 71 | 0.62601 | false | 4.725694 | true | false | false |
agx/git-buildpackage | gbp/deb/rollbackgit.py | 1 | 5051 | # vim: set fileencoding=utf-8 :
#
# (C) 2018 Guido Günther <agx@sigxcpu.org>
"""A git repository for Debian packages that can roll back operations"""
from .. import log
from .. git import GitRepositoryError
from . git import DebianGitRepository
class RollbackError(GitRepositoryError):
"""
Error raised if th... | gpl-2.0 | 3,977,356,638,823,929,300 | 36.671642 | 118 | 0.565571 | false | 4.054618 | false | false | false |
hcrlab/access_teleop | limb_manipulation/src/limb_pbd_server_with_moveit_commander.py | 1 | 43291 | #! /usr/bin/env python
import rospy
import math
from pprint import pprint
import numpy as np
import fetch_api
from std_msgs.msg import String, Header, ColorRGBA, Bool
from std_srvs.srv import Empty
from image_geometry import PinholeCameraModel
import tf
import tf.transformations as tft
# from tf import TransformBroadc... | mit | -8,208,984,794,664,362,000 | 40.827053 | 150 | 0.642281 | false | 3.493182 | false | false | false |
mmktomato/zenmai-bts | test/test_zenmai.py | 1 | 15025 | """Unit test"""
import unittest
import re
import io
from datetime import datetime, timedelta
from flask import request, session
from . import ctx
from .zenmai_test_utils import create_issue, create_comment, create_attached_file, create_user, \
login, logout, delete_all_issues
from web.m... | mit | 1,231,649,006,724,835,000 | 40.969274 | 164 | 0.568053 | false | 3.71998 | true | false | false |
MrBhendel/Cirrus | ModulusList.py | 1 | 1374 | import sys
from abc import ABCMeta, abstractmethod
class ModulusList:
'''
Maintains a list of (host, modulus, e) tuples.
'''
__metaclass__ = ABCMeta
def __init__(self):
self._modulusList = []
def addModulusList(self, other):
for i in range(0, other.length()):
item = other[i]
self.add(item[0], item[... | mit | 1,942,632,575,379,380,700 | 19.818182 | 53 | 0.6754 | false | 2.942184 | false | false | false |
pf4d/dolfin-adjoint | dolfin_adjoint/adjrhs.py | 1 | 10667 | import libadjoint
import backend
import ufl
import ufl.algorithms
import adjglobals
import adjlinalg
import utils
def find_previous_variable(var):
''' Returns the previous instance of the given variable. '''
for timestep in range(var.timestep, -1, -1):
prev_var = libadjoint.Variable(var.name, timestep... | lgpl-3.0 | -4,020,333,220,749,036,500 | 38.507407 | 167 | 0.630355 | false | 3.926021 | false | false | false |
loadimpact/http2-test | fabfile.py | 1 | 11989 | """
We need two special hostnames to connect to:
StationA
and
StationB
"""
from __future__ import with_statement, print_function
from fabric.api import local, settings, abort, run, sudo, cd, hosts, env, execute
from fabric.contrib.console import confirm
from fabric.operations import put, get
from fabric.contri... | bsd-3-clause | -2,658,566,617,386,937,000 | 29.820051 | 131 | 0.63967 | false | 2.970515 | true | false | false |
iceflow/aws-demo | s3/s3-bucket-copy/existing-bucket-copy/solutions/2-different-account-same-region/check_sqs_list.py | 1 | 1564 | #!/usr/bin/python
# -*- coding: utf8 -*-
from pprint import pprint
import sys,os
import random
import json
import gzip
import random
import boto3
s3 = boto3.resource('s3')
client = boto3.client('sqs')
QUEUE_ENDPOINT='https://eu-west-1.queue.amazonaws.com/888250974927/s3-copy-list'
DST_BUCKET='ireland-leo-test'
de... | gpl-3.0 | 2,473,053,559,471,726,000 | 25.066667 | 137 | 0.641944 | false | 3.491071 | false | false | false |
deculler/DataScienceTableDemos | CalGrads/timetable.py | 1 | 7684 | from datascience import Table
import numpy as np
from scipy.interpolate import UnivariateSpline
class TimeTable(Table):
"""Table with a designated column as a sequence of times in the first column."""
def __init__(self, *args, time_column = 'Year'):
Table.__init__(self, *args)
self.time_column... | bsd-2-clause | 1,163,413,192,845,707,000 | 40.989071 | 125 | 0.587585 | false | 3.735537 | false | false | false |
elliotthill/django-oscar | oscar/apps/order/migrations/0019_auto__chg_field_order_billing_address__chg_field_order_user__chg_field.py | 1 | 37418 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing ... | bsd-3-clause | -2,684,955,528,462,074,000 | 90.043796 | 224 | 0.562163 | false | 3.565657 | false | false | false |
danger89/stanford-parser-clientserver | stanford_server.py | 1 | 3076 | #!/usr/bin/env jython
# -*- coding: utf-8 -*-
# Copyright 2014 by Melroy van den Berg
"""
Stanford Parser Server running on localhost
Requirements
------------
- Jython >= 2.7 (http://www.jython.org/downloads.html)
- Pyro4 (https://github.com/irmen/Pyro4)
"""
__author__ = "Melroy van den Berg <melroy@melroy.org>"
_... | apache-2.0 | 5,812,613,648,402,874,000 | 29.156863 | 92 | 0.75065 | false | 3.248152 | false | false | false |
qPCR4vir/orange3 | Orange/tests/test_ada_boost.py | 1 | 3357 | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import unittest
import numpy as np
from Orange.data import Table
from Orange.classification import TreeLearner
from Orange.regression import TreeRegressionLearner
from Orange.ensembles import SklAdaBoostLearner, SklAdaBo... | bsd-2-clause | 61,752,926,166,089,920 | 33.96875 | 77 | 0.657432 | false | 3.443077 | true | false | false |
kernsuite-debian/obit | python/OTWindow.py | 1 | 7357 | """ OTWindow allows running wxPython widgets
Widgets using wxPython must all be created and run in the same thread.
This class creates a wxPython App in a separate thread and allows starting
new widgets in this same thread.
New widgets can be created using the functions
newMsgWin(tw) create message windiow and e... | gpl-2.0 | 7,236,081,742,020,023,000 | 31.991031 | 74 | 0.537447 | false | 4.34554 | false | false | false |
guh/guh-cli | nymea/logs.py | 1 | 20827 | # -*- coding: UTF-8 -*-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (C) 2015 - 2018 Simon Stuerz <simon.stuerz@guh.io> #
# ... | gpl-2.0 | 4,584,651,468,606,077,000 | 31.798425 | 257 | 0.561867 | false | 4.444516 | false | false | false |
pgjones/nusoft | nusoft/credentials.py | 1 | 1609 | #!/usr/bin/env python
#
# Credentials
#
# Collates and stores in memory user credentials needed for downloads
#
# Author P G Jones - 2014-03-23 <p.g.jones@qmul.ac.uk> : New file.
####################################################################################################
import getpass
import logging
logger = l... | mit | -1,743,196,074,267,851,000 | 33.234043 | 100 | 0.567433 | false | 4.623563 | false | false | false |
IuryAlves/code-challenge | app/load_data.py | 1 | 1329 | #!/usr/bin/env python
# coding: utf-8
from __future__ import (
print_function,
unicode_literals,
absolute_import
)
import argparse
import json
import os
def get_path():
return unicode(os.path.abspath('.'))
def parse_args():
_parser = argparse.ArgumentParser()
_parser.add_argument('--fixtur... | mit | -2,716,428,965,792,732,700 | 25.6 | 103 | 0.576373 | false | 4.076687 | false | false | false |
LMSlay/wiper | modules/radare.py | 1 | 2920 | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/botherder/viper
# See the file 'LICENSE' for copying permission.
import os
import sys
import getopt
from viper.common.out import *
from viper.common.abstracts import Module
from viper.core.session import __sessions__
ext = ".bin"
run_radare =... | bsd-3-clause | 5,533,463,339,960,898,000 | 28.795918 | 91 | 0.510616 | false | 3.738796 | false | false | false |
ghetzel/webfriend | webfriend/rpc/base.py | 1 | 2491 | """
Implementation of the Chrome Remote DevTools debugging protocol.
See: https://chromedevtools.github.io/devtools-protocol
"""
from __future__ import absolute_import
from webfriend.rpc.event import Event
from uuid import uuid4
from collections import OrderedDict
import logging
class Base(object):
supports_even... | bsd-2-clause | -6,752,092,870,117,730,000 | 27.306818 | 96 | 0.579285 | false | 4.562271 | false | false | false |
lgarren/spack | lib/spack/spack/test/spec_syntax.py | 1 | 20244 | ##############################################################################
# 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 | -8,615,010,693,867,667,000 | 35.475676 | 79 | 0.528453 | false | 3.331797 | true | false | false |
kennydo/rename-archive-extension | Nautilus/rename_archive.py | 1 | 8817 | from gi.repository import Nautilus, GObject, Gtk
import functools
import os
import os.path
import urllib
import urlparse
import zipfile
try:
import rarfile
except ImportError:
rarfile = None
if rarfile:
# The default separator is '\\', which is different from what zipfile uses
rarfile.PATH_SEP = '/'
... | mit | -8,911,151,886,611,844,000 | 32.524715 | 101 | 0.58047 | false | 4.26354 | false | false | false |
YangWanjun/areaparking | utils/constants.py | 1 | 11566 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
SYSTEM_NAME = "エリアパーキング"
END_DATE = '9999-12-31'
DATABASE_DEFAULT = "default"
DATABASE_REVOLUTION = "fk5dtsql"
MIME_TYPE_EXCEL = 'application/excel'
MIME_TYPE_PDF = 'application/pdf'
MIME_TYPE_ZIP = 'application/zip'
MIME_TYPE_HTML = 'text/html'
CONFI... | apache-2.0 | 438,389,379,480,348,300 | 24.060519 | 97 | 0.542778 | false | 1.639517 | true | true | false |
lig/picket_classic | apps/picket/__init__.py | 1 | 1783 | """
Copyright 2008 Serge Matveenko
This file is part of Picket.
Picket 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 later version.
Picket is distribut... | gpl-3.0 | -7,424,519,642,878,921,000 | 28.716667 | 68 | 0.748738 | false | 3.737945 | false | false | false |
bchareyre/trial | examples/test/periodic-triax.py | 1 | 1557 | # coding: utf-8
# 2009 © Václav Šmilauer <eudoxos@arcig.cz>
"Test and demonstrate use of PeriTriaxController."
from yade import *
from yade import pack,qt
O.periodic=True
O.cell.hSize=Matrix3(0.1, 0, 0,
0 ,0.1, 0,
0, 0, 0.1)
sp=pack.SpherePack()
radius=5e-3
num=sp.makeCloud(Vector3().Zero,O.cell.re... | gpl-2.0 | 248,881,559,573,020,220 | 30.653061 | 188 | 0.710509 | false | 2.367939 | false | false | false |
KangHsi/youtube-8m | model_utils.py | 1 | 4302 | # Copyright 2016 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 ... | apache-2.0 | 4,521,161,258,369,963,000 | 34.85 | 80 | 0.682938 | false | 3.408875 | false | false | false |
andhit-r/opnsynid-accounting-report | opnsynid_asset_account/models/res_company.py | 1 | 1348 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2015 Andhitia Rama. All rights reserved.
# @author Andhitia Rama
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 | 5,641,121,555,060,802,000 | 36.444444 | 78 | 0.602374 | false | 4.279365 | false | false | false |
peterwilletts24/Python-Scripts | plot_scripts/Rain/Diurnal/sea_diurnal_rain_plot_domain_constrain_bit_above western_ghats.py | 1 | 10333 | """
Load npy xy, plot and save
"""
import os, sys
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcPa... | mit | 4,530,510,237,832,121,300 | 30.123494 | 195 | 0.594987 | false | 3.037331 | false | false | false |
dcalacci/Interactive_estimation | game/round/models.py | 1 | 2767 | from decimal import Decimal
from django.db import models
from django.conf import settings
from django.utils import timezone
# Create your models here.
from game.contrib.calculate import calculate_score
from game.control.models import Control
class Plot(models.Model):
plot = models.URLField()
answer = models... | mit | -4,080,133,973,543,304,000 | 36.391892 | 108 | 0.644742 | false | 3.859135 | false | false | false |
pdl30/pychiptools | pychiptools/utilities/alignment.py | 1 | 3065 | #!/usr/bin/python
########################################################################
# 20 Oct 2014
# Patrick Lombard, Centre for Stem Stem Research
# Core Bioinformatics Group
# University of Cambridge
# All right reserved.
########################################################################
import argparse... | gpl-2.0 | 3,248,898,922,289,293,000 | 34.639535 | 185 | 0.596411 | false | 2.702822 | false | false | false |
shawncaojob/LC | PY/140_word_break_ii.py | 1 | 4564 | # 140. Word Break II QuestionEditorial Solution My Submissions
# Total Accepted: 68516
# Total Submissions: 321390
# Difficulty: Hard
# Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
#
# Return all such possible sentences.
#
# For... | gpl-3.0 | 5,375,061,984,906,493,000 | 29.837838 | 163 | 0.510517 | false | 3.44713 | false | false | false |
abhigd/bigboy | app/views/link.py | 1 | 17235 | import time, uuid, json, calendar
from app import app
from app.lib import upload, auth, files
from app.lib import distribution, link
from app.lib import geo
from app.forms import *
from flask import request, redirect
from flask import session, render_template
from flask import make_response, abort
from flask import ... | apache-2.0 | 907,547,245,753,685,200 | 34.68323 | 92 | 0.59942 | false | 3.552876 | false | false | false |
david-mateo/marabunta | marabunta/models/PerimeterDefenseRobot.py | 1 | 7197 | from marabunta import BaseRobot
from math import *
class PerimeterDefenseRobot(BaseRobot):
"""Robot model for perimeter defense.
By iteratively calling the update() method,
this robot will communicate with the rest
of the swarm and move away from the others
as far as possible. Takes a *threshold*
... | gpl-3.0 | -524,198,928,009,362,900 | 35.348485 | 94 | 0.539669 | false | 4.066102 | false | false | false |
demisto/content | Packs/PANOSPolicyOptimizer/Integrations/PANOSPolicyOptimizer/PANOSPolicyOptimizer.py | 1 | 18763 | import hashlib
from CommonServerPython import *
class Client:
"""
Client to use in the APN-OS Policy Optimizer integration.
"""
def __init__(self, url: str, username: str, password: str, vsys: str, device_group: str, verify: bool, tid: int):
# The TID is used to track individual commands sen... | mit | -3,208,916,145,890,129,000 | 41.450226 | 122 | 0.557054 | false | 4.183501 | false | false | false |
PyBossa/pybossa | test/factories/taskrun_factory.py | 1 | 1933 | # -*- coding: utf8 -*-
# This file is part of PYBOSSA.
#
# Copyright (C) 2015 Scifabric LTD.
#
# PYBOSSA 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 op... | agpl-3.0 | 9,141,680,664,959,028,000 | 32.327586 | 77 | 0.713399 | false | 3.508167 | false | false | false |
SurveyMan/SMPy | example_survey.py | 1 | 1248 | from survey.objects import *
import json
"""
This module provides an example of how to construct a questionnaire in Python.
Questionnaires can be saved by calling jsonize and dumping their contents.
Jsonized surveys can be reused, manipulated, and sent via RPC to another service.
"""
q1 = Question("What is your age?"... | apache-2.0 | -5,831,616,676,094,554,000 | 30.2 | 90 | 0.591346 | false | 3.447514 | false | false | false |
FEniCS/ufl | ufl/finiteelement/mixedelement.py | 1 | 19622 | # -*- coding: utf-8 -*-
"This module defines the UFL finite element classes."
# Copyright (C) 2008-2016 Martin Sandve Alnæs
#
# This file is part of UFL (https://www.fenicsproject.org)
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# Modified by Kristian B. Oelgaard
# Modified by Marie E. Rognes 2010, 2012
# Modi... | lgpl-3.0 | -8,729,777,980,419,253,000 | 39.539256 | 103 | 0.588859 | false | 4.32848 | false | false | false |
oudalab/phyllo | phyllo/extractors/johannesDB.py | 1 | 2507 | import sqlite3
import urllib
import re
from urllib.request import urlopen
from bs4 import BeautifulSoup, NavigableString
import nltk
nltk.download('punkt')
from nltk import sent_tokenize
def parseRes2(soup, title, url, cur, author, date, collectiontitle):
chapter = 0
sen = ""
num = 1
[e.extract() fo... | apache-2.0 | -3,149,571,058,116,537,300 | 31.986842 | 103 | 0.55724 | false | 3.643895 | false | false | false |
sketchyfish/ypp-price-calculator | strip_automation.py | 1 | 5368 | #!/usr/bin/python
"""
This code uses .strip formatting once to remove the \n and another time to remove the \t from the below lists.
For readability, the script uses a print("\n") to add a new line between the two lists
"""
island_list = ['Armstrong Island', 'Atchafalaya Island', 'Immokalee Island', 'Moultrie Island'... | gpl-2.0 | -3,883,570,465,021,505,500 | 91.551724 | 162 | 0.607116 | false | 2.689379 | false | false | false |
aangert/PiParty | color_tests/color_combo_test.py | 2 | 1075 | from enum import Enum
class Colors(Enum):
Pink = (255,96,96)
Magenta = (255,0,192)
Orange = (255,64,0)
Yellow = (255,255,0)
Green = (0,255,0)
Turquoise = (0,255,255)
Blue = (0,0,255)
Purple = (96,0,255)
color_list = [x for x in Colors]
quad_teams_banned = {
Colors.Pink : [Colors.M... | mit | -6,680,612,122,141,936,000 | 28.054054 | 111 | 0.606512 | false | 2.596618 | false | false | false |
DrYerzinia/Cat-Finder | src/KittyTracker/kittyTracker.py | 1 | 1581 | from netaddr import *
from datetime import datetime
import blescan
import time
import sys
import bluetooth._bluetooth as bluez
from Kitty import Kitty
from CheckKittys import CheckKittys
from BLESerialScanner import BLESerialScanner
import SendMail
import config
def process(mac, rssi):
found = False
for k in confi... | unlicense | -1,341,239,824,988,486,700 | 19.532468 | 96 | 0.688805 | false | 2.744792 | false | false | false |
anaran/olympia | apps/bandwagon/tasks.py | 1 | 4144 | import logging
import math
from django.core.files.storage import default_storage as storage
from django.db.models import Count
import elasticutils.contrib.django as elasticutils
from celeryutils import task
import amo
from amo.decorators import set_modified_on
from amo.helpers import user_media_path
from amo.utils i... | bsd-3-clause | 8,352,693,703,532,291,000 | 33.247934 | 79 | 0.625 | false | 3.566265 | false | false | false |
FATSLiM/fatslim | docs/sphinx-src/documentation/tutorials/show_apl_map.py | 1 | 1525 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import griddata
CSV_FILENAME = "bilayer_prot_apl_frame_00000.csv"
GRO_FILENAME = "bilayer_prot.gro"
PNG_FILENAME = "bilayer_prot_apl_frame_00000.png"
# Get Box vectors
last_line = ""
with open(GRO_F... | gpl-3.0 | 6,198,686,079,688,072,000 | 22.828125 | 72 | 0.61377 | false | 2.938343 | false | false | false |
andree182/podx3 | getrawaudio.py | 1 | 1079 | #!/usr/bin/env python
"""
Reads audio data from the device through isochronous transfer.
NOTE: Due to alignment or whatever, the data is not correct. Data size of
the input endpoint is 170B, but the the actual data size is 6 * (3*2*4),
the rest bytes are filled with zero.
"""
import usb.util
import time
ID_VENDOR = ... | gpl-2.0 | -2,545,959,085,404,143,600 | 20.58 | 88 | 0.624652 | false | 2.824607 | false | false | false |
CPedrini/TateTRES | erapi.py | 1 | 11009 | #-*- encoding: utf-8 -*-
import csv, math, time, re, threading, sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
class ErAPI():
# Metodo constructor, seteos basicos necesarios de configuracion, instancia objetos utiles
def __init__(self):
self.data = ... | apache-2.0 | -1,751,381,920,954,348,000 | 36.962069 | 195 | 0.511446 | false | 3.602094 | false | false | false |
heromod/migrid | mig/reST/html_writer.py | 1 | 1966 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# html_writer - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms ... | gpl-2.0 | 4,386,083,187,276,027,400 | 23.575 | 101 | 0.677009 | false | 3.561594 | false | false | false |
davhenriksen/bringhomethebacon | web/web.py | 1 | 27835 | #!/usr/bin/env python
# web.py
# bring home the bacon Copyright (C) 2012 David Ormbakken Henriksen (davidohenriksen@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, eit... | gpl-3.0 | -5,249,010,472,040,336,000 | 36.870748 | 188 | 0.496102 | false | 4.065284 | false | false | false |
elidaian/sudoku | src/server/users.py | 1 | 3651 | """
users.py
Created on: Aug 17 2013
Author: eli
"""
class UserPermission(object):
"""
Describes a permission for an operation for an user.
"""
PERMISSIONS = []
_curr_permission_bit = 1
def __init__(self, name, description, is_default):
"""
Construct a permissio... | gpl-3.0 | 2,345,246,301,992,049,000 | 27.748031 | 83 | 0.576828 | false | 4.518564 | false | false | false |
tedlaz/pyted | misthodosia/m13/f_fmy_old.py | 1 | 1057 | # -*- coding: utf-8 -*-
'''
Created on 18 Νοε 2012
@author: tedlaz
'''
from PyQt4 import QtGui, QtCore
from gui import ui_fmy
from utils.fmy_etoys import makeFMYFile
class dlg(QtGui.QDialog):
def __init__(self, args=None, parent=None):
super(dlg, self).__init__(parent)
sel... | gpl-3.0 | 1,785,956,018,139,974,700 | 24.769231 | 92 | 0.56334 | false | 3.297468 | false | false | false |
schoolie/bokeh | bokeh/models/plots.py | 1 | 20026 | ''' Models for representing top-level plot objects.
'''
from __future__ import absolute_import
from six import string_types
from ..core.enums import Location
from ..core.properties import Auto, Bool, Dict, Either, Enum, Include, Instance, Int, List, Override, String
from ..core.property_mixins import LineProps, Fill... | bsd-3-clause | -4,859,454,633,804,849,000 | 31.0416 | 109 | 0.624688 | false | 4.270847 | false | false | false |
expertanalytics/fagkveld | worldmap/src/worldmap/model/location.py | 1 | 1192 |
from typing import Dict, List, Tuple, Set, Optional
from abc import abstractmethod
import numpy
class Location:
name: str = ""
long_name: str = ""
border_x: List[numpy.ndarray]
border_hull_x: List[numpy.ndarray]
border_y: List[numpy.ndarray] = []
border_hull_y: List[numpy.ndarray] = []
... | bsd-2-clause | -622,663,362,204,864,100 | 21.923077 | 57 | 0.557886 | false | 3.64526 | false | false | false |
dhp-denero/LibrERP | dt_product_brand/product_brand.py | 1 | 3987 | # -*- encoding: utf-8 -*-
#################################################################################
# #
# product_brand for OpenERP #
# Copyright (C) 2009 NetAndCo (<http://www.ne... | agpl-3.0 | 8,626,166,335,862,885,000 | 47.609756 | 136 | 0.493979 | false | 4.438753 | false | false | false |
jithinbp/pslab-desktop-apps | psl_res/GUI/D_PHYSICS/B_physics/B_SpeedOfSound.py | 1 | 3745 | #!/usr/bin/python
"""
::
This experiment is used to study non-inverting amplifiers
"""
from __future__ import print_function
from PSL_Apps.utilitiesClass import utilitiesClass
from PSL_Apps.templates import ui_template_graph_nofft
import numpy as np
from PyQt4 import QtGui,QtCore
import pyqtgraph as pg
impor... | gpl-3.0 | 8,507,347,280,602,509,000 | 26.335766 | 123 | 0.695861 | false | 2.631764 | false | false | false |
massimovassalli/SingleCellForceSpectroscopy | sifork/qt/qtView.py | 1 | 7581 | from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
import os as os
import sys
import pyqtgraph as pg
import numpy as np
import Ui_qtView as qtView_face
from sifork import experiment
pg.setConfigOption('background', 'w')
pg.setConfigOption(... | mit | 3,310,249,543,625,385,500 | 38.284974 | 471 | 0.611661 | false | 3.367837 | false | false | false |
vacancy/TensorArtist | examples/generative-model/desc_vae_mnist_mlp_bernoulli_adam.py | 1 | 4242 | # -*- coding:utf8 -*-
# File : desc_vae_mnist_mlp_bernoulli_adam.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 3/17/17
#
# This file is part of TensorArtist.
from tartist.core import get_env, get_logger
from tartist.core.utils.naming import get_dump_directory, get_data_directory
from tartist.... | mit | 2,794,771,510,245,185,000 | 33.487805 | 114 | 0.537247 | false | 3.479902 | false | false | false |
CLVsol/clvsol_odoo_addons | clv_person_aux/models/address_aux.py | 1 | 3795 | # -*- coding: utf-8 -*-
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class AddressAux(models.Model):
_inherit = 'clv.address_aux'
perso... | agpl-3.0 | -649,032,661,184,708,100 | 34.138889 | 117 | 0.594203 | false | 3.418919 | false | false | false |
mzdu/2048gae | src/main.py | 1 | 1335 | import webapp2
import jinja2
import os
import logging
jinja_environment = jinja2.Environment(loader = jinja2.FileSystemLoader(os.path.dirname(__file__) + '/templates'))
def doRender(handler, tname = 'index.html', values = {}):
temp = jinja_environment.get_template(tname)
handler.response.out.wr... | mit | 6,896,633,148,561,898,000 | 35.083333 | 114 | 0.495131 | false | 4.405941 | false | false | false |
tylerlaberge/Jasper | jasper/steps.py | 1 | 1413 | """
The steps module.
"""
from functools import wraps
import asyncio
class Step(object):
"""
The Step class is used as a wrapper around functions for testing behaviours.
"""
def __init__(self, function, **kwargs):
"""
Initialize a new Step object.
:param function: The functio... | mit | 7,253,816,304,372,000,000 | 24.232143 | 86 | 0.587403 | false | 4.587662 | false | false | false |
tsl143/addons-server | src/olympia/users/cron.py | 1 | 1443 | from django.db import connections
import multidb
from celery import group
import olympia.core.logger
from olympia.amo import VALID_ADDON_STATUSES
from olympia.amo.utils import chunked
from .tasks import update_user_ratings_task
task_log = olympia.core.logger.getLogger('z.task')
def update_user_ratings():
"""... | bsd-3-clause | 5,285,070,275,735,279,000 | 30.369565 | 79 | 0.615385 | false | 3.879032 | false | false | false |
IncidentNormal/TestApps | ALE/Platform_nodes_Draft3b.py | 1 | 7673 | from SimPy.Simulation import *
import visual as v
import math
from random import seed, uniform, randint
class Global():
NUMNODES = 4
NUMCHANNELS = 1
Node_L_List = []
Node_A_List = []
Node_S_List = []
ChannelList = [] #stores
NodeSendQueueList = [] #stores
maxTime = 10
class Mon():
... | gpl-2.0 | -7,459,447,548,906,195,000 | 47.563291 | 176 | 0.524567 | false | 3.828842 | false | false | false |
thinkingmachines/deeplearningworkshop | codelab_5_simple_cnn.py | 1 | 1964 | # SIMPLE MNIST CNN
# Source: https://www.tensorflow.org/tutorials/layers
def cnn_model_fn(features, labels, mode):
"""Model function for CNN."""
# Input Layer
input_layer = tf.reshape(features, [-1, 28, 28, 1])
# Convolutional Layer #1
conv1 = tf.layers.conv2d(
inputs=input_layer,
filters=32,
... | mit | 78,197,066,181,890,620 | 29.215385 | 79 | 0.653768 | false | 3.177994 | false | false | false |
Penaz91/Glitch_Heaven | Game/loadSaves.py | 1 | 2299 | # Load Game Menu Component
# Part of the Glitch_Heaven project
# Copyright 2015-2016 Penaz <penazarea@altervista.org>
from components.UI.loadmenu import loadMenu
from os import listdir
from os.path import join as pjoin
from os import remove
from game import Game
from components.UI.textMenuItem import textMenuItem
from ... | mit | 7,232,331,274,901,255,000 | 37.983051 | 97 | 0.545455 | false | 4.387405 | false | false | false |
djrrb/OldGlory | oldGlory.py | 1 | 7067 | """
OLD GLORY
By David Jonathan Ross <http://www.djr.com>
This drawbot script will draw the American Flag.
It's also responsive! I made this to experiment with Drawbot Variables.
For the most part, it follows the rules here:
http://en.wikipedia.org/wiki/Flag_of_the_United_States#Specifications
It does... | mit | 6,339,230,936,733,769,000 | 27.963115 | 113 | 0.600538 | false | 3.669263 | false | false | false |
SU-ECE-17-7/hotspotter | hscom/fileio.py | 1 | 12148 | from __future__ import division, print_function
import __common__
(print, print_, print_on, print_off,
rrr, profile) = __common__.init(__name__, '[io]')
# Python
import os
import fnmatch
import pickle
import cPickle
from os.path import normpath, exists, realpath, join, expanduser, dirname
import datetime
import time
#... | apache-2.0 | -9,184,094,975,685,221,000 | 26.862385 | 88 | 0.583388 | false | 3.320033 | false | false | false |
Ghost-script/TaskMan | wsgi/taskman/taskman/views.py | 1 | 4067 | from django.shortcuts import render, HttpResponse, redirect
from forms import LoginForm, RegistrationForm
from django.contrib.auth import login, logout, authenticate
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from taskManager.forms import TaskCreate,MultipleSel... | gpl-2.0 | 6,536,155,798,609,383,000 | 34.365217 | 78 | 0.522252 | false | 4.81872 | false | false | false |
erikrose/sphinx-js | sphinx_js/typedoc.py | 1 | 13554 | """Converter from typedoc output to jsdoc doclet format"""
import os
import sys
import json
from six import iteritems
# JSDoc entries used in sphinx-js:
# - optional access of [ public, private, protected ]
# - optional classdesc
# - optional comment (controls doclet inclusion)
# - optional description
# - optional ... | mit | 7,926,526,332,986,313,000 | 36.545706 | 86 | 0.539324 | false | 4.09734 | false | false | false |
openstack/networking-bgpvpn | bgpvpn_dashboard/test/admin/test_views.py | 1 | 3209 | # Copyright (c) 2017 Orange.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | apache-2.0 | 7,976,155,279,535,758,000 | 38.617284 | 77 | 0.648177 | false | 3.417465 | true | false | false |
lpfann/fri | fri/model/lupi_ordinal_regression.py | 1 | 12804 | from itertools import product
import cvxpy as cvx
import numpy as np
from sklearn.metrics import make_scorer
from sklearn.utils import check_X_y
from fri.model.base_lupi import (
LUPI_Relevance_CVXProblem,
split_dataset,
is_lupi_feature,
)
from fri.model.ordinal_regression import (
OrdinalRegression_R... | mit | 1,933,810,736,430,988,500 | 32.257143 | 130 | 0.559513 | false | 3.538972 | false | false | false |
bapakode/OmMongo | examples/advanced_modeling.py | 1 | 1048 | '''
This page is going to go through some more advanced modeling techniques
using forward and self-references
'''
from ommongo.document import Document
from ommongo.fields import *
from datetime import datetime
from pprint import pprint
class Event(Document):
name = StringField()
children = ListField(Docume... | mit | 491,704,710,223,334,700 | 25.2 | 72 | 0.611641 | false | 4.142292 | false | false | false |
mrachinskiy/jewelcraft | ops_gem/gem_select_ops.py | 1 | 6067 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# JewelCraft jewelry design toolkit for Blender.
# Copyright (C) 2015-2021 Mikhail Rachinskiy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eith... | gpl-3.0 | 5,417,416,596,498,840,000 | 31.100529 | 100 | 0.577056 | false | 3.881638 | false | false | false |
vprime/puuuu | env/lib/python2.7/site-packages/paramiko/client.py | 1 | 21100 | # Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License, or (a... | mit | -2,178,805,618,934,213,600 | 39.655106 | 139 | 0.603839 | false | 4.386694 | false | false | false |
BlackHole/enigma2-obh10 | lib/python/Screens/EpgSelection.py | 2 | 4137 | from __future__ import print_function
from Screens.InfoBar import InfoBar
from enigma import eServiceReference
from Components.ActionMap import HelpableActionMap
from Screens.EpgSelectionChannel import EPGSelectionChannel
from Screens.EpgSelectionBase import EPGServiceZap
from Screens.TimerEntry import addTimerFromEven... | gpl-2.0 | -7,913,178,780,223,782,000 | 31.320313 | 183 | 0.751511 | false | 3.379902 | false | false | false |
cpatrickalves/simprev | util/carrega_parametros.py | 1 | 1280 | # -*- coding: utf-8 -*-
"""
@author: Patrick Alves
"""
# Arquivo com os parâmetros de projeção
arquivo_parametros = "parametros.txt"
def obter_parametros():
# Dicionário que armazena os parâmetros
parametros = {}
with open(arquivo_parametros, 'r' ,encoding='utf-8') as arquivo:
for linha in ar... | gpl-3.0 | 8,191,328,923,808,139,000 | 34.166667 | 84 | 0.528063 | false | 3.418919 | false | false | false |
viktorTarasov/PyKMIP | kmip/tests/unit/core/messages/contents/test_protocol_version.py | 1 | 9321 | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | apache-2.0 | -7,470,747,633,934,984,000 | 33.522222 | 79 | 0.62622 | false | 3.801387 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.