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
# Copyright 2009-2014 Justin Riley # # This file is part of TethysCluster. # # TethysCluster is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # la...
tethysplatform/TethysCluster
tethyscluster/commands/listvolumes.py
Python
lgpl-3.0
2,961
# -*- coding: utf-8 -*- ################################################################### # This widget will display the next appointment on your calendar in # the qtile status bar. Appointments within the "reminder" time will be # highlighted. Authentication credentials are stored on disk. # # This widget uses the k...
zordsdavini/qtile
libqtile/widget/khal_calendar.py
Python
mit
5,533
from .utils import InvalidLTIRequestError from .launch_params import LaunchParams from .tool_base import ToolBase from oauthlib.oauth1 import SignatureOnlyEndpoint from oauthlib.oauth1.rfc5849 import CONTENT_TYPE_FORM_URLENCODED from requests.structures import CaseInsensitiveDict from .outcome_request import OutcomeR...
ubc/compair
lti/tool_provider.py
Python
gpl-3.0
6,430
from setuptools import setup # Remove build status and move Gitter link under title for PyPi README = open('README.rst').read() \ .replace('|Build Status|', '', 1) \ .replace('|Gitter|', '', 1) \ .replace('===\n', '===\n\n|Gitter|\n') setup( name='django-cacheops', version='2.4.1', ...
andwun/django-cacheops
setup.py
Python
bsd-3-clause
1,655
# coding=utf-8 import unittest """1003. Check If Word Is Valid After Substitutions https://leetcode.com/problems/check-if-word-is-valid-after-substitutions/description/ We are given that the string `"abc"` is valid. From any valid string `V`, we may split `V` into two pieces `X` and `Y` such that `X + Y` (`X` concat...
openqt/algorithms
leetcode/python/lc1003-check-if-word-is-valid-after-substitutions.py
Python
gpl-3.0
1,758
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report from . import wizard from . import models
OCA/l10n-italy
account_vat_period_end_statement/__init__.py
Python
agpl-3.0
134
# Copyright (c) 2011, Jeffrey Aylesworth <jeffrey@aylesworth.ca> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" ...
Wen777/beets
beetsplug/mbcollection.py
Python
mit
3,804
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['RelativeDifference'] , ['MovingMedian'] , ['Seasonal_WeekOfYear'] , ['SVR'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_MovingMedian_Seasonal_WeekOfYear_SVR.py
Python
bsd-3-clause
174
# coding=utf-8 # ============================================================================== """Entrenamiento del modelo""" # ============================================================================== from __future__ import absolute_import from __future__ import division from __future__ import print_function...
NicolasPresta/ReconoBook
reconobook_train.py
Python
mit
5,180
import sys class Token( object ): def __init__( self ): self.kind = 0 # token kind self.pos = 0 # token position in the source text (starting at 0) self.col = 0 # token column (starting at 0) self.line = 0 # token line (starting at 1) self.val = u'' # to...
bhgv/bCNC
GCode_parser/Parser_engine/py/tools/pycoco/testSuite/TestResOK_Scanner.py
Python
gpl-2.0
6,427
# -*- coding: utf-8 -*- # (c) 2015 Tuomas Airaksinen # # This file is part of Automate. # # Automate 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...
tuomas2/automate
src/automate/actuators/__init__.py
Python
gpl-3.0
911
#!/usr/bin/env python #------------------------------------------------------------------------------ # # This tool extracts a valid data mask from the provided raster image. # The input image can be in arbitrary image format supported by GDAL # The output will be always produced in GeoTIFF (or TIFF if no geo-co...
DREAM-ODA-OS/tools
imgproc/extract_mask2.py
Python
mit
4,765
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # from ..compat import CompatCommand, CompatMethod, CompatObject Object = CompatObject class Command(CompatCommand): api_version = u'2.156' class Method(Command, CompatMethod): pass
apophys/freeipa
ipaclient/remote_plugins/2_156/__init__.py
Python
gpl-3.0
265
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
takeshineshiro/neutron
neutron/db/migration/alembic_migrations/versions/kilo_release.py
Python
apache-2.0
844
from __future__ import print_function # reads in tide_consts.txt and sets basically the same info (a subset) of # what tide_data.py sets # lun_node # v0u # omegas # const_names import os, os.path import numpy as np fp = open(os.path.join(os.path.dirname(__file__),'tide_consts.txt')) def tokenize(fp): """ genera...
rustychris/stompy
stompy/tide_consts.py
Python
mit
1,687
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. from __future__ import print_function import sys import os from os import path import time impo...
UK992/servo
tests/heartbeats/characterize_android.py
Python
mpl-2.0
4,080
import datetime import inspect import numpy.testing as npt import os.path import pandas as pd import pandas.util.testing as pdt import sys from tabulate import tabulate import unittest # #find parent directory and import model # parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) # sy...
puruckertom/ubertool
ubertool/stir/tests/test_stir_unittest.py
Python
unlicense
25,350
# Blind source separation using FastICA and PCA # Author : Aleyna Kara # This file is based on https://github.com/probml/pmtk3/blob/master/demos/icaDemo.m import superimport from sklearn.decomposition import PCA, FastICA import numpy as np import matplotlib.pyplot as plt import pyprobml_utils as pml def plot_signals...
probml/pyprobml
scripts/ica_demo.py
Python
mit
1,735
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para Google Video basado en flashvideodownloader.org # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # ------------------------------------------------------------ import re from co...
neno1978/pelisalacarta
python/main-classic/servers/googlevideo.py
Python
gpl-3.0
2,080
""" This module gets only the headers from a Wikipedia SQL-formatted dump Usage: python3 getHeaders.py [SQL DUMP FILENAME] [OUTPUT FILENAME] """ import re import sys input = sys.argv[1] output = sys.argv[2] print("input:",input) print("output:",output) ## RegEx Expressions ## startpattern = re.compile('^CREATE TABLE...
elischutze/WikiPlay
scripts/getHeaders.py
Python
mit
954
'''@package classifiers Contains the neural net classifiers (e.g. dnn) and their components (e.g. layers) ''' from . import activation, classifier, layer, asr, lm
JeroenBosmans/nabu
nabu/neuralnetworks/classifiers/__init__.py
Python
mit
172
'''Acts as an interface between what Flask serves and what goes on in the rest of the application. ''' from avenue import app from avenue.database import content from flask import render_template, make_response, redirect from os import path import yaml def read_data(filename): '''Reads in data from a given YML fil...
Aethaeryn/avenue
avenue/web.py
Python
mit
3,201
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.rb.controllers import RHRoomBookingBase from indico.modules.rb.views import WPRoomBook...
pferreir/indico
indico/modules/rb/controllers/frontend.py
Python
mit
456
import datetime from pprint import pprint from bs4 import BeautifulSoup from dateutil.parser import * from urllib.request import urlopen from DBManager import DBManager def calc_timedelta(fastest_time, driver_time): try: fastest = datetime.datetime.strptime(fastest_time, "%M:%S.%f") driver_best ...
tarunsab/F1Portal
backend/Scraper.py
Python
bsd-3-clause
7,663
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
iw3hxn/LibrERP
dt_price_security/models/product.py
Python
agpl-3.0
3,879
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Licen...
JKarathiya/Lean
Algorithm.Framework/Portfolio/ConfidenceWeightedPortfolioConstructionModel.py
Python
apache-2.0
3,261
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ **For a faster implementation of LDA (parallelized for multicore machines), see** :mod:`gensim.models.ldamulticore`. Latent Dirich...
ELind77/gensim
gensim/models/ldamodel.py
Python
lgpl-2.1
50,663
from distutils.core import setup version = '1.1.1' setup(name='CacheGenerator', version=version, description="CacheGenerator for Django", author="Ricardo Santos", author_email="ricardo@getgears.com", url="http://github.com/ricardovice/CacheGenerator/", packages = ['cachegenerator']...
ricardovice/CacheGenerator
setup.py
Python
mit
329
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
brownian/frescobaldi
frescobaldi_app/widgets/listedit.py
Python
gpl-2.0
6,108
import functools import operator import warnings from collections import OrderedDict from contextlib import suppress from distutils.version import LooseVersion import numpy as np from .. import Variable, coding from ..coding.variables import pop_to from ..core import indexing from ..core.utils import FrozenOrderedDic...
shoyer/xray
xarray/backends/netCDF4_.py
Python
apache-2.0
18,019
# -*- coding: utf-8 -*- import os from django.conf import settings from django.core.exceptions import PermissionDenied from django.core.files.storage import FileSystemStorage from django.forms import Form from django.template.response import SimpleTemplateResponse from django.urls import NoReverseMatch from formtool...
benzkji/django-cms
cms/wizards/views.py
Python
bsd-3-clause
5,882
#!/usr/bin/env python # - # vi:set sw=4 sts=4 ts=4 et nocindent: # # Copyright (C) 2012 Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> # # 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; versio...
Jannis/baserock-installer
ui/pages/configurevmpage.py
Python
gpl-2.0
3,534
"""passlib.apache - apache password support""" # XXX: relocate this to passlib.ext.apache? #============================================================================= # imports #============================================================================= from __future__ import with_statement # core from hashlib imp...
theguardian/JIRA-APPy
lib/passlib/apache.py
Python
gpl-2.0
39,977
# -*- coding: utf-8 -*- __author__ = "kenzhaoyihui" import math def radix_sort(lists, radix=10): k = int(math.ceil(math.log(max(lists), radix))) bucket = [[] for i in range(radix)] for i in range(1, k+1): for j in lists: bucket[j/(radix**(i-1)) % (radix**i)].append(j) del lists[...
kenzhaoyihui/lettcode
L_algorithms/other/Sorting/radix_sort.py
Python
mit
409
# allowable multiple choice node and edge features allowable_features = { 'possible_atomic_num_list' : list(range(1, 119)) + ['misc'], 'possible_chirality_list' : [ 'CHI_UNSPECIFIED', 'CHI_TETRAHEDRAL_CW', 'CHI_TETRAHEDRAL_CCW', 'CHI_OTHER' ], 'possible_degree_list' : [0...
snap-stanford/ogb
ogb/utils/features.py
Python
mit
6,795
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import patch from mock import Mock from diamond.collector import Collector from numa import Num...
venkey-ariv/fullerite
src/diamond/collectors/numa/test/testnuma.py
Python
apache-2.0
1,587
#!/usr/bin/env python3 import os import email import urllib.parse import urllib.request import http.server import unittest import hashlib from test import support threading = support.import_module('threading') here = os.path.dirname(__file__) # Self-signed cert file for 'localhost' CERT_localhost = os.path.join(here...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.3.0/Lib/test/test_urllib2_localnet.py
Python
mit
21,893
''' Replaces the default shape key panel with a Blabels panel. Adds the ability to sort shape keys by labels, in addition to a number of other shape key related operations.''' ''' ******************************************************************************* License and Copyright Copyright 2012 Jordan Huecks...
assumptionsoup/blabels
shape_key_panel.py
Python
gpl-3.0
34,839
# This file is part of beets. # Copyright 2011, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, ...
ngokevin/beets
beets/ui/commands.py
Python
mit
40,786
# -*- coding: utf-8 -*- # Resource object code # # Created: Sun Oct 21 12:16:25 2007 # by: The Resource Compiler for PyQt (Qt v4.3.2) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x23\x2f\ \x2f\ \x2a\x20\x58\x50\x4d\x20\x2a\x2f\x0a\x73\x74\x61\x...
perrygeo/archive
qgis/plugin_installer/resources.py
Python
mit
38,253
import csv import numpy as np import scipy as sp from sys import argv def aggregate(df, by=0,to=1,func=np.sum): Dat = dict() ColBy = df.T[by] ColTo = df.T[to] ColToInt = [] for i in range(0,len(ColTo)): ColToInt.append(int(ColTo[i])) #print "By : %r " % (ColBy) #print "To : %r " % (ColToInt) ColTo = np.arra...
mhnatiuk/phd_sociology_of_religion
terms_pl/topic_freq.py
Python
gpl-2.0
931
# Class for pybord watchdog timer import stm, pyb @micropython.asm_thumb def clz(r0): clz(r0, r0) # return no. of leading zeros in passed integer class wdog(object): def start(self, ms): assert ms <= 32768 and ms >= 1, "Time value must be from 1 to 32768mS" prescaler = 23 - clz(ms -1) ...
peterhinch/micropython-samples
watchdog/wdog.py
Python
mit
1,006
# # This file is part of EXECTASK. # # EXECTASK 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. # # EXECTASK is distributed in the hope...
miquelo/exectask
packages/exectask/expression.py
Python
gpl-3.0
2,702
from app.questionnaire_state.state_repeating_answer_question import RepeatingAnswerStateQuestion from app.schema.question import Question class RepeatingAnswerQuestion(Question): def __init__(self): super().__init__() @staticmethod def get_state_class(): return RepeatingAnswerStateQuestio...
qateam123/eq
app/schema/questions/repeating_answer_question.py
Python
mit
322
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
openstack/networking-sfc
networking_sfc/__init__.py
Python
apache-2.0
670
import numpy as np from bokeh.document import Document from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid from bokeh.models.glyphs import Patch from bokeh.plotting import show N = 30 x1 = np.linspace(-2, 2, N) x2 = x1[::-1] y1 = x1**2 y2 = x2**2 + (x2+2.2) x = np.hstack((x1, x2)) y = np.hs...
almarklein/bokeh
tests/glyphs/Patch.py
Python
bsd-3-clause
987
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from caffe2.python import core from caffe2.python.test_util import rand_array import caffe2.python.hypothesis_test_util as hu from hypothesis import giv...
xzturn/caffe2
caffe2/python/operator_test/sparse_ops_test.py
Python
apache-2.0
3,196
'''Michael Lange <klappnase (at) freakmail (dot) de> The ToolTip class provides a flexible tooltip widget for Tkinter; it is based on IDLE's ToolTip module which unfortunately seems to be broken (at least the version I saw). INITIALIZATION OPTIONS: anchor : where the text should be positioned inside the widget, ...
divyamrast/grl
bin/tooltip.py
Python
lgpl-3.0
7,420
import csv import sys import numpy import math from numpy import genfromtxt from numpy.linalg import inv X_train_CSV = sys.argv[1] y_train_CSV = sys.argv[2] X_test_CSV = sys.argv[3] X_train = genfromtxt(X_train_CSV, delimiter=',') y_train = genfromtxt(y_train_CSV, delimiter=',') X_test = genfromtxt(X_test_CSV, delimi...
Labonneguigue/Machine-Learning
Project 2/hw2_classification.py
Python
mit
2,611
# 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 may ...
Azure/azure-sdk-for-python
sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/__init__.py
Python
mit
574
# -*- coding: utf-8 -*- # # The Linux Kernel documentation build configuration file, created by # sphinx-quickstart on Fri Feb 12 13:51:46 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
flaming-toast/linux-jeyu
Documentation/conf.py
Python
gpl-2.0
16,317
from django import shortcuts from django.views import generic import models class ArticleListView(generic.ListView): paginate_by = 8 kind = None def get_queryset(self): if self.kind: return models.Article.objects.published().filter(kind=self.kind) else: return mo...
megaprojectske/megaprojects.co.ke
megaprojects/articles/views.py
Python
apache-2.0
1,427
""" Management command to seed default permissions and roles. """ from django.core.management.base import BaseCommand from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles class Command(BaseCommand): help = 'Seed default permisssions a...
edx-solutions/edx-platform
lms/djangoapps/discussion/management/commands/seed_permissions_roles.py
Python
agpl-3.0
644
""" Test for the SmartThings climate platform. The only mocking required is of the underlying SmartThings API object so real HTTP calls are not initiated during testing. """ from pysmartthings import Attribute, Capability from pysmartthings.device import Status import pytest from homeassistant.components.climate.cons...
joopert/home-assistant
tests/components/smartthings/test_climate.py
Python
apache-2.0
21,611
#!/usr/bin/python # This script reads in a list of accounts from a simple text file, # and queries AD to determine the status of each account (active, disabled, not-found). # Finally, an e-mail alert is sent out with a list of disabled or 'not found' accounts # # This script relies on the following libraries: # -...
jklee7/python101
17. LDAP queries.py
Python
unlicense
4,583
from typing import Any, List, Tuple, Callable, Optional, TypeVar, cast, Dict, Union from ..model import Model from ..config import registry from ..types import Array2d, Ragged from ..util import get_width from .noop import noop from ..types import XY_XY_OutT InT = TypeVar("InT", bound=Any) OutT = TypeVar("OutT", bou...
spacy-io/thinc
thinc/layers/concatenate.py
Python
mit
4,980
# # soundcheck.py # Album Sound Check # # Created by Scott Robertson on 1/17/09. # Copyright (c) 2009 __MyCompanyName__. All rights reserved. # from __future__ import division from mutagen.mp3 import MP3 import tag_wrapper import math from Foundation import NSLog class SoundCheck(object): def __init__(self, f...
spr/album-sound-check
soundcheck.py
Python
gpl-2.0
2,359
""" kombu.messaging =============== Sending and receiving messages. :copyright: (c) 2009 - 2011 by Ask Solem. :license: BSD, see LICENSE for more details. """ from itertools import count from kombu import entity from kombu.compression import compress from kombu.serialization import encode from kombu.syn import bloc...
pantheon-systems/kombu
kombu/messaging.py
Python
bsd-3-clause
14,101
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Viper analysis plugin.""" import unittest try: import mock # pylint: disable=import-error except ImportError: from unittest import mock from dfvfs.path import fake_path_spec from plaso.analysis import viper from plaso.lib import definitions from ...
Onager/plaso
tests/analysis/viper.py
Python
apache-2.0
4,426
# Import Parent import test from testresult import TestResult #ValidityTest class Test(test.Test): """docstring for ClassName""" def __init__(self): self.name = "SSLv2 Check" self.weight = 100 self.required = False # Test def performTest(self, scanResult): if scanResult.sslv2Enabled == True: # Te...
darckbit/ssl-health
src/tests/versionCheckSSLv2.py
Python
gpl-3.0
465
# -*- coding: utf-8 -*- # Copyright (C) 2016-2021 Mathew Topper # # 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...
DTOcean/dtocean-core
dtocean_core/interfaces/hydrodynamics.py
Python
gpl-3.0
41,993
import sys import getopt import random import numpy as np import utils as utils def estimation(K, means, points, stddev): points_size = len(points) expectations = np.zeros((points_size, K)) for i in range(0, points_size): total = 0 current_point = points[i] for j in range(0, K): ...
anamariad/ML
Clusterization/clusterization/em2d_general.py
Python
apache-2.0
3,282
#!/bin/python #coding=utf8 import roomai.games.common logger = roomai.get_logger() class AbstractStatePrivate(object): ''' The Abstract class of the private state. The information in the private state is hidden from every player ''' def __deepcopy__(self, memodict={}): return AbstractStatePr...
roomai/RoomAI
roomai/games/common/AbstractStatePrivate.py
Python
mit
328
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
seken/nink
pyglet/window/carbon/__init__.py
Python
gpl-3.0
40,222
from django.views.generic import ListView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import HttpResponseForbidden from django.shortcuts import render from django.http import HttpResponseRedirect from django.core.urlresolvers import rev...
tabdon/crmeasyapp
crmapp/accounts/views.py
Python
mit
2,887
''' This modules exposes geometry data for Unites States. It exposes a dictionary 'data' which is indexed by the two letter state code (e.g., 'CA', 'TX') and has the following dictionary as the associated value: data['CA']['name'] data['CA']['region'] data['CA']['lats'] data['CA']['lons'] ''' import c...
almarklein/bokeh
bokeh/sampledata/us_states.py
Python
bsd-3-clause
1,363
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_decrypt_text from youtube_dl.utils impo...
israeltobias/DownMedia
youtube-dl/test/test_aes.py
Python
gpl-3.0
2,033
from setuptools import setup, find_packages import os import versioneer install_requires = ['psutil>=3', 'clyent', 'pyyaml'] if os.name == 'nt': install_requires.append('pywin32') setup( name='chalmers', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), author='Continuum An...
Anaconda-Server/chalmers
setup.py
Python
mit
746
from django.conf.urls import url from . import views urlpatterns = [ # url(r'^login/$', views.user_login, name='login'), url(r'^login/$', 'django.contrib.auth.views.login', name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'), url(r'^logout-then-login/$', 'django.contrib...
Rygelouv/Images-bookmark-python-
account/urls.py
Python
gpl-3.0
1,496
# -*- coding: utf-8 -*- """ pygments.formatters.terminal256 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for 256-color terminal output with ANSI sequences. RGB-to-XTERM color conversion routines adapted from xterm256-conv tool (http://frexx.de/xterm-256-notes/data/xterm256-conv2.tar.bz2) by Wolfg...
KeyIngredient/gaepaste
pygments/formatters/terminal256.py
Python
lgpl-3.0
7,604
# Copyright (C) Sam Parkinson 2015 # # 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 program is distributed in ...
sugarlabs-infra/container.yml
containeryml.py
Python
gpl-3.0
4,549
from django.apps import AppConfig class CyborgIdentityConfig(AppConfig): name = 'cyborg_identity'
shawnhermans/cyborg-identity-manager
cyborg_identity/apps.py
Python
mit
105
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
gisce/OCB
openerp/addons/base/ir/ir_translation.py
Python
agpl-3.0
23,516
# -*- coding: utf-8 -*- # __init__.py # Copyright (C) 2013 LEAP # # 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. # # Th...
elijh/bitmask_client
src/leap/bitmask/__init__.py
Python
gpl-3.0
2,049
from django.contrib import admin from app.config.models import NotificationMessage, TextBlock, ConfigOption class ConfigOptionAdmin(admin.ModelAdmin): list_display = ( "key", "value" ) admin.site.register(ConfigOption, ConfigOptionAdmin) class NotificationMessageAdmin(admin.ModelAdmin): ...
hoelsner/product-database
app/config/admin.py
Python
mit
830
import os import sys import json import time import logging import asyncio import aiohttp.web import ray import psutil import pytest import redis import requests from ray import ray_constants from ray.test_utils import ( format_web_url, wait_for_condition, wait_until_server_available, run_string_as_dr...
robertnishihara/ray
dashboard/tests/test_dashboard.py
Python
apache-2.0
12,740
import pdb from pandas import HDFStore import pandas.rpy.common as com from rpy2.robjects import r __version__ = "0.0" def stat(year): print "Calcul des statistiques individuelles" simul = "C:/til/output/simul.h5" simul = HDFStore(simul) df = simul['entities/register'] df = df....
AlexisEidelman/Til
til/pgm/output/stat_final.py
Python
gpl-3.0
744
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from datetime import datetime, timedelta import inspect import re import sys import textwrap import time from asn1crypto import x509, keys, core from asn1crypto.util import int_to_bytes, int_from_bytes, timezone from os...
wbond/certbuilder
certbuilder/__init__.py
Python
mit
30,599
#!/usr/bin/python #-*-coding:utf-8-*- import os import sys from get_opt import GetOpt from cmd_controller import CmdController from gui_controller import GuiController # 命令参数化 --cmd命令行模式 # gui参数 --gui命令行模式 def usage(): return "usage:%s%s%s%s" %("[--cmd] 命令行模式\n", "[--gui] 图形化模式\n"...
CharellKing/gobang
main.py
Python
apache-2.0
878
# pylint: disable-all # Copyright (c) 2012-2013 Intel, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but...
seiferteric/bmaptools
tests/oldcodebase/BmapCopy3_0.py
Python
gpl-2.0
31,942
# -*- coding:Utf-8 -* #The MIT License (MIT) #Copyright (c) 2011 Benjamin Dauphin #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 th...
b-dauphin/quatris
quatris.py
Python
mit
8,226
# 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 ...
Azure/azure-sdk-for-python
sdk/applicationinsights/azure-applicationinsights/azure/applicationinsights/models/events_client_performance_info.py
Python
mit
903
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-08-14 20:09 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20160618_1658'), ...
bane138/nonhumanuser
blog/migrations/0006_auto_20160814_2009.py
Python
mit
573
# Copyright (C) 2014-2016 Red Hat, Inc. # # 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 distribute...
msimacek/koschei
test/__init__.py
Python
gpl-2.0
1,083
from .checks import * # noqa
hzlf/openbroadcast.ch
app/base/__init__.py
Python
gpl-3.0
30
#!/usr/bin/env python # encoding: utf-8 """ string-to-integer-atoi.py Created by Shuailong on 2016-01-15. https://leetcode.com/problems/string-to-integer-atoi/. """ class Solution(object): def myAtoi(self, str): """ :type str: str :rtype: int """ if len(str) < 1: ...
Shuailong/Leetcode
solutions/string-to-integer-atoi.py
Python
mit
1,137
import sft.sampler.Simple import sft.sampler.Expansive import sft.sampler.SinglePoint import sft.sim.PathWorldLoader from sft import Size, Point from sft.Actions import Actions from sft.log.WorldLogger import WorldLogger epochs = 1000 world_size = Size(70, 70) view_size = Size(7, 7) actions = Actions.all nb_actions = ...
kevinkepp/look-at-this
sft/config_test/world.py
Python
mit
1,484
# ------------------------------------------------------------------------------ import os, os.path, sys, re, time, random, types, base64 from appy import Object import appy.gen from appy.gen import Search, UiSearch, String, Page from appy.gen.layout import ColumnLayout from appy.gen import utils as gutils from appy.ge...
Eveler/libs
__Python__/ufms_blanks/appy3/gen/mixins/ToolMixin.py
Python
gpl-3.0
65,134
import tests.periodicities.period_test as per per.buildModel((60 , 'D' , 400));
antoinecarme/pyaf
tests/periodicities/Day/Cycle_Day_400_D_60.py
Python
bsd-3-clause
82
# Copyright 2016 Intel Corporation # Copyright 2013 Hewlett-Packard Development Company, L.P. # Copyright 2013 Red Hat, Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache Licen...
ruyang/ironic
ironic/conf/default.py
Python
apache-2.0
13,671
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the implicit rpath is added only when needed. """ import TestGyp import re import subprocess import sys if sys.platform...
BozhkoAlexander/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/linux/gyptest-implicit-rpath.py
Python
gpl-3.0
1,172
#!/usr/bin/env python ######################################################################## # # (C) 2013, James Cammarata <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
tjanez/ansible
lib/ansible/galaxy/api.py
Python
gpl-3.0
11,035
# pylint: skip-file # pylint: disable=too-many-public-methods class DeploymentConfig(Yedit): ''' Class to wrap the oc command line tools ''' default_deployment_config = ''' apiVersion: v1 kind: DeploymentConfig metadata: name: default_dc namespace: default spec: replicas: 0 selector: default_dc: de...
appuio/ansible-role-openshift-zabbix-monitoring
vendor/openshift-tools/ansible/roles/lib_openshift_3.2/build/lib/deploymentconfig.py
Python
apache-2.0
10,488
# -*- coding: utf-8 -*- from django.utils import timezone from django.utils.translation import ngettext def duration_string(duration, precision='s'): """Format hours, minutes and seconds as a human-friendly string (e.g. "2 hours, 25 minutes, 31 seconds") with precision to h = hours, m = minutes or s = sec...
cdubz/babybuddy
core/utils.py
Python
bsd-2-clause
1,359
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") e...
drewtalati/talaticoin
contrib/bitrpc/bitrpc.py
Python
mit
9,669
import logging import math import os from PIL import Image, ImageChops from apps.rendering.resources.imgrepr import EXRImgRepr, load_img logger = logging.getLogger("apps.rendering") class RenderingTaskCollector(object): def __init__(self, paste=False, width=None, height=None): self.accepted_img_files...
scorpilix/Golemtest
apps/rendering/resources/renderingtaskcollector.py
Python
gpl-3.0
4,149
from scripting_utils import * def build(version, root_dir, ios_submodule_dir, with_test_lib): # ------------------------------------------------------------------ # paths srcdir = '{0}/sdk'.format(ios_submodule_dir) lib_out_dir = '{0}/ios/AdjustSdk.Xamarin.iOS/Resources'.fo...
adjust/xamarin_sdk
scripts/build_sdk_ios.py
Python
mit
3,513
"""SolrIndex and SolrConnectionManager""" import logging import os import transaction import Globals # import Zope 2 dependencies in order from Acquisition import aq_parent from BTrees.IIBTree import IIBTree, IISet from OFS.PropertyManager import PropertyManager from OFS.SimpleItem import SimpleItem from Products.Pl...
isotoma/alm.solrindex
alm/solrindex/index.py
Python
bsd-3-clause
22,376
# 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...
xodus7/tensorflow
tensorflow/python/kernel_tests/control_flow_ops_py_test.py
Python
apache-2.0
124,988
# -*- coding: utf-8 -*- from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import DataRequired from flask_wtf import FlaskForm from app.config import db_sql from flask import request, flash, render_template, url_for, redirect,\ Blueprint, Markup, session from app.utils...
alanudg/SmartCheckIn
app/modules/Computadora/__init__.py
Python
mit
14,792