code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
from __future__ import unicode_literals import re import unicodedata from gzip import GzipFile from io import BytesIO from django.utils.encoding import force_text from django.utils.functional import allow_lazy, SimpleLazyObject from django.utils import six from django.utils.six.moves import html_entities from django....
deployed/django
django/utils/text.py
Python
bsd-3-clause
14,829
""" bjson/main.py Copyright (c) 2010 David Martinez Marti All rights reserved. Licensed under 3-clause BSD License. See LICENSE.txt for the full license text. """ import socket import bjsonrpc.server import bjsonrpc.connection import bjsonrpc.handlers __all__ = [ "createserver", "...
deavid/bjsonrpc
bjsonrpc/main.py
Python
bsd-3-clause
2,824
def extractYuzukiteaWordpressCom(item): ''' Parser for 'yuzukitea.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loite...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractYuzukiteaWordpressCom.py
Python
bsd-3-clause
558
#### PATTERN | EN | INFLECT ######################################################################## # -*- coding: utf-8 -*- # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). ######################################################...
clips/pattern
pattern/text/en/inflect.py
Python
bsd-3-clause
36,230
# # Collective Knowledge (checking and installing software) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # cfg={} # Will be updated by CK (meta description of this module) work={} # Will be update...
ctuning/ck
ck/repo/module/soft/module.py
Python
bsd-3-clause
97,841
algorithm = "spawning_adiabatic" #algorithm = "hagedorn" potential = "eckart" T = 70 dt = 0.005 eps = 0.0234218**0.5 basis_size = 300 parameters = [ (0.1935842258501978j, 5.1657101481699996, 0.0, 0.24788547371, -7.55890450883) ] coefficients = [[(0, 1.0)]] leading_component = 0 f = 9.0 ngn = 4096 write_nth = 20...
WaveBlocks/WaveBlocks
demos/demo_tunneling_spawning/demo_tunneling_spawn_propagation_norm_threshold.py
Python
bsd-3-clause
517
from rest_framework import viewsets from rest_framework.exceptions import MethodNotAllowed class AnafViewSet(viewsets.ModelViewSet): """Base Viewset""" accepted_formats = ('html', 'ajax') def retrieve(self, request, *args, **kwargs): if request.method != 'GET': raise MethodNotAllowed(...
tovmeod/anaf
anaf/viewsets.py
Python
bsd-3-clause
410
""" Listener handling functionality for Empire. Handles listener startup from the database, listener shutdowns, and maintains the current listener configuration. """ import http import helpers from pydispatch import dispatcher import hashlib import sqlite3 class Listeners: def __init__(self, MainMenu, args=...
pierce403/EmpirePanel
lib/common/listeners.py
Python
bsd-3-clause
26,210
from sympy import (legendre, Symbol, hermite, chebyshevu, chebyshevt, chebyshevt_root, chebyshevu_root, assoc_legendre, Rational, roots, sympify, S, laguerre_l, laguerre_poly) x = Symbol('x') def test_legendre(): assert legendre(0, x) == 1 assert legendre(1, x) == x assert legendre(2, x) =...
pernici/sympy
sympy/functions/special/tests/test_spec_polynomials.py
Python
bsd-3-clause
3,248
r""" Fourier transform ================= The graph Fourier transform :meth:`pygsp.graphs.Graph.gft` transforms a signal from the vertex domain to the spectral domain. The smoother the signal (see :meth:`pygsp.graphs.Graph.dirichlet_energy`), the lower in the frequencies its energy is concentrated. """ import numpy as...
epfl-lts2/pygsp
examples/fourier_transform.py
Python
bsd-3-clause
1,371
from unittest.mock import Mock, patch from django.test import SimpleTestCase from corehq.apps.domain.exceptions import DomainDoesNotExist from corehq.apps.linked_domain.exceptions import ( DomainLinkAlreadyExists, DomainLinkError, DomainLinkNotAllowed, ) from corehq.apps.linked_domain.views import link_do...
dimagi/commcare-hq
corehq/apps/linked_domain/tests/test_views.py
Python
bsd-3-clause
3,062
from basic import Atom, SingletonMeta, S, Basic from decorators import _sympifyit from cache import Memoizer, MemoizerArg import sympy.mpmath as mpmath import sympy.mpmath.libmpf as mlib import sympy.mpmath.libmpc as mlibc from sympy.mpmath.libelefun import mpf_pow, mpf_pi, mpf_e, phi_fixed import decimal rnd = mlib.r...
hazelnusse/sympy-old
sympy/core/numbers.py
Python
bsd-3-clause
44,106
import sys import unittest from unittest.mock import MagicMock from PyQt5 import QtGui, QtCore from sas.qtgui.Plotting.PlotterData import Data1D from sas.qtgui.Plotting.PlotterData import Data2D from UnitTesting.TestUtils import WarningTestNotImplemented from sasmodels import generate from sasmodels import modelinf...
SasView/sasview
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingUtilitiesTest.py
Python
bsd-3-clause
11,524
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 12, transform = "BoxCox", sigma = 0.0, exog_count = 20, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_BoxCox/trend_MovingAverage/cycle_12/ar_12/test_artificial_32_BoxCox_MovingAverage_12_12_20.py
Python
bsd-3-clause
266
from __future__ import absolute_import from six.moves.urllib.parse import urlparse, parse_qs from requests.exceptions import HTTPError, SSLError from sentry_plugins.base import CorePluginMixin from sentry.exceptions import PluginError from sentry.shared_integrations.exceptions import ApiError, ApiHostError, ApiUnauth...
beeftornado/sentry
tests/sentry/plugins/bases/notify/tests.py
Python
bsd-3-clause
3,112
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.2 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise Runtime...
mfem/PyMFEM
mfem/_par/eltrans.py
Python
bsd-3-clause
26,581
import numpy as np import multiprocessing as mp import Starfish.constants as C import csv import h5py from astropy.table import Table from astropy.io import ascii def multivariate_normal(cov): np.random.seed() N = cov.shape[0] mu = np.zeros((N,)) result = np.random.multivariate_normal(mu, cov) prin...
gully/Starfish
Starfish/utils.py
Python
bsd-3-clause
11,039
# -*- coding: utf-8 -*- from datetime import datetime import numpy as np import pandas as pd try: import pandas.tseries.holiday # noqa except ImportError: pass hcal = pd.tseries.holiday.USFederalHolidayCalendar() # These offests currently raise a NotImplimentedError with .apply_index() non_apply = [pd.offset...
zfrenchee/pandas
asv_bench/benchmarks/offset.py
Python
bsd-3-clause
3,276
#!/usr/bin/python #!/usr/bin/python # Copyright 2008, 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 # notic...
eseidel/native_client_patches
tests/file/run.py
Python
bsd-3-clause
2,598
import io import panflute as pf def test_all(): md = 'Some *markdown* **text** ~xyz~' c_md = pf.convert_text(md) b_md = [pf.Para(pf.Str("Some"), pf.Space, pf.Emph(pf.Str("markdown")), pf.Space, pf.Strong(pf.Str("text")), pf.Space, pf.Subscript(pf....
sergiocorreia/panflute
tests/test_convert_text.py
Python
bsd-3-clause
4,653
import unittest, sys from lxml.tests.common_imports import make_doctest from lxml.etree import LIBXML_VERSION import lxml.html from lxml.html.clean import Cleaner class CleanerTest(unittest.TestCase): def test_allow_tags(self): html = """ <html> <head> </head> ...
wilsonssun/baseball-gamethread
build/lxml/src/lxml/html/tests/test_clean.py
Python
bsd-3-clause
1,225
# Copyright (c) 2013 The Chromium Embedded Framework Authors. # Portions copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This file is (possibly, depending on python version) imported by gyp_cef # when it c...
denzp/cef3
tools/gyp_cef.py
Python
bsd-3-clause
797
""" The I_downarrow unique measure, proposed by Griffith et al, and shown to be inconsistent. The idea is to measure unique information as the intrinsic mutual information between and source and the target, given the other sources. It turns out that these unique values are inconsistent, in that they produce differing ...
dit/dit
dit/pid/measures/iskar.py
Python
bsd-3-clause
4,845
""" fabcloudkit :copyright: (c) 2013 by Rick Bohrer. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import # pypi from fabric.context_managers import cd, prefix, settings from fabric.operations import run, sudo from fabric.state import env # package from fabcloudkit impo...
waxkinetic/fabcloudkit
fabcloudkit/build_tools/python_build.py
Python
bsd-3-clause
7,221
# -*- coding: utf-8 -*- # # Personal Site documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values ...
brandonw/personal-site
docs/conf.py
Python
bsd-3-clause
7,764
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin/env w...
wdv4758h/ZipPy
lib-python/3/cgi.py
Python
bsd-3-clause
34,511
from django.conf.urls import patterns, url from character import views urlpatterns = patterns('', url(r'^profile/(?P<username>[^/]+)/$', views.profile, name="profile"), url(r'^switch/', views.switch, name="switch"), url(r'^autocomplete/user', views.character_lookup, name="character_lookup"), )
TaliesinSkye/evennia
wintersoasis-master/web/character/urls.py
Python
bsd-3-clause
308
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Moves a C++ file to a new location, updating any include paths that point to it, and re-ordering headers as needed. Updates inc...
zcbenz/cefode-chromium
tools/git/move_source_file.py
Python
bsd-3-clause
5,348
from django.db import migrations import multiselectfield.db.fields class Migration(migrations.Migration): dependencies = [ ('dojo', '0054_dojometa_finding'), ] operations = [ migrations.AlterField( model_name='notifications', name='jira_update', field=...
rackerlabs/django-DefectDojo
dojo/db_migrations/0055_notifications_jira_update_verbose_name.py
Python
bsd-3-clause
669
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.2 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from ...
mmarkov/pygraphviz
pygraphviz/graphviz.py
Python
bsd-3-clause
7,770
from django.test import TestCase, TransactionTestCase from django.contrib.auth.models import Group, User from django.http import HttpRequest, QueryDict from hs_core.hydroshare import resource from hs_core import hydroshare from hs_script_resource.models import ScriptSpecificMetadata, ScriptResource from hs_script_re...
hydroshare/hydroshare
hs_script_resource/tests/test_script_resource.py
Python
bsd-3-clause
7,034
# -*- coding: utf-8 -*- # # metaci documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a ...
SalesforceFoundation/mrbelvedereci
docs/conf.py
Python
bsd-3-clause
7,888
info = { "name": "sw", "date_order": "DMY", "january": [ "jan", "januari" ], "february": [ "feb", "februari" ], "march": [ "mac", "machi" ], "april": [ "apr", "aprili" ], "may": [ "mei" ], "june":...
scrapinghub/dateparser
dateparser/data/date_translation_data/sw.py
Python
bsd-3-clause
4,155
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import json import os import re import unittest from django.contrib.admin import AdminSite, ModelAdmin from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.models import ADDITION, DELETION, LogEntry from...
sarthakmeh03/django
tests/admin_views/tests.py
Python
bsd-3-clause
284,922
import h5py import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from signals.aux_functions import gaussian_bump import nexa.loading as load from visualization.sensors import visualize_SLM_hdf5 from visualization.sensors import visualize_STDM_hdf5 from visualization.sensor_clusteri...
h-mayorquin/time_series_basic
hdf5_loading_three_bumps.py
Python
bsd-3-clause
3,113
import re import ide.utils class Grep (object): def __init__ (self, filepath, needle): self.filepath = filepath self.needle = needle def replace (self, rstr, rlines): fh = open(self.filepath, 'r') newlines = '' linenum = 0 while 1: line = fh.readline() if line: ...
pizzapanther/Neutron-IDE
neutron/ide/grep.py
Python
bsd-3-clause
1,106
# -*- coding: utf-8 -*- """Application configuration.""" import os class Config(object): """Base configuration.""" ENV = 'dev' # Default ENV SECRET_KEY = os.environ.get('FANSUBS_CMS_SECRET', 'secret-key') APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.pa...
dyzajash/fansubs_cms
fansubs_cms/settings.py
Python
bsd-3-clause
1,999
""" A *lock* defines access to a particular subsystem or property of Evennia. For example, the "owner" property can be impmemented as a lock. Or the disability to lift an object or to ban users. A lock consists of three parts: - access_type - this defines what kind of access this lock regulates. This just a stri...
MarsZone/DreamLand
evennia/evennia/locks/lockhandler.py
Python
bsd-3-clause
20,024
from .base import * DEBUG = True INSTALLED_APPS += ( 'debug_toolbar', ) SENDFILE_BACKEND = "sendfile.backends.development" MIDDLEWARE = ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) + MIDDLEWARE # Use default Google test keys and silence error del RECAPTCHA_PUBLIC_KEY del RECAPTCHA_PRIVATE_KEY SIL...
sairon/score-phorum
src/score/settings/debug.py
Python
bsd-3-clause
451
from datetime import datetime from time import sleep from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.conf import settings from dimagi.utils.parsing import string_to_datetime, json_format_datetime from dimagi.utils.couch.cache import cache_core from dimagi.u...
gmimano/commcaretest
hqscripts/generic_queue.py
Python
bsd-3-clause
4,471
# Licensed under a 3-clause BSD style license - see LICENSE.rst from django.contrib import admin # Register your models here.
sot/mica
mica/web/admin.py
Python
bsd-3-clause
127
import math import numpy as np from scipy.optimize import minimize def array(f, numval, numdh): """Создать N-мерный массив. param: f - функция, которая приминает N аргументов. param: numval - диапазоны значений параметров функции. Список param: numdh - шаги для параметров. Список """ ...
Migal/opt_ctrl_lab_1
lab_1/utils.py
Python
bsd-3-clause
13,364
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Linter to verify that all flags reported by GHC's --show-options mode are documented in the user's guide. """ import sys import subprocess from typing import Set from pathlib import Path # A list of known-undocumented flags. This should be considered to be a to-do # ...
sdiehl/ghc
docs/users_guide/compare-flags.py
Python
bsd-3-clause
2,799
# IE 11 CustomEvent polyfill src = r""" (function () { if ( typeof window.CustomEvent === "function" ) return false; //If not IE function CustomEvent ( event, params ) { params = params || { bubbles: false, cancelable: false, detail: undefined }; var evt = document.createEvent( 'CustomEvent' ); evt.in...
r0x0r/pywebview
webview/js/event.py
Python
bsd-3-clause
512
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.postgres.fields import ArrayField from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), migrations.swappable_...
ugoertz/django-familio
comments/migrations/0001_initial.py
Python
bsd-3-clause
1,415
# ============================================================================= # periscope-ps (unis) # # Copyright (c) 2012-2016, Trustees of Indiana University, # All rights reserved. # # This software may be modified and distributed under the terms of the BSD # license. See the COPYING file for details. # # T...
periscope-ps/unis
periscope/handlers/eventshandler.py
Python
bsd-3-clause
6,477
from __future__ import print_function from SimpleCV import * print("") print("This program runs a list of test for machine learning on") print("the SimpleCV library. Not all scores will be high, this") print("is just to ensure that the libraries are functioning correctly") print("on your system") print("") print("****...
tpltnt/SimpleCV
SimpleCV/MachineLearning/MLTestSuite.py
Python
bsd-3-clause
9,967
# -*- coding: utf-8 -*- """Tools for coloring text in ANSI terminals. $Id: ColorANSI.py 2167 2007-03-21 06:57:50Z fperez $""" #***************************************************************************** # Copyright (C) 2002-2006 Fernando Perez. <fperez@colorado.edu> # # Distributed under the terms of the BSD...
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/ipython-0.8.2-py2.5.egg/IPython/ColorANSI.py
Python
bsd-3-clause
6,449
# Generated by Django 2.1.1 on 2018-09-08 20:47 import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('tags', '0001_initial'), ('accounts', '0001_initial'), ] operations = [ ...
ychab/mymoney-server
mymoney/schedulers/migrations/0001_initial.py
Python
bsd-3-clause
3,119
# -*- coding: utf-8 -*- from hangulize import * class Finnish(Language): """For transcribing Finnish.""" __iso639__ = {1: 'fi', 2: 'fin', 3: 'fin'} __tmp__ = ',;%' vowels = 'aAeioOuy' ob = 'bdfgkpstT' notation = Notation([ # Convention: A = ä, O = ö ('å', 'o'), ('ä', ...
Jinwithyoo/han
hangulize/langs/fin/__init__.py
Python
bsd-3-clause
3,370
"""Showcases reflectance recovery computations using *Meng et al. (2015)* method.""" import numpy as np import colour from colour.utilities import message_box message_box('"Meng et al. (2015)" - Reflectance Recovery Computations') illuminant = colour.SDS_ILLUMINANTS["D65"] XYZ = np.array([0.20654008, 0.12197225, 0...
colour-science/colour
colour/examples/recovery/examples_meng2015.py
Python
bsd-3-clause
633
#!/usr/bin/env python # -*- coding: utf-8 -*- thisAlgorithmBecomingSkynetCost = 99999999999 from .source import ectools, wrdslib, static, sas from .source import wrds_loop, get_wrds, find_wrds, setup_wrds_key from .source import user_info
jbrockmendel/pywrds
__init__.py
Python
bsd-3-clause
238
""" Extensible permission system for pybbm """ from django.db.models import Q from pybb import defaults from pybb.models import Topic, PollAnswerUser from pybb.permissions import DefaultPermissionHandler class CustomPermissionHandler(DefaultPermissionHandler): """ Custom Permission handler for PyBB. In...
ugoertz/django-familio
accounts/permissions.py
Python
bsd-3-clause
6,670
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides the web interface for adding and editing sheriff rotations.""" from __future__ import print_function from __future__ import division from __futur...
endlessm/chromium-browser
third_party/catapult/dashboard/dashboard/create_health_report.py
Python
bsd-3-clause
4,168
from django.db import models from django.contrib.contenttypes.fields import GenericRelation from mezzanine.pages.page_processors import processor_for from hs_core.models import BaseResource, ResourceManager, resource_processor,\ CoreMetaData, AbstractMetaDataElement from lxml import etree ...
ResearchSoftwareInstitute/MyHPOM
ref_ts/models.py
Python
bsd-3-clause
6,208
# -*- coding: utf-8 -*- from __future__ import absolute_import import sys import uuid from threading import local from django.conf import settings from django.urls import reverse, clear_url_caches # Py2 and Py3 compatible reload from imp import reload _urlconf_revision = {} _urlconf_revision_threadlocal = local()...
mkoistinen/django-cms
cms/utils/apphook_reload.py
Python
bsd-3-clause
3,112
from django.shortcuts import render_to_response as _render_to_response from django.template import RequestContext def render_to_response(request, *args, **kwargs): kwargs.update({'context_instance': RequestContext(request)}) return _render_to_response(*args, **kwargs)
andriibekker/biddingsbase
main/utils.py
Python
bsd-3-clause
279
from django.conf import settings from django.conf.urls import url import django.views.static from keops.api import site import keops.views.reports urlpatterns = [ url(r'^web/reports/', keops.views.reports.dashboard), url(r'^web/reports/view/', keops.views.reports.report), url(r'^api/reports/choices/', keo...
katrid/keops
keops/report_urls.py
Python
bsd-3-clause
457
from distutils.core import setup from distutils.extension import Extension from distutils import util from Pyrex.Distutils import build_ext import os.path # Hack to get around build_ext's inability to handle multiple # libraries in its --libraries= argument. libs = [] if util.get_platform() == 'win32': libs = [ "wp...
timwu/pypcap
src/setup.py
Python
bsd-3-clause
673
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Script for generating the Android framework's version of Skia from gyp files. """ import android_framework_gyp import os import shutil import sys import tempfile ...
llluiop/skia
platform_tools/android/bin/gyp_to_android.py
Python
bsd-3-clause
6,621
# 24.05.2007, c # last revision: 25.02.2008 from sfepy import data_dir from sfepy.fem.periodic import * filename_mesh = data_dir + '/meshes/2d/special/channels_symm944t.mesh' if filename_mesh.find( 'symm' ): region_1 = { 'name' : 'Y1', 'select' : """elements of group 3""", } region_2 = { ...
olivierverdier/sfepy
examples/navier_stokes/stokes.py
Python
bsd-3-clause
4,109
""" ============================= OOB Errors for Random Forests ============================= The ``RandomForestClassifier`` is trained using *bootstrap aggregation*, where each new tree is fit from a bootstrap sample of the training observations :math:`z_i = (x_i, y_i)`. The *out-of-bag* (OOB) error is the average er...
beepee14/scikit-learn
examples/ensemble/plot_ensemble_oob.py
Python
bsd-3-clause
3,265
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/vm/disk_encryption.py
Python
mit
27,499
from core.tests.test_ga import *
cartwheelweb/packaginator
apps/core/tests/__init__.py
Python
mit
32
#!/usr/bin/env python #fractoe.py from AISuite.game import Game as Game import AISuite.player as player from AISuite.alphabeta import UPPER_BOUND, LOWER_BOUND, shallowest_first import AISuite.recorder as recorder import AISuite.PythonLibraries.prgm_lib as prgm_lib import fractoe_tictactoe as tictactoe Tictactoe = ticta...
blamed-cloud/PythonGames
fractoe.py
Python
mit
10,693
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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 without restriction, including # without limitation the rights to use, copy, ...
iamdankaufman/beets
beets/autotag/__init__.py
Python
mit
9,819
import pygame, logging from random import randint from game import generate_random_level class Target(pygame.sprite.Sprite): def __init__(self, x, y, textures, color=(30,0,150), width=23, height=23): super().__init__() self.width = width self.height = height self.textures = texture...
RealOrangeOne/attack-on-blocks
target.py
Python
mit
3,542
import os, re, requests from bs4 import BeautifulSoup from totalimpact.providers import provider from totalimpact.providers.provider import Provider, ProviderContentMalformedError, ProviderRateLimitError import logging logger = logging.getLogger('ti.providers.linkedin') class Linkedin(Provider): example_id = ...
Impactstory/total-impact-core
totalimpact/providers/linkedin.py
Python
mit
2,365
""" ``revscoring score -h`` :: Scores a set of revisions. Usage: score (-h | --help) score <model-file> <rev_id>... --api=<uri> [--verbose] Options: -h --help Print this documentation <model-file> Path to a model file --api=<url> The url pointing to a Med...
aetilley/revscoring
revscoring/utilities/score.py
Python
mit
1,550
#### 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 = Intangible() result.template = "object/draft_schematic/armor/shared_armor_segment_ubese_advanced.iff" result.attr...
anhstudios/swganh
data/scripts/templates/object/draft_schematic/armor/shared_armor_segment_ubese_advanced.py
Python
mit
463
#!/usr/bin/python # -*- coding: utf-8 -*- # libthumbor - python extension to thumbor # http://github.com/heynemann/libthumbor # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com '''Generic view for create thumbor encrypted url...
gerasim13/libthumbor
libthumbor/django/views.py
Python
mit
2,342
import os import pytest from osmaxx.conversion import status @pytest.mark.django_db() def test_job_statuses_for_jobs(started_conversion_job, failed_conversion_job, finished_conversion_job): assert started_conversion_job.status == status.STARTED assert failed_conversion_job.status == status.FAILED assert...
geometalab/osmaxx
tests/conversion/model_test.py
Python
mit
1,375
# -*- coding: utf-8 -*- from .processor import QueryProcessor class SQLiteQueryProcessor(QueryProcessor): def process_column_listing(self, results): """ Process the results of a column listing query :param results: The query results :type results: dict :return: The proc...
MakarenaLabs/Orator-Google-App-Engine
orator/query/processors/sqlite_processor.py
Python
mit
424
import logging from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.http import Http404 from readthedocs.projects.models import Project, Domain log = logg...
stevepiercy/readthedocs.org
readthedocs/core/middleware.py
Python
mit
8,107
from .parameters import ParameterBasedType from .log import LoggerFactory from .packer import packer from .misc.six import add_metaclass TYPES_DESCRIPTIONS = {'generic' : 'Generic module', 'functions_export': 'Such modules give functions that are useful by evaluation rules', 'connector': 'Suchs ...
naparuba/kunai
opsbro/module.py
Python
mit
3,141
from django.apps import AppConfig class GeoPositionConfig(AppConfig): name = 'geoposition' verbose_name = "GeoPosition"
philippbosch/django-geoposition
geoposition/apps.py
Python
mit
129
import os import datetime os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'invest.settings') import django django.setup() from myportfolio.models import Investor, Portfolio, AssetClass, STOCKS, BONDS,\ ALTERNATIVES, Security, Transaction, Account def populate(): investor1 = add_investor(name='David Lim', ...
choozm/mamakstallinvestor-stockquote
populate_myportfolio.py
Python
mit
6,849
# -*- coding: utf-8 -*- # # def feed_catchup(pool, dbi = None): from lib import DB if dbi is None: _dbi = DB() else: _dbi = dbi if dbi is None: _dbi.disconnect() def dispatch_catchup(self, payload): """處理 responses 中解析失敗的資料""" raise Exception('Not Implemented, yet')
wenh123/news-diff
lib/proc/catchup.py
Python
mit
303
# coding: utf-8 """ basedir.py """ import os basedir = os.path.abspath(os.path.dirname(__file__))
Muxi-Studio/muxi_site
basedir.py
Python
mit
104
import sys from unittest import TestCase import plotly.graph_objs as go if sys.version_info >= (3, 3): from unittest.mock import MagicMock else: from mock import MagicMock class TestRestyleMessage(TestCase): def setUp(self): # Construct with mocked _send_restyle_msg method self.figure = ...
plotly/python-api
packages/python/plotly/plotly/tests/test_core/test_figure_messages/test_plotly_restyle.py
Python
mit
2,977
# Copyright (c) Ralph Meijer. # See LICENSE for details. """ Redis support. This provides a Twisted based publisher to a named list on one or more Redis servers. """ from __future__ import division, absolute_import import random import simplejson from twisted.application import internet, service from twisted.pyth...
mochi/udplog
udplog/redis.py
Python
mit
4,122
""" Django settings for example 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, ...) im...
novapost/django-pimpmytheme
example/example/settings.py
Python
mit
3,921
from rx.core import ObservableBase class AnonymousSubject(ObservableBase): def __init__(self, observer, observable): super(AnonymousSubject, self).__init__() self.observer = observer self.observable = observable def _subscribe_core(self, observer): return self.observable.subs...
Sprytile/Sprytile
rx/subjects/anonymoussubject.py
Python
mit
548
#https://www.youtube.com/watch?v=hqijNdQTBH8 def permute1(lst): if len(lst) == 0: yield [] elif len(lst) == 1: yield lst else: for i in range(len(lst)): x = lst[i] xs = lst[:i]+lst[i+1:] for p in permute1(xs): yield [x] + p def pe...
bkpathak/HackerRank-Problems
collections/strings/permuataion.py
Python
mit
648
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/library_materials/material/extra/technique_sid_target/technique_sid_target.py
Python
mit
4,063
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2015-2019 The Mincoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import Compariso...
xieta/mincoin
qa/rpc-tests/invalidblockrequest.py
Python
mit
4,319
''' pdbparser.py - Yevheniy Chuba - 6/1/2017 Parse local or external (PDB Database) 3D structure files (.pdb, .cif) Usage: parser = PdbParser("2128-1.pdb").pdb_processing() output: [['L', 'DIQ...'], ['H', 'EVQL...']] ''' import os from Bio.PDB import * from Bio.Seq import Seq class PdbParser: '''...
yevheniyc/Projects
1h_NGL_3D_Viewer/pyscripts/pdbmapper/PdbParser.py
Python
mit
2,840
# Copyright (C) 2015 Ariel George # # 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; version 2. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; wit...
ageorge/beets-bandcamp
beetsplug/bandcamp.py
Python
mit
13,653
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # url(r'^account/', include('oauth2_authorization_server.account_urls')), # url(r'^client/', include('oauth2_authorization_server.client_urls')), url(r'^oauth2/', include('oau...
RaduGatej/SensibleData-Platform
sensible_data_platform/oauth2_authorization_server/urls.py
Python
mit
421
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mining RPCs - getmininginfo - getblocktemplate proposal mode - submitblock""" import copy from b...
Jcing95/iop-hd
test/functional/mining.py
Python
mit
5,574
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-02-20 06:42 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependenc...
bobandbetty/assassins
assassins/users/migrations/0001_initial.py
Python
mit
3,152
#### 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 = Static() result.template = "object/static/structure/general/shared_prp_junk_s4.iff" result.attribute_template_id ...
anhstudios/swganh
data/scripts/templates/object/static/structure/general/shared_prp_junk_s4.py
Python
mit
449
import doctest import unittest import typeschema class TestCase(unittest.TestCase): def test_doc(self): fails, tested = doctest.testmod(typeschema.typeschema) if fails > 0: self.fail('Doctest failed!')
ikanor/typeschema
tests/typeschema_test.py
Python
mit
237
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
jkonecki/autorest
AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/models/bar.py
Python
mit
1,021
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_diagnostics_profile.py
Python
mit
1,170
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jun 25 17:30:28 2017 @author: wroscoe """ import numpy as np import random class MovingSquareTelemetry: """ Generator of cordinates of a bouncing moving square for simulations. """ def __init__(self, max_velocity=29, ...
kennethjiang/donkey
donkeycar/parts/simulations.py
Python
mit
2,106
from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4 import QtWebKit from renderers import MessageRenderer from qtx import ClickableQLabel, IdleTimer, RowPushButton, SpellTextEditor class AboutDialog(QtGui.QDialog): def __init__(self, mainFrame): super(AboutDialog, self).__init__(mainFrame) ...
mariano/snakefire
snakefire/dialogs.py
Python
mit
26,264
# imports import sys import math # main function def main(argv): summation = 0 #one ... ninety nine for i in range(1, 100): summation = summation + to_words(i) #854 characers for 1 - 99 #print summation #one hundred and ... one_hundreds = (13*99)+summation+10 two_hundreds = (13*99)+summation+10 three_hundr...
matt-oak/Project_Euler
17_number_letter_counts.py
Python
mit
3,740
import asposecellscloud from asposecellscloud.CellsApi import CellsApi from asposecellscloud.CellsApi import ApiException import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi apiKey = "XXXXX" #sepcify App Key appSid = "XXXXX" #sepcify App SID apiServer = "http://api.aspose.com/v1.1" data_fol...
aspose-cells/Aspose.Cells-for-Cloud
Examples/Python/Examples/GetMergedCellFromWorksheet.py
Python
mit
1,392
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/colin/dev/QCrash/forms/dlg_github_login.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from qcrash.qt import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupU...
ColinDuquesnoy/QCrash
qcrash/_forms/dlg_github_login_ui.py
Python
mit
3,196