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
#!/usr/bin/env python ''' 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 ...
mahak/hbase
hbase-examples/src/main/python/thrift1/demo_hbase_thrift_over_http_tls.py
Python
apache-2.0
2,806
# written by John Gregoire # edited by Allison Schubauer and Daisy Hernandez # 6/26/2013 # first version of figure of merit functions for automated # data processing from intermediatefunctions_firstversion import numpy import intermediatefunctions_firstversion as inter # this dictionary is required to know which fi...
johnmgregoire/2013JCAPDataProcess
fomfunctionversions/development/fomfunctions.py
Python
bsd-3-clause
11,913
from mylib.misc import bind from mylib.math import bind def linear(t): return t def easeIn(t): return 1 - Math.pow(1 - t, 3) def easeOut(t): return t * t * t def easeInOut(t): return 3 * t * t - 2 * t * t * t #<pre>Tween({ # '_duration': 1000, # '_callback': lambda t: console.log(t), # '_e...
andrewschaaf/pyxc-pj
pj-examples/mylib/js/mylib/tweening.py
Python
mit
857
#app tests import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import config import main import unittest import hashlib, hmac import json from webhook_data import webhook_data class BotTestCase(unittest.TestCase): def setUp(self): main.app.config['TESTING'] = True self.a...
jwilson64/Facebook-Bot
tests/test_app.py
Python
mit
1,881
import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS and return alignment. Set MERGED_PAIR to True ...
levinas/assembly
lib/assembly/plugins/bowtie2.py
Python
mit
2,404
# Copyright 2012 Deryck Hodge. This software is licensed under the # GNU Lesser General Public License version 3 (see the file LICENSE). """ Test suite for characters app in dcuolfg. """ import unittest from dcuolfg.characters.tests.characters import TestCharacterModel from dcuolfg.characters.tests.lfg import TestL...
deryckh/dcuolfg
dcuolfg/characters/tests/__init__.py
Python
lgpl-3.0
861
import datetime import decimal from platform import python_version import re import uuid from six import integer_types, string_types, text_type try: from bson import decimal128, Regex _HAVE_PYMONGO = True except ImportError: _HAVE_PYMONGO = False class _NO_VALUE(object): pass # we don't use NOTHIN...
vmalloc/mongomock
tests/diff.py
Python
bsd-3-clause
3,079
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Zstd(MakefilePackage): """Zstandard, or zstd as short version, is a fast lossless compress...
LLNL/spack
var/spack/repos/builtin/packages/zstd/package.py
Python
lgpl-2.1
2,602
# BSD 3-Clause License # # Copyright (c) 2012, the Sentry Team, see AUTHORS for more details # Copyright (c) 2019, Elasticsearch BV # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Red...
beniwohli/apm-agent-python
elasticapm/contrib/zerorpc/__init__.py
Python
bsd-3-clause
3,902
# -*- coding: utf-8 -*- from docpool.base.config import BASE_APP from docpool.base.content.documentpool import APPLICATIONS_KEY from docpool.config import _ from docpool.config.utils import CHILDREN from docpool.config.utils import createPloneObjects from docpool.config.utils import ID from docpool.config.utils import ...
OpenBfS/dokpool-plone
Plone/src/docpool.config/docpool/config/local/base_en.py
Python
gpl-3.0
4,998
import os import unittest from pprint import pprint import click from flexmock import flexmock, flexmock_teardown from Test.testingUtils import restore_test_resources from libs.CompilerUploader import CompilerUploader, CompilerException from libs.LoggingUtils import init_logging from libs.PathsManager import PathsMan...
bq/web2board
src/Test/integration/testCompilerUploader.py
Python
lgpl-3.0
6,463
import chainer.functions as F import chainer.links as L from chainer import Variable from chainer.links import caffe from chainer import computational_graph as c from deel.tensor import * from deel.network import * import chainer.serializers as cs import copy from deel.deel import * import chainer import json import o...
uei/deel
deel/network/rnin.py
Python
mit
2,859
# coding: utf-8 from .generic_hyperlinked_related import GenericHyperlinkedRelatedField from .kpi_uid import KpiUidField from .lazy_default_jsonb import LazyDefaultJSONBField from .paginated_api import PaginatedApiField from .read_only import ReadOnlyJSONField from .relative_prefix_hyperlinked_related import RelativePr...
onaio/kpi
kpi/fields/__init__.py
Python
agpl-3.0
456
# -*- coding: utf-8 -*- import sys import inspect import pprint, contextlib import re import types from collections import defaultdict, OrderedDict, Counter from itertools import chain, zip_longest from math import ceil from io import StringIO from datetime import datetime class MultiValueDict(object): pass ...
mulderns/djangodbu
djangodbu/shell.py
Python
mit
54,105
from pylab import * # ===== 6th order polynom of time which fit position, velocty, and acceleration and end points def poly6Coefs(p0,v0,a0, p1,v1,a1): As = zeros(6) As[0] = p0 As[1] = v0 As[2] = ...
ProkopHapala/SimpleSimulationEngine
python/pySimE/space/exp/OrbitalTransferOpt/Poly6th_numeric.py
Python
mit
5,462
# -*- coding: utf-8 -*- """ Created on Mon Dec 30 02:37:25 2013 @author: roel """ import unittest import pandas as pd import opengrid as og from opengrid import datasets from opengrid.library.exceptions import EmptyDataFrameError class AnalysisTest(unittest.TestCase): def test_standby(self): df = data...
kdebrab/opengrid
opengrid/tests/test_analyses.py
Python
apache-2.0
785
######################################################################## # File name: __init__.py # This file is part of: aioxmpp # # LICENSE # # This program 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 Foundat...
horazont/aioxmpp
aioxmpp/benchtest/__init__.py
Python
lgpl-3.0
8,484
## # @file __init__.py # @author Yibo Lin # @date Aug 2018 #
limbo018/DREAMPlace
dreamplace/ops/place_io/__init__.py
Python
bsd-3-clause
65
""" DIRAC return dictionary Message values are converted to string keys are converted to string """ import types import traceback from DIRAC.Core.Utilities.DErrno import strerror def S_ERROR(*args): """ return value on error condition Arguments are either Errno and ErrorMessage or just ErrorMessage f...
andresailer/DIRAC
Core/Utilities/ReturnValues.py
Python
gpl-3.0
4,282
from distutils.core import setup from distutils.command.install_data import install_data from distutils.command.install import INSTALL_SCHEMES import os import sys class osx_install_data(install_data): # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../ # which is wrong. Python 2...
riklaunim/django-custom-multisite
setup.py
Python
bsd-3-clause
4,043
# Shader utility code # Written by Hugh Fisher, CECS ANU, 2011 # Distributed under MIT/X11 license: see file COPYING from __future__ import division, print_function import OpenGL from OpenGL import GL from OpenGL.GL import * _currentProgram = 0 def init(): """Just test that we have GLSL""" ...
apertus-open-source-cinema/stereo_cam_check
gpu.py
Python
mit
3,008
# solving first start first = True # puzzle input # disc is represented by tuple (number of positions, starting position) discs = [(7, 0), (13, 0), (3, 2), (5, 2), (17, 0), (19, 7)] if not first: discs.append((11, 0)) start = 0 while True: time = start success = True for disc in discs: time +...
matejm/advent-of-code-2016
day15.py
Python
mit
501
import multiprocessing,os def worker(val): return "worker {} PID {}".format(val,os.getpid()) if __name__=="__main__": pool = multiprocessing.Pool(processes=4) result = pool.map(worker,range(0,16)) print(result)
explorerwjy/jw_anly502
L01/demo_multiprocessing.py
Python
cc0-1.0
235
from nose.tools import assert_raises from syn.base_utils import split, join, dictify_strings #------------------------------------------------------------------------------- # String def test_split(): assert split('a b\tc') == ['a', 'b', 'c'] assert split('a,b,c') == ['a,b,c'] assert split('a,b,c', sep='...
mbodenhamer/syn
syn/base_utils/tests/test_filters.py
Python
mit
1,367
# # The Python Imaging Library. # $Id$ # # Binary input/output support routines. # # Copyright (c) 1997-2003 by Secret Labs AB # Copyright (c) 1995-2003 by Fredrik Lundh # Copyright (c) 2012 by Brian Crowell # # See the README file for information on usage and redistribution. # from struct import unpack, pack if byte...
Microvellum/Fluid-Designer
win64-vc/2.78/Python/lib/site-packages/PIL/_binary.py
Python
gpl-3.0
1,855
from __future__ import absolute_import from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase class ReactivateAccountTest(TestCase): @fixture def path(self): return reverse('sentry-reactivate-account') def test_renders(self): user = s...
zenefits/sentry
tests/sentry/web/frontend/test_reactivate_account.py
Python
bsd-3-clause
796
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
jayceyxc/hue
apps/filebrowser/src/filebrowser/lib/archives.py
Python
apache-2.0
7,361
# -*- coding: UTF-8 -*- # Copyright 2014 Luc Saffre # License: BSD (see file COPYING for details) from __future__ import unicode_literals from lino.projects.std.settings import * from django.utils.translation import ugettext_lazy as _ class Site(Site): verbose_name = "Lino EstRef" description = _("Estonia...
khchine5/book
lino_book/projects/estref/settings/__init__.py
Python
bsd-2-clause
791
""" Bing (News) @website https://www.bing.com/news @provide-api yes (http://datamarket.azure.com/dataset/bing/search), max. 5000 query/month @using-api no (because of query limit) @results RSS (using search portal) @stable yes (except perhaps for the images) @parse url, title...
asciimoo/searx
searx/engines/bing_news.py
Python
agpl-3.0
4,164
import pdb import math from pandac.PandaModules import * from direct.showbase.DirectObject import DirectObject from direct.showbase.InputStateGlobal import inputState """ This is a convenient way of handling the most tedious and powerful part of ODE To come up with other bitmasks, you can use the constraint solver i...
dasmith/IsisWorld
src/physics/ode/odeWorldManager.py
Python
gpl-3.0
44,929
# # Copyright 2017 Luma Pictures # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Tradem...
pxmkuruc/usd-qt
usdlib/utils.py
Python
apache-2.0
1,398
from rest_framework.templatetags.rest_framework import replace_query_param from premises.utils import int_or_default class MongoDBPaginationMixin(object): """ Query parameters: :param page (integer) :param limit (integer) For example: http://arguman.org/api/v1/newsfeed/public/?page=1 http...
omeripek/arguman.org
web/api/v1/newsfeed/mixins.py
Python
mit
1,499
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('visit', '0073_visit_student_absent_reason'), ] operations = [ migrations.AlterField( model_name='visit', ...
koebbe/homeworks
visit/migrations/0074_auto_20150826_2122.py
Python
mit
670
# Copyright (c) 2010, 2011 Andrey Golovizin # # 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, modify, merge, pub...
rybesh/pybtex
pybtex/style/names/lastfirst.py
Python
mit
2,374
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ['--strict', '--verbose', '--tb=long'] self.test_suite = True def run_tests(self): ...
jhandley/pyvcproj
setup.py
Python
unlicense
758
# -*- coding: UTF-8 -*- from __future__ import absolute_import __kupfer_name__ = _("Twitter") __kupfer_sources__ = ("FriendsSource", "TimelineSource") __kupfer_actions__ = ("PostUpdate", "SendDirectMessage", 'SendAsDirectMessageToFriend' ) __description__ = _("Microblogging with Twitter: send updates and show friends...
cjparsons74/kupfer
kupfer/plugin/twitter/__init__.py
Python
gpl-3.0
9,667
#!/usr/bin/env python3 # 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. """Runs resource_sizes.py on two apks and outputs the diff.""" from __future__ import print_function import argparse import json imp...
ric2b/Vivaldi-browser
chromium/build/android/diff_resource_sizes.py
Python
bsd-3-clause
8,260
import time from binascii import unhexlify from random import choice, randint, uniform from tribler_core.modules.metadata_store.serialization import REGULAR_TORRENT from tribler_core.utilities.unicode import hexlify from tribler_gui.tests.fake_tribler_api.constants import COMMITTED from tribler_gui.tests.fake_tribler...
hbiyik/tribler
src/tribler-gui/tribler_gui/tests/fake_tribler_api/models/torrent.py
Python
lgpl-3.0
2,618
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-04 17:49 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def cleanup_all_ships(apps, schema_editor): Texture = apps.get_model('api', 'Texture') Ship = apps.get_model('api', 'Ship'...
c-goldschmidt/FLShipMatrix
backend/api/migrations/0005_auto_20171004_1749.py
Python
unlicense
1,535
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Name : busquery.py import os import sqlite3 import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup # The sqlite database is not located in this folder or any subfolder # So we need to manually construct the full path to the db # https://stacko...
Oxmel/busomatic
src/busquery.py
Python
gpl-3.0
1,710
import traceback import sys from gribapi import * from datetime import date INPUT='../../data/regular_latlon_surface_constant.grib1' OUTPUT='out.grib' VERBOSE=1 # verbose error reporting def example(): fin = open(INPUT) fout = open(OUTPUT,'w') gid = grib_new_from_file(fin) dt = date.today() tod...
MengbinZhu/pfldp
ropp-7.0/grib_api-1.9.9/examples/python/set.py
Python
gpl-3.0
1,016
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
vlegoff/tsunami
src/primaires/format/commandes/flottantes/liste.py
Python
bsd-3-clause
2,631
from ray.tests.conftest import * # noqa import pytest from ray import workflow from ray.workflow.common import WorkflowRef @workflow.step def incr(x): return x + 1 def test_dynamic_workflow_ref(workflow_start_regular_shared): # This test also shows different "style" of running workflows. first_step = ...
ray-project/ray
python/ray/workflow/tests/test_dynamic_workflow_ref.py
Python
apache-2.0
781
#!/usr/bin/env python2 from eagle import * def callback(app, entry, value): print app, entry, value App(title="Slider test", left=Slider(id="hslider", label="Slider:", value_pos=Slider.POS_NONE, horizontal=True, min=0, max=10, ca...
ramalho/eagle-py
tests/slider.py
Python
lgpl-2.1
611
# -*- coding: utf-8 -*- """Python has a very powerful mapping type at its core: the :class:`dict` type. While versatile and featureful, the :class:`dict` prioritizes simplicity and performance. As a result, it does not retain the order of item insertion [1]_, nor does it store multiple values per key. It is a fast, uno...
neuropil/boltons
boltons/dictutils.py
Python
bsd-3-clause
24,228
import getopt, sys import uno from unohelper import Base, systemPathToFileUrl, absolutize from os import getcwd from os.path import splitext from com.sun.star.beans import PropertyValue from com.sun.star.uno import Exception as UnoException from com.sun.star.io import IOException, XOutputStream class OutputStream( Ba...
lsaffre/timtools
timtools/scripts/ooextract.py
Python
bsd-2-clause
5,407
from __future__ import unicode_literals import itertools from metadata import (MetaData, alias, name_join, fk_join, join, schema, table, function, wildcard_expansion, column, get_result, result_set, qual, no_qual, parametrize) metadata = { 'tables': { 'public': { 'users': ['id', 'email'...
koljonen/pgcli
tests/test_smart_completion_multiple_schemata.py
Python
bsd-3-clause
21,639
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import...
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/requests/models.py
Python
mit
25,332
import json from oslo_log import log as logging LOG = logging.getLogger(__name__) class NvmfTgt(object): def __init__(self, py): super(NvmfTgt, self).__init__() self.py = py def get_rpc_methods(self): rpc_methods = self._get_json_objs( 'get_rpc_methods', '10.0.2.15') ...
openstack/nomad
cyborg/accelerator/drivers/spdk/util/pyspdk/nvmf_client.py
Python
apache-2.0
3,504
"""Utilities for standardizing names of Bible books.""" import os import sys from collections import defaultdict LOOKUP = None NUMBER_LOOKUP = None KNOWNBOOKS = set() def load_table(): global LOOKUP here = os.path.dirname(os.path.realpath(__file__)) fn = here + os.path.sep + "booknames.txt" LOOKUP =...
alexrudnick/terere
bibletools/booknames.py
Python
gpl-3.0
1,155
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import linear_weighted_moving_average class TestLinearWeightedMovingAverage(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.data = SampleDat...
kylejusticemagnuson/pyti
tests/test_linear_weighted_moving_average.py
Python
mit
9,719
"""A helper utility to automatically create a database for the DLI App Author: Logan Gore This file is responsible for (at the bare minimum) creating the database and all associated tables for the DLI App. It will import all appropriate models and ensure that a table for each model exists. If given the command-line op...
gorel/dli-reports
create_db.py
Python
mit
37,018
#!/usr/bin/env python import csv from core import JAWSOutput class CSVOutput(JAWSOutput): ''' CSVOutput is a basic output class that outputs all data given (with a field whose name is in the schema) to a csv file using Python's built-in csv.DictWriter class. The dialect can be specified on initializati...
iccelou91/JAWS
jaws/outputs.py
Python
gpl-3.0
1,826
#!/usr/bin/kivy ''' Showcase of Kivy Features ========================= This showcases many features of Kivy. You should see a menu bar across the top with a demonstration area below. The first demonstration is the accordion layout. You can see, but not edit, the kv language code for any screen by pressing the bug or ...
denys-duchier/kivy
examples/demo/showcase/main.py
Python
mit
8,204
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import psycopg2 import time from datetime import datetime import uuid import sets from functools import partial import openerp import openerp.addons.decimal_precision as dp from openerp import tools, mod...
hieukypc/ERP
openerp/addons/point_of_sale/point_of_sale.py
Python
gpl-3.0
84,624
import binascii from qtwrapper import QtGui, QtCore, QtWidgets, Qt class DisAsmModel(QtCore.QAbstractTableModel): def __init__(self, debugger): super().__init__() self.debugger = debugger self.debugger.stopped.connect(self.on_stopped) self.instructions = [] self.headers = [...
windelbouwman/ppci-mirror
tools/dbgui/disasm.py
Python
bsd-2-clause
1,723
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
DavidAndreev/indico
indico/modules/events/registration/controllers/display.py
Python
gpl-3.0
15,483
#!/usr/bin/env python """ An implementation of a KMD Comms Protocol master. Spec: http://www.cs.manchester.ac.uk/resources/software/komodo/comms.html """ from exceptions import * from util.num_utils import * class BackEnd(object): # Commands NOP = 0x00 PING = 0x01 GET_BOA...
UoMCS/Perentie
back_end/base.py
Python
gpl-3.0
17,354
# -*- coding: utf-8 -*- #!/usr/bin/env python # This example shows how to use Python to access the LTP API to perform full # stack Chinese text analysis including word segmentation, POS tagging, dep- # endency parsing, name entity recognization and semantic role labeling and # get the result in specified format. impo...
cheesezhe/Hybrid-HMM
PyLTP.py
Python
apache-2.0
1,424
from django.db import models from django.contrib.auth.models import User class UserProfile(models.Model): user = models.OneToOneField(User) nickname = models.CharField(max_length=32, blank=True, null=True) phone_number = models.CharField(max_length=15, blank=True, null=True) def __unicode__(self): ...
peasnrice/pamplemousse
userprofile/models.py
Python
mit
1,086
#!/usr/bin/env python3 import sys # import osgeo.utils.gdal2xyz as a convenience to use as a script from osgeo.utils.gdal2xyz import * # noqa from osgeo.utils.gdal2xyz import main from osgeo.gdal import deprecation_warn deprecation_warn('gdal2xyz', 'utils') sys.exit(main(sys.argv))
grueni75/GeoDiscoverer
Source/Platform/Target/Android/core/src/main/jni/gdal-3.2.1/swig/python/scripts/gdal2xyz.py
Python
gpl-3.0
287
# Copyright 2016 Pinterest, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
yujunglo/teletraan
deploy-board/deploy_board/webapp/cluster_view.py
Python
apache-2.0
23,145
""" The permissions classes in this module define the specific permissions that govern access to the models in the auth app. """ from django.contrib.auth.models import AnonymousUser from ..constants.collection_kinds import ADHOCLEARNERSGROUP from ..constants.collection_kinds import FACILITY from ..constants.collection...
mrpau/kolibri
kolibri/core/auth/permissions/auth.py
Python
mit
6,869
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 # Author(s): # Panu Lahtinen <panu.lahtinen@fmi.fi> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the...
pnuu/halostack
setup.py
Python
gpl-3.0
1,691
from __future__ import unicode_literals import time from logging import getLogger from django.contrib.auth.models import User from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.urls import reverse from dynamic_raw_id.tests.testapp.models import ( CharPrimaryKeyModel, DirectPr...
lincolnloop/django-salmonella
dynamic_raw_id/tests/test_selenium.py
Python
mit
9,710
#!/Users/wuga/Documents/website/wuga/env/bin/python2.7 from __future__ import print_function import base64 import os import sys if __name__ == "__main__": # create font data chunk for embedding font = "Tests/images/courB08" print(" f._load_pilfont_data(") print(" # %s" % os.path.basename(fon...
wuga214/Django-Wuga
env/bin/createfontdatachunk.py
Python
apache-2.0
578
# Expose a nice namespace from malcolm.core import submodule_all from .httpservercomms import HTTPServerComms from .websocketclientcomms import WebsocketClientComms __all__ = submodule_all(globals())
dls-controls/pymalcolm
malcolm/modules/web/controllers/__init__.py
Python
apache-2.0
202
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('polls', '0008_auto_20150326_0354'), ] operations = [ migrations.CreateModel( name='...
mnithya/cs3240-s15-team06-test
polls/migrations/0009_auto_20150401_1647.py
Python
mit
1,112
from rest_framework import views from rest_framework.response import Response from haystack.query import SearchQuerySet from .models import Song class SearchSongs(views.APIView): """ View to search for charts. """ def post(self, request): search_term = request.POST.get('search_term') ...
gitaarik/jazzchords
apps/songs/views_api.py
Python
gpl-3.0
652
"""HWB color class."""
facelessuser/sublime-markdown-popups
st3/mdpopups/coloraide/spaces/hwb/__init__.py
Python
mit
23
from setuptools import setup setup(name='wealthengine_python_sdk', version='0.1', description='A Python SDK for WealthEngine\'s Public API', url='https://github.com/zackproser/wealthengine-python-sdk', author='Zack Proser', author_email='zackproser@gmail.com', license='MIT', packages='weal...
zackproser/WealthEngine-Python-SDK
wealthengine_python_sdk/setup.py
Python
mit
361
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # Copyright (C) 2021 TU Wien. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio module that provides OAuth web authoriz...
inveniosoftware/invenio-oauthclient
setup.py
Python
mit
4,688
# -*- coding: utf-8 -*- from urlparse import urlparse from openerp import models, fields, api class LinkTracker(models.Model): """link_tracker allow users to wrap any URL into a short and trackable URL. link_tracker counts clicks on each tracked link. This module is also used by mass_mailing, where each li...
houssine78/addons
link_tracker_outside_odoo/models/link_tracker.py
Python
agpl-3.0
1,202
### File Dependency Tree ### DEPENDENCY_TREE = { 'src/indexbuffer.h': [ ], 'src/renderable/../indexbuffer.h': [ ], 'src/renderer/../renderable/../math/vec2.h': [ "src/renderer/../renderable/../math/vec3.h", ], 'src/shader.cpp': [ "src/shader.h", ], 'src/renderable/../math/maths.h': [ "src/renderable/../...
fisty256/Yoko
dep_tree.py
Python
gpl-3.0
5,066
""" :codeauthor: Nicole Thomas <nicole@saltstack.com> :codeauthor: Alexandru Bleotu <alexandru.bleotu@morganstanley.com> Tests for functions in salt.modules.vsphere """ import salt.modules.vsphere as vsphere import salt.utils.args import salt.utils.vmware from salt.exceptions import ( ArgumentValueErr...
saltstack/salt
tests/unit/modules/test_vsphere.py
Python
apache-2.0
138,391
import json import csv import pandas as pd cred = pd.read_csv('credible.csv') noncred = pd.read_csv('noncredible.csv') noncred.reset_index(level=0, inplace=True) cred.columns = ['site','type'] noncred.columns = ['site', 'lang', 'type','notes', 'tmp'] cred['clean_site'] = cred['site'].apply(lambda x: x.split('.')[0].lo...
aldengolab/fake-news-detection
data_cleaning/get_articles.py
Python
mit
1,318
from __future__ import absolute_import from nlpaug.model.word_rule.word_rule import * from nlpaug.model.word_rule.shuffle import *
makcedward/nlpaug
nlpaug/model/word_rule/__init__.py
Python
mit
130
#!/usr/bin/env python #!-*- coding: utf-8 -*- """ K-Nearest Neighbour classifier The most naive and intuitive classifier is the nearest neighbour classifier. k-nearest neighbour classifier is the one that assigns a point x to the most frequent class of its k closest neighbor in the feature space. """ from collecti...
irshadbhat/k_NN_classifier
k_neighbors.py
Python
mit
2,152
class Solution: def containVirus(self, grid: List[List[int]]) -> int: current_set_number = 1 grid_set = [[0 for i in range(len(grid[0]))] for j in range(len(grid))] set_grid = {} threaten = {} def getAdjacentCellsSet(row, col) -> List[int]: answer = [] ...
jianjunz/online-judge-solutions
leetcode/0750-contain-virus.py
Python
mit
5,673
""" Python Character Mapping Codec generated from 'CP1252.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(i...
kidmaple/CoolWall
user/python/Lib/encodings/cp1252.py
Python
gpl-2.0
2,136
# This file is part of Spacetime. # # Copyright 2010-2014 Leiden University. # Written by Sander Roobol. # # Spacetime 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 ...
Onderwaater/spacetime
lib/spacetime/__init__.py
Python
gpl-2.0
788
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ParameterName.max_length' db.add_column('smra_portal_parametername', 'max_length', self.gf...
eresearchrmit/mavrec
smra/smra_portal/migrations/0029_auto__add_field_parametername_max_length.py
Python
bsd-3-clause
12,454
import subprocess class CmdArgument(object): _PREFIX = None _KEY = None def __init__(self, value): self._value = value @property def value(self): return self._value @property def prefix(self): return self._PREFIX @property def key(self): return s...
oopsno/arena
src/arena/cmd.py
Python
bsd-3-clause
1,864
# -*- coding: utf-8 -*- # # 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 ...
forevernull/incubator-airflow
tests/dags/test_issue_1225.py
Python
apache-2.0
4,066
# -*- coding: utf8 -*- __all__ = ('GithubHook',) import re import json import requests import flask_wtf as wtf from functools import wraps from wtforms.fields import SelectMultipleField from notifico.services.hooks import HookService COMMIT_MESSAGE_LENGTH_LIMIT = 1000 def simplify_payload(payload): """ M...
notifico/notifico
notifico/services/hooks/github.py
Python
mit
33,560
from django.urls import reverse from rest_framework import status from dcim.models import Region, Site from ipam.models import VLAN from utilities.testing import APITestCase class WritableNestedSerializerTest(APITestCase): """ Test the operation of WritableNestedSerializer using VLANSerializer as our test su...
lampwins/netbox
netbox/utilities/tests/test_api.py
Python
apache-2.0
3,763
#!/usr/bin/env python #!-*- encoding:utf-8 -*- def index(): redirect(URL(c='usuario', f='inicio', args=request.args, vars=request.vars)) @auth.requires_login() def inicio(): user = auth.user # Fields grid ticket fields = [Ticket.asunto, Ticket.turno_respuesta, Ticket.departamento] # Le mostramos...
emmanuel86/plataforma
controllers/usuario.py
Python
gpl-2.0
2,105
# -*- coding: utf-8 -*- """The TAR file system implementation.""" import os import tarfile from dfvfs.lib import definitions from dfvfs.lib import errors from dfvfs.path import tar_path_spec from dfvfs.resolver import resolver from dfvfs.vfs import file_system from dfvfs.vfs import tar_file_entry class TARFileSyste...
joachimmetz/dfvfs
dfvfs/vfs/tar_file_system.py
Python
apache-2.0
5,180
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging import os from datetime import datetime try: from subvertpy import ra, SubversionException, __version__ from subvertpy.client import Client as SVNClient, api_version, get_config has_svn_backend = (__version__ ...
sgallagher/reviewboard
reviewboard/scmtools/svn/subvertpy.py
Python
mit
10,969
#!/usr/bin/env python # This file is part of tcollector. # Copyright (C) 2015 The tcollector Authors. # # This program 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 3 of the License, o...
OpenTSDB/tcollector
collectors/etc/elasticsearch_conf.py
Python
lgpl-3.0
919
# -*- coding: utf-8 -*- import cv2 import time from detection import Detector from learning import LearningComponent from structure import Position def get_samples(folder, pos_list_filename, samples_subfolder, max_count): result = [] pos_filenames = folder + pos_list_filename with open(pos_filenames) as ...
SAVeselovskiy/KFU_Visual_Tracking
Tracking/test_detector.py
Python
mit
3,238
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
kaffeel/oppia
extensions/rich_text_components/Image/Image.py
Python
apache-2.0
2,465
""" Usage: find [options] <cache_file> Options: --no-test Use this option to test before iterate files [default: False] --suffix <str> Support Unix shell-style wildcards -o <file> output file -n <int> print top n files. [default: 10] --max_worker...
yfpeng/dcache
dcache/find.py
Python
bsd-3-clause
4,373
# User Instructions: # # Modify the the search function so that it becomes # an A* search algorithm as defined in the previous # lectures. # # Your function should return the expanded grid # which shows, for each element, the count when # it was expanded or -1 if the element was never expanded. # # If there is no path...
Deborah-Digges/SDC-ND-term-3
p1-path-planning/class-quizzes/a_star.py
Python
apache-2.0
5,542
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RDiversitree(RPackage): """Contains a number of comparative 'phylogenetic' methods. ...
rspavel/spack
var/spack/repos/builtin/packages/r-diversitree/package.py
Python
lgpl-2.1
1,513
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
Havate/havate-openstack
proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/project/access_and_security/urls.py
Python
apache-2.0
1,883
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
browseinfo/mainland_addons_v7
project_fabrication/__openerp__.py
Python
agpl-3.0
1,678
#!/usr/bin/python # # Copyright (c) 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 # notice, this list of c...
davidregal/home-bin
Quick Search Box.app/Contents/Frameworks/Vermilion.framework/Versions/A/Resources/Vermilion.py
Python
gpl-2.0
2,699
""" @name: Modules/CXore/Drivers/USB/usb_open.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2011-2020 by D. Brian Kimmel @license: MIT License @note: Created on Mar 27, 2011 @summary: This module is for communicating with USB devices. This will interface various PyHo...
DBrianKimmel/PyHouse
Project/src/Modules/Core/Drivers/Usb/Usb_open.py
Python
mit
6,996
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ TEST FILE 6 """ from zope.interface import implements, Interface, Attribute from twisted.python.reflect import namedAny from twisted.python import components from twisted.internet import defer from twisted.persisted import sob from...
arkon/Markus
db/data/test-files-in-inner-dirs/6.py
Python
mit
11,096