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
from pokemontcgsdk.querybuilder import QueryBuilder class Type(): RESOURCE = 'types' @staticmethod def all(): return QueryBuilder(Type).array()
PokemonTCG/pokemon-tcg-sdk-python
pokemontcgsdk/type.py
Python
mit
165
DATASET_DIR = '/tmp' BRAIN_DIR = '/tmp' GENRES = [ 'blues', 'classical', 'country', 'disco', 'hiphop', 'jazz', 'metal', 'pop', 'reggae', 'rock' ] NUM_BEATS = 10 KEEP_FRAMES = 0 TRAIN_TEST_RATIO = [7, 3] MODE = 'nn' PCA = False FEATURES = ['mfcc', 'dwt', 'beat'] MFCC_EXTRA = ['delta', 'ddelta', 'energy'...
kapilgarg1996/gmc
gmc/conf/global_settings.py
Python
mit
1,053
#!C:\OSGEO4~1\bin\python.exe # -*- coding: utf-8 -*- # ****************************************************************************** # $Id: gdal2tiles.py 1f32f6fdbfd2fd352047db41d316d8afbe3c3319 2018-11-30 01:05:06 +0100 Even Rouault $ # # Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/) ...
kubaszostak/gdal-dragndrop
osgeo/apps/Python27/Scripts/gdal2tiles.py
Python
mit
123,604
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
skuda/client-python
kubernetes/client/models/v1_pod_template_spec.py
Python
apache-2.0
3,984
# Bluefors_GHS.py # S1@KIT 10/2020 # # 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 ...
qkitgroup/qkit
qkit/drivers/Bluefors_GHS.py
Python
gpl-2.0
3,825
import pkg_resources from paste.script.templates import Template, var from paste.util.template import paste_script_template_renderer from paste.script import command class DummyCommand(command.Command): simulate = False parser = command.Command.standard_parser() class DummyOptions(object): simulate = F...
level12/blazeweb
blazeweb/paster_tpl.py
Python
bsd-3-clause
3,677
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from . import command from . import repository fro...
online-sanaullah/odoo-infrastructure
infrastructure/models/__init__.py
Python
agpl-3.0
1,133
from collections import defaultdict import json import logging import uuid import calendar import datetime import pytz import hashlib from dateutil.parser import parse as parse_date from django.template.defaultfilters import date as template_date from celery import states from django.conf import settings from django...
WorldBank-Transport/DRIVER
app/data/views.py
Python
gpl-3.0
62,554
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator import os OUT_CPP="src/qt/gamblrstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format prod...
knolza/gamblr
share/qt/extract_strings_qt.py
Python
mit
2,044
# # vnc.py: VNC related installer functionality # # Copyright (C) 2004, 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 Software Foundation; either version 2 of the Licens...
icomfort/anaconda
vnc.py
Python
gpl-2.0
16,084
# environment: FontLab # version: Studio 5.0+ # platform: Mac (untested in Windows) # dialogKit object: List # status: Reported to FontLab developers on December 17, 2005 # description: setSelection does not select anything in the list. # cause: This is the result of a bug in the FontLab Dialog object. class SetIndexT...
typesupply/dialogKit
documentation/source/bugReplication/FLS_5_SetListSelection.py
Python
mit
1,099
# -*- coding: utf-8 -*- """ Created on Fri Mar 25 12:40:57 2016 @author: it-lab412 """ from os import listdir from os.path import isfile, join import numpy as np import cv2 import pandas as pd #import Neural2 import re import cPickle as pickle import loss from sklearn.preprocessing import MinMaxScaler _nsre = re.co...
darshitdoshi/diabetic_retinopathy_detection
testFile.py
Python
mit
1,249
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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 Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
FedoraScientific/salome-paravis
test/VisuPrs/GaussPoints/B5.py
Python
lgpl-2.1
2,010
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'ar' CFG_PROGRESS = 'progress.json' CFG_MODEL= 'model.json' CFG_MODEL_NETWORK='network.json' CFG_MODEL_TRAIN= 'train_val_keras.json' CFG_SOLVER='solver_keras.json' CFG_EVAL_ROC='cfg.json' PREFIX_SNAPSHOT='snapshot' PREFIX_TASKS_DIR='mdltask' PREFIX_EVAL_ROC_DIR= '...
SummaLabs/DLS
app/backend/core/models/cfg.py
Python
mit
614
################################################################################ # # # Copyright (C) 2010-2018 The ESPResSo project # # ...
mkuron/espresso
doc/tutorials/06-active_matter/EXERCISES/flow_field.py
Python
gpl-3.0
5,548
#SPDX-License-Identifier: MIT import pytest import pandas as pd def test_code_changes(metrics): #repo_id assert metrics.code_changes(10, 25430, period='year').isin([pd.Timestamp('2019-01-01T00:00:00+00:00'), 2]).any().any() # repo_group_id assert metrics.code_changes(10, period='year').isin([pd.Times...
OSSHealth/ghdata
tests/test_metrics/test_repo_meta_metrics.py
Python
mit
3,843
g.es("終於導入 node.js") g.es("可以透過 ungit 了解倉儲運作情況")
2015fallhw/test
test.py
Python
agpl-3.0
81
"""Login/logout views.""" from urllib import quote_plus from urllib import unquote_plus from pyramid.httpexceptions import HTTPSeeOther from lasco.auth import get_who_api from lasco.i18n import _ from lasco.views.utils import TemplateAPI def login_form(request, failed=False): api = TemplateAPI(request, 'Log in...
dbaty/Lasco
lasco/views/auth.py
Python
bsd-3-clause
1,833
from __future__ import absolute_import from django.contrib import admin from . import models admin.site.register(models.Presentation) admin.site.register(models.PresentationRole) admin.site.register(models.Session) admin.site.register(models.Slide)
tysonclugg/dddppp
dddppp/slides/admin.py
Python
mit
250
import quark_hash import weakref import binascii import StringIO from binascii import unhexlify teststart = '700000005d385ba114d079970b29a9418fd0549e7d68a95c7f168621a314201000000000578586d149fd07b22f3a8a347c516de7052f034d2b76ff68e0d6ecff9b77a45489e3fd511732011df0731000'; testbin = unhexlify(teststart) hash_bin = x11_...
ptcrypto/p2pool-adaptive
extra_modules/x11_hash/test.py
Python
gpl-3.0
344
import json import csv teamfolder = "teamdata/out/" with open('combined.json', 'r') as jsonfile: data = json.load(jsonfile) for yeardata in data: year = yeardata['year'] print "" print "NEW YEAR " + str(year) for team in yeardata['teams']: teamname = team['team'] print "Doing team...
Tankske/InfoVisNBA
scraper/remove.py
Python
bsd-3-clause
1,393
# Copyright 2020 Google # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
quantumlib/ReCirq
recirq/otoc/__init__.py
Python
apache-2.0
946
# coding: utf-8 import os import inspect import importlib import unittest from getsub.models import Video from getsub.downloader.downloader import Downloader class TestSubDownloaders(unittest.TestCase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.subclasses = se...
gyh1621/GetSubtitles
tests/integration/test_downloaders.py
Python
mit
2,367
#!/usr/bin/python # -*- coding: utf-8 -*- import threading import logging import time import re import os import errno import ApoConfig from ApoLibrary import * from ApoObserver import * class ApoObserverNoActionTimeRange(ApoObserverManager, ApoObserverThread): def status(self): if self.isInTimeRange: ...
deragon/autopoweroff
python/modules/ApoObserverNoActionTimeRange.py
Python
gpl-2.0
2,460
#!/usr/bin/env python # coding=utf-8 import pexpect import os import sys class Sess(object): def __init__(self, user, ip, passwd): self.user = user self.ip = ip self.passwd = passwd if self.user == 'root': self.usersep = '#' else: # self.usersep = o...
mutiwu/python-script
python_test/test_pexpect.py
Python
gpl-2.0
2,122
__author__ = 'kiruba' import numpy as np import matplotlib.pyplot as plt import pandas as pd import ftplib import re import os import sys import calendar import datetime from datetime import date import gdal from gdalconst import * import progressbar from pymodis.convertmodis_gdal import convertModisGDAL import fnmatch...
tejasckulkarni/hydrology
GIS/streams_milli.py
Python
gpl-3.0
4,103
#!/usr/bin/env python # -*- coding: utf-8 -*- """ type 'pytest -v' to run u test series """ import codecs import json import os import pytest import tempfile import sys sys.path.insert(1, os.path.join(sys.path[0], '..')) import core class TestHelpers: @staticmethod def file_read(fd): """ fro...
pyseed/objify
objify/test/test_core.py
Python
mit
13,959
# -*- coding: utf-8 -*- #------------------------------------------------------------ # seriesly - XBMC Plugin # Conector para videomega # http://blog.tvalacarta.info/plugin-xbmc/seriesly/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import scrape...
conejoninja/xbmc-seriesly
servers/videomega.py
Python
gpl-3.0
3,401
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Application.content_type' db.add_column('applications_application', 'content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=or...
Karaage-Cluster/karaage-debian
karaage/legacy/applications/south_migrations/0004_auto__add_field_application_content_type__add_field_application_object.py
Python
gpl-3.0
17,096
import os PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = [ # ("Your Name", "[email protected]"), ] MANAGERS = ADMINS DATABASES = { "default": { "ENGINE": ...
zdlm/conext
conext/settings.py
Python
mit
5,932
import csv import numpy as np import numpy.random as nprand import util class GeoVidCorpus(object): def __init__(self, pairs, country_lookup=None): '''Initialize from (country, video) tuples.''' countries = dict() videos = dict() for country, video in pairs: countri...
c4fcm/WhatWeWatch-Analysis
geovidcorpus.py
Python
bsd-3-clause
2,764
import numbers, operator from .. import utilities from .base import ItemCollector from .columntype import ColumnTypeItemCollector from .itemcount import ItemCountCollector from .minitem import MinItemCollector from .maxitem import MaxItemCollector from .variance import ItemVarianceCollector from ..utilities.distributio...
davidfoerster/schema-matching
src/schema_matching/collector/itemfrequency.py
Python
mit
1,389
# Copyright 2018 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 a...
ewiseblatt/spinnaker
testing/citest/tests/kube_v2_smoke_test.py
Python
apache-2.0
14,187
from django.views.generic import View from django.contrib.auth import authenticate, login from django.shortcuts import render_to_response from django.utils.decorators import classonlymethod from functools import update_wrapper from ipviking_django.forms import LoginForm, EmailForm from ipviking_django.authorizer import...
norsecorp/ipviking-django
ipviking_django/ipviking_django/views.py
Python
bsd-2-clause
3,981
#!/usr/bin/env python from __future__ import division __author__ = "Jai Ram Rideout" __copyright__ = "Copyright 2012, The QIIME project" __credits__ = ["Jai Ram Rideout", "Greg Caporaso"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Jai Ram Rideout" __email__ = "[email protected]" from os.path ...
wasade/qiime
scripts/compare_taxa_summaries.py
Python
gpl-2.0
13,776
#!/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");...
alexryndin/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SOLR/package/scripts/solr.py
Python
apache-2.0
4,700
# coding: utf-8 # PYTHON IMPORTS import os # DJANGO IMPORTS from django.test import TestCase from django.contrib.auth.models import User # FILEBROWSER IMPORTS from filebrowser.settings import * class SettingsTests(TestCase): def setUp(self): pass def test_media_root(self): """ ...
xgfone/homepage
homepage/homepage/django_packages/filebrowser/tests/settings.py
Python
bsd-3-clause
2,733
# Copyright 2012 VMware, 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 ...
igor-toga/local-snat
neutron/tests/unit/agent/l3/test_agent.py
Python
apache-2.0
131,795
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-13 19:06 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('payu', '0001_initial'), ] operations = [ migrations.AlterModelOptions( n...
michalwerner/django-payu-payments
payu/migrations/0002_auto_20160313_2006.py
Python
mit
463
# -*- coding: utf-8 -*- from h5_widgets import MultipleWidget class EntriesModel(ModelBase): name = 'entries' person_type = { 'customer':T('Customer'), 'supplier':T('Supplier'), } @staticmethod def person_type_selects(field, default, **attr): wgt = Multi...
francielsilvestrini/soupport
models/model_entries.py
Python
lgpl-3.0
4,223
class NoSuchEntry(Exception): """ If a requested entry in an SDTable by the user is not there, this exception is raised. .. moduleauthor:: Albert Heinle <[email protected]> """ def __init__(self, value): self.value = value def __str__(self): return repr(self.value)
symbolicdata/code
src/sdeval/classes/exceptions/NoSuchEntry.py
Python
gpl-3.0
319
# Copyright (c) 2016, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
VectorBlox/PYNQ
python/pynq/iop/pmod_tc1.py
Python
bsd-3-clause
7,493
#!/usr/bin/env python3 # Copyright (C) 2017 ASTRON (Netherlands Institute for Radio Astronomy) # P.O. Box 2, 7990 AA Dwingeloo, The Netherlands # # This file is part of the LOFAR software suite. # The LOFAR software suite is free software: you can redistribute it and/or # modify it under the terms of the GNU General P...
kernsuite-debian/lofar
MAC/Services/TaskManagement/Server/test/t_taskmanagement.py
Python
gpl-3.0
6,040
# -*- coding: utf-8 -*- # author: Pavel Studenik # email: [email protected] # created: 24.1.2014 # Author: Martin Korbel # Email: [email protected] # Date: 20.07.2014 import logging import shlex import time import traceback from datetime import datetime, timedelta from StringIO import StringIO from croniter impor...
alda519/GreenTea
apps/taskomatic/models.py
Python
gpl-2.0
7,270
from __future__ import unicode_literals from pygubu.builder.builderobject import * from pygubu.builder.ttkstdwidgets import TTKTreeviewBO, TTKTreeviewColBO from pygubu.builder.widgets.scrollbarhelper import TTKSBHelperBO from pygubu.widgets.editabletreeview import EditableTreeview class EditableTreeviewBO(TTKTreeview...
mhcrnl/pygubu
pygubu/builder/widgets/editabletreeview.py
Python
gpl-3.0
842
from fits-proc import FitsProc def main(): filename = 'n3923_shell1na.fits' image = FitsProc(filename) print 'Opened ' + filename # data = image.get_data() # print 'data:' # print data[:10][0] # image.edges() # print 'Finished fmfe.' #print 'data:' #print data[:10][0] mas...
castlest/shell-detection
fmfed/sub-mask.py
Python
bsd-3-clause
853
# 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 # # Unless required by applicable law or agree...
dan1/horizon-proto
horizon/base.py
Python
apache-2.0
37,055
""" Cleans the python cache folders in the application """ import utils utils.clean_caches(utils.PKG_DIR)
flatangle/flatlib
scripts/clean.py
Python
mit
111
from ..ir import IR from ..nodes import IdentifierExpr def add_tag(visitor, expr): assert len(expr.args) == 1, "add_tag_this_entity takes 1 argument" arg = visitor.visit_expression(expr.args[0]) assert isinstance(arg, IR.LiteralString), "Must be constant string" tag = arg.val cmd = 'tag @s add ' + ...
simon816/Command-Block-Assembly
c_comp/lib/entity.py
Python
mit
2,499
import logging import sys from logging.handlers import RotatingFileHandler from os import mkdir from os.path import exists import os from touchandgo.helpers import get_settings from touchandgo.settings import DEBUG def log_set_up(verbose=False): settings = get_settings() if not exists(settings.save_path): ...
zodman/touchandgo
touchandgo/logger.py
Python
gpl-3.0
1,246
# # Copyright (C) 2015 Man AHL # # 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 Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distribute...
einarhuseby/arctic
setup.py
Python
lgpl-2.1
5,282
# -*- coding: utf-8 -*- import pyDes import urllib import re from regexUtils import parseTextToGroups from javascriptUtils import JsFunctions, JsUnpacker, JsUnpackerV2, JsUnpacker95High, JsUnwiser, JsUnIonCube, JsUnFunc, JsUnPP, JsUnPush def encryptDES_ECB(data, key): data = data.encode() k = pyDes.des(key, py...
AMOboxTV/AMOBox.LegoBuild
plugin.video.SportsDevil/lib/utils/decryptionUtils.py
Python
gpl-2.0
7,957
import io import json import os import ssl import html5lib import py import pytest from selenium import webdriver from six import text_type from six.moves import urllib from wptserver import WPTServer HERE = os.path.dirname(os.path.abspath(__file__)) WPT_ROOT = os.path.normpath(os.path.join(HERE, '..', '..')) HARNES...
danlrobertson/servo
tests/wpt/web-platform-tests/resources/test/conftest.py
Python
mpl-2.0
8,402
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2018 # Leandro Toledo de Souza <[email protected]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
noam09/deluge-telegramer
telegramer/include/telegram/ext/stringregexhandler.py
Python
gpl-3.0
5,359
#Comments and Pound Characters #A comment,so you can read the program later. # Anything after the # is ignored by Python print('I can have clean code. How?')# Using Comments # print('I won\'nt run.') # Hide pieces of (broken)code. print('I will run.')
ingaizah/LearnPython3TheHardWay
ex2.py
Python
gpl-2.0
255
# NOTE: Please avoid the use of numpy.testing since NPYV intrinsics # may be involved in their functionality. import pytest, math, re import itertools from numpy.core._simd import targets from numpy.core._multiarray_umath import __cpu_baseline__ class _Test_Utility: # submodule of the desired SIMD extension, e.g. ...
anntzer/numpy
numpy/core/tests/test_simd.py
Python
bsd-3-clause
36,705
from flask import Flask from flask.ext.orientdb import OrientDB import unittest import pyorient class FlaskOrientDBTests(unittest.TestCase): @classmethod def setUpClass(cls): cls.app = Flask(__name__) cls.db_name = 'tdb' # set server password cls.password = "B0FC9CF1CBEAD07351C...
calthoff/flask-orientdb
test_flask_orientdb.py
Python
mit
7,905
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Petrophysical joint inversion ----------------------------- Joint inversion of different geophysical techniques helps to improve both resolution and interpretability of the resulting images. Different data sets can be directly coupled, if there is a link to an underlyi...
gimli-org/gimli
doc/examples/5_misc/plot_petro_joint_inv.py
Python
apache-2.0
7,081
class PurePath(object): def __new__(cls, *pathsegments): pass def __fspath__(self): pass class Path(PurePath): def __new__(cls, *pathsegments): pass
asedunov/intellij-community
python/testData/inspections/PyTypeCheckerInspection/PathLikePassedToStdlibFunctions/pathlib.py
Python
apache-2.0
187
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
rolandgeider/wger
extras/scripts/create_ingredients_from_foodfacts.py
Python
agpl-3.0
7,426
''' Problem: Given an unsorted array with repetitions, the task is to group multiple occurrence of individual elements. The grouping should happen in a way that the order of first occurrences of all elements is maintained. Technique: Create an Ordered dictionary with keys as elements as they appear a...
MayankAgarwal/GeeksForGeeks
group-multiple-occurrence-of-array-elements-ordered-by-first-occurrence.py
Python
apache-2.0
963
""" clp.py : simple python bindings to COIN-OR's CLP library """ import ctypes import numpy from numpy.ctypeslib import ndpointer import os OPTIMISATION_MODES = { 'primal' : 1, 'dual' : 1, 'barrier' : 2, } # you might want to change this ... _LIBRARY_PATH = os.path.join(os.path.dirname(__file__), 'libclp...
fcostin/clppy
clp.py
Python
bsd-2-clause
3,532
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates test runner factory and tests for instrumentation tests.""" import logging import os from pylib import constants from pylib import valgrind_to...
mdakin/engine
build/android/pylib/instrumentation/setup.py
Python
bsd-3-clause
4,043
from cherrypy.lib.static import serve_file import cherrypy import string import socket import random import time import os join = os.path.join _ssldir = join(os.environ['HOME'], '.hQuery') _sslcrt = join(_ssldir, 'hQuery.crt') _sslkey = join(_ssldir, 'hQuery.key') redirect = """\ <!DOCTYPE HTML> <html lang="en-US"> ...
HeinerTholen/Varial
varial_ext/hquery/server.py
Python
gpl-3.0
5,136
# -*- coding: utf-8 -*- # # Test links: # http://fileom.com/gycaytyzdw3g/random.bin.html from module.plugins.internal.XFSHoster import XFSHoster class FileomCom(XFSHoster): __name__ = "FileomCom" __type__ = "hoster" __version__ = "0.10" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?f...
rlindner81/pyload
module/plugins/hoster/FileomCom.py
Python
gpl-3.0
1,235
#!/usr/bin/python # coding=utf-8 """ Project MCM - Micro Content Management SDOS - Secure Delete Object Store Copyright (C) <2016> Tim Waizenegger, <University of Stuttgart> This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details. """ import logging,...
timwaizenegger/osecm-sdos
mcm/__init__.py
Python
mit
1,307
#!/usr/bin/env python import os, sys sys.path.append(os.path.abspath('.')) import pqaut.server as pqaut import sip import PyQt5.Qt as Qt class Root(Qt.QWidget): def __init__(self): def button_click(): label.setText('Button was clicked') sip.delete(button) super(Qt.QWidge...
garyjohnson/pqaut
test_apps/10_qwidget_app_deletes_button.py
Python
mit
819
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2015, TODAY Clouder SASU # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License # as published by ...
YannickB/odoo-hosting
clouder_asynchronous/__manifest__.py
Python
agpl-3.0
1,295
# pylint: disable=C0111,too-many-arguments,too-many-instance-attributes,too-many-locals,redefined-outer-name,fixme # pylint: disable=superfluous-parens, no-member, invalid-name import sys sys.path.insert(0, "../../python") import numpy as np import mxnet as mx # The interface of a data iter that works for bucketing # ...
linmajia/dlbench
tools/mxnet/rnn/new_bucket_io.py
Python
mit
15,450
# -*- coding: UTF-8 -*- from __future__ import unicode_literals, absolute_import from django.utils.encoding import python_2_unicode_compatible from django.test import TestCase # Create your tests here.
DamianMusiala/Biblioteka
shelf/tests.py
Python
mit
203
""" This is the same as the policy_gradient.py network except that instead of playing against a random opponent. It plays against previous versions of itself. It is first created with the weights from the "current_network.p" file, if no file is found there random weights are used. It then creates a series of copies of ...
DanielSlater/AlphaToe
policy_gradient_historical_competition.py
Python
mit
1,322
# -*- coding: UTF-8 -*- import re import requests import os import os.path BASE_URL = 'http://www.hatvp.fr' def mk_pdf_url(filename): return '%s/files/declarations/%s' % (BASE_URL, filename) def get_pdf_urls(full=True): """ Yield all PDF URLs from the website. If 'full' is falsy, only the PDF's fi...
bfontaine/PyTVP
scripts/get-pdfs.py
Python
mit
1,013
""" Utilities for handling 3D vectors, 2D intersections and geometry """ import copy import math import numpy as np def matrix_to_column_list(m): """ Expand a matrix to a list, column-major order """ return np.ravel(m, order='F').tolist() def normalized(v): """ Normalize an nd vector """ norm = np.l...
seanbell/opensurfaces
server/common/geom.py
Python
mit
10,815
# Copyright 2015 Huawei Technologies Co., Ltd. # # 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 agr...
pczerkas/aodh
aodh/hacking/checks.py
Python
apache-2.0
2,386
#!/usr/bin/env python # -*- coding: utf-8 -*- # feat-drift.py # Created on March 26, 2015. """ Plots diffs between feature files for multiple experiments. """ from __future__ import print_function from argparse import ArgumentParser from collections import OrderedDict import pickle import sys import numpy import plo...
srndic/hidost-reproduction
src/feat_drift.py
Python
gpl-3.0
4,393
""" Monkey patches for ``semantic_version.Version``. We never like monkey-patching, but for now this is easier than either vendoring or distributing our own fork. """ from invoke.vendor.six import text_type from semantic_version import Version def clone(self): """ Return a new copy of this Version object. ...
pyinvoke/invocations
invocations/packaging/semantic_version_monkey.py
Python
bsd-2-clause
1,115
#-*-coding: utf-8 -*- # Copyright 2012-2015 MoreTV Inc. # cobweb Client __version__ = "0.0.1" __author__ = "Kevin Ma"
moretv/cobweb
client/Cobweb/__init__.py
Python
gpl-2.0
120
# -*- coding: utf-8 -*- import re from core import httptools from core import scrapertools from core import servertools from core import tmdb from core.item import Item from platformcode import config, logger from channelselector import get_thumb from channels import filtertools from channels import autop...
alfa-jor/addon
plugin.video.alfa/channels/inkapelis.py
Python
gpl-3.0
21,116
from __future__ import absolute_import from django.db import models, router, transaction, DataError from sentry.constants import MAX_TAG_KEY_LENGTH from sentry.db.models import Model, BoundedPositiveIntegerField, BaseManager, sane_repr class GroupTagKey(Model): """ Stores a unique tag key name for a group. ...
mvaled/sentry
src/sentry/tagstore/legacy/models/grouptagkey.py
Python
bsd-3-clause
1,451
""" Unit tests for student optouts from course email """ import json from django.core import mail from django.core.management import call_command from django.urls import reverse from mock import Mock, patch from nose.plugins.attrib import attr from six import text_type from bulk_email.models import BulkEmailFlag, Opt...
BehavioralInsightsTeam/edx-platform
lms/djangoapps/bulk_email/tests/test_signals.py
Python
agpl-3.0
3,696
from pygame.locals import * SPRITE_FOLDER = 'sprites/sys/' # Settings CAPTION = 'Dennis Walking' SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 MODE = HWSURFACE COLOR_DEPTH = 32 # Sprite SPRITE_WIDTH = 80 SPRITE_HEIGHT = 80 SPRITE_CROP_WIDTH = 79 SPRITE_CROP_HEIGHT = 79
shonenada/dame
settings.py
Python
mit
268
#!/usr/bin/env python import datetime import ephem from nodes import Node class Pow(Node): """ Takes two items from the stack and raises a^b """ char = "^" args = 2 results = 1 @Node.test_func([3,2], [9]) @Node.test_func([2,-2], [0.25]) def func(self, a: Node.number, b: No...
muddyfish/PYKE
node/pow.py
Python
mit
2,097
""" * ******************************************************* * Copyright VMware, Inc. 2019. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL ...
tianhao64/vsphere-automation-sdk-python
samples/vsphere/oauth/exchange_access_id_token_for_saml.py
Python
mit
3,531
# Hidden Markov Model Implementation import pylab as pyl import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy as scp import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy #import hrl_lib.mayavi2_util as mu import hrl_lib.viz...
tapomayukh/projects_in_python
classification/Classification_with_HMM/Multiple_Contact_Classification/continuous_hmm_prediction_two_objects_force_20_states.py
Python
mit
11,013
""" System plugin Copyright (C) 2016 Walid Benghabrit 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. This program is distribu...
hkff/AccMon
accmon/plugins/system.py
Python
gpl-3.0
920
# -*- coding: utf-8 *-* from pyglet.window import key from pyglet import clock from . import util, physicalobject from . import resources class Ship(physicalobject.PhysicalObject): """A class for the player""" def __init__(self, thrust_image=None, *args, **kwargs): super().__init__(*args, **kwargs) ...
mammadori/asteroids
game/ship.py
Python
bsd-3-clause
3,293
# 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/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_route_filters_operations.py
Python
mit
27,222
#!/usr/bin/env python # -*- coding: utf-8 -*- import threading import time from Da import AppBase from Da import Config from Da import Updater from View import UpdateInfoView class Update : def __init__ (self) : self.app = AppBase.info self.Updater = Updater.Updater() self.Cfg = Config.Config() self.UdView ...
EvilCult/moviecatcher
Bl/Update.py
Python
mit
1,077
#!/usr/bin/env python import snmp_helper import time SNMP_COMMUNITY = 'galileo' SNMP_PORT = 161 IP1 = '184.105.247.70' IP2 = '184.105.247.71' oid_ccmHistoryRunningLastChanged = '1.3.6.1.4.1.9.9.43.1.1.1.0' oid_ccmHistoryRunningLastSaved = '1.3.6.1.4.1.9.9.43.1.1.2.0' oid_ccmHistoryStartupLastChanged = '1.3...
Paricitoi/python_4_eng
python_week3/week3_ex1.py
Python
gpl-3.0
1,013
import os import os.path import shutil rootdir = "C:\\Users\\郝宇\\Documents\\Git\\malicious-code-conceal\\3_2_multi_programmes_detect\\3_2_multi_programmes_detect\\" malicious_code_4_c = "C:\\Users\\郝宇\\Documents\\Git\\malicious-code-conceal\\2_hunatchab\\4_pthread_NoOutPut.c" malicious_code_4_h = "C:\\Users\\郝宇\\Docu...
ZHYfeng/malicious-code-conceal
3_2_multi_programmes_detect/script/for_apps_detect_hunatchab.py
Python
apache-2.0
1,860
# Task worker # Connects PULL socket to tcp://localhost:5557 # Collects workloads from ventilator via that socket # Connects PUSH socket to tcp://localhost:5558 # Sends results to sink via that socket # # Author: Lev Givon <lev(at)columbia(dot)edu> import sys import time import zmq context = zmq.Context() # Socket t...
nasa-nccs-cds/CDAS2
python/test/taskworker.py
Python
gpl-2.0
776
from django.contrib import admin from .models import Article, Category, BlogComment, Tag # Register your models here. admin.site.register([Article, Category, BlogComment, Tag])
tomming233/blog
app/admin.py
Python
mit
179
# Copyright (C) 2003 John Goerzen # <[email protected]> # # 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...
jabl/offlineimap
offlineimap/accounts.py
Python
gpl-2.0
14,372
""" TestCommon.py: a testing framework for commands and scripts with commonly useful error handling The TestCommon module provides a simple, high-level interface for writing tests of executable commands and scripts, especially commands and scripts that interact with the file system. All methods throw...
Distrotech/scons
QMTest/TestCommon.py
Python
mit
27,366
pages = [['http1', 'title1', 'body1'], ['http2', 'title2', 'body2'], ['http3', 'title3', 'body3']] #access a specific item in a list nested in a list print pages[0][0] #add things to the list #create the list holder extra = [] #append the elements extra.append('http4') extra.append('title4') extra.append('bod...
mwweinberg/china-daily-email
testing/list-learn.py
Python
mit
1,022
# Copyright (C) 2017 The YaCo Authors # # 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. # # This program is ...
DGA-MI-SSI/YaCo
tests/tests/test_push_pull.py
Python
gpl-3.0
1,576
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
pcrews/kewpie
xtrabackup_disabled/xb_part_range_test.py
Python
apache-2.0
9,023
from __future__ import unicode_literals import base64 import botocore.client import boto3 import hashlib import io import json import zipfile import sure # noqa from freezegun import freeze_time from moto import mock_lambda, mock_s3, mock_ec2, settings def _process_lamda(pfunc): zip_output = io.BytesIO() z...
heddle317/moto
tests/test_awslambda/test_lambda.py
Python
apache-2.0
14,853
#!/usr/bin/env python import sys # For debug, preference local install over all else if "DEBUG" in sys.argv: sys.path.insert(0, "../../") sys.path.insert(0, "../") sys.path.insert(0, ".") sys.argv.remove("DEBUG") import unittest import numpy import test_transped_parser from libgwas.data_parser import ...
edwards-lab/MVtest
tests/test_standardization.py
Python
gpl-3.0
10,404
from __future__ import unicode_literals import collections from spotifyconnect import utils __all__ = [ 'AudioBufferStats', 'AudioFormat', 'Bitrate', 'SampleType', ] class AudioBufferStats(collections.namedtuple( 'AudioBufferStats', ['samples', 'stutter'])): """Stats about the applica...
chukysoria/pyspotify-connect
spotifyconnect/audio.py
Python
apache-2.0
2,045