code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# -*- coding: utf-8 -*- """ ===================================================================== Spectro-temporal receptive field (STRF) estimation on continuous data ===================================================================== This demonstrates how an encoding model can be fit with multiple continuous input...
bloyl/mne-python
tutorials/machine-learning/30_strf.py
Python
bsd-3-clause
13,766
import datetime import logging try: import threading except ImportError: threading = None from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class ThreadTrackingHandler(logging.Handler): def __init__(self):...
none-da/zeshare
debug_toolbar/panels/logger.py
Python
bsd-3-clause
2,377
#-*- coding:utf-8 -*- # # Copyright (C) 2008 - Olivier Lauzanne <olauzanne@gmail.com> # # Distributed under the BSD license, see LICENSE.txt from cssselectpatch import selector_to_xpath from lxml import etree import lxml.html from copy import deepcopy from urlparse import urljoin def fromstring(context, parser=None): ...
dbbhattacharya/kitsune
vendor/packages/pyquery/pyquery/pyquery.py
Python
bsd-3-clause
32,553
from django.db.backends import BaseDatabaseIntrospection import cx_Oracle import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_re...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/db/backends/oracle/introspection.py
Python
bsd-3-clause
4,638
''' Created on Oct 5, 2012 @author: Luca Nobili This modules reads Humidity and Temperature from a Sensirion SHT1x sensor. I has been tested both with an SHT11 and an SHT15. It is meant to be used in a Raspberry Pi and depends on this module (http://code.google.com/p/raspberry-gpio-python/). The module raspberry-gp...
mrcuilin/Batch-Fluidized-Bed-Drying
library/sensor/sht1x/Sht1x_original.py
Python
apache-2.0
7,725
# -*- coding: UTF-8 -*- """ Django settings for mcuWeb project. Generated by 'django-admin startproject' using Django 1.11.5. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/s...
mcuTeam/mcuWeb
mcuWeb/mcuWeb/settings.py
Python
gpl-3.0
4,146
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para boing # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import scr...
titienmiami/mmc.repository
plugin.video.tvalacarta/servers/boing.py
Python
gpl-2.0
2,018
# -*- coding: utf-8 -*- __author__ = 'Dmitriy.Dakhnovskiy' from nltk import pos_tag def is_parts_of_speech(word, list_part_of_speech_tag): """ Проверяет является ли переданное слово частью речи из списка :param word: слово :param list_part_of_speech_tag: список тэгов соответствующий части речи :r...
Dakhnovskiy/linguistic_analyzer_projects
analyzer_project/morphological_analysis/common.py
Python
apache-2.0
704
#!/usr/bin/env python3 from concurrent.futures import ProcessPoolExecutor from multiprocessing import cpu_count from argparse import ArgumentParser import functools import os from lib.json_folder_map import json_folder_map from lib.calculate_terms import calculate_terms from lib.regress_course import regress_course f...
StoDevX/course-data-tools
bundle.py
Python
mit
2,986
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket from pygame import mixer import serial, threading, random import subprocess import sys, os child = os.path.join(os.path.dirname(__file__), "/home/pi/r2d2/sound.py") word = 'word' file = ['/home/pi/r2d2/prog.py','/home/pi/r2d2/sound.py'] pipes = [] arduinoB...
Skaper/RMCStudio
scrips_robot/prog (backup24032016).py
Python
apache-2.0
3,039
import unittest from truckstop.search import SpatialIndex """ Scenario 1: N (0, 10) W (-10, 0) X E (10, 0) S (0, -10) This is a simple set of points. We'll never find anything if we search within 10 units. Scenario 2: (lifted from the WikiPedia example) ...
apg/truckstop
tests/test_spatial.py
Python
agpl-3.0
1,899
# Copyright 2018-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
chrislit/abydos
abydos/distance/_tarantula.py
Python
gpl-3.0
4,524
from __future__ import absolute_import # Django settings for zulip project. ######################################################################## # Here's how settings for the Zulip project work: # # * settings.py contains non-site-specific and settings configuration # for the Zulip Django app. # * settings.py impor...
vakila/zulip
zproject/settings.py
Python
apache-2.0
33,463
import numpy as np def main(): # Manual way to create Arrays a = np.array([1,2,3]) # Creates a rank 1 array print type(a) # Prints "<type 'numpy.ndarray'>" print a.shape # (3,) print a[0], a[1] b = np.array([[1,2,3],[4,5,6]]) # Create a rank 2 array print b.shape ...
cprakashagr/PythonClass
src/numpy-scipy/arrays.py
Python
mit
1,259
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from django.db import migrations, models def fix_admins_with_partners(apps, schema_editor): Org = apps.get_model("orgs", "Org") for org in Org.objects.all(): for admin in org.administrators.all(): # admins sh...
praekelt/casepro
casepro/profiles/migrations/0005_fix_admins_with_partners.py
Python
bsd-3-clause
985
def game_opt(user, command_line): args = None if ' ' in command_line: pivot = command_line.find(' ') command, args = command_line[:pivot], command_line[pivot+1:] else: command = command_line print(user, command, args) if command == 'i' or command == 'import': pass ...
bhamlin/discord-pip-boy
pipboy/game.py
Python
gpl-3.0
341
if ( x == ( 3 ) or y == 4): pass y = x == 2 \ or x == 3 if x == 2 \ or y > 1 \ or x == 3: pass if x == 2 \ or y > 1 \ or x == 3: pass #: W503 if (foo == bar and baz == frop): pass #: W503 if ( foo == bar and baz == frop ): ...
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/pycodestyle/testsuite/E12not.py
Python
mit
13,375
# -*- coding: utf-8 -*- # # 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 #...
sergiohgz/incubator-airflow
airflow/contrib/operators/sftp_operator.py
Python
apache-2.0
4,492
from __future__ import division, absolute_import, print_function import os import sys import types import re from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype from numpy.core import ndarray, ufunc, asarray __all__ = [ 'issubclass_', 'issubsctype', 'issubdtype', 'deprecate', 'deprecate_...
NextThought/pypy-numpy
numpy/lib/utils.py
Python
bsd-3-clause
37,308
from __future__ import print_function, division import numpy as np class OptThinRadius(object): def __init__(self, temperature, value=1., min=0.): self.temperature = temperature self.value = value self.min = 0. def __mul__(self, value): return OptThinRadius(self.temperature,...
hyperion-rt/hyperion
hyperion/util/convenience.py
Python
bsd-2-clause
1,319
from amo.utils import send_mail_jinja from celeryutils import task @task def email_buyer_refund_pending(contrib): send_mail_jinja('Your refund request for %s is now being processed' % contrib.addon.name, 'lookup/emails/refund-pending.txt', {'name': cont...
jinankjain/zamboni
mkt/lookup/tasks.py
Python
bsd-3-clause
720
import traceback from flask import ( Blueprint, current_app, jsonify, render_template, ) bp = Blueprint('patilloid', __name__) @bp.route('/', methods=('GET',)) def index(): try: current_app.logger.info("Let's show them Patilloid!") return render_template('patilloid.html') exc...
patillacode/patilloid
app/patilloid.py
Python
gpl-3.0
565
# This file is from us, not the library developer from __future__ import print_function from collections import Counter import struct import sys import time import numpy as np try: from sklearn import neighbors, svm HAVE_SK = True except ImportError: HAVE_SK = False try: import pygame from pygam...
BtpPrograms/MHacks8
Python/emg_test.py
Python
gpl-3.0
1,120
# -*- coding: utf-8 -*- # ########################################################## # ## make sure administrator is on localhost # ########################################################### import os import socket import datetime import copy import gluon.contenttype import gluon.fileutils # ## critical --- make a ...
henkelis/sonospy
web2py/applications/sonospy/controllers/appadmin.py
Python
gpl-3.0
13,367
import unittest from ziphmm import _mann from _internal import create_hmm from _internal import create_seq class TestMann(unittest.TestCase): def test0(self): self.__test('test0', 'test0', -12.4766) def test1(self): self.__test('test1', 'test1', -12.5671) def test2(self): self....
jade-cheng/Jocx
tests/ziphmm/test_mann.py
Python
gpl-2.0
1,967
""" test generation and verification of tokens """ # pylint: disable=wrong-import-order from test.common import payload, pub_keys, priv_keys, algs, generated_keys, \ clock_tick, clock_load from test import python_jwt as jwt from datetime import timedelta, datetime from pyvows import Vows, expect...
davedoesdev/python-jwt
test/jwt_spec.py
Python
mit
8,100
#------------------------------------------------------------------------------- # Name: combine_dataset.py # Author: Donald Whyte # Date last modified: 29/06/12 # Description: # Reads the directory containing a shellcode training/test dataset and combines # ALL of the data items (individual files) into a single file. ...
DonaldWhyte/machine-learning-experiments
scripts/combine_dataset.py
Python
bsd-2-clause
4,113
from django.apps import AppConfig class ReceiptConfig(AppConfig): name = 'receipt'
stodola/mlshopping
receipt/apps.py
Python
apache-2.0
89
from datetime import datetime import logging __author__ = 'mertsalik' class FADateTime: """ FADateTime(decimal_date, decimal_time) """ def __init__(self, decimal_date, decimal_time): self.decimal_date = decimal_date self.decimal_time = decimal_time self.datetime = datetime.now() ...
mertsalik/flashair-live-sync
falib/FADateTime.py
Python
mit
2,519
#!/usr/bin/env python ############################################################################### # # CoCalc: Collaborative Calculation in the Cloud # # Copyright (C) 2016, Sagemath Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
tscholl2/smc
src/scripts/build_sage.py
Python
agpl-3.0
2,177
# -*- coding: utf-8 -*- from django import template register = template.Library() @register.inclusion_tag("breadcrumbs/dummy.html", takes_context=True) def breadcrumbs(context, instance, template_name="breadcrumbs/crumbs.html"): return {'object': instance, 'template': template_name, 'crum...
bashu/django-crumbs-mixin
crumbs/templatetags/crumbs_tags.py
Python
bsd-3-clause
371
# -*- coding: utf-8 -*- import os import sys import fcntl import signal import logging import logging.config from ConfigParser import ConfigParser from openprocurement.search.version import __version__ from openprocurement.search.engine import IndexEngine, logger from openprocurement.search.utils import decode_bool_...
openprocurement/openprocurement.search
openprocurement/search/index_worker.py
Python
apache-2.0
4,585
""" Functions for Miller and Bellan 1997 kinetic scheme for biomass pyrolysis. Biomass composition by mass of beech wood is used from Table 2 in paper. This version ignores the first reaction pathway from virgin -> active. Reference: Miller, Bellan, 1997. Combust. Sci. and Tech., 126, pp 97-137. """ import numpy as n...
pyrolysis/kinetic-schemes
functions/miller_noR1.py
Python
mit
7,489
# # File: courseware/capa/responsetypes.py # ''' Problem response evaluation. Handles checking of student responses, of a variety of types. Used by capa_problem.py ''' # standard library imports import abc import cgi import inspect import json import logging import numbers import numpy import os from pyparsing imp...
TsinghuaX/edx-platform
common/lib/capa/capa/responsetypes.py
Python
agpl-3.0
102,630
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:35644") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
shirecoin/shirecoin
contrib/wallettools/walletchangepass.py
Python
mit
220
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2013 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
OSSESAC/odoopubarquiluz
openerp/addons/base/module/module.py
Python
agpl-3.0
36,753
#!/usr/bin/env python3 # ============================================================================== # Copyright 2019-2020 Intel Corporation # # 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 Licens...
tensorflow/ngraph-bridge
tools/test_utils.py
Python
apache-2.0
11,951
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' slipmap based on mp_tile Andrew Tridgell June 2012 ''' import functools import math import os, sys import time try: import cv2.cv as cv except ImportError: import cv from MAVProxy.modules.mavproxy_map import mp_elevation from MAVProxy.modules.mavproxy_map imp...
3drobotics/MAVProxy
MAVProxy/modules/mavproxy_map/mp_slipmap.py
Python
gpl-3.0
47,640
#!/usr/bin/env python # # Copyright 2013 Google Inc. All Rights Reserved. # """A convenience wrapper for starting cloud sql with appengine for python.""" if __name__ == '__main__': print """ Google Cloud SQL now supports the MySQL wire protocol for connecting to your instances, and this tool has been deprecated. F...
ychen820/microblog
y/google-cloud-sdk/bin/google_sql.py
Python
bsd-3-clause
444
import xgboost as xgb data = [[1,0],[4,0],[0,1],[0,4],[3,1],[1,3]] labels = [1,1,0,0,1,0] dtrain = xgb.DMatrix(data,label=labels) param = {} #param['objective'] = 'multi:softmax' param['objective'] = 'multi:softprob' param['num_class'] = 2 #param['eval_metric'] = 'mlogloss' model = xgb.train(param,dtrain,200,evals=[...
mobarski/sandbox
ml/xgb/test3.py
Python
mit
413
import django.views.generic.detail as _generic_detail from coffin.views.generic.base import TemplateResponseMixin as JinjaTemplateResponseMixin class SingleObjectTemplateResponseMixin(JinjaTemplateResponseMixin, _generic_detail.SingleObjectTemplateResponseMixin): """ Equivalent of django mixin SingleObjec...
havard024/prego
venv/lib/python2.7/site-packages/coffin/views/generic/detail.py
Python
mit
579
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import test_partner_student_course
alfredoavanzosc/odoo-addons
partner_student_course/tests/__init__.py
Python
agpl-3.0
174
# !/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Vincent<vincent8280@outlook.com> # http://wax8280.github.io # Created on 17-12-17 下午7:54 import web2kindle.script.zhihu_collection import web2kindle.script.zhihu_answers import web2kindle.script.zhihu_zhu...
wax8280/web2kindle
tests/main_test.py
Python
mit
1,534
from .util import format_number from .vector3 import Vector3 from math import sin, cos, tan, sqrt, pi, radians #import psyco #psyco.full() class Matrix44Error(Exception): """Matrix44 Exception class""" def __init__(self, code, description): Exception.__init__(self) self.code = code ...
MaxWayne/Beginning-Game-Development-with-Python-and-Pygame
gameobjects/matrix44.py
Python
mit
35,907
"""Log*.build_id => job_id Revision ID: 57e24a9f2290 Revises: 35af40cebcde Create Date: 2013-12-26 01:03:06.812123 """ # revision identifiers, used by Alembic. revision = '57e24a9f2290' down_revision = '35af40cebcde' from alembic import op def upgrade(): op.execute('ALTER TABLE logsource RENAME COLUMN build_i...
alex/changes
migrations/versions/57e24a9f2290_log_build_id_job_id.py
Python
apache-2.0
570
# -*- coding: utf-8 -*- ############################################################################## # # This module uses OpenERP, Open Source Management Solution Framework. # Copyright (C): # 2012-Today Serpent Consulting Services (<http://www.serpentcs.com>) # # This program is free software: you ca...
MackZxh/OCA-Choice
server-tools/mass_editing/__openerp__.py
Python
lgpl-3.0
2,124
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, qualities, ExtractorError, ) class GfycatIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|giant|thumbs)\.)?gfycat\.com/(?:ru/|ifr/|gifs/detail/)?(?P<id>[...
rg3/youtube-dl
youtube_dl/extractor/gfycat.py
Python
unlicense
4,218
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
tensorflow/agents
tf_agents/bandits/agents/lin_ucb_agent.py
Python
apache-2.0
5,794
#!/usr/bin/env python import os import cloudfiles print "Creating account" status = os.system('swift-auth-create-account account user password') if status != 0: print ("FAIL: the account could not be created") print "Getting Connection" conn = cloudfiles.get_connection(username='account:user',api_key='pas...
jtimberman/swift-solo
tests/test.py
Python
apache-2.0
675
from msaf.lib.queryfuncs import AlleleDF from pandas import pivot_table def dominant_genotypes( sample_ids, threshold, marker_ids ): allele_df = AlleleDF.get_dominant_alleles( sample_ids, marker_ids ) if allele_df is None: return [] genotypes = pivot_table( allele_df, rows = 'sample_id', cols =...
trmznt/msaf
msaf/lib/tools/genotype.py
Python
lgpl-3.0
1,335
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
dstockwell/catapult
tracing/third_party/closure_linter/closure_linter/fixjsstyle_test.py
Python
bsd-3-clause
7,371
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import logging import time from azure.core.polling import PollingMethod try: from typing import TYPE_CHECKING except ImportError: TYPE_CHECKING = False if TYP...
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_polling.py
Python
mit
2,154
# Copyright (C) 2016 YouCompleteMe contributors # # This file is part of YouCompleteMe. # # YouCompleteMe 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) ...
NorfairKing/sus-depot
shared/shared/vim/dotvim/bundle/YouCompleteMe/python/ycm/tests/paths_test.py
Python
gpl-2.0
1,365
""" Django settings for webApp project. Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os ...
hanbenhao/python
webApp/webApp/settings.py
Python
apache-2.0
3,110
import datetime from lxml import html import fudge from django.utils import unittest from django.test.client import RequestFactory from django.shortcuts import render from django.template import defaultfilters from django.conf import settings from django.core import paginator from django.db import models from django....
cburgmer/django-wikify
src/wikify/tests/template_tests.py
Python
bsd-3-clause
22,005
######################################################################## # $HeadURL$ ######################################################################## from DIRAC.Core.Utilities.List import intListToString, stringListToString """ DIRAC FileCatalog component representing a directory tree with a closure table ...
miloszz/DIRAC
DataManagementSystem/DB/FileCatalogComponents/WithFkAndPs/DirectoryClosure.py
Python
gpl-3.0
19,034
# # Copyright (C) 2000-2008 greg Landrum and Rational Discovery LLC # All Rights Reserved # """ classes to be used to help work with data sets """ import copy import math import numpy numericTypes = (int, float) class MLDataSet(object): """ A data set for holding general data (floats, ints, and strings...
bp-kelley/rdkit
rdkit/ML/Data/MLData.py
Python
bsd-3-clause
11,150
# !/usr/bin/env python # -*- coding: utf-8 -*- import sys import logging from PyQt4.QtCore import SIGNAL, QString from basecontroller import BaseController, singleton # from user_controller import UserController # sys.path.append('../') from util.util import print_trace_exception, log_callback SEND_MSG_ID = 'SEND_...
dyf102/Gomoku-online
client/controller/chat_controller.py
Python
apache-2.0
3,149
from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.shortcuts import render_to_response from django.template.defaultfilters import slugify from django.template import RequestContext from kotakuang.forms import KategoriForm,PengeluaranForm,PemasukanForm from kotakuang.models import Kategori,...
freezmeinster/teh-manis
apps/kotakuang/views.py
Python
bsd-3-clause
2,901
#! python src = """ net/minecraft/world/WorldServer/tick ()V net/minecraft/client/multiplayer/WorldClient/tick ()V net/minecraft/client/multiplayer/WorldClient net/minecraft/world/World/getWorldTime ()J net/minecraft/world/World/worldInfo net/minecraft/world/storage/WorldInfo/getWorldTime ()J net/minecraft/world/stora...
hea3ven/Hea3venTweaks
srggen.py
Python
mit
1,634
import configparser import os import django if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_compta.settings") django.setup() from django.contrib.auth.models import User if os.path.exists('config.ini'): config = configparser.ConfigParser() config.read(...
datiti/django_compta
init_user.py
Python
apache-2.0
788
# Copyright 2017, 2018 Michael Schwager # Copyright 2016, 2015, 2014, 2013, 2012 Pavel Kostelnik # 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/lic...
GreyGnome/KivyDnD
examples/example_base_classes.py
Python
apache-2.0
6,700
# -*- coding: UTF-8 -*- """Easy to use object-oriented thread pool framework. A thread pool is an object that maintains a pool of worker threads to perform time consuming operations in parallel. It assigns jobs to the threads by putting them in a work request queue, where they are picked up by the next available threa...
ruuk/plugin.image.google
threadpool.py
Python
gpl-2.0
16,072
"""Time Utilities.""" # flake8: noqa from __future__ import absolute_import, unicode_literals __all__ = ('maybe_s_to_ms',) def maybe_s_to_ms(v): # type: (Optional[Union[int, float]]) -> int """Convert seconds to milliseconds, but return None for None.""" return int(float(v) * 1000.0) if v is not None el...
urbn/kombu
kombu/utils/time.py
Python
bsd-3-clause
325
# -*- coding: utf-8 -*- # # Transcribe, an Audio Transcription Tool # # Copyright (C) 2012 Germán Poo-Caamaño <gpoo@gnome.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 2 ...
gpoo/transcribe
transcribe/pipeline.py
Python
gpl-2.0
7,396
#!/usr/bin/python # # Urwid listbox class # Copyright (C) 2004-2012 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at ...
rndusr/urwid
urwid/listbox.py
Python
lgpl-2.1
60,733
import sys import os import crunchbase import pprint def print_usage_and_exit(): usage_string = ''' python crunchbase_client.py <options> Options: --help Print this message and exit. --show-company <company> --show-person <person> --show-financial-org <financ...
david-phillips/pycrunchclient
crunchbase_client.py
Python
mit
3,189
import json import decimal import datetime from ..exceptions import * from ..rfc3339 import Parser import lib.orm.base from lib.orm.binary import Binary class Converter(object): @classmethod def toDict(cls, data): """ Convert JSON to dict() """ try: ret = json.loads(data, object_h...
aminotti/yameo
lib/contenttype/application_json.py
Python
agpl-3.0
1,981
#!/usr/bin/python import sys while True: s = raw_input(">") print "Your input is:{}".format(s) sys.stdout.flush()
gensmusic/test
l/python/popen/echo.py
Python
gpl-2.0
127
from binder_utils import * from parser_utils import * from error import InterpreterError from stdlib import * class StdLib: def bindStandardFunctions(binder): binder.bindStandard('CALL', (ParameterType.Call,), StdLib.callFun) binder.bindStandard('PRINT', (ParameterType.Value,), StdLib.printFun) ...
bercik/BIO
old/impl/standard_lib.py
Python
gpl-2.0
5,517
import os basedir = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TESTING = False SQLALCHEMY_TRACK_MODIFICATIONS = False CSRF_ENABLED = True # SECRET_KEY = os.environ['SECRET_KEY'] SECRET_KEY = 'secret' # MAIL_SERVER = os.environ['MAIL_SERVER'] # MAIL_DEFAULT_SENDER = os.environ['MAIL_DEFAULT_SENDER'] # MAI...
opendatadurban/scoda
scoda/config.py
Python
apache-2.0
1,434
from galaxy.test.base.twilltestcase import TwillTestCase #from twilltestcase import TwillTestCase class EncodeTests(TwillTestCase): def test_00_first(self): # will run first due to its name """3B_GetEncodeData: Clearing history""" self.clear_history() def test_10_Encode_Data(self): ...
jmchilton/galaxy-central
galaxy/test/functional/test_3B_GetEncodeData.py
Python
mit
1,185
# 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 # distributed under th...
sijie/bookkeeper
stream/clients/python/tests/unit/__init__.py
Python
apache-2.0
544
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Dag Wieers (@dagwieers) <dag@wieers.com> # 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_v...
valentin-krasontovitsch/ansible
lib/ansible/modules/notification/mail.py
Python
gpl-3.0
14,043
#!/usr/bin/python # Copyright (C) 2008. Jurko Gospodnetic # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or copy at # https://www.bfgroup.xyz/b2/LICENSE.txt) # Tests for the Boost Jam builtin SORT rule. from __future__ import print_function import BoostBuild ####...
davehorton/drachtio-server
deps/boost_1_77_0/tools/build/test/sort_rule.py
Python
mit
2,542
# Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ver...
apophys/freeipa
ipapython/kernel_keyring.py
Python
gpl-3.0
4,362
from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template urlpatterns = patterns('', url(r'^$', direct_to_template, {"template": "about/about.html"}, name="about"), url(r'^txt/$', direct_to_template, {"template": "about/txt_howto.html"}, name="txt_msgs"), url(r...
kwantopia/shoppley-migrate
shoppley.com/shoppley/apps/about/urls.py
Python
mit
876
def test_context(): #print '.....900 id',Scene("19d").shotgun_field("id") #print '......best cut', Cut(scene='19d').get_best_cut() #print '.......id', Shot(shot='21a_010',scene="21a").get_cut_info() # shot = Shot(shot='21a_010',scene="21a") # print '.......id', shot.get_cut_info() # print '.......
xxxIsaacPeralxxx/anim-studio-tools
review_tool/code/reviewTool/unittest.py
Python
gpl-3.0
3,877
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', # URL pattern for the AnimalDocumentUploadView url(regex=r'^records-animaldocument-upload/$', view=views.AnimalDocumentUploadView.as_view(), ...
savioabuga/phoenix
phoenix/records/urls.py
Python
bsd-3-clause
1,115
""" implement the TimedeltaIndex """ from pandas._libs import ( index as libindex, lib, ) from pandas._libs.tslibs import ( Timedelta, to_offset, ) from pandas._typing import ( DtypeObj, Optional, ) from pandas.errors import InvalidIndexError from pandas.core.dtypes.common import ( TD64NS_...
datapythonista/pandas
pandas/core/indexes/timedeltas.py
Python
bsd-3-clause
9,141
# 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 # distributed under t...
therve/nabu
nabu/service.py
Python
apache-2.0
1,501
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------------- # Logger (kodi) # -------------------------------------------------------------------------------- import inspect import xbmc from platformcode import config loggeractive = (config.get_setting("debug") == True)...
pitunti/alfaPitunti
plugin.video.alfa/platformcode/logger.py
Python
gpl-3.0
1,925
''' The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? ''' from Generators import Primes from itertools import takewhile num = 600851475143 largestPrime = -1 while num >= 2: for x in Primes(): if num % x == 0: num /= x if...
nadrees/PyEuler
0003.py
Python
unlicense
410
# -*- coding: utf-8 -*- ''' watdo.tests.test_model ~~~~~ :copyright: (c) 2013 Markus Unterwaditzer :license: MIT, see LICENSE for more details. ''' import watdo.model as model Task = model.Task class TestTask(object): def test_writing(self, tmpdir): t = Task( summary='My litt...
untitaker/watdo
tests/test_model.py
Python
mit
2,577
import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='cmsplugin-media-center', url='https://github.com/MagicSolutions/cmsplugin-media-center',...
MagicSolutions/cmsplugin-media-center
setup.py
Python
mit
1,081
# -*- coding: utf-8 -*- from .RPyBeacon import main main()
google/eddystone
eddystone-url/implementations/PyBeacon/PyBeacon/__main__.py
Python
apache-2.0
59
MD_CORE_MODEL = { 'typename': 'pycsw:CoreMetadata', 'outputschema': 'http://pycsw.org/metadata', 'mappings': { 'pycsw:Identifier': 'id_string', 'pycsw:Typename': 'csw_typename', 'pycsw:Schema': 'csw_schema', 'pycsw:MdSource': 'csw_mdsource', 'pycsw:InsertDate': 'last_...
cga-harvard/HHypermap
hypermap/search/pycsw_local_mappings.py
Python
mit
2,676
# -*- coding: utf-8 -*- import inspect import os from django.conf import settings from django.core.management import color from django.core.management import BaseCommand from django.utils import termcolors from django.utils.encoding import smart_text from django_extensions.compat import load_tag_library from django_e...
neilpelow/wmap-django
venv/lib/python3.5/site-packages/django_extensions/management/commands/show_template_tags.py
Python
gpl-3.0
3,949
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import locale import logging import os import shutil import time from sys import platform from tempfile import mkdtemp import pytz from pelican import utils from pelican.generators import TemplatePagesGenerator from peli...
gymglish/pelican
pelican/tests/test_utils.py
Python
agpl-3.0
24,902
import glob import sys import cPickle from os.path import join import numpy as n import astropy.io.fits as fits import os import astropy.cosmology as co cosmo = co.Planck13 import astropy.units as uu import matplotlib #matplotlib.use('pdf') matplotlib.rcParams['font.size']=12 import matplotlib.pyplot as p from scipy...
JohanComparat/nbody-npt-functions
bin/bin_onePT/extra/M200c-1A-plotData-cen.py
Python
cc0-1.0
9,404
from env_setup import setup_django; setup_django() from django.db import models, connection from restler import decorators @decorators.django_serializer class Model1(models.Model): big_integer = models.BigIntegerField(null=True, default=1) boolean = models.BooleanField(default=False) char = models.CharF...
xuru/restler
tests/django_models.py
Python
mit
3,184
import sys import time import threading from BinPy import Connector class Multivibrator(threading.Thread): """ This class uses threading technique to create a multivibrator with a certain time period. USAGE: >>> m1 = Multivibrator() >>> m1.start() # Start this thread >>> m1.tr...
coder006/BinPy
BinPy/tools/multivibrator.py
Python
bsd-3-clause
4,521
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-15 13:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_auto_20170515_2106'), ] operations = [ migrations.AlterField( ...
r26zhao/django_blog
blog/migrations/0008_auto_20170515_2128.py
Python
mit
477
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Tests for Vowpal Wabbit LDA wrapper. Will not be run unless the environment variable 'VOWPAL_WABBIT_PATH' is set and points to the ...
macks22/gensim
gensim/test/test_ldavowpalwabbit_wrapper.py
Python
lgpl-2.1
7,937
"""VTA Package is a TVM backend extension to support VTA hardwares Besides the compiler toolchain. It also include utility functions to configure the hardware Environment and access remote through RPC """ from __future__ import absolute_import as _abs import sys from .bitstream import get_bitstream_path, download_b...
Huyuwei/tvm
vta/python/vta/__init__.py
Python
apache-2.0
698
# -*- coding: utf-8 -*- __author__ = 'Timothy Hopper' __email__ = 'tdhopper@gmail.com' __version__ = '0.1.0'
tdhopper/exception
exception/__init__.py
Python
mit
110
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=8, path_list=[ [TestAction.create_vm, 'vm1', ], [TestAction.create_volume, 'volume1', 'flag=scsi'], [TestAction.attach_volume, 'vm1', 'volume1'], ...
zstackio/zstack-woodpecker
integrationtest/vm/multihosts/vm_snapshots/paths/xsky_path59.py
Python
apache-2.0
1,961
from frappe import _ def get_data(): return { 'fieldname': 'review', 'transactions': [ { 'label': _('Action'), 'items': ['Quality Action'] }, { 'label': _('Meeting'), 'items': ['Quality Meeting'] ...
brownharryb/erpnext
erpnext/quality_management/doctype/quality_review/quality_review_dashboard.py
Python
gpl-3.0
347
"""The WaveBlocks Project Plot the eigenvalues (energy levels) of the potential. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011 R. Bourquin @license: Modified BSD License """ import sys from matplotlib.pyplot import * from WaveBlocks import PotentialFactory from WaveBlocks import IOManager from WaveBlock...
WaveBlocks/WaveBlocks
src/plotters_simple/PlotPotential.py
Python
bsd-3-clause
1,540
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = 'j. E Y G:i:s' YEAR_MONTH...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/django-1.4/django/conf/locale/cs/formats.py
Python
bsd-3-clause
1,313