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
angr/angr
angr/analyses/decompiler/optimization_passes/mod_simplifier.py
1
2880
import logging from ailment import Expr from ... import AnalysesHub from .engine_base import SimplifierAILEngine, SimplifierAILState from .optimization_pass import OptimizationPass, OptimizationPassStage _l = logging.getLogger(name=__name__) class ModSimplifierAILEngine(SimplifierAILEngine): def _ail_handle_Su...
bsd-2-clause
3,081,194,925,430,433,000
35.923077
99
0.591667
false
3.428571
false
false
false
pjz/Zappa
test_settings.py
1
1325
APP_MODULE = 'tests.test_app' APP_FUNCTION = 'hello_world' DJANGO_SETTINGS = None DEBUG = 'True' LOG_LEVEL = 'DEBUG' SCRIPT_NAME = 'hello_world' DOMAIN = None API_STAGE = 'ttt888' PROJECT_NAME = 'ttt888' REMOTE_ENV='s3://lmbda/test_env.json' ## test_env.json #{ # "hello": "world" #} # AWS_EVENT_MAPPING = { 'arn:...
mit
-1,091,853,218,482,797,700
18.485294
61
0.676981
false
2.760417
true
false
false
BayesianLogic/blog
tools/blog_py_lexer/blog/lexer.py
1
3373
from pygments.lexer import RegexLexer, bygroups, include from pygments.token import * class BlogLexer(RegexLexer): name = 'BLOG' aliases = ['blog'] filenames = ['*.blog', '*.dblog'] operators = ['\\-\\>', ':', '\\+', '\\-', '\\*', '/', '\\[', ']', '\\{', '}', '!', '\\<', '\\>', '\\<=', '\\>=', '==', ...
bsd-3-clause
4,312,323,977,143,371,000
37.770115
105
0.501927
false
3.140596
true
false
false
haematologic/cellcounter
cellcounter/accounts/views.py
1
7496
from braces.views import LoginRequiredMixin from django.contrib import messages from django.contrib.auth import authenticate, login from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.forms import SetPasswordForm from django.contrib.auth.models import User from django.contrib.auth.tokens i...
mit
-4,984,765,481,467,892,000
36.293532
115
0.665555
false
4.082789
false
false
false
rohitwaghchaure/digitales_erpnext
erpnext/accounts/report/budget_variance_report/budget_variance_report.py
1
4804
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, msgprint from frappe.utils import flt from frappe.utils import formatdate import time from erpnext.accounts.utils...
agpl-3.0
4,049,678,227,760,201,700
36.826772
117
0.678601
false
3.111399
false
false
false
uclouvain/osis_louvain
assessments/forms/score_file.py
1
1880
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-502,586,721,529,759,000
47.179487
100
0.654604
false
4.075922
false
false
false
hsharsha/perfrunner
perfrunner/tests/functional.py
1
1852
import unittest from perfrunner.__main__ import get_options from perfrunner.helpers.memcached import MemcachedHelper from perfrunner.helpers.remote import RemoteHelper from perfrunner.helpers.rest import RestHelper from perfrunner.settings import ClusterSpec, TestConfig from perfrunner.tests import TargetIterator cl...
apache-2.0
919,988,435,475,458,000
37.583333
76
0.636609
false
4.124722
true
false
false
mfasq1Monash/FIT3140
interpreter.py
1
6491
''' Author: Michael Asquith, Aaron Gruneklee Created: 2014.12.08 Last Modified: 2014.12.23 Interpreter for a simple functional programming language. Access with interpret(command) Based on Peter Norvig's Lispy interpreter, http://norvig.com/lispy.html ''' import math, operator as op from robotio import RobotIO Symbo...
mit
5,197,515,918,788,058,000
33.343915
123
0.558312
false
4.412644
false
false
false
scottrice/Ice
ice/tasks/engine.py
1
1118
# encoding: utf-8 import os from pysteam import paths as steam_paths from pysteam import shortcuts from pysteam import steam as steam_module from ice import backups from ice import configuration from ice import consoles from ice import emulators from ice import paths from ice import settings from ice.logs import log...
mit
4,875,944,689,318,500,000
29.216216
86
0.723614
false
3.56051
false
false
false
TheWitchers/Team
TestingArea/TESTZONE_methods.py
1
1111
__author__ = 'dvir' import tkFileDialog import sqlite3 conn = sqlite3.connect(tkFileDialog.askopenfilename()) c = conn.cursor() # using example db def ex_show_purch(price): l = [] for row in c.execute("SELECT symbol FROM stocks WHERE price > " + str(price) + ""): print row l.append(row) p...
gpl-2.0
6,712,637,197,793,229,000
24.25
181
0.531953
false
3.549521
false
false
false
MagicStack/asyncpg
asyncpg/transaction.py
1
8297
# Copyright (C) 2016-present the asyncpg authors and contributors # <see AUTHORS file> # # This module is part of asyncpg and is released under # the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 import enum from . import connresource from . import exceptions as apg_errors class TransactionState(e...
apache-2.0
-3,851,821,235,338,135,000
33.861345
78
0.556105
false
4.578918
false
false
false
turtledb/0install
zeroinstall/injector/qdom.py
1
3485
"""A quick DOM implementation. Python's xml.dom is very slow. The xml.sax module is also slow (as it imports urllib2). This is our light-weight version. """ # Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. from xml.parsers import expat import zeroinstall from zer...
lgpl-2.1
-237,805,872,924,645,440
29.840708
135
0.682927
false
3.119964
false
false
false
bandit145/ans-between
src/dictops.py
1
1886
#TODO: allow missing params and args lists to pass tests from src import logging class dict_mgm: #creates ansible command to run def make_play(data,db_data,location): if dict_mgm.data_check(data, db_data) == 'OK': command = 'ansible-playbook {location}'.format(location=location) #did and incredi bad if else t...
mit
-4,789,335,474,906,966,000
25.208333
68
0.656416
false
3.107084
false
false
false
phense/check_duplicate_files
check_duplicate_files.py
1
21660
#!/usr/bin/env python # -*- coding: utf-8 -*- """check_duplicate_files.py Finds all duplicate files in given directories using a hash-algorithm. After scanning the filesystem for possible duplicate files (all files with a unique filesize are dismissed, except for Images when selecting the perceptual hash algorithm)....
apache-2.0
-369,360,307,060,061,250
34.862583
105
0.580979
false
4.094518
false
false
false
petrpulc/git-cmp
checkers/references.py
1
1113
""" Reference level checker (existence of given references or all refs/heads ans refs/tags). """ from common import Common from utils import check_diff def __filter(reference_list): return set(reference for reference in reference_list if reference.split('/')[1] in ('heads', 'tags')) def check():...
mit
2,314,850,003,653,533,000
30.8
88
0.602875
false
4.137546
false
false
false
mikegagnon/sidenote
prefix-links.py
1
1725
#!/usr/bin/env python # # This is free and unencumbered software released into the public domain. # # Sometimes you want to include one sidenote document into another. # One way you could do that is copy the .md files from one project into another. # However, this creates a risk of link-tag collisions. I.e. one project...
unlicense
1,335,531,607,694,736,400
30.363636
115
0.662029
false
3.799559
false
false
false
slipstream/SlipStreamClient
client/src/main/python/slipstream/Logger.py
1
1610
import os import errno import logging from logging.handlers import RotatingFileHandler class Logger(object): LOGGER_NAME = 'SSClient' LOGFILE_MAXBYTES = 2*1024*1024 LOGFILE_BACKUPCOUNT = 5 LOGFILE_FORMAT = "%(asctime)s:%(levelname)s:%(name)s:%(message)s" log_file = '/var/log/slipstream/client/slip...
apache-2.0
-4,789,312,884,300,418,000
30.568627
79
0.618012
false
3.851675
false
false
false
psychopy/psychopy
psychopy/sound/microphone.py
1
35191
#!/usr/bin/env python # -*- coding: utf-8 -*- """Audio recording using a microphone. """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). __all__ = ['Microphone'] import sys import ps...
gpl-3.0
1,498,106,364,352,994,300
34.909184
80
0.613424
false
4.634664
false
false
false
sipwise/repoapi
build/test/test_utils.py
1
11161
# Copyright (C) 2017-2020 The Sipwise Team - http://sipwise.com # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) # any later version. # # Th...
gpl-3.0
-7,227,835,457,043,220,000
33.55418
77
0.585431
false
3.58644
true
false
false
grovesdixon/metaTranscriptomes
scripts/parse_codeml_pairwise_outputBACKUP.py
1
6189
#!/usr/bin/env python ##parse_codeml_pairwise_output.py ##written 6/26/14 by Groves Dixon ProgramName = 'parse_codeml_pairwise_output.py' LastUpdated = '6/26/14' By = 'Groves Dixon' VersionNumber = '1.0' print "\nRunning Program {}...".format(ProgramName) VersionString = '{} version {} Last Updated {} by {}'.format(Pr...
mit
5,886,263,383,535,908,000
40.536913
182
0.527549
false
4.207342
false
false
false
Wintermute0110/plugin.program.advanced.emulator.launcher
tests/fakes.py
1
8256
from abc import ABCMeta, abstractmethod from resources.objects import * from resources.utils import * from resources.scrap import * class FakeRomSetRepository(ROMSetRepository): def __init__(self, roms): self.roms = roms def find_by_launcher(self, launcher): return self.roms ...
gpl-2.0
-8,512,910,359,609,642,000
42.005208
123
0.622941
false
3.251674
false
false
false
coolbombom/CouchPotatoServer
couchpotato/core/downloaders/transmission/main.py
1
10725
from base64 import b64encode from couchpotato.core.downloaders.base import Downloader, StatusList from couchpotato.core.helpers.encoding import isInt from couchpotato.core.logger import CPLog from couchpotato.environment import Env from datetime import timedelta import httplib import json import os.path import re impor...
gpl-3.0
1,714,337,725,172,411,100
41.9
339
0.554499
false
4.288285
true
false
false
astroswego/magellanic-structure
src/magstruct/transformations.py
1
1722
import numpy from numpy import array, sin, cos __all__ = [ 'Equatorial2Cartesian', 'Rotation3D', 'rotation_matrix_3d' ] class Equatorial2Cartesian(): def __init__(self, RA_0, Dec_0, D_0): self.RA_0 = RA_0 self.Dec_0 = Dec_0 self.D_0 = D_0 def fit(self, X, y=None): ...
mit
-4,956,154,805,142,992,000
24.701493
74
0.522648
false
2.903879
false
false
false
lindemann09/pyForceDAQ
forceDAQ/data_handling/read_force_data.py
1
2147
""" Functions to read your force and event data """ __author__ = 'Oliver Lindemann' import os import sys import gzip from collections import OrderedDict import numpy as np TAG_COMMENTS = "#" TAG_UDPDATA = TAG_COMMENTS + "UDP" TAG_DAQEVENTS = TAG_COMMENTS + "T" def _csv(line): return list(map(lambda x: x.strip(...
mit
-4,905,626,410,306,586,000
23.123596
76
0.56218
false
3.451768
false
false
false
cemarchi/biosphere
Src/BioAnalyzer/Analysis/GenePrioritization/Steps/DataIntegration/IntermediateRepresentation/Transformers/MicroRnaToGeneTransformer.py
1
4546
import math import statistics from itertools import groupby from random import randint from typing import Dict, Tuple, Counter import pandas as pd from Src.BioAnalyzer.Analysis.GenePrioritization.Steps.DataIntegration.IntermediateRepresentation.Generators import \ IntermediateRepresentationGeneratorBase from Src....
bsd-3-clause
261,306,271,858,045,380
49.522222
147
0.653322
false
3.625199
false
false
false
aplanas/kmanga
kmanga/core/models.py
1
21424
import os.path from django.conf import settings from django.db import connection from django.db import models from django.db.models import Count from django.db.models import F from django.db.models import Q from django.urls import reverse from django.utils import timezone class TimeStampedModel(models.Model): cr...
gpl-3.0
-7,570,314,442,123,775,000
32.632653
80
0.56334
false
4.111303
true
false
false
HingeChat/HingeChat
src/hingechat/qt/qChatWidget.py
1
8829
import re from PyQt5.QtCore import Qt from PyQt5.QtCore import QTimer from PyQt5.QtGui import QFontMetrics from PyQt5.QtWidgets import QHBoxLayout from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QLabel from PyQt5.QtWidgets import QPushButton from PyQt5.QtWidgets import QSplitter from PyQt...
lgpl-3.0
7,082,114,969,052,042,000
36.220779
117
0.619209
false
3.998641
false
false
false
JiahuiZHONG/Internship_Thread
tests/scripts/thread-cert/Cert_5_6_08_ContextManagement.py
1
4303
#!/usr/bin/python # # Copyright (c) 2016, Nest Labs, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notice, thi...
bsd-3-clause
-5,238,427,176,629,124,000
35.159664
78
0.647223
false
3.709483
false
false
false
scherroman/mugen
mugen/location_utility.py
1
2143
from typing import List, Tuple """ Module for Location & Interval manipulation """ def intervals_from_locations(locations: List[float]) -> List[float]: intervals = [] previous_location = None for index, location in enumerate(locations): if index == 0: intervals.append(location) ...
mit
7,078,705,883,654,456,000
23.918605
98
0.615492
false
4.268924
false
false
false
adbrebs/spynet
models/max_pool_3d.py
1
3198
from theano import tensor from theano.tensor.signal.downsample import DownsampleFactorMax def max_pool_3d(input, ds, ignore_border=False): """ Takes as input a N-D tensor, where N >= 3. It downscales the input by the specified factor, by keeping only the maximum value of non-overlapping patches of si...
bsd-2-clause
608,790,142,119,456,300
42.821918
117
0.641026
false
3.468547
false
false
false
mikedh/trimesh
trimesh/path/exchange/load.py
1
2622
import os from .dxf import _dxf_loaders from .svg_io import svg_to_path from ..path import Path from . import misc from ... import util def load_path(file_obj, file_type=None, **kwargs): """ Load a file to a Path file_object. Parameters ----------- file_obj : One of the following: - Pa...
mit
7,173,151,525,337,611,000
29.847059
66
0.615179
false
3.78355
false
false
false
jakdot/pyactr
tutorials/u7_simplecompilation.py
1
1254
""" Testing a simple case of production compilation. The compilation also allows for utility learning, shown in the model below, as well. """ import warnings import pyactr as actr class Compilation1(object): """ Model testing compilation -- basic cases. """ def __init__(self, **kwargs): actr...
gpl-3.0
8,944,572,004,527,267,000
24.591837
133
0.53429
false
4.045161
false
false
false
duyet-website/api.duyet.net
lib/docs/conf.py
1
8187
# -*- coding: utf-8 -*- # # Faker documentation build configuration file, created by # sphinx-quickstart on Tue Mar 11 11:25:48 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
mit
5,187,688,238,013,529,000
30.367816
79
0.706119
false
3.704525
true
false
false
coyotevz/nobix-app
nbs/models/misc.py
1
3865
# -*- coding: utf-8 -*- from datetime import datetime from sqlalchemy.ext.declarative import declared_attr from nbs.models import db class TimestampMixin(object): created = db.Column(db.DateTime, default=datetime.now) modified = db.Column(db.DateTime, default=datetime.now, onupdat...
mit
6,016,156,342,892,989,000
28.280303
77
0.574386
false
3.789216
false
false
false
pablodiguerero/asterisk.api
migrations/versions/4_add_physical_users_.py
1
1968
"""empty message Revision ID: a374e36d0888 Revises: 4a6559da7594 Create Date: 2017-05-21 22:53:53.490856 """ from alembic import op import sqlalchemy as sa from sqlalchemy.orm import Session from models import physical from models import user # revision identifiers, used by Alembic. revision = '4_add_physical_user...
mit
1,240,968,507,135,020,300
31.583333
107
0.670588
false
3.347603
false
false
false
wesm/ibis
dev/merge-pr.py
1
8184
#!/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
-6,758,902,495,747,892,000
31.86747
78
0.601417
false
3.487005
false
false
false
vinoth3v/In
In/core/valuator.py
1
7873
import re from In.core.object_meta import ObjectMetaBase class ValuatorContainer(dict): def __missing__(self, key): vcls = IN.register.get_class(key, 'Valuator') obj = vcls() self[key] = obj return obj class ValuatorEngine: '''Valuator class that valuate values based on validation rules. ...
apache-2.0
3,151,906,794,283,461,600
23.396774
92
0.61133
false
3.104495
false
false
false
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/heatmapgl/legendgrouptitle/_font.py
1
8487
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "heatmapgl.legendgrouptitle" _path_str = "heatmapgl.legendgrouptitle.font" _valid_props = {"col...
mit
5,632,017,995,005,265,000
36.387665
82
0.559797
false
4.001414
false
false
false
danhooper/sandbox
pinball/attract.py
1
2386
from procgame import * class Mode(game.Mode): def __init__(self, game): super(Mode, self).__init__(game, 1) highscore_categories = [] cat = highscore.HighScoreCategory() cat.game_data_key = "HighScores" cat.titles = [ "Grand Champion", "High Score 1"...
mit
-5,484,256,992,289,313,000
38.766667
79
0.536463
false
3.433094
false
false
false
userzimmermann/robotframework-python3
src/robot/utils/text.py
1
3235
# Copyright 2008-2014 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
7,472,979,966,690,661,000
30.715686
77
0.643586
false
3.456197
false
false
false
onyxfish/votersdaily_web
api/couchdb/log_views.py
1
2166
import couchdb from couchdb.design import ViewDefinition """ This module defines a collection of functions which accept a CouchDB database as an argument, are named with a 'make_views_*' convention, and return a list of generated CouchDB ViewDefinitions. The 'syncviews' management command dynamically executes each me...
gpl-3.0
4,641,316,289,698,557,000
23.908046
78
0.548476
false
4.094518
false
false
false
pr-omethe-us/PyKED
pyked/chemked.py
1
44185
""" Main ChemKED module """ # Standard libraries from os.path import exists from collections import namedtuple from warnings import warn from copy import deepcopy import xml.etree.ElementTree as etree import xml.dom.minidom as minidom from itertools import chain import numpy as np # Local imports from .validation imp...
bsd-3-clause
-6,256,631,093,448,223,000
48.701912
130
0.583388
false
4.368265
false
false
false
Anvil/maestro-ng
maestro/loader.py
1
2758
# Copyright (C) 2015 SignalFx, Inc. All rights reserved. # # Docker container orchestration utility. import jinja2 import os import sys import yaml from . import exceptions class MaestroYamlConstructor(yaml.constructor.Constructor): """A PyYAML object constructor that errors on duplicate keys in YAML mappin...
apache-2.0
4,613,575,730,410,633,000
36.27027
79
0.638869
false
4.275969
false
false
false
bootstraponline/testdroid_device_finder
device_finder.py
1
4900
# -*- coding: utf-8 -*- # from: https://github.com/bitbar/testdroid-samples/blob/03fc043ba98235b9ea46a0ab8646f3b20dd1960e/appium/sample-scripts/python/device_finder.py import os, sys, requests, json, time, httplib from optparse import OptionParser from urlparse import urljoin from datetime import datetime class Devi...
apache-2.0
-8,658,598,604,070,463,000
35.842105
154
0.546327
false
4.340124
false
false
false
bolkedebruin/airflow
tests/providers/datadog/hooks/test_datadog.py
1
4769
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-8,385,485,857,153,462,000
33.064286
87
0.63787
false
3.766983
true
false
false
redhat-cip/python-tripleo-wrapper
rdomhelper/ssh.py
1
11391
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
-2,446,650,625,284,174,300
35.623794
89
0.576207
false
4.251586
false
false
false
hermestrimegiste/patchtgtel
patchConnectionTogotelecom.py
1
2031
#-*- coding:utf-8 -*- __author__ = 'hermes' import socket from os import system from time import sleep from datetime import datetime global connectionName connectionName = 'TOGOTELECOM' # Definir le nom de votre reseau def is_connected(): # http://stackoverflow.com/questions/20913411/test-if-an-internet-connectio...
gpl-2.0
-6,435,792,570,533,313,000
26.378378
100
0.659427
false
3.165625
false
false
false
nigelb/SerialGrabber
serial_grabber/cli.py
1
2827
#!/usr/bin/env python # SerialGrabber reads data from a serial port and processes it with the # configured processor. # Copyright (C) 2012 NigelB # # 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 Foundatio...
gpl-2.0
-6,709,110,638,634,718,000
34.3375
99
0.686594
false
4.263952
false
false
false
Hybrid-Cloud/badam
patches_tool/aws_patch/aws_deps/libcloud/compute/drivers/vultr.py
1
6023
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not ...
apache-2.0
-2,399,194,911,052,198,000
30.733696
78
0.584592
false
4.015333
false
false
false
YourCyborg/Sun-RPI
src/objects/admin.py
1
5428
# # This sets up how models are displayed # in the web admin interface. # from django import forms from django.conf import settings from django.contrib import admin from src.objects.models import ObjAttribute, ObjectDB, ObjectNick, Alias from src.utils.utils import mod_import class ObjAttributeInline(adm...
bsd-3-clause
8,773,561,773,923,069,000
42.130081
306
0.573876
false
4.338929
false
false
false
hiatobr/midiacapoeira
modules/queries.py
1
1403
# -*- coding: utf-8 -*- from gluon import current def tagQuery(tags, ctbl, ttbl, query = 0, op = 'or', field = 'texto_id'): ''' Busca no banco de dados por conteúdo marcado pelas tags em <tags>. A operação é recursiva, tag por tag, juntando o resultado de uma busca ao resultado referente à tag an...
gpl-3.0
3,060,283,172,362,273,000
34.435897
73
0.606368
false
3.098655
false
false
false
jsaponara/opentaxforms
opentaxforms/serve.py
1
3082
#!/usr/bin/env python from __future__ import print_function, absolute_import import flask_restless from argparse import ArgumentParser from flask import Flask from flask_sqlalchemy import SQLAlchemy from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker from .db...
agpl-3.0
2,853,290,267,090,020,000
30.131313
79
0.576249
false
3.926115
false
false
false
bbglab/wok
wok/core/flow/reader.py
1
6997
############################################################################### # # Copyright 2009-2011, Universitat Pompeu Fabra # # This file is part of Wok. # # Wok 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...
gpl-3.0
6,454,725,803,999,862,000
26.225681
102
0.641561
false
3.003004
false
false
false
arruda/rmr
rmr/apps/accounts/migrations/0001_initial.py
1
4385
# -*- 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 'UserProfile' db.create_table('accounts_userprofile', ( ('id', self.gf('django.db...
mit
4,301,774,263,361,745,000
61.657143
182
0.560547
false
3.76072
false
false
false
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations_async.py
1
3785
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import asyncio import os from azure.keyvault.keys.aio import KeyClient from azure.identity.aio import DefaultAzureCredential from azure.core.exceptions import HttpRespon...
mit
-6,305,333,877,761,251,000
43.011628
123
0.60317
false
3.988409
false
false
false
masschallenge/django-accelerator
accelerator/tests/contexts/judge_feedback_context.py
1
13749
from accelerator_abstract.models import ( FORM_ELEM_FEEDBACK_TO_MC, FORM_ELEM_FEEDBACK_TO_STARTUP, FORM_ELEM_OVERALL_RECOMMENDATION, ) from accelerator.models import ( ACTIVE_PROGRAM_STATUS, ASSIGNED_PANEL_ASSIGNMENT_STATUS, COMPLETE_PANEL_ASSIGNMENT_STATUS, FEEDBACK_DISPLAY_DISABLED as DIS...
mit
4,584,632,868,787,122,000
38.852174
79
0.56695
false
4.558687
false
false
false
superbatlc/dtailweb
phonegroups/migrations/0001_initial.py
1
1870
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('systems', '0001_initial'), ('calls', '0001_initial'), ] operations = [ migrations.CreateModel( name='Pho...
gpl-2.0
-5,535,782,326,201,843,000
36.4
174
0.536364
false
4.452381
false
false
false
hiraditya/fool
tensorflow/scaling-up-ml-using-cmle.py
1
6449
''' In this lab, you will learn how to: Package up TensorFlow model Run training locally Run training on cloud Deploy model to cloud Invoke model to carry out predictions ''' ''' Scaling up ML using Cloud ML Engine In this notebook, we take a previously developed TensorFlow model to predict taxi...
mit
2,726,381,697,759,011,000
36.71345
401
0.728485
false
3.317387
false
false
false
wangyixiaohuihui/spark2-annotation
python/pyspark/mllib/stat/_statistics.py
1
13703
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may n...
apache-2.0
1,669,562,013,303,584,300
40.821875
95
0.583157
false
4.06376
true
false
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/enums/types/lead_form_desired_intent.py
1
1209
# -*- 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,953,890,120,698,834,000
29.225
74
0.687345
false
3.88746
false
false
false
praekelt/jmbo-twitter
jmbo_twitter/models.py
1
5204
import datetime, twitter from urllib2 import URLError import logging from django.db import models from django.core.cache import cache from django.utils.translation import ugettext_lazy as _ from django.conf import settings from jmbo.models import ModelBase logger = logging.getLogger('django') class Status(ModelBa...
bsd-3-clause
148,431,581,819,713,100
30.349398
80
0.580515
false
4.071987
false
false
false
ronas/PythonGNF
Fabulao/PedidosCapa.py
1
3001
# -*- coding: latin -*- import sys #from PyQt5 import QtGui, QtCore, QtWidgets #, QTableWidget, QTableWidgetItem from PyQt5.QtWidgets import QApplication, QWidget, QTableWidget, QTableWidgetItem, QLineEdit, QLabel from PyQt5.QtCore import QSize, Qt import pymysql config = { 'host': 'localhost', 'port': 330...
gpl-3.0
-1,464,602,394,802,016,300
29.632653
116
0.625125
false
3.286966
false
false
false
caronc/newsreap
newsreap/Logging.py
1
6395
# -*- coding: utf-8 -*- # # Common Logging Parameters and Defaults # # Copyright (C) 2015-2017 Chris Caron <lead2gold@gmail.com> # # This program 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 v...
gpl-3.0
3,607,045,367,080,225,300
31.794872
76
0.696638
false
3.89227
false
false
false
Mirantis/octane
octane/commands/sync_images.py
1
2791
# 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, software # distributed under t...
apache-2.0
-4,300,452,264,042,446,300
36.716216
77
0.677893
false
3.860304
false
false
false
Wolnosciowiec/file-repository
client/bahub/bahubapp/handler/__init__.py
1
4733
from ..entity.definition import BackupDefinition from ..service.client import FileRepositoryClient from ..service.pipefactory import PipeFactory from ..exceptions import ReadWriteException from ..result import CommandExecutionResult from logging import Logger import string import random import subprocess from shutil im...
lgpl-3.0
-7,351,242,393,543,664,000
35.129771
118
0.616734
false
4.761569
false
false
false
aerokappa/SantaClaus
handCodedOptimum_v4.py
1
2216
import numpy as np import pandas as pd from processInput import processInput def handCodedOptimum_v4 ( ): fileName = 'gifts.csv' giftList, giftListSummary = processInput( fileName ) packedBags = [] for i in np.arange(1000): print i currentBag = [] i...
mit
-6,132,476,382,293,829,000
35.344262
73
0.476083
false
3.014966
false
false
false
Jbonnett/Mutagen-flo
mutagen/ogg.py
1
17770
# Copyright 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $Id: ogg.py 3975 2007-01-13 21:51:17Z piman $ """Read and write Ogg bitstreams and pages. This mo...
gpl-2.0
-2,453,146,239,836,660,000
34.54
79
0.570568
false
4.24105
false
false
false
arcticfoxnv/slackminion
slackminion/plugin/base.py
1
4847
from six import string_types from builtins import object import logging import threading from slackminion.slack import SlackChannel, SlackIM, SlackUser, SlackRoom class BasePlugin(object): def __init__(self, bot, **kwargs): self.log = logging.getLogger(type(self).__name__) self._bot = bot ...
mit
-3,488,926,449,185,535,000
36
118
0.595007
false
4.27425
false
false
false
linxdcn/iS3
IS3Py/is3.py
2
7512
# Copyright (C) 2015 iS3 Software Foundation # Author: Xiaojun Li # Contact: xiaojunli@tongji.edu.cn import sys import clr import System # Load System.Windows.Media in PresentationCore.dll sys.path.append('C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.5') prcore = clr.LoadAsse...
lgpl-3.0
-7,984,074,763,647,838,000
37.523077
107
0.676384
false
3.729891
false
false
false
abendig/django-mailchimp
mailchimp/models.py
1
9678
from django.db import models import json as simplejson from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext_lazy as _ from mailc...
bsd-3-clause
-397,447,282,722,257,540
37.712
93
0.626886
false
3.8712
false
false
false
bashu/fluentcms-filer
fluentcms_filer/file/south_migrations/0001_initial.py
1
10131
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FilerFileItem' db.create_table(u'contentitem_file_filerfi...
apache-2.0
-6,681,037,321,661,970,000
82.04918
210
0.566183
false
3.562236
false
false
false
WilliamDiakite/ExperimentationsACA
processing/lsa.py
1
3364
import os import sys import itertools import operator import nltk import numpy as np import matplotlib.pyplot as plt from nltk.util import ngrams from collections import Counter from spell_checker import SpellChecker from sklearn.decomposition import TruncatedSVD from sklearn.pipeline import make_pipeline from skle...
mit
-8,408,729,182,994,486,000
20.96732
94
0.664683
false
2.995544
false
false
false
babble/babble
include/jython/Lib/asyncore.py
1
17033
# -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission to use, copy, modify,...
apache-2.0
6,117,678,477,258,131,000
29.361854
78
0.540422
false
4.155404
false
false
false
pjh/vm-analyze
analyze/ip_to_fn.py
1
21352
# Virtual memory analysis scripts. # Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu # Copyright (c) 2012-2014 Peter Hornyack and University of Washington # This file contains methods that implement a wrapper around the # binutils "addr2line" utility, which can be used to look up instruction # pointer val...
bsd-3-clause
8,448,444,619,364,010,000
37.747731
117
0.678344
false
3.225865
true
false
false
lampertb/RPIAFIB
Software/afib_lib.py
1
4157
import sys import numpy as np from scipy import signal # For testing import csv defaultWindowSize=120 defaultMinSNR=2 defaultNoisePercentage=10 defaultSampleRate=250 #The find peaks function takes in an array of data #It returns an array of the peak locations after running the wavelet transform def findPeaks(dataAr...
mit
1,566,503,293,678,278,400
32.256
141
0.577099
false
3.212519
false
false
false
eubr-bigsea/tahiti
migrations/versions/38745782554d_adding_missing_port_interfaces.py
1
5671
# -*- coding: utf-8 -*-} """Adding missing port interfaces Revision ID: 38745782554d Revises: b2b823fe47b1 Create Date: 2017-06-07 15:16:30.224298 """ from alembic import op from sqlalchemy import Integer, String from sqlalchemy.sql import table, column, text # revision identifiers, used by Alembic. revision = '387...
apache-2.0
7,238,215,253,415,339,000
28.915344
76
0.582773
false
3.744371
false
false
false
Barrog/C4-Datapack
data/jscript/quests/329_CuriosityOfDwarf/__init__.py
1
2487
# Made by Mr. - Version 0.3 by DrLecter import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest GOLEM_HEARTSTONE = 1346 BROKEN_HEARTSTONE = 1365 ADENA = 57 class Quest (JQuest) : ...
gpl-2.0
4,741,307,329,138,383,000
27.918605
74
0.650985
false
2.729967
false
false
false
skuda/client-python
kubernetes/client/models/v1beta1_role_ref.py
1
4581
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
-5,183,765,010,237,596,000
25.633721
105
0.531107
false
4.237743
false
false
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/multiprocessing/queues.py
1
9842
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: queues.py __all__ = [ 'Queue', 'SimpleQueue', 'JoinableQueue'] import sys import os import threading import collections import time import atexit im...
unlicense
1,957,727,825,150,317,600
28.47006
106
0.517578
false
4.356795
false
false
false
HackerEarth/django-allauth
allauth/socialaccount/providers/twitter/views.py
1
1820
from django.utils import simplejson from allauth.socialaccount.providers.oauth.client import OAuth from allauth.socialaccount.providers.oauth.views import (OAuthAdapter, OAuthLoginView, OAuthCallbackView) ...
mit
985,280,656,928,123,300
36.916667
75
0.636813
false
4.193548
false
false
false
skibaa/smart-sweeper
game/dbext.py
1
2811
import logging from google.appengine.ext import db from google.appengine.api import datastore_errors import cPickle logger=logging.getLogger("smartSweeper.dbext") class PickledProperty(db.Property): data_type = db.Blob def __init__(self, force_type=None, *args, **kw): self.force_type=force_type ...
apache-2.0
-9,060,400,630,525,390,000
37.506849
91
0.626467
false
4.291603
false
false
false
allynt/tings
T/tings/views/api/views_api_users.py
1
1138
from rest_framework import generics, permissions from django.contrib.auth.models import User # from T.tings.models.models_users import TUserProfile from T.tings.serializers.serializers_users import TUserSerializer class TUserPermission(permissions.BasePermission): """ Custom permission to only allow owners of...
mit
8,404,409,644,057,363,000
33.484848
89
0.742531
false
4.428016
false
false
false
akx/gentry
gore/api/handlers/store.py
1
1862
import base64 import json import logging import zlib from datetime import datetime from django.conf import settings from django.db import transaction from django.http import JsonResponse from django.utils.encoding import force_str from django.utils.timezone import make_aware from pytz import UTC from gore.auth import...
mit
4,651,106,081,188,272,000
33.481481
104
0.6971
false
3.936575
false
false
false
django-stars/dash2011
presence/apps/shout/views.py
1
2081
import logging import json from django.shortcuts import render_to_response from django.http import Http404 from django.template import RequestContext from django.http import HttpResponse from django.http import HttpResponseRedirect from django.http import HttpResponseForbidden from django.shortcuts import redirect fro...
bsd-3-clause
7,593,957,745,665,859,000
31.515625
134
0.682845
false
3.882463
false
false
false
JaviMerino/lisa
libs/utils/analysis/frequency_analysis.py
1
24894
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # 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
-7,015,758,231,730,057,000
37.180982
98
0.555676
false
4.189498
false
false
false
cburmeister/flask-bones
app/commands.py
1
1163
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
mit
-36,645,924,411,596,520
21.803922
64
0.536543
false
3.788274
false
false
false
rbuffat/pyidf
tests/test_shadingsite.py
1
2163
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.thermal_zones_and_surfaces import ShadingSite log = logging.getLogger(__name__) class TestShadingSite(unittest.TestCase): def setUp(self): self.fd, self.path = temp...
apache-2.0
-7,739,266,213,189,500,000
31.787879
101
0.645862
false
3.581126
false
false
false
mitmedialab/MediaCloud-Web-Tools
server/views/topics/topiccreate.py
1
3535
import logging from flask import jsonify, request import flask_login import mediacloud.error from server import app, mc from server.auth import user_mediacloud_client from server.util.request import form_fields_required, api_error_handler, json_error_response, arguments_required from server.views.topics.topic import ...
apache-2.0
-6,057,934,450,072,376,000
48.788732
195
0.660255
false
3.748674
false
false
false
jeffsilverm/presentation
whats_new_in_python_3.6/type_hints_complicated.py
1
1308
#! /usr/bin/python3.6 # -*- coding: utf-8 -*- import time import sys assert sys.version_info.major == 3 and sys.version_info.minor == 6, "Not running python 3.6, running {}".format( sys.version_info) class A(object): def __init__(self, instance_mark) -> None: self.instance_mark_A = instance_mark ...
gpl-2.0
859,038,877,987,351,700
22.357143
112
0.58104
false
2.730689
false
false
false
Crowdcomputer/CC
crowdcomputer/init_db.py
1
1613
''' Created on Nov 26, 2012 @author: stefanotranquillini ''' from django.contrib.auth.models import User, Group from rest_framework.authtoken.models import Token from general.models import Application from uuid import uuid4 def init(): initAppsAndCC() def initAppsAndCC(): try: user, c = User.objects...
apache-2.0
-2,273,612,954,416,833,300
28.345455
126
0.588965
false
3.506522
false
false
false
DailyActie/Surrogate-Model
01-codes/numpy-master/numpy/matrixlib/defmatrix.py
1
34262
from __future__ import division, absolute_import, print_function __all__ = ['matrix', 'bmat', 'mat', 'asmatrix'] import sys import numpy.core.numeric as N from numpy.core.numeric import concatenate, isscalar, binary_repr, identity, asanyarray from numpy.core.numerictypes import issubdtype # make translation table _n...
mit
-4,329,534,605,734,874,600
26.38769
89
0.471222
false
3.861377
false
false
false
Septima/qgis-qlrbrowser
src/QlrBrowser/mysettings/qgissettingmanager/types/bool.py
1
3112
#----------------------------------------------------------- # # QGIS setting manager is a python module to easily manage read/write # settings and set/get corresponding widgets. # # Copyright : (C) 2013 Denis Rouzaud # Email : denis.rouzaud@gmail.com # #-------------------------------------------------------...
gpl-2.0
4,159,583,462,942,297,000
36.506024
148
0.643959
false
4.316227
false
false
false
vhernandez/pygtksheet
examples/complex_test.py
1
11754
import sys sys.path += ['/usr/local/lib/python2.6/dist-packages/gtk-2.0'] import gtk from gtk import gdk import pango import gtksheet from bordercombo import BorderCombo #from gtkextra import BorderCombo #import gtkextra class TestSheet(gtksheet.Sheet): def __init__(self): gtksheet.Sheet.__init__(self, 20,...
gpl-2.0
9,136,060,946,695,285,000
39.253425
90
0.561766
false
3.80758
false
false
false
nash-x/hws
nova/huawei/scheduler/filters/disk_filter.py
1
2145
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
-566,471,726,499,216,700
39.471698
79
0.660606
false
4.41358
false
false
false
pglomski/shopnotes
drill_speed_chart.py
1
2778
#!/usr/bin/env python # -*- coding: UTF-8 -*- '''Produce a custom twist drill plot''' import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt plt.rc('text', usetex=True) # set some rcParams mpl.rcParams['font.weight'] = 'bold' mpl.rcParams['xtick.major.pad'] = 10 mpl.rcParams['xtick.direction'] =...
agpl-3.0
6,025,454,394,184,277,000
35.077922
102
0.569114
false
2.603561
false
false
false
crmorse/weewx-waterflow
bin/weedb/mysql.py
1
9153
# # Copyright (c) 2012 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # # $Revision$ # $Author$ # $Date$ # """Driver for the MySQL database""" import decimal import MySQLdb import _mysql_exceptions from weeutil.weeutil import to_bool import weedb def connect(host='l...
gpl-3.0
4,721,289,113,010,788,000
36.979253
102
0.579919
false
4.629742
false
false
false
papaloizouc/peacehack
peacehack/theapp/migrations/0001_initial.py
1
5492
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='CrazyObject', fields=[ ('id', models.AutoField(...
gpl-2.0
5,515,570,037,667,942,000
65.97561
114
0.599417
false
3.922857
false
false
false
ashishtilokani/Cloaking-Detection-Tool
googleBot/googleBot/spiders/scrape2.py
1
1236
from scrapy.selector import HtmlXPathSelector from scrapy.spider import Spider import html2text import re import os.path class scrape(Spider): name = "googleBot2" start_urls = [] with open('/home/ashish/Desktop/CloakingDetectionTool/url.txt','r') as f: for line in f: l=line.replac...
mit
-6,094,454,040,259,034,000
29.146341
88
0.486246
false
3.92381
false
false
false
mprinc/McMap
src/scripts/CSN_Archive/check_object_names.py
1
4677
#!/usr/bin/env python # Copyright (c) 2015, Scott D. Peckham #------------------------------------------------------ # S.D. Peckham # July 9, 2015 # # Tool to extract the object part of every CSDMS Standard # Variable Name and generate a list of objects that # includes those as well as all parent objects. # # Example...
mit
-1,015,613,779,617,027,700
32.407143
94
0.383579
false
4.753049
false
false
false
PrFalken/exaproxy
lib/exaproxy/icap/response.py
1
2403
class ICAPResponse (object): def __init__ (self, version, code, status, headers, icap_header, http_header): self.version = version self.code = code self.status = status self.headers = headers icap_len = len(icap_header) http_len = len(http_header) icap_end = icap_len if http_header: http_len_s...
bsd-2-clause
-2,532,343,003,033,045,000
23.520408
133
0.714524
false
3.128906
false
false
false