code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Wrapper for all clustering statistic calculations on galaxies in a mock catalog. """ from __future__ import (division, print_function, absolute_import, unicode_literals) __author__ = ('Manodeep Sinha') __all__ = ("DDrppi_mocks", "DDtheta_mocks"...
manodeep/Corrfunc
Corrfunc/mocks/__init__.py
Python
mit
593
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Lukas Kemmer # # 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 require...
lukas-ke/faint-graphics-editor
py/faint/svg/svg_re.py
Python
apache-2.0
1,260
# -*- coding: utf-8 -*- """ /*************************************************************************** DsgTools A QGIS plugin Brazilian Army Cartographic Production Tools ------------------- begin : 2016-02-18 git sha ...
lcoandrade/DsgTools
gui/DatabaseTools/UserTools/PermissionManagerWizard/permissionWizardProfile.py
Python
gpl-2.0
2,860
""" Builds out and synchronizes yum repo mirrors. Initial support for rsync, perhaps reposync coming later. Copyright 2006-2007, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by th...
ssalevan/cobbler
cobbler/action_reposync.py
Python
gpl-2.0
22,548
# encoding: utf-8 # module PyQt4.QtCore # from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so # by generator 1.135 # no doc # imports import sip as __sip from QAbstractAnimation import QAbstractAnimation class QVariantAnimation(QAbstractAnimation): """ QVariantAnimation(QObject parent=None) """ def curren...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtCore/__init__/QVariantAnimation.py
Python
gpl-2.0
3,638
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-01 16:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('starwarspwa', '0002_subscription'), ] operations = [ migrations.RemoveField( ...
jedijulia/starwarspwa
starwarspwa/migrations/0003_auto_20160901_1650.py
Python
mit
955
"""Test configuration.""" import mock from halogen.schema import getargspec from .fixtures.common import * @pytest.fixture(scope="session") def mocked_inspect_getargspec(request): """Mock halogen.schema._get_context for returning empty dict.""" def f(): return None patcher = mock.patch("inspec...
paylogic/halogen
tests/conftest.py
Python
mit
436
# Copyright (C) 2004-2011, Parrot Foundation. class Foo: def __init__(self): self.i = 10 self.j = 20 class main: for i in range(1,100000): o = Foo() o = Foo() print o.i
FROGGS/parrot
examples/benchmarks/oo1.py
Python
artistic-2.0
190
# Copyright (c) 2017 Alfredo de la fuente <alfredodelafuente@avanzosc.es> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_stock_picking_with_analytic_account
oihane/odoo-addons
stock_picking_analytic/tests/__init__.py
Python
agpl-3.0
194
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 31 18:30:32 2017 @author: Masao Takakuwa """ import sys, os sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定 import numpy as np from DPLlayers import DPLSigmoid,DPLRelu,Through,FirstPath,LastPath,DPLPath from collections import OrderedDict f...
tacwon/DPL
MultiLayerNet.py
Python
mit
7,935
""" Simple wrapper for a Spark Context to provide loading functionality """ import os from thunder.utils.common import checkParams, handleFormat, raiseErrorIfPathExists from thunder.utils.datasets import DataSets from thunder.utils.params import Params class ThunderContext(): """ Wrapper for a SparkContext ...
pearsonlab/thunder
thunder/utils/context.py
Python
apache-2.0
36,355
# -*- coding: utf8 -*- # load_dictionary # Logging Utility for Feet # Credits: Benjamin Bengfort <benjamin@bengfort.com> """ Decorators and function utilities for feet. """ import signal from functools import wraps from feet.utils.timez import Timer from feet.exceptions import FeetError, TimeoutError def memoized(...
Altarika/feet
feet/utils/decorators.py
Python
lgpl-2.1
2,703
from mumax2 import * from mumax2_geom import * # Test for Faraday's law Nx = 32 Ny = 32 Nz = 1 setgridsize(Nx, Ny, Nz) Cx = 5e-9 Cy = 5e-9 Cz = 5e-9 setcellsize(Cx, Cy, Cz) load('faraday') savegraph("graph.png") setpointwise('B_ext', 0, [0, 0, 0]) setpointwise('B_ext', 1e-9, [0, 0, 1]) setpointwise('B_ext', 2e-9, ...
mumax/2
tests/faraday.py
Python
gpl-3.0
1,409
GnuXzPackage ('bison', '3.0.4')
BansheeMediaPlayer/bockbuild
packages/bison.py
Python
mit
32
# -*- coding: utf-8 -*- ''' Copyright (C) 2016 Rafael Picanço. The present file is distributed under the terms of the GNU General Public License (GPL v3.0). You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from os.path ...
cpicanco/abpmc-2016
analysis/drawing/__init__.py
Python
gpl-3.0
3,786
#!/usr/bin/python ####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ####################################...
syurkevi/arrayfire-python
tests/simple/lapack.py
Python
bsd-3-clause
1,598
''' Created on 2013-8-16 @author: wenli ''' import threading #Global Variable sensor_data_lock = threading.Lock() temperature_data = [] pressure_data = [] parameterData = [] cmd_write = None gSerialDev = None TempretureResult = 0 isReadExit = True isWriteExit = True
zhelezyaka/stm23f105-vcp
exg/scripts/gd.py
Python
gpl-2.0
298
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2019-2021 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
snapcore/snapcraft
snapcraft/internal/meta/snap.py
Python
gpl-3.0
18,773
#!/home/bjs66/anaconda2/bin/python2.7 """ Created on Mon Feb 01 15:03:56 2016 @author: Nablaquabla """ import h5py import numpy as np import easyfit as ef import datetime import pytz import os # Prepare timezones and beginning of epcoch for later use utc = pytz.utc eastern = pytz.timezone('US/Eastern') epochBeginnin...
Nablaquabla/sns-analysis
_getAcceptanceVsTime.py
Python
gpl-3.0
6,613
# -*- coding: utf-8 -*- import unittest import os from neo4jrestclient import constants from neo4jrestclient import client NEO4J_URL = os.environ.get('NEO4J_URL', "http://localhost:7474/db/data/") NEO4J_VERSION = os.environ.get('NEO4J_VERSION', None) class GraphDatabaseTesCase(unittest.TestCase): def setUp(se...
mountain213/neo4jworkshop
REST_clients/Python_client/neo4jrestclient/tests/test_extensions.py
Python
mit
4,520
#!/usr/bin/python # encoding: utf-8 # (c) 2016, Jiri Tyr <jiri.tyr@gmail.com> # 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', ...
rmfitzpatrick/ansible
lib/ansible/modules/web_infrastructure/jenkins_plugin.py
Python
gpl-3.0
25,484
import web urls = ( '/', 'index' ) class index: def GET(self): return "Hello, world!" if __name__ == "__main__": app = web.application(urls, globals()) app.run()
jefersonm/sandbox
languages/python/webpy/hello_world/code.py
Python
mit
188
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
roberto-reale/wsync
docs/conf.py
Python
mit
4,879
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import namedtuple import logging logger = logging.getLogger(__name__) def demo(): res = False try: logger.info("****** Named tuples demo *******") Point = namedtuple('Point', 'x, y') i = Point(1, 2) ...
GustavePate/perfect_python_script
pps/demos/demo_named_tuples.py
Python
mit
641
# code by christopher potts #!/usr/bin/env python # -*- coding: utf-8 -*- """ This code implements a basic, Twitter-aware tokenizer. A tokenizer is a function that splits a string of text into words. In Python terms, we map string and unicode objects into lists of unicode objects. There is not a single right way to...
pierredepaz/politics-of-code
09_python_nlp/a_NLP/twitter_tokenizer.py
Python
unlicense
7,606
#!/usr/bin/env python # -*- coding: utf-8 -*- # ### # Copyright (c) 2013, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### """A script that populates a cnx-archive database from a legacy repository.""" import...
pumazi/cnx-populate
cnxpopulate/archive.py
Python
agpl-3.0
9,450
# -*- coding: utf-8 -*- # # Copyright 2015 AirPlug 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 applic...
ddinsight/dd-streamworks
stream_worker/scubagear/config/__init__.py
Python
apache-2.0
2,285
""" Django settings for StoreProject project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build...
nicolasiscoding/IEEEOpenCV2016
code/StoreProject/StoreProject/settings.py
Python
mit
2,870
import time from collections import namedtuple import selenium from bs4 import BeautifulSoup from pyvirtualdisplay import Display from selenium import webdriver, common from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from dynamointerface import * Category = namedtuple('Category', 'category subcate...
PTAug/fashion-analytics
fashion-analytics/database-tools/scraper.py
Python
apache-2.0
9,187
#Special Numbers import math for i in range(1000, 10000): a = str(i) b, c = int(a[:2]), int(a[2:]) if(math.sqrt(i) == b+c): print (i)
LTKills/languages
python/15.py
Python
gpl-3.0
156
""" WSGI config for pyanalysis project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os import sys # Make sure the project root is on the path from path import path PROJEC...
nanchenchen/script-analysis
pyanalysis/wsgi.py
Python
mit
742
from django.contrib import admin from .models import Item from .models import Brand from .models import Category from .models import BaseItem class BrandAdmin(admin.ModelAdmin): readonly_fields = ('owner',) def save_model(self, request, obj, form, change): obj.owner = request.user obj.save() ...
abirafdirp/inventory
inventory/items/admin.py
Python
bsd-3-clause
2,181
from i18n import _ from mercurial import util import templatekw def tolist(val): """ a convenience method to return an empty list instead of None """ if val is None: return [] else: return [val] class namespaces(object): """provides an interface to register and operate on multi...
hekra01/mercurial
mercurial/namespaces.py
Python
gpl-2.0
7,342
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
fajoy/horizon-example
horizon/test/tests/workflows.py
Python
apache-2.0
9,222
# -*- coding: utf-8 -*- """ test_build ~~~~~~~~~~ Test all builders that have no special checks. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from util import with_app, test_root, path, SkipTest from textwrap import dedent def tear...
waseem18/oh-mainline
vendor/packages/sphinx/tests/test_build.py
Python
agpl-3.0
2,384
import flask.views from flask import request TAM_PAGINA=5 def calculoPrimeraPag(cant): """ Setea los valores correspondientes a la primera pagina de un paginar, recibe la cantidad de items, fases o proyectos que existen para dicho paginar """ if(cant!=0):#Si devolvio algo t=cant/TAM_PAGINA...
diegocrzt/pmspy
pms/vista/paginar.py
Python
lgpl-2.1
2,986
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Order.comment' db.add_column('products_order', 'comment',...
drummonds/galleria
galleria/products/migrations/0004_auto__add_field_order_comment__add_field_order_invoice_address__chg_fi.py
Python
apache-2.0
9,070
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @File Name: problem_101.py # @Author: Copyright (c) 2016-10-03 17:46:39 gilletthernandez # @Date: 2016-10-03 17:46:39 # @Last Modified by: Gillett Hernandez # @Last Modified time: 2017-08-10 11:55:20 from functools import reduce from operator import mul from euler_f...
gillett-hernandez/project-euler
Python/problem_101.py
Python
mit
883
import logging from scipy.io import savemat from component_contribution.component_contribution import ComponentContribution from component_contribution.kegg_model import KeggModel REACTION_FNAME = '../examples/simeon_reactions.txt' OUTPUT_FNAME = '../res/simeon.mat' logger = logging.getLogger('') logger.setLevel(logg...
dmccloskey/component-contribution
examples/simeon.py
Python
mit
1,080
# -*- coding: utf-8 -*- class Solution: """Solver for https://oj.leetcode.com/problems/sort-colors/""" # @param A a list of integers # @return nothing, sort in place def sortColors(self, A): """The main solver function.""" count = [0 for i in range(3)] for value in A: ...
starrify/leetcode
src/sort-colors.py
Python
unlicense
430
# coding: utf8 """ Tests: - :class:`TestDescentProcesses` check that the marginal probability of selecting any integer is indeed given by the ``_bernoulli_param`` attribute """ import unittest import numpy as np import sys sys.path.append('..') from dppy.exotic_dpps import CarriesProcess, DescentProcess, VirtualDe...
guilgautier/DPPy
tests/test_descent_processes.py
Python
mit
1,346
""" WSGI config for familyroot project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "okkindred.settings") from django.c...
JustinWingChungHui/MyFamilyRoot
okkindred/wsgi.py
Python
gpl-2.0
394
from UtmpHead import UtmpHead import Config from Log import Log class Login: def __eq__(self, other): if (other == None): return (self._loginid == 0) return (self._loginid == other._loginid) def __ne__(self, other): return not self.__eq__(other) def __init__(self, logi...
HenryHu/pybbs
Login.py
Python
bsd-2-clause
4,609
#!/usr/bin/env python3 # Unfolds using uncertainties in FBU, but with no regularisation import itertools import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import numpy as np import pymc3 as pm import matplotlib.cm as cm import scipy from Unfolder.ComparisonHelpers import * from Unfolder.Unf...
daniloefl/Unfolder
toyModel/unfoldWithSyst.py
Python
gpl-3.0
3,587
from _pytest.doctest import DoctestModule from py.path import local collect_ignore = ['tests/messages/data', 'setup.py'] babel_path = local(__file__).dirpath().join('babel') def pytest_collect_file(path, parent): if babel_path.common(path) == babel_path: if path.ext == ".py": return DoctestMo...
kawamon/hue
desktop/core/ext-py/Babel-2.5.1/conftest.py
Python
apache-2.0
339
# -*- coding:utf-8 -*- from __future__ import division, unicode_literals from collections import OrderedDict from django.utils import six class OrderedDictWhichIteratesOverValues(OrderedDict): def __iter__(self): return six.itervalues(self) def copy(self): other = self.__class__() ...
samuelmaudo/yepes
yepes/utils/structures.py
Python
bsd-3-clause
1,239
# encoding: utf-8 """ Tests for the forecast accuracy evaluation methods. """ import unittest from src import evaluation class TestEvaluation(unittest.TestCase): def setUp(self): self.test_set = [0, 0, 0, 3, 1, 0, 0, 1, 0, 1, 0, 0] self.training_set = [0, 2, 0, 1, 0, 11, 0, 0, 0, 0, 2, 0, 6, 3, ...
dumfug/kddm2
tests/test_evaluation.py
Python
mit
2,845
import sympy from sympy import Matrix, symbols def _make_expr_01(): C = Matrix(3, 3, symbols('C00, C01, C02, C10, C11, C12, C20, C21, C22')) F = Matrix(3, 3, symbols('F00, F01, F02, F10, F11, F12, F20, F21, F22')) Fg = Matrix(3, 3, symbols('Fg11, Fg12, Fg13, Fg21, Fg22, Fg23, Fg31, Fg32, Fg33')) ...
lianggecm/Sympy_Codes
codegenperf.py
Python
bsd-3-clause
574
'''Rolling mean function for a numpy backend using pure python implementation''' from _base import * ts = randomts(100000, backend = 'numpy') def run(): cProfile.runctx("ts.rollmean(window=100, fallback = True)", globals(), locals(), "Profile.pr...
quantmind/dynts
tests/profile/nprmeanpy.py
Python
bsd-3-clause
324
from __future__ import division from collections import OrderedDict from .price_parser import PriceParser class Position(object): pos_id = 0 def __init__( self, action, ticker, ticker_type, margin, init_quantity, init_price, init_commission, bid, ask, entry_date, mul=1, ...
nwillemse/nctrader
nctrader/position.py
Python
mit
10,383
# -*- coding: utf-8 -*- import unittest from src.graph import Graph from src.maximum_cut import maximum_cut, maximum_cut_for_bipartite_graph class MaximumCut(unittest.TestCase): def test_maximum_cut_for_bipartite_graphs(self): """ Given the following bipartite graph. (a)-----(b) ...
topliceanu/learn
python/algo/test/test_maximum_cut.py
Python
mit
2,875
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.data import kb from lib.request.connect import Connect as Request def getPageTemplate(payload, place): retVal = (kb.originalPage, kb.errorIsNone) if pa...
hackersql/sq1map
lib/request/templates.py
Python
gpl-3.0
637
""" 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 this ...
jellybean4/yosaipy2
yosaipy2/core/utils/__init__.py
Python
apache-2.0
810
from django import forms from django.utils.translation import gettext_lazy as _ from django_comments_xtd.forms import XtdCommentForm from django_comments_xtd.models import TmpXtdComment class MyCommentForm(XtdCommentForm): title = forms.CharField(max_length=256, widget=forms.TextInput...
danirus/django-comments-xtd
example/custom/mycomments/forms.py
Python
bsd-2-clause
659
import molequeue as mq from getopt import getopt import sys import time debug = False socketname = "" def run_test(): global socketname if debug: print "Connecting to socket: %s"%socketname client = mq.Client() client.connect_to_server(socketname) res = client._send_rpc_kill_request(5) client.disconn...
OpenChemistry/molequeue
molequeue/app/testing/scripts/sendRpcKill.py
Python
bsd-3-clause
850
# coding: utf-8 import os from gppylib.db import dbconn from test.behave_utils.utils import run_gpcommand from gppylib.gparray import GpArray from test.behave_utils.utils import get_all_hostnames_as_list from gppylib.operations.backup_utils import Context master_data_dir = os.environ.get('MASTER_DATA_DIRECTORY') @gi...
lintzc/gpdb
gpMgmt/test/behave/mgmt_utils/steps/netbackup_mgmt_utils.py
Python
apache-2.0
25,539
from collections import defaultdict class DuplicateListenerError(Exception): pass class InvalidListenerError(Exception): pass class EventedMixin(object): """ Provides methods to trigger and listen for arbitrary events named as strings. """ def __init__(self, *args, **kwargs): self....
pombredanne/pynsq
nsq/evented_mixin.py
Python
mit
1,682
from main import * from django.utils import simplejson class CsvView(CachedPage): cacheName = "CsvView" mimeType = "text/csv" selfurl = "database.csv" def generatePage(self): output = [] output.append( """title, homepage, person, category, posts_url, comments_url, priority, fav...
mathblogging/mathblogging
dataexport.py
Python
agpl-3.0
4,361
# -*- coding: utf-8 -*- from collections import defaultdict from math import log2 from operator import itemgetter import pandas from src.utils.ListLoader import ListLoader def top_cooccorrent_terms(cooccurence_matrix): """Iterates through each combination of words and returns most frequently paired terms""" ...
jhole89/twitterAnalyser
src/term_analysis.py
Python
gpl-3.0
3,122
# anaconda: The Red Hat Linux Installation program # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Red Hat, Inc. All rights reserved. # # 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 Softw...
maxamillion/anaconda
pyanaconda/anaconda.py
Python
gpl-2.0
9,194
# Copyright 2015 RethinkDB, all rights reserved. import asyncio import contextlib import socket import struct from . import ql2_pb2 as p from .ast import ReQLDecoder from .net import decodeUTF, Query, Response, Cursor, maybe_profile from .net import Connection as ConnectionBase from .errors import * __all__ = ['Conn...
sontek/rethinkdb
drivers/python/rethinkdb/net_asyncio.py
Python
agpl-3.0
10,463
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
rllola/creativePlaylist
backEnd/creativePlaylist/tastybitauth/migrations/0001_initial.py
Python
mit
1,075
"""Tests the basic usage of VerChecker.""" ##==============================================================# ## SECTION: Imports # ##==============================================================# from testlib import * from verace import VerChecker ##=====================...
jeffrimko/Verace
tests/linefunc_test_1.py
Python
mit
1,609
# This tool converts a sequential data set into a number of equally sized windows, # to be used for supervised training. __author__ = "Martin Felder" from numpy import r_, array, isfinite from pybrain.datasets import SequentialDataSet def convertSequenceToTimeWindows(DSseq, NewClass, winsize): """ Converts a s...
iut-ibk/Calimero
site-packages/pybrain/tools/datasettools.py
Python
gpl-2.0
5,673
#!/usr/bin/env python #------------------------------------------------------------------------------ # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
ScottWales/rose
lib/python/rosie/svn_pre_commit.py
Python
gpl-3.0
13,035
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
southpawtech/TACTIC-DEV
src/tactic/ui/panel/edit_wdg.py
Python
epl-1.0
49,034
# Lint as: python2, python3 # Copyright 2015 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 req...
ddexnet/dsrf
parsers/dsrf_schema_parser.py
Python
apache-2.0
11,169
# Copyright (c) 2014, Ericsson AB. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the fol...
sdroege/openwebrtc
bindings/java/type_registry.py
Python
bsd-2-clause
4,551
from enigma import eTimer, eTPM, eEnv from Screens.Screen import Screen from Components.ActionMap import ActionMap, NumberActionMap from Components.Pixmap import Pixmap,MultiPixmap from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.Sources.List import List from Compo...
cougar-enigma/Enigma2PC
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
Python
gpl-2.0
19,190
from ctypes import * import ctypes from ctypes.wintypes import * from _ssl import SSLError import sys CRYPT32 = windll.Crypt32 SCHANNEL = windll.SChannel # Lots of "Magic" constants, mainly from schannel.h SCH_CRED_NO_SYSTEM_MAPPER = 0x00000002 SCH_CRED_NO_DEFAULT_CREDS = 0x00000010 SCH_CRED_REVOCATION_CHECK_CHAIN...
lsowen/pySchannelSSL
sslcontext.py
Python
gpl-2.0
19,919
#SPDX-License-Identifier: MIT from flask import Flask, jsonify, request, Response import click, os, json, requests, logging from workers.deps_worker.deps_worker import DepsWorker from workers.util import create_server, WorkerGunicornApplication def main(): """ Declares singular worker and creates the server and fl...
OSSHealth/ghdata
workers/deps_worker/runtime.py
Python
mit
750
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """MSTIC A...
VirusTotal/msticpy
msticpy/analysis/anomalous_sequence/utils/__init__.py
Python
mit
419
import random def partition(a, p, r): pivot = a[r] i = p - 1 for j in xrange(p, r):# p <= j < r if a[j] <= pivot: i += 1 a[i], a[j] = a[j], a[i] a[i + 1], a[r] = a[r], a[i + 1] return i + 1 def quicksort(a, p, r): if p < r: q = partition(a, p, r) ...
kigawas/PersonalAlgorithmLibrary
sort/quick_sort.py
Python
gpl-2.0
515
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import time from pants.engine.scheduler import Scheduler from pants.pantsd.service.pants_service import PantsService class StoreGCService(PantsService): """Store Garb...
wisechengyi/pants
src/python/pants/pantsd/service/store_gc_service.py
Python
apache-2.0
2,594
# Copyright (C) 2017,2019 Rodrigo Jose Hernandez Cordoba # # 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 o...
AeonGames/AeonEngine
tools/blender/addons/io_skeleton_skl/__init__.py
Python
apache-2.0
1,334
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import frappe from frappe.model.document import Document class QualityFeedback(Document): @frappe.whitelist() def set_parameters(self): if self.template and not getattr(self, 'parameters', []):...
almeidapaulopt/erpnext
erpnext/quality_management/doctype/quality_feedback/quality_feedback.py
Python
gpl-3.0
642
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("msgs", "0041_outgoing_as_single_pt2")] operations = [ migrations.RemoveField(model_name="outgoing", name="contacts"), migrations....
praekelt/casepro
casepro/msgs/migrations/0042_outgoing_as_single_pt3.py
Python
bsd-3-clause
573
def convert_text_to_number(text): possible = {'femti': 50, 'førti': 40, 'tretti': 30, 'tjue': 20, 'nitten': 19, 'atten': 18, 'sytten': 17, 'seksten': 16, 'femten': 15, 'fjorten': 14, 'tretten': 13, 'tolv': 12, 'elleve': 11, 'ti': 10, 'ni': 9, 'åtte': 8, 'sju': 7, 'seks': 6, 'fem': 5,...
matslindh/codingchallenges
knowit2021/day01.py
Python
mit
873
#!/usr/bin/env python #DNApy is a DNA editor written purely in python. #The program is intended to be an intuitive and fully featured #editor for molecular and synthetic biology. #Enjoy! # #copyright (C) 2014-2015 Martin Engqvist | # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #LICENSE: #...
mengqvist/DNApy
src/gui/dnaeditor_GUI.py
Python
gpl-3.0
26,216
import email.utils import time from email.utils import parsedate_tz from email.utils import mktime_tz from datetime import datetime from datetime import timedelta from storjcore import sanitize class AuthError(Exception): pass def create_headers(btctxstore, recipient_address, sender_wif): """ Create authent...
littleskunk/storjcore
storjcore/auth.py
Python
mit
2,991
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <marta@pexego.es> # # This program is free software: you can redistribute it and/or modify # it unde...
Comunitea/CMNT_00040_2016_ELN_addons
product_cost_management/wizard/__init__.py
Python
agpl-3.0
1,031
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc.converters import errors from integration.ggrc import converters class TestBasicCsvImport(converters.TestCase): def setUp(self): converters.TestCase.setUp(self) self.client.get("/login...
NejcZupec/ggrc-core
test/integration/ggrc/converters/test_import_delete.py
Python
apache-2.0
744
## config.py my_db={ 'ENGINE': 'django.db.backends.mysql', 'HOST': '1.1.1.1', # host IP 'NAME': 'dbName', 'USER': 'some_username', 'PASSWORD': 'testing', } ######################## def insertSomeFunction(Id, URL, fsp): if 'someString' not in URL: try: ...
prashantas/MyDataScience
GeneralPython/MysqlPython.py
Python
bsd-2-clause
2,935
import bootConfig import os class Init: def __init__(self): if bootConfig.Mode == 1: os.system('sudo python /home/pi/Domotics/install.py &') else: os.system('sudo python /home/pi/Domotics/device.py &') Init()
PascualArroyo/Domotics
Raspberry/init.py
Python
gpl-2.0
223
# Author: Brendan Le Foll <brendan.le.foll@intel.com> # Copyright (c) 2014 Intel Corporation. # # 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 limita...
0xD34D/upm
examples/python/4digitdisplay.py
Python
mit
1,214
from erukar.system.engine import Item, Aura, Observation, Dungeon, Lifeform from erukar.ext.math import Curves import random class LightSource(Item): Persistent = True BaseName = "Light source" EssentialPart = "wick" SupportPart = "container" BriefDescription = "a source of light" SelfAuraDesc...
etkirsch/legends-of-erukar
erukar/content/inventory/base/LightSource.py
Python
agpl-3.0
3,292
''' Get windows special folders without pythonwin Example: import specialfolders start_programs = specialfolders.get(specialfolders.PROGRAMS) Code is public domain, do with it what you will. Luke Pinner - Environment.gov.au, 2010 February 10 ''' #Imports use _syntax to mask them from aut...
bashrc/zeronet-debian
src/plugins/Trayicon/lib/winfolders.py
Python
gpl-2.0
1,958
#!/usr/bin/python import json import sys import csv from enum import Enum import requests import os.path import logging import re import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from datetime import date import ctypes as ct logging.basicConfig(level=logging.INFO) logging.getLogger("requests")....
oncokb/oncokb-annotator
AnnotatorCore.py
Python
agpl-3.0
66,609
#!/usr/bin/env python3 """hello with args""" import sys import os args = sys.argv if len(args) != 2: script = os.path.basename(args[0]) print('Usage: {} NAME'.format(script)) sys.exit(1) name = args[1] print('Hello, {}!'.format(name))
kyclark/metagenomics-book
python/hello/hello_arg3.py
Python
gpl-3.0
251
""" [2014-12-28] Challenge #195 [Easy] Symbolic Link Resolution https://www.reddit.com/r/dailyprogrammer/comments/2qmz12/20141228_challenge_195_easy_symbolic_link/ # [](#EasyIcon) **(Easy)**: Symbolic Link Resolution Many Unix-based systems support the concept of a **symbolic link**. This is where one directory name ...
DayGitH/Python-Challenges
DailyProgrammer/DP20141228A.py
Python
mit
3,692
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # 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 Lic...
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_system_automation_stitch.py
Python
gpl-3.0
11,013
# Copyright (C) 2012 Red Hat, 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 ...
HybridF5/jacket
jacket/tests/compute/unit/virt/disk/test_inject.py
Python
apache-2.0
11,880
from django.contrib import admin from .models import Book class BookAdmin(admin.ModelAdmin): pass admin.site.register(Book, BookAdmin)
bpgc-cte/python2017
Week 7/django/src/main/admin.py
Python
mit
137
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai # License: GPLv3 Copyright: 2018, acgnd.com <lu@acgnd.com> from __future__ import absolute_import, division, print_function, unicode_literals import re import socket import time from functools import partial from Queue import Empty, Queue from t...
lousi8/calibre_amazon_price
__init__.py
Python
lgpl-3.0
66,711
# -*- coding: utf-8 -*- # # Cipher/AES.py : AES # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # n...
kawamon/hue
desktop/core/ext-py/pycryptodomex-3.9.7/lib/Cryptodome/Cipher/AES.py
Python
apache-2.0
9,569
# coding=utf-8 from mitmproxy.net import check def test_is_valid_host(): assert not check.is_valid_host(b"") assert check.is_valid_host(b"one.two") assert not check.is_valid_host(b"one" * 255) assert check.is_valid_host(b"one.two.") # Allow underscore assert check.is_valid_host(b"one_two")
dwfreed/mitmproxy
test/mitmproxy/net/test_check.py
Python
mit
318
# airplay2sonos 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...
andrewjw/airplay2sonos
airplay2sonos/__init__.py
Python
gpl-2.0
689
#!/usr/bin/python # Copyright (C) 2017 xtr4nge [_AT_] gmail.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # T...
xtr4nge/FruityC2
lib/Utils.py
Python
gpl-3.0
13,078
# Copyright 2020 Cloudbase Solutions Srl # # 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 l...
stackforge/cloudbase-init
cloudbaseinit/metadata/services/nocloudservice.py
Python
apache-2.0
11,949
'''manipulate ndarray list''' from itertools import imap,starmap,izip from operator import mul,add,sub def check_list(v1,v2): '''check if the length of two list is same''' if v1.size != v2.size: raise ValueError,"the lenght of both arrays must be the same" pa...
dnanexus/rseqc
rseqc/lib/qcmodule/twoList.py
Python
gpl-3.0
2,098