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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mercycorps/tola-activity | htdocs/activitydb/migrations/0037_auto_20151028_1631.py | 1 | 1470 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('activitydb', '0036_auto_20151028_1519'),
]
operations = [
migrations.AlterField(
model_name='siteprofile',
... | gpl-2.0 | -7,011,314,465,358,522,000 | 35.75 | 168 | 0.6 | false | 3.972973 | false | false | false |
srajag/contrail-controller | src/config/device-manager/device_manager/db.py | 1 | 14129 | #
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
"""
This file contains implementation of data model for physical router
configuration manager
"""
from vnc_api.common.exceptions import NoIdError
from physical_router_config import PhysicalRouterConfig
from sandesh.dm_introspect import ttypes as sand... | apache-2.0 | -7,415,153,349,394,149,000 | 33.972772 | 84 | 0.544978 | false | 3.946648 | true | false | false |
globocom/database-as-a-service | dbaas/drivers/tests/test_driver_pymongo.py | 1 | 9370 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
from mock import patch, MagicMock
from drivers import DriverFactory
from physical.tests import factory as factory_physical
from logical.tests import factory as factory_logical
from logical.models import Database
from drivers.mon... | bsd-3-clause | -8,187,081,293,294,255,000 | 36.48 | 79 | 0.649733 | false | 4.056277 | true | false | false |
Dzess/ALFIRT | alfirt.runner/src/readers/tests/TagReaderX3DUnitTests.py | 1 | 4002 | '''
Created on Jun 9, 2011
@author: Piotr
'''
import unittest
import os
from readers.TagReaderX3D import TagReaderX3D
class TagReaderX3DUnitTests(unittest.TestCase):
def setUp(self):
# Setting up the X3D string with ALFIRT namespace tags
x3dString = """<?xml version="1.0" encoding="UTF-8"?>
<!... | mit | 5,748,462,383,747,537,000 | 32.07438 | 155 | 0.615942 | false | 3.417592 | true | false | false |
Russell-IO/ansible | lib/ansible/plugins/action/gather_facts.py | 1 | 1434 | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from collections import MutableMapping
from ansible import constants as C
from ansible.plugins.acti... | gpl-3.0 | -5,338,959,078,966,732,000 | 33.97561 | 148 | 0.640167 | false | 3.875676 | false | false | false |
SCPR/firetracker | calfire_tracker/utilities.py | 1 | 3930 | from django.conf import settings
from django.db import models
from django.utils.encoding import smart_str
from django.utils import timezone
from django.template.defaultfilters import slugify
from geopy import geocoders
import pytz
import time
import datetime
import requests
import logging
logger = logging.getLogger("f... | gpl-2.0 | -4,657,212,522,448,050,000 | 48.125 | 236 | 0.622901 | false | 3.575978 | false | false | false |
tinyms/ArchiveX | tinyms/controller/setting.py | 1 | 3046 | __author__ = 'tinyms'
#coding=UTF8
from sqlalchemy import func
from tinyms.core.common import Utils
from tinyms.core.web import IAuthRequest
from tinyms.core.entity import Account
from tinyms.core.orm import SessionFactory
from tinyms.core.annotation import ObjectPool, route, setting, api
from tinyms.core.setting imp... | bsd-3-clause | -2,948,846,204,067,711,000 | 30.925532 | 108 | 0.576 | false | 3.516999 | false | false | false |
jcnix/shade | social/auth.py | 1 | 2295 | from django.contrib import auth
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, render_to_response
from django.template import RequestContext
import forms as myforms
def login(request):
if not request.user.is_authenticated(... | gpl-3.0 | -197,508,900,974,582,820 | 37.898305 | 85 | 0.554684 | false | 4.862288 | false | false | false |
pierrelux/mathnotes | mathnotes/views/auth.py | 1 | 1936 | from flask_oauthlib.client import OAuth
from mathnotes.models import db, ZoteroAuthorization
from flask import Flask, redirect, url_for, render_template, jsonify, Response, current_app, Blueprint, request
from flask.ext.login import login_required, current_user
oauth = OAuth()
auth = Blueprint('auth', __name__, url_p... | bsd-3-clause | 237,288,060,501,950,180 | 32.964912 | 111 | 0.668388 | false | 3.482014 | false | false | false |
malaterre/dicom-private-dicts | re/pms/dump1.py | 1 | 3032 | #!/usr/bin/env python
""" dump 1 """
import sys, json
from struct import *
array=[]
def doit(f):
chunk = f.read(0x2)
l0 = unpack('>H', chunk)
assert l0[0] == 50
chunk = f.read(l0[0])
s = unpack('>%ds' % l0[0], chunk)
chunk = f.read(0x1)
l2 = unpack('>B', chunk)
#assert l2[0] == 0
... | bsd-3-clause | -5,247,748,825,108,255,000 | 26.315315 | 77 | 0.581464 | false | 2.539363 | false | false | false |
parksandwildlife/wastd | taxonomy/migrations/0003_auto_20181022_1156.py | 1 | 3205 | # Generated by Django 2.0.8 on 2018-10-22 03:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('taxonomy', '0002_auto_20180926_1147'),
]
operations = [
migrations.AlterField(
model_name='hbvfamily',
name='class_n... | mit | 3,855,156,913,284,721,700 | 40.089744 | 132 | 0.582527 | false | 3.991283 | false | false | false |
jamespcole/home-assistant | homeassistant/components/openuv/binary_sensor.py | 1 | 3751 | """Support for OpenUV binary sensors."""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.util.dt import as_local, parse_datetime, utcnow
from . import (... | apache-2.0 | 5,144,571,123,839,647,000 | 32.491071 | 72 | 0.625966 | false | 3.952582 | false | false | false |
gokmen/Rasta | rasta_lib/model.py | 1 | 1631 | #!/usr/bin/python
# -*- coding: utf-8 -*-
''' Rasta RST Editor
2010 - Gökmen Göksel <gokmeng:gmail.com> '''
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as Published by the Free
# Software Foundation; either version 2 of the License,... | gpl-2.0 | 9,176,064,816,522,145,000 | 32.9375 | 79 | 0.654389 | false | 4.022222 | false | false | false |
mdavoodi/konkourse-python | messages/views.py | 1 | 2496 | # Create your views here.
from django.http import HttpResponse
from django.template import loader
from django.template.context import Context
from django.template import RequestContext
from django.shortcuts import redirect
from django.shortcuts import render
from conversation.models import ConvoWall, ConversationPost
... | mit | -7,466,661,102,449,948,000 | 37.4 | 92 | 0.648638 | false | 4.441281 | false | false | false |
jelly/calibre | src/calibre/gui2/tweak_book/ui.py | 1 | 39312 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
import os
from functools import partial
from itertools import product
from f... | gpl-3.0 | 1,148,555,098,009,233,500 | 49.142857 | 159 | 0.604777 | false | 3.720965 | false | false | false |
andrewlewis/camera-id | test_characteristic.py | 1 | 1197 | #!/usr/bin/env python
from make_characteristic import get_noise_from_file
import cPickle
import glob
import numpy
import sys
from PIL import Image, ImageOps
TILE_OVERLAP = 8
if len(sys.argv) != 3:
print "Usage:\n\t%s noise_file_name path_with_png_files" % (sys.argv[0],)
sys.exit(0)
noise_file_name = sys.argv[... | mit | 6,780,480,121,013,508,000 | 29.692308 | 76 | 0.675856 | false | 3.133508 | false | false | false |
unt-libraries/django-nomination | nomination/migrations/0004_auto_20190927_1904.py | 1 | 7862 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-09-27 19:04
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('nomination', '0003_project_archive_url'),
]
opera... | bsd-3-clause | 2,851,599,570,489,149,000 | 43.670455 | 343 | 0.598067 | false | 4.627428 | false | false | false |
medunigraz/outpost | src/outpost/django/kages/api.py | 1 | 1284 | import logging
import ldap
from rest_framework import (
exceptions,
permissions,
viewsets,
)
from rest_framework.response import Response
from . import models
from .conf import settings
logger = logging.getLogger(__name__)
class TranslateViewSet(viewsets.ViewSet):
permission_classes = (
per... | bsd-2-clause | -7,632,317,316,049,999,000 | 26.319149 | 65 | 0.576324 | false | 4.196078 | false | false | false |
jscn/django | django/contrib/contenttypes/models.py | 1 | 7319 | from __future__ import unicode_literals
from django.apps import apps
from django.db import models
from django.db.utils import IntegrityError, OperationalError, ProgrammingError
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
class Cont... | bsd-3-clause | 8,636,261,011,933,846,000 | 37.119792 | 105 | 0.585872 | false | 4.179897 | false | false | false |
Acidburn0zzz/archiso-gui | releng/root-image/usr/share/cnchi/src/misc.py | 1 | 28903 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2012 Canonical Ltd.
# Copyright (c) 2013 Antergos
#
# 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, o... | gpl-3.0 | -3,050,432,571,631,182,000 | 30.484749 | 79 | 0.558593 | false | 3.836342 | false | false | false |
mosbasik/fluidspaces | src/fluidspaces/i3_commands.py | 1 | 1215 | import subprocess
class i3Commands(object):
@staticmethod
def send_to_wp(i3_name):
'''Send the currently focused window/container to the named workspace'''
subprocess.Popen(['i3-msg', 'move container to workspace', i3_name], stdout=subprocess.PIPE)
@staticmethod
def go_to_wp(i3_name)... | mit | -4,274,740,972,160,197,000 | 32.75 | 100 | 0.604938 | false | 3.441926 | false | false | false |
gigglearrows/anniesbot | pajbot/models/timer.py | 1 | 6625 | import json
import logging
from pajbot.models.db import DBManager, Base
from pajbot.models.action import ActionParser
from pajbot.tbutil import find
from sqlalchemy import orm
from sqlalchemy import Column, Integer, String, Boolean
from sqlalchemy.dialects.mysql import TEXT
log = logging.getLogger('pajbot')
class ... | mit | -3,706,695,500,516,823,600 | 38.201183 | 135 | 0.616453 | false | 3.892479 | false | false | false |
white-lab/pyproteome | brainrnaseq/__init__.py | 1 | 2373 |
from . import cache, mapping, enrichments
CELL_TYPE_COLS = {
'Homo sapiens': {
'Astrocyte': [
'8yo',
'13yo', '16yo', '21yo.1', '22yo.1', '35yo', '47yo', '51yo', '53yo',
'60yo', '63yo - 1', '63yo - 2',
],
'Neuron': [
'25yo',
],
... | bsd-2-clause | 7,507,329,908,707,769,000 | 21.6 | 79 | 0.435735 | false | 2.926017 | false | false | false |
synthesio/infra-ovh-ansible-module | plugins/modules/dedicated_server_install.py | 1 | 2843 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.module_utils.basic import AnsibleModule
DOCUMENTATION = '''
---
module: dedicated_server_install
short_description: Install a new dedicated server
description:
- Install ... | mit | 5,904,091,304,778,387,000 | 27.148515 | 143 | 0.646148 | false | 3.841892 | false | false | false |
certik/sfepy | tests/test_parsing.py | 1 | 3180 | from sfepy.base.testing import TestCommon
##
# 16.07.2007, c
class Test( TestCommon ):
##
# 16.07.2007, c
def from_conf( conf, options ):
return Test( conf = conf, options = options )
from_conf = staticmethod( from_conf )
##
# c: 16.07.2007, r: 08.07.2008
def test_parse_equations(... | bsd-3-clause | -26,389,724,490,425,080 | 33.193548 | 80 | 0.416981 | false | 3.336831 | true | false | false |
waidyanatha/pingsam | visualize.py | 1 | 8668 | import numpy as np
import datetime as dtm
from dateutil import rrule
import pandas as pd
import csv
import matplotlib.pylab as plt
import sys, os
#lets first create the csv file
#
#change this to actual csv file name
pingfile="weeklylogs.csv"
#paramters @plotinterval = 10 minutes
plotinterval = 10
#csv file columns
col... | mit | -8,745,131,300,681,286,000 | 48.531429 | 121 | 0.639132 | false | 3.552459 | false | false | false |
pbauman/libmesh | doc/statistics/libmesh_pagehits.py | 1 | 10542 | #!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
# Import stuff for working with dates
from datetime import datetime
from matplotlib.dates import date2num
# Hits/month, pages, and gigabytes served.
# To get the Google analytics data:
# .) Go to analytics.google.com.
# .) There should be (as o... | lgpl-2.1 | -5,319,884,989,136,103,000 | 36.119718 | 131 | 0.525232 | false | 2.376465 | false | false | false |
not-na/peng3d | peng3d/gui/layout.py | 1 | 8877 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# layout.py
#
# Copyright 2020 notna <notna@apparat.org>
#
# This file is part of peng3d.
#
# peng3d 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, ei... | gpl-2.0 | -6,435,422,355,169,676,000 | 30.038462 | 198 | 0.600315 | false | 3.806604 | false | false | false |
andrewgiessel/folium | folium/utilities.py | 1 | 19979 | # -*- coding: utf-8 -*-
"""
Utilities
-------
Utility module for Folium helper functions.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import time
import math
import zlib
import struct
import json
import base64
from jinja2 import Environment, Packa... | mit | -2,512,162,047,460,299,000 | 34.740608 | 101 | 0.516743 | false | 3.55056 | false | false | false |
FDelporte/PiGameConsole | Main.py | 1 | 5104 | '''
Created on 22/09/2017
@author: Frank Delporte
'''
import thread
import Tkinter as tk
import tkFont
import time
from ButtonHandler import *
from KeyReader import *
from PongGui import *
from SlideShow import *
from ConsoleMenu import *
from Legend import *
try:
import keyboard # pip install keyboard
... | apache-2.0 | 330,923,120,042,564,540 | 30.121951 | 116 | 0.508817 | false | 4.054011 | false | false | false |
xiiicyw/Data-Wrangling-with-MongoDB | Lesson_4_Problem_Set/03-Updating_Schema/update.py | 1 | 3482 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
In this problem set you work with another type of infobox data, audit it, clean it,
come up with a data model, insert it into a MongoDB and then run some queries against your database.
The set contains data about Arachnid class.
The data is already in the database. Bu... | agpl-3.0 | -41,363,206,728,056,340 | 32.815534 | 108 | 0.63297 | false | 3.903587 | false | false | false |
yunhaowang/IDP-APA | utilities/py_idpapa_assign_sr.py | 1 | 7753 | #!/usr/bin/env python
import sys,re,time,argparse
from multiprocessing import cpu_count,Pool
def main(args):
# print >>sys.stdout, "Start analysis: " + time.strftime("%a,%d %b %Y %H:%M:%S")
output_gpd = args.output
iso_list = get_iso_info(args.isoform)
p = Pool(processes=args.cpu)
csize = 100
results = p.imap(fun... | apache-2.0 | -6,389,944,135,169,664,000 | 43.815029 | 293 | 0.659229 | false | 2.449605 | false | false | false |
CybOXProject/python-cybox | cybox/objects/win_prefetch_object.py | 1 | 2182 | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
from mixbox import entities
from mixbox import fields
import cybox.bindings.win_prefetch_object as win_prefetch_binding
from cybox.objects.device_object import Device
from cybox.objects.win_volume_object import Win... | bsd-3-clause | -1,243,254,732,700,253,700 | 40.961538 | 97 | 0.762603 | false | 3.673401 | false | false | false |
Hannimal/raspicar | ps3Controller/ps3joy.py | 1 | 1520 | #!/usr/bin/env python
# coding: Latin-1
import sys
import smbus
import time
bus = smbus.SMBus(1)
address = 0x2a
try:
pipe = open('/dev/input/js0', 'r')
print('/dev/input/js0 Available')
except:
print('/dev/input/js0 not Available')
sys.exit(0)
msg = []
position = [0,0,0,0]
def StringToBytes(val):
... | unlicense | 6,163,764,360,669,899,000 | 23.126984 | 59 | 0.483553 | false | 3.478261 | false | false | false |
shouldmakemusic/yaas | controller/RedFrameController.py | 1 | 3038 | # Copyright (C) 2015 Manuel Hirschauer (manuel@hirschauer.net)
#
# 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; either
# version 2.1 of the License, or (at your option) any later version... | gpl-2.0 | -3,350,587,529,291,833,000 | 38.973684 | 108 | 0.634628 | false | 4.077852 | false | false | false |
3dfxsoftware/cbss-addons | report_profit/wizard/wiz_trial_cost.py | 1 | 3732 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
# Credits#######################################... | gpl-2.0 | 1,987,104,676,452,728,800 | 40.010989 | 79 | 0.55761 | false | 3.949206 | false | false | false |
gannetson/sportschooldeopenlucht | apps/fund/migrations/0002_add_recurring_direct_debit_payment.py | 1 | 17485 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'RecurringDirectDebitPayment'
db.create_table(u'fund_recurringdirectdebitpayment', (
... | bsd-3-clause | 2,081,662,664,729,660,000 | 83.883495 | 196 | 0.561796 | false | 3.66178 | false | false | false |
khosrow/metpx | sundew/lib/MasterConfigurator.py | 1 | 10676 | """
MetPX Copyright (C) 2004-2007 Environment Canada
MetPX comes with ABSOLUTELY NO WARRANTY; For details type see the file
named COPYING in the root of the source directory tree.
"""
"""
#############################################################################################
# Name: MasterConfigurator.py
#
# Au... | gpl-2.0 | -6,967,763,091,637,412,000 | 35.941176 | 133 | 0.569314 | false | 3.757832 | false | false | false |
saicoco/mxnet_image_caption | old/main.py | 1 | 6142 | # -*- conding=utf-8 -*-
"""
train module
"""
import mxnet as mx
import numpy as np
import json
import config
import logging
import time
import collections
from sym import vgg16_fc7, caption_module
from data_provider import caption_dataIter, init_cnn
from mxnet.model import save_checkpoint
import argparse
logging.basic... | mit | -3,475,309,289,568,188,000 | 38.371795 | 126 | 0.588733 | false | 3.625738 | false | false | false |
gghezzo/prettypython | PythonEveryDay2015/bigballs.py | 1 | 1044 | # Teaching Python Classes by Peter Farrell
# From http://hackingmathclass.blogspot.com/2015/08/finally-some-class.html
# Typer: Ginny C Ghezzo
# What I learned:
# why doesn't the first import bring in locals ??
import pygame
from pygame.locals import *
black = (0,0,0)
white = (255,255,255)
green = (0,255, 0) ... | mit | 98,853,344,471,153,950 | 24.487805 | 75 | 0.681992 | false | 2.704663 | false | false | false |
panholt/sparkpy | sparkpy/models/webhook.py | 1 | 2523 | # -*- coding: utf-8 -*-
from .base import SparkBase, SparkProperty
from .time import SparkTime
class SparkWebhook(SparkBase):
''' Cisco Spark Webhook Model
:param session: SparkSession object
:type session: `SparkSession`
:param \**kwargs: All standard Spark API properties for a Webhook... | mit | 2,799,580,334,978,640,400 | 41.05 | 79 | 0.479191 | false | 4.769376 | false | false | false |
chris48s/UK-Polling-Stations | polling_stations/apps/feedback/migrations/0001_initial.py | 1 | 1210 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Feedback',
fields=[
... | bsd-3-clause | 8,918,969,895,613,432,000 | 38.032258 | 124 | 0.567769 | false | 4.368231 | false | false | false |
Abjad/abjad | abjad/obgc.py | 1 | 30314 | import typing
from . import _iterate, mutate, typings
from .attach import attach, detach
from .bundle import LilyPondFormatBundle
from .duration import Duration
from .overrides import LilyPondLiteral, tweak
from .parentage import Parentage
from .pitch.sets import PitchSet
from .score import Chord, Container, Note, Voi... | gpl-3.0 | 6,486,861,756,668,666,000 | 33.565564 | 84 | 0.377911 | false | 4.506318 | false | false | false |
UB-info/estructura-datos | RafaelArqueroGimeno_S6/ABB_Rafael_Arquero_Gimeno.py | 1 | 8132 | import copy
__author__ = "Rafael Arquero Gimeno"
class Node(object):
def __init__(self):
self.data = []
self.left = None
self.right = None
def clear(self):
"""Empty Node"""
self.data = []
self.left = None
self.right = None
def clearData(self):
... | mit | -3,202,886,532,054,247,400 | 30.280769 | 119 | 0.539843 | false | 4.568539 | false | false | false |
msaadat/paper | password_dlg.py | 1 | 2143 |
from PyQt5.QtWidgets import (QApplication, QMessageBox, QDialog, QGridLayout,
QHBoxLayout, QLabel, QPushButton, QLineEdit)
class PasswordDialog(QDialog):
def __init__(self, parent=None):
super(PasswordDialog, self).__init__(parent)
self.password = None
... | gpl-3.0 | -6,078,596,863,458,804,000 | 29.057971 | 77 | 0.569295 | false | 4.145068 | false | false | false |
ircah/cah-js | util/convert-csv.py | 1 | 1612 | #!/usr/bin/env python3
import re
import json # turns out the dump function of the json5 module just calls the normal json module (╯°□°)╯︵ ┻━┻
INPUT = "cards-DevOpsAgainstHumanity.csv"
META_NAME = "DevOps Against Humanity"
DELIM = ","
QUOTE = "\""
SKIPLINES = 2
def parse_csv(line):
a = []
tmp = ""
at_elem_start =... | mit | 5,042,605,997,194,050,000 | 19.410256 | 108 | 0.600503 | false | 2.479751 | false | false | false |
miguelgrinberg/python-socketio | tests/common/test_pubsub_manager.py | 1 | 13274 | import functools
import logging
import unittest
from unittest import mock
import pytest
from socketio import base_manager
from socketio import pubsub_manager
class TestPubSubManager(unittest.TestCase):
def setUp(self):
id = 0
def generate_id():
nonlocal id
id += 1
... | mit | 408,921,371,623,106,050 | 33.035897 | 79 | 0.469715 | false | 4.027306 | true | false | false |
rschnapka/account-closing | account_cutoff_prepaid/account.py | 1 | 6258 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Account Cut-off Prepaid module for OpenERP
# Copyright (C) 2013 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can... | agpl-3.0 | 7,632,116,702,459,464,000 | 40.72 | 78 | 0.541067 | false | 4.147117 | false | false | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/hybrid_parallel_mp_clip_grad.py | 1 | 1391 | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | -7,350,561,299,220,626,000 | 33.775 | 74 | 0.698059 | false | 4.079179 | false | false | false |
zsiciarz/django-pgallery | pgallery/admin.py | 1 | 2105 | """
Administration for photos and galleries.
"""
from django.contrib import admin
from django.db.models import Count
from django.utils.translation import ugettext_lazy as _
from .forms import PhotoForm
from .models import Gallery, Photo
class PhotoInline(admin.TabularInline):
"""
Administration for photos.
... | mit | 6,763,024,374,916,542,000 | 25.3125 | 76 | 0.614252 | false | 4.095331 | false | false | false |
dgketchum/satellite_image | sat_image/image.py | 1 | 27285 | # =============================================================================================
# Copyright 2017 dgketchum
#
# 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.apach... | apache-2.0 | -1,773,811,191,002,346,000 | 34.419481 | 109 | 0.541011 | false | 3.510942 | false | false | false |
gchq/gaffer-tools | python-shell/src/example.py | 1 | 26676 | #
# Copyright 2016-2019 Crown Copyright
#
# 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 i... | apache-2.0 | -6,482,966,961,602,001,000 | 26.700935 | 252 | 0.458315 | false | 4.535963 | false | false | false |
menegazzo/travispy | setup.py | 2 | 1873 | from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def ... | gpl-3.0 | -5,545,387,666,978,756,000 | 29.704918 | 75 | 0.608649 | false | 3.893971 | true | false | false |
tulikavijay/vms | vms/administrator/tests/test_report.py | 1 | 16008 | # third party
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
# Django
from django.contrib.staticfiles.testing import LiveServerTestCase
from django.db import IntegrityError
# local Django
from pom.locators.administratorReportPageLocators import *
from pom.pages.administra... | gpl-2.0 | 6,484,563,254,342,688,000 | 37.760291 | 97 | 0.446777 | false | 3.889213 | true | false | false |
uclouvain/osis_louvain | base/models/offer.py | 1 | 2121 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 137,301,873,159,780,320 | 38.259259 | 91 | 0.649528 | false | 4.007561 | false | false | false |
django-oscar/django-oscar-mws | oscar_mws/migrations/0002_auto__add_field_fulfillmentorderline_shipment__add_field_fulfillmentor.py | 1 | 34713 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'FulfillmentOrderLine.shipment'
db.add_column('oscar_mws_fulfillmentorderline', 'shipment',
... | bsd-3-clause | -6,517,976,486,046,583,000 | 85.568579 | 222 | 0.563046 | false | 3.627273 | false | false | false |
BrAwnyTime/RayTracer | Textures/makeScaledTex.py | 1 | 1585 | import numpy as np
import time
import tables
import sys
'''---------------------------------------------------------'''
''' Setup PyTables Files '''
'''---------------------------------------------------------'''
scale = 2
originalName = "earthScaled8"
scaledName = "earthScaled16"
... | mit | 3,638,641,487,451,038,000 | 27.818182 | 110 | 0.557098 | false | 3.274793 | false | false | false |
pattarapol-iamngamsup/projecteuler_python | problem_011.py | 1 | 6237 | """ Copyright 2012, July 31
Written by Pattarapol (Cheer) Iamngamsup
E-mail: IAM.PATTARAPOL@GMAIL.COM
Largest product in a grid
Problem 11
In the 20 X 20 grid below, four numbers
along a diagonal line have been marked in red.
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 ... | gpl-3.0 | 6,276,150,481,619,951,000 | 40.141892 | 79 | 0.575758 | false | 3.03356 | true | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_available_delegations_operations.py | 1 | 5366 | # 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 may ... | mit | 7,378,669,600,206,450,000 | 44.863248 | 148 | 0.641446 | false | 4.590248 | true | false | false |
ThomasMcVay/MediaApp | MediaAppKnobs/KnobElements/FloatWidget.py | 1 | 1798 | #===============================================================================
# @Author: Madison Aster
# @ModuleDescription:
# @License:
# MediaApp Library - Python Package framework for developing robust Media
# Applications with Qt Library
# Copyright (C) 2013 Madison Aster
# ... | lgpl-2.1 | 156,117,284,344,290,800 | 41.902439 | 88 | 0.619577 | false | 4.374696 | false | false | false |
ARM-software/astc-encoder | Test/astc_quality_test.py | 1 | 3498 | #!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------------
# Copyright 2021 Arm Limited
#
# 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 ... | apache-2.0 | -8,849,309,807,774,193,000 | 27.209677 | 98 | 0.540309 | false | 3.85667 | false | false | false |
tensorflow/models | official/vision/image_classification/optimizer_factory.py | 1 | 6894 | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 6,286,244,039,494,606,000 | 36.879121 | 80 | 0.687554 | false | 3.7631 | false | false | false |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/config/cs/cspolicylabel_cspolicy_binding.py | 1 | 9664 | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 3,208,087,756,175,860,700 | 28.735385 | 132 | 0.714714 | false | 3.505259 | false | false | false |
gfetterman/bark | bark/tools/barkutils.py | 1 | 12062 | import os.path
from glob import glob
import bark
import argparse
from bark import stream
import arrow
from dateutil import tz
import numpy
import sys
import subprocess
def meta_attr():
p = argparse.ArgumentParser(
description="Create/Modify a metadata attribute")
p.add_argument("name", help="name of b... | gpl-2.0 | -8,583,137,634,202,377,000 | 36.113846 | 82 | 0.570718 | false | 3.852443 | false | false | false |
taosheng/jarvis | chatbot/src/socialEnBrain.py | 1 | 2090 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import json
import requests
import re
import random
import time
import sys
import csv
from genericKB import genericHandler
from esHealth import esHealthHandler
from wikiFinder import findWikiEn
#from io import open
import codecs
#from pttChat import pttHandler
#from wik... | apache-2.0 | -2,871,116,191,798,822,400 | 26.142857 | 74 | 0.571292 | false | 3.591065 | false | false | false |
jas14/khmer | scripts/extract-paired-reads.py | 1 | 3488 | #! /usr/bin/env python
#
# This script is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2015. It is licensed under
# the three-clause BSD license; see LICENSE.
# Contact: khmer-project@idyll.org
#
# pylint: disable=invalid-name,missing-docstring
"""
Split up pa... | bsd-3-clause | -76,326,370,296,495,920 | 31.296296 | 79 | 0.653956 | false | 3.544715 | false | false | false |
CondensedOtters/PHYSIX_Utils | Projects/Moog_2016-2019/CO2/CO2_NN/analysis.py | 1 | 9175 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 14 05:54:11 2020
@author: mathieumoog
"""
import cpmd
import filexyz
import numpy as np
import matplotlib.pyplot as plt
# MSMbuilder ( lacks CK validation )
from msmbuilder.msm import MarkovStateModel
from msmbuilder.msm import BayesianMarkovStateM... | gpl-3.0 | -8,227,085,920,944,906,000 | 35.7 | 153 | 0.637275 | false | 2.506146 | false | false | false |
Ecogenomics/CheckM | checkm/plot/distributionPlots.py | 1 | 2841 | ###############################################################################
#
# codingDensityPlots.py - Create a GC histogram and a delta-CD plot.
#
###############################################################################
# #
#... | gpl-3.0 | 5,811,296,671,881,534,000 | 48.732143 | 101 | 0.529743 | false | 4.397833 | false | false | false |
dotmpe/htcache | Protocol.py | 1 | 18422 | """
The Protocol object relays the client request, accumulates the server response
data, and combines it with the cached. From there the Response object
reads this to the client.
"""
import calendar, os, time, socket, re
import Params, Runtime, Response, Resource, Rules
import HTTP
#from util import *
import log
ma... | gpl-3.0 | -626,849,070,475,962,400 | 26.827795 | 87 | 0.660026 | false | 3.096134 | false | false | false |
TakashiMatsuda/sag_svm | scaling.py | 1 | 1287 | #!/Users/takashi/.pyenv/shims/python
import numpy as np
import math
def scaling(data):
"""
Scaling. Make x's average to 0, variance to 1
=> CHANGED. Divide by normal deviation
"""
print("input:")
print(data)
scaled_data = np.zeros_like(data)
"""
average section
"""... | mit | -6,234,009,568,127,102,000 | 22.4 | 77 | 0.554002 | false | 3.177778 | false | false | false |
andyneff/voxel-globe | voxel_globe/build_voxel_world/tasks.py | 1 | 6207 | from voxel_globe.common_tasks import shared_task, VipTask
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
import logging
import os
@shared_task(base=VipTask, bind=True)
def run_build_voxel_model(self, image_collection_id, scene_id, bbox,
skip_frames, cleanup... | mit | 2,948,493,370,364,752,000 | 38.535032 | 83 | 0.544546 | false | 3.401096 | false | false | false |
sunlightlabs/tcamp | tcamp/reg/forms.py | 1 | 1825 | from django import forms
from localflavor.us.us_states import STATE_CHOICES
from bootstrap_toolkit.widgets import BootstrapTextInput
import datetime
from reg.models import Sale, Ticket, AMBASSADOR_PROGRAM_CHOICES
class SaleForm(forms.ModelForm):
class Meta:
model = Sale
class TicketForm(forms.ModelForm):... | bsd-3-clause | 5,021,559,516,469,790,000 | 48.351351 | 222 | 0.673973 | false | 3.430451 | false | false | false |
ewheeler/vaxtrack | vaxapp/migrations/0018_auto__add_field_countrystockstats_days_of_stock_data.py | 1 | 12586 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'CountryStockStats.days_of_stock_data'
db.add_column('vaxapp_countrystockstats', 'days_of_s... | bsd-3-clause | -6,147,009,584,548,764,000 | 78.658228 | 228 | 0.546719 | false | 3.49514 | false | false | false |
georgekis/salary | main/control/pay.py | 1 | 2523 | from flask.ext import wtf
import auth
import flask
import model
import wtforms
import util
from main import app
###############################################################################
# Create
###############################################################################
class PayUpdateForm(wtf.Form):
nam... | mit | 1,797,666,842,330,151,400 | 30.148148 | 92 | 0.537852 | false | 3.776946 | false | false | false |
goujonpa/jeankevin | modules/numberCoupleClass.py | 1 | 2707 | #!/usr/local/bin/python
# -*-coding:Utf-8 -*
from modules.individualClass import Individual
import random
class NumberCouple(Individual):
"""NumberCouple class: represent one couple of real individual, inherits from the Individual class
Properties:
key : standardized representation of the problem [[x1, ... | mit | -5,521,277,182,482,253,000 | 30.847059 | 102 | 0.574437 | false | 3.57124 | false | false | false |
makerhanoi/tagio | tagio/views/api/__init__.py | 1 | 1249 | """API."""
from flask import Blueprint, jsonify, request
from tagio.models.user import User
from tagio.extensions import csrf_protect
from . import user
__all__ = ('user',)
blueprint = Blueprint('api',
__name__,
url_prefix='/api/v<string:version>')
@blueprint.route('/l... | bsd-3-clause | 8,983,722,349,411,378,000 | 23.98 | 63 | 0.610088 | false | 3.878882 | false | false | false |
kushankr/approval_frame | approval_frame/urls.py | 1 | 1127 | from django.conf.urls import include, patterns, url
from django.contrib import admin
from approval_frame import views
from views import CustomRegistrationView
# autodiscover is required only for older versions of Django
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^approval_polls/', include('approv... | gpl-3.0 | -25,690,787,189,746,730 | 48 | 100 | 0.723159 | false | 3.872852 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/lib/arraysetops.py | 1 | 12374 | """
Set operations for 1D numeric arrays based on sorting.
:Contains:
ediff1d,
unique,
intersect1d,
setxor1d,
in1d,
union1d,
setdiff1d
:Notes:
For floating point arrays, inaccurate results may appear due to usual round-off
and floating point comparison issues.
Speed could be gained in... | gpl-3.0 | 5,377,771,176,711,761,000 | 26.843823 | 79 | 0.552772 | false | 3.717032 | false | false | false |
seed2014/kraken | kraken-panel/panel/models.py | 1 | 2573 | from django.db import models
from django.utils import timezone
from datetime import timedelta
# Create your models here.
class Bot(models.Model):
computer_name = models.CharField(max_length=100)
system = models.CharField(max_length=100)
node = models.CharField(max_length=100)
release = models.CharField(max_len... | gpl-2.0 | 5,171,206,282,541,833,000 | 31.175 | 231 | 0.710455 | false | 3.172626 | false | false | false |
ForestClaw/forestclaw | applications/geoclaw/tohoku/make_plots.py | 1 | 11633 |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
#--------------------------
def setplot(plotdata):
#--------------------------
"""
Specify what is to be plotted ... | bsd-2-clause | -9,101,027,784,213,857,000 | 32.621387 | 81 | 0.600963 | false | 3.181893 | false | false | false |
better-dem/box_classify | specify_rect.py | 1 | 2299 | #!/usr/local/bin/python3.6
import tkinter as tk
from tkinter import messagebox as mb
from PIL import Image, ImageTk
class SelectRegionApp(tk.Tk):
def __init__(self, image_filename, image_resize, result):
tk.Tk.__init__(self)
self.result_dict = result
self.x = self.y = 0
im = Image.o... | gpl-3.0 | -4,937,644,953,297,175,000 | 32.808824 | 122 | 0.618965 | false | 3.499239 | false | false | false |
Vykstorm/Othello | bots.py | 1 | 3184 | #!/usr/bin/python
# -*- coding: iso8859-1 -*-
# Autor: Víctor Ruiz Gómez
# Descripción: Este script define distintos bots que son jugadores del
# juego Othello.
from game2 import Player
from random import choice
from minmax import MinMax, MinMaxAlphaBeta
from othello import OthelloEval, OthelloEvalDiffPiezas, OthelloE... | mit | -6,708,081,805,361,755,000 | 28.915094 | 85 | 0.712709 | false | 2.776708 | false | false | false |
NetApp/manila | manila/tests/api/views/test_share_networks.py | 1 | 8974 | # Copyright (c) 2015 Mirantis, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | -7,470,150,884,323,348,000 | 40.546296 | 78 | 0.551036 | false | 3.823605 | true | false | false |
googleapis/googleapis-gen | google/cloud/osconfig/agentendpoint/v1/osconfig-agentendpoint-v1-py/scripts/fixup_agentendpoint_v1_keywords.py | 1 | 6593 | #! /usr/bin/env python3
# -*- 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 requi... | apache-2.0 | -4,318,478,684,794,081,000 | 35.425414 | 181 | 0.62263 | false | 3.878235 | false | false | false |
SmartDeveloperHub/sdh-curator | sdh/curator/actions/ext/enrichment.py | 1 | 10998 | """
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
This file is part of the Smart Developer Hub Project:
http://www.smartdeveloperhub.org
Center for Open Middleware
http://www.centeropenmiddleware.com/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=... | apache-2.0 | 7,141,783,065,942,430,000 | 37.725352 | 114 | 0.601655 | false | 3.715541 | false | false | false |
Ziqi-Li/bknqgis | bokeh/bokeh/plotting/helpers.py | 1 | 24268 | from __future__ import absolute_import
from collections import Iterable, OrderedDict, Sequence
import difflib
import itertools
import re
import textwrap
import warnings
import numpy as np
import sys
from six import string_types, reraise
from ..models import (
BoxSelectTool, BoxZoomTool, CategoricalAxis,
TapT... | gpl-2.0 | -7,109,149,979,966,638,000 | 35.438438 | 145 | 0.618963 | false | 3.794246 | false | false | false |
asajeffrey/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py | 4 | 24283 | from __future__ import absolute_import
import json
import os
import socket
import threading
import time
import traceback
import uuid
from six.moves.urllib.parse import urljoin
from .base import (CallbackHandler,
CrashtestExecutor,
RefTestExecutor,
RefTestImpleme... | mpl-2.0 | 4,533,225,023,122,860,000 | 38.873563 | 140 | 0.59692 | false | 4.585159 | true | false | false |
google/makani | config/m600/control/hover_controllers.py | 1 | 15735 | # Copyright 2020 Makani Technologies 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 agreed to... | apache-2.0 | -702,106,154,424,924,200 | 19.250965 | 74 | 0.398411 | false | 2.654352 | false | false | false |
codeforamerica/typeseam | typeseam/form_filler/front.py | 1 | 3914 | from datetime import datetime, timezone
from pytz import timezone as ptimezone
import re
import json
import requests
class Front:
def __init__(self, token):
self.headers = {
'Authorization': 'Bearer {}'.format(token),
'Accept': 'application/json'
}
self.event_types... | bsd-3-clause | 1,931,358,864,134,680,600 | 26.180556 | 72 | 0.569239 | false | 3.620722 | false | false | false |
pgodel/rdiff-backup | rdiff_backup/Globals.py | 1 | 11031 | # Copyright 2002 Ben Escoto
#
# This file is part of rdiff-backup.
#
# rdiff-backup is free software; you can redistribute it and/or modify
# 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.
#
# rd... | gpl-2.0 | -367,777,364,650,201,340 | 32.941538 | 79 | 0.741728 | false | 3.60962 | false | false | false |
jtoppins/beaker | Client/src/bkr/client/commands/cmd_user_modify.py | 1 | 2506 |
# 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.
"""
bkr user-modify: Modify Beaker users
=============================... | gpl-2.0 | 2,265,340,603,310,640,000 | 24.06 | 85 | 0.638867 | false | 3.921753 | false | false | false |
lanhel/viperaccept | setup.py | 1 | 1637 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#----------------------------------------------------------------------------
"""HTTP content negotiation application."""
__author__ = ('Lance Finn Helsten',)
__version__ = '0.0'
__copyright__ = """Copyright (C) 2014 Lance Finn Helsten"""
__license__ = """
Licensed und... | apache-2.0 | -5,658,288,544,415,330,000 | 31.098039 | 77 | 0.609041 | false | 4.307895 | false | false | false |
FlorisHoogenboom/sklearn-helpers | tests/test_preprocessing.py | 1 | 3095 | import unittest
import numpy as np
import pandas as pd
from sklearn_helpers.preprocessing import \
EnhancedLabelEncoder, MultiColumnLabelEncoder
class EnhancedLabelEncoderTest(unittest.TestCase):
def test_accepts_only_1d(self):
"""It should only accept only a 1d array"""
ehe = EnhancedLabelEnc... | mit | 4,735,568,165,528,348,000 | 26.149123 | 86 | 0.519871 | false | 3.932656 | true | false | false |
jkibele/benthic_photo_survey | bps_package/ui_pref_help.py | 1 | 1950 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pref_help.ui'
#
# Created: Sun Mar 8 18:17:55 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attr... | bsd-3-clause | 8,490,062,574,565,492,000 | 39.625 | 109 | 0.726667 | false | 3.9 | false | false | false |
zabracks/sshuttle | src/server.py | 1 | 10287 | import re
import struct
import socket
import traceback
import time
import sys
import os
if not globals().get('skip_imports'):
import ssnet
import helpers
import hostwatch
import compat.ssubprocess as ssubprocess
from ssnet import Handler, Proxy, Mux, MuxWrapper
from helpers import log, debug1, d... | lgpl-2.1 | -5,990,303,340,717,896,000 | 29.707463 | 77 | 0.521532 | false | 3.535052 | false | false | false |
crazyskateface/LC | chat/admin.py | 1 | 1664 | from django.contrib import admin
from chat.models import UserProfile, Comments, Roll, Emblem
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
# Register your models here.
class UserProfileAdmin(admin.StackedInline):
... | mit | -309,975,475,201,732,700 | 28.714286 | 94 | 0.709135 | false | 3.834101 | false | false | false |
g-goessel/mathdoku_solve | fonctions.py | 1 | 4674 | """
fonctions
"""
from itertools import permutations, product
from functools import reduce
import numpy as np
def combi_possibles(val_tot,nbr_cases,nbr_max):
"""
retourne la liste des combinaisons possibles
"""
#test si la valeur est certaine
if nbr_cases==1:
return [(val_t... | mpl-2.0 | -8,464,025,482,168,778,000 | 34.124031 | 140 | 0.574893 | false | 3.123324 | false | false | false |
Microsoft/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/conda/core/portability.py | 1 | 7021 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from logging import getLogger
from os.path import realpath
import re
import struct
from ..base.constants import PREFIX_PLACEHOLDER
from ..common.compat import on_win
from ..exceptions import CondaIOError, Binary... | apache-2.0 | -6,387,582,113,646,030,000 | 41.041916 | 172 | 0.64478 | false | 3.920156 | false | false | false |
sudhaMR/Django-Perception | imgpage/urls.py | 1 | 1204 | """perception URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | mit | 2,675,888,157,375,171,000 | 45.307692 | 109 | 0.689369 | false | 3.410765 | false | false | false |
mila/django-noticebox | setup.py | 1 | 1110 | #!/usr/bin/env python
import codecs
from setuptools import setup, find_packages
url='http://github.com/mila/django-noticebox/tree/master'
try:
long_description = codecs.open('README.rst', "r", "utf-8").read()
except IOError:
long_description = "See %s" % url
setup(
name='django-noticebox',
version... | bsd-3-clause | -6,995,972,845,359,806,000 | 29 | 76 | 0.637838 | false | 4.021739 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.