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 -*- from grapheme.finder import GraphemeIterator, get_last_certain_break_index UNICODE_VERSION = "13.0.0" def graphemes(string): """ Returns an iterator of all graphemes of given string. >>> rainbow_flag = "๐Ÿณ๏ธโ€๐ŸŒˆ" >>> [codepoint for codepoint in rainbow_flag] ['๐Ÿณ', '๏ธ', '\...
alvinlindstam/grapheme
grapheme/api.py
Python
mit
6,800
from .pyaria2 import *
alfateam123/pyaria2
pyaria2/__init__.py
Python
mit
22
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@corp.netease.com/xiaket@gmail.com> Filename: goodreads.py Date created: 2016-03-25 21:09 Last modified: 2016-03-31 23:53 Modified by: Xia Kai <xiaket@corp.netease.com/xiaket@gmail.com> Description: it is required to install douban-clie...
xiaket/muses
book/metaproviders/goodreads.py
Python
mit
1,667
# ICE Revision: $Id$ """Working with a solution directory""" from PyFoam.Basics.Utilities import Utilities from PyFoam.Basics.BasicFile import BasicFile from PyFoam.Error import warning,error from PyFoam import configuration as conf from PyFoam.RunDictionary.TimeDirectory import TimeDirectory from PyFoam.RunDictiona...
mortbauer/openfoam-extend-Breeder-other-scripting-PyFoam
PyFoam/RunDictionary/SolutionDirectory.py
Python
gpl-2.0
42,501
# region gplv3preamble # The Medical Simulation Markup Language (MSML) - Simplifying the biomechanical modeling workflow # # MSML has been developed in the framework of 'SFB TRR 125 Cognition-Guided Surgery' # # If you use this software in academic work, please cite the paper: # S. Suwelack, M. Stoll, S. Schalck, N.Sch...
CognitionGuidedSurgery/msml
examples/BunnyExample/bunny.py
Python
gpl-3.0
2,784
# -*- coding: utf-8 -*- import re from openerp import models, fields, api, _ from openerp import SUPERUSER_ID from openerp.addons.website.models.website import slug class event(models.Model): _name = 'event.event' _inherit = ['event.event', 'website.seo.metadata', 'website.published.mixin'] twitter_has...
minhphung171093/GreenERP_V9
openerp/addons/website_event/models/event.py
Python
gpl-3.0
4,326
# Copyright (C) 2002-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
hcs/mailman
src/mailman/commands/eml_echo.py
Python
gpl-3.0
1,472
"""Structures for Layer Geometry File""" import sys import os import numpy as np from gm_base.json_data import JsonData, IntEnum, ClassFactory import gm_base.geometry_files.layers_io as lfc class LayerType(IntEnum): """Layer type""" stratum = 0 fracture = 1 shadow = 2 class TopologyType(IntEnum):...
GeoMop/GeoMop
src/gm_base/geometry_files/format_0_5_0.py
Python
gpl-3.0
13,053
from dvc.prompt import confirm def test_confirm_in_tty_if_stdin_is_closed(mocker): mock_input = mocker.patch("dvc.prompt.input", side_effect=EOFError) mock_isatty = mocker.patch("sys.stdout.isatty", return_value=True) ret = confirm("message") mock_isatty.assert_called() mock_input.assert_called() ...
dmpetrov/dataversioncontrol
tests/unit/test_prompt.py
Python
apache-2.0
339
#!/usr/bin/env python3 # under construction # starting with ttt2.py, implement geodesic-y environment # for the 9-cell board, so 3 cells on each side and 3 in middle import numpy as np class TransposType: LOWER = 0; EXACT = 1; UPPER = 2; class Transpos: type = None depth = None value = None def _...
ryanbhayward/games-puzzles-algorithms
simple/ygeo/geo.py
Python
mit
8,699
import re from ..generic import ToStrMixin, toint from ..parse_cp import VERSIONS_RE_P, EbuildRevMixin from ..validators import NAME_RE from datetime import datetime, date, MINYEAR import calendar from difflib import get_close_matches DATE_FORMAT = '%d %b %Y' CHANGELOG_DATE_RE_P = r"(?P<date>(?P<day>\d\d) " \ ...
bacher09/gpackages-metadata
packages_metadata/generic_metadata/changelog_parse.py
Python
gpl-2.0
5,144
""" WSGI config for openmoldb project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`...
samoturk/openmolDB
openmoldb/wsgi.py
Python
bsd-3-clause
1,140
#!/usr/bin/env python """This is the GRR class registry. A central place responsible for registring plugins. Any class can have plugins if it defines __metaclass__ = MetaclassRegistry. Any derived class from this baseclass will have the member classes as a dict containing class name by key and class as value. """ #...
MiniSEC/GRR_clone
lib/registry.py
Python
apache-2.0
5,555
# -*- coding: utf-8 -*- # # Offensive Web Testing Framework documentation build configuration file, created by # sphinx-quickstart on Thu Sep 11 19:54:14 2014. # # 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 # a...
DarKnight24/owtf
docs/conf.py
Python
bsd-3-clause
8,646
# -*- encoding: utf-8 -*- """ Model builder. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals # noinspection PyUnresolvedReferences from h2o.utils.compatibility import * # NOQA import h2...
h2oai/h2o-3
h2o-py/h2o/model/model_builder.py
Python
apache-2.0
3,656
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models # Safe User import for Django < 1.5 try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models import User else: User = get_user_mo...
theonion/django-bulbs
bulbs/content/south_migrations/0006_auto__add_obfuscatedurlinfo.py
Python
mit
7,651
from __future__ import print_function import sys import ConfigParser import boto.exception import boto.s3.connection import bunch import itertools import os import random import string from httplib import HTTPConnection, HTTPSConnection from urlparse import urlparse from .utils import region_sync_meta s3 = bunch.Bunc...
CatKang/zeppelin-gateway
tests/s3tests/functional/__init__.py
Python
apache-2.0
15,835
# Copyright 2014 IBM Corp. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
sajuptpm/neutron-ipam
neutron/tests/unit/ibm/test_sdnve_plugin.py
Python
apache-2.0
3,688
# -*- coding: utf-8 -*- from functools import update_wrapper from cms.utils.urlutils import admin_reverse from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.admin import csrf_protect_m from django.contrib.admin import ModelAdmin from django.contrib import admin from cms.models import ...
amaozhao/basecms
cms/admin/settingsadmin.py
Python
mit
2,677
#!/usr/bin/env python # Copyright 2013 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. import json import unittest from compiled_file_system import CompiledFileSystem from manifest_data_source import ManifestDataSource fr...
XXMrHyde/android_external_chromium_org
chrome/common/extensions/docs/server2/manifest_data_source_test.py
Python
bsd-3-clause
2,819
def extractSteampunktrainBlogspotCom(item): ''' Parser for 'steampunktrain.blogspot.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'), ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractSteampunktrainBlogspotCom.py
Python
bsd-3-clause
566
#!/usr/bin/python import sys import re from pdfminer.pdfinterp import PDFResourceManager from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from cStringIO import StringIO from pdfminer.pdfpage import PDFPage from pdfminer.pdfinterp import PDFPageInterpreter from boringWords import borin...
acadien/pdfAnalyse
pdfBagOfWords.py
Python
apache-2.0
2,771
#rally.py #Copyright (C) 2011 Russell Cohen <rcoh@mit.edu> # # This file is part of Rally. # # Rally 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 ...
rcoh/Rally
rally.py
Python
gpl-3.0
6,863
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modif...
silvau/Addons_Odoo
auto_backup/backup_scheduler.py
Python
gpl-2.0
14,426
import mock from nose.tools import * # noqa from faker import Factory fake = Factory.create() import uuid from scripts.s3 import migrate_to_external_accounts as migration from framework.mongo import database from tests.base import OsfTestCase from tests.factories import ProjectFactory, UserFactory from website.mo...
mluo613/osf.io
scripts/tests/test_s3_migrate_to_external_accounts.py
Python
apache-2.0
7,860
#!/usr/bin/env python # Written by John Hoffman from time import strftime from zlib import compress from binascii import b2a_base64 from traceback import print_exc import sys from os.path import join from BitTornado import version icons = [ 'icon_bt.ico', 'icon_done.ico', 'black.ico', 'blue.ico', 'green.ico...
tumdum/bittornado
bt_MakeCreateIcons.py
Python
mit
2,222
########################################################################### # # Copyright 2020 Google LLC # # 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/l...
google/starthinker
starthinker/util/regexp.py
Python
apache-2.0
1,806
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _, throw, msgprint from frappe.utils import cstr, nowdate from frappe.model.document import Document class ...
gangadharkadam/v5_erp
erpnext/setup/doctype/sms_settings/sms_settings.py
Python
agpl-3.0
3,549
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import urlize from django.test import SimpleTestCase from django.utils import six from django.utils.functional import lazy from django.utils.safestring import mark_safe from ..utils import setup class UrlizeTests(Sim...
gchp/django
tests/template_tests/filter_tests/test_urlize.py
Python
bsd-3-clause
14,637
import numpy as np import matplotlib.pyplot as plt import argparse, os, sys caffe_root = '/home/jiameng/deeplearning/caffe/' sys.path.insert(0, caffe_root + 'python') import caffe def predict(args): caffe.set_device(0) caffe.set_mode_gpu() net = caffe.Net(args.prototxt, args.weights, caffe.TEST) # ...
dspmeng/code
deeplearning/classify.py
Python
apache-2.0
1,432
from dis_snek.models import message_command from discordbot.command import MtgContext @message_command('invite') async def invite(ctx: MtgContext) -> None: """Invite me to your server.""" await ctx.send('Invite me to your discord server by clicking this link: <https://discordapp.com/oauth2/authorize?client_i...
PennyDreadfulMTG/Penny-Dreadful-Tools
discordbot/commands/invite.py
Python
gpl-3.0
376
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ The following script run every hours. It check the computer public IP and send email alert when ISP change public IP Address. Run as background job. (script_name &) """ import time import subprocess import smtplib,datetime def SendEmail(): From...
UWPCE-PythonCert/IntroPython2016
students/Abdishu/Final_project/Final_project1.py
Python
unlicense
1,703
# http://www.bionicbunny.org/ # # Copyright (c) 2014 Oleksandr Sviridenko # # 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...
robionica/b3
src/main/python/b3/rules/rule_base.py
Python
apache-2.0
4,854
import tornado.web import motor.motor_tornado import json import logging import hijackingprevention.rec as rec import config import hijackingprevention.api_user as api_user import hijackingprevention.user as user import hijackingprevention.session as session import hijackingprevention.verify as verify from tornado impo...
michardy/account-hijacking-prevention
hijackingprevention/main.py
Python
mit
4,520
#!/usr/bin/env python # # Copyright 2006, 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...
shockwavefraz/CEM
trunk/External_Libraries/googletest/googletest/test/gtest_xml_output_unittest.py
Python
mit
14,678
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_chart_axis27.py
Python
gpl-3.0
2,255
######################################################################## # # File Name: HTMLBaseFontElement # # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Ri...
selfcommit/gaedav
pyxml/dom/html/HTMLBaseFontElement.py
Python
lgpl-2.1
1,706
""" .. module:: instrument_alias_type The **Instrument Alias Type** Model. Here's a complete table of values, from the MusicBrainz database dump of 2017-07-22: +----+-----------------+--------+-------------+-------------+--------------------------------------+ | id | name | parent | child_order | descripti...
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/instrument_alias_type.py
Python
gpl-2.0
2,427
# -*- encoding: utf-8 -*- # Copyright 2017 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from hy.models import (HyObject, HyExpression, HyKeyword, HyInteger, HyComplex, HyString, HyBytes, HySymbol, HyFloat, HyList, HySet, ...
freezas/hy
hy/compiler.py
Python
mit
94,458
from __future__ import print_function import sys,time from . import argparser from threading import RLock if sys.version < '3': from threading import Semaphore class Barrier: def __init__(self, n): self.n = n self.count = 0 self.mutex = Semaphore(1) self....
conorpp/btproxy
libbtproxy/utils.py
Python
gpl-3.0
2,313
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/autobahn/asyncio/rawsocket.py
Python
gpl-3.0
17,259
# Brain Tumor Classification # Enhance tumor region in each image. # Author: Qixun QU # Copyleft: MIT Licience # ,,, ,,, # ;" '; ;' ", # ; @.ss$$$$$$s.@ ; # `s$$$$$$$$$$$$$$$' # $$$$$$$$$$$$$$$$$$ # $$$$P""Y$$$Y""W$$$$$ # $$$$ p"$$$"q $$$$$ # $$$$ .$$$$$. $$$$' # $$$DaU$$O$$DaU$$...
quqixun/BrainTumorClassification
src/btc_preprocess.py
Python
mit
12,756
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php or see LICENSE file. # Copyright 2007-2008 Brisa Team <brisa-develop@garage.maemo.org> """ Log module with colored logging feature. Common usage of this module can be only importing it and calling one of the available functions: debug, w...
henkelis/sonospy
sonospy/brisa/core/log.py
Python
gpl-3.0
7,223
# _*_ coding:utf-8 _*_ x = "่ฟ™ๅ„ฟๆœ‰ %d ็งไบบใ€‚" % 10 binary = 'binary' do_not = "don't" y = "Those who know %s and those who %s." % (binary,do_not) print x print y print "I said: %s." % x print "I also said: '%s'." % y hilarious = False joke_evaluation = "Isn't that joke so funny?! %r" print joke_evaluation % hilarious # ...
wzzlj/OMOOC2py
learnpythonthehardway/ex6.py
Python
mit
448
"""Support for Google Assistant Smart Home API.""" from asyncio import gather from collections.abc import Mapping from itertools import product import logging from homeassistant.util.decorator import Registry from homeassistant.core import callback from homeassistant.const import ( CLOUD_NEVER_EXPOSED_ENTITIES, C...
jamespcole/home-assistant
homeassistant/components/google_assistant/smart_home.py
Python
apache-2.0
12,254
import matplotlib.pyplot as plt import numpy as np import seaborn as sns import sqlite3 as sqlite import pandas as pd from scipy import stats import pylab from sklearn.neighbors import KernelDensity from scipy.stats import mode import json from json2html import * from scipy.stats import norm from sklearn.preprocessing ...
selinerguncu/Yelp-Spatial-Analysis
analysis/analysisEDA.py
Python
mit
31,668
""" Tests for mongoalchemy.options """ from nose.tools import * from mongoalchemy import options from mongoalchemy.document import Document from mongoalchemy.fields import Field DEFAULTS = None def setup(): # Let's always start with the same defaults, yea? global DEFAULTS if not DEFAULTS: DEFAU...
shakefu/MongoAlchemy
test/test_options.py
Python
mit
2,717
# -*- coding: utf-8 -*- """ Created on Mon Dec 13, 2011 @author:Isabel Restrepo Computes sample data mean and scatter. """ import os; import dbrec3d_batch import time import random import optparse import sys import multiprocessing import Queue from xml.etree.ElementTree import ElementTree class dbvalue: def __i...
mirestrepo/voxels-at-lems
dbrec3d/bof/pca/compute_sample_statistics.py
Python
bsd-2-clause
5,348
import numpy from data_manager.file_manager import FileManager from data_manager.feature_manager import FeatureManager from sklearn import svm from sklearn.naive_bayes import GaussianNB from pybrain.datasets import SupervisedDataSet from pybrain.supervised.trainers import BackpropTrainer from pybrain.tools.shortcuts...
aleksandar-mitrevski/object-recognition
classifier.py
Python
mit
3,706
__author__ = 'eliuha'
eliuha/pyIsraeliId
pyIsraeliId/__init__.py
Python
apache-2.0
22
# coding=utf-8 from __future__ import unicode_literals from ..address import Provider as AddressProvider class Provider(AddressProvider): city_formats = ('{{city_name}}', ) street_name_formats = ( '{{first_name}} {{last_name}}', '{{last_name}}' ) street_address_formats = ('{{buildin...
DonHilborn/DataGenerator
faker/providers/hi_IN/address.py
Python
mit
6,385
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...styles import Styles from ...format import Format class TestWriteBorders(unittest.T...
liukaijv/XlsxWriter
xlsxwriter/test/styles/test_write_borders.py
Python
bsd-2-clause
964
__all__ = ['view_as_blocks', 'view_as_windows'] import numpy as np from numpy.lib.stride_tricks import as_strided def view_as_blocks(arr_in, block_shape): """Block view of the input n-dimensional array (using re-striding). Blocks are non-overlapping views of the input array. Parameters ---------- ...
almarklein/scikit-image
skimage/util/shape.py
Python
bsd-3-clause
7,382
# Copyright 2015 The TensorFlow 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 required by applica...
SnakeJenny/TensorFlow
tensorflow/python/training/adam.py
Python
apache-2.0
9,473
"""Added accident_year as primary key Revision ID: 514e03c883e0 Revises: 3070e32fe18 Create Date: 2019-10-19 """ # revision identifiers, used by Alembic. revision = '514e03c883e0' down_revision = '59ed13585934' branch_labels = None depends_on = None from alembic import op def upgrade(): # ### commands auto ge...
hasadna/anyway
alembic/versions/514e03c883e0_add_accident_year_as_primary_key_to_.py
Python
mit
2,014
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. """ GPIB Tango device server bridge to GPIB. It uses the Salsa GPIB connection. Consider using it if you need to connnect to Spec for ex...
tiagocoutinho/bliss
bliss/tango/servers/gpib_ds.py
Python
lgpl-3.0
3,345
# This file is part of Buildbot. Buildbot 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; without eve...
seankelly/buildbot
master/buildbot/scripts/runner.py
Python
gpl-2.0
28,921
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-01 15:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Filter...
CraigRhodes/fs_site
freesources/migrations/0001_initial.py
Python
mit
840
# -*- coding: utf-8 -*- # Copyright 2014-2015 Parsely, 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 ...
pystorm/pystorm
pystorm/version.py
Python
apache-2.0
1,051
# Copyright (c) 2012, Willow Garage, 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 cond...
sorki/rosdep
test/test_rosdep_gbpdistro_support.py
Python
bsd-3-clause
8,987
"""Taiwan Stock Opendata with realtime - twstock""" from twstock import stock from twstock import analytics from twstock import cli from twstock import mock from twstock import realtime from twstock.analytics import BestFourPoint from twstock.codes import __update_codes, twse, tpex, codes from twstock.stock import St...
mlouielu/twstock
twstock/__init__.py
Python
mit
348
#!/usr/bin/env python import os.path import sys import argparse #logger import logging logger = logging.getLogger('poretools') # poretools imports import poretools.version def run_subtool(parser, args): if args.command == 'combine': import combine as submodule elif args.command == 'events': ...
arq5x/poretools
poretools/poretools_main.py
Python
mit
24,578
#!/usr/bin/env python BASE_URL = 'http://results.vtu.ac.in/vitavi.php?' # URL for accessing Revaluation Results REVAL_URL = 'http://results.vtu.ac.in/vitavireval.php?'
maheshkkumar/VTUResults
vr/constants.py
Python
gpl-2.0
173
# Flexlay - A Generic 2D Game Editor # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
SuperTux/flexlay
flexlay/pixel_buffer.py
Python
gpl-3.0
2,409
# Copyright 2015 Rackspace # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
asadoughi/quark
quark/tags.py
Python
apache-2.0
5,133
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/EligibilityResponse) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class EligibilityResponse(domainresource.DomainResource): """ EligibilityResponse resource. ...
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_3_0_0/models/eligibilityresponse.py
Python
bsd-3-clause
12,476
# -*- coding: utf-8 -*- from os import path import shutil import configparser from j24 import ensure_dir, home HOME = home() HERE = path.abspath(path.dirname(__file__)) class Configurer: def __init__(self, appname, template_dir=HERE): self.appname = appname self.template_dir = template_dir de...
juhi24/j24py
j24/config.py
Python
mit
1,973
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright : # (c) 2014 Antiun Ingenieria S.L. (Madrid, Spain, http://www.antiun.com) # Endika Iglesias <endikaig@antiun.com> # ...
pedrobaeza/event
event_project/__openerp__.py
Python
agpl-3.0
1,571
from TCAction import TCActionBase from NativeLog import NativeLog import time import random import string class TestCase(TCActionBase.CommonTCActionBase): def __init__(self, test_case, test_env, timeout=45, log_path=TCActionBase.LOG_PATH): TCActionBase.CommonTCActionBase.__init__(self, test_case, test_env...
dschaefer/esp-idf
components/idf_test/integration_test/TestCaseScript/TCPStress/TCPSTAsendrecv.py
Python
apache-2.0
7,631
"""SMA sensor tests.""" from homeassistant.components.sensor import DOMAIN from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, VOLT from homeassistant.setup import async_setup_component from tests.common import assert_setup_component BASE_CFG = { "platform": "sma", "host": "1.1.1.1", "password": "",...
tboyce021/home-assistant
tests/components/sma/test_sensor.py
Python
apache-2.0
949
from django import forms from django.utils.translation import ugettext_lazy as _ from konfera.models import Ticket, DiscountCode, TicketType class RegistrationForm(forms.ModelForm): required_css_class = 'required' error_css_class = 'error' type = forms.ModelChoiceField(queryset=TicketType.objects.all(),...
pyconsk/django-konfera
konfera/register/forms.py
Python
mit
1,535
import unittest import xlwt class TestByName(unittest.TestCase): def setUp(self): self.wb = xlwt.Workbook() self.wb.add_sheet('Plan1') self.wb.add_sheet('Plan2') self.wb.add_sheet('Plan3') self.wb.add_sheet('Plan4') def test_sheet_index(self): 'Return sheet ...
cloudera/hue
desktop/core/ext-py/xlwt-1.3.0/tests/test_by_name_functions.py
Python
apache-2.0
879
# -*- coding: utf-8 -*- """ Created on Tue Oct 20 16:27:01 2015 A Draggable Image for use in the Workflow List Can be dropped into the node editor @author: abarry """ from Magnet import Magnet from kivy.properties import ObjectProperty from kivy.clock import Clock from kivy.logger import Logger #This class defines a...
balex1/TestScriptBuilder
src/flowcharts/DraggableOption.py
Python
mit
4,786
import numpy as np import pandas as pd #ใ€€็ตฑ่จˆ็”จใƒ„ใƒผใƒซ import statsmodels.api as sm import statsmodels.tsa.api as tsa from patsy import dmatrices #ใ€€่‡ชไฝœใฎ็ฉบ้–“็ตฑ่จˆ็”จใƒ„ใƒผใƒซ from spatialstat import * #ๆ็”ป import matplotlib.pyplot as plt from pandas.tools.plotting import autocorrelation_plot import seaborn as sns sns.set(font=['IPAmincho'...
NlGG/Projects
ไธๅ‹•็”ฃ/makedata.py
Python
mit
3,444
def strstr(s, x): i = 0 while i < (len(s) - len(x) + 1): if s[i] == x[0]: no_match = False j = i + 1 k = 1 while j < len(s) and k < len(x): if s[j] == x[k]: j += 1 k += 1 else: ...
tanyaweaver/code-katas
src/first_occ_of_substring.py
Python
mit
589
import logging import traceback import putil.exception import sys class StackFormatter(logging.Formatter): """ logging formatter that: - displays exception stack traces one line per frame, with aligned columns - displays multiple chained stack traces and labels for ApplicationException objects tha...
crchemist/scioncc
src/putil/logging/format.py
Python
bsd-2-clause
4,828
# Generated by Django 1.11.13 on 2018-07-03 20:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('form_processor', '0071_case_attachment_refactor'), ] operations = [ migrations.RemoveField(model_name='caseattachmentsql', name='attachment_from'...
dimagi/commcare-hq
corehq/form_processor/migrations/0072_case_attachment_drops.py
Python
bsd-3-clause
646
# Copyright (C) 2010-2014 CEA # # This file is part of shine # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This ...
cea-hpc/shine
lib/Shine/Configuration/ModelFile.py
Python
gpl-2.0
24,131
"""Single slice vgg with normalised scale. """ from default import * import theano import theano.tensor as T import lasagne as nn import deep_learning_layers from layers import MuSigmaErfLayer, MuConstantSigmaErfLayer import preprocess import postprocess import objectives import theano_printer import updates from p...
317070/kaggle-heart
configurations/j5_normscale4.py
Python
mit
7,597
from gmusicapi import Mobileclient from Track import Track from Library import Library from Playlist import Playlist class API(object): def __init__(self): self.loggedIn = False self.api = None def login(self, username, password): if not self.loggedIn: api = self.__getApi() success = api.login(username...
TheRamis/Play-Music-Scripts
API/PlayMusic.py
Python
gpl-3.0
1,074
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
wscullin/spack
var/spack/repos/builtin/packages/r-pkgconfig/package.py
Python
lgpl-2.1
1,679
# flake8: noqa from __future__ import unicode_literals from .abc import ( ABCIE, ABCIViewIE, ) from .abcnews import ( AbcNewsIE, AbcNewsVideoIE, ) from .abcotvs import ( ABCOTVSIE, ABCOTVSClipsIE, ) from .academicearth import AcademicEarthCourseIE from .acast import ( ACastIE, ACastChan...
Tithen-Firion/youtube-dl
youtube_dl/extractor/extractors.py
Python
unlicense
30,619
from django.db import models class Media(models.TextChoices): ETHERNET = "Ethernet" ATM = "ATM" MULTIPLE = "Multiple" class POCRole(models.TextChoices): ABUSE = "Abuse" MAINTENANCE = "Maintenance" POLICY = "Policy" TECHNICAL = "Technical" NOC = "NOC", "NOC" PUBLIC_RELATIONS = "Pu...
respawner/peering-manager
peeringdb/enums.py
Python
apache-2.0
3,861
# Copyright (C) 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google-research/python-graphs
python_graphs/analysis/program_graph_analysis_test.py
Python
apache-2.0
13,274
# Copyright (C) 2013-2019 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. import sys import re import ...
OpenSmalltalk/vm
processors/ARM/gdb-8.3.1/gdb/syscalls/arm-linux.py
Python
mit
1,759
#!/usr/bin/env python ## README: # # The performance of the (HTM) model depends on the params, # as it is questionable to say what the optimal params are, and it is not our task here, # we use the generic and agreed-upon parameters from NuPIC/anomaly/hotgym example. # If the parameters change, the results an...
breznak/neural.benchmark
opf/modelParams.py
Python
gpl-2.0
6,559
#!/usr/bin/env python from __future__ import print_function import itertools from collections import namedtuple from textwrap import dedent # https://xkcd.com/1319/ # https://xkcd.com/1205/ TestEnvBase = namedtuple('TestEnvBase', ['python_version', 'pytest_version', 'django_...
ktosiek/pytest-django
generate_configurations.py
Python
bsd-3-clause
9,394
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Time : 2017/11/16 ไธ‹ๅˆ10:57 # @Author : Zoe # @File : hmm_test.py # @Description : import numpy as np from hmmlearn import hmm states = ["box 1", "box 2", "box3"] n_states = len(states) observations = ["red", "white"] n_observations = len(observatio...
zoeyangyy/event-extraction
130006/hmm_test.py
Python
mit
1,042
from steerclear.utils.eta import * import unittest, urllib, vcr # vcr object used to record api request responses or return already recorded responses myvcr = vcr.VCR(cassette_library_dir='tests/fixtures/vcr_cassettes/eta_tests/') """ DMResponseTestCase ------------------ Test case for DMResponse class which parses r...
Benjamin-Marks/Steer-Clear-Backend
tests/utils_tests/eta_tests.py
Python
mit
22,660
"""timberline rfid urls Copyright 2012-2013 Michael Farrell <http://micolous.id.au/> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any la...
micolous/timberline
timberline/rfid/urls.py
Python
agpl-3.0
807
from __future__ import ( absolute_import, print_function, unicode_literals, ) import re import os.path from xml.dom import minidom import cgi import json import base64 import responses from six.moves.urllib.parse import urlparse, urljoin from io import BytesIO def prettify(xml_string): """Return a...
jhubert/pydocx-s3-images
pydocxs3upload/test/utils.py
Python
apache-2.0
4,135
class ExpressionStorageManagerToFile(): def __init__(self, handler): self.handler = handler def insert(self, expression, result): line_in_file = expression + ';' + result self.handler.save(line_in_file)
geoom/coolcalc
coolcalc/storage.py
Python
apache-2.0
215
import os import platform from twisted.internet import defer from . import data from p2pool.util import math, pack, jsonrpc from operator import * @defer.inlineCallbacks def check_genesis_block(bitcoind, genesis_block_hash): try: yield bitcoind.rpc_getblock(genesis_block_hash) except jsonrpc.Error_f...
TheoRettisch/p2pool-hirocoin
p2pool/bitcoin/networks.py
Python
gpl-3.0
1,846
import argparse import logging parser = argparse.ArgumentParser(description='Canute UI') parser.add_argument( '--debug', action='store_const', dest='loglevel', const=logging.DEBUG, default=logging.INFO, help='debugging content' ) parser.add_argument( '--text', action='store_const', ...
Bristol-Braille/canute-ui
ui/argparser.py
Python
gpl-3.0
1,731
from lxml import etree def extract_identifiers_from_mods(mods_path): doc = etree.parse(mods_path) elements = doc.findall('//{http://www.loc.gov/mods/v3}identifier') return [e.text for e in elements]
michal-ruzicka/archivematica
src/archivematicaCommon/lib/identifier_functions.py
Python
agpl-3.0
212
from django.core.management.base import BaseCommand from django.conf import settings from django.utils.encoding import smart_str from urllib2 import HTTPError, URLError from haystack import site from os.path import join from sys import stdout from antxetamedia.multimedia.models import Media BLIP_URL = 'http://blip.t...
GISAElkartea/antxetamedia
antxetamedia/multimedia/management/commands/blip_to_archive.py
Python
agpl-3.0
1,413
import pprint def display(status_list): pprint.pprint(status_list)
aleszoulek/maxcube
maxcube/output.py
Python
bsd-3-clause
74
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
MakMukhi/grpc
src/python/grpcio_health_checking/setup.py
Python
bsd-3-clause
2,805
__author__ = 'Jwely' from AxialVortex import * from construct_axial_vortex import * from construct_experiments import * from Experiment import * from MeanVecFieldCartesian import * from VecFieldCartesian import * from shorthand_to_tex import *
Jwely/pivpr
py/piv/__init__.py
Python
mit
246
""" `Bullets <http://community.topcoder.com/stat?c=problem_statement&pm=665>`__ """ def solution (guns, bullet): for i, gun in enumerate(guns): if match(gun, bullet): return i return -1 def match(gun, bullet): for _ in range(len(gun)): if gun == bullet: return True ...
erichaase/topcoder-python
topcoder/bullets.py
Python
mit
368