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 from libchristine.Library import library import gtk window = gtk.Window() window.connect('destroy',gtk.main_quit) window.set_size_request(640,480) window.set_position(gtk.WIN_POS_CENTER) Library = library() lastSourceUsed = 'music' Library.loadLibrary(lastSourceUsed) TreeView = Library.tv s...
markuz/Christine
christinetests/mainLibrary.py
Python
gpl-2.0
418
from toontown.toonbase.ToontownGlobals import * from toontown.toonbase.ToonBaseGlobal import * from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject im...
ToonTownInfiniteRepo/ToontownInfinite
toontown/estate/DistributedHouseInterior.py
Python
mit
8,640
# Software License Agreement (BSD License) # # Copyright (c) 2010, 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...
jpgr87/vcstools
src/vcstools/git.py
Python
bsd-3-clause
37,164
import os BASE_DIR = os.path.dirname(__file__) DEBUG = True INSTALLED_APPS = ( 'bootstrap_paginator', 'testlist', ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db.sqlite3', }, } TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'), ) TEMPLATE_CO...
defrex/django-bootstrap-paginator
tests/settings.py
Python
mit
438
""" Convenience routines for creating non-trivial Field subclasses, as well as backwards compatibility utilities. Add SubfieldBase as the metaclass for your Field subclass, implement to_python() and the other necessary methods and everything will work seamlessly. """ class SubfieldBase(type): """ A metaclass...
denisenkom/django
django/db/models/fields/subclassing.py
Python
bsd-3-clause
1,818
""" Test the autocomplete mode """ from pyqode.core.api import TextHelper from pyqode.qt import QtCore from pyqode.qt.QtTest import QTest from pyqode.python import modes as pymodes from ..helpers import editor_open def get_mode(editor): return editor.modes.get(pymodes.PyAutoCompleteMode) def test_enabled(editor...
mmolero/pyqode.python
test/test_modes/test_autocomplete.py
Python
mit
1,046
import itertools, json, math, os, re, sys, urllib.request, yaml DEFAULT_OUTPUT_DIRECTORY = "outputs" DEFAULT_OUTPUT_FILE = "acs_tract_data.json" DEFAULT_OUTPUT_ACS_VARIABLES = False def census_query(acs_variables, base_url, geo): """This function performs the Census API query. It returns hashes of the form {t...
gggodhwani/state_of_children_in_india
data/scripts/fetch_acs.py
Python
mit
6,478
# (C) 2013, James Cammarata <jcammarata@ansible.com> # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import hashlib import json import os import t...
BondAnthony/ansible
lib/ansible/galaxy/api.py
Python
gpl-3.0
26,029
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # pyre-strict import asyncio import getpass import os import pathlib import sys from typing import List, Optional from . impo...
facebookexperimental/eden
eden/fs/cli/systemd_service.py
Python
gpl-2.0
3,563
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 program is distrib...
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/addons/io_scene_obj/__init__.py
Python
gpl-3.0
12,097
#!/usr/bin/env python # -*- coding: utf-8 -*- import rss_sources, feedparser import requests, io, os, json, shutil from pprint import pprint from pyteaser import SummarizeUrl from shutil import copyfile import time, requests, urllib2 def getNews(rssDict, service, searchedImages): try: startTime = time.time() dir...
amtux/quick-news
services/news_fetcher.py
Python
gpl-2.0
4,581
""" Examples used in docstrings. """ # facetcolumns from petl import facetcolumns table = [['foo', 'bar', 'baz'], ['a', 1, True], ['b', 2, True], ['b', 3]] fc = facetcolumns(table, 'foo') fc['a'] fc['a']['foo'] fc['a']['bar'] fc['a']['baz'] fc['b'] fc['b']['foo'] fc['...
obsoleter/petl
docs/examples.py
Python
mit
39,606
from enum import Enum class MenuKey(Enum): buy_beverage = 1 open_fridge = 2 manage_beverages = 3 quit = 101 add = 102 delete = 103 class MenuEntry: def __init__(self, key, title, item = None): self.key = key self.title = title self.item = item
omgwtflaserguns/matomatpy
matomat/models/menu.py
Python
mit
303
""" Django settings for arda_db project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
rwspicer/ARDA
arda_db/arda_db/settings.py
Python
mit
2,996
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains th...
pyoceans/python-oceans
oceans/_version.py
Python
bsd-3-clause
18,426
# Bzrflag # Copyright 2008-2011 Brigham Young University # # This file is part of Bzrflag. # # Bzrflag 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 l...
sm-github/bzrflag
bzrflag/server.py
Python
gpl-3.0
26,751
from django.conf.urls import url from django.contrib.auth.decorators import login_required from .views import ( TicketDeleteView, TicketEditView, ) urlpatterns = [ url(r'^(?P<ticket_id>[0-9]+)/$', login_required(TicketEditView.as_view()), name='ticket_edit'), url(r'^(?P<ticket_id>[0-9]+)/dele...
prontotools/zendesk-tickets-machine
zendesk_tickets_machine/tickets/urls.py
Python
mit
404
from .base import BaseTestCase class BoundaryTestCase(BaseTestCase): abbr = 'ma' url_tmpl = '/api/v1/districts/boundary/{boundary_id}/' url_args = dict( abbr=abbr, boundary_id="ocd-division/country:us/state:oh/sldl:3" ) def test_boundary(self): expected_keys = set([ ...
mileswwatkins/billy
billy/web/api/tests/test_boundaries.py
Python
bsd-3-clause
510
"""Filter an aggregated coverage file, keeping only the specified targets.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re from .... import types as t from . import ( CoverageAnalyzeTargetsConfig, expand_indexes, generate_indexes, make_report, ...
emonty/ansible
test/lib/ansible_test/_internal/coverage/analyze/targets/filter.py
Python
gpl-3.0
3,581
"""\ Neurospin functions and classes for nipy. (c) Copyright CEA-INRIA-INSERM, 2003-2009. Distributed under the terms of the BSD License. http://www.lnao.fr functions for fMRI This module contains several objects and functions for fMRI processing. """ from numpy.testing import Tester import image_registration ...
yarikoptic/NiPy-OLD
nipy/neurospin/__init__.py
Python
bsd-3-clause
459
import sys from ctypes import * lib = cdll.LoadLibrary('./lib/libproxy_genesis.so') class genesis(object): def __init__(self): self.obj = lib.proxy_genesis_new() def printf(self, format, *args): sys.stdout.write(format % args) def details(self): lib.proxy_genesis_details(self.obj...
ederbsd/genesis
wrapper/python/genesis.py
Python
gpl-3.0
1,713
""" Each ElkM1 area will be created as a separate alarm_control_panel in HASS. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/alarm_control_panel.elkm1/ """ import voluptuous as vol import homeassistant.components.alarm_control_panel as alarm from homea...
tinloaf/home-assistant
homeassistant/components/alarm_control_panel/elkm1.py
Python
apache-2.0
7,820
import urllib2 import locale import logging log = logging.getLogger(__name__) from django.core.exceptions import ImproperlyConfigured from django.http import QueryDict from django.utils.http import urlencode from mezzanine.conf import settings from cartridge.shop.checkout import CheckoutError PAYPAL_NVP_API_ENDPOIN...
orlenko/bccf
src/cartridge/shop/payment/paypal.py
Python
unlicense
11,727
from __future__ import absolute_import, division, print_function from keyword import iskeyword import re import datashape from datashape import dshape, DataShape, Record, Var, Mono, Fixed from datashape.predicates import isscalar, iscollection, isboolean, isrecord import numpy as np from odo.utils import copydoc impo...
maxalbert/blaze
blaze/expr/expressions.py
Python
bsd-3-clause
22,980
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint from frappe import _ def execute(filters=None): if not filters: filters ={} days_since_last_order = filters.get(...
manassolanki/erpnext
erpnext/selling/report/inactive_customers/inactive_customers.py
Python
gpl-3.0
2,411
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Docstrings follow the numpy conventions described at: # https://numpydoc.readthedocs.io/en/latest/example.html#example """ Discovers the changes made by ``PortChange_Generatr`` and notifies a Slack Channel. Triggered by cloud watch events that are monitoring for sec...
Optum/ChaoSlingr
src/lambda/PortChange_Slack_Trackr.py
Python
apache-2.0
3,142
""" Do not use the special characters in a filename. Only alphabets, numbers and underbars can be used for a filename. == Vilolation == /testdir/test-1.c <== Violation. - is used. /testdir1/test!1.c <== Violation. ! is used == Good == testdir/test.c testdir1/test_1.c """ from nsiqcppstyle_reporter...
DLR-SC/tigl
thirdparty/nsiqcppstyle/rules/RULE_3_2_CD_do_not_use_special_characters_in_filename.py
Python
apache-2.0
1,419
# downscale the prepped cmip5 data downloaded using SYNDA for EPSCoR SC project # author: Michael Lindgren -- June 09, 2016 (UPDATED: Oct 28, 2016) if __name__ == '__main__': import glob, os, rasterio, itertools from functools import partial import downscale from downscale import preprocess, Mask, utils import num...
ua-snap/downscale
snap_scripts/epscor_sc/downscale_cmip5_epscor_sc_minmax.py
Python
mit
6,870
# -*- coding: utf-8 -*- """ pyvisa.compat ~~~~~~~~~~~~~ Compatibility layer. :copyright: 2014 by PyVISA Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import division, unicode_literals, print_function, absolute_import import sys PYTHON3 = ...
rubund/debian-pyvisa
pyvisa/compat/__init__.py
Python
mit
1,655
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ import json from datetime import datetime, timedelta from django.test import TestCase from django.contrib.auth.models import User from d...
mostateresnet/django-resnet-survey
survey/tests.py
Python
mit
30,921
import io from builtins import bytes, str from fro._implementation import chompers class Parser(object): """ An immutable parser. """ def __init__(self, chomper): self._chomper = chomper # public interface def parse(self, lines, loud=True): """ Parse an iterable co...
ethantkoenig/fro
fro/_implementation/parser.py
Python
mit
29,302
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-28 10:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("site_config", "0008_siteconfiguration_default_number_prefix")] operations = [ migrations...
monty5811/apostello
site_config/migrations/0009_siteconfiguration_sms_expiration_date.py
Python
mit
674
#!/usr/bin/python3 """v through is an arbitrary type corresponding to a node value in a tree. label is another arbitrary type representing all labels.""" """ root = None | info""" """ info = collections.namedtuple(label, v, [branchings])""" """ branching = root | (root, root)""" # The major differences between my...
ceridwen/combinators
yakker/history.py
Python
mit
925
class DecisionNode: """ Represents a node / leaf in a tree. :param col: Column of the variable to split in this node :param value: Value of the variable used to split :param result: Result contained in leaf nodes :param tb: Left branch of the split :param fb: Right branch of...
amstuta/pylearning
pylearning/trees/node.py
Python
mit
536
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Grab the list of databases to be exported in the MSG configuration file and export them to cloud storage. Files beyond a maximum limit are split according to the number of chunks set in the config file. Usage: python exportDBsToCloud.py """ __author__ = 'Danie...
Hawaii-Smart-Energy-Project/Maui-Smart-Grid
src/automated-scripts/exportDBsToCloud.py
Python
bsd-3-clause
2,686
# Copyright 2016 Ananya Mishra (am747@cornell.edu) # # 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 ...
juvoinc/airflow
airflow/contrib/auth/backends/google_auth.py
Python
apache-2.0
5,866
# -*- coding: utf-8 -*- # SyConn - Synaptic connectivity inference toolkit # # Copyright (c) 2016 - now # Max-Planck-Institute for Medical Research, Heidelberg, Germany # Authors: Sven Dorkenwald, Philipp Schubert, Jörgen Kornfeld import sys import cPickle as pkl from syconnfs.representations import super_segmentatio...
StructuralNeurobiologyLab/SyConnFS
syconnfs/qsub_scripts/QSUB_aggregate_segmentation_object_mappings.py
Python
gpl-2.0
670
import mcpi.minecraft as minecraft mc = minecraft.Minecraft.create() mc.setting("world_immutable", False)
mohsraspi/mhscs14
liam/settings.py
Python
gpl-2.0
107
# Copyright 2018 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
GoogleCloudPlatform/tensorflow-without-a-phd
tensorflow-rnn-tutorial/old-school-tensorflow/tutorial/__init__.py
Python
apache-2.0
573
#!/usr/bin/env python # use python3 import numpy as np import time #from dpLoadh5 import dpLoadh5 from dpFRAG import dpFRAG # labeled chunks #chunk_range_beg = 17,19,2, 17,23,1, 22,23,1, 22,18,1, 22,23,2, 19,22,2 chunk = [17,19,2] size = [128,128,128] offset = [0,0,0] has_ECS = True #username = 'watkinspv' user...
elhuhdron/emdrp
emdrp/emdrp/scripts/driver-cpu-FRAG.py
Python
mit
3,923
#!/usr/bin/env python import os from setuptools import setup, find_packages def file_content(filename): '''Load file content''' with open(filename) as ifile: return ifile.read() def pip(filename): """Return path to pip requirements file""" return file_content(os.path.join('requirements', f...
opendatateam/udata
setup.py
Python
agpl-3.0
2,170
#!/usr/bin/python # # The Python Imaging Library. # $Id$ # # print image files to postscript printer # # History: # 0.1 1996-04-20 fl Created # 0.2 1996-10-04 fl Use draft mode when converting. # 0.3 2003-05-06 fl Fixed a typo or two. # from __future__ import print_function import getopt import os import s...
paran0ids0ul/infernal-twin
build/pillow/build/scripts-2.7/pilprint.py
Python
gpl-3.0
2,393
""" raven.contrib.django.urls ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ try: from django.conf.urls import patterns, url except ImportError: # for Django version less then 1.4 from django.conf.urls....
collective/mr.poe
raven/contrib/django/urls.py
Python
bsd-3-clause
560
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
crdoconnor/cookiecutter-django
{{cookiecutter.repo_name}}/config/settings/local.py
Python
bsd-3-clause
2,171
# Copyright 2017 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...
adit-chandra/tensorflow
tensorflow/python/training/server_lib_same_variables_clear_test.py
Python
apache-2.0
2,744
#!/usr/bin/env python # # Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
alkyl1978/gnuradio
gr-uhd/apps/uhd_siggen_base.py
Python
gpl-3.0
17,148
# camera.py # Source: https://github.com/DrGFreeman/rps-cv # # MIT License # # Copyright (c) 2017-2019 Julien de la Bruere-Terreault <drgfreeman@tuta.io> # # 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 ...
DrGFreeman/rps-cv
rpscv/camera.py
Python
mit
6,769
# -*- coding: utf-8 -*- from imgix import UrlBuilder DOMAIN = 'testing.imgix.net' TOKEN = 'MYT0KEN' JPG_PATH = 'image.jpg' def test_readme_500_to_2000(): ub = UrlBuilder(DOMAIN, include_library_param=False) actual = ub.create_srcset(JPG_PATH, start=500, stop=2000) expected = "https://testing.imgix.net/i...
imgix/imgix-python
tests/test_readme.py
Python
bsd-2-clause
2,675
"""Created on Sat Sep 10 2016 14:04. @author: Nathan Budd """ import unittest import numpy as np import numpy.matlib as np import matplotlib.pyplot as plt from ..thrust_constant import ThrustConstant from ..model_coe import ModelCOE from ..gauss_lagrange_planetary_eqns import GaussLagrangePlanetaryEqns from ..perturb_...
lasr/orbital_mechanics
dynamics/tests/test_thrust_constant.py
Python
mit
1,453
from django.conf.urls import url from . import views urlpatterns = [ url( r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[\w-]+)/$', views.BlogDateDetailView.as_view(), name="entry" ), url( r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', ...
xavierdutreilh/djangoproject.com
blog/urls.py
Python
bsd-3-clause
754
import PySide import PySide.QtCore from PySide.QtGui import QApplication, QDialog from gui import Ui_About class About(QDialog, Ui_About): """ Displays the About window. """ def __init__(self, parent=None): super(About, self).__init__(parent) self.setupUi(self) app = PySide.QtCore....
tmtowtdi/MontyLacuna
gui/ships/lib/widgets/about.py
Python
mit
684
# swift_build_support/__init__.py - Helpers for building Swift -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt ...
khizkhiz/swift
utils/swift_build_support/swift_build_support/__init__.py
Python
apache-2.0
700
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-06 13:24 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('badges', '0003_badgedesign_bg_color'), ] operations = ...
helfertool/helfertool
src/badges/migrations/0004_auto_20160306_1424.py
Python
agpl-3.0
638
#!/usr/bin/env python import sys, time, random # print >> sys.stderr, sys.argv n = int(sys.argv[1]) sys.stdout.write(str(n*n)) sys.stdout.flush() sys.exit(0)
jasonzliang/dcs
test_tasks/square.py
Python
unlicense
158
''' See more here: http://www.pymolwiki.org/index.php/com DESCRIPTION get the center of mass of selection or move selection to the origin. ARGUMENTS selection = string: a valid PyMOL selection {default: all} center = 0 or 1: if center=1 center the selection {default: 0} returns: cente...
julianheinrich/viewpoints
com.py
Python
mit
2,627
from math import sin sin
indianajohn/ycmd
ycmd/tests/python/testdata/goto_file4.py
Python
gpl-3.0
25
#!/usr/bin/env python import pytest from utils import * from fireplace.dsl import * from fireplace.exceptions import * from fireplace.card import Card def test_selector(): game = prepare_game() game.player1.discard_hand() alex = game.player1.give("EX1_561") selector = PIRATE | DRAGON + MINION assert len(selector...
smallnamespace/fireplace
tests/test_dsl.py
Python
agpl-3.0
5,027
"""Initial migration Revision ID: 771555241255 Revises: 1ed43776064f Create Date: 2017-04-24 09:15:59.549855 """ # revision identifiers, used by Alembic. revision = '771555241255' down_revision = '1ed43776064f' branch_labels = ('hotel',) depends_on = None from alembic import op import sqlalchemy as sa import sideb...
magfest/hotel
alembic/versions/771555241255_initial_migration.py
Python
agpl-3.0
2,888
from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa from sqlalchemy import Integer, PickleType, String, ForeignKey import operator from sqlalchemy import testing from sqlalchemy.util import OrderedSet from sqlalchemy.orm import mapper, relationship, create_session, \ PropComp...
wfxiang08/sqlalchemy
test/orm/test_merge.py
Python
mit
45,731
# General options INTERVAL = 10 # default interval in seconds STATSD_HOST = 'localhost' STATSD_PREFIX = '' INSTALLED_SENDERS = ( 'Diskf', 'Rabbitmq', ) # Senders options DISKF = { 'interval': 60, 'filesystem': ('/dev/root',), } RABBITMQ = { 'interval': 10, 'vhost': 'locashost', # Items...
moiseshiraldo/pystats-sender
stats_sender/settings.py
Python
gpl-3.0
551
import functools __all__ = [ 'replace_args', ] def replace_args(attribute=None): """ Decorator to Apply replacements in a list of command line arguments. :param attribute: Class attribute name which stores replacement rules. :type attribute: ``str`` :return: :rtype: ``callable`` """ ...
armab/st2contrib
packs/ansible/actions/lib/shell.py
Python
apache-2.0
816
#!/usr/bin/env python # -*- coding: utf-8 -*- #=============================================================================== # Copyright 2012 zod.yslin # # 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 ...
yslin/tools-zodlin
ubuntu/vim/script/debug/python/Listing1.py
Python
apache-2.0
1,526
from __future__ import division from itertools import chain from math import log10, floor, ceil def largest_palindrome(max_factor, min_factor): return get_extreme_palindrome_with_factors(max_factor, min_factor, "largest") def smallest_palindrome(max_factor, min_fac...
N-Parsons/exercism-python
exercises/palindrome-products/example.py
Python
mit
4,232
class Update: def __init__(self, name, candidate_version, baseversion_hash): self.name = name self.candidateVersion = candidate_version self.baseVersionHash = baseversion_hash
upd89/agent
upd89/classes/update.py
Python
mit
205
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distributed ...
erikriver/eduIntelligent-cynin
src/ubify.viewlets/ubify/viewlets/browser/interfaces.py
Python
gpl-3.0
7,228
# Copyright 2013-2016 DataStax, 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...
Richard-Mathie/cassandra_benchmark
vendor/github.com/datastax/python-driver/tests/integration/standard/test_connection.py
Python
apache-2.0
13,495
#!/usr/bin/env python """ Deployment file to facilitate releases of symmetry. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Apr 29, 2012" import g...
materialsvirtuallab/nano106
fabfile.py
Python
bsd-3-clause
2,036
#!/usr/bin/python # Copyright (c) 2013 The Native Client 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 argparse import collections import datetime import email.mime.text import getpass import os import re import smtplib import...
wilsonianb/nacl_contracts
build/update_pnacl_tool_revisions.py
Python
bsd-3-clause
16,688
from unittest import TestCase from webtest import TestApp from nose.tools import * # noqa from ..main import app class TestAUser(TestCase): def setUp(self): self.app = TestApp(app) def tearDown(self): pass def test_can_see_homepage(self): # Goes to homepage res = self.ap...
vfulco/killtheyak.github.io
killtheyak/test/webtest_tests.py
Python
mit
1,409
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-05-16 22:32 from __future__ import unicode_literals import django.db.models.deletion import jsonfield.fields import mptt.fields from django.db import migrations from django.db import models import kolibri.core.content.models class Migration(migrations.Migr...
lyw07/kolibri
kolibri/core/content/migrations/0001_initial.py
Python
mit
1,165
""" This page is in the table of contents. Mill is a script to mill the outlines. ==Operation== The default 'Activate Mill' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called. ==Settings== ===Add Loops=== ====Add Inner Loops==== Default is on. Wh...
makerbot/ReplicatorG
skein_engines/skeinforge-47/skeinforge_application/skeinforge_plugins/craft_plugins/mill.py
Python
gpl-2.0
16,690
""" # Copyright (c) 04 2015 | surya # 20/04/15 nanang.ask@kubuskotak.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 2 # of the License, or (at your option) any later ve...
suryakencana/niimanga
niimanga/libs/manga.py
Python
lgpl-3.0
2,684
# -*- coding: utf-8 -*- import dbm from urlparse import parse_qs from user_credentials_dbm import dbm_create, dbm_fetch from packages.clint import resources from packages import requests from packages.requests_oauthlib import OAuth1 # these are the client key and secret needed # for oauth authentication with the tw...
raqqun/tweetcommander
oauth.py
Python
gpl-3.0
2,900
from GPIOLibrary import GPIOProcessor import time GP = GPIOProcessor() # GPIO Assignments #Din = 27 #A1 = 34 Green #A2 = 33 White #A3 = 24 Black #A4 = 26 Yellow #PIR = 29 #Ind = 30 Din = GP.getPin27() Din.input() A1 = GP.getPin34() A1.out() A2 = GP.getPin33() A2.out() A3 = GP.getPin24() A...
IOT-410c/IOT-DB410c-Course-3
Modules/Module_6_Infrared_Sensors/Lesson_3_IR_Remote/IRRemote.py
Python
apache-2.0
3,447
#!/usr/bin/env python ''' Utility script for computing source separation metrics Usage: ./separation_eval.py PATH_TO_REFERENCE_WAVS PATH_TO_ESTIMATED_WAVS ''' import argparse import sys import os import glob import os import numpy as np import eval_utilities import mir_eval def process_arguments(): '''Argpars...
mrgloom/mir_eval
evaluators/separation_eval.py
Python
mit
2,812
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from xenon.proto import xenon_pb2 as xenon_dot_proto_dot_xenon__pb2 class FileSystemServiceStub(object): """XenonFiles represents the Xenon nl.esciencecenter.xenon.filesystems.FileSystem class. This interface contains various metho...
NLeSC/pyxenon
xenon/proto/xenon_pb2_grpc.py
Python
apache-2.0
52,079
from django.urls import path from . import views app_name = 'tariff_app' urlpatterns = [ path('', views.TariffsListView.as_view(), name='home'), path('<int:tarif_id>/', views.edit_tarif, name='edit'), path('<int:tarif_id>/users/', views.ServiceUsers.as_view(), name='service_users'), path('add/', view...
nerosketch/djing
tariff_app/urls.py
Python
unlicense
675
#!/bin/env python import sys import uwhd import time import random # Start up the GPIO for talking to the 32x32 panels io = uwhd.GPIO() if not io.Init(): print 'Try running this as:' print '' print '$ sudo PYTHONPATH=path/to/build/lib python uwhd-demo.py' sys.exit(-1) print "GPIO inited" # number of rows of...
jroelofs/uwh-display
tools/uwhd-demo-py/uwhd-demo.py
Python
bsd-3-clause
2,220
# Copyright (C) 2018 Camptocamp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': """Oneshot cron""", 'summary': """Allows creating of single-use disposable crons.""", 'category': "Extra Tools", 'version': "11.0.1.0.0", 'author': "Camptocamp, " "Odoo Community A...
brain-tec/server-tools
base_cron_oneshot/__manifest__.py
Python
agpl-3.0
530
class Particle: """ Class to represent a single particle. Keep track of the start location and path of a particle. """ def __init__(self, id, base_time, timestep, start_lat, start_lon): self.id = id self.base_time = base_time self.timestep = timestep self.curr_lat ...
nicjhan/mom-particles
particle.py
Python
gpl-2.0
2,027
""" add workbench username to user Revision ID: 8cf88e6f71d Revises: 30b4cd1b3ebf Create Date: 2015-04-08 14:32:01.562070 """ # revision identifiers, used by Alembic. revision = '8cf88e6f71d' down_revision = '30b4cd1b3ebf' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def u...
NERC-CEH/jules-jasmin
majic/scripts/versions/8cf88e6f71d_add_workbench_username.py
Python
gpl-2.0
636
#!/usr/local/bin/python """ Web app for displaying survey results """ import json import pandas as pd from flask import Flask, render_template from flask_wtf import Form from wtforms import SelectMultipleField, SubmitField app = Flask(__name__) app.secret_key = 'hard to guess string' DF = pd.read_csv('static/data/r...
mtpain/decision_tool
app.py
Python
mit
3,817
import factory import mock from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User from django.test import TestCase from lizard_map import coordinates from lizard_neerslagradar import models # Found by calling coordinates.rd_to_wgs84 on 150000 450000 TOREN_AMERSFOORT = (5.314...
lizardsystem/lizard-neerslagradar
lizard_neerslagradar/tests/test_models.py
Python
gpl-3.0
4,024
#!/usr/bin/env python2.7 """ this file generates the README.md file containing images and a tutorial on secp256k1 operations. """ from grunt import * secp256k1_eq = "y^2 = x^3 + 7" md_file = "README.md" import sys markdown = True if "-m" in sys.argv else False init_grunt_globals(markdown, md_file) if markdown: imp...
mulllhausen/visual-secp256k1
main.py
Python
gpl-2.0
12,311
########################################################################## # # Copyright (c) 2021, Cinesite VFX Ltd. 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 ...
hradec/gaffer
startup/gui/lightEditor.py
Python
bsd-3-clause
3,479
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
fluxer/spm
nuitka/nuitka/optimizations/VariableTraces.py
Python
gpl-2.0
13,195
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
sergiusens/snapcraft
snapcraft/cli/_command_group.py
Python
gpl-3.0
2,446
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # 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; version 2.1 only. # # This program is distributed in the hope that it will be u...
pritha-srivastava/sm
drivers/SRCommand.py
Python
lgpl-2.1
14,893
""" Support for Keene Electronics IR-IP devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/remote.kira/ """ import logging import functools as ft import homeassistant.components.remote as remote from homeassistant.helpers.entity import Entity from...
shaftoe/home-assistant
homeassistant/components/remote/kira.py
Python
apache-2.0
2,129
from django import forms from mozdns.forms import BaseForm from mozdns.nameserver.models import Nameserver from mozdns.address_record.models import AddressRecord from core.registration.static.models import StaticReg class NameserverForm(BaseForm): class Meta: model = Nameserver exclude = ('addr_g...
mozilla/inventory
mozdns/nameserver/forms.py
Python
bsd-3-clause
1,846
"""Support for BSH Home Connect appliances.""" from datetime import timedelta import logging from requests import HTTPError import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, Platform from homeassistant.core import HomeAss...
home-assistant/home-assistant
homeassistant/components/home_connect/__init__.py
Python
apache-2.0
2,825
############# # Count number of strings in list that are the same # # ############# from collections import defaultdict import os import numpy as np import cPickle as pickle import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap data, in_header, np_soundings = pickle.load(open('india_radiosonde_aug...
peterwilletts24/Python-Scripts
plot_scripts/Radiosonde/plot_radiosonde_map_loc_no.py
Python
mit
1,971
# -*- coding: utf-8 -*- """ Copyright (C) 2014 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # Zato from zato.common import PUB_SUB from zato.server.service import AsIs, Int,...
alirizakeles/zato
code/zato-server/src/zato/server/service/internal/pubsub/message.py
Python
gpl-3.0
3,493
"""Code Wars kata https://www.codewars.com/kata/binary-tree-compare """ # return True if the two binary trees rooted and a and b are equal in value and structure # return False otherwise def compare(a, b): # take care of NoneTypes if a is None and b is None: return True if a is None and b is not ...
Bl41r/code-katas
binary-tree-compare.py
Python
mit
1,380
# Copyright 2020 Timothy Trippel # # 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 writ...
googleinterns/hw-fuzzing
experiment_scripts/lock_config_dict.py
Python
apache-2.0
1,144
import random from random import sample from traceback import format_exc import re from navmazing import NavigateToSibling, NavigateToAttribute from widgetastic.utils import VersionPick, Version from widgetastic.widget import Text, View, TextInput from widgetastic_patternfly import ( SelectorDropdown, Dropdown, Bo...
mfalesni/cfme_tests
cfme/containers/provider/__init__.py
Python
gpl-2.0
23,222
import traceback TRACE_STACK = [] class Trace(object): def __init__(self, exception, stack=None): if not isinstance(exception, Exception): raise ValueError("Expected an Exception object as first argument") if not stack: stack = traceback.extract_stack() # pop off current frame and initia...
mvanveen/catcher
catcher.py
Python
mit
1,373
# pylint: disable=unused-import """ Python APIs exposed by the bulk_email app to other in-process apps. """ # Public Bulk Email Functions from __future__ import absolute_import from bulk_email.models_api import ( is_bulk_email_enabled_for_course, is_bulk_email_feature_enabled, is_user_opted_out_for_course...
ESOedX/edx-platform
lms/djangoapps/bulk_email/api.py
Python
agpl-3.0
899
''' Generates a visual diff of all pending changes in the local SVN checkout. Launch with --help to see more information. Copyright 2012 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ''' # common Python modules import optparse import os import re impo...
Gateworks/skia
tools/svndiff.py
Python
bsd-3-clause
5,474
"""Make the custom certificate and private key files used by test_ssl and friends.""" import os import shutil import sys import tempfile from subprocess import * req_template = """ [req] distinguished_name = req_distinguished_name x509_extensions = req_x509_extensions prompt ...
slozier/ironpython2
Src/StdLib/Lib/test/make_ssl_certs.py
Python
apache-2.0
6,854