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
ejspina/Gene_expression_tools
Python/fasta_transcript2gene.py
1
1865
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Eli # # Created: 18/12/2013 # Copyright: (c) Eli 2013 # Licence: <your licence> #------------------------------------------------------------------------------- def m...
gpl-2.0
1,572,774,385,450,864,000
30.155172
235
0.510456
false
rajashreer7/autotest-client-tests
linux-tools/libusb/libusb.py
3
1655
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error, software_manager sm = software_manager.SoftwareManager() class libusb(test.test): """ Autotest module for testing basic functionality of libusb @author Xu Zheng ,zhengxu@cn.i...
gpl-2.0
1,791,443,352,213,579,300
28.035088
85
0.558308
false
OpenDaisy/daisy-api
daisy/api/v1/config_sets.py
1
17500
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-2,054,898,294,051,990,000
39.322581
107
0.571771
false
fmonjalet/miasm
miasm2/ir/ir.py
1
11474
#!/usr/bin/env python #-*- coding:utf-8 -*- # # Copyright (C) 2013 Fabrice Desclaux # # 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 ...
gpl-2.0
2,692,302,315,748,242,000
32.846608
81
0.531811
false
OliverWalter/amdtk
amdtk/models/normal_gamma.py
1
2962
""" Normal-Gamma density.""" import numpy as np from scipy.special import gammaln, psi class NormalGamma(object): """Normal-Gamma density. Attributes ---------- mu : numpy.ndarray Mean of the Gaussian density. kappa : float Factor of the precision matrix. alpha : float ...
bsd-2-clause
3,954,424,811,886,270,000
26.425926
83
0.540176
false
priyaganti/rockstor-core
src/rockstor/storageadmin/urls/commands.py
1
1347
""" Copyright (c) 2012-2017 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
gpl-3.0
-4,425,011,777,252,937,000
39.818182
103
0.717892
false
jpwilliams/appenlight-client-python
appenlight_client/timing/__init__.py
1
7630
from __future__ import absolute_import import logging import time import threading from appenlight_client.utils import import_from_module from datetime import datetime, timedelta from functools import wraps from operator import itemgetter default_timer = time.time class AppenlightLocalStorage(object): def __in...
bsd-3-clause
8,553,453,150,697,994,000
33.524887
82
0.554391
false
marchon/flask-virtualenv
setup.py
1
1029
#!/usr/bin/env python """ https://github.com/imlucas/flask-virtualenv """ from setuptools import setup setup( name='Flask-Virtualenv', version='0.2.0', url='http://imlucas.com', license='BSD', author='Lucas Hrabovsky', author_email='hrabovsky.lucas@gmail.com', description='Manage a virtual...
bsd-3-clause
-7,406,923,368,084,122,000
27.583333
70
0.608358
false
artursmet/climbing-contest
contest/views.py
1
2281
#coding: utf-8 from __future__ import unicode_literals import csv from django.template.response import TemplateResponse from django.shortcuts import redirect, get_object_or_404 from django.contrib import messages from django.http import HttpResponse from django.contrib.auth.decorators import user_passes_test from con...
apache-2.0
-1,803,734,999,262,948,000
31.942029
76
0.636164
false
tedmeeds/tcga_encoder
tcga_encoder/utils/helpers.py
1
3776
import tensorflow import tcga_encoder import sys, os, yaml import numpy as np import scipy as sp import pylab as pp import pandas as pd from sklearn.metrics import roc_auc_score, roc_curve from sklearn.model_selection import KFold from collections import * import itertools import pdb def xval_folds( n, K, randomize = F...
mit
4,324,703,122,337,669,600
26.172662
81
0.619174
false
sonoble/fboss
fboss/agent/tools/fboss_route.py
1
6527
#!/usr/bin/env python # Copyright (C) 2004-present Facebook. All Rights Reserved from __future__ import division from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import """Add, change, or delete a route on FBOSS controller """ import contextlib import ipad...
bsd-3-clause
-2,916,868,972,458,586,000
33.718085
77
0.655278
false
custom22/google-python-exercises
basic/string1.py
1
3771
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already se...
apache-2.0
-5,765,066,975,706,078,000
28.692913
78
0.654733
false
drpaneas/linuxed.gr
plugins/simple_footnotes.py
1
4382
from pelican import signals import re import html5lib RAW_FOOTNOTE_CONTAINERS = ["code"] def getText(node, recursive = False): """Get all the text associated with this node. With recursive == True, all text from child nodes is retrieved.""" L = [''] for n in node.childNodes: if n.nodeType i...
mit
-472,941,587,506,048,000
47.164835
126
0.527385
false
piratos/ctfbulletin
ctfbulletin/settings.py
1
2533
""" Django settings for ctfbulletin project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ......
mit
1,901,026,166,474,514,200
23.365385
74
0.684564
false
Mageswaran1989/aja
src/test/python/examples/naive_bayes/naive_bayes.py
1
4954
from numpy import * def loadDataSet(): postingList=[['my', 'dog', 'has', 'flea', 'problems', 'help', 'please'], ['maybe', 'not', 'take', 'him', 'to', 'dog', 'park', 'stupid'], ['my', 'dalmation', 'is', 'so', 'cute', 'I', 'love', 'him'], ['stop', 'posting', 'stupid...
apache-2.0
3,253,726,386,395,607,000
38.007874
83
0.637061
false
jonzobrist/Percona-Server-5.1
kewpie/drizzle_tests/randgen_slavePlugin/multiThread3_test.py
1
2002
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
bsd-3-clause
5,068,747,423,588,182,000
34.122807
179
0.718282
false
aerospike/aerospike-client-python
test/new_tests/test_data.py
1
4069
import pytest try: import cPickle as pickle except: import pickle class SomeClass(object): pass pos_data = [ (('test', 'demo', 1), {'age': 1, 'name': 'name1'}), (('test', 'demo', 2), {'age': 2, 'name': 'Mr John', 'bmi': 3.55}), (('test', 'demo', 'boolean_key'), {'is_pr...
apache-2.0
4,281,508,143,284,940,000
43.228261
112
0.390759
false
davcastroruiz/boston-django-project
webSite/repo/migrations/0002_auto_20170224_1612.py
1
1210
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-24 22:12 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('repo', '0001_initial'), ] operations = [ m...
gpl-3.0
-8,792,082,569,611,806,000
27.809524
114
0.538017
false
nerdvegas/rez
src/rez/tests/test_package_cache.py
1
5704
""" Test package caching. """ from rez.tests.util import TestBase, TempdirMixin, restore_os_environ, \ install_dependent from rez.packages import get_package from rez.package_cache import PackageCache from rez.resolved_context import ResolvedContext from rez.exceptions import PackageCacheError from rez.utils.filesy...
lgpl-3.0
8,163,004,261,610,059,000
32.552941
87
0.617637
false
justinbois/fish-activity
tests/test_parse.py
1
8083
import pytest import numpy as np import pandas as pd from pandas.util.testing import assert_frame_equal import fishact def test_sniffer(): n_header, delimiter, line = fishact.parse._sniff_file_info( 'tests/single_gtype.txt') assert n_header == 2 assert deli...
mit
-4,720,349,903,391,392,000
45.454023
382
0.477917
false
slivkamiro/sample_kafka_producer
src/sample_source_props.py
1
7278
from random import randint def random_movie(): return movies_list[randint(0, movies_list_length - 1)] def random_series(): return seasons_list[randint(0, seasons_list_length - 1)] def random_user(): user_data = user_list[randint(0, user_list_length - 1)] return {'email': user_data[0], 'name': user_da...
apache-2.0
8,245,845,420,224,092,000
31.783784
111
0.590409
false
adfernandes/mbed
tools/psa/tfm/bin_utils/imgtool/keys/rsa_test.py
5
4542
# Original code taken from mcuboot project at: # https://github.com/mcu-tools/mcuboot # Git SHA of the original version: a8e12dae381080e898cea0c6f7408009b0163f9f # # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance w...
apache-2.0
7,534,515,029,772,833,000
33.409091
78
0.599295
false
freelancer/freelancer-sdk-python
examples/create_employer_review.py
1
1087
from freelancersdk.session import Session from freelancersdk.resources.projects.projects import post_review from freelancersdk.resources.projects.helpers import \ create_review_employer_object from freelancersdk.resources.projects.exceptions import \ ReviewNotPostedException import os def sample_post_review()...
lgpl-3.0
-388,278,904,186,106,100
26.871795
65
0.664213
false
MCopperhead/city-building
object_layer.py
1
2012
import cocos as c from cell import Cell from shared_data import MAP_SIZE from objects import TestCube, Wall class DynamicBatch(c.batch.BatchNode): """ Batch modification, that allows to change Z level of child object dynamically. """ def change_z(self, child, z): child.set_batch(None) ...
gpl-2.0
-6,374,275,823,120,481,000
30.936508
82
0.553678
false
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awx/main/tests/unit/commands/test_replay_job_events.py
1
2696
# Copyright (c) 2017 Ansible by Red Hat # All Rights Reserved # Python import pytest from unittest import mock from datetime import timedelta # Django from django.utils import timezone # AWX from awx.main.models import ( Job, JobEvent, ) from awx.main.management.commands.replay_job_events import ( Replay...
apache-2.0
-2,448,998,290,709,884,000
28.304348
106
0.599777
false
codeinvain/object_detection
app/tracks.py
1
1501
import logging import os import json import sys from object_detector import ObjectDetector from jsonmerge import merge import atexit config = {} logger = None def bootstrap(options): if not os.path.exists('log'): os.makedirs('log') if not os.path.exists('tmp'): os.makedirs('tmp') creat...
mit
-9,208,650,910,631,746,000
21.742424
136
0.652232
false
satanas/libturpial
libturpial/api/models/column.py
1
1346
# -*- coding: utf-8 -*- class Column(object): """ This model represents a column that holds :class:`libturpial.api.models.status.Status` objects. You need to specify to what *account_id* are they associated, as well as the column *slug*. Available column slugs are available in :class:`libturpi...
gpl-3.0
-3,300,106,422,524,235,300
35.378378
77
0.618128
false
crate/crate-python
src/crate/client/sqlalchemy/tests/dict_test.py
1
16645
# -*- coding: utf-8; -*- # # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License"...
apache-2.0
1,422,843,196,939,603,700
35.502193
77
0.584019
false
mmcauliffe/linguistic-helper-functions
linghelper/representations/classes.py
1
4708
import re import copy from linghelper.representations.constants import ENGLISH_ONSETS as ONSETS,ENGLISH_VOWEL_PATTERN as VOWEL_PATTERN class Word(object): def __init__(self,orthography,transcription,frequency=0): self.orthography = orthography self.syllables = syllabify(transcription) sel...
gpl-3.0
-2,131,419,134,616,865,000
27.533333
113
0.540782
false
jknebel/STEN
PostStat.py
1
23533
import numpy as np import tables import wx import os import itertools # ClassMultiple testing correction using mathematical morphology ##Tables definition ## ##tables: ##/Shape # Keep the shape of the Data, to reshape after calculation # simple array ##/Data/All #using createEArray('/','AllData',tables.Float6...
bsd-3-clause
-558,887,679,184,231,500
44.785288
156
0.490248
false
liamcurry/py3kwarn
py3kwarn2to3/fixes/fix_types.py
1
1707
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for removing uses of the types module. These work for only the known names in the types module. The forms above can include types. or not. ie, It is assumed the module is imported either as: import type...
mit
-5,724,285,161,513,692,000
25.671875
80
0.598711
false
embray/PyFITS
lib/pyfits/scripts/fitscheck.py
1
6708
""" ``fitscheck`` is a command line script based on pyfits for verifying and updating the CHECKSUM and DATASUM keywords of .fits files. ``fitscheck`` can also detect and often fix other FITS standards violations. ``fitscheck`` facilitates re-writing the non-standard checksums originally generated by pyfits with stand...
bsd-3-clause
-3,699,447,288,446,370,300
29.352941
79
0.642964
false
lavalamp-/ws-backend-community
wselasticsearch/query/dns/enumeration.py
1
1098
# -*- coding: utf-8 -*- from __future__ import absolute_import from .base import BaseDomainNameScanQuery class SubdomainEnumerationQuery(BaseDomainNameScanQuery): """ This is an Elasticsearch query class for querying SubdomainEnumerationModel objects. """ @classmethod def get_queried_class(cls):...
gpl-3.0
3,819,539,228,431,977,500
32.272727
90
0.673042
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/Phylo/PAML/_parse_codeml.py
1
21515
# Copyright (C) 2011 by Brandon Invergo (b.invergo@gmail.com) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. import re line_floats_re = re.compile("-*\d+\.\d+") try: float("nan") _nan_float...
apache-2.0
-3,771,134,222,919,070,000
43.452479
112
0.557193
false
ly0/xxadmin
setup.py
1
1788
#!/usr/bin/env python from setuptools import setup # version_tuple = __import__('xadmin.version').VERSION # version = ".".join([str(v) for v in version_tuple]) setup( name='django-xadmin', version='0.5.1', description='Drop-in replacement of Django admin comes with lots of goodies, fully extensible with p...
bsd-3-clause
-3,786,214,088,761,634,300
37.042553
158
0.612416
false
johncheetham/jcchess
jcchess/move_list.py
1
9162
# # move_list.py - Display Move List Window # # This file is part of jcchess # # jcchess 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 l...
gpl-3.0
-270,891,830,651,016,260
36.54918
115
0.56778
false
biothings/biothings.api
biothings/hub/databuild/differ.py
1
59337
import os import shutil import time import json from datetime import datetime import asyncio from functools import partial import glob import random from biothings.utils.common import timesofar, get_timestamp, \ dump, rmdashfr, loadobj, md5sum from biothings.utils.mongo import id_feeder, get_target_db, get_previou...
apache-2.0
6,661,727,702,881,648,000
41.842599
143
0.488026
false
vericred/vericred-python
test/test_carrier.py
1
9963
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
apache-2.0
-8,013,491,673,182,950,000
39.012048
228
0.653317
false
vltr/star-wars-saga
ep5/cloud_city/darth_vader_vs_luke_skywalker.py
1
3146
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys import logging import language_typology as lang_typ import star_wars as sw class LogFactory(object): """ Helper class to provide standard logging """ logger = None @classmethod def get_logger(cls): """ ...
unlicense
-4,721,615,349,197,400,000
30.777778
72
0.572473
false
tdubourg/velov-unchained
web.py/update_warnings.py
1
1984
# -*- coding: utf-8 -*- import psycopg2 #Connection to database conn = psycopg2.connect("dbname=velovunchained user=velovunchained password=velovunchained") #Cursor used to navigate through the database cur = conn.cursor() #Reads the id of the last reservation action tested for the warning rules application last_act...
gpl-3.0
4,164,946,664,598,484,500
36.396226
121
0.697123
false
ufieeehw/IEEE2015
ros/ieee2015_simulator/scripts/end_effector_sim.py
1
7301
#!/usr/bin/python ## Math import numpy as np ## Display import pygame import time import math ## Ros import rospy from tf import transformations as tf_trans ## Ros Msgs from std_msgs.msg import Header, Float64, Int64 from ieee2015_end_effector_servos.msg import Num from geometry_msgs.msg import Point, PointStamped, Pos...
gpl-2.0
2,497,793,503,725,792,000
30.61039
111
0.553486
false
pseudocubic/neutronpy
neutronpy/crystal/structure_factors.py
1
4806
# -*- coding: utf-8 -*- r"""Structure Factors NuclearStructureFactor MagneticStructureFactor MagneticFormFactor """ import numpy as np from ..constants import magnetic_ion_j class NuclearStructureFactor(object): r"""Class containing nuclear structure factor calculator Methods ------- calc_nuc_str_...
mit
3,583,450,151,458,712,000
27.270588
156
0.512901
false
oomwoo/ubuntu
test/my_cifar_train.py
1
3782
#!/usr/bin/env python # Trains a CIFAR10 model based on Nervana Neon sample code # Then, tries to recognize an image, sanity-checks recognition # # (c) oomwoo.com 2016 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3.0 # as ...
gpl-3.0
5,062,212,840,748,560,000
34.679245
122
0.722105
false
okami-1/python-dnssec
dnssec/rollerd/conf.py
1
1175
# Copyright (C) 2015 Okami, okami@fuzetsu.info # 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 distr...
gpl-3.0
-1,912,782,318,009,102,600
42.518519
80
0.674894
false
levilucio/SyVOLT
ECore_Copier_MM/transformation-Large/HepackagelefteAnnotationsSolveRefEPackageEAnnotationEPackageEAnnotation.py
1
5043
from core.himesis import Himesis class HepackagelefteAnnotationsSolveRefEPackageEAnnotationEPackageEAnnotation(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HepackagelefteAnnotationsSolveRefEPackageEAnnotationEPackageEAnnotation. """ # Fl...
mit
-5,931,338,714,505,986,000
47.961165
298
0.519532
false
anntzer/seaborn
seaborn/_core.py
1
44884
import warnings import itertools from copy import copy from functools import partial from collections.abc import Iterable, Sequence, Mapping from numbers import Number from datetime import datetime import numpy as np import pandas as pd import matplotlib as mpl from ._decorators import ( share_init_params_with_ma...
bsd-3-clause
-8,576,295,906,422,801,000
33.552733
84
0.563586
false
jeffwdoak/free_energies
free_energies/electronicdos.py
1
14960
#!/usr/bin/python # electronicdos.py v0.5 5-16-2012 Jeff Doak jeff.w.doak@gmail.com import numpy as np from scipy.interpolate import UnivariateSpline from scipy.integrate import quad from scipy.optimize import fsolve import sys, subprocess BOLTZCONST = 8.617e-5 #eV/K class ElectronicDOS: """ Class to calcula...
mit
-575,477,087,709,007,550
37.656331
88
0.566644
false
strogo/turbion
turbion/bits/utils/cache/utils.py
1
2422
from django.utils.functional import curry from django.core.cache import cache from django.utils.encoding import smart_str from django.utils.itercompat import is_iterable def to_list(arg): """Converts `arg` to list""" if is_iterable(arg) and not isinstance(arg, dict): return list(arg) else: ...
bsd-3-clause
-4,414,260,199,410,681,000
31.293333
84
0.490917
false
galeone/dynamic-training-bench
dytb/inputs/predefined/PASCALVOC2012Classification.py
1
10931
#Copyright (C) 2017 Paolo Galeone <nessuno@nerdz.eu> # #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/. #Exhibit B is not attached; this software is compatible with the #lic...
mpl-2.0
2,044,158,810,422,092,500
40.249057
117
0.519349
false
Ecogenomics/CheckM
checkm/util/img.py
1
23429
############################################################################### # # # 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 ...
gpl-3.0
3,703,315,242,581,544,000
37.777589
154
0.558539
false
dhrone/pydKeg
displays/winstar_weg.py
1
9885
#!/usr/bin/python # coding: UTF-8 # Driver for Winstar WEH001602A 16x2 OLED display on the RPi # Written by: Ron Ritchey # Derived from Lardconcepts # https://gist.github.com/lardconcepts/4947360 # Which was also drived from Adafruit # http://forums.adafruit.com/viewtopic.php?f=8&t=29207&start=15#p163445 # # Ultimatel...
mit
3,913,770,316,773,542,000
24.675325
126
0.666566
false
redhat-openstack/heat
heat/db/sqlalchemy/migrate_repo/versions/021_resource_data.py
1
1757
# # 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,780,820,065,338,006,000
35.604167
78
0.635743
false
zyzyis/monetdb
clients/python3/monetdb/sql/monetize.py
1
1844
# 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/. # # Copyright 2008-2015 MonetDB B.V. """ functions for converting python objects to monetdb SQL format. If you want to ...
mpl-2.0
-8,862,742,702,309,967,000
22.05
74
0.621475
false
t-wissmann/qutebrowser
qutebrowser/browser/webengine/certificateerror.py
2
1605
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
-561,993,302,736,005,100
32.4375
74
0.699688
false
airtonix/cmsplugin-embedded-pages
cmsplugin_embeddedpages/models.py
1
3826
import os from django.db import models from cms.models.pluginmodel import CMSPlugin from .lib.choices import ( DynamicTemplateChoices, PlaceholdersDynamicChoices, # PageIDsDynamicChoices, # PageAttributeDynamicChoices, ) TEMPLATE_PATH = os.path.join("cmsplugin_embeddedpages","layouts") GROUP_TEMPLATE_PATH = ...
bsd-2-clause
7,365,644,589,555,425,000
35.438095
78
0.607946
false
dvorberg/movierip
movierip/__init__.py
1
5281
#!/usr/bin/env python # -*- coding: utf-8; mode: python; -*- ## Copyright 2010–17 by Diedrich Vorberg <diedrich@tux4web.de> ## ## All Rights Reserved ## ## For more Information on orm see the README file. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU G...
gpl-3.0
2,584,131,944,249,580,500
28.446927
77
0.564599
false
Azure/azure-storage-python
azure-storage-file/azure/storage/file/_download_chunking.py
1
6685
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import thr...
mit
1,599,597,774,716,400,000
41.044025
119
0.597457
false
carljm/django-model-utils
docs/conf.py
1
8114
# # django-model-utils documentation build configuration file, created by # sphinx-quickstart on Wed Jul 31 22:27:07 2013. # # 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 configuratio...
bsd-3-clause
6,096,815,436,245,315,000
31.586345
80
0.707419
false
lino-framework/lino
lino/core/actions.py
1
42601
# -*- coding: UTF-8 -*- # Copyright 2009-2021 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """This defines the :class:`Action` class and the :func:`action` decorator, and some of the standard actions. See :ref:`dev.actions`. """ import logging; logger = logging.getLo...
bsd-2-clause
-562,974,953,244,720,830
31.863426
117
0.600808
false
MikeLx/open-source-search-engine
script/inject/inject.py
1
1956
#!/usr/bin/python # -*- coding: utf-8 -*- import requests import json import re import subprocess import multiprocessing #Generate environment with: #pex -r requests -r multiprocessing -e inject:main -o warc-inject -s '.' --no-wheel #pex -r requests -r multiprocessing -o warc-inject def injectItem(item): metad...
apache-2.0
7,445,202,696,927,137,000
30.548387
177
0.642127
false
kdheepak89/pelican-alias
pelican_alias.py
1
1886
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os.path import logging from pelican import signals logger = logging.getLogger(__name__) class AliasGenerator(object): TEMPLATE = """<!DOCTYPE html><html><head><meta charset="utf-8" /> <meta http-equiv="refresh" content="0;url=/{destination_...
mit
8,837,711,083,222,607,000
28.46875
75
0.582715
false
mozilla/pulseguardian
pulseguardian/management.py
1
3411
# 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/. """Wrapper functions around the RabbitMQ management plugin's REST API.""" import json from urllib.parse import quote i...
mpl-2.0
2,166,029,995,657,118,200
26.731707
75
0.617121
false
greyshell/greyEnum
core_concepts/demo_unittest/test_blance_bracket.py
1
1123
#!/usr/bin/env python3 # author: greyshell # how to run: python -m unittest test_blance_bracket.TestSolution import unittest from blance_bracket import solution class TestSolution(unittest.TestCase): def test_solution_case_1(self): self.assertEqual(solution(['(', '(']), False) def test_solution_cas...
mit
7,019,673,380,520,369,000
27.075
72
0.577026
false
cmorgan/toyplot
docs/conf.py
1
12462
# Copyright 2014, Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain # rights in this software. # -*- coding: utf-8 -*- # # toyplot documentation build configuration file, created by # sphinx-quickstart on Fri Apr 18 18:22:53 2014. # # This ...
bsd-3-clause
-7,070,915,137,279,565,000
30.233083
186
0.695153
false
DouglasLeeTucker/DECam_PGCM
bin/rawdata_se_objects_split.py
1
5996
#!/usr/bin/env python """ rawdata_se_objects_split.py Example: rawdata_se_objects_split.py --help rawdata_se_objects_split.py --inputFileListFile inputfilelist.csv --outputFileListFile outputfilelist.csv --verbose 2 """ ###...
gpl-3.0
670,206,658,665,338,400
32.497207
151
0.564376
false
mablae/weblate
weblate/accounts/views.py
1
14376
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.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, eithe...
gpl-3.0
3,484,964,092,832,657,000
25.715613
79
0.593683
false
krnflake/python-hubicclient
hubicclient/__init__.py
1
1073
# -*- coding: utf-8 -*- # Copyright (c) 2012 Rackspace # flake8: noqa # 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
-9,025,697,195,523,056,000
32.53125
69
0.744641
false
arpitmathur/Airline
src/Test_graph.py
1
3161
__author__ = 'Arpit' import unittest import json from Airline.src.Graph import Graph from Airline.src.UIConsole import UIConsole class Test_graph(unittest.TestCase): #This function is run before every test case is executed #def setUp(self): #The parser function def parse_file(self, json_file): ...
mit
-7,213,381,536,477,382,000
36.642857
358
0.627649
false
xinghai-sun/models
deep_speech_2/data_utils/speech.py
1
5631
"""Contains the speech segment class.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from data_utils.audio import AudioSegment class SpeechSegment(AudioSegment): """Speech segment abstraction, a subclass of AudioSegment, with an additional tran...
apache-2.0
-7,060,951,834,344,462,000
38.377622
78
0.626887
false
showerst/openstates
openstates/vt/__init__.py
1
2574
from billy.utils.fulltext import pdfdata_to_text, text_after_line_numbers from .bills import VTBillScraper from .legislators import VTLegislatorScraper from .committees import VTCommitteeScraper from .events import VTEventScraper metadata = dict( name='Vermont', abbreviation='vt', capitol_timezone='America...
gpl-3.0
2,855,948,928,439,591,400
39.857143
79
0.480575
false
BrianHicks/perch
docs/conf.py
1
8318
#!/usr/bin/env python # -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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 # au...
bsd-3-clause
7,839,504,932,566,316,000
30.996154
80
0.706179
false
yfpeng/dcache
setup.py
1
1810
# Always prefer setuptools over distutils # To use a consistent encoding from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f:...
bsd-3-clause
1,978,977,201,031,246,300
29.166667
98
0.655249
false
tsl143/addons-server
src/olympia/landfill/tests/test_categories.py
1
1384
# -*- coding: utf-8 -*- from olympia.amo.tests import TestCase from olympia.addons.models import Category from olympia.constants.applications import APPS from olympia.constants.base import ADDON_EXTENSION, ADDON_PERSONA from olympia.constants.categories import CATEGORIES from olympia.landfill.categories import generate...
bsd-3-clause
-1,616,217,810,804,299,800
39.705882
78
0.684249
false
zqqf16/clipboard
clipboard/handler.py
1
1304
#!/usr/bin/env python # -*- coding: utf-8 -*- import tornado.web from model import Entry from datetime import datetime import json class IndexHandler(tornado.web.RequestHandler): def get(self): entries = [e for e in Entry.select().order_by(Entry.date.desc())] self.render('clipboard.html', entries=...
mit
-7,280,940,398,504,245,000
27.347826
83
0.60046
false
yeeking/snakestep
scripts/clock.py
1
2213
import time import thread import threading # really basic implementation of a busy waiting clock class Clock(): def __init__(self): self.bpm(120) # listeners stores things that listen for clock ticks self._listeners = [] # when did we last tick? self._last_tick = time.time()...
mit
5,506,961,174,629,579,000
28.905405
68
0.525983
false
wavewave/madgraph-auto-model
modelrepo/heftNLO/write_param_card.py
1
6811
__date__ = "02 Aug 2012" __author__ = 'olivier.mattelaer@uclouvain.be' from function_library import * class ParamCardWriter(object): header = \ """######################################################################\n""" + \ """## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################...
bsd-2-clause
6,206,704,422,216,953,000
36.629834
93
0.466745
false
graik/biskit
biskit/__init__.py
1
2482
## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2007 Raik Gruenberg & Johan Leckner ## ## 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 v...
gpl-3.0
-3,805,283,938,140,448,000
31.657895
72
0.735294
false
smallyear/linuxLearn
salt/salt/modules/chronos.py
1
2964
# -*- coding: utf-8 -*- ''' Module providing a simple management interface to a chronos cluster. Currently this only works when run through a proxy minion. .. versionadded:: 2015.8.2 ''' from __future__ import absolute_import import json import logging import salt.utils import salt.utils.http __proxyenabled__ = ['...
apache-2.0
-3,986,236,424,849,965,000
21.454545
72
0.575236
false
CottageLabs/OpenArticleGauge
openarticlegauge/models.py
1
30181
""" Data model objects, some of which extend the DAO for storage purposes """ import json, redis, logging from datetime import datetime from openarticlegauge import config from openarticlegauge.dao import DomainObject from openarticlegauge.slavedriver import celery from werkzeug import generate_password_hash, check...
bsd-3-clause
-2,530,888,789,660,063,000
33.650976
153
0.565753
false
lavish205/olympia
src/olympia/amo/celery.py
1
6347
"""Loads and instantiates Celery, registers our tasks, and performs any other necessary Celery-related setup. Also provides Celery-related utility methods, in particular exposing a shortcut to the @task decorator.""" from __future__ import absolute_import import datetime from django.conf import settings from django.c...
bsd-3-clause
-9,087,680,736,191,423,000
33.308108
79
0.648968
false
multiplechoice/workplace
jobs/spiders/tvinna.py
1
1467
import dateutil.parser import scrapy import scrapy.spiders from jobs.common import clean_html from jobs.items import JobsItem class TvinnaSpider(scrapy.spiders.XMLFeedSpider): name = "tvinna" start_urls = ["http://www.tvinna.is/feed/?post_type=job_listing"] itertag = "item" namespaces = [ ("a...
apache-2.0
836,780,782,285,987,300
35.675
74
0.608044
false
g3rd/django-akamai-storage
akamai_storage/forms/models.py
1
1830
from django.forms.models import BaseModelForm, ErrorList, model_to_dict class AkamaiBaseModelForm(BaseModelForm): def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None)...
mit
-6,193,288,522,580,875,000
49.833333
92
0.603279
false
foolcage/fooltrader
fooltrader/spiders/america/sp500_spider.py
1
3418
# -*- coding: utf-8 -*- import pandas as pd import scrapy from scrapy import Request from scrapy import Selector from scrapy import signals from fooltrader.contract.files_contract import get_kdata_path from fooltrader.utils.utils import index_df_with_time, to_time_str, to_float class Sp500Spider(scrapy.Spider): ...
mit
-1,803,275,329,661,801,200
37.840909
107
0.547689
false
Azure/azure-sdk-for-python
sdk/core/azure-core/tests/testserver_tests/test_rest_http_request.py
1
11042
# -*- 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. # -------------------------------------------------------------...
mit
-4,604,077,631,568,320,000
35.140984
131
0.621394
false
flennerhag/mlens
mlens/ensemble/tests/test_a_sklearn.py
1
7958
""" Test Scikit-learn """ import numpy as np from mlens.ensemble import SuperLearner, Subsemble, BlendEnsemble, TemporalEnsemble from mlens.testing.dummy import return_pickled try: from sklearn.utils.estimator_checks import check_estimator from sklearn.linear_model import Lasso, LinearRegression from sklear...
mit
-4,493,878,293,141,852,000
29.258555
83
0.573637
false
pyfa-org/eos
tests/integration/restriction/restriction/test_drone_bandwidth.py
1
10465
# ============================================================================== # 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,386,085,293,114,946,600
37.903346
80
0.624367
false
sadanandb/pmt
src/tactic/ui/container/pop_window_wdg.py
1
40581
############################################################ # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without writt...
epl-1.0
-6,829,569,407,633,964,000
35.060274
119
0.520638
false
gwct/grampa
docs/scripts/generators/about_generator.py
1
17272
############################################################ # For GRAMPA site, 12.19 # This generates the file "about.html" ############################################################ import sys, os sys.path.append('..') import lib.read_chunks as RC ###################### # HTML template ###################### htm...
gpl-3.0
-4,442,646,838,849,395,700
64.181132
196
0.688861
false
frouty/odoo_oph
addons/account/account_invoice.py
1
96788
# -*- coding: 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 GNU...
agpl-3.0
12,661,014,359,507,784
52.474033
307
0.560245
false
Svalorzen/AI-Toolbox
.ycm_extra_conf.py
1
4719
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
gpl-3.0
-5,098,795,547,491,970,000
34.216418
80
0.712015
false
minrk/sympy
sympy/polys/polyclasses.py
1
46239
"""OO layer for several polynomial representations. """ from sympy.core.compatibility import cmp class GenericPoly(object): """Base class for low-level polynomial representations. """ def ground_to_ring(f): """Make the ground domain a ring. """ return f.set_domain(f.dom.get_ring()) def g...
bsd-3-clause
-899,980,643,077,124,200
28.583493
105
0.50239
false
scalyr/scalyr-agent-2
scalyr_agent/line_matcher.py
1
20484
# Copyright 2015 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
-3,389,244,523,084,116,000
38.697674
124
0.586555
false
paveldedik/thesis
models/models.py
1
30072
# -*- coding: utf-8 -*- """ Evaluation Models ================= """ from __future__ import division from copy import copy from itertools import izip from collections import defaultdict import numpy as np import pandas as pd import tools __all__ = ( 'DummyPriorModel', 'EloModel', 'EloResponseTime', ...
mit
3,786,921,495,421,080,000
30.098242
78
0.614758
false
jarnoln/cvdb
viewcv/cv.py
1
4641
import logging import weasyprint from django.core.exceptions import PermissionDenied from django.urls import reverse, reverse_lazy from django.views.generic import DetailView, ListView, RedirectView from django.views.generic.edit import UpdateView, DeleteView from django.http import Http404, HttpResponse from django.co...
mit
-3,008,300,420,551,048,000
33.634328
99
0.613876
false
51x/IP_Blocker-Flask_Iptables
flask_iptables.py
1
1578
#!/usr/bin/python # -*- coding: utf-8 -*- # Block using iptables through Flask import subprocess # Run iptables from IPy import IP # Valide IP import re # Make sure to validate from flask import Flask # Run Flask from flask import request # For url arguments app = Flask(__name__) # wget "127.0.0.1:9000/block?ip=8.8....
gpl-3.0
1,360,077,447,781,619,500
28.222222
128
0.569075
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslglobal_sslpolicy_binding.py
1
12604
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
-3,906,446,395,814,470,000
36.736527
430
0.730482
false
numirias/firefed
firefed/feature/bookmarks.py
1
2683
from attr import attrib, attrs from firefed.feature import Feature, formatter from firefed.output import csv_writer, good, out from firefed.util import moz_to_unix_timestamp DIRECTORY_TYPE = 2 @attrs class Bookmark: id = attrib() parent = attrib() type = attrib() title = attrib() guid = attrib...
mit
7,441,449,831,997,626,000
28.483516
81
0.51025
false
plaidml/plaidml
demos/TransferLearning/TransferLearningDemo.py
1
10313
import argparse import os import warnings import numpy as np import tensorflow as tf from keras.applications.resnet50 import preprocess_input from keras.preprocessing.image import ImageDataGenerator from tensorflow import keras from tensorflow.keras.applications import MobileNetV2, ResNet50 from tensorflow.keras.model...
apache-2.0
-2,606,503,370,377,058,300
36.501818
96
0.569669
false
DongjunLee/kino-bot
kino/utils/state.py
1
2110
# -*- coding: utf-8 -*- import arrow from .arrow import ArrowUtil from .data_handler import DataHandler class State(object): FLOW = "flow" MEMORY = "memory" ACTION = "action" SLEEP = "sleep" REST = "rest" def __init__(self): self.data_handler = DataHandler() self.fname = "s...
mit
4,102,606,326,711,703,000
26.763158
87
0.575355
false
ReproducibleBuilds/diffoscope
tests/comparators/test_gnumeric.py
1
1739
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2018 Chris Lamb <lamby@debian.org> # # diffoscope 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-3.0
4,844,339,935,804,039,000
31.185185
70
0.765823
false