repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
josephpbuarao/Preside-CMS
support/docs/source/conf.py
2
10367
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Preside CMS documentation build configuration file, created by # sphinx-quickstart on Sun May 18 22:23:25 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 ...
gpl-2.0
6,639,629,258,661,741,000
29.946269
80
0.707919
false
ict-felix/stack
vt_manager_kvm/src/python/vt_manager_kvm/communication/sfa/trust/auth.py
1
11404
# # SfaAPI authentication # import sys from vt_manager_kvm.communication.sfa.util.faults import InsufficientRights, MissingCallerGID, MissingTrustedRoots, PermissionError, \ BadRequestHash, ConnectionKeyGIDMismatch, SfaPermissionDenied #from vt_manager_kvm.communication.sfa.util.config import Config from vt_manag...
apache-2.0
-1,603,530,708,364,334,000
36.025974
134
0.604963
false
Stolas/vim-exploit
plugin/templates/python_file.py
1
1431
#!/usr/bin/env python # $$COPYRIGHT$$ # Author: $$AUTHOR$$ from struct import pack, unpack from subprocess import call ### The Exploit buff = "AAAA" buff += "\x42\x42\x42\x42" buff += pack("<L", 0x43434343) # exploit += $$SHELLCODE$$ ## The delivery script def exploit(filename, binary, shellcode=None): if shel...
gpl-3.0
-6,607,134,021,538,640,000
24.553571
82
0.585604
false
dankilman/claw
claw/tests/test_configuration.py
1
9543
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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
-8,559,596,098,825,173,000
40.672489
79
0.606832
false
rolobio/DictORM
dictorm/test/test_dictorm.py
1
57518
#! /usr/bin/env python import sqlite3 import unittest import psycopg2 from psycopg2.extras import DictCursor import dictorm test_db_login = { 'database': 'postgres', 'user': 'postgres', 'password': 'dictorm', 'host': 'localhost', 'port': '54321', 'connect_timeout': 3, } def _no_refs(o): ...
apache-2.0
-3,573,144,370,802,542,000
35.752716
106
0.562815
false
charbull/GeminiTest
reader.py
1
1669
#!/usr/bin/env python3 import asyncio import json import datetime import websockets @asyncio.coroutine async def market_data(): """Returns the latest market data""" timestampms = [] async with websockets.connect('wss://api.gemini.com/v1/marketdata/ethusd') as websocket: var_eth_usd_price = await w...
mit
-5,213,556,050,802,760,000
38.738095
92
0.517076
false
emonty/pyos
samples/cloud_databases/list_flavors.py
1
1110
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.ap...
apache-2.0
4,667,520,943,065,578,000
29.833333
78
0.713514
false
jtpaasch/armyguys
armyguys/cli/commands/loadbalancers.py
1
4802
# -*- coding: utf-8 -*- """Commands for managing load balancers.""" import click from ...jobs import loadbalancers as loadbalancer_jobs from ...jobs.exceptions import AwsError from ...jobs.exceptions import ImproperlyConfigured from ...jobs.exceptions import MissingKey from ...jobs.exceptions import Non200Response ...
mit
-4,785,469,106,288,825,000
27.414201
86
0.653061
false
mapzen/vector-datasource
vectordatasource/collision.py
2
2159
from vectordatasource.meta.python import FilterCompiler from vectordatasource.meta.python import create_matcher class CollisionRanker(object): def __init__(self, cases): def _output_fn(datum): return datum['index'] index = 1 matchers = [] for case in cases: ...
mit
3,299,812,645,278,217,000
34.983333
79
0.516443
false
skimpax/python-rfxcom
tests/protocol/test_lighting1.py
1
2738
from unittest import TestCase from rfxcom.protocol.lighting1 import Lighting1 from rfxcom.exceptions import (InvalidPacketLength, UnknownPacketSubtype, UnknownPacketType) class Lighting1TestCase(TestCase): def setUp(self): self.data = bytearray(b'\x07\x10\x00\x01\x41\x0A...
bsd-3-clause
-2,636,206,439,880,392,700
28.44086
76
0.582907
false
LCLS/Protein-Folding-Sims
analysis/state.py
1
1766
import sys import numpy as np import os import os.path import argparse def parse_args(args=None): parser = argparse.ArgumentParser() parser.add_argument("--h1", default=None, type=float, help='RMSD threshold to helix 1' ) parser.add_argument("--h2", ...
mit
-2,607,971,450,660,101,600
33.627451
105
0.565685
false
NeilT-UK/python-utilities
quantiser.py
1
7435
""" export qXXX quantiser functions, and general make_quant function use function closures to return the following pre-defined qXXX functions qE3 to qE192, the standard resistor ranges qE2 [1, 3, 10] qE5 [1, 1.6, 2.5, 4, 6.3, 10] qE10 [1, 1.25, 1.6, 2, 2.5, 3.2, 4, 5, 6.3, 8, 10] return a function that quantises ac...
bsd-2-clause
8,269,376,849,785,245,000
37.128205
95
0.551984
false
benbenbenbenbenbenbenbenben/mitsingen
sing/models.py
1
3770
from __future__ import unicode_literals from django.db import models from django.conf import settings from django.db.models.signals import post_delete from django.dispatch.dispatcher import receiver import datetime class Song(models.Model): name = models.CharField(max_length=200) notes = models.CharField(max_...
agpl-3.0
4,289,320,630,643,934,700
35.960784
116
0.700531
false
kaushik94/sympy
sympy/printing/mathml.py
1
74156
""" A MathML printer. """ from __future__ import print_function, division from sympy import sympify, S, Mul from sympy.core.compatibility import range, string_types, default_sort_key from sympy.core.function import _coeff_isneg from sympy.printing.conventions import split_super_sub, requires_partial from sympy.printi...
bsd-3-clause
-7,659,441,283,775,360,000
34.413563
85
0.551823
false
pychess/pychess
lib/pychess/widgets/playerinfoDialog.py
1
2716
from gi.repository import Gtk, GObject firstRun = True def run(widgets): global firstRun if firstRun: initialize(widgets) firstRun = False widgets["player_info"].show_all() def initialize(widgets): def addColumns(treeview, *columns): model = Gtk.ListStore(*((str, ) * len(co...
gpl-3.0
-6,611,440,754,596,565,000
32.95
107
0.588733
false
guanquan94/orbis
reviews_user/views.py
1
4607
from urllib import quote_plus from account.decorators import login_required from annoying.decorators import render_to from django.contrib import messages from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.urlresolvers import reverse from django.db.models import Q from django.http...
mit
5,985,936,475,654,009,000
30.77931
120
0.738442
false
Fillll/reddit2telegram
reddit2telegram/channels/r_battlestations/app.py
1
1028
#encoding:utf-8 from utils import weighted_random_subreddit # Subreddit that will be a source of content subreddit = weighted_random_subreddit({ 'battlestations': 1.0, # If we want get content from several subreddits # please provide here 'subreddit': probability # 'any_other_subreddit': 0.02 }) # Te...
mit
3,961,850,211,462,758,400
32.16129
75
0.670233
false
robertobarreda/django-experiments
experiments/templatetags/experiments.py
1
3713
from __future__ import absolute_import from django import template from django.core.urlresolvers import reverse from experiments.utils import participant from experiments.manager import experiment_manager from experiments import conf from uuid import uuid4 register = template.Library() @register.inclusion_tag('ex...
mit
6,445,567,667,155,048,000
32.754545
104
0.66146
false
tensorflow/transform
tensorflow_transform/beam/vocabulary_integration_test.py
1
60998
# coding=utf-8 # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
apache-2.0
7,650,429,009,736,055,000
39.99328
80
0.529837
false
ElessarWebb/dummy
src/dummy/viewer/formatting/plotformatters.py
1
2788
from dummy.viewer.formatting import ResultFormatter, Formatter import logging logger = logging.getLogger( __name__ ) try: import pylab import numpy @Formatter.register( 'plot' ) class PlotFormatter( ResultFormatter ): def __init__( self, *args, **kwargs ): super( PlotFormatter, self ).__init__( self, *args...
mit
2,839,519,910,887,826,400
23.243478
88
0.610115
false
Toshakins/wagtail
wagtail/wagtailadmin/views/home.py
1
3918
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.contrib.auth import get_user_model from django.db import connections from django.shortcuts import render from django.template.loader import render_to_string from wagtail.wagtailadmin.navigation import get_explorable_...
bsd-3-clause
-9,083,408,297,776,795,000
32.775862
122
0.641654
false
google/clusterfuzz
src/python/tests/appengine/handlers/cron/manage_vms_test.py
1
40729
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
7,282,561,913,248,177,000
34.571179
80
0.542562
false
DataDog/integrations-extras
lighthouse/tests/test_lighthouse.py
1
3661
import os import pytest from mock import MagicMock from datadog_checks.base.errors import CheckException from datadog_checks.lighthouse import LighthouseCheck HERE = os.path.dirname(os.path.abspath(__file__)) def mock_get_lighthouse_report(cmd, lgr, re=False): if "https" not in cmd[1]: return "", "erro...
bsd-3-clause
-107,395,236,161,458,830
39.677778
94
0.714286
false
MediaKraken/MediaKraken_Deployment
source/database/db_base_sync.py
1
3911
""" Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com> 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. This program is distributed in the hope that it will be useful...
gpl-3.0
-5,817,515,067,658,072,000
38.319588
91
0.479161
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_1_0_6/models/operationdefinition_tests.py
1
3076
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 on 2016-06-23. # 2016, SMART Health IT. import io import json import os import unittest from . import operationdefinition from .fhirdate import FHIRDate class OperationDefinitionTests(unittest.TestCase): def instantiate_from(sel...
bsd-3-clause
-7,493,585,517,461,047,000
45.606061
142
0.688882
false
abevac/mitlocate-web
serverus/models.py
1
3768
from django.db import models from fields import MACAddressField class Building(models.Model): number = models.CharField(max_length=6) name = models.CharField(max_length=50,blank=True) def __unicode__(self): return self.name if self.name else "Building " + self.number class AP(models.Model): ...
mit
7,694,156,392,134,551,000
39.095745
116
0.695594
false
paulu/deepfeatinterp
render_movie.py
1
4264
#!/usr/bin/env python2 from __future__ import division from __future__ import with_statement from __future__ import print_function import time import numpy import deepmodels import json import os.path import argparse import subprocess import pipes import alignface import imageutils import utils if __name__=='__main_...
gpl-3.0
4,066,442,525,585,466,000
41.217822
259
0.723499
false
pfmk/folsom
morello/migrations/0006_auto__add_field_client_immigration_status.py
1
6796
# -*- 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 field 'Client.immigration_status' db.add_column('morello_client', 'immigration_status', ...
gpl-2.0
-6,190,065,619,375,468,000
64.355769
182
0.546057
false
sebdelsol/pyload
module/plugins/hoster/FlyFilesNet.py
1
1279
# -*- coding: utf-8 -*- import re from urllib import unquote from module.network.RequestFactory import getURL from module.plugins.internal.SimpleHoster import SimpleHoster class FlyFilesNet(SimpleHoster): __name__ = "FlyFilesNet" __type__ = "hoster" __version__ = "0.1" __pattern__ = r'http:/...
gpl-3.0
5,604,990,868,534,844,000
27.422222
88
0.591869
false
jjdmol/LOFAR
SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/propagator.py
1
7767
#!/usr/bin/env python # Copyright (C) 2015 # ASTRON (Netherlands Institute for Radio Astronomy) # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands # # This file is part of the LOFAR software suite. # The LOFAR software suite is free software: you can redistribute it # and/or modify it under the terms of the GNU General P...
gpl-3.0
375,552,148,114,528,500
44.95858
164
0.655208
false
adazey/Muzez
libs/nltk/metrics/distance.py
1
6143
# Natural Language Toolkit: Distance Metrics # # Copyright (C) 2001-2016 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # Tom Lippincott <tom@cs.columbia.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # """ Distance Me...
gpl-3.0
5,627,413,548,343,705,000
28.410891
128
0.584079
false
team-xue/xue
xue/bandexams/migrations/0001_initial.py
1
4513
# encoding: 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 'BandExamResult' db.create_table('bandexams_bandexamresult', ( ('id...
bsd-3-clause
-6,872,514,231,132,817,000
59.821918
182
0.551296
false
oas89/iktomi
iktomi/utils/paginator.py
1
8823
# -*- coding: utf-8 -*- from . import cached_property import math, itertools from ..web.reverse import URL def full_page_range(pages_count, page): return range(1, pages_count+1) class FancyPageRange(object): '''Insures there are edge pages are shown at each edge and surround pages around current page.'...
mit
-4,587,178,928,317,800,400
29.635417
80
0.586195
false
Cadasta/cadasta-platform
setup.py
1
3676
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup def get_pkg_from_git_url(link): """ Given a pip-compatible git-requirement, output a setup.py-compatible install requirement. 'git+https://github.com/user/pkg.git@branch' -> 'pkg' """ try: ...
agpl-3.0
992,383,321,183,007,500
27.496124
74
0.60555
false
TOTVS/mdmpublic
python/elasticsearch_tool/check_es_gc_count.py
1
2973
#!/usr/bin/env python3 ##------------------------------------------------------------------- ## File: check_es_gc_count.py ## Author : Denny ## Description : List full gc count for all es nodes ## python check_es_gc_count.py --es_host 192.168.0.2 --max_full_gc 300 ## -- ## Created : <2018-03-20> ## Updated: Time-stam...
bsd-2-clause
-1,835,579,645,765,439,200
43.373134
181
0.578877
false
chuckSMASH/batterystaple
batterystaple/__init__.py
1
4296
from __future__ import division import logging import os import random import time # Set up logger log = logging.getLogger(__name__) ch = logging.StreamHandler() log.addHandler(ch) # Word list file path info BASE_DIR = os.path.dirname(os.path.abspath(__file__)) WORD_LIST_FILENAME = 'word_list_en.txt' WORD_LIST_PATH ...
mit
5,636,973,382,251,409,000
38.777778
124
0.673417
false
redhat-openstack/manila
manila/api/views/shares.py
1
4947
# Copyright 2013 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
7,685,852,231,259,274,000
36.763359
78
0.583586
false
NealJMD/Grinbox-server
model.py
1
1934
import web import time db = web.database(dbn='mysql', db='grinbox', user='root') def get_tokens(address): values = {'address': address} matches = db.select('tokens', vars=values, where='address=$address') if len(matches) > 0: return matches[0] return None def new_tokens(address, auth='', refresh=''): values = {...
gpl-3.0
518,990,015,098,228,160
41.065217
229
0.701655
false
mahim97/zulip
zerver/lib/test_classes.py
2
27055
from contextlib import contextmanager from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sized, Tuple, Union, Text) from django.core.urlresolvers import resolve from django.conf import settings from django.test import TestCase from django.test.client import ...
apache-2.0
-338,123,627,219,205,200
39.623123
112
0.606875
false
avidas/festive.ly
festively/views.py
1
1213
from flask import Blueprint, render_template, jsonify, request, send_from_directory, redirect, url_for import os festivals = Blueprint('festivals', __name__, template_folder='templates') @festivals.route('/') def index(): return render_template('index.html') @festivals.route('/search-results') def featured(): ...
mit
6,787,556,305,931,041,000
34.676471
102
0.67601
false
lpirl/ansible
lib/ansible/executor/task_queue_manager.py
1
14192
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-2,837,152,892,646,285,000
39.899135
182
0.62042
false
Cadene/pretrained-models.pytorch
pretrainedmodels/models/wideresnet.py
1
2830
from __future__ import print_function, division, absolute_import import os from os.path import expanduser import hickle as hkl import torch import torch.nn.functional as F from torch.autograd import Variable __all__ = ['wideresnet50'] model_urls = { 'wideresnet152': 'https://s3.amazonaws.com/pytorch/h5models/wide...
bsd-3-clause
2,037,187,808,385,669,400
31.906977
92
0.553004
false
toenuff/treadmill
tests/services/cgroup_service_test.py
1
6103
""" Unit test for cgroup_service - Treadmill cgroup service """ import os import tempfile import unittest import select import shutil # Disable W0611: Unused import import tests.treadmill_test_deps # pylint: disable=W0611 import mock import treadmill from treadmill.services import cgroup_service class CGroupServ...
apache-2.0
-4,754,556,484,745,860,000
32.905556
78
0.599214
false
ImmobilienScout24/succubus
src/main/python/succubus/daemonize.py
1
7987
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from logging.handlers import SysLogHandler import logging import os import signal import sys import time import atexit import psutil from pwd import getpwnam from grp import getgrnam from signal import SIGT...
apache-2.0
2,880,726,868,329,927,000
30.948
81
0.542757
false
ployground/ploy_fabric
setup.py
1
1176
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() HISTORY = open(os.path.join(here, 'HISTORY.rst')).read() version = "1.1.2.dev0" install_requires = [ 'setuptools', 'ploy >= 1.0.0, < 2dev', 'Fabric>=1.4.0,!=1...
bsd-3-clause
4,504,938,345,993,120,000
27
56
0.623299
false
ThreatConnect-Inc/tcex
tcex/bin/validate.py
1
23337
#!/usr/bin/env python """TcEx Framework Validate Module.""" # standard library import ast import importlib import json import os import sys import traceback from collections import deque # third-party import colorama as c from jsonschema import SchemaError, ValidationError, validate from stdlib_list import stdlib_list...
apache-2.0
4,698,509,395,829,708,000
38.15604
100
0.519304
false
SublimeLinter/SublimeLinter3
highlight_view.py
1
32846
from collections import defaultdict import html from itertools import chain from functools import partial import re import textwrap import threading import uuid import sublime import sublime_plugin from .lint import persist, events, style, util, queue, quick_fix from .lint.const import PROTECTED_REGIONS_KEY, ERROR, W...
mit
7,384,537,639,878,714,000
30.757018
98
0.58863
false
python/performance
pyperformance/benchmarks/bm_tornado_http.py
1
2910
"""Test the performance of simple HTTP serving and client using the Tornado framework. A trivial "application" is generated which generates a number of chunks of data as a HTTP response's body. """ import sys import socket import pyperf from tornado.httpclient import AsyncHTTPClient from tornado.httpserver import ...
mit
-7,253,718,335,569,278,000
26.45283
79
0.646048
false
leogulus/pisco_pipeline
pisco_photometry_all_2019.py
1
76497
import sys, os, re, yaml, subprocess, shlex, FITS_tools import pandas as pd import numpy as np import pickle import matplotlib import matplotlib.pyplot as plt from matplotlib import image import matplotlib.cm as cm import matplotlib.image as mpimg from scipy.optimize import curve_fit import scipy.integrate as integr...
mit
1,685,512,406,826,835,500
47.911125
319
0.590742
false
dropbox/changes
changes/api/cached_snapshot_details.py
1
1182
from __future__ import absolute_import from changes.api.base import APIView from changes.models.snapshot import Snapshot import changes.lib.snapshot_garbage_collection as gc class CachedSnapshotDetailsAPIView(APIView): def unpack_snapshot_ids(self, cluster_map): return {cluster: [i.id.hex for i in images...
apache-2.0
7,377,537,773,328,305,000
38.4
99
0.686125
false
smurfix/pybble
pybble/manager/populate.py
1
12264
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This is part of Pybble, a WMS (Whatever Management System) based on ## Jinja2/Haml, Werkzeug, Flask, and Optimism. ## ## Pybble is Copyright © 2009-2014 by Matthias Urlichs <matthias@urlichs.de>, ## it is li...
gpl-3.0
3,344,574,914,797,640,000
32.897222
160
0.676227
false
hughsie/fwupd
data/device-tests/hardware.py
2
5214
#!/usr/bin/python3 # pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order # # Copyright (C) 2017 Richard Hughes <richard@hughsie.com> # # SPDX-License-Identifier: LGPL-2.1+ import gi import os import requests import time import sys import glob import json from termcolor import color...
lgpl-2.1
6,511,718,987,207,250,000
32
90
0.521672
false
birsoyo/conan
conans/client/rest/auth_manager.py
1
8686
""" Collaborate with RestApiClient to make remote anonymous and authenticated calls. Uses user_io to request user's login and password and obtain a token for calling authenticated methods if receives AuthenticationException from RestApiClient. Flow: Directly invoke a REST method in RestApiClient, example: get_co...
mit
-3,967,779,604,396,425,000
42.21393
96
0.632397
false
megakevin/single-authored-code-evolution-analysis
fix_bug_commits.py
1
6318
__author__ = 'kevin' from datetime import datetime from subprocess import call, check_output import sys import os import csv import copy import tag_lists class GitTag(): """Represents a Tag in a git repository""" def __init__(self, line): raw_tag, raw_hash, raw_date, raw_timestamp = line.split("|") ...
mit
3,895,848,780,048,690,700
30.437811
146
0.572966
false
catsop/CATMAID
django/applications/catmaid/apps.py
1
10359
import logging from catmaid import history from django.apps import AppConfig from django.conf import settings from django.core.checks import Warning, register from django.core.exceptions import ImproperlyConfigured from django.db import connection from django.db.utils import ProgrammingError from django.db.models imp...
gpl-3.0
-3,773,079,620,381,240,300
40.939271
98
0.62255
false
juanjosegzl/learningpygame
ezmenu.py
1
2298
#! /usr/bin/env python # I found this file inside Super Mario Bros python # written by HJ https://sourceforge.net/projects/supermariobrosp/ # the complete work is licensed under GPL3 although I can not determine# license of this file # maybe this is the original author, we can contact him/her http://www.pygame.org/pro...
gpl-3.0
8,211,902,187,949,101,000
30.479452
113
0.511314
false
kobotoolbox/kobocat
onadata/apps/logger/xform_instance_parser.py
1
12334
# coding: utf-8 import logging import re import sys import dateutil.parser import six from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from django.utils.six import text_type from xml.dom import minidom, Node from onadata.libs.utils.common_tags import XFORM_ID_STRING cla...
bsd-2-clause
-2,918,455,112,718,348,000
33.261111
107
0.580104
false
SUMPaul/dblog
dblog/settings.py
1
3991
""" Django settings for dblog project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os ...
mit
-982,665,622,674,144,000
25.966216
91
0.660987
false
sim0629/irc
setup.py
1
1516
import sys import setuptools def read_long_description(): with open('README.rst') as f: data = f.read() with open('CHANGES.rst') as f: data += '\n\n' + f.read() return data importlib_req = ['importlib'] if sys.version_info < (2,7) else [] argparse_req = ['argparse'] if sys.ver...
lgpl-2.1
-8,512,088,516,057,422,000
26.603774
79
0.575198
false
landgraf/zeromq-Ada
fixHeader.py
1
4068
#!/usr/bin/env python import GPS from os.path import * HEADER="""############################################################################## ## ## ## 0MQ Ada-binding ## ## ...
gpl-2.0
-4,971,576,670,078,520,000
43.703297
103
0.420108
false
sbsdev/daisyproducer
daisyproducer/documents/models.py
1
14120
import uuid, datetime from os.path import join from shutil import rmtree from daisyproducer.documents.storage import OverwriteStorage from django.conf import settings from django.contrib.auth.models import User, Group from django.db import models from django.db.models import Max from django.forms import ModelForm from...
agpl-3.0
154,982,223,232,252,600
36.653333
167
0.605949
false
openmotics/gateway
testing/unittests/gateway_tests/output_controller_test.py
1
15041
# Copyright (C) 2020 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribu...
agpl-3.0
-7,424,221,646,043,785,000
49.136667
154
0.613324
false
flavour/ssf
modules/eden/project.py
1
132310
# -*- coding: utf-8 -*- """ Sahana Eden Project Model @copyright: 2011-2012 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software witho...
mit
-4,045,506,614,330,831,000
40.321049
219
0.414814
false
Remillard/VHDL-Mode
vhdl_lang.py
1
62003
# pylint: disable=C0103, C0111 """ -------------------------------------------------------------------------------- VHDL Language Module. Defines class structures and methods for identifying and manipulating text structures, and extracting and replicating lexical elements. ---------------------------------...
mit
-4,631,636,265,926,570,000
41.117524
195
0.511072
false
gr3yman/TileControl
TileCtrl.py
1
2772
#!/usr/env/python3 import subprocess import tinydb from tinydb.storages import MemoryStorage import tkinter as tk ## who knows if this is working or not? def keypress(event): if event.keysym == 'Escape': root.destroy() x = event.char if x == "Ctrl-Z": print('c z') elif x == "Ctrl-X": ...
gpl-2.0
-4,507,359,509,074,542,000
29.461538
128
0.621212
false
kdheepak89/RTDT
RTDT/transit.py
1
13035
from __future__ import print_function from google.transit import gtfs_realtime_pb2 import requests import pandas as pd from io import BytesIO import zipfile import os import os.path import datetime import math UTC_OFFSET = int(os.getenv('OFFSET', 7)) DEFAULT_LOCATION = {u'lat': 39.7433814, u'lng': -104.98910989999999}...
bsd-3-clause
3,521,527,067,512,627,000
35.008287
149
0.627234
false
pmaigutyak/mp-shop
wishlist/models.py
1
2022
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from wishlist import exceptions class WishListItem(models.Model): user = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='wishlist_items', verbose_name=_('Owner'), on_...
isc
1,740,848,277,993,363,200
23.361446
73
0.60633
false
jsfan/flask-dance
setup.py
1
2079
# coding=utf-8 from __future__ import unicode_literals import re from setuptools import setup, Command, find_packages class PyTest(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): import sys,subprocess err...
mit
-285,380,746,085,817,500
26
87
0.60558
false
Jozhogg/iris
lib/iris/tests/unit/fileformats/grib/load_convert/test_translate_phenomenon.py
1
2806
# (C) British Crown Copyright 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
lgpl-3.0
1,804,148,639,123,935,500
37.972222
78
0.667855
false
MobleyLab/SAMPL6
host_guest/Analysis/Scripts/analyze_sampling.py
1
116143
#!/usr/bin/env python # ============================================================================= # GLOBAL IMPORTS # ============================================================================= import collections import copy import itertools import json import math import os import numpy as np import pandas as ...
mit
-5,714,837,175,276,872,000
45.180119
292
0.598951
false
alexanderjfink/miner
library/maps/uscensus_old.py
1
3983
""" miner map for U.S. Census 2010 Minnesota database """ from miner import * class USCensus2010: description = 'Data from the 2010 Dicennial US Census.' homepage = 'http://www.census.gov' # Place all download functionality in here, should download files to a standard download directory # Should check whether ...
gpl-2.0
-8,341,483,920,533,410,000
34.5625
129
0.621893
false
ssorgatem/pulsar
galaxy/tools/deps/resolvers/modules.py
1
6098
""" This file contains the outline of an implementation to load environment modules (http://modules.sourceforge.net/). This is a community contributed feature and the core Galaxy team does utilize it, hence support for it will be minimal. The Galaxy team eagerly welcomes community contribution and maintenance however....
apache-2.0
17,806,055,026,369,246
38.089744
133
0.639062
false
dit/dit
dit/divergences/copy_mutual_information.py
1
2403
""" The copy mutual information, as defined by Kolchinsky & Corominas-Murtra. """ from .pmf import relative_entropy from ..utils import unitful __all__ = ( 'copy_mutual_information', ) def binary_kullback_leibler_divergence(p, q): """ Compute the binary Killback-Leibler divergence. Parameters ...
bsd-3-clause
-1,958,601,788,302,301,700
26
116
0.610071
false
xgt001/uav_msr_ip14
opencv_rnd/test_shape_detect.py
1
1569
__author__ = 'ganesh' __author__ = 'ganesh' import cv2 import numpy as np # TODO: loop through folder files filename = "alpha_N.JPG" image = cv2.imread(filename) newx,newy = image.shape[1]/6,image.shape[0]/6 #new size (w,h) img = cv2.resize(image,(newx,newy)) img_sav = img # CODE: Resize Image Toggle # cv2.ims...
mit
-1,318,141,930,111,463,400
24.306452
105
0.680051
false
vmx/spring
spring/docgen.py
1
6786
import math import time from hashlib import md5 from itertools import cycle import random import numpy as np from spring.states import STATES, NUM_STATES from fastdocgen import build_achievements class Iterator(object): def __init__(self): self.prefix = None def __iter__(self): return sel...
apache-2.0
6,549,115,801,659,941,000
28.633188
80
0.575007
false
thomaslima/PySpice
ngspice-shared/test-module.py
1
2074
#################################################################################################### import PySpice.Logging.Logging as Logging logger = Logging.setup_logging() #################################################################################################### from PySpice.Spice.NgSpice.Shared import...
gpl-3.0
3,604,429,557,876,537,300
27.805556
100
0.440694
false
MickSandoz/compassion-switzerland
sponsorship_switzerland/models/child.py
1
2660
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
agpl-3.0
-981,044,447,322,504,400
37.550725
79
0.594361
false
maxisi/gwsumm
gwsumm/plot/range.py
1
8183
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
gpl-3.0
-7,261,202,758,330,606,000
31.995968
79
0.578883
false
johannes-gehrs/centos_packages
packages.py
1
6353
from __future__ import absolute_import, division, unicode_literals import xml.etree.ElementTree as ElT import bz2 import io import os import uuid import sqlite3 import config import re import datetime import pickle import requests REPODATA_ARC_SUFFIX = "x86_64/" METADATA_SUFFIX = "repodata/repomd.xml" PACKAGE_TIMESTAM...
mit
3,776,522,657,652,189,000
30.450495
97
0.628207
false
florian-f/sklearn
sklearn/datasets/svmlight_format.py
1
13269
"""This module implements a loader and dumper for the svmlight format This format is a text-based format, with one sample per line. It does not store zero valued features hence is suitable for sparse dataset. The first element of each line can be used to store a target variable to predict. This format is used as the...
bsd-3-clause
-6,897,996,081,832,028,000
37.239193
82
0.643455
false
hivam/doctor_dental_care
models/doctor_list_report_odontologia.py
1
6674
# -*- encoding: utf-8 -*- # ############################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
1,476,002,846,682,354,700
37.350575
228
0.698591
false
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/release_status.py
1
2847
""" .. module:: release_status The **Release Status** is one of: 1. Official 2. Promotion 3. Bootleg 4. Pseudo-Release The Release Status is referenced by the Release model. Read more at the `Release documentation on MusicBrainz`_. .. _Release documentation on MusicBrainz: https://musicbrainz.org/doc/Release Postr...
gpl-2.0
-8,436,907,559,168,400,000
30.633333
79
0.651563
false
berkeley-stat159/project-delta
code/utils/hrf.py
1
1130
""" This script contains the hrf() function, which is a utility for computing values of the hemodynamic response function at given times. This is a necessary tool for predicting BOLD signals. Future Python scripts can take advantage of the hrf() function by including the command sys.path.append("code/utils") fr...
bsd-3-clause
-4,324,050,846,695,731,700
29.567568
80
0.678761
false
ijat/Hotspot-PUTRA-Auto-login
PyInstaller-3.2/PyInstaller/hooks/hook-IPython.py
1
1076
#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
gpl-3.0
248,336,969,426,041,340
38.851852
92
0.656134
false
cechrist/cardoon
cardoon/devices/cppaddev.py
1
5902
"""CppAD device interface. Provides functions to implement evaluation of nonlinear equations and derivatives using the pycppad library: http://www.seanet.com/~bradbell/pycppad/index.xml Usage: ===== import cppaddev as ad ... def process_params(self): ... # Add the following at the end to make su...
gpl-3.0
2,864,869,276,039,015,400
27.650485
72
0.624873
false
zhangjiajie/PTP-light
PTP.py
1
11582
#! /usr/bin/env python try: import sys import math import collections import os import argparse import treeIO from treeIO import Tree, SeqGroup from nexus import NexusReader from PTPLLH import lh_ratio_test, exp_distribution, species_setting, exponential_mixture from summary import partitionparser except Impo...
gpl-3.0
6,080,697,368,405,204,000
33.990937
192
0.656363
false
MayankGo/ec2-api
ec2api/db/api.py
1
3832
# Copyright 2013 Cloudscaling Group, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
-8,293,767,394,349,254,000
28.030303
78
0.664405
false
callowayproject/django-resources
contentrelations/related.py
1
7787
from django.db.models import Q from django.db import models from django.contrib.contenttypes.models import ContentType try: from django.contrib.contenttypes.fields import GenericForeignKey except ImportError: from django.contrib.contenttypes.generic import GenericForeignKey from .generic import GFKOptimizedQue...
apache-2.0
-3,735,973,520,963,777,500
33.919283
96
0.582381
false
google/struct2tensor
struct2tensor/expression_impl/promote_and_broadcast.py
1
4361
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-7,373,022,071,630,664,000
23.92
80
0.63357
false
loveward/yingsuo
mujson_mgr.py
1
10335
#!/usr/bin/python # -*- coding: UTF-8 -*- import traceback from shadowsocks import shell, common from configloader import load_config, get_config import random import getopt import sys import json import base64 class MuJsonLoader(object): def __init__(self): self.json = None def load(self, path): l = "[]" t...
apache-2.0
8,622,617,022,800,231,000
27.708333
205
0.577649
false
goodes/fit4school
fit4school/core/migrations/0007_trackeractivity.py
1
1072
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-12-10 07:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0006_auto_20171207_0148'), ] operations = ...
apache-2.0
-7,871,774,560,359,299,000
35.965517
160
0.594216
false
devttys0/idascript
src/idascript.py
1
1858
################################################################################################## # Python module for IDAPython scripts executed via idascript. # # Copied from the original idascript utility, with minor changes: http://www.hexblog.com/?p=128 # # Craig Heffner # 14-November-2012 # http://www.tacn...
mit
-197,185,512,939,456,770
24.927536
98
0.558127
false
poppy-project/pypot
pypot/vrep/__init__.py
1
5778
import json import logging from functools import partial from collections import OrderedDict from .io import (VrepIO, close_all_connections, VrepIOError, VrepConnectionError) from .controller import VrepController, VrepObjectTracker from .controller import VrepCollisionTracker, VrepCollisionDetector...
gpl-3.0
8,680,533,189,429,828,000
31.829545
202
0.647975
false
childsish/lhc-python
setup.py
1
1367
import os from subprocess import Popen, PIPE from setuptools import setup, find_packages, Extension bitap_extension = Extension( 'lhc.misc.bitap', ['lib/bitap/bitapmodule.cpp', 'lib/bitap/bitap.cpp'], include_dirs=['lib/bitap']) with open('README.rst', encoding='utf-8') if os.path.exists('README.rst') e...
gpl-2.0
-6,920,184,595,894,356,000
34.051282
89
0.649598
false
chaubold/hytra
empryonic/learning/quantification.py
1
34287
import unittest as _ut import numpy as np from empryonic import io as _io import math ### ### Events as members of sets for the calculation of performance measures ### class Event( object ): @property def setid( self ): return self._setid @property def timestep( self ): return self._ti...
mit
3,066,249,526,016,363,000
34.53057
538
0.572491
false
chaubold/hytra
scripts/train_transition_classifier.py
1
17108
# pythonpath modification to make hytra and empryonic available # for import without requiring it to be installed from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals import os import sys sys.path.insert(0, os.path.abspath('..')) # standard impor...
mit
-8,698,759,479,755,835,000
47.602273
144
0.623276
false
nemesiscodex/JukyOS-sugar
extensions/deviceicon/speech.py
1
5531
# Copyright (C) 2011 One Laptop Per Child # # 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. # # This program is distribu...
gpl-2.0
-2,867,048,349,204,522,500
36.371622
77
0.637859
false
openstack/heat
heat/engine/resources/openstack/heat/remote_stack.py
1
18516
# # 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 # ...
apache-2.0
5,183,448,817,349,931,000
37.81761
78
0.582523
false
pgroudas/pants
tests/python/pants_test/tasks/test_listtargets.py
1
5725
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
apache-2.0
2,235,080,474,625,150,000
27.482587
95
0.553886
false
encukou/freeipa
ipatests/test_integration/test_forced_client_reenrollment.py
2
11881
# Authors: # Ana Krivokapic <akrivoka@redhat.com> # # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information # # 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...
gpl-3.0
-71,998,069,357,009,700
35.112462
78
0.610723
false