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
samuelcolvin/django-importexport
views.py
1
5063
from django import forms import Imex.models as m import Imex.tasks as tasks import HotDjango.views_base as viewb from django.core.urlresolvers import reverse from django.db import models import settings from django.shortcuts import redirect import Imex import_groups, export_groups = Imex.get_imex_groups() actions = ...
gpl-2.0
4,235,616,666,778,978,300
37.648855
135
0.596089
false
3.7146
false
false
false
ghostop14/sparrow-wifi
sparrowwifiagent.py
1
114857
#!/usr/bin/python3 # # Copyright 2017 ghostop14 # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This software is distributed in the hope ...
gpl-3.0
6,750,538,930,191,065,000
39.385724
300
0.488999
false
4.707833
false
false
false
roxxup/PartialTuring
WebcamSound.py
1
3038
import threading from threading import Thread import cv2 import sys #import wikipedia #from chatterbot import ChatBot import shlex, subprocess import speech_recognition as sr import pyvona from googlesearch import GoogleSearch import xml.etree.ElementTree as ET import requests cascPath = sys.argv[1] def wikileaks(st...
gpl-3.0
5,042,716,747,227,126,000
26.369369
123
0.628045
false
3.544924
false
false
false
yohanyee/simple-neural-net
classes/example_pipelines.py
1
1478
import numpy as np from data import * from construct import * from train import * from hippocampi_to_patches import * class DigitsPipeline(object): def __init__(self): self.D = Data() self.D.load_digits_data() self.D.reshape([16,16],[1]) self.N = FeedForwardNetwork() ...
mit
-7,236,642,412,433,993,000
42.470588
126
0.673207
false
3.485849
false
false
false
anurag03/integration_tests
cfme/tests/services/test_provision_stack.py
1
9381
import fauxfactory import pytest from widgetastic_patternfly import DropdownItemDisabled from cfme import test_requirements from cfme.cloud.provider import CloudProvider from cfme.cloud.provider.azure import AzureProvider from cfme.cloud.provider.ec2 import EC2Provider from cfme.cloud.provider.openstack import OpenSta...
gpl-2.0
-7,078,827,523,268,368,000
35.933071
100
0.663895
false
4.057526
true
false
false
Telestream/telestream-cloud-python-sdk
telestream_cloud_flip_sdk/telestream_cloud_flip/models/extra_file.py
1
4957
# coding: utf-8 """ Flip API Flip # noqa: E501 The version of the OpenAPI document: 3.1 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from telestream_cloud_flip.configuration import Configuration class...
mit
4,721,568,431,818,250,000
27.164773
110
0.556788
false
3.934127
true
false
false
pombreda/https-gitorious.org-appstream-software-center
softwarecenter/ui/gtk3/widgets/buttons.py
1
21538
# Copyright (C) 2011 Canonical # # Authors: # Matthew McGowan # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 3. # # This program is distributed in the hope that it will be useful, bu...
gpl-3.0
-1,711,772,411,216,868,400
31.782344
79
0.562308
false
3.589068
false
false
false
lucperkins/heron
integration_test/src/python/integration_test/topology/one_spout_bolt_multi_tasks/one_spout_bolt_multi_tasks.py
1
1368
#!/usr/bin/env python # -*- encoding: utf-8 -*- # copyright 2016 twitter. 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...
apache-2.0
9,151,532,406,057,182,000
39.235294
81
0.741228
false
3.768595
true
false
false
burtgulash/PaTrie
patrie.py
1
2824
#!/usr/bin/python3 class TNode: def __init__(self, children): self.children = children def is_leaf(self): return self.children is None def __repr__(self): return repr(self.children) class PaTrie: def __init__(self): self.root = None def __contains__(self, word...
mit
-5,929,119,131,326,029,000
24.672727
113
0.410765
false
4.092754
false
false
false
stringertheory/names
update_meter.py
1
4118
import sys import string import termcolor import pymongo import pronouncing import unidecode import distance # a decorator that caches functions but stores results with a db backend would be nice. def mongo_collection(): collection = pymongo.MongoClient().poetry.poems return collection def word_tokenize(sen...
mit
-8,512,225,107,606,674,000
29.503704
123
0.575765
false
3.706571
false
false
false
chromatic-universe/imap2017
src/imap-python-gadget/cci_imap_gadget/core_on_login.py
1
4756
# core_on_login.py chromatic universe william k. johnson 2018 from time import sleep #cci from cci_imap_gadget.imap_gadget_base import cci_chilkat , \ cci_ecosys , \ cci_mini_imap_mail from cci_imap_gadget.core_on_logout i...
mit
2,335,134,393,039,799,300
34.22963
108
0.353869
false
4.858018
false
false
false
uclmr/inferbeddings
tests/inferbeddings/adversarial/closedform/test_lifted_simple_distmult_unit_cube.py
1
3989
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf from inferbeddings.models import base as models from inferbeddings.models import similarities from inferbeddings.knowledgebase import Fact, KnowledgeBaseParser from inferbeddings.parse import parse_clause from inferbeddings.models.training import cons...
mit
-1,489,150,325,355,351,800
36.632075
116
0.610679
false
3.922321
false
false
false
uskudnik/ggrc-core
src/ggrc_workflows/migrations/versions/20150514130212_1431e7094e26_add_new_notification_type.py
1
1859
"""add new notification type Revision ID: 1431e7094e26 Revises: 2b89912f95f1 Create Date: 2015-05-14 13:02:12.165612 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column from datetime import timedelta, date from sqlalchemy import and_ from ggrc import db from ggrc_workflows.mo...
apache-2.0
2,134,548,577,250,535,400
26.338235
77
0.669715
false
3.568138
false
false
false
shimpe/frescobaldi
frescobaldi_app/matcher.py
1
7388
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
-4,223,175,629,480,719,000
34.864078
87
0.611668
false
4.330598
false
false
false
TriggeredMessaging/pydotmailer
pydotmailer.py
1
26995
# pydotmailer - A lightweight wrapper for the dotMailer API, written in Python. # Copyright (c) 2012 Triggered Messaging Ltd, released under the MIT license # Home page: # https://github.com/TriggeredMessaging/pydotmailer/ # See README and LICENSE files. # # dotMailer API docs are at http://www.dotmailer.co.uk/api/ # T...
mit
7,280,185,620,400,163,000
54.204499
215
0.544619
false
4.276097
false
false
false
Runscope/pysaml2
tests/test_30_mdstore.py
1
7860
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import re from saml2.httpbase import HTTPBase from saml2.mdstore import MetadataStore, MetaDataMDX from saml2.mdstore import destinations from saml2.mdstore import name from saml2 import md from saml2 import sigver from saml2 import BINDING_SOAP from saml2...
bsd-2-clause
1,031,400,579,156,348,700
30.063241
104
0.630233
false
3.077134
true
false
false
python-xlib/python-xlib
examples/xdamage.py
1
4638
#!/usr/bin/python # # examples/xdamage.py -- demonstrate damage extension # # Copyright (C) 2019 Mohit Garg <mrmohitgarg1990@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation...
lgpl-2.1
-16,081,992,391,398,216
32.366906
112
0.609314
false
3.540458
false
false
false
lindegroup/lookback
config/models.py
1
1764
# This Python file uses the following encoding: utf-8 # Part of the Lookback project (https://github.com/lindegroup/lookback) # Copyright 2015 The Linde Group Computer Support, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
apache-2.0
6,610,376,122,505,525,000
35.75
77
0.670635
false
4.281553
false
false
false
louiejtaylor/pyViKO
examples/batch.py
1
1173
if __name__ == '__main__': ##### ##temporary dev hack import os,time os.chdir('..') ##### from pyviko import core, mutation, restriction #ovr = core.readFasta('test/dem/over/2000.fasta') #toKO = core.readFasta('test/dem/ko/2000.fasta') '''#True batch script t1 = time.time() for i in range(len(toKO)): ...
mit
7,485,453,507,291,470,000
26.302326
79
0.658994
false
2.423554
false
false
false
tangledhelix/dp_pp_utils
make_project.py
1
11438
#!/usr/bin/env python3 import json import requests import os import sys import re import shutil from os.path import basename from jinja2 import Template from subprocess import call from trello import TrelloClient from zipfile import ZipFile AUTH_CONFIG = "auth-config.json" TRELLO_TEMPLATE = "TEMPLATE: PPgen workflow...
mit
-6,135,142,467,199,165,000
34.302469
164
0.539255
false
3.633418
false
false
false
sahlinet/fastapp
fastapp/api_serializers.py
1
3087
from rest_framework import serializers from rest_framework.reverse import reverse from fastapp.models import Base, Apy, Setting, Counter, TransportEndpoint, Transaction, LogEntry import logging logger = logging.getLogger(__name__) class CounterSerializer(serializers.ModelSerializer): class Meta: model =...
mit
-5,149,677,560,269,219,000
29.564356
101
0.63816
false
4.056505
false
false
false
kern3020/opportunity
opportunity/tracker/migrations/0002_auto__add_mentorship.py
1
13807
# -*- 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 'Mentorship' db.create_table('tracker_mentorship', ( ('id', self.gf('django.db.mo...
mit
-6,980,998,740,839,843,000
71.673684
182
0.539581
false
3.700616
false
false
false
adhish20/TwitterWithCassandra
users/forms.py
1
1902
import uuid from django import forms import cass class LoginForm(forms.Form): username = forms.CharField(max_length=30) password = forms.CharField(widget=forms.PasswordInput(render_value=False)) def clean(self): username = self.cleaned_data['username'] password = self.cleaned_data['p...
mit
3,853,147,340,635,723,000
34.222222
79
0.638275
false
4.303167
false
false
false
tobiasgehring/qudi
logic/sequence_generator_logic.py
1
52322
# -*- coding: utf-8 -*- """ This file contains the Qudi sequence generator logic for general sequence structure. Qudi is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your ...
gpl-3.0
-7,307,263,554,439,006,000
50.447394
191
0.595218
false
4.409405
true
false
false
rcgee/oq-hazardlib
openquake/hazardlib/site.py
1
18827
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
agpl-3.0
877,749,385,576,351,600
37.738683
79
0.616296
false
3.922292
false
false
false
gsnbng/erpnext
erpnext/loan_management/doctype/loan_disbursement/test_loan_disbursement.py
1
3110
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import (nowdate, add_days, get_datetime, get_first_day, get_last_day, date_diff, flt, add_to_date) from erpnext.loan_mana...
agpl-3.0
3,905,159,435,813,598,700
41.60274
150
0.736334
false
2.871653
true
false
false
jmhal/CCAPython
framework/manage/services.py
1
9027
from CCAPython.gov.cca import Services from CCAPython.gov.cca.ports import ConnectionEventService from CCAPython.gov.cca.ports import EventType from CCAPython.framework.info.connectioninfo import ConnectionEvent from CCAPython.framework.common.typemap import TypeMapDict from CCAPython.framework.common.exceptions import...
apache-2.0
4,384,464,468,484,002,300
30.127586
142
0.643625
false
4.006658
false
false
false
JensTimmerman/radical.pilot
src/radical/pilot/utils/analysis.py
1
12671
import os # ------------------------------------------------------------------------------ # def get_experiment_frames(experiments, datadir=None): """ read profiles for all sessions in the given 'experiments' dict. That dict is expected to be like this: { 'test 1' : [ [ 'rp.session.thinkie.merzky.01...
mit
-4,651,960,791,394,131,000
34.793785
113
0.475495
false
4.072967
true
false
false
ludojmj/treelud
server/paramiko/dsskey.py
1
6975
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License,...
mit
-2,605,472,682,343,415,000
33.227273
100
0.567455
false
3.540609
false
false
false
snipsco/snipsskills
snipsmanager/utils/microphone_setup.py
1
1997
# -*-: coding utf-8 -*- """ Downloader for Snips assistants. """ import os import shutil from .os_helpers import cmd_exists, is_raspi_os, execute_command, pipe_commands from .. import ASOUNDCONF_DEST_PATH # pylint: disable=too-few-public-methods class MicrophoneSetup: """ Downloader for Snips assistants. """ ...
mit
-8,214,272,238,034,088,000
33.431034
98
0.625939
false
3.503509
false
false
false
edickie/ciftify
ciftify/bin/ciftify_seed_corr.py
1
8983
#!/usr/bin/env python3 """ Produces a correlation map of the mean time series within the seed with every voxel in the functional file. Usage: ciftify_seed_corr [options] <func> <seed> Arguments: <func> functional data (nifti or cifti) <seed> seed mask (nifti, cifti or gifti) Options: ...
mit
-9,101,947,211,567,938,000
36.902954
120
0.649338
false
3.393653
false
false
false
Linutronix/elbe
elbepack/initvmaction.py
1
23779
# ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (c) 2015-2017 Manuel Traut <manut@linutronix.de> # Copyright (c) 2015-2018 Torben Hohn <torben.hohn@linutronix.de> # Copyright (c) 2015 Silvio Fricke <silvio.fricke@gmail.com> # Copyright (c) 2017 Philipp Arras <philipp.arras@linutronix.de> # Copyright (...
gpl-3.0
8,525,162,397,998,769,000
33.263689
118
0.529711
false
4.074537
false
false
false
Capitains/Nautilus
capitains_nautilus/flask_ext.py
1
7289
from pkg_resources import resource_filename import logging from copy import deepcopy from collections import defaultdict from flask import Blueprint, Response from capitains_nautilus.apis.cts import CTSApi from capitains_nautilus.apis.dts import DTSApi def _all_origins(): return "*" class FlaskNautilus(objec...
mpl-2.0
-642,994,500,773,671,200
32.131818
117
0.600494
false
4.406892
false
false
false
sbg2133/miscellaneous_projects
carina/ItoNH.py
1
1115
import numpy as np import matplotlib.pyplot as plt from astropy.io import fits import aplpy from astropy.wcs import WCS import sys, os from getIQU import IQU from astropy import coordinates as coord from astropy.coordinates import SkyCoord from astropy import units as u from scipy.interpolate import griddata plt.ion() ...
gpl-3.0
-8,403,188,222,198,603,000
24.340909
94
0.673543
false
2.488839
false
false
false
trasa/sprout
sprout/sprout/servicehosts.py
1
1382
import os from fabric.api import * def create_objects(cfg, service_hosts): """ Turn a list of service host info into objects that can do starting, stopping of services, or other things that we think up. """ return [ServiceHost( s['hostname'], s['services'],...
apache-2.0
-7,280,064,624,537,456,000
26.64
65
0.575977
false
4.175227
false
false
false
hqcckes/python-scheduler
Server/message.py
1
2650
# coding=utf-8 import os import sys import codecs import json import logging import logging.config from rpyc import Service from rpyc.utils.server import ThreadedServer from ConfigParser import SafeConfigParser class Message(Service): @staticmethod def exposed_send(message): import urllib2 l...
gpl-3.0
-404,603,665,324,014,900
26.066667
121
0.605911
false
2.673985
true
false
false
ContinuumIO/ashiba
enaml/enaml/qt/qt_stack_item.py
1
3902
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
bsd-3-clause
-7,036,452,119,728,805,000
30.467742
79
0.494106
false
5.330601
false
false
false
forgeservicelab/ansible-roles.django_saml_app
templates/settings.py
1
5840
""" Django settings for samldemo project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
mit
8,473,894,465,641,903,000
28.5
113
0.62089
false
3.582822
false
false
false
wil/pyroman
examples/example1/03_standard_chains.py
1
1452
""" Pyroman uses some standard chains, set in it's config. These chains are used by the "allow()", "reject()" and "drop()" commandos for nicer rule writing, and probably should do exactly that. If you want maximal performance, you'll want to change these to ACCEPT and DROP directly by calling 'Firewall.accept = "ACCEP...
mit
4,925,883,790,830,189,000
39.333333
79
0.74449
false
3.585185
false
false
false
ViderumGlobal/ckanext-requestdata
ckanext/requestdata/controllers/package.py
1
3021
from ckan.lib import base from ckan.common import c, _ from ckan import logic import ckan.model as model import ckan.lib.helpers as h from ckan.plugins import toolkit from ckan.controllers.package import PackageController as _PackageController import ckan.lib.navl.dictization_functions as dict_fns from ckanext.requestd...
agpl-3.0
-8,142,442,439,098,392,000
33.329545
78
0.503807
false
4.619266
false
false
false
Motolea/pentagram
aplicatiepentagram/Pentagram/views.py
1
3440
from django.shortcuts import render from django.contrib.auth.models import User from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework import status from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.authtoken.models import Token from...
gpl-3.0
409,339,148,438,177,900
39.952381
91
0.701744
false
3.860831
false
false
false
hlange/LogSoCR
.waf/waflib/extras/ocaml.py
1
9469
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2010 (ita) "ocaml support" import os, re from waflib import Utils, Task from waflib.Logs import error from waflib.TaskGen import feature, before_method, after_method, extension EXT_MLL = ['.mll'] EXT_MLY = ['.mly'] EXT_MLI = ['.mli'] EXT_MLC = ['.c'] EXT_ML...
agpl-3.0
1,413,643,713,363,514,400
27.607251
117
0.659521
false
2.664322
false
false
false
vlegoff/tsunami
src/primaires/format/editeurs/floatedit/__init__.py
1
4072
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
-354,768,347,464,347,840
41.505263
79
0.679297
false
3.539001
false
false
false
brunoabud/ic
plugins/ICGRAY2BGR/plugin_object.py
1
1150
# coding: utf-8 # Copyright (C) 2016 Bruno Abude Cardoso # # Imagem Cinemática is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Imag...
gpl-3.0
2,798,068,830,518,351,400
32.764706
75
0.705575
false
3.644444
false
false
false
meppe/ros-ort
src/frcnn/src/lib/pycocotools/mask.py
1
4062
__author__ = 'tsungyi' import lib.pycocotools._mask as _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply store...
gpl-3.0
-2,878,177,237,587,652,600
48.54878
100
0.699655
false
3.334975
false
false
false
joshcai/utdcs
processing/views.py
1
3030
# Create your views here. from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.template import RequestContext, loader from django.core.urlresolvers import reverse from django.shortcuts import render, get_object_or_404 from django.db.models import Q from website import secrets import datetime ...
mit
2,868,276,417,460,019,000
30.894737
114
0.69604
false
3.196203
false
false
false
azumimuo/family-xbmc-addon
plugin.video.specto/resources/lib/sources/kissanime_tv.py
1
4887
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
5,392,704,476,561,538,000
37.179688
135
0.544506
false
3.845004
false
false
false
openmips/stbgui
lib/python/Components/Renderer/NextEpgInfo.py
2
3268
from Components.VariableText import VariableText from Renderer import Renderer from enigma import eLabel, eEPGCache, eServiceReference from time import localtime, strftime from skin import parseColor class NextEpgInfo(Renderer, VariableText): def __init__(self): Renderer.__init__(self) VariableText.__init__(self)...
gpl-2.0
6,980,544,276,022,878,000
37.011628
158
0.678703
false
3.091769
false
false
false
WilliamMayor/pinscher
pinscher/Keyfile.py
1
1219
import string import pickle import os import utilities class Keyfile: LENGTH = 32 CHARACTERS = string.digits + string.letters + string.punctuation + ' ' @staticmethod def create(path, database_path, **kwargs): k = Keyfile() k.path = path k.database_path = os.path.abspath(dat...
gpl-3.0
-6,969,443,440,557,586,000
23.38
74
0.575062
false
3.693939
false
false
false
PyCQA/astroid
astroid/brain/brain_type.py
1
2187
""" Astroid hooks for type support. Starting from python3.9, type object behaves as it had __class_getitem__ method. However it was not possible to simply add this method inside type's body, otherwise all types would also have this method. In this case it would have been possible to write str[int]. Guido Van Rossum pr...
lgpl-2.1
-6,311,474,582,028,243,000
32.646154
108
0.715592
false
3.663317
false
false
false
gwwfps/boxrps
admin.py
1
15675
#!/usr/bin/env python import logging import yaml import cgi from xml.dom import minidom as md from datetime import datetime, timedelta from collections import defaultdict from google.appengine.ext import webapp from google.appengine.ext.webapp import util from google.appengine.ext import db from django.utils import sim...
mit
-3,077,891,950,705,445,000
38.987245
157
0.45008
false
4.490117
false
false
false
googleads/google-ads-python
google/ads/googleads/v7/services/types/campaign_budget_service.py
1
6329
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-8,298,692,412,461,880,000
36.229412
128
0.681624
false
4.070096
false
false
false
amonapp/amon
amon/apps/_account/forms.py
1
6520
from django import forms from django.contrib.auth import authenticate from django.conf import settings from django.contrib.auth import get_user_model # from amon.apps.notifications.models import notifications_model # from amon.apps.alerts.models import alerts_model # from amon.apps.account.models import user_preferenc...
agpl-3.0
8,258,274,880,384,959,000
29.905213
128
0.639724
false
4.137056
false
false
false
Micronaet/micronaet-production
production_accounting_external_closed/report/production_parser.py
1
2846
# -*- coding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
-6,230,255,985,330,158,000
35.961039
79
0.608925
false
4.136628
false
false
false
PU-Crypto/AES
Rijndael/KeySchedule.py
1
1376
# -*- coding: utf-8 -*- #KeySchedule from Rijndael.SubBytes import * from Rijndael.Tables import RijndaelRcon import math def RotWord(Spalte): #Verschiebe die Plaetze im Array output = list() output.append(Spalte[1]) output.append(Spalte[2]) output.append(Spalte[3]) output.append(Spalte[0]) ...
lgpl-3.0
7,545,850,936,786,939,000
28.913043
124
0.653343
false
2.656371
false
false
false
sbt9uc/osf.io
tests/api_tests/users/test_views.py
1
32030
# -*- coding: utf-8 -*- import urlparse from nose.tools import * # flake8: noqa from website.models import Node from website.util.sanitize import strip_html from tests.base import ApiTestCase from tests.factories import AuthUserFactory, DashboardFactory, FolderFactory, ProjectFactory from api.base.settings.defaults...
apache-2.0
1,204,231,969,254,728,200
46.949102
144
0.613862
false
3.383332
true
false
false
griffy/Pyap
pyap/library/db.py
1
2688
# Pyap - The Python Audio Player Library # # Copyright (c) 2012 Joel Griffith # Copyright (c) 2005 Joe Wreschnig # Copyright (c) 2002 David I. Lehn # Copyright (c) 2005-2011 the SQLAlchemy authors and contributors # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU L...
gpl-2.0
4,940,832,737,651,426,000
34.84
68
0.682292
false
4.097561
false
false
false
magchips/labalyzer
setup.py
1
3470
#!/usr/bin/env python # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2010 <Atreju Tauschinsky> <Atreju.Tauschinsky@gmx.de> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version ...
gpl-3.0
3,448,645,533,441,506,300
34.030303
99
0.580161
false
3.72103
false
false
false
olga-perederieieva/pyDEA
pyDEA/main.py
1
3347
''' This module contains methods for running pyDEA from terminal. ''' import sys from pyDEA.core.data_processing.parameters import parse_parameters_from_file from pyDEA.core.utils.run_routine import RunMethodTerminal from pyDEA.core.utils.dea_utils import clean_up_pickled_files, get_logger def main(filename, output_...
mit
2,119,575,361,617,346,300
45.486111
96
0.574544
false
4.456724
false
false
false
wireservice/csvkit
setup.py
1
2897
#!/usr/bin/env python import sys from setuptools import setup install_requires = [ 'agate>=1.6.1', 'agate-excel>=0.2.2', 'agate-dbf>=0.2.0', 'agate-sql>=0.5.3', 'six>=1.6.1', 'setuptools', ] if sys.version_info < (2, 7): install_requires.append('argparse>=1.2.1') install_requires.appe...
mit
7,940,495,066,647,459,000
37.626667
104
0.622023
false
3.752591
false
false
false
ZachMassia/platformio
platformio/builder/scripts/nordicnrf51.py
1
2079
# Copyright 2014-2016 Ivan Kravets <me@ikravets.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
3,195,199,141,947,326,000
26
79
0.685426
false
3.391517
false
false
false
Oli76/rwslib
rwslib/builders.py
1
77124
# -*- coding: utf-8 -*- __author__ = 'isparks' import uuid from xml.etree import cElementTree as ET from datetime import datetime from string import ascii_letters from rwslib.builder_constants import * """ builders.py provides convenience classes for building ODM documents for clinical data and metadata post messages...
mit
-2,991,630,257,282,767,400
33.787551
121
0.603444
false
4.042562
false
false
false
toddheitmann/PetroPy
setup.py
1
1590
"""Setup script for PetroPy""" from setuptools import setup from os import path from petropy import __version__ with open(path.join(path.dirname(__file__), "requirements.txt"), "r") as f: requirements = f.read().splitlines() with open(path.join(path.dirname(__file__), "README.rst"), "r") as f: long_descripti...
mit
8,575,491,469,597,915,000
37.780488
101
0.637107
false
4.025316
false
false
false
saisankargochhayat/algo_quest
leetcode/115. Distinct Subsequences/soln.py
1
1479
from functools import lru_cache class Solution: def numDistinct(self, s: str, t: str) -> int: @lru_cache(maxsize=None) def helper(i, j): M, N = len(s), len(t) if i == M or j == N or M-i < N-j: return int(j == N) # if i of s and j of s...
apache-2.0
3,884,121,225,222,017,000
27.461538
74
0.408384
false
4.019022
false
false
false
benob/chainer
chainer/functions/evaluation/accuracy.py
1
2436
import numpy import six from chainer import cuda from chainer import function from chainer.utils import type_check class Accuracy(function.Function): def __init__(self, ignore_label=None): self.ignore_label = ignore_label def check_type_forward(self, in_types): type_check.expect(in_types.si...
mit
-7,014,396,633,179,930,000
31.918919
78
0.573481
false
3.747692
false
false
false
zakirovandrey/cfmaxwell
src/genConeFold.py
1
21709
#!/usr/bin/python # -*- coding: utf-8 -*- import sys from types import * from operator import * def makeCombinations(lst, res=['']): if len(lst)<=0: return res else: return makeCombinations(lst[:-1], [c+n for n in res for c in lst[-1]]) class CFact: def __init__(self, Gen, actN): self.Gen=Gen; self.actN=act...
gpl-2.0
-776,956,531,473,899,800
54.430446
291
0.592831
false
2.347338
false
false
false
atom-bomb/drill_from_image
drill_from_image.py
1
11733
#!/usr/bin/python # # Hey, here's a thing: # # You can use this bit of python script to generate GCode to drill a PCB based on an image file that you used # to etch the board. # # This script makes GCode to drill the center of sections of an image that are a given color or brightness. # # All you need to do is load the...
unlicense
695,087,722,139,142,000
32.618911
112
0.594903
false
3.143048
false
false
false
735tesla/SkypeDump
skypedump.py
1
6469
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import unicodedata import webbrowser import hashlib import sqlite3 as sqlite import xml.etree.ElementTree as ET import platform import sys class ChatMessage(object): def __init__(self): super(ChatMessage, self).__init__() self.from_username = '[da...
gpl-2.0
962,441,054,399,818,200
27.004329
126
0.64554
false
2.893113
false
false
false
jtauber/czerny
prototypes/process_hanon_21.py
1
2417
#!/usr/bin/env python from align import nw_align def load_score(filename): score = [] for line in open(filename): note, duration_64 = line.strip().split() note = int(note) duration_64 = int(duration_64) score.append((note, duration_64)) return score def load_performan...
mit
829,367,193,271,788,400
29.2125
79
0.599917
false
4.196181
false
false
false
Farthen/OTFBot
otfbot/plugins/ircClient/seen.py
1
2384
# This file is part of OtfBot. # # OtfBot 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. # # OtfBot is distributed in the hope that it...
gpl-2.0
-1,188,863,002,668,787,700
36.25
176
0.599832
false
3.701863
false
false
false
QuantiModo/QuantiModo-SDK-Python
SwaggerPetstore/models/connector.py
1
3170
#!/usr/bin/env python # coding: utf-8 """ 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 Unle...
gpl-2.0
-8,626,761,504,861,406,000
31.346939
100
0.561199
false
4.408901
false
false
false
mvsaha/blahb
blahb/label.py
1
15233
import numba from .utils import exponential_search from .strgen import * def _split_init_into_coords_init_str(dim): return "coords_{} = loc[:, {}]".format(dim, dim) def split_init_into_coords_init_str(ndim): return '\n'.join([_split_init_into_coords_init_str(dim) for dim in range(ndim)...
mit
230,391,288,093,049,820
31.551282
101
0.601589
false
3.208298
false
false
false
istio/tools
perf/docker/rabbitmq/client.py
1
2647
# Copyright Istio Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
apache-2.0
3,253,971,791,620,770,300
23.738318
74
0.649037
false
3.944858
false
false
false
HybridF5/jacket
jacket/api/compute/openstack/compute/legacy_v2/contrib/floating_ip_pools.py
1
2154
# Copyright (c) 2011 X.commerce, a business unit of eBay 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 req...
apache-2.0
1,853,800,950,264,657,400
31.149254
78
0.65506
false
4.018657
false
false
false
pekkosk/hotbit
hotbit/containers/chiralwedge.py
1
5906
from __future__ import division import numpy as np from box.mix import phival from math import sin,cos from weakref import proxy import warnings class ChiralWedge: def __init__(self,atoms,type): ''' Class for chiral+wedge boundary conditions. @param: atoms hotbit.Atoms instance ...
gpl-2.0
-158,940,071,351,519,900
35.45679
119
0.532509
false
3.612232
false
false
false
asidev/aybu-core
aybu/core/models/user.py
1
7972
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2010-2012 Asidev s.r.l. 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 b...
apache-2.0
5,875,499,489,000,414,000
33.214592
81
0.568239
false
4.608092
false
false
false
uw-it-aca/sqlshare-rest
sqlshare_rest/views/download.py
1
1410
from oauth2_provider.decorators import protected_resource from django.views.decorators.csrf import csrf_exempt from django.core.urlresolvers import reverse from django.http import HttpResponse from sqlshare_rest.views import get_oauth_user, get403, get404, get400, get405 from sqlshare_rest.util.db import get_backend fr...
apache-2.0
3,505,049,341,933,977,000
27.77551
78
0.70922
false
3.615385
false
false
false
yakky/djangocms-text-ckeditor
tests/test_field.py
1
2818
# -*- coding: utf-8 -*- from django.template import Context, Template from django.utils.safestring import SafeData from djangocms_helper.base_test import BaseTestCase from tests.test_app.forms import SimpleTextForm from tests.test_app.models import SimpleText from djangocms_text_ckeditor.fields import HTMLFormField ...
bsd-3-clause
-3,695,870,091,653,139,500
36.078947
86
0.635912
false
3.580686
true
false
false
evansde77/cirrus
src/cirrus/delegate.py
1
2385
#!/usr/bin/env python """ _delegate_ Main cirrus command that delegates the call to the sub command verb enabling git cirrus do_a_thing to be routed to the appropriate command call for do_a_thing """ import os import os.path import pkg_resources import sys import signal import subprocess import cirrus.environment ...
apache-2.0
-2,823,482,492,811,789,000
21.932692
75
0.600419
false
3.61912
false
false
false
moreati/revelation
epiphany/test/test_execute_bitwise.py
1
7492
from pydgin.utils import trim_32 from epiphany.instruction import Instruction from epiphany.isa import decode from epiphany.machine import RESET_ADDR from epiphany.test.machine import StateChecker, new_state import opcode_factory import pytest @pytest.mark.parametrize('rn,rm,is16bit', [(-1, 28, True), ...
bsd-3-clause
-798,977,002,079,429,200
44.406061
79
0.49693
false
3.701581
true
false
false
nbari/my-sandbox
python/email/server.py
1
1444
import smtplib import smtpd import asyncore import email.utils from email.mime.text import MIMEText import threading class SMTPReceiver(smtpd.SMTPServer): def process_message(self, peer, mailfrom, rcpttos, data): print 'Receiving message from:', peer print 'Message addressed from:', mailfrom ...
bsd-3-clause
-5,075,651,557,787,795,000
28.469388
71
0.549169
false
4.415902
false
false
false
laurentb/weboob
modules/onlinenet/module.py
1
2721
# -*- coding: utf-8 -*- # Copyright(C) 2016 Edouard Lambert # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the...
lgpl-3.0
-5,601,386,455,273,830,000
35.77027
127
0.714076
false
4.091729
false
false
false
kanairen/RegularIcosahedronDict
src/map/factory/base_shape_map_factory.py
1
4162
#!/usr/bin/env python # coding: utf-8 import numpy as np from src.obj.obj3d import Obj3d from src.obj.grid.base_grid import BaseGrid class BaseShapeMapFactory(object): DIST_UNDEFINED = -1 def __init__(self, model_id, obj3d, grid, n_div, cls, grid_scale): """ :type model_id: int or long: ...
mit
-6,878,317,469,387,684,000
24.382353
78
0.548378
false
2.353102
false
false
false
ikben/troposphere
examples/WAF_Common_Attacks_Sample.py
1
5554
# Converted from AWS WAF Sample located at: # https://s3.amazonaws.com/cloudformation-examples/community/common-attacks.json from troposphere import ( Template, Parameter, Join, Ref ) from troposphere.waf import ( Rule, SqlInjectionMatchSet, WebACL, SizeConstraintSet, IPSet, Xss...
bsd-2-clause
-8,663,083,156,962,772,000
23.359649
80
0.541232
false
3.878492
false
false
false
jonlatorre/VideoCargador
video/models.py
1
1791
# encoding: utf-8 from django.db import models import os from mencoder import * class Video(models.Model): """This is a small demo using just two fields. The slug field is really not necessary, but makes the code simpler. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtual...
mit
5,213,071,513,827,455,000
35.55102
79
0.654941
false
3.589178
false
false
false
mrshu/scikit-learn
examples/plot_permutation_test_for_classification.py
1
2236
""" ================================================================= Test with permutations the significance of a classification score ================================================================= In order to test if a classification score is significative a technique in repeating the classification procedure aft...
bsd-3-clause
4,989,806,373,800,379,000
31.882353
79
0.61449
false
3.594855
false
false
false
codebikeclimb/NASARobotComp
Robot2017_Master/Robot2016/motorTest.py
1
2963
#!/usr/bin/python from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor import serial import time import atexit #initialize i2c communication with motor shield roboMotor = Adafruit_MotorHAT(addr=0x60) #initialize serial communications with XBee RF reciever xBee = serial.Serial('/dev/ttyACM1',57600) compas...
gpl-3.0
-6,703,005,234,935,376,000
21.792308
75
0.76949
false
2.746061
false
false
false
rzinkstok/skymap
skymap/labeling/runner.py
1
2495
import time import random from PIL import Image, ImageDraw from skymap.labeling.common import Point, BoundingBox, evaluate, POSITION_WEIGHT from skymap.labeling.greedy import GreedyLabeler, AdvancedGreedyLabeler from skymap.labeling.grasp import GraspLabeler from skymap.labeling.genetic import GeneticLabeler, CachedGe...
gpl-3.0
-6,816,814,384,139,079,000
27.678161
80
0.578357
false
3.198718
false
false
false
google/mannequinchallenge
loaders/aligned_data_loader.py
1
1933
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
apache-2.0
-2,236,632,270,222,474,800
34.796296
84
0.578893
false
4.423341
false
false
false
xemul/p.haul
phaul/connection.py
1
1171
# # p.haul connection module contain logic needed to establish connection # between p.haul and p.haul-service. # import logging import socket import util class connection(object): """p.haul connection Class encapsulate connections reqired for p.haul work, including rpc socket (socket for RPC calls), memory socke...
lgpl-2.1
-7,130,818,278,763,077,000
23.914894
76
0.733561
false
3.147849
false
false
false
AQORN/thunder-engine
thunder_web/api/views.py
1
1791
from django.shortcuts import render from rest_framework import status from rest_framework.decorators import api_view # from rest_framework.response import Response from task.models import Task from api.serializers import TaskSerializer # @api_view(['GET', 'POST']) def task_list(request): """ List all tasks, ...
gpl-3.0
-5,743,528,586,565,458,000
27.428571
76
0.638749
false
4.174825
false
false
false
PyBossa/pybossa
test/test_sched_depth_first_all.py
1
48364
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
3,603,119,875,285,052,000
39.744735
106
0.57549
false
3.753512
true
false
false
alxnov/ansible-modules-core
cloud/amazon/ec2_vol.py
1
22132
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
-8,963,196,909,828,346,000
32.482602
414
0.628682
false
3.838363
false
false
false
tjcsl/cslbot
cslbot/commands/metar.py
1
2400
# -*- coding: utf-8 -*- # Copyright (C) 2013-2018 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Tris Wilson # # 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 Softw...
gpl-2.0
6,708,503,875,459,143,000
35.923077
135
0.64125
false
3.896104
false
false
false
googleapis/google-api-java-client-services
generator/src/googleapis/codegen/schema.py
1
18349
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-3,918,453,363,792,271,400
37.548319
80
0.642378
false
4.031861
false
false
false
dthgeek/QuickOSM
core/actions.py
1
4118
# -*- coding: utf-8 -*- """ /*************************************************************************** QuickOSM A QGIS plugin OSM Overpass API frontend ------------------- begin : 2014-06-11 copyright : (C) 2014 by 3Liz email ...
gpl-2.0
1,764,082,413,191,741,200
34.196581
78
0.448033
false
4.805134
false
false
false
Amber-MD/ambertools-conda-build
conda_tools/test/test_fix_conda_gfortran_linking_osx.py
1
1041
# pytest -vs . import os import sys from mock import patch import shutil sys.path.insert(0, '..') from fix_conda_gfortran_linking_osx import repack_conda_package, main this_dir = os.path.dirname(__file__) PACK_SCRIPT = os.path.join(this_dir, '..', 'pack_binary_without_conda_install.py') FA...
mit
669,227,652,938,590,500
26.394737
79
0.635927
false
2.949008
false
false
false
brightiup/brightiup
brightiup/compiler/bt_lexer.py
1
1391
import ply.lex as lex class BTLexerException(Exception): def __init__(self, message): self.message = message def __str__(self): return self.message class BTLexer(object): """BT lexer""" keywords = [ # "import", "state", ] tokens = [keyword.upper() for keyword ...
gpl-2.0
-243,517,580,238,202,750
21.803279
88
0.4867
false
3.557545
false
false
false
holzman/glideinwms-old
lib/condorMonitor.py
1
24800
# # Project: # glideinWMS # # File Version: # # Description: # This module implements classes to query the condor daemons # and manipulate the results # Please notice that it also converts \" into " # # Author: # Igor Sfiligoi (Aug 30th 2006) # import condorExe import condorSecurity import os import string ...
bsd-3-clause
6,990,342,089,642,197,000
31.124352
148
0.586048
false
3.561172
false
false
false
apuigsech/emv-framework
iso7816.py
1
5968
#!/usr/bin/python # # Python ISO7816 (as part of EMV Framework) # Copyrigh 2012 Albert Puigsech Galicia <albert@puigsech.com> # # This code 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; eithe...
gpl-3.0
7,305,658,734,531,248,000
22.131783
95
0.649464
false
2.385292
false
false
false