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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2016_12_01/models/effective_network_security_group.py | 1 | 1777 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 8,663,824,145,024,644,000 | 43.425 | 112 | 0.667417 | false | 4.603627 | false | false | false |
GustavePate/lycheesync | lycheesync/sync.py | 1 | 4223 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
# from __future__ import unicode_literals
from lycheesync.lycheesyncer import LycheeSyncer
from lycheesync.update_scripts import inf_to_lychee_2_6_2
import logging.config
import click
import os
import sys
import pwd
import grp
from lychee... | mit | -210,268,809,910,668,600 | 35.405172 | 138 | 0.631068 | false | 3.47572 | false | false | false |
Karkus476/pygame-tanks | entity.py | 1 | 5935 | import pygame, math, geom
from vector import Vector
mp = [0,0]
class Entity:
entities = []
bulletIds = []
bombIds = []
agentIds = []
trackIds = []
nextId = 0
def __init__(self, type, xywh = None, xyr = None):
if xywh != None:
self.rect = pygame.Rect(xywh[0... | gpl-3.0 | 2,342,787,344,332,372,500 | 25.995283 | 76 | 0.474473 | false | 3.833979 | false | false | false |
Denniskamau/Twitter-Sentiment-Analysis | stream.py | 1 | 3946 | import re
import json
import tweepy
from config import *
from tweepy import OAuthHandler
from textblob import TextBlob
class TwitterClient(object):
'''
Generic Twitter Class for sentiment analysis.
'''
def __init__(self):
'''
Class constructor or initialization method.
'''
... | mit | -1,112,497,269,740,668,700 | 33.025862 | 103 | 0.582362 | false | 4.211313 | false | false | false |
NeuroDataDesign/seelviz | Cherrypy/cherrypyapp.py | 1 | 2633 | import os, os.path
import random
import sqlite3
import string
import time
import cherrypy
DB_STRING = "my.db"
class StringGenerator(object):
@cherrypy.expose
def index(self):
return file('index.html')
class StringGeneratorWebService(object):
exposed = True
@cherrypy.tools.accept(media='text/p... | apache-2.0 | -7,757,661,957,531,134,000 | 29.616279 | 79 | 0.5921 | false | 3.983359 | false | false | false |
red-hood/calendarserver | txweb2/dav/auth.py | 1 | 6134 | ##
# Copyright (c) 2005-2015 Apple Inc. All rights reserved.
#
# 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, mod... | apache-2.0 | 3,584,021,437,774,560,000 | 34.456647 | 119 | 0.709977 | false | 4.657555 | false | false | false |
pavle-batuta/djangoTDD | lists/migrations/0001_initial.py | 1 | 1038 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Item',
fields=[
('id', models.AutoField(primary... | mit | 7,126,767,289,904,180,000 | 26.315789 | 114 | 0.5 | false | 4.696833 | false | false | false |
Mariaanisimova/pythonintask | INBa/2015/Sarocvashin_M/task_12_23.py | 1 | 4811 | #Задача 12. Вариант 28.
#1-50. Разработайте игру "Крестики-нолики". (см. М.Доусон Программируем на Python гл. 6).
#Сароквашин Максим
#29.05.2016
X="X"
O="O"
EMPTY=" "
TIE="Ничья"
NUM_SQUARES=9
def display_instruct():
print('''
Добро пожаловать на ринг грандиознейших интеллектуальных состязаний всех времён.
Твой м... | apache-2.0 | 1,933,226,175,583,030,000 | 25.577181 | 161 | 0.655808 | false | 1.916747 | false | false | false |
umanium/trafficmon | id/trafficmon/TrafficMain.py | 1 | 4091 | import os
import cv2
import numpy as np
import time
from backgroundsubtraction.KMeans import KMeans
from objectblob.ObjectBlobDetection import ObjectBlobDetection
from pixelcleaning.MorphologicalCleaning import MorphologicalCleaning
__author__ = 'Luqman'
def morphological(image):
cleaning_model = Morphologica... | mit | 8,293,663,444,799,409,000 | 28.644928 | 106 | 0.575409 | false | 3.233992 | false | false | false |
jvasilakes/ML_Programs | naive_bayes.py | 1 | 4044 | #! /usr/bin/python2
from __future__ import division
import numpy as np
from sys import exit
from collections import OrderedDict
# ------Training data-------------
# Politics
xP = [
[1, 0, 1, 1, 1, 0, 1, 1],
[0, 0, 0, 1, 0, 0, 1, 1],
[1, 0, 0, 1, 1, 0, 1, 0],
[0, 1, 0, 0, 1, 1, 0, 1],
[0, 0,... | unlicense | -4,065,819,488,263,296,000 | 27.680851 | 79 | 0.541296 | false | 3.3841 | true | false | false |
bzhou26/leetcode_sol | p384_Shuffle_an_Array.py | 1 | 1759 | '''
- Leetcode problem: 384
- Difficulty: Medium
- Brief problem description:
Shuffle a set of numbers without duplicates.
Example:
// Init an array with set 1, 2, and 3.
int[] nums = {1,2,3};
Solution solution = new Solution(nums);
// Shuffle the array [1,2,3] and return its result. Any permutation of [1,2,3] mu... | mit | 2,762,108,037,381,353,500 | 22.783784 | 114 | 0.529847 | false | 3.656965 | false | false | false |
Azure/azure-sdk-for-python | sdk/applicationinsights/azure-applicationinsights/azure/applicationinsights/models/events_trace_result.py | 1 | 3361 | # 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 | -4,093,606,016,977,611,300 | 43.223684 | 107 | 0.645344 | false | 4.134071 | false | false | false |
WaveBlocks/WaveBlocksND | WaveBlocksND/HagedornBasisEvaluationPsi.py | 1 | 6904 | """The WaveBlocks Project
The basic common algorithms for evaluation Hagedorn basis functions
of the new kind.
@author: R. Bourquin
@copyright: Copyright (C) 2016 R. Bourquin
@license: Modified BSD License
"""
from numpy import complexfloating, dot, vstack, zeros, identity, diag, real
from numpy.linalg import eigh
f... | bsd-3-clause | 785,517,517,514,397,800 | 34.772021 | 106 | 0.538094 | false | 3.772678 | false | false | false |
flopp/GpxTrackPoster | gpxtrackposter/calendar_drawer.py | 1 | 5500 | """Draw a calendar poster."""
# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved.
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import calendar
import datetime
import svgwrite # type: ignore
from gpxtrackposter import utils
from gpxtr... | mit | 376,503,079,912,758,800 | 38.855072 | 112 | 0.482909 | false | 3.777473 | false | false | false |
outbig/DAFGA | v1.0/dafga_refDB.py | 1 | 5933 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
# Author: Yongkyu Kim, PhD
Max Planck Institute for terrestrial microbiology
#
# Date: 2014-04-02
# Version: 1.0
#
# Try 'dafga_refDB.py -h' for more information and See manual
#
# Purpose:
# Bugs: Please report to https://github.com/outbig/DAFGA/is... | gpl-3.0 | 3,426,493,625,151,996,000 | 43.609023 | 143 | 0.592618 | false | 3.427499 | false | false | false |
rwl/openpowersystem | rdflib/sparql/bison/Query.py | 1 | 3614 | from rdflib.sparql.bison.GraphPattern import GraphPattern
class Query(object):
"""
Query ::= Prolog ( SelectQuery | ConstructQuery | DescribeQuery | AskQuery )
See: http://www.w3.org/TR/rdf-sparql-query/#rQuery
"""
def __init__(self,prolog,query):
self.prolog = prolog
self.query = q... | agpl-3.0 | 7,408,429,954,010,658,000 | 37.052632 | 220 | 0.65689 | false | 3.954048 | false | false | false |
zepheira/rdf-to-ejson | lib/rdf_to_ejson.py | 1 | 5385 | import simplejson
import httplib2
import rdflib
import hashlib
import sys, os
__version__ = "0.2"
_RDF_TYPE = u"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
_RDFS_LABEL = "label" # "http://www.w3.org/2000/01/rdf-schema#label"
_SKOS_PREFLABEL = "prefLabel" # "http://www.w3.org/2004/02/skos/core#prefLabel"
# Conve... | apache-2.0 | -3,883,332,222,962,265,000 | 30.863905 | 89 | 0.599257 | false | 3.458574 | false | false | false |
FirstDraftGIS/firstdraft | projfd/apifd/serializers.py | 1 | 3304 | from appfd.models import Basemap, Feature, Order, Place, Test
from drf_queryfields import QueryFieldsMixin
from rest_framework.serializers import HiddenField, IntegerField, NullBooleanField, CharField, ChoiceField, URLField
from rest_framework.serializers import HyperlinkedModelSerializer, ModelSerializer, Serializer, ... | apache-2.0 | 4,986,572,885,234,948,000 | 35.711111 | 117 | 0.631053 | false | 3.824074 | false | false | false |
AndreaOrru/Yugen | key.py | 1 | 1945 | """Representation of keypresses."""
import curses
from curses import ascii
from curses.ascii import isprint
class Key:
"""Class representing a combination of key presses.
Attributes:
keys: Dictionary that maps key names to codes.
"""
keys = {k[4:]: eval('curses.'+k) for k in dir(curses) if ... | bsd-2-clause | -6,767,947,122,418,785,000 | 33.122807 | 91 | 0.572237 | false | 4.077568 | false | false | false |
fumitoh/modelx | modelx/tests/core/space/test_space_reload.py | 1 | 1096 | import sys
import os.path
import modelx as mx
import modelx.tests.testdata
import pytest
import pathlib
datadir = pathlib.Path(os.path.dirname(mx.tests.testdata.__file__))
@pytest.fixture
def reloadtest(tmp_path):
with open(tmp_path / "__init__.py", "w") as f:
f.write("")
sys.path.insert(0, str(tmp... | gpl-3.0 | -7,326,591,670,973,193,000 | 21.833333 | 73 | 0.656934 | false | 3.361963 | true | false | false |
mjafin/bcbio-nextgen | bcbio/distributed/multitasks.py | 1 | 7491 | """Multiprocessing ready entry points for sample analysis.
"""
from bcbio import heterogeneity, hla, structural, utils, chipseq, upload
from bcbio.bam import callable
from bcbio.srna import sample as srna
from bcbio.srna import group as seqcluster
from bcbio.chipseq import peaks
from bcbio.cwl import create as cwl_crea... | mit | 3,032,854,519,934,070,300 | 23.086817 | 78 | 0.726205 | false | 3.0157 | false | false | false |
terranodo/eventkit-cloud | eventkit_cloud/tasks/migrations/0006_auto_20200803_1037.py | 1 | 3279 | # Generated by Django 2.2.5 on 2020-08-03 10:37
import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
dependencies = [
('jobs', '0002_dataprovider_attribute_class'),
... | bsd-3-clause | 1,799,017,180,767,200,000 | 53.65 | 237 | 0.63007 | false | 4.220077 | false | false | false |
guptaarchit/nacsniff | main.py | 1 | 9500 | import wx
import sys
from capture import *
import netifaces
import wx.lib.buttons
from sniffer_socket import *
from help_window import *
from scanner import *
class ListCtrlLeft(wx.Frame):
def __init__(self, parent, id):
wx.Frame.__init__(self, None, wx.ID_ANY, 'wxBitmapButton', size=(300, 350))
sel... | gpl-2.0 | -6,793,228,414,728,784,000 | 35.402299 | 139 | 0.622421 | false | 3.278123 | false | false | false |
rkoschmitzky/coconodz | etc/maya/applib.py | 1 | 4161 | import pymel.core as pmc
def get_attribute_tree(node):
""" traverses attributes on given node and gets dict in form the attribute tree widget expects
Args:
node: PyNode
Returns: dict
"""
parents = {}
for attr in node.listAttr():
if not attr.isChild() and not attr.isMulti():... | mit | -4,021,520,205,011,341,000 | 33.966387 | 117 | 0.614516 | false | 4.194556 | false | false | false |
nixphix/ml-projects | sentiment_analysis/twitter_sentiment_analysis-jallikattu/code/twitter_sentiment_analysis-jallikattu_FINAL.py | 1 | 11757 |
# coding: utf-8
# ### Sentiment Analysis on "Jallikattu" with Twitter Data Feed <h3 style="color:red;">#DataScienceForSocialCause</h3>
#
# Twitter is flooded with Jallikattu issue, let us find peoples sentiment with Data Science tools. Following is the approach
# * Register a Twitter API handle for data feed
# * Pul... | mit | -8,772,647,441,873,645,000 | 43.534091 | 351 | 0.737518 | false | 3.484588 | false | false | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdecore/KUser.py | 1 | 2592 | # encoding: utf-8
# module PyKDE4.kdecore
# from /usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
import PyQt4.QtNetwork as __PyQt4_QtNetwork
class KUser(): # skipped bases: <class 'sip.wrapper'>
# no doc
... | gpl-2.0 | 4,795,472,248,495,693,000 | 25.721649 | 101 | 0.595293 | false | 3.891892 | false | false | false |
pdamodaran/yellowbrick | tests/checks.py | 1 | 4707 | # tests.checks
# Performs checking that visualizers adhere to Yellowbrick conventions.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Mon May 22 11:18:06 2017 -0700
#
# Copyright (C) 2017 District Data Labs
# For license information, see LICENSE.txt
#
# ID: checks.py [4131cb1] benjamin@ben... | apache-2.0 | 8,565,193,886,379,202,000 | 27.355422 | 84 | 0.616316 | false | 4.428034 | false | false | false |
newmath/FuturesAndOptionsTradingSimulation | scripts/FuturesHashConvert.py | 1 | 2590 | from datetime import date
from TimeSeriesFunctions import GetDatesAndValuesByDateRange
def ConvertFuturesHashToCurvesHash(FUTURES,CURVES,minDate=date(1900,1,1),maxDate=date(2099,12,31)):
for code in FUTURES.keys():
for year in FUTURES[code].keys():
for month in FUTURES[code][year].keys():
... | mit | -8,615,884,269,429,254,000 | 49.784314 | 107 | 0.554826 | false | 3.533424 | false | false | false |
zaitcev/swift-lfs | swift/proxy/controllers/account.py | 1 | 6160 | # Copyright (c) 2010-2012 OpenStack, 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 | 7,475,800,555,374,340,000 | 43.963504 | 78 | 0.643182 | false | 4.11215 | false | false | false |
shumik/skencil-c | Sketch/Graphics/selinfo.py | 1 | 7864 | # Sketch - A Python-based interactive drawing program
# Copyright (C) 1996, 1997, 1998 by Bernhard Herzog
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the Lice... | gpl-2.0 | -989,434,683,885,754,100 | 28.675472 | 75 | 0.691633 | false | 3.515422 | false | false | false |
kimond/miamm | miamm/recipes/serializers.py | 1 | 3262 | from rest_framework import serializers, fields
from recipes.models import Recipe, Step, RecipeIngredient, Ingredient, QuantityType
class QuantityTypeSerializer(serializers.ModelSerializer):
class Meta:
model = QuantityType
fields = ('name',)
class IngredientSerializer(serializers.ModelSerializer... | bsd-3-clause | -3,855,466,600,728,706,600 | 37.376471 | 127 | 0.681484 | false | 3.973203 | false | false | false |
comprna/SUPPA | scripts/generate_boxplot_event.py | 1 | 5584 | # The next script will format a phenotype table (junctions, events, trasncripts...)
# for runnning FastQTL analysis
#This version is for formatting the SCLC phenotype
"""
@authors: Juan L. Trincado
@email: juanluis.trincado@upf.edu
generate_boxplot_event.py: Generates a boxplot with the PSI values, given which sampl... | mit | -788,959,910,408,193,500 | 33.475309 | 118 | 0.546024 | false | 3.954674 | false | false | false |
UrbanCCD-UChicago/sf-plenario-backend | wopr/etl.py | 1 | 17862 | import os
import numpy as np
from datetime import datetime
from wopr.database import task_engine as engine, Base
from wopr.models import crime_table, MasterTable, sf_crime_table,\
sf_meta_table, shp2table
from wopr.helpers import download_crime
from datetime import datetime, date
from sqlalchemy import Column, Inte... | mit | -3,185,086,776,300,698,000 | 47.803279 | 95 | 0.587336 | false | 3.794774 | false | false | false |
dragoon/kilogram | kilogram/entity_linking/app.py | 1 | 3555 | #!/usr/bin/env python
"""
./app.py --dbpedia-data-dir /home/roman/dbpedia --ner-host diufpc54.unifr.ch --types-table typogram --hbase-host diufpc304
"""
import argparse
import os.path
from flask import Flask, jsonify, request
import kilogram
from kilogram.dataset.entity_linking.gerbil import DataSet
from kilogram.ent... | apache-2.0 | -2,217,680,018,903,372,300 | 39.397727 | 122 | 0.675387 | false | 3.372865 | false | false | false |
denischevalier/dkb | keylog_parser.py | 1 | 5565 | #!/usr/bin/python3
##########################################################################
## ##
## dkb: Simple Python Keybinder for Linux ##
## Copyright (C) 2014 chevalierdenis@gmx.com ##
#... | gpl-3.0 | -8,606,256,544,597,879,000 | 62.238636 | 143 | 0.425517 | false | 5.408163 | true | false | false |
PoppyPop/docker | webui-aria2/autounrar.py | 1 | 4224 | #!/usr/bin/python3
import subprocess
import os
import json
import shutil
maxlevel = 1
def CheckRarComplete( path, file, associatedFiles ):
plsar = subprocess.Popen(['lsar', '-j', os.path.join(path, file)], stdout=subprocess.PIPE)
lsarout, lsarerr = plsar.communicate()
jsonObject = json.loads(lsarout.decode("utf... | gpl-3.0 | -2,123,492,820,590,740,200 | 25.074074 | 117 | 0.635417 | false | 3.187925 | false | false | false |
702nADOS/sumo | tools/contributed/sumopy/agilepy/lib_wx/test_app.py | 1 | 7648 | import os
import sys
import wx
from wx.lib.wordwrap import wordwrap
if __name__ == '__main__':
try:
APPDIR = os.path.dirname(os.path.abspath(__file__))
except:
APPDIR = os.path.dirname(os.path.abspath(sys.argv[0]))
AGILEDIR = os.path.join(APPDIR, '..')
print 'APPDIR,AGILEDIR', APPDIR,... | gpl-3.0 | 1,562,993,720,212,012,800 | 33.922374 | 81 | 0.471365 | false | 3.242052 | false | false | false |
fernandog/Medusa | ext/sqlalchemy/event/attr.py | 1 | 12905 | # event/attr.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Attribute implementation for _Dispatch classes.
The various listener targets for a... | gpl-3.0 | 3,407,839,585,040,073,700 | 31.182045 | 77 | 0.604107 | false | 4.177727 | false | false | false |
toddpalino/kafka-tools | kafka/tools/protocol/requests/describe_acls_v0.py | 1 | 1408 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -7,320,927,482,224,388,000 | 37.054054 | 82 | 0.697443 | false | 3.900277 | false | false | false |
brkrishna/freelance | bolly_reviews/process_data.py | 1 | 5263 | #-------------------------------------------------------------------------------
# Name: process_data
# Purpose:
#
# Author: Ramakrishna
#
# Created: 17/04/2014
# Copyright: (c) Ramakrishna 2014
# Licence: <your licence>
#----------------------------------------------------------------------------... | gpl-2.0 | 1,349,513,766,792,721,200 | 43.601695 | 82 | 0.564127 | false | 3.388925 | false | false | false |
tkf/neo | neo/io/micromedio.py | 1 | 5751 | # encoding: utf-8
"""
Class for reading/writing data from micromed (.trc).
Inspired by the Matlab code for EEGLAB from Rami K. Niazy.
Supported : Read
Author: sgarcia
"""
from .baseio import BaseIO
from ..core import *
from .tools import create_many_to_one_relationship
import numpy as np
import quantities as pq
... | bsd-3-clause | 5,507,281,442,814,225,000 | 27.899497 | 119 | 0.497653 | false | 3.693642 | false | false | false |
listyque/TACTIC-Handler | thlib/side/natsort/utils.py | 1 | 15239 | # -*- coding: utf-8 -*-
"""
Utilities and definitions for natsort, mostly all used to define
the _natsort_key function.
"""
from __future__ import (
print_function,
division,
unicode_literals,
absolute_import
)
# Std. lib imports.
import re
from math import isnan
from warnings import warn
from os impor... | epl-1.0 | 5,161,603,413,266,719,000 | 39.314815 | 79 | 0.569394 | false | 3.361791 | false | false | false |
ngokevin/zamboni | mkt/developers/api_payments.py | 1 | 11477 | from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
import commonware
from curling.lib import HttpClientError, HttpServerError
from rest_framework import status
from rest_framework.mixins import (CreateModelMixin, DestroyModelMixin,
ListMo... | bsd-3-clause | 2,143,733,476,936,879,400 | 38.575862 | 79 | 0.632744 | false | 4.522065 | false | false | false |
mitchsmith/qd_screener | questionnaire/admin.py | 1 | 7839 | from django.contrib import admin
from django.forms import ModelChoiceField, ModelForm, Textarea
from questionnaire.models import *
from django.core.exceptions import ValidationError
from django.forms.models import BaseInlineFormSet
from questionnaire import admin_helper
############################################### ... | mit | -3,241,874,263,367,155,000 | 39.2 | 122 | 0.612706 | false | 4.372002 | false | false | false |
mtrgroup/django-mtr-utils | tests/app/settings.py | 1 | 3204 | import os
import django
# placeholder for gettext
def _(s):
return s
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = 'j#zwt2c!*(7(jz!m(tr$+jq^1d(+)e(^059f^nd_(*zj!gv0x)'
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = ['*']
INSTALLED_APPS = (
'modeltranslation',
'django.contr... | mit | 525,239,956,382,142,200 | 22.217391 | 73 | 0.644819 | false | 3.303093 | false | false | false |
USGSDenverPychron/pychron | pychron/hardware/actuators/iactuator.py | 1 | 1276 | # ===============================================================================
# Copyright 2014 Jake Ross
#
# 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/licens... | apache-2.0 | -8,927,689,282,698,169,000 | 32.578947 | 81 | 0.527429 | false | 4.926641 | false | false | false |
Telestream/telestream-cloud-python-sdk | telestream_cloud_qc_sdk/test/test_container_type.py | 1 | 1326 | # coding: utf-8
"""
Qc API
Qc API # noqa: E501
The version of the OpenAPI document: 3.0.0
Contact: cloudsupport@telestream.net
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import telestream_cloud_qc
from telestream_cl... | mit | 7,400,878,994,656,975,000 | 24.5 | 89 | 0.65083 | false | 4.092593 | true | false | false |
daniel-j/lutris | lutris/services/service_game.py | 1 | 1672 | """Communicates between third party services games and Lutris games"""
from lutris import pga
class ServiceGame:
"""Representation of a game from a 3rd party service"""
store = NotImplemented
installer_slug = NotImplemented
def __init__(self):
self.appid = None # External ID of the game on t... | gpl-3.0 | -4,914,758,489,699,517,000 | 31.784314 | 77 | 0.605861 | false | 4.019231 | true | false | false |
nginx/unit | test/test_asgi_websockets.py | 1 | 44158 | import struct
import time
from distutils.version import LooseVersion
import pytest
from unit.applications.lang.python import TestApplicationPython
from unit.applications.websockets import TestApplicationWebsocket
from unit.option import option
class TestASGIWebsockets(TestApplicationPython):
prerequisites = {
... | apache-2.0 | -6,733,568,760,508,300,000 | 28.771409 | 84 | 0.545197 | false | 3.230719 | true | false | false |
OpenPTV/postptv | flowtracks/scene.py | 1 | 17778 | # -*- coding: utf-8 -*-
#Created on Sun Aug 10 11:28:42 2014
#
# Private references:
# [1] https://docs.python.org/2/library/itertools.html
"""
A module for manipulating PTV analyses saved as HDF5 files in the flowtracks
format. Allows reading the data by iterating over frames or over trajectories.
Main design goals:... | gpl-3.0 | -1,854,678,531,572,964,000 | 34.698795 | 90 | 0.564124 | false | 4.211798 | false | false | false |
vdel/CoMFoRT | src/modules/themodule_Coord.py | 2 | 19824 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# CoMFoRT: a COntent Management system FOr Researchers and Teachers!
#
# Copyright (C) 2008 Projet2-L3IF ENS Lyon.
#
# Contributors:
# * Jean-Alexandre Angles d'Auriac
# * Gabriel Beaulieu
# * Valentin Blot
# * Pierre Boutillier
# * Nicolas Brunie
# * Aloï... | gpl-3.0 | 3,369,862,865,479,592,000 | 42.767699 | 139 | 0.491887 | false | 3.325992 | false | false | false |
cekk/fantacalcio-react | fantacalcio/public/views.py | 1 | 7080 | # -*- coding: utf-8 -*-
'''Public section, including homepage and signup.'''
from flask import (Blueprint, request, render_template, flash, url_for,
redirect, session, make_response, jsonify, current_app)
from flask.ext.login import login_user, login_required, logout_user
from fantacalcio.extensions... | bsd-3-clause | -269,672,554,093,082,620 | 35.489691 | 120 | 0.632575 | false | 3.717962 | false | false | false |
dheesbeen/Mage2Gen | mage2gen/snippets/plugin.py | 1 | 4340 | # A Magento 2 module generator library
# Copyright (C) 2016 Derrick Heesbeen
# Copyright (C) 2016 Maikel Martens Changed add API and refactor code
#
# This file is part of Mage2Gen.
#
# Mage2Gen is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | gpl-3.0 | -6,212,635,163,810,068,000 | 29.780142 | 191 | 0.693779 | false | 3.248503 | false | false | false |
sendgrid/sendgrid-python | setup.py | 1 | 1257 | import io
import os
from distutils.file_util import copy_file
from setuptools import setup, find_packages
__version__ = None
with open('sendgrid/version.py') as f:
exec(f.read())
def getRequires():
deps = [
'python_http_client>=3.2.1',
'starkbank-ecdsa>=1.0.0'
]
return deps
dir_path... | mit | -6,855,320,425,953,217,000 | 28.232558 | 79 | 0.613365 | false | 3.360963 | false | false | false |
yukisakurai/hhntup | higgstautau/pileup.py | 1 | 6320 | from rootpy.tree.filtering import EventFilter
from externaltools import PileupReweighting
from ROOT import Root
from . import datasets
from . import log; log = log[__name__]
# https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/InDetTrackingPerformanceGuidelines
PU_RESCALE = {
2011: (0.97, 0.01),
2012: (... | gpl-3.0 | -8,316,059,299,699,684,000 | 35.531792 | 107 | 0.631329 | false | 3.513063 | true | false | false |
dropseedlabs/configyaml | configyaml/config/nodes.py | 1 | 3286 | import re
from .base import AbstractNode
from .dict import DictNode
class WildcardDictNode(DictNode):
"""A dictionary node where nearly any key is valid
The only invalid keys are:
- an actual asterisk '*'
- a key that begins with '_'
"""
def _validate_value(self):
for key... | mit | 817,435,022,708,661,400 | 29.71028 | 92 | 0.552343 | false | 4.071871 | false | false | false |
smn/django-cache-sweeper | myproject/settings.py | 1 | 3533 | # Django settings for myproject project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
... | bsd-3-clause | 8,056,872,209,026,352,000 | 34.33 | 122 | 0.68865 | false | 3.631038 | false | false | false |
avi-psvm-dutta/eSim | src/kicadtoNgspice/KicadtoNgspice.py | 1 | 30713 | #===============================================================================
#
# FILE: kicadtoNgspice.py
#
# USAGE: ---
#
# DESCRIPTION: This define all configuration used in Application.
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: F... | gpl-3.0 | -3,305,500,280,295,651,000 | 44.035191 | 233 | 0.543516 | false | 4.068486 | false | false | false |
jnv/asciibooth | asciibooth/__main__.py | 1 | 3498 | from threading import Semaphore
from rx import Observable
from rx.concurrency import Scheduler
from time import sleep
from .input import observe_mouse, observe_keyboard, observe_getch
from . import ascii
from . import screen
from . import config
from . import raster
from . import output
from .statuses import status_gen... | cc0-1.0 | -2,811,212,175,431,827,000 | 27.439024 | 128 | 0.647513 | false | 3.412683 | true | false | false |
imchipwood/iSOBOT_ESP8266 | iSOBOT_Control/isobot.py | 1 | 14020 | __author__ = "chawood@pdx.edu"
import requests
import ping
import socket
import time
import re
# Code originally pulled from here
# http://web.cecs.pdx.edu/~mperkows/CLASS_479/Projects-2012/Mathias_Sunardi-iSobot_controller_report.pdf
# And subsequently changed entirely for use with ESP8266s over wifi
commands = {
'... | gpl-3.0 | -3,810,087,699,394,670,000 | 31.988235 | 144 | 0.633381 | false | 2.303648 | false | false | false |
devlights/try-python | trypython/stdlib/dataclasses_/dataclasses02.py | 1 | 1182 | """
dataclasses モジュールのサンプルです.
fronzen プロパティの指定について
REFERENCESS:: http://bit.ly/2KTZynw
http://bit.ly/2KJCnwk
http://bit.ly/2KHeNA9
http://bit.ly/2KFLGxc
"""
import dataclasses as dc
from trypython.common.commoncls import SampleBase
from trypython.common.commonfunc import pr
... | mit | 6,721,860,153,349,248,000 | 23.318182 | 70 | 0.542056 | false | 3.119534 | false | false | false |
mvdroest/RTLSDR-Scanner | src/cli.py | 1 | 9447 | #
# rtlsdr_scan
#
# http://eartoearoak.com/software/rtlsdr-scanner
#
# Copyright 2012 - 2015 Al Brown
#
# A frequency scanning GUI for the OsmoSDR rtl-sdr library at
# http://sdr.osmocom.org/trac/wiki/rtl-sdr
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | gpl-3.0 | 8,755,995,106,425,478,000 | 34.920152 | 95 | 0.544406 | false | 4.215529 | false | false | false |
nwjs/chromium.src | tools/perf/experimental/representative_perf_test_limit_adjuster/adjust_upper_limits.py | 1 | 6803 | # Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import json
import os
import sys
import shutil
import subprocess
import tempfile
CHROMIUM_PATH = os.path.join(os.path... | bsd-3-clause | -4,852,662,846,886,099,000 | 31.555024 | 79 | 0.670587 | false | 3.474464 | false | false | false |
eli-schwartz/Sigil | src/Resource_Files/plugin_launchers/python/opf_parser.py | 1 | 11711 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Copyright (c) 2014 Kevin B. Hendricks, John Schember, and Doug Massay
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following ... | gpl-3.0 | 3,533,007,548,701,989,000 | 37.14658 | 129 | 0.504056 | false | 3.904968 | false | false | false |
kendazheng/wizcloud2 | wizcloud/wizresource/zapi.py | 1 | 2298 | import time
from pyzabbix import ZabbixAPI
from settings import ZabbixAPI_URL, ZabbixAPI_USER, ZabbixAPI_PASSWD
def getZabbixHistory(key, hostname, lastminutes):
zapi = ZabbixAPI(ZabbixAPI_URL, timeout=5)
zapi.login(ZabbixAPI_USER, ZabbixAPI_PASSWD)
hosts = zapi.host.get(filter={"host": hostname})
if... | apache-2.0 | -8,149,228,016,804,766,000 | 33.298507 | 106 | 0.521323 | false | 3.798347 | false | false | false |
jeffmahoney/crash-python | contrib/lsbtrfs-cmd.py | 1 | 1665 | #!/usr/bin/python3
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
path = "/lib/modules/4.4.20-6.gd2e08c5-default/kernel/fs/btrfs/btrfs.ko"
from crash.types.list import list_for_each_entry
import gdb
import uuid
from crash.commands import CrashCommand
class LSBtrfs(CrashCommand):
"""
doc
"""... | gpl-2.0 | 1,526,070,313,311,482,000 | 34.425532 | 87 | 0.553153 | false | 3.384146 | false | false | false |
zijistark/ck2utils | esc/check_titles.py | 1 | 8077 | #!/usr/bin/env python3
from collections import defaultdict
import csv
from operator import attrgetter
import pathlib
import pprint
import re
import sys
import shutil
import tempfile
import ck2parser
from ck2parser import (rootpath, vanilladir, is_codename, Obj, csv_rows,
get_province_id_name_map... | gpl-2.0 | 7,852,511,862,413,225,000 | 37.831731 | 79 | 0.510833 | false | 3.767257 | false | false | false |
bt3gl/Numerical-Methods-for-Physics | others/laplace_poisson_equations/mg_test.py | 1 | 1396 | #!/usr/bin/env python
"""
an example of using the multigrid class to solve Laplace's equation. Here, we
solve
u_xx = sin(x)
u = 0 on the boundary [0,1]
The analytic solution is u(x) = -sin(x) + x sin(1)
"""
#from io import *
import numpy
import multigrid
import pylab
# the analytic solution
def true(x):
retu... | apache-2.0 | 6,720,700,672,188,370,000 | 18.942857 | 100 | 0.657593 | false | 2.84898 | false | false | false |
fource/fource | your_hacks/aditya/fource_http.py | 1 | 3453 | import requests
class HttpClass(object):
"""
Generate an HTTP Request. Accepts request parameters as params_dict during init.
Accepted Parameters:
HTTP URL as url - String
HTTP Method as method - String
HTTP Headers as headers - Dictionary
HTTP Basic Auth as auth - Tuple
Query String/P... | mit | -181,291,372,744,618,340 | 42.708861 | 146 | 0.631045 | false | 3.49848 | false | false | false |
BillBillBillBill/WishTalk-server | WishTalk/api/image.py | 1 | 2980 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import uuid
from api import api, GlobalError
from flask import request, Response
from model.image import Image as Image_model
from server import db
from util.jsonResponse import jsonSuccess, jsonError
from config import UPLOAD_PATH
from werkzeug.utils import secu... | mit | 163,071,177,810,335,070 | 33.252874 | 106 | 0.597651 | false | 3.885267 | false | false | false |
miniconfig/home-assistant | homeassistant/components/climate/zwave.py | 1 | 7581 | """
Support for Z-Wave climate devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.zwave/
"""
# Because we do not compile openzwave on CI
# pylint: disable=import-error
import logging
from homeassistant.components.climate import DOMAIN
from h... | mit | 5,530,945,481,629,688,000 | 33.775229 | 103 | 0.601108 | false | 3.897686 | false | false | false |
JeroenZegers/Nabu-MSSS | nabu/postprocessing/reconstructors/deepclusteringnoise_reconstructor.py | 1 | 5366 | """@file deepclusteringnoise_reconstructor.py
contains the reconstor class using deep clustering for modified noise architecture"""
from sklearn.cluster import KMeans
import mask_reconstructor
from nabu.postprocessing import data_reader
import numpy as np
import os
class DeepclusteringnoiseReconstructor(mask_reconst... | mit | -6,201,207,245,161,696,000 | 38.455882 | 114 | 0.726239 | false | 3.177028 | false | false | false |
arg-hya/taxiCab | Tools/Misc/TaskPointGenerator.py | 1 | 1502 | import json
import shapefile as shp
import matplotlib.pyplot as plt
import random
def mean(numbers):
return float(sum(numbers)) / max(len(numbers), 1)
numbersX = []
numbersY = []
TaskPoints = {}
shpFilePath = r"D:\TaxiCab\mycode\Plots\ShapefileAndTrajectory\taxi_zones\taxi_zones"
sf = shp.Reader(shpFil... | gpl-3.0 | -1,998,065,879,706,729,000 | 24.033333 | 115 | 0.66245 | false | 2.828625 | false | false | false |
comjoy91/SouthKorean-legislativeElection-history | crawlers/election_results/crawlers/assembly/base.py | 1 | 9308 | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
############### is proportional in parse!
import gevent
from gevent import monkey
import itertools
from urllib.parse import urljoin
from utils import flatten, get_json, get_xpath, parse_cell, sanitize, split
monkey.patch_all()
class BaseCrawler(object):
url_image_ba... | apache-2.0 | 3,233,375,519,743,952,000 | 33.586873 | 202 | 0.66142 | false | 2.424357 | false | false | false |
Jyrsa/hoppy.fi | beerstatus/tasks.py | 1 | 11309 | import logging
from django.conf import settings
from django.template.defaultfilters import slugify
from django.utils import timezone
from huey.djhuey import db_periodic_task
from huey.djhuey import crontab
from huey.djhuey import db_task
import pytz
import requests
import json
import datetime
from beerstatus import mo... | mit | 4,492,921,484,083,990,000 | 35.363344 | 92 | 0.56203 | false | 3.819318 | false | false | false |
acidjunk/django-scrumboard | scrumtools/apps/scrumboard/views.py | 1 | 7382 | from django.views.generic import ListView, TemplateView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.forms.models import modelform_factory
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import render
fro... | gpl-3.0 | -6,036,080,027,663,365,000 | 29.382716 | 107 | 0.652533 | false | 3.559306 | false | false | false |
dalejung/edamame | edamame/tools/follow.py | 1 | 9062 | import inspect
import gc
import sys
import os.path
import difflib
from collections import OrderedDict
import pandas as pd
from pandas.core.common import in_ipnb
def is_property(code):
"""
Using some CPython gc magics, check if a code object is a property
gc idea taken from trace.py from stdlib
"""
... | mit | -7,262,418,995,845,113,000 | 31.24911 | 80 | 0.537078 | false | 3.972819 | false | false | false |
Nuevosmedios/django-badger | badger/migrations/0012_auto__add_field_badge_assignment_badge.py | 1 | 10979 | # -*- 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
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Badge.assignment_badge'
db.add_column(u'badger_badge', 'a... | bsd-3-clause | -2,302,220,583,995,254,000 | 82.816794 | 195 | 0.554149 | false | 3.57972 | false | false | false |
compas-dev/compas | src/compas/numerical/ga/ga.py | 1 | 31945 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import re
import random
import json
import copy
__all__ = ['ga']
TPL = """
GA summary
==========
- fitness function name: {}
- fitnes function type : {}
- number of generations : {}
- number of individuals ... | mit | -830,581,242,874,230,100 | 38.389642 | 135 | 0.564595 | false | 3.820715 | false | false | false |
v-a/check_mk | web/htdocs/index.py | 1 | 13788 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 | 4,738,782,860,625,158,000 | 41.294479 | 131 | 0.570859 | false | 4.106015 | true | false | false |
unicefuganda/rapidsms-bednets | bednets/view_helpers.py | 1 | 3046 | import datetime
import xlwt
from time import strftime
from mtrack.utils import write_xls
from django.http import HttpResponse
from django.db import connection
def generate_excel_response(data, headings):
book = xlwt.Workbook(encoding="utf8")
write_xls(sheet_name="BedNets Report", headings=headings, data=data, ... | bsd-3-clause | -170,221,384,607,029,760 | 45.151515 | 192 | 0.674655 | false | 3.489118 | false | false | false |
twneale/hercules | hercules/dict.py | 1 | 5018 | import functools
from hercules.loop_interface import IteratorWrapperBase
class KeyClobberError(KeyError):
pass
class NoClobberDict(dict):
'''An otherwise ordinary dict that complains if you
try to overwrite any existing keys.
'''
KeyClobberError = KeyClobberError
def __setitem__(self, key, ... | bsd-3-clause | 3,272,178,730,380,776,000 | 28.345029 | 79 | 0.521722 | false | 3.97308 | false | false | false |
interDist/pasportaservo | hosting/forms/places.py | 1 | 11530 | from collections import namedtuple
from datetime import date
from django import forms
from django.contrib.auth import get_user_model
from django.utils.text import format_lazy
from django.utils.translation import ugettext_lazy as _
from core.models import SiteConfiguration
from maps.widgets import MapboxGlWidget
from... | agpl-3.0 | -1,749,623,336,786,708,500 | 40.775362 | 111 | 0.57719 | false | 4.324831 | false | false | false |
krasch/smart-assistants | examples/visualize_habits.py | 1 | 1689 | # -*- coding: UTF-8 -*-
"""
Plot visualization of user habits, i.e. show which actions typically follow some given user action.
Note: the figure for "Frontdoor=Closed" slightly deviates from Figure 1 in the paper and Figure 5.1 in the
dissertation (see paper_experiments.py for bibliographical information). The numb... | mit | -6,601,924,424,743,180,000 | 43.447368 | 116 | 0.778567 | false | 3.736726 | true | false | false |
macosforge/ccs-calendarserver | twistedcaldav/test/test_extensions.py | 1 | 9681 | # -*- coding: utf-8 -*-
##
# Copyright (c) 2009-2017 Apple 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 ... | apache-2.0 | -730,047,790,414,134,700 | 34.054348 | 132 | 0.657571 | false | 4.16129 | true | false | false |
andrewor14/iolap | python/pyspark/ml/param/__init__.py | 2 | 8455 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 432,614,469,154,766,200 | 32.027344 | 95 | 0.59657 | false | 4.473545 | false | false | false |
hrashk/sympy | sympy/plotting/textplot.py | 1 | 2000 | from __future__ import print_function, division
from sympy import *
def textplot(expr, a, b, W=55, H=18):
"""
Print a crude ASCII art plot of the SymPy expression 'expr' (which
should contain a single symbol, e.g. x or something else) over the
interval [a, b].
Examples
========
textplot... | bsd-3-clause | -2,627,293,115,692,088,000 | 25.315789 | 89 | 0.4125 | false | 3.159558 | false | false | false |
vamin/MESS.DB | mess/utils.py | 1 | 5267 | # -*- coding: utf-8 -*-
# Copyright 2013-2014 Victor Amin, http://vamin.net/
"""MESS.DB utilities module
This module contains helper functions and classes that are used by many mess
modules.
"""
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import hashlib
import json
... | agpl-3.0 | 2,871,678,152,651,886,000 | 29.097143 | 79 | 0.569774 | false | 3.827762 | false | false | false |
evstropov/django-webmoney-merchant | webmoney_merchant/forms.py | 1 | 2066 | import re
from django import forms
from django.utils.translation import ugettext_lazy as _
PURSE_RE = re.compile(r'^(?P<type>[BCDEGKRUXYZ])(?P<number>\d{12})$')
WMID_RE = re.compile(r'^\d{12}$')
class PaymentRequestForm(forms.Form):
LMI_PAYMENT_AMOUNT = forms.DecimalField(max_digits=7, decimal_places=2, widget=f... | apache-2.0 | -4,126,681,343,636,265,000 | 33.433333 | 103 | 0.736205 | false | 3.163859 | false | false | false |
kaochiuan/HsinchuCityWebsite | HsinchuCityWebsite/HsinchuCityWebsite/app/templateModels.py | 1 | 1595 |
class temple(object):
def __init__(self, name, locateRegion, mastergod, religiousBelief, organizationType, location, phone1, phone2):
self.name = name
self.locateRegion = locateRegion
self.mastergod = mastergod
self.religiousBelief = religiousBelief
self.organizationType = ... | mit | 4,606,429,468,003,518,000 | 32.914894 | 115 | 0.655367 | false | 3.904412 | false | false | false |
yunity/foodsaving-backend | karrot/users/factories.py | 1 | 1082 | from django.contrib.auth import get_user_model
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, Sequence
from karrot.utils.tests.fake import faker
class UserFactory(DjangoModelFactory):
class Meta:
model = get_user_model()
strategy = CREATE_STRATEGY
is_... | agpl-3.0 | -8,607,476,821,204,952,000 | 31.787879 | 96 | 0.678373 | false | 3.823322 | false | false | false |
128technology/yinsolidated | test/plugin_json_test.py | 1 | 5346 | # Copyright 2016 128 Technology, Inc.
"""Unit tests for the yinsolidated pyang plugin"""
from __future__ import unicode_literals
import json
import os
import subprocess
import pyang
import pytest
from yinsolidated.plugin import plugin
YINSOLIDATED_PLUGIN_DIRECTORY = os.path.dirname(plugin.__file__)
YIN_NAMESPAC... | mit | 6,492,448,924,455,224,000 | 32.204969 | 88 | 0.648148 | false | 3.681818 | true | false | false |
lepy/phuzzy | phuzzy/contrib/pydoe/doe_composite.py | 1 | 6172 | """
This code was originally published by the following individuals for use with
Scilab:
Copyright (C) 2012 - 2013 - Michael Baudin
Copyright (C) 2012 - Maria Christopoulou
Copyright (C) 2010 - 2011 - INRIA - Michael Baudin
Copyright (C) 2009 - Yann Collette
Copyright (C) 2009 - CEA - Jean-Marc Mart... | mit | 4,254,063,885,363,651,600 | 36.634146 | 106 | 0.516202 | false | 3.749696 | false | false | false |
ibrahimsh/final-project-software-programming | HashTable.py | 1 | 22420 | __author__ = 'MatrixRev'
import codecs
import json
import re
from collections import Mapping
from collections import defaultdict
from collections import Counter
import Levenshtein
import nltk
from nltk.corpus import stopwords
import fileinput
import string
import os
import collections
import rdflib
from rdflib.namespa... | apache-2.0 | -3,101,594,761,690,827,300 | 36.807757 | 135 | 0.504416 | false | 3.941632 | false | false | false |
onlineconvert/onlineconvert-api-sdk-python3 | client/jobs_api.py | 1 | 11925 | #!/usr/bin/env python
"""
JobsApi.py
Copyright 2015 SmartBear Software
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... | apache-2.0 | 9,035,207,243,163,449,000 | 29.266497 | 359 | 0.536688 | false | 4.345845 | false | false | false |
elidrc/PSO | test_pso.py | 1 | 1192 | from benchmark_functions import *
from pso import *
import matplotlib.pyplot as plt
iterations = 100
particles = 500
dimensions = 2
search_space = [[-5.12] * dimensions, [5.12] * dimensions]
# print init_pso(iterations, particles, search_space)
velocity, fitness, local_best, local_position, global_best, global_positi... | mit | 2,549,936,103,298,485,000 | 34.058824 | 117 | 0.680369 | false | 3.701863 | false | false | false |
mjabri/holoviews | holoviews/element/path.py | 1 | 8204 | """
A Path element is a way of drawing arbitrary shapes that can be
overlayed on top of other elements.
Subclasses of Path are designed to generate certain common shapes
quickly and condeniently. For instance, the Box path is often useful
for marking areas of a raster image.
Contours is also a subclass of Path but in... | bsd-3-clause | 1,391,249,197,297,087,200 | 34.669565 | 90 | 0.624573 | false | 3.81759 | false | false | false |
bitmazk/django-people | people/admin.py | 1 | 2123 | """Admin classes for the ``people`` app."""
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from hvad.admin import TranslatableAdmin
from . import models
class NationalityAdmin(TranslatableAdmin):
"""Admin for the ``Nationality`` model."""
list_display = ['get_name',... | mit | 2,866,603,225,132,881,400 | 29.328571 | 75 | 0.659444 | false | 3.52073 | false | false | false |
Onirik79/aaritmud | src/controllers/game_connection_comet.py | 1 | 1690 | # -*- coding: utf-8 -*-
"""
Modulo per la gestione della connessione al gioco con tecnologia simil-comet.
"""
#= IMPORT ======================================================================
from twisted.web.server import NOT_DONE_YET
from src.web_resource import WebResource
#= CLASSI ==========================... | gpl-2.0 | 3,280,582,672,710,947,000 | 27.59322 | 80 | 0.595139 | false | 3.471193 | false | false | false |
sebastianlan/wedfairy-api | poll/models.py | 1 | 1124 | from django.db import models
class Poll(models.Model):
id = models.AutoField(primary_key=True)
title = models.CharField(blank=True, null=True, max_length=255)
message = models.TextField(blank=True, null=True)
select = models.IntegerField(blank=True, null=True)
type = models.IntegerField(blank=True... | mit | -4,689,786,348,986,709,000 | 32.058824 | 69 | 0.69306 | false | 3.556962 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.