text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
# -*- coding: utf-8 -*- from south.db import db from django.db import models from adm.application.models import * class Migration: def forwards(self, orm): # Adding field 'SubmissionInfo.doc_reviewed_at' db.add_column('application_submissioninfo', 'doc_reviewed_at', orm['application....
jittat/ku-eng-direct-admission
application/migrations/0030_add_doc_reviewed_at_to_submission_info.py
Python
agpl-3.0
9,283
0.009049
#!/usr/bin/env python """ project creation and deletion check for v3 """ # We just want to see any exception that happens # don't want the script to die under any cicumstances # script must try to clean itself up # pylint: disable=broad-except # pylint: disable=invalid-name # pylint: disable=import-error import argpa...
blrm/openshift-tools
scripts/monitoring/cron-send-project-operation.py
Python
apache-2.0
5,158
0.003296
from urllib import urlencode from django import forms, template from django.contrib.auth.admin import csrf_protect_m from django.contrib.admin import helpers from django.contrib.admin.util import unquote from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied fro...
thomasgilgenast/spqr-nonrel
filetransfers/admin.py
Python
bsd-3-clause
13,542
0.001625
#!/usr/bin/env python # # $File: IfElseFixed.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistribut...
BoPeng/simuPOP
docs/IfElseFixed.py
Python
gpl-2.0
1,537
0.003904
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('builds', '0010_merge'), ] operations = [ migrations.AlterField( model_name='project', name='approved...
frigg/frigg-hq
frigg/builds/migrations/0011_auto_20150223_0442.py
Python
mit
444
0
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/py-qtawesome/package.py
Python
lgpl-2.1
1,760
0
""" ======================================== Release Highlights for scikit-learn 0.22 ======================================== .. currentmodule:: sklearn We are pleased to announce the release of scikit-learn 0.22, which comes with many bug fixes and new features! We detail below a few of the major features of this r...
glemaitre/scikit-learn
examples/release_highlights/plot_release_highlights_0_22_0.py
Python
bsd-3-clause
10,115
0.002472
# Copyright (C) 2010-2018 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
hmenke/espresso
testsuite/python/drude.py
Python
gpl-3.0
10,864
0.004602
from functional_tests import FunctionalTest, ROOT, USERS import time from selenium.webdriver.support.ui import WebDriverWait #element = WebDriverWait(driver, 10).until(lambda driver : driver.find_element_by_id("createFolderCreateBtn")) class TestRegisterPage (FunctionalTest): def setUp(self): self.ur...
NewGlobalStrategy/NetDecisionMaking
fts/test_0aregister.py
Python
mit
2,323
0.021093
# DarkCoder def sum_of_series(first_term, common_diff, num_of_terms): """ Find the sum of n terms in an arithmetic progression. >>> sum_of_series(1, 1, 10) 55.0 >>> sum_of_series(1, 10, 100) 49600.0 """ sum = (num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff) #...
TheAlgorithms/Python
maths/sum_of_arithmetic_series.py
Python
mit
482
0.002075
import operator import time # Only the vertex (and its hamming distance is given) # Need to find all vertices which are within a hamming distance of 2 # That means for each vertex, generate a list of 300 other vertices (24 bits + 23 + 22 + ... + 1) # which are with hamming distance of 2 (generate vertices with 2 bit...
ajayhk/algorithms
greedy/k-clustering-hamming.py
Python
apache-2.0
6,457
0.038098
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # pygtail - a python "port" of logtail2 # Copyright (C) 2011 Brad Greenlee <brad@footle.org> # # Derived from logcheck <http://logcheck.org> # Copyright (C) 2003 Jonathan Middleton <jjm@ixtab.org.uk> # Copyright (C) 2001 Paul Slootman <paul@debian.org> # # This program is ...
mariodebian/server-stats-system-agent
sssa/pygtail.py
Python
gpl-2.0
6,429
0.002489
# -*- coding: utf-8 -*- """ A function f is defined by the rule that f(n) = n if n<3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n> 3. Write a procedure that computes f by means of a recursive process. Write a procedure that computes f by means of an iterative process. """ from operator import lt, sub, add, mul de...
aoyono/sicpy
Chapter1/exercises/exercise1_11.py
Python
mit
1,681
0.002974
__author__ = 'ronalddekker' # imports from xml.dom.pulldom import START_ELEMENT, parse from xml.dom.minidom import NamedNodeMap def segmentate_xml_file(xml_file): # parse the file, XML event after XML event # NOTE: the variable name 'doc' is not optimal (the variable is only a pointer to a stream of events) ...
DiXiT-eu/collatex-tutorial
unit8/sydney-material/integration/xml_segmentation.py
Python
gpl-3.0
1,298
0.006163
import unittest from clandestined import RendezvousHash class RendezvousHashTestCase(unittest.TestCase): def test_init_no_options(self): rendezvous = RendezvousHash() self.assertEqual(0, len(rendezvous.nodes)) self.assertEqual(1361238019, rendezvous.hash_function('6666')) def test_...
ewdurbin/clandestined-python
clandestined/test/test_rendezvous_hash.py
Python
mit
5,256
0.00019
#!/usr/bin/env python import ast import atexit from codecs import open from distutils.spawn import find_executable import os import sys import subprocess import setuptools import setuptools.command.sdist from setuptools.command.test import test HERE = os.path.abspath(os.path.dirname(__file__)) setuptools.command.sdi...
Robpol86/jira-context
setup.py
Python
mit
4,088
0.00318
from datetime import date from rest_framework import status as status_code from rest_framework import viewsets from rest_framework.decorators import action from rest_framework.response import Response from app.models import Passphrase, SlackUser from pantry.models import Pantry class PantryViewSet(viewsets.ViewSet)...
waitress-andela/waitress
waitress/pantry/viewsets.py
Python
mit
3,247
0.000924
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
pli3/e2-openwbif
plugin/controllers/views/mobile/channels.py
Python
gpl-2.0
7,404
0.013236
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-29 13:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0054_add_field_user_to_productionform'), ] operations = [ migration...
efornal/pulmo
app/migrations/0055_applicationform_requires_development.py
Python
gpl-3.0
523
0.001912
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import pwd import stat import time import os.path import logging def root_dir(): root_dir = os.path.split(os.path.realpath(__file__))[0] return root_dir def get_logger(name): def local_date(): return str(time.strftime("%Y-%m-%d"...
cwlseu/recipes
pyrecipes/utils.py
Python
gpl-3.0
2,631
0.009502
#!/usr/bin/env python # -*- coding: utf-8 -*- from . import db from datetime import datetime class User(db.Model): __table_args__ = { 'mysql_engine': 'InnoDB', 'mysql_charset': 'utf8mb4' } id = db.Column(db.Integer, primary_key=True, autoincrement=True) openid = db.Column(db.String(3...
15klli/WeChat-Clone
main/models/user.py
Python
mit
1,617
0
# -*- coding: utf-8 -*- # (c) 2015 Andreas Motl, Elmyra UG <andreas.motl@elmyra.de> from kotori.version import __VERSION__ from pyramid.config import Configurator def main(global_config, **settings): """This function returns a Pyramid WSGI application.""" settings['SOFTWARE_VERSION'] = __VERSION__ confi...
daq-tools/kotori
kotori/frontend/app.py
Python
agpl-3.0
843
0
import logging import os import re import sys import time import warnings import ConfigParser import StringIO import nose.case from nose.plugins import Plugin from sqlalchemy import util, log as sqla_log from sqlalchemy.test import testing, config, requires from sqlalchemy.test.config import ( _create_testing_eng...
obeattie/sqlalchemy
lib/sqlalchemy/test/noseplugin.py
Python
mit
6,603
0.004695
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
odoousers2014/odoo
addons/hr_holidays/tests/test_holidays_flow.py
Python
agpl-3.0
10,541
0.003226
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to enter the connection parameters. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog, QDialogButtonBox from PyQt5.QtSql ...
davy39/eric
SqlBrowser/SqlConnectionDialog.py
Python
gpl-3.0
3,950
0.00481
from werkzeug.exceptions import NotFound from werkzeug.utils import redirect from .models import URL from .utils import expose from .utils import Pagination from .utils import render_template from .utils import url_for from .utils import validate_url @expose("/") def new(request): error = url = "" if request...
mitsuhiko/werkzeug
examples/couchy/views.py
Python
bsd-3-clause
2,120
0
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' cc_plugin_ncei/ncei_trajectory.py ''' from compliance_checker.base import BaseCheck from cc_plugin_ncei.ncei_base import TestCtx, NCEI1_1Check, NCEI2_0Check from cc_plugin_ncei import util from isodate import parse_duration class NCEITrajectoryBase(BaseCheck): _c...
ioos/cc-plugin-ncei
cc_plugin_ncei/ncei_trajectory.py
Python
apache-2.0
7,802
0.004747
from selenium.common.exceptions import NoSuchElementException from .base import FunctionalTest, login_test_user_with_browser class EditPostTest(FunctionalTest): @login_test_user_with_browser def test_modify_post(self): self.browser.get(self.live_server_url) self.move_to_default_board() ...
cjh5414/kboard
kboard/functional_test/test_post_edit.py
Python
mit
4,015
0.00086
from ..widget import Widget def category_widget(value, title=None, description=None, footer=None, read_only=False, weight=1): """Helper function for quickly creating a category widget. Args: value (str): Column name of the category value. title (str, optional): Title of widget. descri...
CartoDB/cartoframes
cartoframes/viz/widgets/category_widget.py
Python
bsd-3-clause
1,071
0.003735
class UserInfoModel(object): PartenaireID = 0 Mail = "" CodeUtilisateur = "" TypeAbonnement = "" DateExpiration = "" DateSouscription = "" AccountExist = False def __init__(self, **kwargs): self.__dict__.update(kwargs) def create_dummy_model(self): self.Mail = "dumm...
NextINpact/LaPresseLibreSDK
python_django/sdk_lpl/models/UserInfosModel.py
Python
mit
439
0
from __future__ import absolute_import import re __all__ = [ '_SGML_AVAILABLE', 'sgmllib', 'charref', 'tagfind', 'attrfind', 'entityref', 'incomplete', 'interesting', 'shorttag', 'shorttagopen', 'starttagopen', 'endbracket', ] # sgmllib is not available by default in P...
eleonrk/SickRage
lib/feedparser/sgml.py
Python
gpl-3.0
2,683
0.003727
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify the settings that cause a set of programs to be created in a specific build directory, and that no intermediate built fil...
Jet-Streaming/gyp
test/builddir/gyptest-default.py
Python
bsd-3-clause
2,759
0.004712
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Basic tests for Cerebrum.Entity.EntitySpread. """ import pytest @pytest.fixture def entity_spread(Spread, entity_type): code = Spread('f303846618175b16', entity_type, description='Test spread for entity_type') code.insert() ...
unioslo/cerebrum
testsuite/tests/test_core/test_core_Entity/test_EntitySpread.py
Python
gpl-2.0
4,894
0
import sys import argparse parser = argparse.ArgumentParser(description=''' Phase haplotypes from phased pairs. ''') parser.add_argument('pairs', nargs=1, help='List of phased pairs (use - for stdin).') parser.add_argument('--buffer', default=1000, action='store', type=int, ...
mailund/read-phaser
phase_haplotypes.py
Python
gpl-3.0
8,417
0.011049
# -*- coding: utf-8 -*- from django.test import TestCase from django.core.urlresolvers import reverse class TestHomePage(TestCase): def test_uses_index_template(self): response = self.client.get(reverse("home")) self.assertTemplateUsed(response, "home/index.html") def test_uses_base_temp...
janusnic/dj-21v
unit_02/mysite/home/test.py
Python
mit
439
0.009112
def extract17LiterarycornerWordpressCom(item): ''' Parser for '17literarycorner.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('King Of Hell\'s Genius Pampered Wife', 'King ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extract17LiterarycornerWordpressCom.py
Python
bsd-3-clause
1,613
0.022939
#!/usr/bin/env python2 # Copyright (c) 2013-2014 The Bitcredit Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. BUILDDIR="/root/2.0/dragos/bitcredit-2.0" EXEEXT=".exe" # These will turn into comments if they were d...
dragosbdi/bitcredit-2.0
qa/pull-tester/tests_config.py
Python
mit
413
0.016949
#!/usr/bin/python #Covered by GPL V2.0 from encoders import * from payloads import * # generate_dictio evolution class dictionary: def __init__(self,dicc=None): if dicc: self.__payload=dicc.getpayload() self.__encoder=dicc.getencoder() else: self.__payload=payload() self.__encoder = [lambda x: en...
GHubgenius/wfuzz-1
dictio.py
Python
gpl-2.0
1,098
0.054645
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param a ListNode # @return a ListNode def swapPairs(self, head): if head is None: return head res = None res_end = Non...
huanqi/leetcode-python
swap_nodes_in_pairs/solution2.py
Python
bsd-2-clause
1,177
0
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
liosha2007/temporary-groupdocs-python3-sdk
groupdocs/models/ChangesResponse.py
Python
apache-2.0
1,137
0.007916
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Akretion # (<http://www.akretion.com>). # # This program is free software: you can redistribute it and/or modify # it unde...
bealdav/OpenUpgrade
addons/analytic/migrations/8.0.1.1/pre-migration.py
Python
agpl-3.0
1,314
0
from PySide import QtCore, QtGui class MakinFrame(QtGui.QFrame): mousegeser = QtCore.Signal(int,int) def __init__(self,parent=None): super(MakinFrame,self).__init__(parent) self.setMouseTracking(True) def setMouseTracking(self, flag): def recursive_set(parent): for child in parent.findChildren(QtCore.QObj...
imakin/PersonalAssistant
GameBot/src_py/makinreusable/makinframe.py
Python
mit
610
0.04918
#!/usr/bin/env python2 # Copyright (C) 2013-: # Gabes Jean, naparuba@gmail.com # Pasche Sebastien, sebastien.pasche@leshop.ch # # 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 withou...
naparuba/check-linux-by-ssh
check_disks_by_ssh.py
Python
mit
7,141
0.009803
#!/usr/bin/env python # coding: utf-8 # # Copyright 2016, Marcos Salomão. # # 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 require...
salomax/livremarketplace
app_test/purchase_test.py
Python
apache-2.0
4,115
0.002674
from sympy.core.numbers import comp, Rational from sympy.physics.optics.utils import (refraction_angle, fresnel_coefficients, deviation, brewster_angle, critical_angle, lens_makers_formula, mirror_formula, lens_formula, hyperfocal_distance, transverse_magnification) from sympy.physics.optics.med...
kaushik94/sympy
sympy/physics/optics/tests/test_utils.py
Python
bsd-3-clause
7,792
0.003208
import os import numpy as np from csv import reader from collections import defaultdict from common import Plate from pprint import pprint def hung_ji_adapter(): folder_ = 'C:/Users/ank/Desktop' file_ = 'HJT_fittness.csv' dose_curves = {} with open(os.path.join(folder_, file_)) as source_file: ...
chiffa/TcanAnalyzer
src/adapters.py
Python
bsd-3-clause
1,131
0.001768
from __future__ import print_function, division from time import time import argparse import numpy as np from sklearn.dummy import DummyClassifier from sklearn.datasets import fetch_20newsgroups_vectorized from sklearn.metrics import accuracy_score from sklearn.utils.validation import check_array from sklearn.ensemb...
RPGOne/Skynet
scikit-learn-0.18.1/benchmarks/bench_20newsgroups.py
Python
bsd-3-clause
3,555
0
''' SAPI 5+ driver. Copyright (c) 2009 Peter Parente Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
thisismyrobot/gedit-pytts
src/pyttsx/drivers/sapi5.py
Python
bsd-2-clause
5,041
0.005356
""" Data structures for sparse float data. Life is made simpler by dealing only with float64 data """ from __future__ import division # pylint: disable=E1101,E1103,W0231,E0202 from numpy import nan from pandas.compat import lmap from pandas import compat import numpy as np from pandas.types.missing import isnull, not...
andyraib/data-storage
python_scripts/env/lib/python3.6/site-packages/pandas/sparse/frame.py
Python
apache-2.0
30,372
0.000099
#https://raw.githubusercontent.com/AaronJiang/ProjectEuler/master/py/problem072.py """ Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction. If we list the set of reduced proper fractions for d <= 8 in ascending order of size, we get: 1/8, 1...
paulmcquad/projecteuler
0-100/problem72.py
Python
gpl-3.0
1,185
0.014346
""" .. moduleauthor:: Chris Dusold <DriveLink@chrisdusold.com> A module containing general purpose, cross instance hashing. This module intends to make storage and cache checking stable accross instances. """ from drivelink.hash._hasher import hash from drivelink.hash._hasher import frozen_hash from drivelink.hash._...
cdusold/DriveLink
drivelink/hash/__init__.py
Python
mit
357
0.002801
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import warnings import numpy as np from itertools import product from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix from scipy.sparse import coo_matrix from sklearn import datasets from sklearn.base import clo...
zaxtax/scikit-learn
sklearn/ensemble/tests/test_gradient_boosting.py
Python
bsd-3-clause
39,945
0.000075
# -*- coding: utf-8 -*- # # 2017-01-23 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Avoid XML bombs # 2016-07-17 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add GPG encrpyted import # 2016-01-16 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add PSKC import ...
wheldom01/privacyidea
privacyidea/lib/importotp.py
Python
agpl-3.0
20,360
0.00059
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Nov 20 20:41:02 2017 @author: jacoblashner """ import numpy as np import matplotlib.pyplot as plt ae = lambda nu : 1.47*10**(-7) * nu**(2.2) ao = lambda nu : 8.7*10**(-5)*nu+3.1*10**(-7)*nu**2 + 3.0*10**(-10)*nu**3 d = .3 #cm ee = lambda nu : (1 -...
MillerCMBLabUSC/lab_analysis
apps/4f_model/Memos/A2/plots.py
Python
gpl-2.0
658
0.018237
import sys, os from tempfile import TemporaryDirectory import pytest import multiprocessing from spinalcordtoolbox.utils import sct_test_path, sct_dir_local_path sys.path.append(sct_dir_local_path('scripts')) from spinalcordtoolbox import resampling import spinalcordtoolbox.reports.qc as qc from spinalcordtoolbox.im...
neuropoly/spinalcordtoolbox
testing/api/test_qc_parallel.py
Python
mit
1,038
0.00578
#!/usr/bin/env python # encoding: utf-8 from .user import * from .upload import * from .post import * from .system import * def all(): result = [] models = [] for m in models: result += m.__all__ return result __all__ = all()
luke0922/MarkdownEditor
application/models/__init__.py
Python
gpl-2.0
255
0.003922
from PIL import Image import sys def resize(img, baseheight, newname): hpercent = (baseheight / float(img.size[1])) wsize = int((float(img.size[0]) * float(hpercent))) img = img.resize((wsize, baseheight), Image.ANTIALIAS) img.save(newname) def makethumbnails(fname): img = Image.open(fname) x...
ejegg/FractalEditorSite
util/image.py
Python
gpl-3.0
519
0.001927
""" Empirical Likelihood Linear Regression Inference The script contains the function that is optimized over nuisance parameters to conduct inference on linear regression parameters. It is called by eltest in OLSResults. General References ----------------- Owen, A.B.(2001). Empirical Likelihood. Chapman and Hall...
DonBeo/statsmodels
statsmodels/emplike/elregress.py
Python
bsd-3-clause
3,091
0.002588
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattergeo.marker.colorbar.title", **kwargs ): super(SideValidator, self).__init__( plotly_name=pl...
plotly/python-api
packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_side.py
Python
mit
569
0
from __future__ import absolute_import from __future__ import division # Copyright (c) 2010-2017 openpyxl import math #constants DEFAULT_ROW_HEIGHT = 15. # Default row height measured in point size. BASE_COL_WIDTH = 13 # in characters DEFAULT_COLUMN_WIDTH = 51.85 # in points, should be characters DEFAULT_LEFT_MA...
171121130/SWI
venv/Lib/site-packages/openpyxl/utils/units.py
Python
mit
2,629
0.005325
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob 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 opti...
eirmag/weboob
weboob/capabilities/housing.py
Python
agpl-3.0
3,610
0.007202
# -*- encoding:utf8 -*- """ 使用mongodb作为缓存器 测试本地缓存 """ import sys reload(sys) sys.setdefaultencoding('utf8') import json from pymongo import MongoClient from datetime import datetime, timedelta from bson.binary import Binary import zlib import time class MongoCache: def __init__(self, client=None, expires=timedelt...
basicworld/pycrawler
mongo_cache.py
Python
mit
1,791
0.006908
""" """ import traceback from AnyQt.QtWidgets import QWidget, QPlainTextEdit, QVBoxLayout, QSizePolicy from AnyQt.QtGui import QTextCursor, QTextCharFormat, QFont from AnyQt.QtCore import Qt, QObject, QCoreApplication, QThread, QSize from AnyQt.QtCore import pyqtSignal as Signal class TerminalView(QPlainTextEdit): ...
cheral/orange3
Orange/canvas/application/outputview.py
Python
bsd-2-clause
6,738
0
import numpy as np import load_data from generative_alg import * from keras.utils.generic_utils import Progbar from load_data import load_word_indices from keras.preprocessing.sequence import pad_sequences import pandas as pa import augment def test_points(premises, labels, noises, gtest, cmodel, hypo_len): p = P...
jstarc/deep_reasoning
visualize.py
Python
mit
3,189
0.014111
# -*- coding: utf-8 -*- # # GromacsWrapper documentation build configuration file, created by # sphinx-quickstart on Tue Jun 23 19:38:56 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't ...
PicoCentauri/GromacsWrapper
doc/sphinx/source/conf.py
Python
gpl-3.0
6,547
0.005346
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
dhuang/incubator-airflow
chart/tests/test_create_user_job.py
Python
apache-2.0
3,564
0.001684
from .google import GoogleSpeaker from .watson import WatsonSpeaker """ alfred ~~~~~~~~~~~~~~~~ Google tts. """ __all__ = [ 'GoogleSpeaker', 'WatsonSpeaker' ]
lowdev/alfred
speaker/tts/__init__.py
Python
gpl-3.0
169
0
from textwrap import dedent from unittest import TestCase from lxml import etree from pcs_test.tools.assertions import AssertPcsMixin from pcs_test.tools.cib import get_assert_pcs_effect_mixin from pcs_test.tools.misc import get_test_resource as rc from pcs_test.tools.misc import ( get_tmp_file, skip_unless_c...
tomjelinek/pcs
pcs_test/tier1/test_cib_options.py
Python
gpl-2.0
32,976
0.000667
#This doesn't actually do anything, its just a gui that looks like the windows one(kinda) from Tkinter import * mGui=Tk() mGui.geometry('213x240') mGui.title('Calculator') mGui["bg"]="#D9E3F6" ##set images image1 = PhotoImage(file="images/mc.gif") image2 = PhotoImage(file="images/mr.gif") image3 = PhotoImage(file="i...
covxx/Random-Python-Stuff
WindowsCalc.py
Python
mit
4,314
0.034771
# # define Line class import math class Line(object): def __init__(self, p1,p2): self.p1 = p1 self.p2 = p2 def getP1(self): return self.p1 def getP2(self): return self.p2 def getDistance(self): euclidean_dist = math.sqrt((self.p1.getXCoord() - self.p2.getXCoord())...
jskye/car-classifier-research
src/hyp.verification.tools/py/Line.py
Python
mit
564
0.019504
DEBUG = 0 # cardinal diretions directions = ("left","up","right","down") # logic maxExamined = 75000 # maximum number of tries when solving maxMoves = 19 # maximum number of moves cullFrequency = 75000 # number of tries per cull update cullCutoff = 1.2 # fraction of average to cull # grid size gridRows = 5 gridColum...
discomethod/pad-helper
constants.py
Python
gpl-2.0
1,240
0.046774
# -*- coding: utf-8 -*- # # EAV-Django is a reusable Django application which implements EAV data model # Copyright © 2009—2010 Andrey Mikhaylenko # # This file is part of EAV-Django. # # EAV-Django is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Pu...
omusico/eav-django
eav/forms.py
Python
lgpl-3.0
5,690
0.003517
#!/bin/python3.1 # ##### BEGIN GPL LICENSE BLOCK ##### # # lolblender - Python addon to use League of Legends files into blender # # 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 ...
lispascal/lolblender
dumpContents.py
Python
gpl-3.0
10,499
0.015049
# Copyright (C) 2010, 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions an...
hgl888/crosswalk-android-extensions
build/idl-generator/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing.py
Python
bsd-3-clause
20,171
0.003322
#!/usr/bin/python from distutils.core import setup # Remember to change in reroute/__init__.py as well! VERSION = '1.1.1' setup( name='django-reroute', version=VERSION, description="A drop-in replacement for django.conf.urls.defaults which supports HTTP verb dispatch and view wrapping.", long_descrip...
dnerdy/django-reroute
setup.py
Python
mit
982
0.002037
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/api/conf.py
Python
bsd-3-clause
11,771
0.008156
from flask import session, Blueprint from lexos.managers import session_manager from lexos.helpers import constants from lexos.models.consensus_tree_model import BCTModel from lexos.views.base import render consensus_tree_blueprint = Blueprint("consensus-tree", __name__) @consensus_tree_blueprint.route("/consensus-t...
WheatonCS/Lexos
lexos/views/consensus_tree.py
Python
mit
1,164
0
""" A wrap python class of 'pbsnodes -N "note" node' command The purpose of this class is to provide a simple API to write some attribute and its value pairs to note attribute of cluster nodes. """ from __future__ import print_function from sh import ssh from ast import literal_eval from types import * from copy import...
rajpushkar83/cloudmesh
cloudmesh/pbs/pbs_note.py
Python
apache-2.0
4,485
0.001115
# coding: utf8 # commentinput.py # 5/28/2014 jichi __all__ = 'CommentInputDialog', if __name__ == '__main__': import sys sys.path.append('..') import debug debug.initenv() from Qt5 import QtWidgets from PySide.QtCore import Qt from sakurakit import skqss #from sakurakit.skclass import memoizedproperty #from ...
Dangetsu/vnr
Frameworks/Sakura/py/apps/reader/dialogs/commentinput.py
Python
gpl-3.0
3,917
0.012254
from datetime import datetime import time import os, json import requests import urllib from . import app from app.cloudant_db import cloudant_client from app.redis_db import get_next_user_id from typing import List, Dict, Optional from cloudant.document import Document from cloudant.database import CloudantDatabase C...
snowch/movie-recommender-demo
web_app/app/dao.py
Python
apache-2.0
12,507
0.006796
# -*- conding: utf-8 -*- import base64 import json from unicodedata import normalize import requests from bs4 import BeautifulSoup from .utils import normalize_key class Institution: """ Classe responsavel pela coleta de todos os daddos da instituicao no site do e-MEC. Realiza o scraping em busca de da...
pavanad/emec-api
emec/emec.py
Python
mit
8,481
0.001061
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_garm_bel_iblis.iff" result.attribute_template_id = 9 ...
obi-two/Rebelion
data/scripts/templates/object/mobile/shared_dressed_garm_bel_iblis.py
Python
mit
447
0.04698
# -*- coding: utf-8 -*- """ Data about OCA Projects, with a few helper functions. OCA_PROJECTS: dictionary of OCA Projects mapped to the list of related repository names, based on https://community.odoo.com/page/website.projects_index OCA_REPOSITORY_NAMES: list of OCA repository names """ from github_login import l...
osvalr/maintainer-tools
tools/oca_projects.py
Python
agpl-3.0
5,555
0.00018
""" :mod: ReqClient .. module: ReqClient :synopsis: implementation of client for RequestDB using DISET framework """ import os import time import random import json import datetime # # from DIRAC from DIRAC import gLogger, S_OK, S_ERROR from DIRAC.Core.Utilities.List import randomize, fromChar from DIRAC.Core.Ut...
DIRACGrid/DIRAC
src/DIRAC/RequestManagementSystem/Client/ReqClient.py
Python
gpl-3.0
28,083
0.002635
#!/usr/bin/python3 """ Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer in the range 1 to 10. Do NOT use system's Math.random(). """ # The rand7() API is already defined for you. def rand7(): return 0 class Sol...
algorhythms/LeetCode
470 Implement Rand10() Using Rand7().py
Python
mit
773
0
# author David Sanchez david.sanchez@lapp.in2p3.fr # ------ Imports --------------- # import numpy from Plot.PlotLibrary import * from Catalog.ReadFermiCatalog import * from environ import FERMI_CATALOG_DIR # ------------------------------ # #look for this 2FGL source source = "2FGL J1015.1+4925" #source = "1FHL J2158...
qpiel/python_estimation_source
Example/ExReadFermiCatalog.py
Python
gpl-3.0
1,737
0.039724
#!/usr/bin/env python #! -O # # python equivalent for grouplisten, works same way # #EIBD client library #Copyright (C) 2006 Tony Przygienda, Z2 GmbH #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 Fr...
Makki1/old-svn
avr/sketchbook/GiraRM_Debug/freebus/freebus_ets/software/freebus-ets/eibnet/grouplisten.py
Python
gpl-3.0
2,687
0.040194
#!/usr/bin/python2.4 # # Copyright 2009 Empeeric 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 # # Unl...
poeks/twitterbelle
lib/bitly.py
Python
apache-2.0
7,225
0.01301
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyrigh...
nuagenetworks/vspk-python
vspk/v6/nuegressauditacltemplate.py
Python
bsd-3-clause
21,660
0.008726
# redis-import-set import sys from csv import reader from itertools import count, groupby, islice import redis if __name__ == '__main__': r = redis.Redis() pipeline_redis = r.pipeline() count = 0 try: keyname = sys.argv[1] except IndexError: raise Exception("You must specify the...
unbracketed/RedLine
redline/examples/redis-import-set_groupby.py
Python
mit
554
0.018051
from textwrap import dedent import inspect from collections import OrderedDict from clusterjob import JobScript import pytest import logging try: from ConfigParser import Error as ConfigParserError except ImportError: from configparser import Error as ConfigParserError # built-in fixtures: tmpdir # pytest-captu...
goerz/clusterjob
tests/test_inifile.py
Python
mit
10,660
0.001689
#!/usr/bin/python # ZetCode PyGTK tutorial # # This example shows how to use # the Alignment widget # # author: jan bodnar # website: zetcode.com # last edited: February 2009 import gtk import gobject class PyApp(gtk.Window): def __init__(self): super(PyApp, self).__init__() self.set_title(...
HPPTECH/hpp_IOSTressTest
Refer/Alignment.py
Python
mit
995
0.009045
__all__ = ["machsuite", "shoc", "datatypes", "params"]
andrewfu0325/gem5-aladdin
sweeps/benchmarks/__init__.py
Python
bsd-3-clause
55
0
# lint-amnesty, pylint: disable=missing-module-docstring import logging from functools import partial from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponseBadRequest from django.urls import reverse from django.utils.translation import ...
eduNEXT/edunext-platform
cms/djangoapps/contentstore/views/preview.py
Python
agpl-3.0
13,137
0.00236
from django.db import models from lxml import html import requests from ..core.models import UUIDModel from ..teams.models import FleaOwner STAT_VARS = [ # Should be ordered accordingly 'stat_fgpct100', 'stat_ftpct100', 'stat_3pt', 'stat_reb', 'stat_stl', 'stat_blk', 'stat_ast', 'stat_to', 'stat_pts', ] ...
lightning18/rcj-leaderboards
leaderboards/leagues/models.py
Python
mit
3,288
0.002433
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
martyone/sailfish-qtcreator
tests/system/suite_tools/tst_git_first_commit/test.py
Python
lgpl-2.1
4,000
0.00875
from sys import byteorder from array import array from struct import pack from multiprocessing import Process import unreal_engine as ue import pyaudio import wave THRESHOLD = 500 CHUNK_SIZE = 1024 FORMAT = pyaudio.paInt16 RATE = 44100 def is_silent(snd_data): "Returns 'True' if below the 'silent' t...
jbecke/VR-Vendor
AmazonCompetition/Content/Scripts/record.py
Python
mit
3,740
0.004813
# assign inputs _skymtx, _analysisGrids, _analysisType_, _vmtxPar_, _dmtxPar_, reuseVmtx_, reuseDmtx_ = IN analysisRecipe = None #import honeybee #reload(honeybee.radiance.recipe.daylightcoeff.gridbased) #reload(honeybee.radiance.recipe.threephase.gridbased) #reload(honeybee.radiance.recipe.fivephase.gridbased) try: ...
ladybug-analysis-tools/honeybee-plus
plugin/src/fivephasegbrecipe_node.py
Python
gpl-3.0
906
0.007726
# # nestml_error_listener.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 op...
kperun/nestml
pynestml/frontend/nestml_error_listener.py
Python
gpl-2.0
4,293
0.003261
# 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 applicable law or agreed to in...
group-policy/rally
tests/ci/osresources.py
Python
apache-2.0
8,981
0