repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
r39132/airflow
tests/operators/test_hive_to_mysql.py
4
4630
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
Passtechsoft/TPEAlpGen
blender/release/scripts/addons_contrib/oscurart_tools/oscurart_objects.py
1
16403
import bpy import math import sys import os import stat import bmesh import time import random from bpy_extras.object_utils import world_to_camera_view ##------------------------ SEARCH AND SELECT ------------------------ ## SETEO VARIABLE DE ENTORNO bpy.types.Scene.SearchAndSelectOt = bpy.props.StringProperty(defaul...
gpl-3.0
kinow-io/kinow-python-sdk
kinow_client/apis/countries_api.py
1
4956
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.41 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from six i...
apache-2.0
dredgar/ss-info-fetcher
lib/lxml/cssselect.py
57
3366
"""CSS Selectors based on XPath. This module supports selecting XML/HTML tags based on CSS selectors. See the `CSSSelector` class for details. This is a thin wrapper around cssselect 0.7 or later. """ from __future__ import absolute_import from . import etree try: import cssselect as external_cssselect except I...
gpl-3.0
DemokratieInBewegung/abstimmungstool
voty/initproc/migrations/0036_resistance.py
1
1335
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2019-03-20 17:37 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
agpl-3.0
khalim19/gimp-plugin-export-layers
export_layers/tests/test_exportlayers.py
1
4934
# -*- coding: utf-8 -*- # # This file is part of Export Layers. # # Copyright (C) 2013-2019 khalim19 <khalim19@gmail.com> # # Export Layers 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 t...
gpl-3.0
bkj/ernest
enrich/compute-ownership.py
2
2228
#!/usr/bin/env python2.7 import argparse from modules.compute_ownership_graph import COMPUTE_OWNERSHIP from modules.compute_symbology import TO_SYMBOLOGY from modules.add_sic_descs import ADD_SIC_DESCRIPTION from modules.enrich_terminal_nodes import ENRICH_TERMINAL_NODES from generic.generic_meta_enrich import GENERI...
apache-2.0
noroutine/ansible
lib/ansible/modules/cloud/openstack/os_recordset.py
25
7951
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'stat...
gpl-3.0
bhansa/fireball
pyvenv/Lib/encodings/cp862.py
272
33370
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
gpl-3.0
hradec/gaffer
python/GafferDispatchUITest/NodeUITest.py
4
2059
########################################################################## # # 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 ...
bsd-3-clause
cjqian/incubator-airflow
airflow/operators/sensors.py
1
26221
# -*- 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, software ...
apache-2.0
chenzw95/Discord-Selfbot
cogs/imagedump.py
4
23084
import datetime import asyncio import re import sys import subprocess import json import time import os from datetime import datetime from discord.ext import commands from cogs.utils.checks import cmd_prefix_len '''Module for miscellaneous commands''' class Imagedump: def __init__(self, bot): self.bot =...
gpl-3.0
3DGenomes/tadbit
_pytadbit/utils/hmm.py
1
6952
from numpy import log, pi as pi_num, exp import sys def best_path(probs, pi, T): """ Viterbi algorithm with backpointers """ n = len(T) m = len(probs[0]) log_V = [[0. for _ in xrange(m)] for _ in xrange(n)] backpt = [[0 for _ in xrange(m)] for _ in xrange(n)] states = [0 fo...
gpl-3.0
LoHChina/nova
nova/tests/unit/conductor/tasks/test_live_migrate.py
11
21241
# 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...
apache-2.0
stevenmizuno/QGIS
python/plugins/processing/algs/qgis/TextToFloat.py
4
3145
# -*- coding: utf-8 -*- """ *************************************************************************** TextToFloat.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *************************...
gpl-2.0
AppleDash/BuhIRC
modules/urltitle.py
2
2187
# This file is part of BuhIRC. # # BuhIRC 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. # # BuhIRC is distributed in the hope that ...
gpl-3.0
hosseinmh/Django_learning
djmod/.venv/lib/python3.5/site-packages/pip/_vendor/webencodings/mklabels.py
512
1305
""" webencodings.mklabels ~~~~~~~~~~~~~~~~~~~~~ Regenarate the webencodings.labels module. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ import json try: from urllib import urlopen except ImportError: from urllib.request import urlopen def asser...
mit
gonzafirewall/kivy
kivy/tools/stub-gl-debug.py
75
13278
from __future__ import print_function a = '''cdef void glActiveTexture (cgl.GLenum texture) cdef void glAttachShader (cgl.GLuint program, cgl.GLuint shader) cdef void glBindAttribLocation (cgl.GLuint program, cgl.GLuint index, cgl.GLchar* name) cdef void glBindBuffer (cgl.GLenum target, cgl.GLuint buffer) cde...
mit
habeanf/Open-Knesset
mks/admin.py
7
3764
from django.contrib import admin from django.contrib.contenttypes import generic from django.db.models import Q from models import Member, Membership, MemberAltname from models import CoalitionMembership, Correlation, Party, \ Award, AwardType, Knesset from links.models import Link from video.models import Video f...
bsd-3-clause
hadronproject/HadronWeb
apps/frontend/migrations/0003_auto__add_developer__add_frontendimage__add_field_page_published__add_.py
1
8978
# -*- 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): # Adding model 'Developer' db.create_table('frontend_developer', ( ('id', self.gf('django.db.mod...
gpl-3.0
maxammann/mpv
waftools/checks/generic.py
14
5938
import os import inflector from waflib.ConfigSet import ConfigSet from waflib import Utils __all__ = [ "check_pkg_config", "check_cc", "check_statement", "check_libs", "check_headers", "compose_checks", "check_true", "any_version", "load_fragment", "check_stub", "check_ctx_vars", "check_program"] any_vers...
gpl-2.0
bitifirefly/edx-platform
lms/djangoapps/lti_provider/users.py
80
5166
""" LTI user management functionality. This module reconciles the two identities that an individual has in the campus LMS platform and on edX. """ import string import random import uuid from django.conf import settings from django.contrib.auth import authenticate, login from django.contrib.auth.models import User fr...
agpl-3.0
zaycev/metaphor-search
sear/sear/lexicon.py
1
2198
# coding: utf-8 # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> import os import leveldb import logging class DictLexicon(object): TERM_FREQ_SEP = chr(255) LEX_DIR_NAME = "dict.lexicon.ldb" def __init__(self, root_dir): self.term_dict = dict() self.root_dir = root_dir self.lexico...
mit
bitify/raspi
i2c-sensors/bitify/python/sensors/hmc5883l.py
3
4436
import math import bitify.python.utils.i2cutils as I2CUtils class HMC5883L(object): ''' Simple HMC5883L implementation ''' TWO_PI = 2 * math.pi CONF_REG_A = 0 CONF_REG_B = 1 MODE_REG = 2 DATA_START_BLOCK = 3 DATA_XOUT_H = 0 DATA_XOUT_L = 1 DATA_ZOUT_H = 2 DATA_ZOUT_L =...
apache-2.0
IllusionRom-deprecated/android_platform_external_chromium_org_tools_grit
grit/gather/regexp.py
62
3380
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''A baseclass for simple gatherers based on regular expressions. ''' import re from grit.gather import skeleton_gatherer class...
bsd-2-clause
eehello/shadowsocks
utils/autoban.py
1033
2156
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 clowwindy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to u...
apache-2.0
KibiCoin/kibicoin
qa/rpc-tests/forknotify.py
161
2179
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test -alertnotify # from test_framework import BitcoinTestFramework from bitcoinrpc.authproxy import Aut...
mit
YellowGlue/musicbox
netease_musicbox/menu.py
1
14582
#!/usr/bin/env python #encoding: UTF-8 ''' 网易云音乐 Menu ''' import curses import locale import sys import os import json import time import webbrowser from .api import NetEase from .player import Player from .ui import Ui home = os.path.expanduser("~") if os.path.isdir(home + '/netease-musicbox') is False: os.mkd...
mit
domob1812/huntercore
test/functional/example_test.py
8
9213
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what the t...
mit
Distrotech/reportlab
docs/userguide/ch2a_fonts.py
14
19923
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/userguide/ch2a_fonts.py from tools.docco.rl_doc_utils import * from reportlab.lib.codecharts import SingleByteEncodingChart from reportlab.platypu...
bsd-3-clause
EdLogan18/logan-repository
plugin.video.joao/genesisresolvers.py
266
64370
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
gpl-2.0
aemal/westcat
api/rest/viewsets/article.py
2
8270
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
Passtechsoft/TPEAlpGen
blender/release/scripts/addons_contrib/amaranth/animation/jump_frames.py
3
6967
# 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 in the hope that it will be useful,...
gpl-3.0
htdevices/linux-2.6-imx
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
jmartinezchaine/OpenERP
openerp/addons/caldav/wizard/calendar_event_import.py
9
3434
# -*- 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...
agpl-3.0
johnseekins/carbon
lib/carbon/writer.py
1
6892
"""Copyright 2009 Chris Davis 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 dist...
apache-2.0
kz/pybattle
main.py
1
4013
#!/usr/bin/env python from time import sleep import yaml from player import Player from attack import Attack def main(): # Load YAML config config_path = "./attack.yml" f = open(config_path, 'r') attack_config = yaml.load(f) f.close() # Load attacks attacks = {} for name, properties...
mit
mlcommons/training
reinforcement/tensorflow/minigo/oneoffs/joseki/joseki_query.py
5
6293
# Copyright 2019 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, ...
apache-2.0
akashsinghal/Speech-Memorization-App
Python_Backend/lib/urllib3/packages/ordered_dict.py
2040
8935
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_iden...
apache-2.0
qevo/py_data_helper
tests/check.py
1
6291
"""Tests for the data_helper.check module""" import sys, unittest from BaseTest import BaseTestWrapper class IsBoolTestCase(BaseTestWrapper.BaseTest): """check.is_bool() test cases""" def test_string(self): """Test if string is False""" x = 'y' self.assertFalse(self._bt['func'](x)) ...
mit
Prachigarg1/Prachi
flags_test.py
2
2567
import flags import unittest import re import source class FlagTestCase(unittest.TestCase): def testParseParamDescription(self): desc = '{!bbb|ccc?} aaa This \nis the desc. ' self.assertEquals( ('aaa', '!bbb|ccc?', 'This \nis the desc.'), flags.ParseParameterDescription(desc)) desc = '{....
apache-2.0
maghoff/node-gyp
gyp/test/mac/gyptest-framework.py
102
1459
#!/usr/bin/env python # Copyright (c) 2012 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 app bundles are built correctly. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(fo...
mit
denisenkom/django
tests/test_runner/test_discover_runner.py
3
2122
from contextlib import contextmanager import os import sys from unittest import expectedFailure from django.test import TestCase from django.test.runner import DiscoverRunner def expectedFailureIf(condition): """Marks a test as an expected failure if ``condition`` is met.""" if condition: return expe...
bsd-3-clause
rdowinton/sphinx-php
sensio/sphinx/bestpractice.py
6
1386
from docutils.parsers.rst import Directive, directives from docutils import nodes from string import upper from sphinx.util.compat import make_admonition from sphinx import addnodes from sphinx.locale import _ class bestpractice(nodes.Admonition, nodes.Element): pass class BestPractice(Directive): has_content...
mit
lucidmotifs/auto-aoc
.venv/lib/python3.5/site-packages/pylint/test/functional/inconsistent_returns.py
1
4474
#pylint: disable=missing-docstring, no-else-return, invalid-name, unused-variable, superfluous-parens """Testing inconsistent returns""" import math import sys # These ones are consistent def explicit_returns(var): if var >= 0: return math.sqrt(var) else: return None def explicit_returns2(var)...
mit
jonaqp/heroku
core/utils/uploads.py
1
2729
import os import sys from PIL import Image from django.conf import settings from django.core.files.storage import default_storage as storage from core.utils import resize_image prefix_profile = 'uploads/profiles/' prefix_container = 'uploads/container/' prefix_upload_company = 'upload/logo_company' def upload_loca...
mit
saturday-shi/spark
examples/src/main/python/mllib/decision_tree_classification_example.py
106
2372
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
darkryder/django
django/contrib/staticfiles/utils.py
335
1976
import fnmatch import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured def matches_patterns(path, patterns=None): """ Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``). """ if patt...
bsd-3-clause
manuelm/pyload
module/plugins/crypter/EmbeduploadCom.py
5
2449
# -*- coding: utf-8 -*- import re from module.plugins.internal.Crypter import Crypter from module.network.HTTPRequest import BadHeader class EmbeduploadCom(Crypter): __name__ = "EmbeduploadCom" __type__ = "crypter" __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www...
gpl-3.0
xzYue/odoo
addons/account/wizard/account_automatic_reconcile.py
340
11604
# -*- 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...
agpl-3.0
YcheLanguageStudio/PythonStudy
crpytography/libs/extended_euclidean.py
1
1387
class ExtendedGcdEuclidean: def __init__(self, modulo_num, another_num): self.modulo_num = modulo_num self.r_list = list([modulo_num, another_num]) self.q_list = list([None, None]) self.x_list = list([1, 0]) self.y_list = list([0, 1]) self.iter_list = list([-1, 0]) ...
mit
0xTony/Web-Filters
merger.py
1
2808
# -*- coding: utf-8 -*- __version__ = "0.0.0.0.1b Pre Alpha Alpha" __author__ = "Tony Martin" # Creating a host file for blocking ads # Based on the idea of various adblocking sw running on TomatoUSB # The goal is to simplify the adblocking sw by having a central point # that merges and hosts the host file - this will...
mit
sarakha63/persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/oktoberfesttv.py
168
1500
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class OktoberfestTVIE(InfoExtractor): _VALID_URL = r'https?://www\.oktoberfest-tv\.de/[^/]+/[^/]+/video/(?P<id>[^/?#]+)' _TEST = { 'url': 'http://www.oktoberfest-tv.de/de/kameras/video/hb-zelt', 'info...
gpl-3.0
priseborough/InertialNav
code/plot_states.py
6
2287
#!/bin/python import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cbook as cbook import numpy as np import math # State vector: # 0-3: quaternions (q0, q1, q2, q3) # 4-6: Velocity - m/sec (North, East, Down) # 7-9: Position - m (North, East, Down) # 10-12: Delta Angle bias - rad (X,Y,Z) #...
bsd-3-clause
ThomasMiconi/nupic.research
projects/l2_pooling/multi_column_convergence.py
2
22360
# Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/or modify # it under the ...
agpl-3.0
meego-tablet-ux/meego-app-browser
third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_XML.py
33
24745
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # 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 # ...
bsd-3-clause
googleads/google-ads-python
google/ads/googleads/v8/services/services/campaign_shared_set_service/transports/base.py
1
4228
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
airware/jsbsim
tests/TestScriptOutput.py
2
3376
# TestScriptInputOutput.py # # Check that <output> tags specified in a script are properly handled # # Copyright (c) 2015 Bertrand Coconnier # # 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; eit...
lgpl-2.1
michaelpacer/scikit-image
skimage/morphology/greyreconstruct.py
36
8409
""" This morphological reconstruction routine was adapted from CellProfiler, code licensed under both GPL and BSD licenses. Website: http://www.cellprofiler.org Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2011 Broad Institute All rights reserved. Original author: Lee Kamentsky """...
bsd-3-clause
batoulapps/ITL
new_method/tests/run_tests.py
2
2608
#!/usr/bin/env python # This script is used to test the new method implementation # It does that by comparing the computed prayer times for specific # locations on specific dates to the "official" times on these dates. # "official" turns out to be a tricky one for locations in places # that are in non-Muslim countries...
lgpl-2.1
sabel83/metashell
3rd/templight/llvm/tools/clang/tools/clang-format/clang-format.py
12
4683
# This file is a minimal clang-format vim-integration. To install: # - Change 'binary' if clang-format is not on the path (see below). # - Add to your .vimrc: # # map <C-I> :pyf <path-to-this-file>/clang-format.py<cr> # imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr> # # The first line enables clang-fo...
gpl-3.0
astorije/ansible
plugins/inventory/spacewalk.py
137
4999
#!/bin/env python """ Spacewalk external inventory script ================================= Ansible has a feature where instead of reading from /etc/ansible/hosts as a text file, it can query external programs to obtain the list of hosts, groups the hosts are in, and even variables to assign to each host. To use thi...
gpl-3.0
ebertti/nospam
contator.py
1
1974
# coding=utf-8 import socket import json import logging import configuracao logger = logging.getLogger() class Contadores(object): def __init__(self): self.idiomas = {} self.com_link = 0 self.sem_link = 0 # Porta que o Servidor esta self.tcp = socket.socket(socket.AF_INET,...
mit
tlakshman26/cinder-new-branch
cinder/tests/unit/api/v1/test_volumes.py
2
52093
# Copyright 2013 Josh Durgin # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
LxiaoGirl/wySpider
thirdparty/requests/auth.py
70
6179
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header, ...
gpl-2.0
LordDamionDevil/Lony
lib/youtube_dl/extractor/cinchcast.py
177
1678
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( unified_strdate, xpath_text, ) class CinchcastIE(InfoExtractor): _VALID_URL = r'https?://player\.cinchcast\.com/.*?assetId=(?P<id>[0-9]+)' _TEST = { # Actual test is run in generic,...
gpl-3.0
adit-chandra/tensorflow
tensorflow/lite/testing/op_tests/pack.py
3
2994
# Copyright 2019 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...
apache-2.0
RPGOne/Skynet
numpy-master/numpy/distutils/command/build_clib.py
152
12217
""" Modified version of build_clib that handles fortran source files. """ from __future__ import division, absolute_import, print_function import os from glob import glob import shutil from distutils.command.build_clib import build_clib as old_build_clib from distutils.errors import DistutilsSetupError, DistutilsError...
bsd-3-clause
CospanDesign/nysa
test/unit/test_sdb_component.py
1
7028
#!/usr/bin/python import unittest import json import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) from nysa.cbuilder import sdb_component SDB_DATA = \ " Set the Vendor ID (Hexidecimal 64-bit Number)\n" \...
mit
ghchinoy/tensorflow
tensorflow/python/client/session_partial_run_test.py
14
11707
# 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...
apache-2.0
dangayle/substitutions
templatetags/substitutions.py
1
1593
# encoding: utf-8 """ Make reading the news more fun. http://xkcd.com/1288/ """ from __future__ import unicode_literals import re from django import template from django.template.defaultfilters import stringfilter register = template.Library() substitutes = { "witnesses": "these dudes I know", "Witnesses": "Th...
mit
kvar/ansible
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
14
16746
#!/usr/bin/python # # Copyright (c) 2017 Obezimnaka Boms, <t-ozboms@microsoft.com> # Copyright (c) 2017 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 ANSIBLE_METADATA ...
gpl-3.0
marcellodesales/svnedge-console
svn-server/lib/suds/mx/core.py
210
4839
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 hope that it will ...
agpl-3.0
bleib1dj/boto
tests/unit/cloudsearch2/test_connection.py
114
8278
#!/usr/bin env python from tests.unit import AWSMockServiceTestCase from boto.cloudsearch2.domain import Domain from boto.cloudsearch2.layer1 import CloudSearchConnection class TestCloudSearchCreateDomain(AWSMockServiceTestCase): connection_class = CloudSearchConnection def default_body(self): retu...
mit
maartenq/ansible
lib/ansible/module_utils/scaleway.py
4
4064
import json import sys from ansible.module_utils.basic import env_fallback from ansible.module_utils.urls import fetch_url def scaleway_argument_spec(): return dict( api_token=dict(required=True, fallback=(env_fallback, ['SCW_TOKEN', 'SCW_API_KEY', 'SCW_OAUTH_TOKEN', 'SCW_API_TOKEN']), ...
gpl-3.0
maxogden/npm-www
node_modules/npm/node_modules/node-gyp/gyp/test/variants/gyptest-variants.py
240
1315
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verify handling of build variants. TODO: Right now, only the SCons generator supports this, so the test case is SCons-specific. In pa...
bsd-2-clause
domalexxx/shop
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/flock_tool.py
1835
1748
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
gpl-2.0
ayuopy/Planbot
src/facebook.py
1
5626
#!/usr/bin/python3 """ Planbot's Facebook application. Handles requests and responses through the Facebook Graph API. Converts location data to postcode with Postcodes.io API. """ import os import logging import requests from bottle import Bottle, request, debug from engine import Engine # set environmental variabl...
gpl-3.0
lino-framework/xl
lino_xl/lib/polls/utils.py
1
1281
# -*- coding: UTF-8 -*- # Copyright 2013-2018 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) from django.utils.translation import gettext_lazy as _ from lino.mixins import RegistrableState from lino.api import dd class PollStates(dd.Workflow): item_class = Registrabl...
bsd-2-clause
mozilla/olympia
src/olympia/lib/akismet/migrations/0001_initial.py
7
2842
# Generated by Django 2.2.5 on 2019-09-12 15:18 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import olympia.amo.models class Migration(migrations.Migration): initial = True dependencies = [ ('bandwagon', '000...
bsd-3-clause
schatten/logan
app/wsgi.py
1
1416
""" WSGI config for logan project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
mit
zeptonaut/catapult
tracing/third_party/tvcm/third_party/rcssmin/_setup/py3/setup.py
29
14135
# -*- coding: ascii -*- # # Copyright 2007 - 2013 # Andr\xe9 Malo or his licensors, as applicable # # 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/LICENS...
bsd-3-clause
YufeiZhang/Principles-of-Programming-Python-3
Labs/lab6/sum_of_digits.py
1
1045
''' $ python3 sum_of_digits.py Input a number that we will use as available digits: 12234 Input a number that represents the desired sum: 5 There are 4 solutions. $ python3 sum_of_digits.py Input a number that we will use as available digits: 11111 Input a number that represents the desired sum: 5 There is a unique so...
gpl-3.0
rven/odoo
addons/website_slides_survey/tests/test_course_certification_failure.py
4
6417
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.survey.tests.common import TestSurveyCommon class TestCourseCertificationFailureFlow(TestSurveyCommon): def test_course_certification_failure_flow(self): # Step 1: create a simple certifica...
agpl-3.0
ruuk/script.web.viewer2
lib/webviewer/bs4/builder/_lxml.py
12
6981
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from StringIO import StringIO import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeBuilder, XML) from b...
gpl-2.0
tatyankaZSGX/addressbook
fixture/db.py
1
1791
__author__ = 'ZSGX' import mysql.connector from model.group import Group from model.contact import Contact import re class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection...
apache-2.0
Baumelbi/IntroPython2016
students/darrylsw/session03/list_lab.py
3
1279
#!/usr/bin/env python3 # Author: Darryl Wong # Date: 10/15/2016 # Week 3 homework list = ["apples", "pears", "oranges", "peaches"] print (list) # prompt the user for a fruit to add to our list fruit = input ("Add a fruit: ") list.append(fruit) print (list) # prompt the user for a fruit by index number index = 0 ...
unlicense
veridiam/Madcow-Waaltz
build/lib/madcow/include/simplejson/tests/test_pass1.py
259
1903
from unittest import TestCase import simplejson as json # from http://json.org/JSON_checker/test/pass1.json JSON = r''' [ "JSON Test Pattern pass1", {"object with 1 member":["array with 1 element"]}, {}, [], -42, true, false, null, { "integer": 1234567890, "real": -...
gpl-3.0
liuqr/edx-xiaodun
lms/djangoapps/wechat/tests/test_video_handlers.py
12
12263
# -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" from mock import patch import os import tempfile import textwrap import json from datetime import timedelta from webob import Request from xmodule.contentstore.content import StaticContent from xmodule.modulestore import Location from xmodule.contentstore.dj...
agpl-3.0
SerCeMan/intellij-community
plugins/hg4idea/testData/bin/hgext/rebase.py
90
32420
# rebase.py - rebasing feature for mercurial # # Copyright 2008 Stefano Tortarolo <stefano.tortarolo at gmail dot com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''command to move sets of revisions to a different ancestor T...
apache-2.0
40223211/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/atexit.py
743
1049
"""allow programmer to define multiple exit functions to be executedupon normal program termination. Two public functions, register and unregister, are defined. """ class __loader__(object): pass def _clear(*args,**kw): """_clear() -> None Clear the list of previously registered exit functions.""" ...
gpl-3.0
pentestfail/TA-FireEye_TAP
bin/ta_fireeye_tap/solnlib/packages/requests/packages/urllib3/util/retry.py
198
9981
from __future__ import absolute_import import time import logging from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, ) from ..packages import six log = logging.getLogger(__name__) class Retry(object): """ Retry configuration. ...
mit
huggingface/transformers
src/transformers/models/roformer/tokenization_utils.py
1
2651
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. 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...
apache-2.0
hwroitzsch/BikersLifeSaver
lib/python3.5/site-packages/numpy/linalg/info.py
264
1198
"""\ Core Linear Algebra Tools ------------------------- Linear algebra basics: - norm Vector or matrix norm - inv Inverse of a square matrix - solve Solve a linear system of equations - det Determinant of a square matrix - lstsq Solve linear least-squares problem...
mit
AndroidOpenDevelopment/android_external_skia
platform_tools/android/gyp_gen/generate_user_config.py
67
3795
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Function for generating the SkUserConfig file, customized for Android.""" import os import shutil AUTOGEN_WARNING = ( """ ///////////////////////////////////////...
bsd-3-clause
Lx37/pyqtgraph
examples/ViewBox.py
6
2787
#!/usr/bin/python # -*- coding: utf-8 -*- """ ViewBox is the general-purpose graphical container that allows the user to zoom / pan to inspect any area of a 2D coordinate system. This unimaginative example demonstrates the constrution of a ViewBox-based plot area with axes, very similar to the way PlotItem is built....
mit
veo-labs/nose-progressive
noseprogressive/plugin.py
4
10478
from functools import partial from os import getcwd import pdb import sys from warnings import warn from nose.plugins import Plugin from noseprogressive.runner import ProgressiveRunner from noseprogressive.tracebacks import DEFAULT_EDITOR_SHORTCUT_TEMPLATE from noseprogressive.wrapping import cmdloop, set_trace, Stre...
mit
janslow/boto
tests/integration/gs/test_resumable_uploads.py
101
25789
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
mit
rdonnelly/ultimate-league-app
src/ultimate/leagues/migrations/0017_auto_20200204_2133.py
2
10389
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-02-04 21:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leagues', '0016_fieldnames_hidden'), ] operations = [ migrations.AlterFiel...
bsd-3-clause
EdgarSun/Django-Demo
django/conf/locale/it/formats.py
232
1838
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' # 25 Ottobre 2006 TIME_FORMAT = 'H:i:s' # 14:30:59 DATETIME_FORMAT...
mit