repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kabachook/wpa2auditor | client/client.py | 1 | 11577 | # /usr/bin/env python3
import gzip
import hashlib
import os
import queue
import shlex
import shutil
import subprocess
import threading
import time
import requests
# API conf
base_url = 'http://inlovewith.space/dev/web'
get_work_url = base_url + '/?get_job'
put_work_url = base_url + '/?put_job'
agents_url = base_url + ... | gpl-3.0 | 8,679,669,765,285,200,000 | 33.558209 | 119 | 0.474043 | false | 4.035204 | false | false | false |
TeslaProject/external_chromium_org | tools/cr/cr/visitor.py | 102 | 6459 | # Copyright 2013 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.
""".
"""
import collections
# HIDDEN is a marker used to suppress a value, making it as if it were not set
# in that object. This causes the search to cont... | bsd-3-clause | -6,565,581,968,750,119,000 | 23.842308 | 80 | 0.653507 | false | 3.962577 | false | false | false |
rnevius/eventio | events/views.py | 1 | 1752 | from django.contrib import messages
from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.utils import timezone
from .forms import AddEventForm
from .models import Event
def index(reque... | mit | -8,205,983,128,243,635,000 | 28.2 | 88 | 0.6621 | false | 3.759657 | false | false | false |
fxia22/pointGAN | show_ae3.py | 1 | 3066 | from __future__ import print_function
from show3d_balls import *
import argparse
import os
import random
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
import torchvision.datasets as dset
import torc... | mit | -5,690,861,851,509,093,000 | 25.431034 | 140 | 0.654925 | false | 2.889727 | false | false | false |
amiv-eth/amivapi | amivapi/tests/events/test_validators.py | 1 | 11173 | # -*- coding: utf-8 -*-
#
# license: AGPLv3, see LICENSE for details. In addition we strongly encourage
# you to buy us beer if we meet and you like the software.
"""Test general purpose validators of event module."""
from datetime import datetime
import json
from freezegun import freeze_time
from amivapi.... | agpl-3.0 | -4,610,421,993,687,688,700 | 30.922857 | 80 | 0.447776 | false | 3.89032 | true | false | false |
vlkv/reggata | reggata/gui/user_dialog.py | 1 | 2482 | # -*- coding: utf-8 -*-
'''
Created on 17.10.2010
@author: vlkv
'''
import PyQt4.QtGui as QtGui
import PyQt4.QtCore as QtCore
from reggata.data.db_schema import User
from reggata.ui.ui_userdialog import Ui_UserDialog
from reggata.helpers import show_exc_info, computePasswordHash
from reggata.errors import UnsupportedDi... | gpl-3.0 | -6,034,244,934,411,720,000 | 31.233766 | 96 | 0.630943 | false | 3.866044 | false | false | false |
aturki/pyATK | pyATK/Cmd/Helpers/ProgressHelper.py | 1 | 1248 | # -*- coding: utf-8 -*-
class ProgressBarHelper:
"""
>>> helper = ProgressBarHelper()
>>> helper.setWidth(80)
>>> helper.getWidth()
80
>>> helper.advance(10)
\r|=======> | 10%
>>> helper.advance(90)
\r|=========... | mit | -5,375,665,265,703,907,000 | 29.439024 | 93 | 0.46234 | false | 4.216216 | false | false | false |
rpm-software-management/dnf-plugins-core | plugins/builddep.py | 1 | 9176 | # builddep.py
# Install all the deps needed to build this package.
#
# Copyright (C) 2013-2015 Red Hat, Inc.
# Copyright (C) 2015 Igor Gnatenko
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public Li... | gpl-2.0 | 4,788,397,146,966,350,000 | 37.554622 | 93 | 0.586094 | false | 4.127755 | false | false | false |
unho/pootle | pootle/apps/pootle_score/migrations/0003_add_pootle_user_store_score.py | 7 | 1645 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-14 19:45
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('pootle_store', '0045_remov... | gpl-3.0 | -2,717,456,072,295,553,500 | 40.125 | 147 | 0.595137 | false | 4.071782 | false | false | false |
rvelhote/sniffr | sniffr.py | 1 | 8407 | # This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# # In jurisdictions that r... | unlicense | -3,042,249,079,783,944,000 | 34.774468 | 139 | 0.689663 | false | 3.769955 | true | false | false |
sapcc/monasca-agent | monasca_setup/detection/plugins/postfix.py | 1 | 1848 | # (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
import grp
import logging
import os
import yaml
import monasca_setup.agent_config
import monasca_setup.detection
log = logging.getLogger(__name__)
class Postfix(monasca_setup.detection.Plugin):
"""If postfix is running install the default conf... | bsd-3-clause | 1,070,247,511,892,776,700 | 35.235294 | 123 | 0.626082 | false | 4.088496 | true | false | false |
itiboi/overpass-api-python-wrapper | overpass/api.py | 1 | 5604 | import requests
import json
import geojson
import logging
from .errors import (OverpassSyntaxError, TimeoutError, MultipleRequestsError,
ServerLoadError, UnknownOverpassError, ServerRuntimeError)
class API(object):
"""A simple Python wrapper for the OpenStreetMap Overpass API."""
SUPPOR... | apache-2.0 | -3,313,925,820,847,947,000 | 32.556886 | 79 | 0.556388 | false | 4.721146 | false | false | false |
ytisf/PyExfil | pyexfil/Stega/png_transparency/__init__.py | 1 | 5092 |
import os
import sys
import array
from PIL import Image
from pyexfil.includes.general import _is_slice_in_list
from pyexfil.includes.encryption_wrappers import AESEncryptOFB, AESDecryptOFB
from pyexfil.includes.image_manipulation import _openImage, _image2pixelarray
MAX_IMAGE_ROW_LENGTH = 1024
TERMINATOR ... | mit | 176,659,726,048,619,330 | 33.405405 | 124 | 0.632757 | false | 3.065623 | false | false | false |
grahamgilbert/munki_conditions | on_corp/on_corp.py | 1 | 1886 | #!/usr/bin/python
import urllib2
import os
import plistlib
import errno
from Foundation import CFPreferencesCopyAppValue
# Address that should be available when the device is on coprporate network
target = 'https://yourcorportateresource.com/somewhere.plist'
def check_connectivity():
req = urllib2.Request(targe... | apache-2.0 | 330,802,664,656,526,200 | 28.952381 | 93 | 0.674973 | false | 4.135965 | false | false | false |
AlexeiBuzuma/LocalComputeNetworks | sft/common/socket_manager.py | 1 | 3124 | import logging
import select
import socket
from sft.common.utils.common import Singleton
LOG = logging.getLogger(__name__)
class SocketManager(metaclass=Singleton):
"""Centralized point of socket control."""
def __init__(self):
self._sockets = {}
self._sockets_list = []
self.readab... | mit | -4,641,433,667,750,161,000 | 32.956522 | 86 | 0.617798 | false | 3.959442 | false | false | false |
scotthuang1989/timesheet | timesheet/urls.py | 1 | 1148 | """timesheet URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | apache-2.0 | 4,818,480,096,358,460,000 | 38.586207 | 79 | 0.695122 | false | 3.54321 | false | false | false |
54lihaoxin/leetcode_python | src/LargestRectangleInHistogram/solution.py | 1 | 1383 | # Largest Rectangle in Histogram
#
# Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
#
#
# Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
#
#
# The largest rectangl... | apache-2.0 | 1,901,906,223,968,967,400 | 24.634615 | 158 | 0.510484 | false | 3.610966 | false | false | false |
malin1993ml/h-store | tools/traces/hstoretraces/traceelements.py | 9 | 9643 | # -*- coding: utf-8 -*-
import sys
import json
import logging
from common import *
## ==============================================
## AbstractTraceElement
## ==============================================
class AbstractTraceElement(object):
def __init__(self, catalog_name = None, params = [ ], output = [ ], sta... | gpl-3.0 | -6,496,811,619,680,988,000 | 36.968504 | 185 | 0.526392 | false | 3.952049 | false | false | false |
google/rekall | rekall-core/rekall/plugins/imagecopy.py | 1 | 3804 | from __future__ import division
# Rekall Memory Forensics
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Authors:
# Mike Auty <mike.auty@gmail.com>
# Michael Cohen <scudette@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | gpl-2.0 | 245,622,299,840,626,780 | 34.222222 | 80 | 0.615931 | false | 4.152838 | false | false | false |
Rapptz/discord.py | examples/views/ephemeral.py | 1 | 1945 | from discord.ext import commands
import discord
class EphemeralCounterBot(commands.Bot):
def __init__(self):
super().__init__(command_prefix=commands.when_mentioned_or('$'))
async def on_ready(self):
print(f'Logged in as {self.user} (ID: {self.user.id})')
print('------')
# Define a s... | mit | -6,097,081,452,323,230,000 | 40.382979 | 89 | 0.699229 | false | 3.905622 | false | false | false |
linsalrob/PhiSpy | PhiSpyModules/writers.py | 1 | 15098 | """
A module to write the output in different formats
"""
import os
import gzip
from argparse import Namespace
from Bio import SeqIO
from Bio.SeqFeature import SeqFeature, FeatureLocation
from collections import OrderedDict
from BCBio import GFF # bcbio-gff package
import PhiSpyModules.version as version
from .log_... | mit | -379,613,921,374,714,800 | 36.279012 | 119 | 0.563518 | false | 3.312418 | true | false | false |
lunatik-210/microservices | case-study/gateway/app/rest/resources/user.py | 1 | 2305 | # -*- coding: utf-8 -*-
import traceback
from flask import request, current_app
from flask.ext.restful import Resource
from app.rest import make_response, make_response_by_response, CODES
import requests
class UserResource(Resource):
def options(self, id):
try:
return make_response(None, COD... | gpl-3.0 | -780,586,557,241,347,800 | 36.177419 | 107 | 0.617354 | false | 4.108734 | false | false | false |
beckett1124/Paddle | python/paddle/data/mnist.py | 1 | 4609 | #/usr/bin/env python
# -*- coding:utf-8 -*-
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... | apache-2.0 | -1,515,730,689,393,142,800 | 27.282209 | 102 | 0.634845 | false | 3.35444 | true | false | false |
open-craft/dalite-ng | peerinst/heartbeat_checks.py | 1 | 1078 | import urllib2
from django.core.files.storage import default_storage
from django.core.files.base import ContentFile
from django.db.utils import DatabaseError
from peerinst import models
from sanity_check import SanityCheckResult, test_global_free_percentage
def check_db_query():
try:
models.Question.ob... | agpl-3.0 | -6,607,961,870,019,354,000 | 29.8 | 75 | 0.71243 | false | 4.277778 | false | false | false |
GeoscienceAustralia/eo-datasets | eodatasets3/prepare/sentinel_l1c_prepare.py | 2 | 12715 | """
Prepare eo3 metadata for Sentinel-2 Level 1C data produced by Sinergise or esa.
Takes ESA zipped datasets or Sinergise dataset directories
"""
import fnmatch
import json
import logging
import sys
import uuid
import zipfile
from pathlib import Path
from typing import Tuple, Dict, List, Optional, Iterable, Mapping
... | apache-2.0 | 6,965,218,117,377,261,000 | 31.940415 | 109 | 0.603146 | false | 3.529004 | false | false | false |
tpoy0099/pyctp | example/pyctp2/test/ctp_wrapper_stub.py | 7 | 9275 | # -*- coding:gbk -*-
"""
deprecated, Ö±½ÓʹÓÃTraderSpiDelegate + trader_api_stub
Mock TraderSPI, ÌṩͳһµÄ׮λ, ÓÃÒÔ²âÊÔTradeCommandQueueÊÇ·ñÕýÈ·
²»ÑéÖ¤Éϲã²ÎÊýÊÇ·ñÕýÈ·,Ö»ÌṩͨµÀ
"""
import logging
from datetime import datetime
from ctp.futures import ApiStruct as UType
from ..trader import... | mit | -5,834,768,510,991,784,000 | 36.1 | 154 | 0.557844 | false | 2.385545 | false | false | false |
FUSED-Wind/fusedwind | src/fusedwind/runiec_proto/scrap.py | 2 | 1721 |
def some_func():
print "collecting ALL the output"
for c in self.ws_driver.recorders[0].get_iterator():
res = c['runner.output']
aero = res.aerocode
fast = aero.rawfast ### this may not exist, only for fast wrapper
case = c['runner.input']
... | apache-2.0 | -3,946,810,827,404,311,600 | 58.344828 | 253 | 0.580476 | false | 3.341748 | false | false | false |
buffer/thug | tests/functional/test_image_processing.py | 1 | 1176 | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestImageProcessing(object):
def do_perform_test(self, caplog, url, expected, type_ = "remote"):
thug = ThugAPI()
thug.set_useragent('win7ie90')
thug.set_ssl_verify()
thug.res... | gpl-2.0 | 8,665,244,989,901,216,000 | 25.727273 | 83 | 0.581633 | false | 3.618462 | false | false | false |
coopie/huzzer | test/test_expressions.py | 1 | 3249 | from huzzer.expressions import (
int_literal,
bool_literal,
plus_expr,
minus_expr,
mul_expr,
eq_expr,
neq_expr,
gt_expr,
gte_expr,
lt_expr,
lte_expr,
or_expr,
and_expr,
or_expr,
div_expr,
mod_expr,
max_expr,
min_expr,
not_expr,
fromEnum_exp... | mit | 6,760,812,513,402,678,000 | 23.246269 | 106 | 0.564789 | false | 3.288462 | false | false | false |
Wengex/PyDirectory | pydirectory/activedirectory/tools.py | 1 | 1248 | from pydirectory.ldap.tools import *
#from datetime import timedelta, tzinf
class setQuery(setQuery):
specialFields = {
'is_disable' : {
True: '(userAccountControl:1.2.840.113556.1.4.803:=2)',
False: '(!(userAccountControl:1.2.840.113556.1.4.803:=2))',
},
'is_enable' : {
True: '(!(userAccountControl:... | gpl-2.0 | 2,011,968,688,156,484,600 | 24.469388 | 75 | 0.658654 | false | 2.742857 | false | false | false |
softwaresaved/fat | lowfat/migrations/0127_auto_20180412_1659.py | 2 | 1415 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-12 16:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lowfat', '0126_auto_20180412_1014'),
]
operations = [
migrations.RemoveField(... | bsd-3-clause | -1,084,834,630,127,091,000 | 31.906977 | 122 | 0.54417 | false | 4.054441 | false | false | false |
mohlerm/hotspot | evaluation/specvm/eval.py | 1 | 1306 | import os
import re
import glob
files = glob.glob(r'/home/mohlerm/SPECjvm2008_node153/bench/*.*') + glob.glob(r'/home/mohlerm/SPECjvm2008_node154/bench/*.*')
+glob.glob(r'/home/mohlerm/SPE$
files.sort()
#print(files)
result = []
for infile in files:
linestring = infile[34:]
f = open(infile)
file = f.read()... | gpl-2.0 | 3,381,148,737,518,990,300 | 33.368421 | 126 | 0.584992 | false | 2.87033 | false | false | false |
yohell/msaview | msaview/__init__.py | 1 | 3057 | """MSAView - Fast and flexible visualisation of multiple sequence alignments.
Copyright (c) 2011 Joel Hedlund.
Contact: Joel Hedlund <yohell@ifm.liu.se>
MSAView is a modular, configurable and extensible package for analysing and
visualising multiple sequence alignments and sequence features. It can import
and disp... | mit | 7,880,536,995,012,264,000 | 34.137931 | 83 | 0.780177 | false | 3.939433 | false | false | false |
zynga/zperfmon | client/game_cron/timetail.py | 3 | 3111 | #!/usr/bin/python
#
# Copyright 2013 Zynga Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 6,900,515,436,047,461,000 | 25.589744 | 79 | 0.541626 | false | 3.923077 | false | false | false |
ipashchenko/frb | frb/ml.py | 1 | 13730 | # -*- coding: utf-8 -*-
import numpy as np
from search_candidates import Searcher
from search import get_ellipse_features_for_classification, max_pos
from sklearn.svm import SVC
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.cross_validation import StratifiedShuffleSplit
from sklearn.cross_validat... | apache-2.0 | -1,550,781,185,490,739,200 | 37.456583 | 83 | 0.528079 | false | 3.668894 | false | false | false |
sqzr1/Getter-Setter-Generator | tests/regression_test_samples/python/GetterSetterModel.py | 1 | 6595 | #-------------------------------------------------------------------------------
# Name: Getter Setter Model
# Purpose:
#
# Author: Soribo
#
# Created: 08/09/2010
# Copyright: (c) Soribo 2010
# Licence: <your licence>
#-------------------------------------------------------------------------------... | gpl-3.0 | -7,482,535,631,999,771,000 | 22.386525 | 217 | 0.536012 | false | 4.028711 | false | false | false |
haroldo-ok/vn32x | tool/rpy2c/rpy2c.py | 1 | 1172 | import sys, argparse, os
import rpy_parser, rpy_codegen
def main (argv):
parser = argparse.ArgumentParser(description="Convert Ren'py scripts into C code.")
parser.add_argument("source_rpy")
parser.add_argument("destination_folder")
opts = parser.parse_args()
with open(os.path.abspath(opts.source_... | apache-2.0 | -2,733,138,381,257,266,700 | 34.515152 | 87 | 0.622014 | false | 3.358166 | false | false | false |
houssine78/vertical-cooperative | easy_my_coop_dividend/models/dividend.py | 1 | 8303 | # -*- coding: utf-8 -*-
from __future__ import division
from datetime import datetime
import openerp.addons.decimal_precision as dp
from openerp import fields, models, api
class dividend_year(models.Model):
_name = 'dividend.year'
@api.multi
def _compute_dividend_info(self):
res =... | agpl-3.0 | -7,437,444,697,089,561,000 | 43.620879 | 93 | 0.509093 | false | 4.084112 | false | false | false |
GoogleCloudPlatform/cloudml-dist-mnist-example | trainer/task.py | 1 | 3449 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 818,404,007,773,860,900 | 28.228814 | 74 | 0.637286 | false | 3.950745 | false | false | false |
Modeful/poc | modeful/ui/diagram/__init__.py | 1 | 7452 |
from kivy.clock import Clock
from kivy.graphics import Color, Line, Rectangle
from kivy.uix.widget import Widget
from kivy.uix.scatter import ScatterPlane
from modeful.event import Event
from modeful.ui.behaviors.keyboardnavigationbehavior import KeyboardNavigationBehavior, KeyboardNavigationNode
from modeful... | gpl-3.0 | 1,679,539,301,724,635,600 | 36.611399 | 110 | 0.573403 | false | 3.907708 | false | false | false |
hstau/covar-cryo | covariance/util.py | 1 | 6217 | import numpy as np
tiny = 1e-10
import logging, sys
import myio
import pickle
'''
Copyright (c) UWM, Ali Dashti 2016 (original matlab version)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Columbia University Hstau Liao 2018 (python version)
'''
#_logger = logging.getLogger(__nam... | gpl-2.0 | -584,119,863,304,633,000 | 30.39899 | 83 | 0.578575 | false | 2.929783 | false | false | false |
atosorigin/ansible | lib/ansible/cli/galaxy.py | 1 | 78570 | # Copyright: (c) 2013, James Cammarata <jcammarata@ansible.com>
# Copyright: (c) 2018-2021, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os.path
import re
impo... | gpl-3.0 | 9,089,650,369,454,121,000 | 47.232044 | 159 | 0.571452 | false | 4.478965 | true | false | false |
asipto/kamcli | kamcli/commands/cmd_dialplan.py | 1 | 5234 | import click
from sqlalchemy import create_engine
from kamcli.ioutils import ioutils_dbres_print
from kamcli.cli import pass_context
from kamcli.iorpc import command_ctl
@click.group("dialplan", help="Manage dialplan module (regexp translations)")
@pass_context
def cli(ctx):
pass
@cli.command("add", short_help=... | gpl-2.0 | -3,163,772,466,319,060,000 | 26.840426 | 78 | 0.600688 | false | 3.372423 | false | false | false |
Thortoise/Super-Snake | Blender/animation_nodes-master/nodes/mesh/edges_to_planes.py | 1 | 2540 | import bpy
from bpy.props import *
from mathutils import Vector
from ... base_types.node import AnimationNode
from ... events import propertyChanged
class an_EdgesToPlanesNode(bpy.types.Node, AnimationNode):
bl_idname = "an_EdgesToPlanesNode"
bl_label = "Edges to Planes"
bl_width_default = 150
calcula... | gpl-3.0 | -6,960,173,008,755,860,000 | 36.910448 | 100 | 0.599213 | false | 4.157119 | false | false | false |
DANS-KNAW/dariah-contribute | dariah_contribute/settings/base.py | 1 | 7209 | """
DARIAH Contribute - DARIAH-EU Contribute: edit your DARIAH contributions.
Copyright 2014 Data Archiving and Networked Services
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 a... | apache-2.0 | -528,531,282,545,833,900 | 30.89823 | 88 | 0.719517 | false | 3.469201 | false | false | false |
SphinxKnight/kuma | kuma/feeder/models.py | 1 | 3249 | from __future__ import unicode_literals
import jsonpickle
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import cached_property
class BundleManager(models.Manager):
"""Custom manager for bundles."""
def recent_entries(self, bundle):
... | mpl-2.0 | -8,818,165,258,029,730,000 | 29.942857 | 84 | 0.648199 | false | 4.117871 | false | false | false |
kizniche/Mycodo | mycodo/functions/pid_autotune.py | 1 | 10189 | # coding=utf-8
#
# pid_autotune.py - PID Controller Autotune
#
# Copyright (C) 2015-2020 Kyle T. Gabriel <mycodo@kylegabriel.com>
#
# This file is part of Mycodo
#
# Mycodo 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 Sof... | gpl-3.0 | -5,744,365,146,593,443,000 | 37.018657 | 141 | 0.586319 | false | 4.186113 | false | false | false |
losnikitos/googleads-python-lib | examples/dfp/v201508/proposal_line_item_service/archive_proposal_line_items.py | 4 | 2667 | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 8,621,639,147,935,017,000 | 31.925926 | 76 | 0.67679 | false | 3.77762 | false | false | false |
qilicun/python | python2/PyMOTW-1.132/PyMOTW/zlib/zlib_server.py | 1 | 3700 | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""
"""
#__version__ = "$Id$"
#end_pymotw_header
import zlib
import logging
import SocketServer
import binascii
BLOCK_SIZE = 64
class ZlibRequestHandler(SocketServer.BaseRequestHandler):
logger = logging.getLogge... | gpl-3.0 | -9,024,042,701,466,181,000 | 30.896552 | 83 | 0.597297 | false | 4.292343 | false | false | false |
CENDARI/editorsnotes | editorsnotes/main/migrations/0079_note_sections_to_citations.py | 1 | 22650 | # -*- coding: utf-8 -*-
import datetime
from django.core.exceptions import ObjectDoesNotExist
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.db.models import Q
class Migration(DataMigration):
def forwards(self, orm):
# See previous migration (0079). Th... | agpl-3.0 | 4,013,932,136,683,992,000 | 76.040816 | 182 | 0.553996 | false | 3.737007 | false | false | false |
CitrineInformatics/pypif | pypif/obj/system/chemical/common/composition.py | 3 | 4444 | import numbers
from six import string_types
from pypif.obj.common.pio import Pio
from pypif.obj.common.scalar import Scalar
class Composition(Pio):
"""
Class to store information about an element in a composition vector using weight percents or atomic percents.
"""
def __init__(self, element=None, ac... | apache-2.0 | 7,580,858,783,614,782,000 | 40.148148 | 119 | 0.653465 | false | 4.244508 | false | false | false |
Anylytics/earth_colors | s3sync.py | 1 | 1213 | #!/usr/local/bin/python
from ConfigParser import SafeConfigParser
import os
import sh
import sys
import os
import socket
def is_connected():
try:
# connect to the host -- tells us if the host is actually
# reachable
socket.create_connection(("www.google.com", 80))
return True
ex... | apache-2.0 | -8,644,100,986,811,660,000 | 21.481481 | 78 | 0.67601 | false | 3.086514 | false | false | false |
NetEase/airtest | airtest/cron.py | 1 | 1291 | # coding: utf-8
import uuid
import threading
import time
from . import patch
class Crontab(object):
def __init__(self):
self._tasks = {}
self._running = False
self._cycle = 3.0
self._drain()
def start(self):
self._running = True
def stop(self):
self._runni... | bsd-3-clause | 9,100,750,497,378,975,000 | 21.258621 | 75 | 0.512781 | false | 3.576177 | false | false | false |
radu567/pad2 | client.py | 1 | 2128 | import socket
import struct
import sys
import json
message = 'Clientul cere informatie'
message = message.encode('utf-8')
multicast_group = ('224.3.29.71', 10000)
# Se creaza datagram socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Setare timp pentru mesaje
sock.settimeout(2)
# Setar... | gpl-3.0 | 966,096,673,090,479,600 | 24.209877 | 111 | 0.646255 | false | 2.797101 | false | false | false |
MarkdownForAcademia/markdown_for_academia | mdac/models/block_model.py | 1 | 1274 | from mdac.models.base_model import BaseModel
class BlockModel(BaseModel):
def __init__(self):
"""
an mdac block has the following construction:
===== block_type
content_block
---
meta_block
=====
meta_block and the leading "---" is optional
... | gpl-3.0 | -8,250,278,947,382,161,000 | 31.666667 | 79 | 0.558085 | false | 4.485915 | false | false | false |
jacquelineCelia/lexicon_discovery | scripts/get_global_word_trans.py | 1 | 2537 | #!/usr/bin/python
import string
import sys
import os
import operator
from optparse import OptionParser
def loadList(wavelist):
tags = list()
waves = list()
fin = open(wavelist)
line = fin.readline()
while line:
tag, wav = line.strip().split()
tags.append(tag.zfill(4))
waves.... | mit | -5,369,841,811,067,222,000 | 34.732394 | 182 | 0.571935 | false | 3.203283 | false | false | false |
open-machine-learning/mldata | settings.py | 1 | 5635 | # Django settings for mldata project.
import os
from django.conf import global_settings
FILE_UPLOAD_HANDLERS = ('mldata.utils.uploadprogresscachedhandler.UploadProgressCachedHandler', ) + \
global_settings.FILE_UPLOAD_HANDLERS
VERSION = "r0000"
PRODUCTION = False # set to True when project goes live
if not... | gpl-3.0 | -2,914,993,244,781,070,000 | 31.572254 | 112 | 0.698137 | false | 3.274259 | false | false | false |
yelu/leetcode | TextJustification.py | 1 | 2271 | #F[i,j] = min(F[i,k]+F[i+k, j-k]} or
#F[i, 1 or 2 or 3 or 4]
class Solution:
# @param words, a list of strings
# @param L, an integer
# @return a list of strings
MAX_VAL = 5000
def fullJustify(self, words, L):
F = [[self.MAX_VAL for i in range(len(words)+1)]
for j in range(len(... | gpl-2.0 | -6,483,854,619,689,382,000 | 32.895522 | 71 | 0.40731 | false | 3.286541 | false | false | false |
egeor/libxsmm | scripts/libxsmm_utilities.py | 1 | 9635 | #!/usr/bin/env python
###############################################################################
# Copyright (c) 2015-2018, Intel Corporation #
# All rights reserved. #
# ... | bsd-3-clause | 2,429,872,453,284,970,500 | 37.234127 | 79 | 0.515101 | false | 3.897654 | false | false | false |
odanoburu/bradata | bradata/utils.py | 1 | 4143 | import zipfile
import os
import bradata
import datetime
# this function is reinventing the wheel, check requests.get documentation
def _make_url(api_house=None, base_url= None, params=None):
"""
It builds the url based on the house webservice and parameters
Args:
api_house: str:: 'camara' or 'senad... | mit | -7,883,916,482,139,908,000 | 30.150376 | 162 | 0.630461 | false | 3.968391 | false | false | false |
xtopherbrandt/pivotalpdf | selection_properties.py | 1 | 2032 | class SelectionProperties( object ) :
def __init__ (self):
# initialize the class properties
self.apiKey = None
self.projectId = None
self.filter = u''
self._featuresChecked = "checked='true'"
self._bugsChecked = "checked='true'"
self._choresChecked = "checked='true'"
... | gpl-2.0 | -4,107,419,388,809,241,600 | 25.064103 | 51 | 0.594488 | false | 4.277895 | false | false | false |
asendecka/djangae | djangae/contrib/gauth/common/backends.py | 2 | 4433 | import logging
from django.db import transaction
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import BaseUserManager
from django.core.exceptions import ImproperlyConfigured
from django.contrib.auth.backends import ModelBackend
from django.utils import t... | bsd-3-clause | 750,535,862,089,178,800 | 42.460784 | 96 | 0.611099 | false | 4.612903 | false | false | false |
akarol/cfme_tests | cfme/storage/object_store_container.py | 3 | 5614 | # -*- coding: utf-8 -*-
import attr
from navmazing import NavigateToSibling, NavigateToAttribute
from widgetastic_manageiq import (
Accordion,
BaseEntitiesView,
BreadCrumb,
ItemsToolBarViewSelector,
ManageIQTree,
SummaryTable,
)
from widgetastic_patternfly import Button, Dropdown
from widgetast... | gpl-2.0 | 486,041,553,098,512,640 | 33.231707 | 97 | 0.697542 | false | 4.214715 | false | false | false |
xigt/yggdrasil | yggdrasil/metadata.py | 1 | 1348 | from intent.igt.metadata import set_meta_attr, find_meta, find_meta_attr, set_meta_text
from yggdrasil.consts import USER_META_ATTR, RATING_META_TYPE, QUALITY_META_ATTR, RATINGS, RATINGS_REV, \
EDITOR_METADATA_TYPE, COMMENT_META_TYPE, REASON_META_ATTR
def set_rating(inst, user, rating, reason):
set_meta_attr(... | mit | 738,486,478,206,198,900 | 43.933333 | 117 | 0.727003 | false | 2.917749 | false | false | false |
bichocj/django-forms-builder | forms_builder/forms/views.py | 1 | 6403 | from __future__ import unicode_literals
import json
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect, render_to_response
from django.template i... | bsd-2-clause | -5,909,534,465,395,245,000 | 45.064748 | 101 | 0.573481 | false | 4.2125 | false | false | false |
guillaume-philippon/aquilon | lib/aquilon/worker/commands/update_address_alias.py | 1 | 2775 | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2015,2016 Contributor
#
# 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
#... | apache-2.0 | -5,175,104,695,478,140,000 | 36 | 96 | 0.59964 | false | 4.16042 | false | false | false |
aduros/Browser.hx | bin/idlparser.py | 1 | 11993 | #!/usr/bin/python
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import re
import subprocess
import tempfile
from pegparser import *
# IDL grammar vari... | bsd-2-clause | -6,744,976,108,171,580,000 | 26.195011 | 102 | 0.575753 | false | 3.707264 | false | false | false |
zerkh/GroundHog | groundhog/layers/basic.py | 19 | 22520 | """
Parent classes describing a layer, model or operator
"""
__docformat__ = 'restructedtext en'
__authors__ = ("Razvan Pascanu "
"KyungHyun Cho "
"Caglar Gulcehre ")
__contact__ = "Razvan Pascanu <r.pascanu@gmail>"
import numpy
import copy
import cPickle as pkl
import logging
import th... | bsd-3-clause | -1,848,301,121,673,544,400 | 38.165217 | 98 | 0.553641 | false | 3.992908 | false | false | false |
gwiedeman/ResearchingNY2016 | makeCloud.py | 1 | 1055 | import os
import sys
from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
__location__ = os.path.dirname(os.path.realpath(__file__))
word_string = ""
if len(sys.argv) != 2:
print ("Error: invalid arguments")
else:
if os.path.isfile(sys.argv[1]):
inputFile = sys.argv[1]
else:
inputFile = ... | unlicense | -7,411,372,659,172,120,000 | 24.756098 | 87 | 0.61327 | false | 3.206687 | false | false | false |
tkem/mopidy-mobile | setup.py | 1 | 1506 | from __future__ import unicode_literals
from setuptools import find_packages, setup
def get_version(filename):
from re import findall
with open(filename) as f:
metadata = dict(findall("__([a-z]+)__ = '([^']+)'", f.read()))
return metadata['version']
setup(
name='Mopidy-Mobile',
version=... | apache-2.0 | -7,555,170,045,612,592,000 | 31.042553 | 70 | 0.59761 | false | 3.822335 | false | false | false |
LLNL/spack | lib/spack/spack/build_systems/r.py | 5 | 1940 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
from spack.directives import depends_on, extends
from spack.package import PackageBase, run_after
class... | lgpl-2.1 | 4,162,892,549,703,427,000 | 27.115942 | 77 | 0.630412 | false | 4.058577 | true | false | false |
santoshghimire/IL-Jobcrawl | jobcrawl/spiders/jobmaster.py | 1 | 9531 | # -*- coding: utf-8 -*-
import os
import scrapy
# from scrapy.shell import inspect_response
from jobcrawl.items import JobItem
import re
import datetime
import sys
import locale
import codecs
import urlparse
from scrapy.http import HtmlResponse
from jobcrawl.js_scraper import JSScraperRunner
class JobmasterSpider(scr... | mit | 7,137,948,349,826,308,000 | 38.819328 | 123 | 0.476628 | false | 3.965272 | false | false | false |
hashamali/pyScss | scss/tool.py | 2 | 16927 | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
from collections import deque
from contextlib import contextmanager
import logging
import os
import re
import sys
from scss import config
from scss.calculator import Calculator
from scss.compiler import _prop_split_re
f... | mit | 3,741,536,878,538,081,000 | 38.734742 | 152 | 0.547764 | false | 4.227522 | true | false | false |
leiferikb/bitpop | build/scripts/slave/swarming/isolate_shim.py | 1 | 2058 | #!/usr/bin/env python
# Copyright 2013 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.
"""A simple trampoline to isolate.py in the src/ directory.
Intercepts the --build-dir and --target flags and inserts them into the
--... | gpl-3.0 | 744,562,148,115,219,700 | 30.181818 | 76 | 0.659864 | false | 3.340909 | false | false | false |
sangwook236/SWDT | sw_dev/python/ext/test/geometry/shapely_test.py | 1 | 6855 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# REF [site] >> https://github.com/Toblerity/Shapely
import numpy as np
from shapely.geometry import Point, MultiPoint, LineString
from shapely.geometry import asPoint, asLineString, asMultiPoint
from shapely.geometry.polygon import Polygon, LinearRing
import shapely.affi... | gpl-3.0 | 6,983,354,382,049,397,000 | 37.948864 | 129 | 0.622028 | false | 2.584842 | false | false | false |
VTacius/MZBackup | mzbackup/hilos/respaldo.py | 1 | 1104 | """Worker para crear el respaldo del buzón para cada usuario"""
from queue import Queue
from threading import Thread
from logging import getLogger
from mzbackup.utils.comandos import ejecutor
log = getLogger('MZBackup')
class Respaldo(Thread):
"""Crea el respaldo para cada usuario en cola"""
def __init__(... | lgpl-3.0 | 6,114,264,246,623,605,000 | 32.393939 | 98 | 0.602541 | false | 3.078212 | false | false | false |
imaginal/openprocurement.complaints.queue | openprocurement/complaints/queue/utils.py | 1 | 1094 | # -*- coding: utf-8 -*-
import time
from functools import wraps
bool_dict = {'y': 1, 'n': 0, 'yes': 1, 'no': 0,
'on': 1, 'off': 0, 'true': 1, 'false': 0}
def getboolean(value):
try:
return bool_dict[value.strip().lower()]
except:
return int(value or 0)
def retry(ExceptionToCheck=Exception... | apache-2.0 | 8,247,671,501,306,412,000 | 32.151515 | 88 | 0.482633 | false | 3.907143 | false | false | false |
mrknow/filmkodi | plugin.video.mrknow/lib/utils/decryptionUtils.py | 2 | 9027 | # -*- coding: utf-8 -*-
import pyDes
import urllib
import re
from regexUtils import parseTextToGroups
from javascriptUtils import JsFunctions, JsUnpacker, JsUnpackerV2, JsUnpacker95High, JsUnwiser, JsUnIonCube, JsUnFunc, JsUnPP, JsUnPush
import common
def encryptDES_ECB(data, key):
data = data.encode()
k = py... | apache-2.0 | 6,000,855,192,406,795,000 | 30.020619 | 139 | 0.509028 | false | 3.069364 | false | false | false |
cwelton/incubator-hawq | tools/bin/gppylib/userinput.py | 12 | 3644 | #!/usr/bin/env python
# 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
# "Li... | apache-2.0 | 9,124,250,744,376,435,000 | 28.152 | 86 | 0.605653 | false | 3.856085 | false | false | false |
superDross/MethyCoverageParser | scripts/sam_parsers/Sam2Bed.py | 1 | 5728 | ''' Script to read in bismark paired end SAM and parse to give BED of fragments for calulating read depth across features
default old_flag
=================== ===================
Read 1 Read 2 Read 1 Read 2
OT: 99 147 67 131
O... | gpl-3.0 | -4,140,209,852,789,240,000 | 32.506024 | 152 | 0.453212 | false | 3.811045 | false | false | false |
pyamg/pyamg | pyamg/tests/aggviz.py | 1 | 3165 | import matplotlib.pyplot as plt
import numpy as np
import scipy.sparse as sparse
import pyamg
import shapely.geometry as sg
from shapely.ops import cascaded_union
def plotaggs(AggOp, V, E, G, ax, **kwargs):
"""
Parameters
----------
AggOp : CSR sparse matrix
n x nagg encoding of the aggregates... | mit | -2,004,989,364,591,206,100 | 42.356164 | 99 | 0.461927 | false | 4.021601 | false | false | false |
mbodea/pocket-bulletin | pocketbulletin/models.py | 1 | 7192 | # general models go here
# TODO: add alembic/flask-migrate
import os
from datetime import datetime
import json
import hashlib
from flask_login import UserMixin
from . import db
class TextJsonPickleType(db.PickleType):
impl = db.Text
def __init__(self):
super(TextJsonPickleType, self).__... | mit | -6,666,209,413,072,636,000 | 29.682819 | 115 | 0.605395 | false | 3.732226 | false | false | false |
kmee/l10n-brazil | sped_imposto/models/sped_cest.py | 2 | 2851 | # -*- coding: utf-8 -*-
#
# Copyright 2016 Taŭga Tecnologia
# Aristides Caldeira <aristides.caldeira@tauga.com.br>
# License AGPL-3 or later (http://www.gnu.org/licenses/agpl)
#
from __future__ import division, print_function, unicode_literals
import logging
from odoo import api, fields, models, _
from odoo.except... | agpl-3.0 | 5,447,421,342,454,212,000 | 27.45 | 77 | 0.502988 | false | 3.427711 | false | false | false |
drwyrm/Flexget | flexget/plugins/filter/exists_series.py | 1 | 5627 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from past.builtins import basestring
import logging
from path import Path
from flexget import plugin
from flexget.event import event
from flexget.config_schema import one... | mit | -1,557,961,896,666,269,200 | 43.65873 | 114 | 0.518038 | false | 4.997336 | true | false | false |
YeoLab/gscripts | gscripts/general/filter_bam_read_length.py | 1 | 4280 | #!/usr/bin/env python
from __future__ import print_function
# Parse command line arguments
import argparse
import pysam
'''
Author: Olga Botvinnik, based of off Emily Wheeler's code
Date created: 9/14/16 10:51 PM
The purpose of this program is to filter bam files for reads of a certain length
Example run:
filter_... | mit | 6,250,049,677,018,395,000 | 34.090164 | 83 | 0.537383 | false | 4.472309 | false | false | false |
otsaloma/poor-maps | poor/cache.py | 1 | 5808 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Osmo Salomaa
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | gpl-3.0 | 8,095,380,090,527,397,000 | 38.243243 | 77 | 0.636708 | false | 3.831135 | false | false | false |
GNS3/gns3-server | gns3server/utils/asyncio/__init__.py | 1 | 5123 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | gpl-3.0 | 7,833,183,843,656,126,000 | 30.237805 | 108 | 0.666602 | false | 4.0984 | false | false | false |
DemocracyClub/UK-Polling-Stations | polling_stations/apps/data_importers/management/commands/import_salford.py | 1 | 1097 | from data_importers.geo_utils import fix_bad_polygons
from data_importers.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
srid = 4326
districts_srid = 4326
council_id = "SLF"
elections = ["2021-05-06"]
scraper_name = "wdiv-scrapers/DC-PollingStations-Salford"
geom... | bsd-3-clause | -4,472,198,057,713,669,000 | 30.342857 | 88 | 0.597995 | false | 3.681208 | false | false | false |
kulawczukmarcin/mypox | mininet_scripts/topo_simple.py | 1 | 1758 | #!/usr/bin/env python
import sys
from time import sleep
from mininet.topo import Topo
from mininet.cli import CLI
from mininet.net import Mininet
from mininet.node import RemoteController, OVSKernelSwitch
from mininet.log import setLogLevel
from mininet.link import TCLink
class MyTopo(Topo):
"Simple topology ex... | apache-2.0 | 2,488,544,352,711,739,400 | 26.046154 | 80 | 0.63083 | false | 3.354962 | false | false | false |
JiahuiGuo/AIOpenNERO | Maze/client.py | 1 | 9550 | from OpenNero import *
# add the key and mouse bindings
from inputConfig import createInputMapping
from common import *
import common.gui as gui
from common.module import openWiki
from Maze.module import getMod, delMod
from Maze.constants import *
from Maze.environment import EgocentricMazeEnvironment, GranularMazeE... | mit | 7,880,121,026,822,774,000 | 41.633929 | 128 | 0.651309 | false | 3.276158 | false | false | false |
anisfeld/MachineLearning | Pipeline/explore.py | 1 | 1672 | import pylab as pl
import seaborn as sns
import numpy as np
import pandas as pd
def summary_by_outcome(df, col, round_to=2):
'''
'''
split_data = df.groupby(col)
return round(split_data.describe(percentiles=[.5]),round_to).T
def correlation_plot(df):
'''
Makes a correlation plot of numeric columns in datafr... | mit | -5,235,181,294,594,825,000 | 25.125 | 106 | 0.698565 | false | 2.933333 | false | false | false |
embryonic/poetry | repository/migrations/0006_auto_20160111_2307.py | 1 | 1354 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('repository', '0005_auto_20160111_0126'),
]
operations = [
migrations.AlterField(
model_name='book',
... | gpl-3.0 | -8,702,402,387,168,396,000 | 33.717949 | 113 | 0.587149 | false | 4.298413 | false | false | false |
josenavas/labman | labman/gui/handlers/process_handlers/sample_plating_process.py | 1 | 4157 | # ----------------------------------------------------------------------------
# Copyright (c) 2017-, labman development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------... | bsd-3-clause | -6,107,402,393,860,893,000 | 35.787611 | 78 | 0.56026 | false | 4.272354 | false | false | false |
fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extractKaedesan721TumblrCom.py | 1 | 1217 | def extractKaedesan721TumblrCom(item):
'''
Parser for 'kaedesan721.tumblr.com'
'''
bad_tags = [
'FanArt',
"htr asks",
'Spanish translations',
'htr anime','my thoughts',
'Cats',
'answered',
'ask meme',
'relay convos',
'translation related post',
'nightmare fuel',
'... | bsd-3-clause | 442,098,820,185,335,940 | 25.478261 | 105 | 0.57272 | false | 2.83683 | false | false | false |
JetStarBlues/Nand-2-Tetris | OldArchitecture/v1.0/Components/_2__arithmetic_performance.py | 2 | 1374 | ''' Arithmetic implemented using Python builtin functions instead of logic gates '''
'''----------------------------- Imports -----------------------------'''
# Hack computer
from ._x__components import *
'''----------------------------- Helpers -----------------------------'''
largestInt_ = 2 ** ( N_BITS - 1 ) -... | mit | 20,984,491,368,448,300 | 15.962963 | 84 | 0.436681 | false | 2.980477 | false | false | false |
jacobtomlinson/opsdroid | opsdroid/database/redis/tests/test_redis.py | 3 | 3383 | import asyncio
import json
import logging
from contextlib import suppress
import pytest
from opsdroid.database.redis import RedisDatabase
from opsdroid.helper import JSONEncoder
def return_async_value(val):
f = asyncio.Future()
f.set_result(val)
return f
def test_init(caplog):
caplog.set_level(log... | apache-2.0 | 6,059,981,232,774,807,000 | 26.504065 | 85 | 0.704404 | false | 3.826923 | true | false | false |
hpproliant/ironic | ironic/tests/unit/drivers/modules/test_agent_base_vendor.py | 1 | 45998 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Red Hat, 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... | apache-2.0 | -5,667,716,736,797,516,000 | 45.793489 | 79 | 0.579243 | false | 3.937511 | true | false | false |
Kovak/ParticlePanda | main.py | 2 | 23089 | import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.stacklayout import StackLayout
from kivy.uix.screenmanager import Screen
from kivy.uix.scrollview import ScrollView
from kivy.uix.popup import Popup... | mit | 8,298,778,192,808,479,000 | 35.533228 | 80 | 0.533068 | false | 3.880504 | false | false | false |
Ale-/civics | apps/users/tests.py | 1 | 1508 | # Import generic python packages
from urllib.parse import urlencode
# Import from django apps
from django.test import TestCase
from django.urls import reverse
from django.test import Client
from django.contrib.auth.models import User
# Import from contrib apps
from model_mommy import mommy
class UserTest(TestCase):
... | gpl-3.0 | 4,048,741,068,536,887,300 | 42.085714 | 102 | 0.672414 | false | 4.259887 | true | false | false |
Radagast-red/golem | scripts/blenderstats.py | 3 | 2743 | import click
import statistics
import math
import random
import matplotlib.pyplot as plt
@click.command()
@click.argument("results")
@click.option("--probs", default=0)
@click.option("--name", default="Rendering time")
@click.option("--plot/--no-plot", default=True)
@click.option("--repeat_prob/--no-repeat_prob", def... | gpl-3.0 | 7,411,373,000,704,053,000 | 34.623377 | 111 | 0.571272 | false | 3.109977 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.