code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# coding=utf-8 import logging import types import os import datetime from guessit import guessit from requests.compat import urljoin, quote from subliminal import Episode, Movie, region from subliminal_patch.core import remove_crap_from_fn from subliminal_patch.http import CertifiSession logger = logging.getLogger(_...
dantebarba/docker-media-server
plex/Sub-Zero.bundle/Contents/Libraries/Shared/subliminal_patch/refiners/drone.py
Python
gpl-3.0
10,378
import numpy as np import cv2 import matplotlib.pyplot as plt from scipy.signal import convolve2d def sobel_filter(im, k_size): im = im.astype(np.float) width, height, c = im.shape if c > 1: img = 0.2126 * im[:, :, 0] + 0.7152 * im[:, :, 1] + 0.0722 * im[:, :, 2] else: img = im as...
KECB/learn
computer_vision/convolve.py
Python
mit
1,356
import bisect import itertools import operator class _BNode(object): __slots__ = ["tree", "contents", "children"] def __init__(self, tree, contents=None, children=None): self.tree = tree self.contents = contents or [] self.children = children or [] if self.children...
NathanW2/qquery
btree.py
Python
gpl-2.0
19,500
"""This test for the LFW require medium-size data downloading and processing If the data has not been already downloaded by running the examples, the tests won't run (skipped). If the test are run, the first execution will be long (typically a bit more than a couple of minutes) but as the dataset loader is leveraging...
manhhomienbienthuy/scikit-learn
sklearn/datasets/tests/test_lfw.py
Python
bsd-3-clause
7,682
import pyexcel as pe import json # "example.xls","example.xlsx","example.ods", "example.xlsm" sheet = pe.Sheet("example.csv") print(json.dumps(sheet.to_array()))
lordakshaya/pyexcel
examples/basics/jsonify.py
Python
bsd-3-clause
162
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'ProjectScore' db.delete_table(u'project_projectscore') # Deleting model 'ProjectS...
kencochrane/scorinator
scorinator/project/migrations/0002_remove_scores.py
Python
apache-2.0
3,473
# Copyright 2017,2018 IBM Corp. # # 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 agr...
mfcloud/python-zvm-sdk
zvmsdk/dist.py
Python
apache-2.0
68,033
# Copyright 2016 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...
gundramleifert/exp_tf
util/spatial_transformer.py
Python
apache-2.0
7,914
# -*- coding: utf-8 -*- """ httpbin.core ~~~~~~~~~~~~ This module provides the core HttpBin experience. """ import base64 import json import os import random import time import uuid import argparse from flask import ( Flask, Response, request, render_template, redirect, jsonify as flask_json...
krissman/httpbin
httpbin/core.py
Python
isc
44,581
# Copyright 2016-17 # # 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 #...
openstack/tap-as-a-service
neutron_taas/db/migration/alembic_migration/versions/pike/contract/bac61f603e39_alter_tap_id_associations_to_support_tap_id_reuse.py
Python
apache-2.0
1,907
# Copyright 2015 Hewlett-Packard # # 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, ...
hpcloud-mon/monasca-events-api
monasca_events_api/v2/common/schemas/stream_definition_request_body_schema.py
Python
apache-2.0
1,965
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
chanceraine/nupic.research
projects/union_pooling/nupic_integration/network_integration_demo.py
Python
agpl-3.0
8,953
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Markus Weber' from Klassen import Communicator from Klassen.Sensor import Sensor from Klassen.SensorListe import SensorListe from GlobalVariables import * import time import os import sys class SensorAuswertung(object): def checkSensorIDs(self): ...
joop03/Thermoberry
Modules/SensorAuswertung.py
Python
gpl-2.0
8,271
# Copyright 2014 Google Inc. 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 applicable law or a...
thonkify/thonkify
src/lib/gcloud/storage/test__helpers.py
Python
mit
6,895
#!/usr/bin/env python # -*- coding: utf-8 -*- from pytube import __version__ import os try: from setuptools import setup except ImportError: from distutils.core import setup def open_file(fname): return open(os.path.join(os.path.dirname(__file__), fname)) setup( name="pytube", version=__versi...
mserjx/pytube
setup.py
Python
mit
1,352
#!/usr/bin/env python # encoding: UTF-8 import asyncio import datetime import os.path import sqlite3 import tempfile import unittest import uuid from cloudhands.burst.agent import message_handler from cloudhands.burst.session import SessionAgent from cloudhands.burst.test.test_appliance import AgentTesting import cl...
cedadev/cloudhands-burst
cloudhands/burst/test/test_session.py
Python
bsd-3-clause
6,476
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import division import random import os import math import pickle import stimulus WIN_SIZE = (1280, 1024) FPS = 60 N_RANDOM_TRIALS = 25 def create_random_items(): """ Creates pickle files with lists of random positions for RandomWalk and R...
derNarr/synchronicity
experiment/generate_sessionfiles.py
Python
mit
3,446
#!/usr/bin/env python # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
mattharden/vitess
test/base_sharding.py
Python
bsd-3-clause
18,394
from __future__ import unicode_literals from django.apps import AppConfig class DailyConfig(AppConfig): name = 'daily'
kinnevo/kic_alone
daily/apps.py
Python
mit
126
#!/usr/bin/env python from __future__ import print_function import os, sys import argparse import datetime import netCDF4 as nc import numpy as np import matplotlib import matplotlib.colors as mcolors from lib_util import run_ncra matplotlib.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.basemap import...
CWSL/access-cm-tools
analyse/spatial_difference_plot.py
Python
apache-2.0
3,634
import sys import cherrypy from cherrypy._cpcompat import ntob def get_xmlrpclib(): try: import xmlrpc.client as x except ImportError: import xmlrpclib as x return x def process_body(): """Return (params, method) from request body.""" try: return get_xmlrpclib().loads(cher...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/cherrypy/cherrypy/lib/xmlrpcutil.py
Python
bsd-3-clause
1,606
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2017, Anders Innovations. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.core.exceptions import ObjectDoesNotExist from shuup.core....
shoopio/shoop
shuup/core/utils/line_unit_mixin.py
Python
agpl-3.0
921
import urllib.request import urllib.parse import re import webbrowser from Voice.GoogleTTS import speak def playYouTube(text): try: query_string = urllib.parse.urlencode({"search_query": text}) html_content = urllib.request.urlopen("https://www.youtube.com/results?" + query_string) search_r...
ashwinpilgaonkar/Flick
Voice/Youtube.py
Python
apache-2.0
622
# -*- coding: utf-8 -*- """ """ import sympy from Chapter2.themes.lisp_list_structured_data import car, cdr, lisp_list, nil from Chapter2.themes.mapping_over_lists import map def quote(symbols): """Python does not support symbolic data by design so we use sympy to emulate the behaviour""" if isinstance(s...
aoyono/sicpy
Chapter2/themes/symbolic_data.py
Python
mit
1,444
#!/usr/bin/python import sys, fileinput from Bio import SeqIO #usage: #input1: fileWithSeq = sys.argv[1] seqNames = set() currentFile = open(fileWithSeq, "r") for record in SeqIO.parse(currentFile, "fasta"): if record.description not in seqNames: print ">" + record.description print record.seq seqNames....
ToshkaDev/bioinformatics-universe
bioinformatics-universe/bioinformatics-programs/getUniqueSeqs.py
Python
mit
375
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from digits.utils import subclass, override, constants from digits.extensions.data.interface import DataIngestionInterface from .forms import DatasetForm, InferenceForm import numpy as np import os TEMPLATE = "temp...
bygreencn/DIGITS
plugins/data/imageGradients/digitsDataPluginImageGradients/data.py
Python
bsd-3-clause
3,492
# ##### 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 distributed ...
SCSSoftware/BlenderTools
addon/io_scs_tools/internals/shaders/eut2/building/day.py
Python
gpl-2.0
1,788
# orm/session.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Session class and related utilities.""" import itertools import sys ...
Vagab0nd/SiCKRAGE
lib3/sqlalchemy/orm/session.py
Python
gpl-3.0
131,301
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if successful, and...
thelazier/dash
contrib/devtools/security-check.py
Python
mit
8,242
import sys sys.path.insert(1, "../../../") import h2o def iris_get_model(ip,port): iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris.csv")) model = h2o.random_forest(y=iris[4], x=iris[0:4], ntrees=50) model.show() model = h2o.get_model(model._id) model.show() if __name__ == ...
PawarPawan/h2o-v3
h2o-py/tests/testdir_algos/rf/pyunit_get_modelRF.py
Python
apache-2.0
373
#!/usr/bin/python import RPi.GPIO as GPIO import time last_press = 10 runny = True def re_runner(): start = time.time() global last_press global runny if start - last_press > 10: last_press = start else: runny = False print "\n\nThis is the good stuff\n\n" pri...
wannabeCitizen/FireflySim
test_button.py
Python
mit
853
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
UManPychron/pychron
pychron/options/views/blanks_views.py
Python
apache-2.0
5,975
# Copyright 2011 Justin Santa Barbara # 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 requ...
jianghuaw/nova
nova/tests/functional/test_servers.py
Python
apache-2.0
77,026
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
rahulunair/nova
nova/policies/flavor_extra_specs.py
Python
apache-2.0
3,754
# 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. import time from .. import merge as mergemod from .. import progress from .. import util from ..i18n import _ from .cmdtable import command @comman...
facebookexperimental/eden
eden/scm/edenscm/mercurial/commands/debugdryup.py
Python
gpl-2.0
1,549
from MuseParse.tests.testLilyMethods.lily import Lily from MuseParse.classes.ObjectHierarchy.TreeClasses import PartNode from MuseParse.classes.ObjectHierarchy.ItemClasses import Clef class testClef(Lily): def setUp(self): self.item = Clef.Clef() self.lilystring = "" class testClefGG(Lily): ...
Godley/MuseParse
MuseParse/tests/testLilyMethods/testClef.py
Python
mit
3,732
# Author: Teon Brooks <[email protected]> # # License: BSD (3-clause) import os.path as op import warnings from nose.tools import assert_equal, assert_true, assert_raises import numpy as np from scipy.io import savemat from numpy.testing import (assert_array_equal, assert_almost_equal, ...
jaeilepp/mne-python
mne/channels/tests/test_montage.py
Python
bsd-3-clause
22,545
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
chippey/gaffer
python/GafferTest/ArrayPlugTest.py
Python
bsd-3-clause
12,836
# Created: 15.2.2011 # Version: 0.2 # Author: Dolkar # License: None import math _BASIS_NAMES = ['i', 'j', 'k'] class DiffDimError(Exception): def __str__(self): return 'Only vectors with same dimensions are needed' class Vector(object): ''' 2D/3D Vector class allowing basic...
mostley/robolena
software/eye_simulator/vector3d.py
Python
mit
10,115
from __future__ import absolute_import, print_function from django.conf import settings ACCESS_TOKEN_URL = getattr(settings, 'NEPTULON_TOKEN_URL', None) AUTHORIZE_URL = getattr(settings, 'NEPTULON_AUTH_URL', None) CLIENT_ID = getattr(settings, 'NEPTULON_CLIENT_ID', None) CLIENT_SECRET = getattr(settings, 'NEPTULON_CL...
CMGS/sentry-auth-neptulon
sentry_auth_neptulon/constants.py
Python
apache-2.0
434
# make_testsuite.py GLOSS_FILENAME (PHENOMENA) < INPUT_FILENAME > OUTPUT_FILENAME import sys pronunciation = {} gloss = {} myfile = open(sys.argv[1]) lines = myfile.readlines() myfile.close() for line in lines: each = line.strip().split() if len(each) == 3: pronunciation[each[0]] = each[1] gloss[each[0]] = ea...
delph-in/zhong
utils/make_testsuite.py
Python
mit
1,115
# Copyright 2019 Fortinet, 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
kvar/ansible
test/units/modules/network/fortios/test_fortios_log_fortianalyzer_setting.py
Python
gpl-3.0
11,126
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ import warnings from django.core import urlresolvers from django.db.models.base import ModelBase from django.db.models.manager imp...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/shortcuts.py
Python
artistic-2.0
7,957
# Copyright (c) 2014 X-IO Technologies. # 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 re...
saeki-masaki/cinder
cinder/tests/unit/test_xio.py
Python
apache-2.0
58,157
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <[email protected]> # Maintainer: David Arroyo Menéndez <[email protected]> # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
davidam/python-examples
basics/counter.py
Python
gpl-3.0
1,233
# -*- coding: utf-8 -*- # Exemple of AI implementation # import aiwar import random ### handlers: MANDATORY ### def play_base(self): return def play_miningship(self): return def play_fighter(self): return ### helpers ### def random_move(ship): a = random.randint(-45, 45) ship.rotateOf(a) ...
merovingien/AIWar
players_example/void.py
Python
gpl-3.0
749
#!/usr/bin/python # # Copyright 2014 Google Inc. 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 b...
dietrichc/streamline-ppc-reports
examples/adwords/v201409/account_management/get_account_changes.py
Python
apache-2.0
3,875
import json import urllib2 import os from string import Template from decimal import Decimal # database stuff from sqlalchemy.exc import DBAPIError from sqlalchemy import or_ from climasng.models import * from climasng.parsing.prosemaker import ProseMaker class DocAssembler(object): def __init__(self, doc_data...
jcu-eresearch/climas-ng
webapp/climasng/docassembly/docassembler.py
Python
apache-2.0
5,817
# -*- coding:utf-8 -*- from setuptools import setup PACKAGE_NAME = "timezonefinder" setup( name=PACKAGE_NAME, packages=[PACKAGE_NAME], # NOTE: package_data is not required. all data files should be included via MANIFEST.in include_package_data=True, description="fast python package for finding the...
MrMinimal64/timezonefinder
setup.py
Python
mit
1,875
""" WSGI config for springaccounts project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICA...
dansan/spring-accounts-site
sas/wsgi.py
Python
gpl-3.0
1,298
import tornado.ioloop import tornado.web import socket import os; import re import StringIO import glob class DefaultHandler(tornado.web.RequestHandler): #def initialize(self, logic): # print ('-->DefaultHandler.initialize...') # self.__logic = logic def get(self): pr...
fegonda/icon_demo
code/web/defaulthandler.py
Python
mit
1,585
from django.core.urlresolvers import reverse from django.http import HttpResponseForbidden, HttpResponseRedirect from django.db.models import Q from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, DeleteView from django impor...
theworldbright/mainsite
aspc/sagelist/views.py
Python
mit
6,958
# -*- coding: utf-8 -*- # # Copyright (c) 2014, Florian Wesch <[email protected]> # 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 copy...
phase/ApplePi
fastmc/auth.py
Python
mit
7,818
# This file is part of the py-boinc-plotter, # which provides parsing and plotting of boinc statistics and # badge information. # Copyright (C) 2013 [email protected] # # 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 Fr...
obtitus/py-boinc-plotter
pyBoincPlotter/test/test_task.py
Python
gpl-3.0
6,075
from Tools import * class Connmon: def __init__(self, config): self.logger = logging.getLogger('browbeat.Connmon') self.config = config self.tools = Tools(self.config) return None # Start connmond def start_connmon(self, retry=None): self.stop_connmon() to...
jtaleric/browbeat
lib/Connmon.py
Python
apache-2.0
1,947
## Discussion Quiz 5 ## ## Disclaimer: this quiz is ridiculous. ## import math class Cipher: """General cipher class. Identity encryption and decryption.""" def __init__(self): self.plainhist = {} # {plaintext: # times encrypted} self.cipherhist = {} # {ciphertext: # times "decrypted"} ...
ohjay/ohjay.github.io
cs61a/fa16/quiz/quiz5.py
Python
mit
5,057
from __future__ import division, absolute_import, print_function import sys import platform from decimal import Decimal import warnings import itertools import numpy as np from numpy.core import * from numpy.random import rand, randint, randn from numpy.testing import * from numpy.core.multiarray import dot as dot_ ...
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/numpy/core/tests/test_numeric.py
Python
gpl-3.0
65,826
"""Support for control of ElkM1 lighting (X10, UPB, etc).""" from homeassistant.components.light import ( ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light) from homeassistant.components.elkm1 import ( DOMAIN as ELK_DOMAIN, ElkEntity, create_elk_entities) DEPENDENCIES = [ELK_DOMAIN] async def async_setup_platform( ...
HydrelioxGitHub/home-assistant
homeassistant/components/elkm1/light.py
Python
apache-2.0
1,678
import numpy def visualizeGm(gm,plotUnaries=True,plotFunctions=False,plotNonShared=False,layout='neato',iterations=1000,show=True,relNodeSize=1.0): """ visualize a graphical model with matplotlib , networkx and graphviz Keyword arguments: - plotUnaries -- plot unaries (default: ``True``) - plo...
recarroll/opengm
src/interfaces/python/opengm/_visu.py
Python
mit
7,139
#!/usr/bin/env python3 import subprocess import os import sys import glob import json import anymarkup REPO_PATH = 'git-repo' def git_clone(url): r = subprocess.run(['git', 'clone', url, REPO_PATH]) if r.returncode == 0: return True else: print("[COUT] Git clone error: Invalid argument ...
Huawei/containerops
component/python/test/mamba/bootstrap.py
Python
apache-2.0
4,405
import httplib import os import unittest import responses from cumulusci.tasks.release_notes.generator import GithubReleaseNotesGenerator from cumulusci.tasks.release_notes.parser import ChangeNotesLinesParser from cumulusci.tasks.release_notes.parser import CommentingGithubIssuesParser from cumulusci.tasks.release_n...
Joble/CumulusCI
cumulusci/tasks/release_notes/tests/test_parser.py
Python
bsd-3-clause
18,658
#!/usr/bin/env python # This file is part of Boggle Quiz Bowl. # # Boggle Quiz Bowl 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 opti...
duyunchen/bogglequizbowl
bin/LoginService.py
Python
gpl-2.0
1,663
#!/usr/bin/env python3 # -*- coding: utf-8 -*- extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] master_doc = "index" link_files = { '../CHANGES.rst': dict( using=dict(GH='https://github.com'), replace=[ dict( pattern=r'(Issue #|\B#)(?P<issue...
CYBAI/servo
tests/wpt/web-platform-tests/tools/third_party/zipp/docs/conf.py
Python
mpl-2.0
755
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) from ..representation import SphericalRepresentation from ..baseframe import (BaseCoordinateFrame, frame_transform_graph, ...
joergdietrich/astropy
astropy/coordinates/builtin_frames/fk5.py
Python
bsd-3-clause
3,003
# 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/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recommended_actions_operations.py
Python
mit
9,617
#!/usr/bin/python -uB # -*- coding: utf-8 -*- from __future__ import print_function import logging import gzip import rdflib import refactoring def entity_to_iri(entity): if '.' in entity: entity = entity.split('.')[1] return 'http://rdf.freebase.com/ns/' + entity.replace('/', '.')[1:] def relation...
knowledgegraph/schema
data/fb15k_schema/freebase_fb15k_enrich/2013-12-29_v2/util.py
Python
gpl-2.0
8,836
# Written by Patricia Suriana, MIT ca. 2013 # Modified by Tomas Lozano-Perez, MIT ca 2016 import pddl_parser import search import time import sys import pdb def printOutputVerbose(tic, toc, path, cost, final_state, goal): print "\n******************************FINISHED TEST******************************...
LYZhelloworld/Courses
50.021/02/code/planner/main.py
Python
mit
2,703
#import sys #sys.path.append('..') import pip # Example if __name__ == '__main__': pip.main(['freeze'])
JimHokanson/mendeley_python
quick_scripts/pip_info.py
Python
mit
110
# vim: ai ts=4 sts=4 et sw=4 # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import int, range, str from datetime import date, datetime from os.path import join, split from uuid import uuid4 import hashlib from django import forms from dj...
chazmead/django-clubhouse
clubhouse/forms/forms.py
Python
bsd-2-clause
18,614
# -*- coding: utf-8 -*- """Remove user_flash_message Revision ID: 039d2745e628 Revises: 77893cc3830a Create Date: 2020-04-01 21:54:15.903756 """ from alembic import op from sqlalchemy.dialects import postgresql import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '039d2745e628' down_revision =...
hasgeek/lastuser
migrations/versions/039d2745e628_remove_user_flash_message.py
Python
bsd-2-clause
1,422
import copy import datetime import json import os from typing import Dict, List, Optional import jinja2 import jsonschema import yaml from ray_release.anyscale_util import find_cloud_by_name from ray_release.exception import ReleaseTestConfigError from ray_release.logger import logger from ray_release.util import dee...
ray-project/ray
release/ray_release/config.py
Python
apache-2.0
6,617
#!/usr/bin/python # -*- coding: utf-8 -*- from unittest import TestCase from preggy import expect from holmes.utils import ( get_domain_from_url, get_class, load_classes, get_status_code_title ) class TestUtils(TestCase): def test_single_url(self): domain, url = get_domain_from_url('http://globo.c...
holmes-app/holmes-api
tests/unit/test_utils.py
Python
mit
4,364
# Copyright 2014 Google Inc. 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 applicable law or agr...
askdaddy/PerfKitBenchmarker
perfkitbenchmarker/windows_benchmarks/cluster_boot_benchmark.py
Python
apache-2.0
2,506
# -*- coding: utf-8 -*- # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, today, getdate def post_depreciation_entries(date=None): # Return if ...
bohlian/erpnext
erpnext/accounts/doctype/asset/depreciation.py
Python
gpl-3.0
6,960
# coding: utf-8 from __future__ import unicode_literals from testfixtures import TempDirectory from prettyconf.exceptions import InvalidConfigurationFile from .base import BaseTestCase class IniFileConfigurationLoaderTestCase(BaseTestCase): def setUp(self): super(IniFileConfigurationLoaderTestCase, se...
georgeyk/prettyconf
tests/test_loaders.py
Python
mit
815
# Length of Last Word # https://leetcode.com/problems/length-of-last-word/ class Solution(object): def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ s = s.split() s = '' if len(s)==0 else s[-1] return len(s)
ranji2612/leetCode
lengthOfLastWord.py
Python
gpl-2.0
282
#!/usr/bin/python # coding: utf8 from .base import Base class Arcgis(Base): provider = 'ArcGIS' api = 'ArcGIS REST API' url = 'http://geocode.arcgis.com/arcgis/rest/' url += 'services/World/GeocodeServer/find' _api_reference = ['[{0}](https://developers.arcgis.com/rest/geocode/api-refe...
samthetechie/pyFolia
venv/lib/python2.7/site-packages/geocoder/arcgis.py
Python
gpl-3.0
2,350
from pitcrew import task class LocalProvider: def __init__(self, local_context): self.returned = False self.local_context = local_context async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_value, traceback): if exc_type: raise exc_...
joshbuddy/crew
pitcrew/tasks/providers/local.py
Python
mit
1,086
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
m3drano/power-simulation
simulation/base.py
Python
apache-2.0
2,865
# Copyright 2014-2016 Morgan Delahaye-Prat. All Rights Reserved. # # Licensed under the Simplified BSD License (the "License"); # you may not use this file except in compliance with the License. """Implements the base provider.""" import asyncio import inspect from hypr.router import Router from collections import d...
project-hypr/hypr2
hypr/ext/providers.py
Python
bsd-2-clause
12,868
from django.conf.urls.defaults import patterns, url from djangorestframework.views import ListOrCreateModelView, InstanceModelView from buzzwordbingo.resources import (BuzzwordResource, WinConditionResource, BoardResource) from buzzwordbingo.views import BuzzwordBingoView handler50...
seanfisk/buzzword-bingo-server
urls.py
Python
bsd-3-clause
1,277
#!/usr/bin/env python import pigpio pi = pigpio.pi() pi.set_mode(27, pigpio.OUTPUT) pi.write(27,1)
trex2000/WifiBot
Raspberry_Web_page/RPi_Cam_Web_Interface-master/www/macros/l1.py
Python
gpl-3.0
100
# -*- coding: utf-8 -*- import os def test_docker_compose_project(docker_compose_project_name): assert docker_compose_project_name == "pytest{}".format(os.getpid())
AndreLouisCaron/pytest-docker
tests/test_docker_compose_project_name.py
Python
mit
172
# -*- coding: utf-8 -*- # # Copyright (c) 2010-2012 Cidadania S. Coop. Galega # # This file is part of e-cidadania. # # e-cidadania 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 Licen...
bithinalangot/ecidadania-dev
src/e_cidadania/settings/defaults.py
Python
gpl-3.0
6,844
# Copyright 2009-2012 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
0111001101111010/open-health-inspection-api
venv/lib/python2.7/site-packages/pymongo/database.py
Python
gpl-2.0
34,227
#!/usr/bin/env python '''Tree View/List Store The GtkListStore is used to store data in list form, to be used later on by a GtkTreeView to display it. This demo builds a simple GtkListStore and displays it. See the Stock Browser demo for a more advanced example.''' import gobject import gtk ( COLUMN_FIXED, C...
chriskmanx/qmole
QMOLEDEV/pygtk-2.16.0/examples/pygtk-demo/demos/list_store.py
Python
gpl-3.0
4,757
# -*- coding: utf-8 -*- """ Licence and version informations. """ __author__ = "Karol Będkowski" __copyright__ = "Copyright (c) Karol Będkowski, 2009-2014" __version__ = "2013-05-05" try: _('AllDB') except NameError: import gettext _ = gettext.gettext SHORTNAME = 'alldb' NAME = _("AllDB") VERSION = '1.0.2' VERS...
KarolBedkowski/alldb
alldb/version.py
Python
gpl-2.0
1,655
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library 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 2.1 of the License, or (at your option) any later version. # # This library ...
FedoraScientific/salome-paravis
test/VisuPrs/DeformedShape/E2.py
Python
lgpl-2.1
1,542
# Copyright 2022 The Flax Authors. # # 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 wri...
google/flax
examples/ogbg_molpcba/train.py
Python
apache-2.0
13,830
# -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) __all__ = ["API", "KOI", "Planet", "Star", "LightCurve", "TargetPixelFile"] import os import re import json import shutil import logging from itertools import product from functools im...
dfm/kplr
kplr/api.py
Python
mit
34,372
import os import subprocess import sys base_dir = os.path.dirname(os.path.dirname(os.getcwd())) cmd = "python3 main.py --web --docker-host --indexer --runner --builder".split(" ") cmd += sys.argv[1:] subprocess.Popen(["docker-compose", "up"]) subprocess.call(cmd, cwd=base_dir)
jonatanSh/challenge-framework
aio/only_services/run.py
Python
apache-2.0
281
VERSION = (0, 2)
TigorC/django-foundation-form
foundationform/__init__.py
Python
bsd-3-clause
17
#!/usr/bin/env python # # Copyright (C) 2019, 2020, 2021 # Smithsonian Astrophysical Observatory # # # 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 # ...
anetasie/sherpa
sherpa/optmethods/ncoresde.py
Python
gpl-3.0
17,674
########## Utils for rendering the templates ########## import flask from flask.ext.login import current_user from psbackend import context from psbackend.menus import UserMenu, Menu ## Use this in place of flask.render_template for the project def render(templateName, **kwargs): return flask.render_template(temp...
aabmass/pswebsite
psbackend/templateutil.py
Python
apache-2.0
382
from a10sdk.common.A10BaseClass import A10BaseClass class Oper(A10BaseClass): """This class does not support CRUD Operations please use parent. :param dev_gw_state: {"type": "string", "format": "string"} :param dev_attr: {"type": "string", "format": "string"} :param dev_ip_cnt: {"type": "number"...
amwelch/a10sdk-python
a10sdk/core/gslb/gslb_site_slb_dev_oper.py
Python
apache-2.0
12,546
import sys import string digs = string.digits def int2base(x, base): if x < 0: sign = -1 elif x==0: return '0' else: sign = 1 x *= sign digits = [] while x: digits.append(digs[x % base]) x /= base if sign < 0: digits.append('-') digits.reverse() return ''.join(digits) def base2int(n, bas...
lunixbochs/project-euler
001-099/36/36.py
Python
mit
691
# -*- coding: utf-8 -*- ############################################################################## # # web ir actions extend # Copyright 2014 wangbuke <[email protected]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
buke/openerp-web-ir-actions-ext
web_ir_actions_ext/__openerp__.py
Python
agpl-3.0
1,847
# -*- Python -*- import os def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) if attr_value == None: lit_config.fatal( "No attribute %r in test configuration! You may need to run " "tests from your build directory or add this attribute " "to lit.site.cfg....
r0mai/metashell
3rd/templight/llvm/projects/compiler-rt/test/profile/lit.cfg.py
Python
gpl-3.0
3,457
#!/bin/bash #set -x Mode debug #Parametres de langues #horodatage=$(date "+%A %d %B %Y a %Hh%M") echo echo POST=$(</dev/stdin) echo $POST echo 'content length:'$CONTENT_LENGTH if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi echo SERVER_SOFTWARE = $SERVER_SOFTWARE echo SERVER_NAME =...
gotzilla/Router-data-collect
cgi-bin/polSnmpV2.py
Python
gpl-3.0
1,739
# -*- coding: utf-8 -*- ''' Created on 2012-11-30 13:25 @summary: @author: Martin Predki ''' import json import logging class Client(object): ''' @summary: This class represents a network client. This could be either a workstation or a user. ''' __id = 0 def __init__(self, tcpClient): ...
Fanris/PySched
PySched/PySchedClient/NetworkManagement/TcpClient/Client.py
Python
lgpl-3.0
2,434