repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
ahmadio/edx-platform
refs/heads/master
common/djangoapps/external_auth/migrations/__init__.py
12133432
creativepsyco/python-phabricator
refs/heads/master
phabricator/base/__init__.py
12133432
WALR/taiga-back
refs/heads/master
taiga/stats/apps.py
14
# Copyright (C) 2015 Taiga Agile LLC <support@taiga.io> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This ...
attilahorvath/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py
115
# Copyright (C) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
FlipperPA/wagtailpress
refs/heads/master
wagtailpress/migrations/0003_config_site.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-03 22:17 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0023_alter_page_revision_on_delete_behaviour'...
CloverHealth/airflow
refs/heads/clover
tests/models.py
2
# -*- 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 #...
ita1024/samba
refs/heads/master
source3/stf/comfychair.py
82
#! /usr/bin/env python # Copyright (C) 2002, 2003 by Martin Pool <mbp@samba.org> # Copyright (C) 2003 by Tim Potter <tpot@samba.org> # # 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 ve...
rosswhitfield/mantid
refs/heads/master
qt/python/mantidqt/widgets/sliceviewer/peaksviewer/actions.py
2
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # co...
terotic/digihel
refs/heads/master
search/fields.py
1
from wagtail.wagtailsearch import index tag_search_field = index.RelatedFields('tags', [ index.SearchField('name'), ])
edlabh/SickRage
refs/heads/master
lib/simplejson/__init__.py
448
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
zzeleznick/zDjango
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/chardistribution.py
2754
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
iemejia/beam
refs/heads/master
sdks/python/apache_beam/utils/__init__.py
23
# # 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...
lmjohns3/theanets
refs/heads/master
test/util_test.py
2
import numpy as np import theanets import theanets.util class TestRandomMatrix: def test_sparsity(self): x = theanets.util.random_matrix(1000, 200, sparsity=0.1, rng=5) assert x.shape == (1000, 200) assert np.allclose(x.mean(), 0, atol=1e-2), x.mean() assert np.allclose(x.std(), 0....
fuhongliang/odoo
refs/heads/8.0
openerp/service/wsgi_server.py
335
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
levelrf/level_basestation
refs/heads/master
gr-digital/examples/narrowband/digital_bert_rx.py
1
#!/usr/bin/env python # # Copyright 2008,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your optio...
nparrilla/is210-week-03-warmup
refs/heads/master
tests/test_task_02.py
28
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests lesson 03 task 02.""" # Import Python libs import unittest # Import student file import task_02 class L03T02TestCase(unittest.TestCase): """ Tests for lesson 03 task 02. """ def test_weeks(self): """ Tests that the WEEKS consta...
Elico-Corp/odoo_OCB
refs/heads/9.0
addons/product_expiry/product_expiry.py
20
# Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import openerp from openerp import api, models from openerp.osv import fields, osv class stock_production_lot(osv.osv): _inherit = 'stock.production.lot' def _get_date(dtype): """Return a function to compute t...
markeTIC/OCB
refs/heads/8.0
addons/mrp_byproduct/mrp_byproduct.py
150
# -*- 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...
wujuguang/sentry
refs/heads/master
tests/sentry/tsdb/__init__.py
12133432
mottosso/be
refs/heads/master
be/vendor/requests/packages/chardet/chardistribution.py
2754
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
roadmapper/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_logging_metric.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
jquacinella/IS602_Project
refs/heads/master
web/gluon/portalocker.py
10
#!/usr/bin/env python # -*- coding: utf-8 -*- # portalocker.py # Cross-platform (posix/nt) API for flock-style file locking. # Requires python 1.5.2 or better. """ Cross-platform (posix/nt) API for flock-style file locking. Synopsis: import portalocker file = open(\"somefile\", \"r+\") port...
andrewnc/scikit-learn
refs/heads/master
sklearn/isotonic.py
206
# Authors: Fabian Pedregosa <fabian@fseoane.net> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Nelle Varoquaux <nelle.varoquaux@gmail.com> # License: BSD 3 clause import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixi...
Teagan42/home-assistant
refs/heads/dev
homeassistant/components/proliphix/__init__.py
36
"""The proliphix component."""
exploreodoo/datStruct
refs/heads/master
odoo/addons/website_sale_options/controllers/main.py
236
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website_sale.controllers.main import website_sale class website_sale_options(website_sale): @http.route(['/shop/product/<model("product.template"):product>'...
ShinySide/SM-530T
refs/heads/master
scripts/rt-tester/rt-tester.py
11005
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # 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. # import os import sys import getopt import sh...
nurmd2/nurmd
refs/heads/master
addons/website_event_questions/report/report_event_registrations_questions.py
52
# -*- coding: utf-8 -*- from openerp import fields, models, tools class ReportEventRegistrationQuestions(models.Model): _name = "event.question.report" _auto = False attendee_id = fields.Many2one(comodel_name='event.registration', string='Registration') question_id = fields.Many2one(comodel_name='ev...
sametmax/Django--an-app-at-a-time
refs/heads/master
ignore_this_directory/django/test/utils.py
3
import collections import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from io import StringIO from itertools import chain from types import SimpleNamespace from unittest import TestCase, skipIf, skipUnless from xml.dom.minidom import Node, p...
vongochung/buiquocviet
refs/heads/master
django/contrib/localflavor/se/__init__.py
12133432
onurhunce/AutoAlbumCreator
refs/heads/master
Assignment/AlbumCreator/management/commands/_private.py
12133432
KellyChan/python-examples
refs/heads/master
javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/contrib/localflavor/cz/__init__.py
12133432
SeleniumHQ/buck
refs/heads/master
py/buck/zip/__init__.py
12133432
ebukoz/thrive
refs/heads/develop
erpnext/education/report/course_wise_assessment_report/__init__.py
12133432
swdrsk/myhtml
refs/heads/master
django/mysite/mysite/__init__.py
12133432
sliz1/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/_pytest/vendored_packages/__init__.py
12133432
Metaswitch/calico-neutron
refs/heads/calico-readme
neutron/agent/linux/interface.py
7
# Copyright 2012 OpenStack Foundation # 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...
chhao91/QGIS
refs/heads/master
python/ext-libs/pygments/styles/fruity.py
364
# -*- coding: utf-8 -*- """ pygments.styles.fruity ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "fruity" vim theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Token, Co...
heuermh/cloudbiolinux
refs/heads/master
contrib/flavor/millstone/installer.py
7
from fabric.api import * from fabric.contrib.files import * import os.path import os INSTALLATION_PATH = "$HOME/millstone" REPO_URL = "git@github.com:churchlab/millstone.git" REPO_STABLE_COMMIT = "634db63de2fb275719868839bf44bd9b4b9f016e" BOOTSTRAP_SCRIPT = """#!/bin/bash set -x export RUN_MASTER=%d export RUN_WORKE...
bixbydev/Bixby
refs/heads/master
google/gdata-2.0.18/tests/gdata_tests/contacts/profiles/live_client_test.py
39
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
open-synergy/stock-logistics-warehouse
refs/heads/8.0
stock_inventory_chatter/models/__init__.py
2
# -*- coding: utf-8 -*- # Copyright 2017 Eficent Business and IT Consulting Services S.L. # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import stock
levilucio/SyVOLT
refs/heads/master
UMLRT2Kiltera_MM/Properties/from_thesis/HMM4_then2_ConnectedLHS.py
1
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HMM4_then2_ConnectedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMM4_then2_ConnectedLHS. """ #...
bitslabsyr/stack
refs/heads/master
config.py
1
import os # MONGODB CONFIG AUTH = True USERNAME = 'LOCAL_DB_USERNAME' PASSWORD = 'LOCAL_DB_PASSWORD' # CENTRAL MONGODB SERVER CT_SERVER = 'CENTRAL_DB_ADDRESS' CT_DB_NAME = 'CENTRAL_DB_NAME' CT_AUTH = True CT_USERNAME = 'CENTRAL_DB_USERNAME' CT_PASSWORD = 'CENTRAL_DB_USERNAME' # Directory structure config vars BASED...
mjem/carrie
refs/heads/master
setup.py
1
#!/usr/bin/env python import os if 'PYTHONDONTWRITEBYTECODE' in os.environ: del os.environ['PYTHONDONTWRITEBYTECODE'] import distribute_setup distribute_setup.use_setuptools() from setuptools import setup, find_packages # Utility function to read the README file. # Used for the long_description. It's nice, becau...
Lokesh-K-Haralakatta/iot-python
refs/heads/master
samples/gatewayExamples/gatewayPublishEvent.py
1
# ***************************************************************************** # Copyright (c) 2016 IBM Corporation and other Contributors. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution,...
gauravbose/digital-menu
refs/heads/master
digimenu2/django/contrib/gis/geos/base.py
197
from ctypes import c_void_p from django.contrib.gis.geos.error import GEOSException # Trying to import GDAL libraries, if available. Have to place in # try/except since this package may be used outside GeoDjango. try: from django.contrib.gis import gdal except ImportError: # A 'dummy' gdal module. class ...
kevinastone/sentry
refs/heads/master
src/sentry/templatetags/sentry_helpers.py
11
""" sentry.templatetags.sentry_helpers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # XXX: Import django-paging's template tags so we don't have to worry about # INSTALLED_APPS from __future__ import...
shubhdev/openedx
refs/heads/master
lms/djangoapps/verify_student/models.py
20
# -*- coding: utf-8 -*- """ Models for Student Identity Verification This is where we put any models relating to establishing the real-life identity of a student over a period of time. Right now, the only models are the abstract `PhotoVerification`, and its one concrete implementation `SoftwareSecurePhotoVerification`...
3dfxsoftware/cbss-addons
refs/heads/master
l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py
374
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
Reagankm/KnockKnock
refs/heads/master
venv/lib/python3.4/site-packages/matplotlib/sphinxext/plot_directive.py
11
""" A directive for including a matplotlib plot in a Sphinx document. By default, in HTML output, `plot` will include a .png file with a link to a high-res .png and .pdf. In LaTeX output, it will include a .pdf. The source code for the plot may be included in one of three ways: 1. **A path to a source file** as t...
russellb/nova
refs/heads/master
nova/api/openstack/compute/server_metadata.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
prune998/ansible
refs/heads/devel
lib/ansible/modules/cloud/misc/__init__.py
12133432
ThiagoGarciaAlves/intellij-community
refs/heads/master
python/testData/qualifiedName/topLevelFunctionReference/a/b/c/__init__.py
12133432
saurabh6790/aimobilize-app-backup
refs/heads/master
accounts/report/customer_account_head/__init__.py
12133432
1st/django
refs/heads/master
tests/pagination/models.py
559
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Article(models.Model): headline = models.CharField(max_length=100, default='Default headline') pub_date = models.DateTimeField() def __str__(self): return self.headline
shupelneker/gae_new_structure
refs/heads/master
boilerplate/external/httplib2/test/brokensocket/socket.py
314
from realsocket import gaierror, error, getaddrinfo, SOCK_STREAM
CyrilWaechter/pyRevitMEP
refs/heads/master
pyRevitMEP.tab/Manage.panel/Copy.pulldown/CopyPipeType.pushbutton/script.py
1
""" Copyright (c) 2017 Cyril Waechter Python scripts for Autodesk Revit This file is part of pypevitmep repository at https://github.com/CyrilWaechter/pypevitmep pypevitmep is an extension for pyRevit. It contain free set of scripts for Autodesk Revit: you can redistribute it and/or modify it under the terms of the G...
Rungee/openrouteservice
refs/heads/master
build/tools/minimize.py
297
# Minimal Python Minimizer # Copyright 2008, Christopher Schmidt # Released under the MIT License # # Taken from: http://svn.crschmidt.net/personal/python/minimize.py # $Id: minimize.py 6 2008-01-03 06:33:35Z crschmidt $ # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software...
v1bri/gnuradio
refs/heads/master
gr-vocoder/examples/codec2_audio_loopback.py
47
#!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
lcy-seso/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py
5
# Copyright (c) 2018 PaddlePaddle 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 app...
KristofferC/FeynSimul
refs/heads/master
lm2m2_npart.py
1
# This file is part of FeynSimul. # # FeynSimul 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. # # FeynSimul is distributed in the hop...
olivierb2/openchange
refs/heads/master
python/openchange/tests/test_provision.py
1
#!/usr/bin/python # OpenChange provisioning # Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2009 # # 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 # ...
pjg101/SickRage
refs/heads/master
lib/sqlalchemy/orm/identity.py
78
# orm/identity.py # Copyright (C) 2005-2014 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 import weakref from . import attributes from .. import util class IdentityMap(dict): ...
fchu/hadoop-0.20.205
refs/heads/master
contrib/hod/hodlib/ServiceProxy/serviceProxy.py
182
#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 use thi...
krafczyk/spack
refs/heads/develop
var/spack/repos/builtin/packages/vpic/package.py
2
############################################################################## # Copyright (c) 2017, Los Alamos National Security, LLC # Produced at the Los Alamos National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, ...
josegom/training
refs/heads/master
ctf/utad2016/my_crypto-1dd6cf93be2c40a74364982847b35a30.py
1
import random import base64 import codecs def demutate2(s): demuted = "" try: demuted = base64.b64decode(bytes(s,"utf-8")).decode("utf-8") except: demuted = codecs.decode(s,'rot_13') return demuted def demutate(s): demuted = "" if s.endswith("="): try: demuted = base64.b64decode(bytes(s,"u...
Sudokeys/server-tools
refs/heads/8.0
super_calendar/models/super_calendar_configurator.py
21
# -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # # Copyright (c) All rights reserved: # (c) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # (c) 2012 Domsense srl (<http://www.domse...
HenrikSolver/micropython
refs/heads/master
tests/basics/set_pop.py
28
s = {1} print(s.pop()) try: print(s.pop(), "!!!") except KeyError: pass else: print("Failed to raise KeyError") # this tests an optimisation in mp_set_remove_first # N must not be equal to one of the values in hash_allocation_sizes N = 11 s = set(range(N)) while s: print(s.pop()) # last pop() should tr...
xme1226/horizon
refs/heads/master
openstack_dashboard/dashboards/project/data_processing/clusters/workflows/scale.py
32
# 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 # distributed under the...
smasala/phantomjs
refs/heads/master
src/qt/qtwebkit/Source/ThirdParty/gtest/scripts/pump.py
233
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
olexiim/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/modulestore/tests/test_xml.py
8
""" Tests around our XML modulestore, including importing well-formed and not-well-formed XML. """ import os.path import unittest from glob import glob from mock import patch from xmodule.modulestore.xml import XMLModuleStore from xmodule.modulestore import ModuleStoreEnum from xmodule.tests import DATA_DIR from opaq...
hnoerdli/hussa
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/tools/graphviz.py
2679
#!/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. """Using the JSON dumped by the dump-dependency-json generator, generate input suitable for graphviz to render a dependency graph of targets...
KellenSunderland/sockeye
refs/heads/master
test/unit/test_callback.py
1
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
hfp/libxsmm
refs/heads/master
samples/deeplearning/sparse_training/fairseq/fairseq/model_parallel/modules/multihead_attention.py
1
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, Optional, Tuple import torch import torch.nn.functional as F from fairseq import utils from torch import Tensor, nn ...
benhc123/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/same-rule-output-file-name/src/touch.py
679
#!/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. import sys f = open(sys.argv[1], 'w+') f.write('Hello from touch.py\n') f.close()
mm-s/bitcoin
refs/heads/master
test/functional/combine_logs.py
69
#!/usr/bin/env python3 """Combine logs from multiple bitcoin nodes as well as the test_framework log. This streams the combined log output to stdout. Use combine_logs.py > outputfile to write to an outputfile.""" import argparse from collections import defaultdict, namedtuple import heapq import itertools import os i...
camradal/ansible
refs/heads/devel
lib/ansible/plugins/terminal/sros.py
24
# # (c) 2016 Red Hat Inc. # # 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 by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
nicolaoun/NS3-AM-Proto-Simulation
refs/heads/master
src/point-to-point-layout/bindings/callbacks_list.py
240
callback_classes = [ ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt...
thdtjsdn/FreeCAD
refs/heads/master
src/Mod/Cam/Init.py
55
# FreeCAD init script of the Cam module # (c) 2007 Juergen Riegel #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * #* * #* This f...
Pakoach/Sick-Beard-Animes
refs/heads/master
cherrypy/process/__init__.py
36
"""Site container for an HTTP server. A Web Site Process Bus object is used to connect applications, servers, and frameworks with site-wide services such as daemonization, process reload, signal handling, drop privileges, PID file management, logging for all of these, and many more. The 'plugins' module define...
kmoocdev2/edx-platform
refs/heads/real_2019
lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py
87
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations, models def forwards(apps, schema_editor): """Load data from the fixture""" CourseEmailTemplate = apps.get_model("bulk_email", "CourseEmailTemplate") if not Cour...
klonage/nlt-gcs
refs/heads/master
packages/IronPython.StdLib.2.7.4/content/Lib/encodings/utf_16_be.py
103
""" Python 'utf-16-be' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_16_be_encode def decode(input, errors='strict'): return codecs.utf_16_be_decode(input, errors, True) class...
praba230890/PYPOWER
refs/heads/master
pypower/case57.py
2
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Power flow data for IEEE 57 bus test case. """ from numpy import array def case57(): """Power flow data for IEEE 57 bus test case. Please see L{casefo...
AscSecTeam/knackered-runner
refs/heads/master
Knackered-Backend/ChartGenerator.py
1
# this class takes aggregated check data and generates an SVG chart using pygal import pygal import os import shutil class ChartGenerator: def __init__(self, location): self.config = pygal.Config() self.custom_config(self.config) self.chart_location = location + 'chart.svg' ...
sophilabs/pyuy
refs/heads/master
pyuy/main/cms_plugins.py
2
from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from models import MenuPlugin class Menu(CMSPluginBase): model = MenuPlugin name = _("Menu") render_template = "menu.html" def render(self, context, instance, place...
adobe/chromium
refs/heads/master
chrome/browser/resources/web_dev_style/css_checker.py
24
# 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. """Presubmit script for Chromium WebUI resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the...
kobolabs/calibre
refs/heads/kobo
src/calibre/ebooks/rtf2xml/paragraph_def.py
24
######################################################################### # # # # # copyright 2002 Paul Henry Tremblay # # ...
DynamicGravitySystems/DGP
refs/heads/develop
dgp/__main__.py
1
# -*- coding: utf-8 -*- import sys import time import traceback from PyQt5.QtCore import Qt from PyQt5.QtGui import QPixmap from PyQt5 import QtCore from PyQt5.QtWidgets import QApplication, QSplashScreen from dgp.gui.main import MainWindow app = None def excepthook(type_, value, traceback_): """This allows ID...
ProfessionalIT/maxigenios-website
refs/heads/master
sdk/google_appengine/lib/django-1.4/django/contrib/staticfiles/finders.py
83
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.datastructures import SortedDict from django.utils.functional import empty, memoize, LazyObject from django.utils.importl...
DavidLKing/swe
refs/heads/master
mapping.py
1
import sys class mapping: def __init__(self): parser = argparse.ArgumentParser() # parser.add_argument('-f', '--folds_dir', help="folds directory (e.g. folds/gold") requiredNamed = parser.add_argument_group('required named arguments') requiredNamed.add_argument('-i', '--input', help...
BT-fgarbely/odoo
refs/heads/8.0
addons/email_template/tests/__init__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
childsish/lhc-python
refs/heads/master
tests/test_io/test_txt/__init__.py
12133432
mudithkr/zamboni
refs/heads/master
mkt/recommendations/tests/__init__.py
12133432
programadorjc/django
refs/heads/master
tests/i18n/other/__init__.py
12133432
ESS-LLP/erpnext-healthcare
refs/heads/master
erpnext/buying/print_format/__init__.py
12133432
rdbwebster/umsamples
refs/heads/master
src/__init__.py
12133432
leakim/svtplay-dl
refs/heads/master
lib/svtplay_dl/service/picsearch.py
1
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import import re import json import copy from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.fetcher.rtmp import RTMP from svtplay_dl.fetcher.hds import hdsparse from svtplay...
MediaSapiens/autonormix
refs/heads/master
django/utils/text.py
69
import re from django.utils.encoding import force_unicode from django.utils.functional import allow_lazy from django.utils.translation import ugettext_lazy from htmlentitydefs import name2codepoint # Capitalizes the first letter of a string. capfirst = lambda x: x and force_unicode(x)[0].upper() + force_unicode(x)[1:]...
AaronTao1990/scrapy
refs/heads/master
scrapy/contrib/downloadermiddleware/downloadtimeout.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.downloadermiddleware.downloadtimeout` is deprecated, " "use `scrapy.downloadermiddlewares.downloadtimeout` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.downloadermid...
subodhchhabra/airflow
refs/heads/master
airflow/ti_deps/deps/dag_unpaused_dep.py
20
# -*- 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 #...
zzeleznick/zDjango
refs/heads/master
venv/lib/python2.7/site-packages/django/conf/locale/en/__init__.py
12133432