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
michaellaier/pymor
src/pymortests/fixtures/discretization.py
1
1548
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function from itertools import product import pytest f...
bsd-2-clause
-357,065,425,509,571,400
37.7
120
0.72739
false
surak/Raspberry
electronics/dotmatrix/dotmatrix_letters.py
1
6534
alphabet= {'A': [0b11110011, 0b11101101, 0b11011110, 0b11011110, 0b11000000, 0b11011110, 0b11011110, 0b11011110], 'B': [0b11100000, 0b11011110, 0b11011110, 0b11100000, ...
bsd-3-clause
256,584,926,753,121,860
28.04
55
0.350627
false
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/Examples/Catalyst/PythonDolfinExample/simulation-catalyst-step2.py
1
5483
"""This demo program solves the incompressible Navier-Stokes equations on an L-shaped domain using Chorin's splitting method.""" # Copyright (C) 2010-2011 Anders Logg # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Publi...
gpl-3.0
4,628,511,660,132,762,000
26.552764
94
0.683932
false
frank2/paranoia
test/test_fundamentals.py
1
2457
#!/usr/bin/env python import unittest from paranoia.fundamentals import * class FundamentalsModuleTest(unittest.TestCase): def test_crt(self): self.assertNotEqual(malloc, None) self.assertNotEqual(realloc, None) self.assertNotEqual(free, None) self.assertNotEqual(memset, None) ...
gpl-3.0
-2,910,718,512,257,623,600
35.132353
93
0.578755
false
jimi-c/ansible
lib/ansible/modules/cloud/amazon/ec2_instance.py
1
67394
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
1,229,012,916,601,802,200
41.253292
160
0.574932
false
mblayman/markwiki
markwiki/storage/fs/user.py
1
4620
# Copyright (c) 2016, Matt Layman import json import hashlib import os from markwiki.exceptions import UserStorageError from markwiki.models.user import User from markwiki.storage.user import UserStorage class FileUserStorage(UserStorage): '''A file system based user storage''' def __init__(self, config): ...
bsd-2-clause
3,899,588,193,903,150,000
35.377953
78
0.588528
false
RUB-NDS/PRET
fuzzer.py
1
1263
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class fuzzer(): vol = ["", ".", "\\", "/", "file:///", "C:/"] var = ["~", "$HOME"] win = ["%WINDIR%", "%SYSTEMROOT%", "%HOMEPATH%", "%PROGRAMFILES%"] smb = ["\\\\127.0.0.1\\"] web = ["http://127.0.0.1/"] # "http://hacking-printers.net/log.me" dir = ["..", "......
gpl-2.0
3,648,293,130,167,252,500
41.1
69
0.475851
false
oxyum/python-tlogger
tlogger/logger.py
1
4372
# -*- mode: python; coding: utf-8; -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .action_binder import ActionBinder from .action_stack import action_stack from .actions import Action from .constants import ...
mit
1,517,032,221,352,195,000
32.891473
79
0.623056
false
pombreda/eggy
eggy/model/Model.py
1
94271
#!/usr/bin/env python # eggy - a useful IDE # Copyright (c) 2008 Mark Florisson # # 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 la...
gpl-3.0
8,457,566,645,242,356,000
34.175746
97
0.546923
false
ptgrogan/ofspy
ofspy/test/player/test_player.py
1
16321
""" Copyright 2015 Paul T. Grogan, Massachusetts Institute of Technology Copyright 2017 Paul T. Grogan, Massachusetts Institute of Technology 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 htt...
apache-2.0
4,516,671,871,898,892,000
42.873656
101
0.615097
false
jasondunsmore/heat
heat/engine/update.py
1
11487
# # 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
-289,319,108,590,892,350
40.172043
79
0.582746
false
onqtam/doctest
scripts/bench/run_all.py
1
2138
#!/usr/bin/python3 import os import sys if sys.version_info[0] < 3: raise Exception("Python 3 or a more recent version is required.") import json import subprocess average_num_times = 3 max_accum_time = 60 # don't take too long on a test - stop averaging if time exceeds some amount of seconds with open('tests.js...
mit
-1,111,946,970,744,045,000
31.892308
116
0.472404
false
ajenhl/eats
server/eats/tests/test_name_form.py
1
3009
# -*- coding: utf-8 -*- from django.test import TestCase from eats.lib.name_form import abbreviate_name, asciify_name, create_name_forms, demacronise_name, substitute_ascii, unpunctuate_name class NameFormTestCase (TestCase): def test_abbreviate_name (self): data = ( ('en', u'Smith and Smit...
gpl-3.0
731,654,928,201,013,500
36.3
133
0.531166
false
ray-project/ray
release/xgboost_tests/workloads/tune_32x4.py
1
1835
"""Moderate Ray Tune run (32 trials, 4 actors). This training run will start 32 Ray Tune trials, each starting 4 actors. The cluster comprises 32 nodes. Test owner: krfricke Acceptance criteria: Should run through and report final results, as well as the Ray Tune results table. No trials should error. All trials sho...
apache-2.0
452,494,953,157,767,740
24.486111
73
0.621253
false
cdapio/website
scripts/generate-videos/main.py
1
4086
#!/usr/bin/python # Copyright © 2015-2019 Cask Data, 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 appli...
apache-2.0
3,500,132,186,289,563,600
35.150442
204
0.682742
false
morgangalpin/duckomatic
tests/utils/test_subscriber.py
1
1612
# -*- coding: utf-8 -*- from pytest import raises # The parametrize function is generated, so this doesn't work: # # from pytest.mark import parametrize # import pytest parametrize = pytest.mark.parametrize # from duckomatic import metadata from duckomatic.utils.subscriber import (Subscriber, NoDataException) c...
gpl-3.0
-1,296,764,209,724,166,700
27.785714
69
0.620347
false
scottwittenburg/web-hpc-manager
python/webserver/SecureRemoteLauncher.py
1
5903
import paramiko import select import argparse import sys import threading import uuid import tempfile import os import getpass from ForwardSshTunnel import ForwardSshTunnel class SecureRemoteLauncher(object) : #------------------------------------------------------------------------- # SecureRemoteLauncher...
bsd-3-clause
8,105,040,297,267,630,000
42.725926
308
0.509571
false
swift-lang/swift-e-lab
parsl/tests/test_python_apps/test_at_scale.py
1
1546
import argparse import time import pytest import parsl from parsl.app.app import App from parsl.tests.configs.local_threads import config parsl.clear() parsl.load(config) @App('python') def double(x): return x * 2 def plain_double(x): return x * 2 @pytest.mark.skip('not asserting anything') def test_pl...
apache-2.0
-1,594,028,241,758,037,000
18.325
61
0.584735
false
RealTimeWeb/wikisite
MoinMoin/macro/OrphanedPages.py
1
1487
# -*- coding: iso-8859-1 -*- """ MoinMoin - OrphanedPages Macro @copyright: 2001 Juergen Hermann <jh@web.de> @license: GNU GPL, see COPYING for details. """ Dependencies = ["pages"] def macro_OrphanedPages(macro): _ = macro.request.getText if macro.request.mode_getpagelinks: # prevent recursion ...
apache-2.0
3,464,022,933,834,179,600
28.156863
67
0.599193
false
zepto/musio-python2
examples/musioencode.py
1
8751
#!/usr/bin/env python2 # vim: sw=4:ts=4:sts=4:fdm=indent:fdl=0: # -*- coding: UTF8 -*- # # Test the vorbis encoder. # Copyright (C) 2013 Josiah Gordon <josiahg@gmail.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...
gpl-3.0
5,520,849,006,102,449,000
40.278302
88
0.531368
false
locke105/mc-watchdog
watchdog.py
1
3354
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Mathew Odden <locke105@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
apache-2.0
-536,500,030,523,389,630
27.666667
77
0.596899
false
kallimachos/template
doc/conf.py
1
7434
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Configuration file for template documentation.""" import os import sys try: import sphinx_rtd_theme except ImportError: sphinx_rtd_theme = None try: from sphinxcontrib import spelling except ImportError as e: print(e) spelling = None # If extensi...
gpl-3.0
-856,876,936,687,386,000
31.043103
79
0.706618
false
Jaiz909/catscrape
catscrape/catscrape_main.py
1
5125
import logging import re from imgurpython import ImgurClient import os import sys import urllib from threading import Thread try: import Queue as queue except ImportError: import queue as queue try: import configparser except ImportError: import ConfigParser as configparser logger = logging.getLogger('...
mit
2,054,281,727,529,545,000
33.166667
100
0.628098
false
lino-framework/tera
lino_tera/lib/invoicing/models.py
1
1528
# -*- coding: UTF-8 -*- # Copyright 2016-2019 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """The :xfile:`models.py` module for :mod:`lino_voga.lib.invoicing`. """ from __future__ import unicode_literals from lino_xl.lib.invoicing.models import * from lino.api import...
bsd-2-clause
-857,604,811,259,924,500
23.645161
78
0.684555
false
ahri/pycurlbrowser
tests/test_curl.py
1
1329
from unittest import TestCase from pycurlbrowser import CurlBackend from datetime import timedelta import pycurl class TestBackendApi(TestCase): """ Test that the HttpBackend API is adhered-to. """ def setUp(self): self.backend = CurlBackend() self.backend._curl.setopt(pycurl.CONNECTT...
agpl-3.0
1,126,251,681,532,339,600
25.058824
88
0.588412
false
NORDUnet/opennsa
opennsa/config.py
1
11031
""" Configuration reader and defaults. Author: Henrik Thostrup Jensen <htj@nordu.net> Copyright: NORDUnet (2011) """ import os import configparser from opennsa import constants as cnt # defaults DEFAULT_CONFIG_FILE = '/etc/opennsa.conf' DEFAULT_LOG_FILE = '/var/log/opennsa.log' DEFAULT_TLS ...
bsd-3-clause
-2,675,240,323,979,953,000
30.42735
121
0.619164
false
NoBodyCam/TftpPxeBootBareMetal
nova/network/api.py
1
16995
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (t...
apache-2.0
8,339,819,754,926,506,000
40.756757
78
0.540983
false
electrumalt/electrum-ixc
lib/blockchain.py
1
20235
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@ecdsa.org # # 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...
gpl-3.0
960,714,723,618,996,600
31.584541
97
0.540252
false
sebgoa/client-python
kubernetes/client/models/v1_container_state.py
2
4601
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
-1,741,430,488,379,125,000
26.224852
105
0.562921
false
manparvesh/manparvesh.github.io
oldsitejekyll/markdown_generator/professional.py
1
3829
# coding: utf-8 # # Publications markdown generator for academicpages # # Takes a TSV of publications with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook, with the core python code in publications.py. Run either from the `markdown_g...
mit
1,995,675,648,712,673,500
34.453704
346
0.665709
false
qxf2/qxf2-page-object-model
utils/excel_compare.py
1
2729
""" Qxf2 Services: Utility script to compare two excel files using openxl module """ import openpyxl import os class Excel_Compare(): def is_equal(self,xl_actual,xl_expected): "Method to compare the Actual and Expected xl file" result_flag = True if not os.path.exists(xl_actual): ...
mit
4,930,645,045,380,420,000
39.746269
154
0.585562
false
HackatONG-ProgramAR/cordoba-aprende
aulalibre/aulavirtual/models.py
1
4354
# -*- coding: utf-8 -*- from django.db import models from educar import get_descripciones_ebooks # Create your models here. class Alumno(models.Model): apellido = models.CharField(max_length=100) nombre = models.CharField(max_length=100) colegio = models.ForeignKey('Colegio') curso = models.ForeignKe...
gpl-2.0
926,056,478,757,999,900
26.320755
79
0.617173
false
tswast/google-cloud-python
firestore/google/cloud/firestore_admin_v1/gapic/firestore_admin_client_config.py
2
2613
config = { "interfaces": { "google.firestore.admin.v1.FirestoreAdmin": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], "non_idempotent": [], }, "retry_params": { "default": { ...
apache-2.0
7,393,237,340,222,576,000
37.426471
79
0.38385
false
Fewbytes/cosmo-plugin-openstack-neutron-router-provisioner
openstack_neutron_router_provisioner/tasks.py
1
4033
# vim: ts=4 sw=4 et # Standard import json import os # Celery from celery import task # OpenStack import keystoneclient.v2_0.client as ksclient from neutronclient.neutron import client # Cosmo from cosmo.events import send_event # TODO: rename to create() @task def provision(__cloudify_id, router, enable_snat=Tru...
apache-2.0
2,368,053,449,231,438,300
32.330579
114
0.646169
false
zsjohny/jumpserver
apps/users/views/login.py
1
6958
# ~*~ coding: utf-8 ~*~ from __future__ import unicode_literals from django.shortcuts import render from django.views.generic import RedirectView from django.core.files.storage import default_storage from django.shortcuts import reverse, redirect from django.utils.translation import ugettext as _ from django.views.gen...
gpl-2.0
1,119,947,825,107,735,700
35.621053
83
0.624174
false
centaurialpha/ninja-ide
ninja_ide/core/file_handling/file_manager.py
1
10239
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
gpl-3.0
8,059,544,523,464,693,000
28.938596
78
0.64518
false
bluekyu/kyuNotebook
src/kyunotebooklib/icons_rc.py
1
18057
# -*- coding: utf-8 -*- # Resource object code # # Created: ? 2? 20 17:07:44 2012 # by: The Resource Compiler for PyQt (Qt v4.7.4) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = b"\ \x00\x00\x00\xf6\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48...
gpl-3.0
3,928,658,607,921,388,000
50.591429
97
0.72177
false
pkimber/checkout
checkout/migrations/0002_auto_20150625_1159.py
1
1640
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def _init_state(model, name, slug): try: model.objects.get(slug=slug) except model.DoesNotExist: instance = model(**dict(name=name, slug=slug)) instance.save() instance.ful...
apache-2.0
-5,201,387,871,116,438,000
28.818182
75
0.643902
false
GeoNode/django-osgeo-importer
osgeo_importer/tests/tests_original.py
1
53760
# -*- coding: UTF-8 -*- # (see test_utf8 for the reason why this file needs a coding cookie) from geonode.geoserver.helpers import ogc_server_settings from geonode.layers.models import Layer import json import logging import os import shutil import unittest from django import db from django.conf import settings from ...
gpl-3.0
-3,969,625,452,851,933,000
36.098689
118
0.587134
false
dials/dials
algorithms/background/gmodel/algorithm.py
1
2792
import pickle class ModelCache: """ A class to cache the model """ def __init__(self): """ Create a model dictionary """ self.model = dict() def get(self, name): """ Get the model """ if name is None: raise RuntimeError(...
bsd-3-clause
-6,660,291,910,596,019,000
26.372549
81
0.59563
false
solackerman/sqlalchemy-redshift
sqlalchemy_redshift/dialect.py
1
30445
import re from collections import defaultdict import pkg_resources import sqlalchemy as sa from sqlalchemy import Column, exc, inspect, schema from sqlalchemy.dialects.postgresql.base import PGCompiler, PGDDLCompiler from sqlalchemy.dialects.postgresql.psycopg2 import PGDialect_psycopg2 from sqlalchemy.engine import r...
mit
1,824,985,647,472,262,000
35.461078
79
0.570636
false
wgwoods/blivet
blivet/flags.py
1
3889
# flags.py # # Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that...
gpl-2.0
-8,068,387,037,196,000,000
31.957627
79
0.646953
false
beaker-project/beaker
Server/bkr/server/model/openstack.py
1
1285
# 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. from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.types...
gpl-2.0
1,555,254,236,307,001,600
46.592593
84
0.768093
false
apache/allura
Allura/allura/tests/test_multifactor.py
2
11754
# 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 (t...
apache-2.0
-8,189,101,684,502,008,000
33.570588
135
0.648715
false
talset/monitoring-plugins
disk/check_disk.py
1
4769
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Florian Lambert <flambert@redhat.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
apache-2.0
-8,505,828,684,046,612,000
32.118056
135
0.563011
false
phobson/bokeh
bokeh/application/handlers/tests/test_code.py
1
3031
from __future__ import absolute_import, print_function from os.path import abspath, sep import unittest from bokeh.application.handlers import CodeHandler from bokeh.document import Document script_adds_two_roots = """ from bokeh.io import curdoc from bokeh.model import Model from bokeh.core.properties import Int, I...
bsd-3-clause
9,053,226,742,000,388,000
32.677778
143
0.655559
false
feend78/evennia
evennia/typeclasses/migrations/0008_lock_and_perm_rename.py
2
1717
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-01-25 22:30 from __future__ import unicode_literals import re from django.db import migrations def update_perms_and_locks(apps, schema_editor): # update all permissions Tag = apps.get_model('typeclasses', 'Tag') perm_map = {"guests": "guest", ...
bsd-3-clause
-2,164,045,350,960,106,800
33.34
99
0.585323
false
beeryardtech/scripts
python/dk_test/scenarios/scenario_common.py
2
4295
__author__ = "Travis Goldie" __email__ = "test_automation@us.sios.com" __date__ = "11/14/12" __copyright__ = "(c) SIOS Technology Corp 2012" #For unittesting import os import sys from time import sleep sys.path.insert(0, r"C:\Program Files\dk_test\libs") from dkconfig import dkconfig from exect...
apache-2.0
98,617,112,899,321,780
26.071895
74
0.677299
false
vergecurrency/VERGE
test/functional/wallet_txn_doublespend.py
1
5648
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet accounts properly when there is a double-spend conflict.""" from decimal import Decimal...
mit
-443,130,276,645,554,200
41.787879
111
0.633853
false
NavarraBiomed/clips
clips_app/management/commands/test.py
1
12162
from django.core.management.base import BaseCommand, CommandError from clips_app.models import Case import django import csv def parse_num(value): if value.isdigit(): return int(value) else: return None; def parse_date(value): pieces = value.split("/") try: return (pieces[2]+...
gpl-2.0
2,221,978,827,972,849,400
49.443983
122
0.492185
false
the0forge/sp
frontend/migrations/0009_auto__add_field_product_royalty.py
1
21268
# -*- 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 field 'Product.royalty' db.add_column(u'frontend_product', 'roya...
gpl-3.0
6,447,043,179,708,878,000
81.758755
227
0.550169
false
yoseforb/lollypop
src/sync_mtp.py
1
12625
#!/usr/bin/python # Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # 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 opti...
gpl-3.0
2,710,664,522,675,087,400
38.952532
77
0.493228
false
NLeSC/pointcloud-benchmark
python/pointcloud/postgres/blocks/LoaderOrdered.py
1
2424
#!/usr/bin/env python ################################################################################ # Created by Oscar Martinez # # o.rubi@esciencecenter.nl # #######################################################...
apache-2.0
3,891,968,732,836,190,000
49.5
154
0.616337
false
rajalokan/glance
glance/db/sqlalchemy/alembic_migrations/versions/ocata_expand01_add_visibility.py
1
5764
# 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 # d...
apache-2.0
7,434,511,919,462,939,000
37.172185
78
0.637058
false
ahirner/TabulaRazr-OS
data_query.py
1
6364
from datetime import date import dateutil.parser as date_parser from backend import config from fuzzywuzzy import fuzz from itertools import product # Cascades: # 1) case sensitive partial ratio on character level with penalty # 2) case insensitive partial ratio on character level with penalty # 3) token sorted cas...
agpl-3.0
-6,371,302,341,923,677,000
38.042945
127
0.575896
false
dan-cristian/haiot
presence/__init__.py
1
4256
from main.logger_helper import L from pydispatch import dispatcher from main import thread_pool, sqlitedb if sqlitedb: from storage.sqalc import models from common import Constant from presence import presence_bt from presence import presence_wifi from storage.model import m __author__ = 'Dan Cristian<dan.cristian...
gpl-2.0
-5,611,527,734,522,979,000
41.989899
107
0.626175
false
pombredanne/quirinus
data/codecs/.base/rename.py
1
1084
import os import re import codecs import struct paths = [p for p in os.listdir(".") if not(p.endswith(".ct"))] for src in os.listdir("."): if (src.endswith(".py")): continue dest = src.replace(".cpp", ".ct") with codecs.open(src, "rb") as stream: data = stream.read() pattern = re.compile(b"\\s*(0x[0-9A...
lgpl-3.0
3,352,182,879,483,439,000
24.209302
75
0.558118
false
sephii/django
django/contrib/contenttypes/models.py
1
7903
from __future__ import unicode_literals from django.apps import apps from django.db import models from django.db.utils import OperationalError, ProgrammingError from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import force_text from django.utils.encoding import python_2_unicode_compat...
bsd-3-clause
-7,295,056,630,378,533,000
38.515
105
0.594205
false
OpenCV-Python-Tutorials/Filter
filter.py
1
1678
import cv2 img_name = raw_input("Enter the image filename:") img = cv2.imread(img_name,0) def menu(): print "Select filter type:" print "Press '1' for Low Pass filter." print "Press '2' for High Pass filter." print "Press '3' for Band Pass filter." print "Press '4' for Notch filter." print "Pres...
mit
1,386,468,332,461,299,000
24.815385
59
0.558999
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4.3/Lib/distutils/unixccompiler.py
1
10493
"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library...
mit
-7,394,403,266,320,112,000
42.903766
77
0.597637
false
mldbai/mldb
container_files/init/mldb_logger.py
1
2869
#!/usr/bin/env python # Copyright mldb.ai inc 2016 # Author: Jean Raby <jean@mldb.ai> # TODO: # - configure logging so that access/error logs go somewhere else than stderr import fcntl import functools import grp import jinja2 import os import pwd import pytz import sys import time import tornado.web from tornado....
apache-2.0
2,752,010,964,470,450,000
24.389381
89
0.654932
false
davibe/pygobject
tests/test_repository.py
1
17918
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2013 Simon Feltman <sfeltman@gnome.org> # # test_repository.py: Test for the GIRepository module # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General...
lgpl-2.1
-2,148,817,928,267,952,600
49.331461
105
0.683726
false
Dolyphin/FSI_1D
initialize_data_structure.py
1
1765
# % --------------------------------- # % filename: initialize_data_structure.py # % # % we set the physical data of the structure. # %============================================================ # % physical data of the structure # %=========================================================== import numpy as np ...
gpl-3.0
3,326,060,273,394,111,000
35.553191
81
0.504816
false
simzacks/jjb
jenkins_jobs/parser.py
1
13461
#!/usr/bin/env python # Copyright (C) 2015 OpenStack, 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...
apache-2.0
-351,560,834,032,763,600
39.667674
79
0.508209
false
dhellmann/athensdocket
docket/server/browse.py
1
2993
import calendar import datetime from .app import app, mongo from .filters import date from .nav import set_navbar_active from flask import render_template, g from flask.ext.pymongo import ASCENDING @app.route('/browse') @set_navbar_active def browse(): locations = sorted(mongo.db.cases.distinct('location')) ...
apache-2.0
2,354,671,943,219,793,000
36.4125
70
0.495155
false
sprymix/importkit
importkit/utils/adapter.py
1
4422
## # Copyright (c) 2008-2013 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## class AdapterError(Exception): pass class Adapter(type): adapters = {} instance_adapters = {} def __new__(mcls, name, bases, clsdict, *, adapts=None, adapts_instances_of=None, pure...
mit
-4,098,590,764,919,314,400
28.878378
79
0.558345
false
elki-project/elki
addons/joglvis/src-manual/build.py
1
1307
#!/usr/bin/python from lxml import etree import gzip, re, copy, tempfile, subprocess, os SVG_NAMESPACE="http://www.w3.org/2000/svg" INKSCAPE_NAMESPACE="http://www.inkscape.org/namespaces/inkscape" _safe = re.compile("^[A-Za-z]+$") sizes=[64,32,16,8,4] tree = etree.parse(gzip.open("Markers.svgz")) labels = etree.ETX...
agpl-3.0
-8,183,996,135,032,793,000
29.395349
113
0.644989
false
bonus85/tilt-editor
tilt_hack.py
1
13660
#!/usr/bin/env python """ Analyze and edit .sketch files (internal in .tilt) Also supports generating .sketch files from json @author: Sindre Tosse """ import struct import json import pdb import numpy as np try: from stl import mesh STL_SUPPORTED = True STL_COLOR = (1., 0., 0., 1.) STL_BRUSH_SIZE = 0....
gpl-3.0
1,189,793,421,834,732,800
38.252874
91
0.527965
false
Micronaet/micronaet-order
auto_order_nomail_check/auto.py
1
3871
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
5,362,938,094,823,373,000
35.518868
87
0.54172
false
cgchemlab/chemlab
tools/convert_gromacs2espp.py
1
4036
#!/usr/bin/env python # Copyright (C) 2012,2013,2015(H),2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or mo...
gpl-3.0
4,729,603,492,576,089,000
31.031746
87
0.582755
false
matthewmacleod/gsds
training/lib/train.py
1
7015
import sys, os import time import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable from torch.optim import lr_scheduler import torchvision from torchvision import datasets, models, transforms from pmodels import RtResnet18...
mit
2,261,371,510,341,813,000
44.551948
170
0.596436
false
FAForever/api
api/leaderboards.py
1
8221
from faf.api import LeaderboardSchema from faf.api import LeaderboardStatsSchema from flask import request from pymysql.cursors import DictCursor from api import app from api.error import ApiException, ErrorCode from api.error import Error from api.query_commons import fetch_data from faf import db MAX_PAGE_SIZE = 50...
gpl-3.0
-7,423,851,992,924,885,000
28.256228
129
0.505291
false
chemelnucfin/tensorflow
tensorflow/python/kernel_tests/resource_variable_ops_test.py
1
60449
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-2,747,261,271,606,647,300
41.360897
91
0.642029
false
johncadigan/CategoryGenerator
db_hyponym_trees.py
1
2540
import os CURRENT_DIR = os.path.dirname(__file__) ###Default Settings DATA_DIR = 'data' COUNTS_FILE = 'word-totals.txt' WHITE_LIST = 'whitelist.csv' DEFAULT_LIMIT = 50000 DEFAULT_DEPTH = 5 DEFAULT_SYNSETS = 3 ##### DB Dependent variables MYSQL_URL = 'mysql://user:password@host/database?charset=utf8' from sqlalchemy ...
mit
-2,648,622,299,959,671,000
30.75
127
0.720079
false
CTR-BFX/CambridgeHackathon
rRNA_MT_count.py
1
4956
#!/usr/bin/python # Malwina Prater, mn367@cam.ac.uk, 2017, Copyright # Centre for Trophoblast Research, University of Cambridge # # Script version: v01. # # Script to calculate the percent of transcripts mapping to rRNA # # INPUTS : # 1. HTseq_counts file # 2. Original reference transcriptome alignned to # # USAGE ...
gpl-3.0
-3,703,518,415,631,307,300
32.04
180
0.583535
false
codeofdusk/ProjectMagenta
src/update/update.py
1
5042
from logging import getLogger logger = getLogger('update') import contextlib import io import os import platform import requests import tempfile from wxUI import commonMessageDialogs import widgetUtils import webbrowser try: import czipfile as zipfile except ImportError: import zipfile from platform_utils import pa...
gpl-2.0
3,068,892,833,140,432,000
39.344
211
0.754859
false
txomon/SpockBot
spock/plugins/helpers/physics.py
1
6091
""" PhysicsPlugin is planned to provide vectors and tracking necessary to implement SMP-compliant client-side physics for entities. Primarirly this will be used to keep update client position for gravity/knockback/water-flow etc. But it should also eventually provide functions to track other entities affected by SMP ph...
mit
4,147,684,726,026,790,000
35.915152
79
0.602036
false
why2pac/dp-tornado
example/model/tests/model_test/db_test/mysql.py
1
6056
# -*- coding: utf-8 -*- from dp_tornado.engine.model import Model as dpModel class MysqlModel(dpModel): def index(self): self.model.tests.schema_test.migrate() @property def parent_test_id(self): return 100 def test(self): datetime_of_birth = self.helper.datetime.now() ...
mit
3,780,059,883,511,069,700
32.458564
118
0.498184
false
jhpyle/docassemble
docassemble_base/docassemble/base/mako/doc/build/conf.py
1
9486
# -*- coding: utf-8 -*- # # Mako documentation build configuration file # # 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 configuration values have a default; values that are commented ...
mit
-6,735,364,583,275,619,000
31.047297
80
0.700822
false
Skeletrox/usb-backend-pinut
file_upload/fileupload/USBFinder.py
1
5689
import os, inspect, json, re #needed for os files from django.conf import settings from glob import glob #Needed for directories import subprocess ...
apache-2.0
-8,428,731,860,846,621,000
49.794643
198
0.465108
false
pyfa-org/eos
eos/eve_obj/buff_template.py
1
1741
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
lgpl-3.0
-2,537,342,386,661,229,600
32.480769
80
0.593912
false
SteveNguyen/poppy-software
poppytools/primitive/dance.py
1
2812
import numpy import pypot.primitive def sinus(ampl,t,freq=0.5, phase=0, offset=0): pi = numpy.pi return ampl * numpy.sin(freq * 2.0 * pi * t + phase * pi / 180.0 ) + offset class SimpleBodyBeats(pypot.primitive.LoopPrimitive): ''' Simple primitive to make Poppy shake its booty following a given beat...
gpl-3.0
6,003,110,220,526,650,000
27.989691
114
0.607041
false
fracpete/wekamooc
moredataminingwithweka/class-2.1.py
1
2401
# 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 program is distributed in the hope that it will be useful, # bu...
gpl-3.0
7,711,363,147,533,410,000
36.515625
119
0.669304
false
ntduong/ML
DecisionTree/treepredict.py
1
6510
''' Created on Feb 21, 2013 @author: Administrator ''' from collections import defaultdict from math import log def readDataFromFile(filename='decision_tree_example.txt'): with open(filename, 'rt') as f: data = [] for line in f: data.append(line.strip().split('\t')) return ...
mit
9,111,104,916,089,302,000
29.85782
111
0.541782
false
futuresimple/triggear
tests/config/test_triggear_config.py
1
3457
import os from typing import Dict import pytest import yaml from mockito import when, expect from app.config.triggear_config import TriggearConfig from app.clients.jenkins_client import JenkinsInstanceConfig pytestmark = pytest.mark.asyncio @pytest.mark.usefixtures('unstub') class TestTriggearConfig: VALID_CRE...
mit
4,146,779,010,753,406,000
43.320513
130
0.666763
false
eknowles/CV
app.py
1
2096
import os from flask import Flask, render_template, send_from_directory from calendar_parser import CalendarParser # initialization app = Flask(__name__) app.config.update( DEBUG=True, ) events = {} # settings ics_url = "https://www.google.com/calendar/ical/88kil28s7t686h1p5aoem6ui24%40group.calendar.google.com/pub...
gpl-2.0
-1,447,502,892,584,952,000
22.043956
120
0.68416
false
hzlf/openbroadcast
website/djangorestframework/tests/views.py
1
1564
from django.conf.urls.defaults import patterns, url from django.test import TestCase from django.test import Client urlpatterns = patterns('djangorestframework.utils.staticviews', url(r'^robots.txt$', 'deny_robots'), url(r'^favicon.ico$', 'favicon'), url(r'^accounts/login$', 'api_login'), url(r'^accou...
gpl-3.0
8,763,692,571,406,726,000
35.372093
78
0.658568
false
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert_gui/viewer/slice_viewer.py
1
8469
import os from OpenGL.GL import * from PyQt4.QtCore import Qt from PyQt4.QtGui import QApplication, QMainWindow, QDockWidget import sys import traceback from ert.ecl import EclTypeEnum, EclKW, EclGrid from ert.ecl.faults import FaultCollection from ert.geo.xyz_io import XYZIo from ert_gui.viewer import Texture3D, Bou...
gpl-3.0
4,388,381,655,475,250,700
33.149194
154
0.627465
false
blade2005/dosage
scripts/mklanguages.py
1
1450
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2016 Tobias Gruetzmacher '''update languages.py from pycountry''' from __future__ import absolute_import, division, print_function import os import...
mit
-1,067,473,444,864,903,400
28.591837
86
0.631034
false
Petraea/jsonbot
jsb/plugs/core/core.py
1
17821
# jsb/plugs/core/core.py # # """ core bot commands. """ ## jsb imports from jsb.lib.aliases import setalias from jsb.lib.config import getmainconfig from jsb.utils.statdict import StatDict from jsb.utils.log import setloglevel, getloglevel from jsb.utils.timeutils import elapsedstring from jsb.utils.exception import...
mit
1,083,935,464,955,793,700
35.148073
252
0.63818
false
imeteora/cocos2d-x-3.x-Qt
tools/jenkins-scripts/watchdog.py
1
1716
import jenkinsapi from jenkinsapi.jenkins import Jenkins import sys import time import os #check & kill dead buid def build_time(_job,_threshold): #get jenkins-job-watchdog-threshold #Get last build running build = _job.get_last_build() running = build.is_running() print 'build_job:',_job,'running:...
gpl-2.0
4,595,123,461,525,334,500
26.677419
73
0.598485
false
gviejo/ThalamusPhysio
python/main_pop_corr_nucleus.py
1
7266
import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io from functions import * import _pickle as cPickle import time import os, sys import ipyparallel import neuroseries as nts import scipy.stats from pylab import * from multiprocessing import Pool data_directory = '/mn...
gpl-3.0
3,322,972,831,613,027,300
39.366667
126
0.579136
false
timlau/FedoraReview
src/FedoraReview/helpers_mixin.py
1
5574
# -*- coding: utf-8 -*- # 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 distributed ...
gpl-2.0
-8,841,794,272,914,089,000
34.503185
76
0.577861
false
cuauv/software
visualizer/configure.py
1
1691
#!/usr/bin/env python3 from build import ninja_common build = ninja_common.Build("visualizer") # Only build if all dependencies are present. # TODO Create a better means of dependency checking. import os sources = ['gl_utils.cpp', 'graphics_engine.cpp', 'material.cpp', 'obj_build...
bsd-3-clause
-7,491,380,834,800,671,000
33.510204
83
0.603193
false
Clarity-89/clarityv2
src/clarityv2/portfolio/migrations/0001_initial.py
1
1263
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-02-27 19:20 from __future__ import unicode_literals import autoslug.fields from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
mit
-5,629,408,718,103,012,000
36.147059
128
0.578781
false
cwisecarver/osf.io
addons/osfstorage/tests/test_views.py
1
34687
# encoding: utf-8 from __future__ import unicode_literals import mock import datetime import pytest from nose.tools import * # noqa from dateutil.parser import parse as parse_datetime from addons.osfstorage.models import OsfStorageFileNode from framework.auth.core import Auth from addons.osfstorage.tests.utils impo...
apache-2.0
-2,196,461,070,738,581,800
35.055208
118
0.581053
false
reedessick/pedagogy
coherentLikelihood/coherentLikelihood.py
1
23070
#!/usr/bin/python usage = "coherentLikelihood.py [--options]" description = "builds figures to demonstrate a heuristic burst search" author = "Reed Essick (reed.essick@ligo.org)" #------------------------------------------------- import waveforms import numpy as np import subprocess as sp import matplotlib matplot...
mit
-2,642,448,682,214,172,000
35.103286
299
0.650975
false
Gorbagzog/StageIAP
HorizonPhotometricNumpy.py
1
82759
#!/usr/bin/env python3 # -*-coding:Utf-8 -* """H-AGN LightCone photometric Catalog. Load catalog and make a match with the true lightcone catalog. """ import numpy as np import matplotlib.pyplot as plt import pyfits # from scipy.spatial import cKDTree # from timeit import default_timer as timer import numpy.lib.rec...
gpl-3.0
-2,726,468,782,197,244,400
39.112942
99
0.574976
false
gdietz/OpenMEE
imputation/ui_mice_parameters_page.py
1
5170
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mice_parameters_page.ui' # # Created: Fri Mar 7 09:30:08 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 ...
gpl-3.0
7,559,098,870,301,518,000
51.755102
103
0.706576
false
RenolY2/battalion-tools
bw_archive/bw_archive_base.py
1
3311
import io import struct from array import array from rxet.helper import read_uint32 class BWResource(object): def __init__(self, name, size, memview): self.name = name self._size = size self._data = memview self._fileobj = io.BytesIO(self._data) @property def fileobj(self...
mit
4,123,272,925,999,109,000
26.363636
97
0.595892
false