code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
import _dk_core as core from . import view from . import font from . import control from . import textinput class TextField(textinput.TextInput, control.Control, view.View): borderWidth = 1 caretBlinkInterval = 0.5 caretWidth = 1 caretColor = core.Color(0.0, 0.0, 0.0) caretColorComposition = co...
DKGL/DKGL
Scripts/dk/ui/textfield.py
Python
bsd-3-clause
17,528
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import Command, ICommand, IModuleData, ModuleData from zope.interface import implementer from typing import Any, Dict, List, Optional, Tuple irc.ERR_SERVICES = "955" # Custom numeric; 955 <TYPE> <SUBTYPE> <ERROR> @...
Heufneutje/txircd
txircd/modules/extra/services/account_group.py
Python
bsd-3-clause
2,997
import logging import warnings import inspect from sqlalchemy.orm.attributes import InstrumentedAttribute from sqlalchemy.orm import joinedload, aliased from sqlalchemy.sql.expression import desc, ColumnElement from sqlalchemy import Boolean, Table, func, or_ from sqlalchemy.exc import IntegrityError from sqlalchemy.s...
sfpprxy/py-reminder
libs/contrib/sqla/view.py
Python
bsd-3-clause
38,654
#!/bin/env python ''' Copyright (c) 2013 Potential Ventures Ltd Copyright (c) 2013 SolarFlare Communications 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...
mkreider/cocotb2
cocotb/monitors/__init__.py
Python
bsd-3-clause
5,969
from abc import ABCMeta, abstractmethod, abstractproperty import re import requests from oauthlib.oauth2 import InvalidGrantError from hs_restclient import HydroShareAuthOAuth2, HydroShareAuthBasic from adapter import HydroShareAdapter from . import HydroShareUtilityBaseClass, ImproperlyConfiguredError from django.shor...
ODM2/ODM2WebSDL
src/hydroshare_util/auth.py
Python
bsd-3-clause
16,163
from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from .menu import DomecekMenu from .urls import urlpatterns ...
misli/django-domecek
domecek/cms_app.py
Python
bsd-3-clause
483
# Copyright 2014 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 os import re from recipe_engine import recipe_api class FilterApi(recipe_api.RecipeApi): def __init__(self, **kwargs): super(FilterApi, self)....
eunchong/build
scripts/slave/recipe_modules/filter/api.py
Python
bsd-3-clause
8,905
# Copyright 2018 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
google/deepvariant
third_party/nucleus/io/sharded_file_utils_test.py
Python
bsd-3-clause
9,738
from django.db import models from taggit.managers import TaggableManager from django.contrib.auth.models import User ### contains all site definitions class Site(models.Model): group = models.ForeignKey('group.Group', related_name="sites", on_delete=models.PROTECT) hostname = models.CharField(max_length=25...
tykling/tlsscout
src/tlssite/models.py
Python
bsd-3-clause
1,062
import base64 import json from finance import app from tests.fixtures import setup_user, delete_user class BaseViewTestCase(): def get_headers(self, username, password): return { 'Authorization': 'Basic ' + base64.b64encode( username + ":" + password ) } ...
reinbach/finance
api/tests/views/test_base.py
Python
bsd-3-clause
3,494
# -*-coding:Utf-8 -* # Copyright (c) 2015 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 # lis...
stormi/tsunami
src/primaires/information/commandes/roadmap/__init__.py
Python
bsd-3-clause
3,883
from distutils.core import setup setup( name='DSM-gui', version='0.8', author='M. Wysokinski', description='Desktop GUI for the DSM project', install_requires=[ "twisted == 13.2.0", ], )
wysekm/DistributedSystemMonitoring
DSM-desktop-gui/setup.py
Python
bsd-3-clause
219
""" This module gathers tree-based methods, including decision, regression and randomized trees. Single and multi-output problems are both handled. """ # Code is originally adapted from MILK: Machine Learning Toolkit # Copyright (C) 2008-2011, Luis Pedro Coelho <luis@luispedro.org> # License: MIT. See COPYING.MIT file...
sgenoud/scikit-learn
sklearn/tree/tree.py
Python
bsd-3-clause
44,475
try: from pandas.plotting._converter import DatetimeConverter except ImportError: from pandas.tseries.converter import DatetimeConverter import pandas as pd from pandas import to_datetime, date_range, Series, DataFrame, period_range import datetime as dt from pandas.tseries.frequencies import infer_freq impor...
zfrenchee/pandas
asv_bench/benchmarks/timeseries.py
Python
bsd-3-clause
13,637
from __future__ import absolute_import from __future__ import division from __future__ import print_function # # Coon Warp v1.0, # released 23.01.2016 # # # Based on Paul s. Heckbert's "Bilinear coons patch image warping" # Graphics gems IV, Pages 438-446 # http://dl.acm.org/citation.cfm?id=180937 # # # Copyright (c) ...
Quasimondo/RasterFairy
rasterfairy/coonswarp.py
Python
bsd-3-clause
13,205
#!/usr/bin/python #Copyright (c) 2012, Carnegie Mellon University. #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions #are met: #1. Redistributions of source code must retain the above copyright # notice, thi...
mrcaps/rainmon
code/spirit/runspirit.py
Python
bsd-3-clause
5,444
# -*- coding: utf-8 -*- """ celery.worker.heartbeat ~~~~~~~~~~~~~~~~~~~~~~~ This is the internal thread that sends heartbeat events at regular intervals. """ from __future__ import absolute_import from .state import SOFTWARE_INFO, active_requests, total_count class Heart(object): """Timer sendi...
mozilla/firefox-flicks
vendor-local/lib/python/celery/worker/heartbeat.py
Python
bsd-3-clause
1,643
from pulsar.apps.test import test_timeout from lux.utils import test class TestSql(test.AppTestCase): config_file = 'tests.odm' config_params = {'DATASTORE': 'sqlite://'} def test_odm(self): odm = self.app.odm() tables = odm.tables() self.assertTrue(tables) def test_simple_s...
tazo90/lux
tests/odm/sqlite.py
Python
bsd-3-clause
944
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
ContinuumIO/ashiba
enaml/enaml/widgets/mpl_canvas.py
Python
bsd-3-clause
2,050
""" fs.watch ======== Change notification support for FS. This module defines a standard interface for FS subclasses that support change notification callbacks. It also offers some WrapFS subclasses that can simulate such an ability on top of an ordinary FS object. An FS object that wants to be "watchable" must pr...
atty303/pyfilesystem
fs/watch.py
Python
bsd-3-clause
22,882
"""The suite of window functions.""" from __future__ import division, print_function, absolute_import import numpy as np from scipy import special, linalg from scipy.fftpack import fft __all__ = ['boxcar', 'triang', 'parzen', 'bohman', 'blackman', 'nuttall', 'blackmanharris', 'flattop', 'bartlett', 'hannin...
sargas/scipy
scipy/signal/windows.py
Python
bsd-3-clause
44,546
#! /usr/bin/python # # See README for usage instructions. import sys import os import subprocess # We must use setuptools, not distutils, because we need to use the # namespace_packages option for the "google" package. try: from setuptools import setup, Extension except ImportError: try: sys.stderr.write("run...
kastnerkyle/protobuf-py3
python/setup.py
Python
bsd-3-clause
8,425
import asyncio import logging import json import unittest import socket import random import ddcm from . import const from . import utils class StoreTest(unittest.TestCase): async def handle_events(self, service): pong_count = 0 self.ping_sent = [] self.ping_recved = [] self.pong_...
SkyZH/ddcm-protocol
ddcm/test/store_test.py
Python
bsd-3-clause
3,487
# Copyright (c) 2018,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Test the `points` module.""" import logging import numpy as np import pytest from scipy.spatial import cKDTree, Delaunay from metpy.cbook import get_test_data from metpy....
Unidata/MetPy
tests/interpolate/test_points.py
Python
bsd-3-clause
5,986
"""Loyalty domain objects for LCP services The domain objects derived from LCPResource can be used for basic CRUD operations to support internal services. """ from future import standard_library standard_library.install_aliases() # NOQA from builtins import object try: from http.client import NO_CONTENT except ...
Points/PyLCP
pylcp/crud/base.py
Python
bsd-3-clause
4,481
# coding: utf-8 from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile from models import Account, Document, Comment import const latin = r'^[a-zA-Z0-9]+$' datetime_input_format = '%d.%m.%Y %H:...
m-garanin/conference
app/forms.py
Python
bsd-3-clause
8,103
import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, ) import pandas._testing as tm from pandas.core.util.hashing import hash_tuples from pandas.util import ( hash_array, hash_pandas_object, ) @pytest.fixture( params=[ Ser...
pandas-dev/pandas
pandas/tests/util/test_hashing.py
Python
bsd-3-clause
13,000
import numpy as np import h5py import constants as const from circuit import Circuit def load_neurohdf(filename, hdf5path, memmapped=False): """ Loads the circuit from a NeuroHDF file as exported from CATMAID Parameters ---------- filename : str Path to the NeuroHDF file hdfpath : str ...
unidesigner/microcircuit
microcircuit/io.py
Python
bsd-3-clause
2,171
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='SiteProfile', fields=[ ...
ugoertz/django-familio
base/migrations/0001_initial.py
Python
bsd-3-clause
805
"""Job.repo_fs Revision ID: 5773ec3bc06 Revises: 3ce0ed6fff6 Create Date: 2015-12-01 02:03:19.042318 """ # revision identifiers, used by Alembic. revision = '5773ec3bc06' down_revision = '3ce0ed6fff6' branch_labels = None depends_on = None from alembic import op def upgrade(): op.alter_column('job', 'repo', n...
RickyCook/DockCI
alembic/versions/5773ec3bc06_job_repo_fs.py
Python
isc
427
import datetime from typing import Union from .utils import to_camel_case def streaming_market_filter( market_ids: list = None, bsp_market: bool = None, betting_types: list = None, event_type_ids: list = None, event_ids: list = None, turn_in_play_enabled: bool = None, market_types: list = ...
liampauling/betfairlightweight
betfairlightweight/filters.py
Python
mit
13,217
from django.db import models class Address(models.Model): teryt = models.IntegerField(default=0) territory = models.CharField(max_length=7) number_of_district = models.IntegerField(default=0) address = models.CharField(max_length=500, default=None, null=True, blank=True) district = models.CharFiel...
miastojestnasze/wyborySam2014
stats/models.py
Python
mit
3,755
#! /usr/bin/env nix-shell #! nix-shell -i python2 -p "with python2Packages; [python debian]" # Script to build a Nix script to actually build a Steam runtime. # Patched version of https://github.com/ValveSoftware/steam-runtime/blob/master/build-runtime.py import os import re import sys import urllib import gzip impor...
SymbiFlow/nixpkgs
pkgs/games/steam/update-runtime.py
Python
mit
4,219
from unittest import TestCase from six import assertRaisesRegex from dark.reads import DNARead from dark.summarize import summarizeReads, sequenceCategoryLengths from dark.utils import StringIO class TestSummarizeReads(TestCase): """ Test the summarizeReads function. """ def testReadNumberEmptyInput...
terrycojones/dark-matter
test/test_summarize.py
Python
mit
9,767
#!/usr/bin/env python import argparse import bcrypt import ftp2http import getpass import os import sys from .version import version def main(): parser = argparse.ArgumentParser(version=version) parser.add_argument( "-f", "--configuration-file", default="/etc/ftp2http.conf", help="...
apn-online/ftp2http
ftp2http/__main__.py
Python
mit
1,514
import time import random nums = [] for i in range(100): nums.append(int((random.random())*10000)) #fills empty nums list with 100 random int's from 0-1000 print "Before everything happens:", nums start_time=time.time() #records start time of sorting for index1 in range(1, len(nums)): for index2 in range (0...
jiobert/python
Tan_ShinYi/Assignments/Python_Fundamentals/Insertion_Sort.py
Python
mit
710
from sfa.rspecs.elements.element import Element from sfa.rspecs.elements.pltag import PLTag class NITOSv1PLTag: @staticmethod def add_pl_tag(xml, name, value): for pl_tag in pl_tags: pl_tag_elem = xml.add_element(name) pl_tag_elem.set_text(value) @staticmeth...
yippeecw/sfa
sfa/rspecs/elements/versions/nitosv1PLTag.py
Python
mit
640
from __future__ import unicode_literals import pytz from django.contrib.auth.models import User from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from djblets.datagrid.grids import ( Column, DateTimeColumn, DataGrid as DjbletsDataGrid, AlphanumericDataGrid as Djbl...
davidt/reviewboard
reviewboard/datagrids/grids.py
Python
mit
21,259
""" Define urls for api/v1 """ from django.conf.urls import url, include from rest_framework_bulk.routes import BulkRouter from seven23 import settings from seven23.api.accounts.views import AccountsList ROUTER = BulkRouter(trailing_slash=False) ROUTER.register(r'^', AccountsList, basename='accounts') urlpatte...
sebastienbarbier/723e_server
seven23/api/accounts/urls.py
Python
mit
337
#!/usr/bin/env python """ Mappings from Adobe glyph names to Unicode characters. In some CMap tables, Adobe glyph names are used for specifying Unicode characters instead of using decimal/hex character code. The following data was taken by $ wget https://partners.adobe.com/public/developer/en/opentype/glyphlist.t...
euske/pdfminer
pdfminer/glyphlist.py
Python
mit
121,510
# author: Fei Gao # # Add Two Numbers # # You are given two linked lists representing two non-negative # numbers. The digits are stored in reverse order and each of # their nodes contain a single digit. Add the two numbers and # return it as a linked list. # # Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) # Output: 7 -> 0 -> 8 ...
feigaochn/leetcode
p2_add_two_numbers.py
Python
mit
1,551
import pytest from spacy.util import get_lang_class # fmt: off # Only include languages with no external dependencies # excluded: ja, ko, th, vi, zh LANGUAGES = ["af", "am", "ar", "az", "bg", "bn", "ca", "cs", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fr", "ga", "gu", "he", "hi", ...
honnibal/spaCy
spacy/tests/lang/test_initialize.py
Python
mit
922
"""Contains the base class for the Snux driver overlay. This class overlays an existing WPC-compatible platform interface to work with Mark Sunnucks's System 11 interface board. """ # snux.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the ...
spierepf/mpf
mpf/platform/snux.py
Python
mit
14,196
__author__ = 'beast'
mr-robot/granule
tests/__init__.py
Python
mit
21
""" MutatePDB ========= """ import argparse import tempfile from Bio import PDB from Bio.PDB.Polypeptide import aa1 from Bio.PDB.Polypeptide import aa3 from Bio.PDB.Polypeptide import one_to_three from ssbio.protein.structure.utils.cleanpdb import CleanPDB from ssbio.protein.structure.utils.structureio import Struct...
SBRG/ssbio
ssbio/protein/structure/utils/mutatepdb.py
Python
mit
3,518
import re import sys from waflib import Options import os.path as osp from waflib import Logs from waflib import Context from waflib import Errors def options(ctx): import optparse grp = ctx.parser.get_option_group("--gcc") if grp==None: grp=optparse.OptionGroup(ctx.parser,"compiler options") grp.add_opti...
miguelzuma/montepython_zuma
wrapper_wmap/waf_tools/try_ifort.py
Python
mit
7,286
import asposepdfcloud from asposepdfcloud.PdfApi import PdfApi from asposepdfcloud.PdfApi import ApiException import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from asposestoragecloud.StorageApi import ResponseMessage apiKey = "XXXXX" #sepcify App Key appSid = "XXXXX" #sepcify App SID api...
asposepdf/Aspose_Pdf_Cloud
Examples/Python/Examples/GetFragmentCountPDFPage.py
Python
mit
1,245
#### 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_data_terminal_s4.iff" result.attribute_templat...
obi-two/Rebelion
data/scripts/templates/object/static/structure/general/shared_data_terminal_s4.py
Python
mit
454
import yaml def load_catalogs(app): with app.open_resource('../catalogs.yaml', 'r') as fh: return yaml.load(fh)
pudo/datameta
datameta/catalogs.py
Python
mit
126
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-27 09:48 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('nomi', '0015_auto_20170527_0937'), ] operations = ...
aniketp41/Gymkhana-Nominations
nomi/migrations/0016_post_nomination.py
Python
mit
560
#!/usr/bin/env python3 import gitlab from github import Github from Utils.github_workflow_scripts.utils import timestamped_print, get_env_var # ANSI Colors RED = '\033[0;31m' GREEN = '\033[0;32m' RESET = '\033[0m' GITLAB_PROJECT_ID = get_env_var('CI_PROJECT_ID', '2596') # the default is the id of the content proj...
demisto/content
Utils/delete_mismatched_branches.py
Python
mit
2,283
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='pylonsapp', version='0.1', description='', author='', author_email='', url='', install_requires=...
FormAlchemy/formalchemy
pylonsapp/setup.py
Python
mit
1,025
#!/usr/bin/env python # # Appcelerator Titanium Module Packager # # import os, subprocess, sys, glob, string import zipfile from datetime import date cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) os.chdir(cwd) required_module_keys = ['name','version','moduleid','description','copyright','...
titanium-forks/benbahrenburg.ti.mely
iOS/build.py
Python
mit
6,779
#!/usr/bin/env python3 import unittest class IterablesTests(unittest.TestCase): """Test of iterable patterns""" def test_comprehensions(self): none if __name__ == '__main__': unittest.main()
Shawn1874/CodeSamples
CodeSamplesPython/PythonSamples/PythonIterables/PythonIterables.py
Python
mit
213
# 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-network/azure/mgmt/network/v2017_11_01/models/usage_paged.py
Python
mit
917
import re import sys from datetime import datetime import discord.game import discordant.utils as utils from discordant import Discordant def _punishment_format(self, server, document): server = server if server else self.default_server if "user" not in document: user_id = document["user_id"] ...
jonnyli1125/discordant
discordant/commands/mod.py
Python
mit
14,797
import util from flask import ( abort, Blueprint, current_app, render_template, redirect, request, url_for, flash, ) import model from database import db_session configurations = Blueprint( "configurations", __name__, template_folder="templates/configurations" ) @configurations....
unoacm/code_court
code_court/courthouse/views/admin/configurations.py
Python
mit
4,820
#### 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/space/debris/shared_tie_fighter_debris_e.iff" result.attribute_template...
anhstudios/swganh
data/scripts/templates/object/static/space/debris/shared_tie_fighter_debris_e.py
Python
mit
453
#! /usr/bin/env python # @author Billy Wilson Arante # @created 1/4/2016 PHT def product(L): prod = 1 for i in L: prod = prod * i return prod def test(): data = [1, 2, 3, 4, 5] print(product(data)) if __name__ == "__main__": test()
arantebillywilson/python-snippets
py3/cs-circle/prod.py
Python
mit
268
from pprint import pprint # noqa from aleph.core import db from aleph.model import Events, Role from aleph.logic.roles import update_role from aleph.logic.notifications import publish, GLOBAL from aleph.views.util import validate from aleph.tests.util import TestCase class NotificationsApiTestCase(TestCase): de...
pudo/aleph
aleph/tests/test_notifications_api.py
Python
mit
1,920
############################################################################# # The MIT License (MIT) # # Copyright (c) 2015 Jason Pruitt # # 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 w...
jrspruitt/pyfa_gpio
fgpio/boards/nanopi.py
Python
mit
4,871
import math t_max = 100 # for T in range(t_max): # step = math.exp((alpha*(-T))/t_max) # print(T) # print(step) alpha = 0.1 T=t_max i = 0 while T>alpha: step = alpha*math.exp(((T-t_max)/t_max)) T -= step i+=1 print("\t%d" % i) print(T) print("step = %f" % step)
sergeimoiseev/othodi
test_cooling_step.py
Python
mit
299
import gzip import lzma import bz2 import io import builtins WRITE_MODE = "wt" class ReusableFile(object): """ Class which emulates the builtin file except that calling iter() on it will return separate iterators on different file handlers (which are automatically closed when iteration stops). This ...
EntilZha/PyFunctional
functional/io.py
Python
mit
9,557
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module implements an interface to the VAMPIRE code for atomistic simulations of magnetic materials. This module depends on a compiled vampire executable available in the path. Please download at https...
fraricci/pymatgen
pymatgen/command_line/vampire_caller.py
Python
mit
14,662
from dodo_commands import Dodo Dodo.parser.add_argument("what") Dodo.run(["make", Dodo.args.what], cwd=Dodo.get("/MAKE/cwd"))
mnieber/dodo_commands_tutorial
part2/after/commands/mk.py
Python
mit
127
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _, msgprint from frappe.utils import flt, cint, cstr, now from frappe.modules import load_doctype_module from frappe.model.base_document import...
rkawale/Internalhr-frappe
frappe/model/document.py
Python
mit
15,295
import telegram import markovify import builtins import re import traceback def processTextOld(text): if builtins.markov == None: print("Setting to text") builtins.markov = markovify.Text(text) else: print("Combining") builtins.markov = markovify.combine([builtins....
noisemaster/AdamTestBot
src/atbMarkov.py
Python
mit
1,684
#!/usr/bin/env python import os from flask import Flask from flask_restful import Api from blueprint import Blueprint class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwarg...
michalgawin/OKNO
common/app.py
Python
mit
1,096
''' Backend KivyAgg ===== .. image:: images/backend_agg_example.jpg :align: right The :class:`FigureCanvasKivyAgg` widget is used to create a matplotlib graph. The render will cover the whole are of the widget unless something different is specified using a :meth:`blit`. When you are creating a FigureCanvasKivyAg...
MartinHeinz/training-and-food-tracker
libs/garden/matplotlib/backend_kivyagg.py
Python
mit
7,628
import demistomock as demisto from CommonServerPython import * res = demisto.executeCommand('ssh', {'cmd': 'cat /var/log/demisto/docker.log', 'using': 'localhost'}) output = 'File: /var/log/demisto/docker.log\n' output += res[0].get('Contents').get('output') return_results(output)
demisto/content
Packs/ServerLogs/Scripts/ServerLogsDocker/ServerLogsDocker.py
Python
mit
284
#!/usr/bin/env python # Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """\ Convenience wrapper for compiling V8 with gn/ninja and running tests. Sets up build output directories if they don't exist. Produ...
hoho/dosido
nodejs/deps/v8/tools/dev/gm.py
Python
mit
9,909
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import logging import numpy as np from abc import ABCMeta, abstractmethod from monty.json import MSONable, MontyDecoder from functools import lru_cache from pymatgen.core.structure import Structure, PeriodicS...
fraricci/pymatgen
pymatgen/analysis/defects/core.py
Python
mit
24,597
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import sys from unittest import TestCase import pytest class TestImports(TestCase): """Test Imports - the quickest test to ensure that we haven't introduced version-incompatible syntax errors.""" def test_topleve...
sserrot/champion_relationships
venv/Lib/site-packages/zmq/tests/test_imports.py
Python
mit
1,805
#### 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/item/shared_armor_bone_leggings.iff" result.attribute_template_id = -1 ...
anhstudios/swganh
data/scripts/templates/object/static/item/shared_armor_bone_leggings.py
Python
mit
444
import numpy from cupy.random import distributions from cupy.random import generator from cupy.random import sample as sample_ rand = sample_.rand randn = sample_.randn random_sample = sample_.random_sample random = random_sample ranf = random_sample sample = random_sample bytes = numpy.random.bytes lognormal = dis...
tscohen/chainer
cupy/random/__init__.py
Python
mit
594
from Jugador import Jugador from Proyectil import Proyectil from Enemigo import Enemigo from Muro import Muro from Defensa import Defensa from EntradaEnemigo import EntradaEnemigo from Estadisticas import Estadisticas
DavidRamirez19/Total-Demolition---PYGAME
Total Demolition 1.2/Clases/__init__.py
Python
mit
218
'''OpenGL extension ARB.texture_buffer_object_rgb32 This module customises the behaviour of the OpenGL.raw.GL.ARB.texture_buffer_object_rgb32 to provide a more Python-friendly API Overview (from the spec) This extension adds three new buffer texture formats - RGB32F, RGB32I, and RGB32UI. This partially addres...
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/OpenGL/GL/ARB/texture_buffer_object_rgb32.py
Python
mit
861
import os _basedir = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TESTING = True ADMINS = frozenset(['youremail@yourdomain.com']) SECRET_KEY = 'SecretKeyForSessionSigning' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(_basedir, 'app.db') DATABASE_CONNECT_OPTIONS = {} THREADS_PER_PAGE = 8 CSRF_EN...
open-iot-stack/open-iot-web
app/config.py
Python
mit
377
import json import datetime import demistomock as demisto from OutOfOfficeListCleanup import main def execute_command(name, args=None): if name == 'getList': get_list_response = [{"user": "admin", "offuntil": "2020-04-20", "addedby": "admin"}] return [{'Contents': json.dumps(get_list_response)}] ...
demisto/content
Packs/ShiftManagement/Scripts/OutOfOfficeListCleanup/OutOfOfficeListCleanup_test.py
Python
mit
2,038
#!/usr/bin/env python """ Parts of this file were taken from the luigi project (https://github.com/spotify/luigi) as reference. """ import os from setuptools import setup, find_packages # set version VERSION = '0.2.6' def get_requirements(): """Loads contents from requirements.txt.""" requirements = [] ...
dbcollection/dbcollection
setup.py
Python
mit
2,317
#!/usr/bin/env python # -*- coding: utf-8 -*- # calculate1.py # A simple and functional calculator created with Tkinter. # Exercise 10.6: Python How to Program, 1st Ed. by Deitel, P. & Deitel, H. # # Author: Billy Wilson Arante # Created: 2016/10/31 EDT # Modified: 2016/11/02 EDT from Tkinter import * class MainApp(...
arantebillywilson/python-snippets
py2/htp/ex10/calculate1.py
Python
mit
2,474
# The MIT License (MIT) # # Copyright (c) 2019 Looker Data Sciences, Inc. # # 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 u...
looker-open-source/sdk-codegen
python/tests/rtl/test_auth_token.py
Python
mit
2,557
import os import xbox class TestBase(object): def setup_method(self, method): # reset the client instance xbox.client = xbox.Client() # reset auth creds os.environ.pop('MS_LOGIN', None) os.environ.pop('MS_PASSWD', None)
joealcorn/xbox
xbox/tests/__init__.py
Python
mit
269
import os def is_development() : mode = os.getenv("MODE", "prod") return mode == "dev" DEBUG = is_development()
andrewrothstein/docker-coreos-ipxeserver
config.py
Python
mit
116
# coding: utf-8 import datetime from quokka.core.models.channel import Channel from quokka.core.models.config import Config from quokka.core.models.content import Content, Link def configure(app): @app.context_processor def inject(): now = datetime.datetime.now() return dict( cha...
alexandre/quokka
quokka/ext/context_processors.py
Python
mit
631
#!/usr/bin/python # -*- coding: utf-8 -*- # 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) any later version. # # This progra...
0vercl0k/rp
src/third_party/beaengine/tests/0f3a30.py
Python
mit
1,731
#!/usr/bin/env python # # GrovePi Example for using the Grove - I2C ADC(http://www.seeedstudio.com/depot/Grove-I2C-ADC-p-1580.html) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask o...
karan259/GrovePi
Software/Python/grove_i2c_adc/i2c_adc_example.py
Python
mit
1,831
########################################################### # # Copyright (c) 2010, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
Southpaw-TACTIC/TACTIC
src/tactic/command/project_template_cmd.py
Python
epl-1.0
22,701
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2003-2005 Donald N. Allingham # Copyright (C) 2008 Stefan Siegel # Copyright (C) 2008 Brian G. Matherly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera...
gramps-project/gramps
gramps/plugins/rel/rel_de_AT.py
Python
gpl-2.0
11,462
#!/usr/bin/env python ############################################################################ # prepare.py # Copyright (C) 2015 Belledonne Communications, Grenoble France # ############################################################################ # # This program is free software; you can redistribute it and/...
lyx2014/linphone-iphone
prepare.py
Python
gpl-2.0
24,475
#!/usr/bin/env python # This file is Copyright David Francos Cuartero, licensed under the GPL2 license. from distutils.core import setup setup(name='airgraph-ng', version='1.1', description='Aircrack-ng network grapher', author='TheX1le', console = [{"script": "airgraph-ng" }], url='http...
creaktive/aircrack-ng
scripts/airgraph-ng/setup.py
Python
gpl-2.0
524
from gui.battle_control.ChatCommandsController import ChatCommandsController from Avatar import PlayerAvatar from MarkersStorage import MarkersStorage from markersUtils import showMarker import BigWorld from plugins.Engine.ModUtils import BattleUtils,MinimapUtils,FileUtils,HotKeysUtils,DecorateUtils from warnings impor...
jstar88/wotmods
files/uncompyled/wot_folder/res_mods/0.9.10/scripts/client/plugins/Focus_plugin/Focus.py
Python
gpl-2.0
3,230
from __future__ import absolute_import from ..backend import KeyringBackend from ..errors import PasswordDeleteError from ..errors import PasswordSetError from ..util import properties try: import dbus except ImportError: pass class DBusKeyring(KeyringBackend): """KDE KWallet via D-Bus""" folder = ...
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/keyring/backends/kwallet.py
Python
gpl-2.0
3,157
class Solution: # @param A a list of integers # @param m an integer, length of A # @param B a list of integers # @param n an integer, length of B # @return nothing def merge(self, A, m, B, n): len_a = m - 1 len_b = n - 1 i = m + n - 1 while i >= 0 an...
lileeyao/acm
sorted/intermediate/merge_sorted_array.py
Python
gpl-2.0
562
# -*- coding: utf-8 -*- """ *************************************************************************** MultipleInputPanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ********************...
innotechsoftware/Quantum-GIS
python/plugins/sextante/gui/MultipleInputPanel.py
Python
gpl-2.0
3,348
# -*- coding: utf-8 -*- import wx from base import basePanel class favsPanel(basePanel): def __init__(self, parent, name): super(favsPanel, self).__init__(parent, name) self.type = "favourites_timeline"
codeofdusk/ProjectMagenta
src/wxUI/buffers/favourites.py
Python
gpl-2.0
208
# -*- coding: utf-8 -*- """This module tests events that are invoked by Cloud/Infra VMs.""" import fauxfactory import pytest from cfme import test_requirements from cfme.cloud.provider import CloudProvider from cfme.cloud.provider.gce import GCEProvider from cfme.control.explorer.policies import VMControlPolicy from c...
Yadnyawalkya/integration_tests
cfme/tests/cloud_infra_common/test_events.py
Python
gpl-2.0
3,512
from urllib.parse import urlparse import attr import pytest from cfme.fixtures import terminalreporter from cfme.fixtures.pytest_store import store from cfme.utils import conf from cfme.utils.appliance import DummyAppliance from cfme.utils.appliance import load_appliances_from_config from cfme.utils.appliance import ...
nachandr/cfme_tests
cfme/test_framework/appliance.py
Python
gpl-2.0
3,908
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/pyre/pyre/ipc/UDPMonitor.py
Python
gpl-2.0
701
## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio 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. ## ## Invenio is distributed i...
cul-it/Invenio
modules/bibedit/lib/bibeditmulti_engine.py
Python
gpl-2.0
28,975