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
dawsonjon/Chips-2.0
chips/compiler/tokens.py
1
9314
__author__ = "Jon Dawson" __copyright__ = "Copyright (C) 2012, Jonathan P Dawson" __version__ = "0.1" import os.path import subprocess from chips.compiler.exceptions import C2CHIPError operators = [ "!", "~", "+", "-", "*", "/", "//", "%", "=", "==", "<", ">", "<=", ">=", "!=", "|", "&", "^", "||", "&&", "("...
mit
3,926,535,980,926,046,000
31.340278
77
0.432467
false
5.045504
false
false
false
OnroerendErfgoed/skosprovider_heritagedata
skosprovider_heritagedata/utils.py
1
5488
# -*- coding: utf-8 -*- ''' Utility functions for :mod:`skosprovider_heritagedata`. ''' import requests from skosprovider.skos import ( Concept, Label, Note, ConceptScheme) from skosprovider.exceptions import ProviderUnavailableException import logging import sys import requests log = logging.getLogg...
mit
6,342,921,371,170,018,000
30.54023
152
0.636662
false
3.538362
false
false
false
mr-ping/WebTesting
main.py
1
5059
#!/usr/bin/python import os import sys import argparse from log import Log from chat import Trend from chat import plot_trend as pl from settings import * def parse_args(): """ Parsing shell command arguments, and override appropriate params from setting module :return: None """ parser = arg...
mit
379,554,074,709,667,840
31.63871
86
0.567108
false
3.999209
false
false
false
rickerc/neutron_audit
neutron/openstack/common/rpc/impl_kombu.py
1
32063
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # # 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/LICEN...
apache-2.0
-1,269,175,068,643,578,600
37.124851
79
0.558993
false
4.416391
false
false
false
raytung/Slice
account/hooks.py
1
2621
import hashlib import random from django.core.mail import send_mail from django.template.loader import render_to_string from account.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist class AccountDefaultHookSet(object): def send_invitation_em...
mit
-1,658,567,781,542,435,800
38.119403
87
0.679893
false
3.917788
false
false
false
anselal/antminer-monitor
antminermonitor/blueprints/user/models.py
1
1102
from flask_login.mixins import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from sqlalchemy import Column, Integer, VARCHAR from antminermonitor.database import Base class User(UserMixin, Base): __tablename__ = 'user' id = Column(Integer, primary_key=True) username ...
gpl-3.0
8,158,068,241,093,129,000
30.485714
73
0.653358
false
3.978339
false
false
false
wurstmineberg/alltheitems.wurstmineberg.de
alltheitems/cloud.py
1
67724
import alltheitems.__main__ as ati import bottle import collections import contextlib import datetime import itertools import json import pathlib import random import re import xml.sax.saxutils import alltheitems.item import alltheitems.util import alltheitems.world class FillLevel: def __init__(self, stack_size...
mit
6,210,669,962,743,115,000
59.09228
392
0.481912
false
3.874814
false
false
false
amirgeva/coide
mainwindow.py
1
54237
from PyQt4 import QtCore from PyQt4 import QtGui import os import re import stat import qutepart from workspace import WorkSpace import output from consts import FileRole from gdbwrapper import GDBWrapper from watchestree import WatchesTree from breakpoints import BreakpointsDB, BreakpointDialog from properties impor...
gpl-2.0
-3,514,037,278,721,606,700
36.664583
135
0.576286
false
4.162791
true
false
false
pradyunsg/dotfiles
lib/checker.py
1
5820
import os import sys import shutil import platform from .logging import Logger, log from .utils import run_output import click import yaml class SystemChecker(object): """A super-fancy helper for checking the system configuration """ def __init__(self, verbose): super().__init__() self....
mit
-4,368,949,340,365,042,700
30.978022
79
0.518041
false
4.157143
false
false
false
peterrenshaw/socsim
setup.py
1
1400
#!/usr/bin/env python # ~*~ encoding: utf-8 ~*~ """ This file is part of SOCSIM. SOCSIM 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) an...
gpl-3.0
-4,294,559,742,352,133,000
30.111111
72
0.682143
false
3.763441
false
false
false
judaba13/GenrePredictor
hdf5_utils.py
1
28730
""" Thierry Bertin-Mahieux (2010) Columbia University tb2332@columbia.edu This code contains a set of routines to create HDF5 files containing features and metadata of a song. This is part of the Million Song Dataset project from LabROSA (Columbia University) and The Echo Nest. Copyright 2010, Thierry Bertin-Mahieux Th...
apache-2.0
7,055,382,129,776,609,000
52.304267
137
0.664636
false
3.349656
false
false
false
blab/antibody-response-pulse
bcell-array/code/Virus_Bcell_IgM_IgG_Infection_OAS_new.py
1
13195
# coding: utf-8 # # Antibody Response Pulse # https://github.com/blab/antibody-response-pulse # # ### B-cells evolution --- cross-reactive antibody response after influenza virus infection or vaccination # ### Adaptive immune response for repeated infection # In[3]: ''' author: Alvason Zhenhua Li date: 04/09/201...
gpl-2.0
6,642,361,420,170,856,000
38.154303
257
0.619856
false
2.478865
false
false
false
lucifurtun/myquotes
apps/search/bible/management/commands/zefania_xml_generator.py
1
2231
import json from itertools import groupby import xmltodict from django.core.management.base import BaseCommand class Command(BaseCommand): help = 'Generates zefania xml from different formats' def handle(self, *args, **options): with open('NTR.json') as f: data = json.load(f) cu...
bsd-3-clause
-6,679,120,634,669,536,000
32.298507
78
0.404303
false
5.013483
false
false
false
vcatechnology/cmake-boilerplate
cmake/pygh/__init__.py
1
25114
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import os import sys import json import errno import platform import fileinput import subprocess from datetime import datetime, timezone try: import requests except ImportError: raise ImportError( 'Failed to import \'requests\', run \'pip instal...
bsd-3-clause
-6,535,361,961,749,887,000
34.026499
114
0.510472
false
4.129913
false
false
false
rven/odoo
addons/pad/models/pad.py
1
5592
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import random import re import string import requests from odoo import api, models, _ from odoo.exceptions import UserError from ..py_etherpad import EtherpadLiteClient _logger = logging.getLogger(__na...
agpl-3.0
-3,819,001,917,685,144,000
36.530201
134
0.552933
false
3.86722
false
false
false
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/v2016_10_01/aio/operations/_key_vault_client_operations.py
1
230715
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
5,830,821,531,992,470,000
48.203455
158
0.642438
false
4.210358
false
false
false
jmchilton/galaxy-central
galaxy/tools/parameters.py
1
19896
""" Classes encapsulating tool parameters """ import logging, string, sys from galaxy import config, datatypes, util, form_builder import validation from elementtree.ElementTree import XML, Element log = logging.getLogger(__name__) class ToolParameter( object ): """ Describes a parameter accepted by a tool....
mit
-6,214,418,039,163,646,000
39.19596
162
0.587304
false
3.837963
false
false
false
toobaz/pandas
ci/print_skipped.py
1
1409
#!/usr/bin/env python import os import sys import math import xml.etree.ElementTree as et def parse_results(filename): tree = et.parse(filename) root = tree.getroot() skipped = [] current_class = "" i = 1 assert i - 1 == len(skipped) for el in root.findall("testcase"): cn = el.at...
bsd-3-clause
-8,257,308,143,200,926,000
26.096154
84
0.515259
false
3.594388
true
false
false
openstack-infra/shade
shade/tests/unit/test_floating_ip_neutron.py
1
41101
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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...
apache-2.0
-3,525,956,898,842,083,300
40.101
91
0.467069
false
3.734418
true
false
false
bblais/plasticity
setup.py
1
2798
# this is from https://github.com/cython/cython/wiki/PackageHierarchy import sys, os, stat, subprocess from distutils.core import setup from Cython.Distutils import build_ext from distutils.extension import Extension # we'd better have Cython installed, or it's a no-go try: from Cython.Distutils import build_ex...
mit
-212,955,220,237,154,800
29.086022
114
0.62366
false
3.578005
false
false
false
dslackw/sbo-templates
sbo_templates/__metadata__.py
1
1203
#!/usr/bin/python3 # -*- coding: utf-8 -*- # __metadata__.py file is part of sbo-templates. # Copyright 2015-2021 Dimitris Zlatanidis <d.zlatanidis@gmail.com> # All rights reserved. # SBo tool for managing templates. # https://gitlab.com/dslackw/sbo-templates # sbo-templates is free software: you can redistribute ...
gpl-3.0
-942,446,830,145,835,600
36.59375
71
0.717373
false
3.379213
false
false
false
mozilla/pto
pto/apps/autocomplete/views.py
1
1912
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import logging from django import http from pto.apps.dates.decorators import json_view from pto.apps.users.models import...
mpl-2.0
9,029,721,242,809,781,000
34.407407
76
0.578452
false
4.016807
false
false
false
ajylee/gpaw-rtxs
gpaw/test/diamond_gllb.py
1
2143
from ase.structure import bulk from sys import argv from ase.dft.kpoints import ibz_points, get_bandpath from gpaw import * from ase import * from gpaw.test import gen from gpaw import setup_paths import os """This calculation has the following structure. 1) Calculate the ground state of Diamond. 2) Calculate the ban...
gpl-3.0
7,119,025,400,674,546,000
30.985075
105
0.728885
false
2.747436
false
false
false
discoapi/discotech
discotech/discoAPI/keywordManager.py
1
3203
__package__ = 'discotech.discoAPI' from discotech import discotechError class KeywordManager(object): """ Simple object to store and queue keyword to search in social media providers """ def __init__(self,keywords = [],convertToSearchPhrases = False): """ @type keywords: list @param keywords:...
gpl-2.0
-1,382,077,788,170,863,000
27.345133
163
0.70153
false
3.496725
true
false
false
ioggstream/python-course
ansible-101/notebooks/exercise-05/inventory-docker-solution.py
1
1376
#!/usr/bin/env python # List our containers. Note: this only works with docker-compose containers. from __future__ import print_function from collections import defaultdict import json # # Manage different docker libraries # try: from docker import Client except ImportError: from docker import APIClient as C...
agpl-3.0
-8,088,468,184,198,138,000
28.913043
96
0.634448
false
3.965418
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/common/types/ad_type_infos.py
1
46175
# -*- 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
1,371,305,617,412,775,000
30.178258
135
0.60667
false
4.161035
false
false
false
mapzen/tilequeue
tilequeue/wof.py
1
46004
from __future__ import absolute_import from collections import namedtuple from contextlib import closing from cStringIO import StringIO from datetime import datetime from edtf import parse_edtf from operator import attrgetter from psycopg2.extras import register_hstore from shapely import geos from tilequeue.tile impor...
mit
9,120,416,503,911,111,000
35.280757
79
0.582449
false
3.652271
false
false
false
Tala/bybop
src/interactive.py
1
1944
#!/usr/bin/env python import sys try: import readline except ImportError: import pyreadline as readline import os import code import rlcompleter lib_path = os.path.abspath(os.path.join('..', 'src')) sys.path.append(lib_path) lib_path = os.path.abspath(os.path.join('..', '..', 'ARSDKBuildUtils', 'Utils', 'Py...
bsd-3-clause
-245,576,819,196,394,050
21.870588
117
0.667181
false
2.901493
false
false
false
JDongian/LangGrind
src/parse_raw.py
1
1957
"""Parse human data into JSON""" import string def parse_file(filename="../data/RAW.txt"): """Parse human readable file into JSON.""" entries = [] with open(filename) as f_in: next_line = f_in.readline() data = {} state = "section" while next_line: if state == "...
gpl-3.0
6,378,814,179,138,106,000
38.14
67
0.406234
false
4.832099
false
false
false
prateeksan/python-design-patterns
structural/adapter.py
1
3485
""" The Adapter Pattern Notes: If the interface of an object does not match the interface required by the client code, this pattern recommends using an 'adapter' that can create a proxy interface. It is particularly useful in homogenizing interfaces of non-homogenous objects. The following example represents a use ...
mit
5,776,622,469,529,610,000
32.84466
80
0.68637
false
4.456522
false
false
false
3dfxsoftware/cbss-addons
account_aged_partner_balance_report/report/account_aged_partner_balance_report.py
1
10928
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
gpl-2.0
284,019,789,491,869,440
41.858824
221
0.522053
false
4.333069
false
false
false
nosuchtim/VizBench
src/jsonrpc/jsonrpc.py
1
1044
# Utility to send JSON RPC messages # Avoid the requests module to reduce installation hassles import urllib import urllib2 import json import sys verbose = False def dorpc(port,meth,params): url = 'http://127.0.0.1:%d/api' % (port) id = '12345' data = '{ "jsonrpc": "2.0", "method": "'+meth+'", "params": '+params...
mit
6,698,785,829,892,262,000
22.2
91
0.6159
false
2.690722
false
false
false
h4wldev/Frest
app/routes/api/v1/users/user.py
1
6676
# # -*- coding: utf-8 -*- import re import datetime from flask import request from flask_api import status from flask_restful import Resource from sqlalchemy.exc import IntegrityError from werkzeug.security import generate_password_hash from app import db, token_auth from app.models.user_model import UserModel, get_u...
mit
2,234,537,345,375,100,000
33.770833
111
0.539994
false
4.532247
false
false
false
Nikola-K/django_reddit
users/models.py
1
1565
from hashlib import md5 import mistune from django.contrib.auth.models import User from django.db import models class RedditUser(models.Model): user = models.OneToOneField(User) first_name = models.CharField(max_length=35, null=True, default=None, blank=True) last_name =...
apache-2.0
-6,009,276,806,158,894,000
42.472222
84
0.628754
false
3.95202
false
false
false
selentd/pythontools
pytools/src/oldsrc/addindex.py
1
2335
import datetime import pymongo from pymongo.mongo_client import MongoClient import indexdata def getIndexEntry( indexData ): return indexData.getDictionary() def getIndexDateEntry( indexData ): return { "date": datetime.datetime(indexData.date.year, indexData.date.mon...
apache-2.0
2,964,568,120,293,750,000
28.556962
64
0.494647
false
3.964346
false
false
false
Rezzie/Batcher
generators/g_randomchoice.py
1
2268
#!/usr/bin/env python # Copyright (c) 2011, The University of York # All rights reserved. # Author(s): # James Arnold <jarnie@gmail.com> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of sourc...
bsd-3-clause
-5,633,717,101,477,794,000
37.440678
80
0.713845
false
4.395349
false
false
false
openvenues/address_normalizer
address_normalizer/deduping/near_duplicates.py
1
6806
import geohash import logging import operator from functools import partial from itertools import chain, product, combinations, imap from address_normalizer.deduping.duplicates import * from address_normalizer.deduping.storage.base import * from address_normalizer.text.gazetteers import * from address_normalizer.t...
mit
7,338,996,294,223,279,000
31.108491
189
0.618425
false
3.725233
false
false
false
miyanishi2/caffe-rpc
caffe_extractor.py
1
1439
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'miyanishi' import caffe import numpy as np class CaffeExtractor(): def __init__(self, caffe_root=None, feature_layers=["fc6"], gpu=True): self.feature_layers = feature_layers MODEL_FILE = caffe_root + 'examples/imagenet/imagenet_deploy....
bsd-2-clause
-3,062,253,772,976,018,400
36.868421
108
0.587908
false
3.323326
false
false
false
Donkyhotay/MoonPy
twisted/internet/posixbase.py
1
14121
# -*- test-case-name: twisted.test.test_internet -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Posix reactor base class """ import warnings import socket import errno import os from zope.interface import implements, classImplements from twisted.python.compat import set fr...
gpl-3.0
8,697,282,309,824,158,000
32.147887
108
0.622477
false
4.241814
false
false
false
unfoldingWord-dev/uwadmin
uwadmin/migrations/0005_auto_20150524_1534.py
1
1202
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('uwadmin', '0004_auto_20150318_0034'), ] operations = [ migrations.AddField( model_name='publishrequest', ...
mit
8,915,345,621,021,246,000
30.631579
110
0.583195
false
4.386861
false
false
false
IQSS/miniverse
miniverse/settings/local_with_routing.py
1
6078
""" Settings template for running two databases: - Existing Dataverse databases (we only read it) - Second database for Django core apps + Miniverse apps Please read through and change the settings where noted """ from __future__ import absolute_import import sys from os import makedirs, environ from os.path i...
mit
906,195,234,186,292,000
33.534091
99
0.557585
false
3.980354
true
false
false
sanluca/py-acqua
setup.py
1
1902
# -*- coding: iso-8859-15 -*- #Copyright (C) 2005, 2008 Py-Acqua #http://www.pyacqua.net #email: info@pyacqua.net # # #Py-Acqua is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
gpl-2.0
8,070,389,984,959,156,000
32.368421
120
0.679811
false
3.05297
false
false
false
bhermansyah/DRR-datacenter
scripts/misc-boedy1996/glofas_refactor.py
1
6276
import os, sys os.environ.setdefault("DJANGO_SETTINGS_MODULE","geonode.settings") import csv from django.db import connection, connections from django.conf import settings from geodb.models import Glofasintegrated, AfgBasinLvl4GlofasPoint from netCDF4 import Dataset, num2date import numpy as np from django.contrib.g...
gpl-3.0
6,982,054,730,688,295,000
33.108696
357
0.605003
false
2.949248
false
false
false
deavid/bjsonrpc
bjsonrpc/main.py
1
2824
""" bjson/main.py Copyright (c) 2010 David Martinez Marti All rights reserved. Licensed under 3-clause BSD License. See LICENSE.txt for the full license text. """ import socket import bjsonrpc.server import bjsonrpc.connection import bjsonrpc.handlers __all__ = [ "createserver", "...
bsd-3-clause
5,525,710,750,083,788,000
29.042553
83
0.596671
false
4.246617
false
false
false
Micket/CCBuilder
make_cc.py
1
8680
#!/usr/bin/env python3 from __future__ import print_function from __future__ import division import argparse import pickle import time import CCBuilder as ccb import CCBuilder_c as ccb_c import numpy as np import scipy.special def uniform_dist(x): """ Returns uniform distributions of given range """ return la...
gpl-3.0
-3,357,573,291,557,032,400
41.54902
126
0.65818
false
2.923543
false
false
false
lyoniionly/django-cobra
src/cobra/models/fields/node.py
1
3306
from __future__ import absolute_import, print_function import collections import logging import six import warnings from django.db import models from django.db.models.signals import post_delete from cobra.core.cache import memoize from cobra.core.compat import pickle from cobra.core.strings import decompress, compre...
apache-2.0
8,760,018,005,294,236,000
24.635659
79
0.588627
false
3.987937
false
false
false
andersgs/dingo
dingo/random_forest.py
1
2551
''' Some functions to fit a random forest ''' import sklearn.ensemble import pandas import progressbar bar = progressbar.ProgressBar() def test_max_features(max_features): if (max_features not in ['sqrt', 'auto', 'log2', None]): try: max_features = int(max_features) except ValueError:...
bsd-3-clause
-2,556,278,225,202,661,400
49.019608
347
0.46374
false
4.555357
false
false
false
Orav/kbengine
kbe/src/lib/python/Tools/demo/life.py
1
9249
#!/usr/bin/env python3 """ A curses-based version of Conway's Game of Life. An empty board will be displayed, and the following commands are available: E : Erase the board R : Fill the board randomly S : Step for a single generation C : Update continuously until a key is struck Q : Quit Cursor keys :...
lgpl-3.0
-7,308,566,763,295,885,000
33.301527
81
0.484917
false
3.782822
false
false
false
jwilliamn/handwritten
extraction/FormatModel/CreatePage3Variable.py
1
6106
import pickle from extraction.FormatModel.VariableDefinitions import * from extraction.FormatModel.RawVariableDefinitions import * import json def jsonDefault(object): return object.__dict__ if __name__ == '__main__': Page3 = Category('page3', 'pagina 3') ############ for r in range(1,6): s...
gpl-3.0
2,086,762,254,357,249,800
44.237037
111
0.655748
false
2.909004
false
false
false
huzhifeng/py12306
py12306.py
1
62739
#!/usr/bin/env python # -*- coding: utf-8 -*- # 标准库 import argparse import urllib import time import datetime import sys import re import ConfigParser import random import smtplib from email.mime.text import MIMEText # 第三方库 import requests from huzhifeng import dumpObj, hasKeys # Set default encoding to utf-8 reload...
gpl-2.0
-631,110,503,267,683,200
37.075581
273
0.491627
false
3.173478
false
false
false
mjs/juju
acceptancetests/schedule_hetero_control.py
1
3284
#!/usr/bin/env python from __future__ import print_function from argparse import ArgumentParser import json import os import re from jenkins import Jenkins from jujuci import ( add_credential_args, get_credentials, ) from utility import ( find_candidates, get_candidates_path, ) def get_args(...
agpl-3.0
8,702,900,788,134,910,000
32.510204
78
0.58648
false
4.03936
false
false
false
NicovincX2/Python-3.5
Algèbre/Opération/scalar_product.py
1
1933
# -*- coding: utf-8 -*- import os import seaborn seaborn.set() colors = seaborn.color_palette() import utils # For 3D plotting we need to import some extra stuff from mpl_toolkits.mplot3d import Axes3D # First create two random vectors in 3 dimensional space v1 = rand(3, 1) v2 = rand(3, 1) # And scale them to uni...
gpl-3.0
-667,495,029,262,324,100
28.287879
75
0.644594
false
2.647945
false
false
false
nuobit/odoo-addons
connector_sage/models/payroll_sage_payslip_line_payroll/binding.py
1
1439
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>) # Eric Antones <eantones@nuobit.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import models, fields from odoo.addons.queue_job.job import job class PayslipLinePayrollBinding(models.Model): _name = 'sage.payroll.sage.pay...
agpl-3.0
8,891,023,557,051,853,000
36.842105
108
0.649513
false
3.139738
false
false
false
cuihaoleo/PyTest
PyTest.py
1
7675
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ## # PyTest.py # This file is part of PyTest. # # PyTest # Python编写的OI评测器后端 # Copyright (C) 2011 CUI Hao # # 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 Fo...
gpl-3.0
1,755,466,251,019,039,200
26
71
0.508379
false
3.098168
true
false
false
geggo/pyface
pyface/workbench/i_workbench_window_layout.py
3
10821
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
-4,267,509,263,042,674,000
26.675192
80
0.590796
false
4.516277
false
false
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/prompt_toolkit/output/color_depth.py
1
1497
from __future__ import unicode_literals from prompt_toolkit.utils import is_windows import os __all__ = [ 'ColorDepth', ] class ColorDepth(object): """ Possible color depth values for the output. """ #: One color only. DEPTH_1_BIT = 'DEPTH_1_BIT' #: ANSI Colors. DEPTH_4_BIT = 'DEPTH_...
mit
2,101,513,724,883,425,300
27.245283
77
0.616566
false
3.356502
false
false
false
WorldViews/Spirals
dummyServer.py
1
2519
import json, time import flask from flask import Flask, render_template, send_file, \ jsonify, send_from_directory, request from flask_socketio import SocketIO, emit rdb = None try: import rethinkdb as rdb #rdb.connect('localhost', 28015).repl() conn = rdb.connect(db='test') except: ...
mit
-4,448,048,485,143,224,300
25.239583
71
0.613339
false
3.08701
false
false
false
nschaetti/nsNLP
data/Text.py
1
2476
# -*- coding: utf-8 -*- # # File : corpus/IQLACorpus.py # Description : . # Date : 16/08/2017 # # Copyright Nils Schaetti, University of Neuchâtel <nils.schaetti@unine.ch> # Imports from Sample import Sample import codecs # Class to access to a text class Text(Sample): """ Class to access to a text """ ...
gpl-3.0
8,279,968,937,901,342,000
19.121951
115
0.446869
false
4.02439
false
false
false
blindfuzzy/LHF
Tools/linuxprivchk.py
1
25080
#!/usr/bin/env python ############################################################################################################### ## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script ## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift ##-----------------------------------------------------...
gpl-3.0
6,533,771,653,508,868,000
66.601078
248
0.614872
false
3.089431
false
false
false
oudalab/phyllo
phyllo/extractors/regula_ad_monachoDB.py
1
3765
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup # several names in the <pagehead> but not sure what to put as an author name def main(): # The collection URL below. collURL = 'http://www.thelatinlibrary.com/regula.html' collOpen = urllib.request.urlo...
apache-2.0
730,117,628,980,353,400
36.277228
112
0.468526
false
4.585871
false
false
false
iamjake648/jasper-dictionary
Define.py
1
1593
#Written by Jake Schultz #TODO Add more lang support, limit number of results returned import re from urllib2 import Request, urlopen, URLError import json WORDS = ["DEFINE","WHAT DOES %S MEAN","DEFINITION", "WHAT IS [A|AN]? %S"] PRIORITY = 1 def handle(text, mic, profile, recursive=False): text = re.sub(r"(?i)...
gpl-2.0
1,097,689,116,695,614,700
34.4
118
0.603264
false
3.346639
false
false
false
felipenaselva/repo.felipe
plugin.video.uwc/k18.py
1
2513
''' Ultimate Whitecream Copyright (C) 2015 mortael 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-2.0
-4,485,078,390,973,765,600
32.959459
152
0.655392
false
3.485437
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_url_path_map.py
1
3397
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-8,994,817,424,965,197,000
47.528571
215
0.664999
false
4.137637
true
false
false
chengdh/openerp-ktv
openerp/addons/ktv_sale/room_operate.py
1
3418
# -*- coding: utf-8 -*- from osv import osv,fields from room import room class room_operate(osv.osv): ''' 包厢操作类: 以下操作都属于包厢操作: 1 预定 2 正常开房 3 买钟 4 买断 5 续钟 6 退钟 7 换房 8 并房 包厢通过cur_room_operate_id与room_operate相关联,用于标示当前包厢所对应的操作 room_operate与以上各个操作是one2many的关系,这样通过一个room_o...
agpl-3.0
-4,107,985,104,135,844,400
35.166667
120
0.621352
false
1.917526
false
false
false
dhimmel/hetio
hetnetpy/permute.py
1
9110
import collections import random import logging from hetnetpy.hetnet import Graph def permute_graph(graph, multiplier=10, seed=0, metaedge_to_excluded=dict(), log=False): """ Derive a permuted hetnet from an input hetnet. This method applies the XSwap algorithm separately for each metaedge. Hence, node d...
cc0-1.0
7,102,797,442,596,513,000
36.03252
93
0.615038
false
4.083371
false
false
false
coetzeevs/chiron
mysite/polls/views.py
1
1976
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from .models import Question, Choice from django.urls import reverse from django.views import generic from django.utils import timezone from django.core.mail import EmailM...
mit
-8,582,128,274,714,350,000
30.380952
130
0.745951
false
3.509769
false
false
false
LACNIC/simon
simon-web/simon_app/templatetags/simon_extras.py
1
2401
from django import template from datetime import datetime from simon_app.functions import GMTUY import operator """ Module that holds the Simon """ register = template.Library() @register.filter(name="substract") def substract(value, arg): """ Substract """ return value - arg @register.fil...
gpl-2.0
4,992,362,165,801,028,000
18.208
93
0.548105
false
3.222819
false
false
false
gpailler/AtlassianBot
plugins/stash.py
1
1971
# coding: utf-8 import requests from utils import rest class Stash(object): def __init__(self, server): self.__server = server def get_stash_branches(self, repos, project, filter): results = [] for repo in repos: path = '/rest/api/1.0/projects/{project}/repos/{repo}/branc...
mit
-3,836,757,531,418,483,700
30.790323
76
0.499239
false
4.489749
false
false
false
samdoshi/teletype
utils/docs.py
1
6073
#!/usr/bin/env python3 import sys from pathlib import Path import jinja2 import pypandoc import pytoml as toml from common import list_ops, list_mods, validate_toml, get_tt_version if (sys.version_info.major, sys.version_info.minor) < (3, 6): raise Exception("need Python 3.6 or later") THIS_FILE = Path(__file_...
gpl-2.0
-4,714,646,216,518,015,000
29.671717
78
0.513091
false
3.526713
false
false
false
mylokin/redisext
tests/test_expire.py
1
1260
from __future__ import absolute_import import redisext.counter import redisext.key import redisext.serializer from . import fixture class ExpireCounter(redisext.counter.Counter, redisext.key.Expire): EXPIRE = 60 CONNECTION = fixture.Connection SERIALIZER = redisext.serializer.Numeric class ExpireCount...
mit
-488,243,151,904,911,100
25.808511
78
0.694444
false
3.631124
true
false
false
Instanssi/Instanssi.org
Instanssi/screenshow/migrations/0003_auto_20210511_0020.py
1
1515
# Generated by Django 3.2.2 on 2021-05-10 21:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('screenshow', '0002_auto_20180711_2110'), ] operations = [ migrations.AlterField( model_name='ircmessage', name='id',...
mit
-6,303,775,865,883,706,000
34.232558
111
0.588779
false
4.139344
false
false
false
tabalinas/jsgrid-django
clients/views.py
1
1522
from django.http import HttpResponse from django.core import serializers from django.shortcuts import render from simple_rest import Resource from .models import Client def index(request): return render(request, 'index.html') class Clients(Resource): def get(self, request): clients = Client.object...
mit
-5,578,314,184,561,130,000
32.822222
99
0.631406
false
3.994751
false
false
false
qbuat/rootpy
rootpy/tree/tree.py
1
33528
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import import sys import re import fnmatch import uuid import ROOT from .. import log; log = log[__name__] from .. import asrootpy, QROOT from ..extern.ordereddict import OrderedDict...
gpl-3.0
-4,759,378,811,842,880,000
36.006623
79
0.547691
false
4.87184
false
false
false
Jason-Zhao-Jie/MagicTower
Assets/Firebase/Editor/generate_xml_from_google_services_json.py
1
13865
#!/usr/bin/python # Copyright 2016 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 agre...
bsd-3-clause
2,530,400,691,713,250,300
33.150246
158
0.60714
false
3.84072
false
false
false
sealcode/gpandoc
ui/recipe_ui.py
1
3014
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'recipe.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectNa...
lgpl-3.0
-7,895,148,468,539,092,000
47.580645
109
0.701527
false
3.677656
false
false
false
SqueezeStudioAnimation/omtk
python/omtk/libs/libPymel.py
1
14241
import logging import pymel.core as pymel from maya import OpenMaya # # A PyNodeChain is a special pymel-related object that act exactly like a standard array. # However it allow us to have more bells and whistles. # def is_valid_PyNode(val): return (val and hasattr(val, 'exists') and val.exists()) if val else ...
mit
3,718,975,997,942,480,400
29.17161
117
0.59118
false
3.587154
false
false
false
microsoft/task_oriented_dialogue_as_dataflow_synthesis
src/dataflow/leaderboard/predict.py
1
2613
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ Semantic Machines\N{TRADE MARK SIGN} software. Creates the prediction files from onmt_translate output for the leaderboard. """ import argparse from typing import List import jsons from more_itertools import chunked from dataflow.core.dia...
mit
-9,164,045,024,337,558,000
30.865854
87
0.66284
false
3.337165
false
false
false
nashgul/weechat
audacious_script/audacious.py
1
3067
# audacious now playing for weechat # nashgul <m.alcocer1978@gmail.com> # version 0.1 # white => "00", black => "01", darkblue => "02", darkgreen => "03", lightred => "04", darkred => "05", magenta => "06", orange => "07", yellow => "08", lightgreen => "09", cyan => "10", lightcyan => "11", lightblue => "12", lightmag...
gpl-2.0
-6,693,482,823,102,077,000
45.469697
278
0.573525
false
2.879812
false
false
false
SerpentAI/SerpentAI
serpent/game_frame.py
1
5346
import skimage.color import skimage.measure import skimage.transform import skimage.filters import skimage.morphology import numpy as np import io from PIL import Image class GameFrameError(BaseException): pass class GameFrame: def __init__(self, frame_data, frame_variants=None, timestamp=None, **kwargs...
mit
-799,488,949,246,343,400
31.204819
140
0.633558
false
3.554521
false
false
false
agraubert/agutil
agutil/parallel/src/dispatcher.py
1
2555
from .exceptions import _ParallelBackgroundException from .worker import ThreadWorker, ProcessWorker from itertools import zip_longest WORKERTYPE_THREAD = ThreadWorker WORKERTYPE_PROCESS = ProcessWorker class IterDispatcher: def __init__( self, func, *args, maximum=15, wor...
mit
1,826,956,604,685,546,800
27.707865
71
0.508415
false
4.620253
false
false
false
juliancantillo/royal-films
config/settings/local.py
1
1950
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
mit
-7,272,907,053,856,914,000
30.451613
99
0.488205
false
4.211663
false
false
false
grimoirelab/GrimoireELK
grimoire_elk/enriched/meetup.py
1
13379
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # 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 ...
gpl-3.0
-4,369,405,093,059,499,000
33.660622
101
0.52545
false
3.831329
false
false
false
ratschlab/ASP
applications/msplicer/content_sensors.py
1
2271
# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Written (W) 2006-2007 Soeren Sonnenburg # Written (W) 2007 Gunna...
gpl-2.0
-2,526,926,866,745,545,700
39.553571
246
0.693087
false
2.821118
false
false
false
disqus/django-old
tests/regressiontests/admin_validation/tests.py
1
9982
from django import forms from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.contrib import admin from django.contrib.admin.validation import validate, validate_inline from models import Song, Book, Album, TwoAlbumFKAndAnE, State, City class SongForm(forms.ModelForm):...
bsd-3-clause
1,530,670,665,720,559,000
34.523132
167
0.619415
false
4.482263
true
false
false
aestheticblasphemy/aestheticBlasphemy
pl_messages/migrations/0002_auto_20200828_2129.py
1
1972
# Generated by Django 3.1 on 2020-08-28 15:59 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('pl_messages', '0001_initia...
gpl-3.0
7,672,388,963,139,680,000
41.869565
188
0.647566
false
4.391982
false
false
false
dmwyatt/disney.api
pages/timepicker.py
1
3504
import datetime import logging import os import time import re import webbrowser from dateutil import parser from selenium import webdriver from selenium.common.exceptions import WebDriverException, NoSuchElementException from selenium.webdriver.support.select import Select from helpers import roundTime, difference_...
mit
4,530,609,695,152,849,400
27.958678
100
0.720034
false
3.250464
false
false
false
jakesyl/fail2ban
fail2ban/protocol.py
1
9025
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
-5,112,870,207,491,845,000
53.041916
224
0.668033
false
3.116367
false
false
false
aravindalwan/unyque
unyque/rdimension.py
1
3726
'''Representation of a random variable used in stochastic collocation''' __copyright__ = 'Copyright (C) 2011 Aravind Alwan' __license__ = ''' This file is part of UnyQuE. UnyQuE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softw...
gpl-3.0
-7,993,344,271,732,080,000
31.973451
80
0.580247
false
3.763636
false
false
false
endlessm/chromium-browser
native_client/pnacl/driver/pnacl-readelf.py
2
3751
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from driver_env import env from driver_log import Log import driver_tools import filetype ...
bsd-3-clause
4,530,193,218,533,686,300
39.333333
103
0.628099
false
3.710188
false
false
false
kreatorkodi/repository.torrentbr
script.module.urlresolver/lib/urlresolver/plugins/lib/recaptcha_v2.py
1
7299
# -*- coding: utf-8 -*- """ urlresolver XBMC Addon Copyright (C) 2016 tknorris Derived from Shani's LPro Code (https://github.com/Shani-08/ShaniXBMCWork2/blob/master/plugin.video.live.streamspro/unCaptcha.py) This program is free software: you can redistribute it and/or modify it under the terms of...
gpl-2.0
-6,874,958,783,085,708,000
42.96988
176
0.590218
false
3.574437
false
false
false
mandiant/ioc_writer
ioc_writer/scripts/iocdump.py
1
2104
# iocdump.py # # Copyright 2016 FireEye # Licensed under the Apache 2.0 license. Developed for Mandiant by William # Gibb. # # Mandiant licenses this file to you 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 Lic...
apache-2.0
-8,542,234,613,581,370,000
32.951613
120
0.678232
false
3.710758
false
false
false
tayebzaidi/snova_analysis
Miscellaneous/typ1a_features.py
1
2252
import matplotlib.pyplot as plt import scipy.interpolate as scinterp import numpy as np import peakfinding import peak_original import smoothing import plotter import random import readin import sys import os if __name__== '__main__': Mbdata = [] delM15data = [] path = "/Users/zaidi/Documents/REU/restframe...
gpl-3.0
-7,822,784,365,329,970,000
33.121212
73
0.521314
false
3.292398
false
false
false
DREAM-ODA-OS/tools
metadata/dimap2eop.py
1
3474
#!/usr/bin/env python #------------------------------------------------------------------------------ # # Extract O&M-EOP metadata document. # # Project: EO Metadata Handling # Authors: Martin Paces <martin.paces@eox.at> # #------------------------------------------------------------------------------- # Copyright (C...
mit
-2,620,814,347,079,095,300
36.354839
85
0.632988
false
4.00692
false
false
false
billbrod/spatial-frequency-preferences
sfp/image_computable.py
1
6815
#!/usr/bin/python """code to help run the image-computable version of the model we're using this primarily to check the effect of vignetting, but this does make our project image-computable (though it's a linear model and so will fail in some trivial cases) """ import itertools import argparse import numpy as np impo...
mit
7,969,133,745,800,178,000
51.423077
128
0.634776
false
3.784009
false
false
false
ProjectQ-Framework/ProjectQ
projectq/meta/_loop.py
1
9774
# -*- coding: utf-8 -*- # Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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,039,027,857,358,893,000
37.031128
115
0.562717
false
4.138019
false
false
false
shellphish/puppeteer
examples/ructf_2014_pwn200/doit.py
1
2635
import puppeteer as p import logging try: import standard_logging # pylint: disable=W0611 except ImportError: pass #logging.getLogger("puppeteer.connection").setLevel(logging.DEBUG) #logging.getLogger("puppeteer.manipulator").setLevel(logging.DEBUG) #logging.getLogger("puppeteer.vuln_decorators").setLevel(logg...
gpl-3.0
-910,140,454,615,389,800
33.671053
113
0.639848
false
2.987528
false
false
false
jpaasen/cos
framework/Window.py
1
5925
#from TypeExtensions import Ndarray from gfuncs import processArgs from mynumpy import pi, dot, cos, sin, exp #ones, complex, sin, linspace, exp, pi, dot, angle import mynumpy as np #from pylab import plot, subplot, xlabel, ylabel, grid, show, figure, ion, ioff class Window(np.Ndarray): def __new__(self, type='r...
mit
5,193,458,981,794,878,000
36.5
93
0.4427
false
3.58006
false
false
false
masterdje/wibfi
conf.py
1
22684
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time # Configuration, please edit # Data about this site BLOG_AUTHOR = "Dje" BLOG_TITLE = "Write it before forget it!" # This is the main URL for your site. It will be used # in a prominent link SITE_URL = "http://wibfi.virtua-peanuts.net/" # Thi...
gpl-3.0
-2,642,146,339,466,596,400
34.269051
225
0.670915
false
3.153226
false
false
false
xuanthuong/golfgame
models/work_history.py
1
2217
# -*- coding: utf-8 -*- # Description: work_history table # By Thuong.Tran # Date: 29 Aug 2017 from sqlalchemy import create_engine, Table, Column, MetaData, Integer, Text, DateTime, Float from sqlalchemy import select, and_ import datetime as dt class work_history(): def __init__(self, db_url): _engine = crea...
mit
6,242,151,486,691,357,000
35.95
93
0.564727
false
3.744932
false
false
false
qtproject/qt-creator
scripts/generateClangFormatChecksUI.py
3
9025
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2019 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # ...
gpl-3.0
-6,718,310,938,669,209,000
30.013746
97
0.560665
false
3.718583
false
false
false