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
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
tardyp/buildbot
master/buildbot/steps/source/repo.py
Python
gpl-2.0
19,517
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Edgewall Software # Copyright (C) 2015 Dirk Stöcker <trac@dstoecker.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://tr...
Puppet-Finland/trac
files/spam-filter/tracspamfilter/admin.py
Python
bsd-2-clause
26,364
"""Represents pricing data for a given block of time.""" class Bar: """Represents pricing data for a given block of time. Attributes not specified in the constructor: open -- opening price for the time period high -- closing price low -- low price close -- close price volume -- vo...
larmer01/ibapipy
data/bar.py
Python
apache-2.0
1,107
# The following is a Python translation of a MATLAB file originally written principally by Mike Tipping # as part of his SparseBayes software library. Initially published on GitHub on July 21st, 2015. # SB2_USEROPTIONS User option specification for SPARSEBAYES # # OPTIONS = SB2_USEROPTIONS(parameter1, value1, parame...
jhallock7/SparseBayes-Python
SB2_UserOptions.py
Python
gpl-2.0
6,672
def double(n): return n * 2 def halve(n): return n // 2 def fastmult(m,n): if n > 0: if n % 2 == 0: return fastmult(double(m),halve(n)) else: return m+fastmult(m,n-1) else: return 0 #그냥 재귀
imscs21/myuniv
1학기/programming/basic/파이썬/파이썬 과제/5/5_6.py
Python
apache-2.0
271
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
google-research/google-research
depth_from_video_in_the_wild/consistency_losses.py
Python
apache-2.0
13,363
#!flask/bin/python import zmq import sys import threading import json import settings import utils import os from db import db from images import images from infra import infra class KlapiServer(threading.Thread): def __init__(self, sets): threading.Thread.__init__(self) self.port = 5555 s...
jroivas/klapi
klapi-backend.py
Python
mit
6,207
from __future__ import print_function import sys import time import threading import iorio def make_requester(bucket, stream, conn, i, id): def requester(): data = [{"op": "add", "path": "/items/-", "value": i}] retries = 0 do_request = True reqs = [] while do_request: ...
javierdallamore/ioriodb
tools/patchtest.py
Python
mpl-2.0
1,904
import pkg_resources SCRIPT_DIR = pkg_resources.resource_filename(__name__, 'setup/scripts/')
keithhendry/treadmill
treadmill/infra/__init__.py
Python
apache-2.0
95
# leading_edge_ui.py - leading edge user interface components # # Copyright (C) 2013-2017 - Curtis Olson, curtolson@flightgear.org # http://madesigner.flightgear.org import sys from PyQt5.QtWidgets import (QWidget, QHBoxLayout, QVBoxLayout, QFrame, QFormLayout, ...
clolsonus/madesigner
madesigner/madgui/leading_edge_ui.py
Python
gpl-3.0
3,643
import sys from pyAMI import * class amiListNomenclatures: """ A command to list all ATLAS dataset nomenclature. This command returns the nomenclature name, the template, and a tag. The tag is used to associate nomenclature to projects. The first argument can be a sub string to search on. " ...
ndawe/pyAMI
devscripts/done/amiListNomenclatures.py
Python
gpl-3.0
1,967
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 Pi-Yueh Chuang <pychuang@gwu.edu> # # Distributed under terms of the MIT license. """convert the output file in a batch""" import os import os.path as op import sys import argparse if os.getenv("PyFR") is None: raise Environmen...
piyueh/PyFR-Cases
utils/batch_conversion.py
Python
mit
6,025
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RPegas(RPackage): """Population and Evolutionary Genetics Analysis System Functions f...
LLNL/spack
var/spack/repos/builtin/packages/r-pegas/package.py
Python
lgpl-2.1
1,221
from django.conf.urls import url from . import views urlpatterns = [ url( r'^carrinho/adicionar/(?P<slug>[\w_-]+)/$', views.create_cartitem, name='create_cartitem' ), ]
DaywisonFerreira/E-Commerce
checkout/urls.py
Python
cc0-1.0
200
# -*- coding: utf-8 -*- """ Runs functions in pipeline to get query reuslts and does some caching. """ from __future__ import absolute_import, division, print_function, unicode_literals import utool as ut import six # NOQA from os.path import exists #from ibeis.algo.hots import query_request #from ibeis.algo.hots impo...
SU-ECE-17-7/ibeis
ibeis/algo/hots/match_chips4.py
Python
apache-2.0
15,985
# -*- coding: utf-8 -*- u""" Created on 2017-6-7 @author: cheng.li """ from PyFin.tests.Math.RootFinder.testBrent import TestBrent __all__ = ['TestBrent']
wegamekinglc/Finance-Python
PyFin/tests/Math/RootFinder/__init__.py
Python
mit
158
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import os ...
VirusTotal/msticpy
tests/test_timeline.py
Python
mit
1,474
from functools import wraps import logging import os from . import process from .utils import which, tempdir from ._compat import FileExistsError def ensure_git(return_value=None): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if which('git'): return ...
marcwebbie/passpie
passpie/history.py
Python
mit
2,814
"""Unit test for sysinfo. """ import os import sys import unittest from collections import namedtuple # Disable W0611: Unused import import tests.treadmill_test_deps # pylint: disable=W0611 import mock import treadmill import treadmill.appmgr from treadmill import sysinfo class SysinfoTest(unittest.TestCase): ...
toenuff/treadmill
tests/sysinfo_test.py
Python
apache-2.0
7,897
import geojson as gj import logging import bson.objectid as boi import emission.core.wrapper.common_place as ecwcp import emission.core.get_database as edb import emission.simulation.markov_model_counter as esmmc import emission.storage.decorations.common_trip_queries as esdctp ######################################...
joshzarrabi/e-mission-server
emission/storage/decorations/common_place_queries.py
Python
bsd-3-clause
4,478
""" Interactive Average =================== The plot below uses an interval selection, which causes the chart to include an interactive brush (shown in grey). The brush selection parameterizes the red guideline, which visualizes the average value within the selected interval. """ # category: interactive charts import a...
altair-viz/altair
altair/examples/selection_layer_bar_month.py
Python
bsd-3-clause
835
""" Virt management features Copyright 2007, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foun...
ssalevan/fogmachine
fogmachine/virt.py
Python
gpl-2.0
10,780
# -*- coding: UTF-8 -*- from Products.Five.browser import BrowserView from docpool.base.content.dpdocument import IDPDocument from plone import api from zope.component import getMultiAdapter import logging log = logging.getLogger(__name__) class ActionHelpers(BrowserView): def can_change_password(self): ...
OpenBfS/dokpool-plone
Plone/src/docpool.base/docpool/base/browser/actionhelpers.py
Python
gpl-3.0
2,062
#=============================================================================== # @Author: Madison Aster # @ModuleDescription: # @License: # MediaApp Library - Python Package framework for developing robust Media # Applications with Qt Library # Copyright (C) 2013 Madison Aster # ...
ThomasMcVay/MediaApp
MediaAppKnobs/KnobElements/Spacer.py
Python
lgpl-2.1
1,551
# -*- coding: utf-8 -*- # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser Genera...
JetChars/vim
vim/bundle/python-mode/pymode/libs/logilab/common/testlib.py
Python
apache-2.0
50,506
# -*- coding: utf-8 -*- import logging from outwiker.core.config import Config from outwiker.core.event import Event, CustomEvents from outwiker.core.events import PostWikiCloseParams, PreWikiCloseParams from outwiker.core.recent import RecentWiki from outwiker.core.pluginsloader import PluginsLoader from outwiker.co...
unreal666/outwiker
src/outwiker/core/application.py
Python
gpl-3.0
16,964
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import pickle try: import skopt as sko except ImportError: sko = None from ray.tune.suggest.suggestion import SuggestionAlgorithm logger = logging.getLogger(__name__) def _validate_wa...
ujvl/ray-ng
python/ray/tune/suggest/skopt.py
Python
apache-2.0
6,934
''' DeadlineV5Migration.py - Easily Migrate Deadline v5 -> v6 (only) Batch migrate en mass all Deadline v5 users/slaves/pools/groups/limits to a Deadline v6 DB For Sys Admins / IT only. Be careful as existing v6 settings can be overwritten! Deadline v7 ships with an [IMPORT SETTINGS] WIZARD, so please use this feat...
ThinkboxSoftware/Deadline
Installation/Migration/DeadlineV5Migration.py
Python
apache-2.0
23,899
import os import sys import json import random import urllib3 from urllib3 import PoolManager, Retry, Timeout import certifi from random import randint from bs4 import BeautifulSoup from time import sleep class WebCrawler: def __init__(self, url, bad_words): self.soup = None self.r = None ...
bartmika/py-autobrowserbot
crawler.py
Python
mit
5,018
#!/usr/bin/env python3 # -*- coding: cp1252 -*- # created on May 21, 2014 by baloan """ Launch to orbit (with atmosphere) """ from threading import Thread import krpc from toolkit import ksp from toolkit import launch from toolkit import system from toolkit import warp from vessels import surveyor, ...
baloan/mt-krpc
krpc/lko.py
Python
mit
899
""" .. data:: MOTOR_VELOCITY_SAMPLING_TIME Time step for calculation of motor velocity by measuring two postion values. Longer values will create more acurate results but reading the velocity will take more time. .. data:: PROGRESS_BAR Turn on progress bar by long-lasting operations if tqdm package i...
ufo-kit/concert
concert/config.py
Python
lgpl-3.0
514
# pythonに定数は存在しないので、 # 大文字で変数名を記載するなどして、識別すること。 # 予約文字も当然使えません。 # 定数 TEISUU = "定数です" print(TEISUU)
ekazyam/study
パーフェクトPython/pp_059_定数定義.py
Python
mit
210
# -*- encoding: utf-8 -*- def silence_last(n=1, use_multimeasure_rests=None): r'''Makes silence mask with last `n` indices equal to zero. .. container:: example **Example 1.** Silences last division: :: >>> mask = rhythmmakertools.silence_last() :: >>> pr...
mscuthbert/abjad
abjad/tools/rhythmmakertools/silence_last.py
Python
gpl-3.0
4,207
import os import warnings import numpy as np from pyrates.utility.genetic_algorithm import CGSGeneticAlgorithm from pandas import DataFrame, read_hdf from copy import deepcopy class CustomGOA(CGSGeneticAlgorithm): def eval_fitness(self, target: list, **kwargs): # define simulation conditions wor...
Richert/BrainNetworks
BasalGanglia/stn_gpe_str_opt.py
Python
apache-2.0
14,060
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUG = True ROOT_URLCONF = 'theresumator.urls' SECRET_KEY = 'fake-key' INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', "tests", "resuma...
AmmsA/django-resumator
tests/test_settings.py
Python
mit
1,175
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------------------------------------------------- # pelisalacarta - XBMC Plugin # Conector para dailymotion # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # -----------------------------------------------------------...
ChopChopKodi/pelisalacarta
python/main-classic/servers/dailymotion.py
Python
gpl-3.0
2,895
# $Id$ # # Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ Calculation of topo...
adalke/rdkit
rdkit/Chem/GraphDescriptors.py
Python
bsd-3-clause
19,951
#!/usr/bin/env python # Copyright (C) 2009-2011 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/o...
baloo/shinken
shinken/comment.py
Python
agpl-3.0
4,368
from dimagi.ext.couchdbkit import * from dimagi.utils.decorators.memoized import memoized class SnapshotMixin(DocumentSchema): copy_history = StringListProperty() @property def is_copy(self): return True if self.copy_history else False @property @memoized def copied_from(self): ...
puttarajubr/commcare-hq
corehq/apps/appstore/models.py
Python
bsd-3-clause
559
# 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 ...
samaitra/ignite
modules/platforms/python/examples/scans.py
Python
apache-2.0
1,487
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import logging import os import urwid from urwidtrees import ArrowTree, TreeBox, NestedTree fr...
geier/alot
alot/buffers.py
Python
gpl-3.0
24,285
# Copyright (C) 2013-2014 SignalFuse, Inc. # Copyright (C) 2015 SignalFx, Inc. # # Docker container orchestration utility. from __future__ import print_function import functools import sys import threading from . import tasks from .. import audit from .. import exceptions from .. import termoutput from ..termoutput ...
signalfuse/maestro-ng
maestro/plays/__init__.py
Python
apache-2.0
16,358
from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.config import config, configfile, getConfigListEntry from Components.ConfigList import ConfigListScreen from Components.SystemInfo import SystemInfo from Components.Sources.StaticText import StaticText from Components.Pixmap im...
popazerty/EG-2
lib/python/Screens/UserInterfacePositioner.py
Python
gpl-2.0
10,036
# 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, # but...
codificat/sos
sos/plugins/openshift.py
Python
gpl-2.0
4,184
import rppy import numpy as np import matplotlib.pyplot as plt vp1 = 3000 vs1 = 1500 p1 = 2000 e1_1 = 0.0 d1_1 = 0.0 y1_1 = 0.0 e2_1 = 0.0 d2_1 = 0.0 y2_1 = 0.0 d3_1 = 0.0 chi1 = 0.0 C1 = rppy.reflectivity.Cij(vp1, vs1, p1, e1_1, d1_1, y1_1, e2_1, d2_1, y2_1, d3_1) vp2 = 4000 vs2 = 2000 p2 = 2200 e1_2 = 0.0 d1_2 = 0....
shear/rppy
temp_test_ortho.py
Python
bsd-2-clause
1,170
#!/usr/bin/python import unittest import apt_pkg import apt.progress.base class TestCache(unittest.TestCase): """Test invocation of apt_pkg.Cache()""" def setUp(self): apt_pkg.init_config() apt_pkg.init_system() def test_wrong_invocation(self): """cache_invocation: Test wrong in...
suokko/python-apt
tests/test_cache_invocation.py
Python
gpl-2.0
863
# coding=utf-8 import logging from django.views import generic from news.models import FacebookPost __author__ = 'ilov3' logger = logging.getLogger(__name__) class FacebookPostView(generic.ListView): template_name = 'facebook/posts/posts.html' context_object_name = 'facebook_posts' def get_queryset(se...
kwameboame/newsdex
news/views/facebook_views.py
Python
bsd-2-clause
394
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
dayatz/taiga-back
taiga/front/urls.py
Python
agpl-3.0
2,443
# -*- coding: utf-8 -*- import re from content_error import ContentError def strip(line, newlines = False): def lstrip(line): i = 0 for e in line: if type(e) == Letter and e.value.isspace(): i += 1 elif newlines and type(e) == Linebreak: i += 1 else: break return line[i...
wojtex/cantionale
lycode.py
Python
mit
5,554
# # Copyright 2013 IBM Corp. # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
Juniper/ceilometer
ceilometer/api/middleware.py
Python
apache-2.0
5,264
#!/usr/bin/env python ############################################################################### # $Id: ogr_sde.py 33793 2016-03-26 13:02:07Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR ArcSDE driver. # Author: Howard Butler <hobu.inc@gmail.com> # ############################################...
nextgis-extra/tests
lib_gdal/ogr/ogr_sde.py
Python
gpl-2.0
10,401
from pyx import * mypainter = graph.axis.painter.regular(outerticklength=graph.axis.painter.ticklength.normal, basepathattrs=[style.linewidth.THick, deco.earrow.large]) c = graph.axis.pathaxis(path.curve(0, 0, 3, 0, 1, 4, 4, 4), graph.axis.linear(min=0, m...
mjg/PyX-svn
examples/axis/painter.py
Python
gpl-2.0
445
# License: BSD 3 clause from .model_hawkes import ModelHawkes __all__ = ["ModelHawkes"]
X-DataInitiative/tick
tick/hawkes/model/base/__init__.py
Python
bsd-3-clause
90
# coding: utf8 # jmdict.py # 2/14/2014 jichi if __name__ == '__main__': import sys sys.path.append('..') def get(dic): """ @param dic str such as ipadic or unidic @return bool """ import rc return rc.runscript('getcabocha.py', (dic,)) if __name__ == "__main__": get('unidic') # EOF
Dangetsu/vnr
Frameworks/Sakura/py/libs/scripts/cabocha.py
Python
gpl-3.0
307
#!/usr/bin/env python2 import os import subprocess from pulp.devel.test_runner import run_tests # Find and eradicate any existing .pyc files, so they do not eradicate us! PROJECT_DIR = os.path.dirname(__file__) subprocess.call(['find', PROJECT_DIR, '-name', '*.pyc', '-delete']) PACKAGES = [os.path.dirname(__file__)...
dkliban/pulp_puppet
run-tests.py
Python
gpl-2.0
945
# Copyright (c) 2010-2014 OpenStack Foundation. # # 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 agre...
matthewoliver/swift
swift/common/middleware/s3api/controllers/bucket.py
Python
apache-2.0
9,556
#!/usr/bin/env python # coding: utf-8 # # This file is part of mpdav. # # mpdav 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. # # mpd...
mprochnow/mpdav
wsgi.py
Python
gpl-3.0
1,855
#!/usr/bin/env python """ Convert CSV file to libsvm format. Works only with numeric variables. """ import sys import csv import argparse def construct_line( label, line ): new_line = [] if float( label ) == 0.0: label = "0" new_line.append( label ) for i, item in enumerate( line ): if item == '' or float(...
zygmuntz/phraug2
csv2libsvm.py
Python
bsd-2-clause
1,420
from django.db.models import Q from .models import Team class TeamPermissionsBackend(object): def authenticate(self, username=None, password=None): return None def get_team_permissions(self, user_obj, obj=None): """ Returns a set of permission strings that this user has through his/...
pyconau2017/symposion
symposion/teams/backends.py
Python
bsd-3-clause
1,686
mcinif='mcini_weihera' runname='gen_test3221i' mcpick='gen_test3a.pickle' pathdir='/beegfs/work/ka_oj4748/echoRD' wdir='/beegfs/work/ka_oj4748/gen_tests' update_prec=0.04 update_mf='07moist.dat' update_part=100 import sys sys.path.append(pathdir) import run_echoRD as rE rE.echoRD_job(mcinif=mcinif,mcpick=mcpick,runna...
cojacoo/testcases_echoRD
gen_test3221i.py
Python
gpl-3.0
441
# Copyright 2009-2011 Steven Robertson, Christoph Reiter # 2020 Nick Boultbee # # 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 opti...
Meriipu/quodlibet
quodlibet/player/gstbe/util.py
Python
gpl-2.0
8,936
#-*- coding: utf-8 -*- from django.conf import settings from django.core import exceptions from django.utils.importlib import import_module class CartModifiersPool(object): USE_CACHE = True def __init__(self): self._modifiers_list = [] def get_modifiers_list(self): if not self.USE_CACHE...
jrutila/django-shop
shop/cart/modifiers_pool.py
Python
bsd-3-clause
1,659
from pylab import plotfile, show, gca import matplotlib.cbook as cbook import matplotlib import matplotlib.pyplot as plt import matplotlib.image as mpimg import matplotlib.cm as cm import string import numpy import csv from itertools import izip filled_markers = ('o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H...
devreal/omp-tdb
scripts/plot.py
Python
apache-2.0
18,729
from __future__ import absolute_import import os from celery import Celery from django.conf import settings # noqa # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'signalserver.settings') app = Celery('signalserver', backend='redis://...
yayoiukai/signalserver
signalserver/celery.py
Python
mit
741
# coding: utf-8 """ ====================================================================== Learning and Visualizing the BMS sensor-time-weather data structure ====================================================================== This example employs several unsupervised learning techniques to extract the energy data...
TinyOS-Camp/DDEA-DEV
Development/df_data_analysis_gvalley.py
Python
gpl-2.0
18,795
# This file show a demo of showing that MLE(precision matrix) of a ggm # satisfies the constraints mentioned in the GGM section of the book. import superimport import numpy as np from ggm_fit_htf import ggm_fit_htf G = np.array([0., 1., 0., 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1...
probml/pyprobml
scripts/ggm_fit_demo.py
Python
mit
1,065
raise NotImplementedError("getopt is not yet implemented in Skulpt")
ArcherSys/ArcherSys
skulpt/src/lib/getopt.py
Python
mit
69
#!/usr/bin/python # # 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 distribut...
grimmjow8/ansible
lib/ansible/modules/network/cloudengine/ce_command.py
Python
gpl-3.0
8,454
import pymssql from enum import Enum import random class FakeSqlCursor(object): def execute(self, sql_query): pass def fetchone(self): return [random.random()] class FakeSqlConn(object): def cursor(self): return FakeSqlCursor() class TestConnection(object): def __enter__(s...
DejaToris/MetaphorResearch
research_tools/DbAccess.py
Python
mit
1,304
# 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 required by applicable law or ...
GirlsCodePy/girlscode-coursebuilder
modules/embed/embed_pageobjects.py
Python
gpl-3.0
9,341
# -*- coding: iso-8859-1 -*- # Copyright (c) 2000, Amit Patel # 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, thi...
HomeRad/TorCleaner
wc/proxy/timer.py
Python
gpl-2.0
2,654
# -*- coding: utf-8 -*- # Copyright (c) 2003, Taro Ogawa. All Rights Reserved. # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Fo...
savoirfairelinux/num2words
num2words/lang_VI.py
Python
lgpl-2.1
4,151
from pybuilder.core import Author, init, use_plugin use_plugin("python.core") use_plugin("python.distutils") use_plugin("source_distribution") use_plugin("python.install_dependencies") use_plugin("python.coverage") use_plugin("python.unittest") use_plugin("python.flake8") use_plugin("python.frosted") default_task = ...
Serneum/jousting-core
build.py
Python
apache-2.0
1,625
from typing import NamedTuple nt = NamedTuple("name", field=str)
dahlstrom-g/intellij-community
python/testData/stubs/ImportedTypingNamedTupleKwargs.py
Python
apache-2.0
65
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
John-Hart/autorest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/paths.py
Python
mit
44,662
import math ## Imports functopns import sys print('GCSE Controlled Assesment A453\nThomas Bass 4869\nTask 1') def start(): ## Main process ask = input('Press [c] to calculate the 8th GTIN Number from 7 numbers. \nPress [v] to vertify an 8 digit GTIN Number \n') if ask == 'c' or ask == 'C': ...
electric-blue-green/GSCE-Coursework-GTIN
Task 1/Development/0.x/0.4.py
Python
apache-2.0
1,640
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 ...
robk5uj/invenio
modules/websession/lib/websession_templates.py
Python
gpl-2.0
103,238
#!/usr/bin/env python ''' NIK-HDREfexPro2.py Mod of ShellOut.py focused on getting Google NIK to work. ShellOut call an external program passing the active layer as a temp file. Tested only in Ubuntu 16.04 with Gimp 2.9.5 (git) with Nik Collection 1.2.11 Author: Erico Porto on top of the work of Rob Antonishen Benoi...
draekko-rand/nik_on_gimp
plug-ins/NIK-HDREfexPro2.py
Python
apache-2.0
4,466
#! /usr/bin/env python # -*- coding: utf-8 -*- prId = "com.martys.apcupsd" apcupsdPlugin = indigo.server.getPlugin(prId) cnt = 0 for device in indigo.devices.iter(prId): if device.enabled: apcupsdPlugin.executeAction("readApcupsd", deviceId=device.id) indigo.server.log("Refreshed data for device na...
MartySkinner/Indigo-apcupsd
apcupsd.indigoPlugin/Contents/Menu Items/Refresh All UPSs.py
Python
unlicense
486
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib,urllib2 from re import * import client """This modules is With Access Internet (W.A.I)""" def ip_info(target,ip): u=[["12Informacion General:"],["12Geolocalización:"]] E=[] url="http://whatismyipaddress.com/ip/"+ip raw=urllib.urlopen(url).read() E0=...
IsmaeRLGV/Modular-UserBot-
API/WAI.py
Python
apache-2.0
1,949
import re from upload import upload from upload import get_parser class siv_upload(upload): def __init__(self, **kwargs): upload.__init__(self, **kwargs) def fix_name(self, name): tmp_name = name.replace(' ', '').replace('\'', '').replace('(', '').replace(')', '').replace('//', '/').replace('....
nextstrain/fauna
vdb/siv_upload.py
Python
agpl-3.0
3,400
from testfixtures import log_capture from tests.base_test import BaseTest from tests import config from core.sessions import SessionURL from core import modules import utils from core import messages import subprocess import os import tempfile import random def setUpModule(): subprocess.check_output(""" BASE_FOLDE...
epinna/weevely3
tests/test_file_grep.py
Python
gpl-3.0
6,825
from django.conf.urls import patterns, url from stepping_stones import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), )
hahnicity/stepping_stones
stepping_stones/urls.py
Python
mit
152
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # ThinkOpen Solutions Brasil # Copyright (C) Thinkopen Solutions <http://www.tkobr.com>. # # This...
thinkopensolutions/tkobr-addons
tko_coexiste_purchase/models/purchase.py
Python
agpl-3.0
1,907
from data_importers.management.commands import BaseHalaroseCsvImporter class Command(BaseHalaroseCsvImporter): council_id = "NOW" addresses_name = ( "2021-03-24T11:30:58.947611/Norwich new polling_station_export-2021-03-24.csv" ) stations_name = ( "2021-03-24T11:30:58.947611/Norwich ne...
DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_importers/management/commands/import_norwich.py
Python
bsd-3-clause
1,287
from typing import Iterable, Callable, Optional, Any, List, Iterator from dupescan.fs._fileentry import FileEntry from dupescan.fs._root import Root from dupescan.types import AnyPath FSPredicate = Callable[[FileEntry], bool] ErrorHandler = Callable[[EnvironmentError], Any] def catch_filter(inner_filter: FSPredicat...
yellcorp/dupescan
dupescan/fs/_walker.py
Python
mit
4,089
"""ACME AuthHandler.""" import itertools import logging import time import zope.component from acme import challenges from acme import messages from letsencrypt import achallenges from letsencrypt import constants from letsencrypt import errors from letsencrypt import interfaces logger = logging.getLogger(__name__...
tdfischer/lets-encrypt-preview
letsencrypt/auth_handler.py
Python
apache-2.0
20,080
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
openiitbombayx/edx-platform
lms/envs/common.py
Python
agpl-3.0
89,763
# Copyright 2017 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
ragupta-git/ImcSdk
imcsdk/apis/v2/admin/network.py
Python
apache-2.0
17,832
#!/usr/bin/python import os import sys import json import zlib import base64 import shutil import random import tempfile import ConfigParser from hashlib import sha1 from nfp_log import log from nfp_queue import get_queue from nfp_process import TimeoutCommand, RETURN_SIGNALS from minimize_bindiff import CGenericBin...
joxeankoret/nightmare
runtime/minimize_line.py
Python
gpl-2.0
6,653
dependencies = [ 'uwosh.themebase', 'uwosh.default' ] def initialize(context): """Initializer called when used as a Zope 2 product."""
uwosh/uwosh.thememain
uwosh/thememain/__init__.py
Python
gpl-2.0
148
import debug from hubs.ha import haremote as ha from hubs.ha.hasshub import HAnode, RegisterDomain import logsupport class Scene(HAnode): def __init__(self, HAitem, d): super().__init__(HAitem, **d) self.Hub.RegisterEntity('scene', self.entity_id, self) # noinspection PyUnusedLocal def SendOnOffCommand(self, ...
kevinkahn/softconsole
hubs/ha/domains/scene.py
Python
apache-2.0
1,011
from django.contrib.admin.views.decorators import staff_member_required from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from courses.forms import VoucherGenerationForm from courses.models import * @staff_member_required def voucher_generation_view(requ...
gitsimon/tq_website
courses/admin_views.py
Python
gpl-2.0
1,187
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Softwar where # it's copied from other people. In these cases, that will normally be # indicated. # # Li...
wfxiang08/Nuitka
tests/optimizations/Operations.py
Python
apache-2.0
1,026
from decimal import Decimal _ = lambda x:x #from i18n import _ from electrum.wallet import WalletStorage, Wallet from electrum.util import format_satoshis, set_verbosity, StoreDict from electrum.bitcoin import is_valid, COIN from electrum.network import filter_protocol import sys, getpass, datetime # minimal fdisk lik...
shanew/electrum
gui/stdio.py
Python
gpl-3.0
8,236
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 Ronald Sadlier - Oak Ridge National Laboratory # # This 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 option) ...
RonSadlier/gr-qitkat
python/qa_ecc_golay2412_encode_bb.py
Python
gpl-3.0
1,421
from .g2sd import cmd if __name__ == "__main__": cmd()
thismachinechills/grub2systemd
g2sd/__main__.py
Python
agpl-3.0
58
# # Copyright 2006-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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 ...
miurahr/translate
translate/storage/poxliff.py
Python
gpl-2.0
14,579
import sys import os import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler, FileModifiedEvent class LessCompiler(FileSystemEventHandler): def __init__(self, source): self.source = source FileSystemEventHandler.__init__(self) def compile_css(s...
hzlf/openbroadcast
website/tools/suit/watch_less.py
Python
gpl-3.0
1,306
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projects.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
cmheisel/project-status-dashboard
manage.py
Python
mit
251