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
__author__ = 'tiramola group' import os, datetime, operator, math, random, itertools, time import numpy as np from lib.fuzz import fgraph, fset from scipy.cluster.vq import kmeans2 from lib.persistance_module import env_vars from scipy.stats import linregress from collections import deque from lib.tiramola_logging imp...
cmantas/tiramola_v3
new_decision_module.py
Python
apache-2.0
36,005
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2015 Steffen Deusch # Licensed under the MIT license # Beilage zu MonitorNjus, 14.09.2015 (Version 0.9.3) import os workingdir = os.path.dirname(os.path.realpath(__file__)) import sys reload(sys) sys.setdefaultencoding('utf-8') import imp modulesdir = wor...
SteffenDE/monitornjus-classic
admin/setn.py
Python
mit
6,805
import os import sys import codecs from fnmatch import fnmatchcase from distutils.util import convert_path from setuptools import setup, find_packages def read(fname): return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read() # Provided as an attribute, so you can append to these instead # of repl...
johncosta/django-like-button
setup.py
Python
bsd-3-clause
4,721
# # Copyright 2013 Red Hat, Inc # # Author: Eoghan Glynn <eglynn@redhat.com> # Author: Mehdi Abaakouk <mehdi.abaakouk@enovance.com> # # 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 # # ht...
MisterPup/Ceilometer-Juno-Extension
ceilometer/alarm/evaluator/threshold.py
Python
apache-2.0
8,086
# -*- coding: utf8 -*- import uno import traceback from com.sun.star.beans import PropertyValue # XRay - API explorer from com.sun.star.uno import RuntimeException as _rtex def xray (myObject): try: sm = uno.getComponentContext().ServiceManager mspf = sm.createInstanceWithContext("com.sun.star.s...
seeschloss/grammalecte
pythonpath/helpers.py
Python
gpl-3.0
1,764
#!/usr/bin/env python from __future__ import print_function, division import roslib; roslib.load_manifest('fs_actuation') import rospy import json import urllib2 from fs_actuation.srv import AddPuff, AddPuffResponse from fs_actuation.srv import Cap, CapResponse from fs_actuation.srv import StartPuffRepeated, StartPuff...
janelia-idf/fly-sorter
fs_actuation/nodes/actuation_ros_server.py
Python
bsd-3-clause
4,683
""" Accessors for related objects. When a field defines a relation between two models, each model class provides an attribute to access related instances of the other model class (unless the reverse accessor has been disabled with related_name='+'). Accessors are implemented as descriptors in order to customize acces...
twz915/django
django/db/models/fields/related_descriptors.py
Python
bsd-3-clause
48,937
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAssemble...
ivmech/iviny-scope
lib/xlsxwriter/test/worksheet/test_sparkline04.py
Python
gpl-3.0
3,983
# This file is part of beets. # Copyright 2016, Thomas Scholtes. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
beetbox/beets
test/test_playlist.py
Python
mit
11,126
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_virtual_machine_scale_sets_operations.py
Python
mit
68,765
from os import environ IPYTHONDIR = environ["IPYTHONDIR"] template_rel_path = '~/Personal/ahsanijaz.github.io/_python' template_path = IPYTHONDIR + template_rel_path c.TemplateExporter.template_path = ['.',template_path]
ahsanijaz/ahsanijaz.github.io
_python/add_tpl.py
Python
mit
221
from appsrc import db class virtual_domains(db.Model): __tablename__ = 'virtual_domains' out = "std" id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(100)) def __init__(self, out, id, name): self.id = id self.name = name self.out...
antonfos/Linux-Email-Manager
appsrc/models/models.py
Python
gpl-3.0
1,980
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
eadgarchen/tensorflow
tensorflow/python/kernel_tests/control_flow_ops_py_test.py
Python
apache-2.0
110,857
from __future__ import absolute_import from django import forms from django.db import IntegrityError, transaction from django.http import HttpResponse from django.views.generic import View from django.template.loader import render_to_string from django.utils import timezone from django.utils.safestring import mark_saf...
mitsuhiko/sentry
src/sentry/web/frontend/error_page_embed.py
Python
bsd-3-clause
5,673
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('bearing', '0017_rename_iso_field'), ] operations = [ migrations.AddField( model_name='bearing', name='iso', field=models...
manti-by/POD
app/bearing/migrations/0018_bearing_iso_foreign_key.py
Python
bsd-3-clause
522
""" PyCrans - in development """ import sys import os from pycrans.tok.preanalyzer import Preanalyzer from pycrans.tok.tokenizer import Tokenizer from pycrans.run.runner import Runner from pycrans.run.dptAnalyzer import DPTAnalyzer from pycrans.refactor.rewriter import Rewriter import pycrans.common.log as l...
citeaalexandru/PyCrans
project/main.py
Python
mit
2,234
from __future__ import unicode_literals current_header = 0 headers = [ 'Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,...
Oteng/fastget
utils.py
Python
unlicense
598
import socket import struct import time from ethernet_message import * NODE_IP = "10.0.0.113" PORT = 13371 tport = 15555 # we will get msgs from cb after connect here sock = socket.socket(socket.AF_INET, # Internet socket.SOCK_DGRAM) # UDP sock.bind(('0.0.0.0', tport)) sock.sendto(b'\x04' + b'\...
Gutenshit/CANBadger-Server
examples/replay_example.py
Python
gpl-3.0
1,003
""" A test module which tests that config handling works """ TYPE = "Test" NAME = "test_conf" DEFAULTCONF = {'a': 'b', 'c': 'd'} def check(conf=DEFAULTCONF): return True def scan(filelist, conf=DEFAULTCONF): results = [] metadata = {} metadata["Name"] = NAME metadata["Type"] = TYPE metadata...
jmlong1027/multiscanner
tests/modules/test_conf.py
Python
mpl-2.0
365
from PIL import Image import utils.patches as patches import numpy, sys test_path = sys.argv[1] out_path = sys.argv[2] chan_4 = Image.open(test_path+'-4.png') chan_4 = chan_4.resize((1224,1024)) img_ar = numpy.array(chan_4) im_cp = numpy.array(img_ar, dtype='uint8') i = patches.PATCH_SIZE[0]/2+1 j = patches.PATCH_SIZE...
saahil/MSSegmentation
annotate.py
Python
gpl-2.0
1,589
from rest_framework.views import APIView from rest_framework.permissions import IsAuthenticatedOrReadOnly, IsAuthenticated from elixir.permissions import IsOwnerOrReadOnly, HasEditPermissionToEditResourceOrReadOnly, CanConcludeResourceRequest, IsStaffOrReadOnly from elixir.models import * from elixir.serializers import...
bio-tools/biotoolsregistry
backend/elixir/view/workflow.py
Python
gpl-3.0
1,175
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-08 19:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields class Migration(migrations.Migration): initial = True dependencies = [ ] ope...
kidsfm/cms
team/migrations/0001_initial.py
Python
gpl-3.0
2,295
# Copyright (c) 2013 Mirantis 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 writ...
rnirmal/savanna
savanna/api/v10.py
Python
apache-2.0
6,897
# Copyright (c) 2017 Rocky Bernstein """ Parsing for a trepan2/trepan3k debugger "breakpoint', "list", or "disasm" command arguments This is a debugger location along with: - an optional condition parsing for breakpoints commands - a range or count for "list" commands """ from __future__ import print_function imp...
rocky/python-spark
example/gdb-loc/gdbloc/parser.py
Python
mit
7,525
# partisan.settings.base # The common Django settings for the partisan project. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Sat Jul 16 11:25:43 2016 -0400 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: base.py [5277a6e] benjamin@bengfort.com...
DistrictDataLabs/partisan-discourse
partisan/settings/base.py
Python
apache-2.0
9,526
############################################################################### ## ## Copyright 2013 Ian McCracken ## ## 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://ww...
iancmcc/droppy
droppy/server/command.py
Python
apache-2.0
2,745
default_app_config = 'providers.edu.uwashington.apps.AppConfig'
zamattiac/SHARE
providers/edu/uwashington/__init__.py
Python
apache-2.0
64
# -*- coding: utf-8 -*- ''' genesis reborn Add-on Copyright (C) 2016 genesisreborn 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 you...
azumimuo/family-xbmc-addon
plugin.video.genesisreborn/resources/lib/modules/control.py
Python
gpl-2.0
6,945
"""afweb """ __author__ = "Joel Dubowy" __version_info__ = (2,0,0) __version__ = '.'.join([str(n) for n in __version_info__])
pnwairfire/afweb
afweb/__init__.py
Python
gpl-3.0
133
#!/usr/bin/python2 """ Statement: Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13 It can be verified that the sum of the numbers on the diagonals is 101. What is the sum of t...
smahs/euler-py
28.py
Python
mit
1,291
MACOSX_FONT = "/System/Library/Fonts/Keyboard.ttf"
hhatto/pgmagick
test/utils.py
Python
mit
51
import json from unittest import TestCase from contentful.errors import ( HTTPError, NotFoundError, BadRequestError, AccessDeniedError, UnauthorizedError, RateLimitExceededError, ServerError, ServiceUnavailableError, get_error ) from contentful.utils import retry_request, json_error_...
contentful/contentful.py
tests/errors_test.py
Python
mit
12,841
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Functions and classes related to variable type conversion """ import numpy def float_...
psychopy/psychopy
psychopy/tools/typetools.py
Python
gpl-3.0
1,219
from datetime import date from pytest import mark from cerberus import errors from cerberus.tests import assert_fail, assert_success @mark.parametrize( ("field", "increment"), [("an_integer", 1), ("a_float", 1.0), ("a_number", 1)] ) def test_max(schema, field, increment): max_value = schema[field]['max'] ...
funkyfuture/cerberus
cerberus/tests/test_rule_max_min.py
Python
isc
1,001
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/google/cloud/monitoring/client.py
Python
mit
23,534
#!/usr/bin/env python """AMQP messaging with Pika.""" import gevent from gevent import event, coros from pika.credentials import PlainCredentials from pika.connection import ConnectionParameters from pika.adapters import SelectConnection from pika import channel as pikachannel from pika.exceptions import NoFreeChan...
ooici/pyon
pyon/net/messaging.py
Python
bsd-2-clause
16,694
""" Django settings for muckrock project """ # Django from celery.concurrency import asynpool from django.urls import reverse # Standard Library import os import urllib.parse from collections import OrderedDict from datetime import date def boolcheck(setting): """Turn env var into proper bool""" if isinstan...
MuckRock/muckrock
muckrock/settings/base.py
Python
agpl-3.0
26,099
#!/usr/bin/env python import math,sys,tarfile,os,shutil from copy import deepcopy import exceptions,warnings import lsst.sims.catalogs.measures.utils as mUtils from lsst.sims.catalogs.generation.db import queryDB def writeJobEvent(je, event, description=''): if je is not None: if event == 'start': ...
lsst/sims_catalogs_generation
python/lsst/sims/catalogs/generation/deprecated/utils/runTrimCat.py
Python
gpl-3.0
8,023
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
oakeyc/azure-cli-shell
azclishell/configuration.py
Python
mit
5,014
import subprocess import requests import os import wave URL = 'WATSON_URL' PASSWORD = 'WATSON_PASSWORD' USERNAME = 'WATSON_USERNAME' CHUNK_SIZE = 1024 def download(text, filename, path): #requests gets response using parameters for authorization and audio format #stream=True allows it to be streamed as well #ve...
matthrice/MarkeTouch-TTS
src/executer.py
Python
apache-2.0
5,222
#!/usr/bin/env python3 ''' FIXME This script is used only to call gdbus-codegen and simulate the generation of the source code and header as different targets. Both are generated implicitly, so meson is not able to know how many files are generated, so it does generate only one opaque target that represents the two ...
leigh123linux/cinnamon-screensaver
libcscreensaver/g-codegen.py
Python
gpl-2.0
937
#!/usr/bin/env python from __future__ import absolute_import, print_function from grid_cell_model.submitting import flagparse import noisefigs from noisefigs.env import NoiseEnvironment import config_standard_gEE_3060 as config parser = flagparse.FlagParser() parser.add_flag('--bumpDriftSweep') args = parser.parse_a...
MattNolanLab/ei-attractor
grid_cell_model/simulations/007_noise/figures/paper/ee_connections_ei_flat/figure_drifts.py
Python
gpl-3.0
501
from django.utils.translation import ugettext_lazy as _ from oioioi.base.menu import MenuRegistry navbar_links_registry = MenuRegistry(_("Navigation Bar Menu"))
sio2project/oioioi
oioioi/problems/menu.py
Python
gpl-3.0
162
#!/usr/bin/env python from __future__ import print_function import os import re import codecs from setuptools import setup, find_packages def read(*parts): filename = os.path.join(os.path.dirname(__file__), *parts) with codecs.open(filename, encoding='utf-8') as fp: return fp.read() def find_vers...
stefanw/froide-foiidea
setup.py
Python
bsd-3-clause
1,548
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://zappala.byu.edu' RELATIVE_URLS = Fals...
zappala/personal-web
publishconf.py
Python
gpl-2.0
531
# module spectrodbAccess.py import mysql.connector as MySQLdb import json import datetime,time logLevel=0 def init_connection(configFilePath): global logLevel logLevel=0 json_text=open(configFilePath).read() config=json.loads(json_text) db= MySQLdb.connect(host=config['db']['host'],user=config['db']['userName']...
tlemoult/spectroDb
myPythonLib/libsdb/dbSpectro.py
Python
mit
19,660
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin import settings admin.autodiscover() # from picture_ranking import views urlpatterns = patterns('', # Examples: # url(r'^$', 'picture_ranking.views.home', name='home'), # url(r'^...
7h3kk1d/picture_ranking
picture_ranking/urls.py
Python
apache-2.0
649
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import inspect from ...
cevaris/pants
src/python/pants/build_graph/build_file_aliases.py
Python
apache-2.0
11,081
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import copy import types from lib.core.exception import SqlmapDataException class AttribDict(dict): """ This class defines the sqlmap object, inheriting from Python ...
goofwear/raspberry_pwn
src/pentest/sqlmap/lib/core/datatype.py
Python
gpl-3.0
2,973
from cwrap import BaseCClass from res import ResPrototype from res.util import Matrix class ObsBlock(BaseCClass): TYPE_NAME = "obs_block" _alloc = ResPrototype("void* obs_block_alloc(char*, int, matrix, bool, double)", bind = False) _free = ResPrototype("void obs_block_free(obs_block)") ...
Statoil/libres
python/res/enkf/obs_block.py
Python
gpl-3.0
2,730
# Copyright 2022 The Scenic Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
google-research/scenic
scenic/dataset_lib/big_transfer/bit.py
Python
apache-2.0
7,242
#!/usr/bin/env python # -*- coding: utf-8 -*- # Path hack import os, sys sys.path.insert(0, os.path.abspath('..')) import unittest import time import json from collections import defaultdict import requests from requests import Request import requests_cache from requests_cache import CachedSession from requests_cach...
gwillem/requests-cache
tests/test_cache.py
Python
bsd-2-clause
8,700
import os from unittest import TestCase from unittest.mock import patch from RatS.trakt.trakt_ratings_parser import TraktRatingsParser TESTDATA_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "assets") ) class TraktRatingsParserTest(TestCase): def setUp(self): i...
StegSchreck/RatS
tests/unit/trakt/test_trakt_ratings_parser.py
Python
agpl-3.0
4,675
import sys; sys.path.append("..") import random import fireplace.cards from fireplace.cards.heroes import * from hearthstone.enums import * from fireplace.game import BaseGame, CoinRules, Game from fireplace.brawls import * from fireplace.player import Player from fireplace.utils import random_draft from fireplace.logg...
amw2104/fireplace
tests/utils.py
Python
agpl-3.0
2,818
from app import app from flask import render_template, session, \ request, redirect, make_response, url_for, jsonify from werkzeug.utils import secure_filename from logisticalModel import LogisticalModel from verifyModels import verifyModel from linearProg import LinearProgramming import os import pygal ALLOWED...
OdinTech3/IM-Flask-App
app/routes.py
Python
gpl-3.0
4,356
# solution to Harvest 2 pense(0) def pick_one_row(): for i in range(6): while objet_ici("carotte"): prend("carotte") avance() # go to first row repeat 2: avance() tourne_a_gauche() repeat 2: avance() repeat 3: tourne_a_gauche() for j in range(3): pick_one_row() tourn...
code4futuredotorg/reeborg_tw
test/src/harvest2_fr.py
Python
agpl-3.0
507
''' A script for fixing some header & data model errors in DR8 forced photometry results. # EXTNAME = 'FORCED_PHOTOM' # units on RA,DEC # uniformize CAMERA, CCDNAME, and EXPNUM ''' from astrometry.util.fits import * from astrometry.util.file import trymakedirs from glob import glob import os import fitsio import num...
legacysurvey/pipeline
py/legacyanalysis/fix-forced-phot.py
Python
gpl-2.0
1,711
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.exceptions import UserError class Cowin_project_subproject_project_data_archiving(models.Model): ''' 项目资料归档 ''' _name = 'cowin_project.sub_project_data_archiving' subproject_id = fields.Many2one('cowin_proje...
shangdinvxu/cowinaddons
cowin_project/models/sub_project/prev_investment_management/sub_project_project_data_archiving.py
Python
mit
8,387
""" test some jython internals """ import unittest from test_support import run_suite import java import jarray class WeakIdentityMapTests(unittest.TestCase): def test_functionality(self): if java.lang.System.getProperty("java.version")<"1.2": return from org.py...
DarioGT/OMS-PluginXML
org.modelsphere.sms/lib/jython-2.2.1/Lib/test/test_jy_internals.py
Python
gpl-3.0
4,214
''' Created on Sep 3, 2013 @author: marcelo ''' import unittest import os import sys import etc.properties import delegated.api import commons.utils import commons.getfile import rpki.ripeval_stats ################################################################## class Test(unittest.TestCase): def setUp(se...
carlosm3011/rir-stats-tools
lib/rpki/ripeval_stats_tests.py
Python
bsd-3-clause
1,327
# CubETL # Copyright (c) 2013-2019 # See AUTHORS and LICENSE files for more information. # This file is part of the CubETL library. # This file is meant to be included from other CubETL configuration files, # it provides data types, schema and other objects. from cubetl.olap import Dimension, Key, Attribute, Hierar...
jjmontesl/cubetl
library/geo.py
Python
mit
8,682
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt N = 12 # values = (...) values = ( 0, 0, 0, 2, 1826, 104164, 83830, 50000, 34157, 27365, 197341, 623315 ) ticks = ('1e-6', '1e-5', '1e-4', '1e-3', '1e-2', '1e-1', '0.2', '0.3', '0.4', '0.5', '0.9', '1') ind = np.arange(N) # the x locations fo...
aprokop/ml_prec
tools/python/histogramm.py
Python
gpl-3.0
752
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Quantization'] , ['MovingAverage'] , ['Seasonal_Minute'] , ['NoAR'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_MovingAverage_Seasonal_Minute_NoAR.py
Python
bsd-3-clause
166
from setuptools import setup, find_packages from sys import argv install_requires = [ 'alvadescpy==0.1.0', 'colorlogging==0.3.5', 'ecabc==3.0.0', 'matplotlib==3.1.2', 'numpy==1.16.4', 'padelpy==0.1.6', 'pyyaml==5.1.1', 'scikit-learn==0.21.2' ] if '--omit_tf' in argv: ...
TJKessler/ECNet
setup.py
Python
mit
902
# # This code is part of Ansible, but is an independent component. # # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complet...
jcftang/ansible
lib/ansible/module_utils/eos_cli.py
Python
gpl-3.0
7,869
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from django.db.models import Count, QuerySet from zerver.models import UserActivity, UserProfile, Realm, \ get_realm, get_use...
calvinleenyc/zulip
analytics/management/commands/client_activity.py
Python
apache-2.0
3,040
# -*- coding: utf-8 -*- # Credits: # Chris Rodgers - https://github.com/cxrodgers/my/blob/master/stats.py # Brent Pedersen - https://gist.github.com/brentp/853885 # Filipe Correia # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # The next block was borrowed and adapted from Chris Rodgers # https://github....
filipefigcorreia/asaanalyzer
asaanalyser/common/r_util.py
Python
mit
8,612
import sys ################################################################################ CRASHDUMP_FILENAME = '.crash_dump.txt~' ################################################################################ class handleCrash(object): """Wraps a top-level script function in an error handling routine that ...
cversek/peltiator
python/src/peltiator/apps/lib/errors.py
Python
mit
1,356
'''brainfuck interpreter adapted from (public domain) code at http://brainfuck.sourceforge.net/brain.py''' from builtins import chr from builtins import range import re import random import unittest from util import hook @hook.command def bf(inp, max_steps=1000000, buffer_size=5000): ".bf <prog> -- executes bra...
crisisking/skybot
plugins/bf.py
Python
unlicense
2,513
#!/usr/bin/env python # # Copyright 2009,2011,2012 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 you...
owaiskhan/Retransmission-Combining
gr-uhd/apps/uhd_siggen_gui.py
Python
gpl-3.0
12,205
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pyscada', '0022_auto_20160228_2029'), ] operations = [ migrations.AlterField( model_name='device', n...
trombastic/PyScada
pyscada/migrations/0023_auto_20160314_1817.py
Python
gpl-3.0
568
#!/usr/bin/python -tt # 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 i...
nickjacek/yum-cron
yum/packageSack.py
Python
gpl-2.0
41,946
#!/usr/bin/env python # -*- coding: utf-8 -*- """\ pph2_and_rank.py Submits a list of genes with SNPs to PolyPhen2 and orders them by a score measuring the overall deleteriousness of the mutations, normalized for protein length. LICENSE Written by Ted Pak for the Roth Laboratory (http://llama.mshri.on.ca). Releas...
powerpak/pph2_and_rank
pph2_and_rank.py
Python
mit
11,921
# -*- coding: utf-8 -*- """ Created on Mon Feb 23 09:02:21 2015 @author: adelpret q.shape""" import numpy as np import sys import matplotlib as mpl from plot_utils import plot3d from plot_utils import plot_x_vs_y from plot_utils import saveCurrentFigure import plot_utils import matplotlib.pyplot as plt import matplo...
andreadelprete/sot-torque-control
python/identify_motor_old_until_12_2015.py
Python
lgpl-3.0
28,396
""" Tests for Discussion API views """ import json from datetime import datetime from unittest import mock import ddt import httpretty from django.urls import reverse from opaque_keys.edx.keys import CourseKey from pytz import UTC from rest_framework.parsers import JSONParser from rest_framework.test import APIClien...
eduNEXT/edunext-platform
lms/djangoapps/discussion/rest_api/tests/test_views.py
Python
agpl-3.0
89,780
# -*- coding: utf-8 -*- import vimbastructure as structs from vimbaexception import VimbaException from sys import platform as sys_plat import platform import os from ctypes import * if sys_plat == "win32": def find_win_dll(arch): """ Finds the highest versioned windows dll for the specified architecture....
derricw/pymba
pymba/vimbadll.py
Python
bsd-3-clause
17,696
# debtagshw: lib to detect what hardware tags apply to the current system # # Copyright (C) 2012 Canonical # # Author: # Michael Vogt <mvo@ubuntu.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 Fou...
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/debtagshw/opengl.py
Python
mit
8,493
#!/usr/bin/env python #****************************************************************************** # $Id: gdal_proximity.py 27044 2014-03-16 23:41:27Z rouault $ # # Name: gdalproximity # Project: GDAL Python Interface # Purpose: Application for computing raster proximity maps. # Author: Frank Warmerdam...
tilemapjp/OSGeo.GDAL.Xamarin
gdal-1.11.0/swig/python/scripts/gdal_proximity.py
Python
mit
5,660
#!/usr/bin/python3 import logging; import random class CmdProcessor: def __init__(self,cmd,userR): self._cmd = cmd; self._userR = userR; def cmd_ok(self,text): return self._cmd in text; def get_cmd(self): return self._cmd; def process(self,bot,update): retu...
grcanosa/my-telegram-bot
src/not_used/handlers/cmdprocessor.py
Python
gpl-3.0
330
from __future__ import unicode_literals from django.db import models from django.core.paginator import Paginator, PageNotAnInteger from wagtail.wagtailcore.models import Page from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailimages.edit_...
samuelleeuwenburg/Samplate
event/models.py
Python
mit
1,665
#!/usr/bin/python # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms ...
jodogne/OrthancMirror
OrthancFramework/Resources/CodeGeneration/GenerateTransferSyntaxes.py
Python
gpl-3.0
2,412
../../../../../../share/pyshared/papyon/service/OfflineIM/constants.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/papyon/service/OfflineIM/constants.py
Python
gpl-3.0
70
//codecademy course answer """ Boolean Operators ------------------------ True and True is True True and False is False False and True is False False and False is False True or True is True True or False is True False or True is True False or False is False Not True is False Not False is True """
nurhandipa/python
codecademy/to_be_and_or_not_to_be.py
Python
gpl-3.0
312
from django import forms from django.conf import settings from django.contrib.admin.util import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db.m...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/django-1.3/django/contrib/admin/helpers.py
Python
bsd-3-clause
13,361
from .models import Category # __all__ = ["Category"]
rustyrazorblade/killranswers
killranswers/categories/__init__.py
Python
bsd-3-clause
54
import os import sys import re NAME_RE = re.compile(r'[a-zA-Z_][-a-zA-Z0-9_.]+') DEBUG=False class UserPlugin: def __init__(self, igor): self.igor = igor def index(self, token=None, callerToken=None): raise self.igor.app.raiseNotfound() def add(self, token=None, callerToken=None...
cwi-dis/igor
igor/std-plugins/user/igorplugin.py
Python
mit
3,759
#! /usr/bin/env python # -*- coding: utf-8 -*- from django.core.cache import cache from flisol_event.models import FlisolAttendance from flisol_event.models import FlisolInstance from flisol_event.models import FlisolInstanceRequest from flisol_event.serializers import FlisolAttendanceSerializer from flisol_event.seri...
ikks/flisol-connect
localapi/views.py
Python
mit
3,300
""" This file is part of OpenSesame. OpenSesame 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. OpenSesame is distributed in the hope that ...
amazinger2013/OpenSesame
plugins/external_script/external_script.py
Python
gpl-3.0
5,962
#! /usr/bin/python # Basic Matrix factorization import numpy as np class bmf(): def __init__(self, k = 100, rounds = 50, alpha = 0.005, beta = 0.02, train_fn = '', validate_fn = '', pred_fn = '', output = ''): self.k = k self.rounds = rounds self.alpha = alpha self.beta = beta self.train_fn = train_f...
xunzhang/roraima
tools/mf.py
Python
apache-2.0
3,744
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.pantsd.su...
pombredanne/pants
tests/python/pants_test/pantsd/subsystem/test_subprocess.py
Python
apache-2.0
714
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-12-05 15:20 from __future__ import unicode_literals from django.db import migrations, models import scoping.validators class Migration(migrations.Migration): dependencies = [ ('scoping', '0175_auto_20171201_1056'), ] operations = [ ...
mcallaghan/tmv
BasicBrowser/scoping/migrations/0176_auto_20171205_1520.py
Python
gpl-3.0
880
import math import json import os import pprint import PubMedQuerier import PubMedParser import random import TermExtractor import TopicModeler import XploreParser import AMinerParser from itertools import chain from nltk.metrics import edit_distance from core.models import Association, Concept, Evidence, Text, Eviden...
tacitia/ThoughtFlow
project/core/views/views_adhoc.py
Python
mit
13,451
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # bc_disk_access --dfxmlfile <file> --filename <oufile> # # Ex: Cat: # python3 bc_disk_access.py --image ~/aaa/charlie-work-usb-2009-12-11.aff \ # --dfxmlfile ~/aaa/charlie_xml --filename \ # Email/Charlie_2009-12-04_0941_Sent.txt --cat # # Ex: filelist: # SILS-SUNITH...
bencomp/bitcurator
python/bc_disk_access.py
Python
gpl-3.0
18,136
""" Templatetags for tags """
RossBrunton/BMAT
tags/templatetags/__init__.py
Python
mit
30
def itemTemplate(): return ['object/tangible/item/shared_rare_loot_chest_3.iff'] def customItemName(): return ''
agry/NGECore2
scripts/loot/lootItems/rareloot/rarelootchest2.py
Python
lgpl-3.0
119
from sqlalchemy.testing import config from sqlalchemy.testing import emits_warning from sqlalchemy.testing import engines from sqlalchemy.testing import exclusions from sqlalchemy.testing import mock from sqlalchemy.testing import provide_metadata from sqlalchemy.testing import skip_if from sqlalchemy.testing import us...
zzzeek/alembic
alembic/testing/__init__.py
Python
mit
1,278
#!/usr/bin/env python """ 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");...
radicalbit/ambari
ambari-common/src/main/python/resource_management/libraries/__init__.py
Python
apache-2.0
1,015
# -*- coding: utf-8 -*- # LysKOM Protocol A version 10/11 client interface for Python # (C) 1999-2002 Kent Engström. Released under GPL. # (C) 2008 Henrik Rindlöw. Released under GPL. # (C) 2012-2014 Oskar Skoog. Released under GPL. # All errors belong to this class class Error(Exception): pass # All Protocol A erro...
osks/pylyskom
pylyskom/errors.py
Python
gpl-2.0
5,067
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
horance-liu/tensorflow
tensorflow/contrib/estimator/python/estimator/replicate_model_fn.py
Python
apache-2.0
19,191
#!/usr/bin/env python # $Id$ from datetime import datetime, timedelta from canary.cmdline import CommandLine from canary.context import Context, CanaryConfig from canary.loader import QueuedRecord from canary.search import RecordSearcher from canary.stats import * from canary.study import Study if __name__ == '__...
dchud/sentinel
bin/scripts/curator_activity.py
Python
mit
1,149