code stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 226 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k |
|---|---|---|---|---|---|
# Gradient Sliders
# Custom ControlP5 Compound Classes for percentage sliders
# For Processing in Python
import copy
add_library('controlP5')
class GradientController(object):
def __init__(self, colorList, cp5, sliderClass):
self.colorList = self.colorListFromColors(colorList)
self.cp5 = cp5
self.Slider = sl... | irlabs/BathroomTiles | GradientSliders.py | Python | mit | 12,149 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-03-26 22:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('origanization', '0001_initial'),
]
operations = [
migrations.AlterModelOptio... | DYWCn/mxonline | MXOnline/apps/origanization/migrations/0002_auto_20170326_2208.py | Python | mit | 772 |
def count_moves(a, x, y):
character = a[x][y]
if character == ".":
count = 0
rows = len(a)
columns = len(a[x])
# Top Check
if ((x - 2) >= 0) and (a[x - 1][y] == "o") and (a[x - 2][y] == "o"):
count += 1
# Bottom Check
if ((x + 2) < rows) and (a[x + 1][y] == "o") and (a[x + 2][y] == "o"):
count += ... | ehouarn-perret/EhouarnPerret.Python.Kattis | Trivial/Peg.py | Python | mit | 719 |
import os
from distutils.util import strtobool
def is_int(value):
"""
Verifies that 'value' is an integer.
"""
try:
int(value)
except ValueError:
return False
else:
return True
def is_float(value):
"""
Verifies that 'value' is a float.
"""
try:
... | INRA-LPGP/bio_tools | bio_tools/parameters/type_checks.py | Python | mit | 1,406 |
import shelve
shelve_name = "data"
def savePref(user, key, value):
d = shelve.open(shelve_name)
d[str(user) + '.' + str(key)] = value
d.close()
def openPref(user, key, default):
d = shelve.open(shelve_name)
if (str(user) + '.' + str(key)) in d:
return d[str(user) + '.' + str(key)]
e... | bronydell/VK-GFC-bot | saver.py | Python | mit | 348 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# 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 ... | hperala/kontuwikibot | mwparserfromhell/string_mixin.py | Python | mit | 4,073 |
# -*- coding: utf-8 -*-
# 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.
# ---------------------------------------------... | begoldsm/azure-data-lake-store-python | azure/datalake/store/utils.py | Python | mit | 5,211 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script para ejecutar PyTiger2C desde la linea de comandos.
"""
import os
import sys
import optparse
import subprocess
# Add the directory containing the packages in the source distribution to the path.
# This should be removed when Tiger2C is installed.
PACKAGES_DIR ... | yasserglez/pytiger2c | scripts/pytiger2c.py | Python | mit | 4,333 |
"""This module contains the detection code for integer overflows and
underflows."""
from math import log2, ceil
from typing import cast, List, Dict, Set
from mythril.analysis import solver
from mythril.analysis.report import Issue
from mythril.analysis.swc_data import INTEGER_OVERFLOW_AND_UNDERFLOW
from mythril.except... | b-mueller/mythril | mythril/analysis/modules/integer.py | Python | mit | 11,677 |
"""
This script computes Topic metrics for the end-to-end performance.
Precision and recall are micro-averaged.
Matching condition: only entities should match.
@author: Faegheh Hasibi (faegheh.hasibi@idi.ntnu.no)
"""
from __future__ import division
import sys
from collections import defaultdict
class EvaluatorTopic... | hasibi/TAGME-Reproducibility | scripts/evaluator_topics.py | Python | mit | 6,795 |
"""distutils.unixccompiler
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
* macros defined with -Dname[=value]
* macros undefined with -Uname
* include search directories specified with -Idir
* libraries specified with -lllib
* library... | Symmetry-Innovations-Pty-Ltd/Python-2.7-for-QNX6.5.0-x86 | usr/pkg/lib/python2.7/distutils/unixccompiler.py | Python | mit | 14,430 |
import os
import pkg_resources
from setuptools import setup, find_packages
setup(
name="clip",
py_modules=["clip"],
version="1.0",
description="",
author="OpenAI",
packages=find_packages(exclude=["tests*"]),
install_requires=[
str(r)
for r in pkg_resources.parse_requirement... | openai/CLIP | setup.py | Python | mit | 491 |
"""
Feature detection (Szeliski 4.1.1)
"""
import numpy as np
import scipy.signal as sig
import scipy.ndimage as ndi
from compvis.utils import get_patch
def sum_sq_diff(img_0, img_1, u, x, y, x_len, y_len):
"""
Returns the summed square difference between two image patches, using even
weighting across the... | pauljxtan/pystuff | pycompvis/compvis/feature/detectors.py | Python | mit | 6,800 |
#!/usr/bin/env python
try:
from setuptools import setup
except:
from distutils.core import setup
setup(name='natural',
version='0.2.0',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file im... | tehmaze/natural | setup.py | Python | mit | 1,143 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from egnyte import exc
from egnyte.tests.config import EgnyteTestCase
FOLDER_NAME = 'Iñtërnâtiônàlizætiøν☃ test'
DESTINATION_FOLDER_NAME = 'destination'
SUB_FOLDER_NAME = 'subfolder'
FILE_IN_FOLDER_NAME = 'test.txt'
FILE_CONTENT = b'TEST FILE CONTENT'
c... | egnyte/python-egnyte | egnyte/tests/test_folders.py | Python | mit | 2,749 |
"""Main Tornado app."""
from tornado import gen
from tornado.options import parse_command_line
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from tornado.web import Application
import logging
from tornado.options import options
from settings import settings
from urls import url_patterns
... | yoziru-desu/locomo-pebble | mock-server/app.py | Python | mit | 1,150 |
from django.conf.urls import url
from . import views
from .views import Clients
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^api/?$', Clients.as_view()),
url(r'^api/(?P<client_id>[0-9]+)/?$', Clients.as_view()),
] | tabalinas/jsgrid-django | clients/urls.py | Python | mit | 243 |
from __future__ import print_function
from pandas import compat
import warnings
import nose
from nose.tools import assert_equal
from datetime import datetime
import os
import numpy as np
import pandas as pd
from pandas import DataFrame, Timestamp
from pandas.io import data as web
from pandas.io.data import DataReader,... | dssg/wikienergy | disaggregator/build/pandas/pandas/io/tests/test_data.py | Python | mit | 17,790 |
# posting to: http://localhost:3000/api/articles/update/:articleid with title, content
# changes title, content
#
# id1: (darwinbot1 P@ssw0rd!! 57d748bc67d0eaf026dff431) <-- this will change with differing mongo instances
import time # for testing, this is not good
import requests # if not installed already, run python... | dubwub/F2016-UPE-AI | sample_AIs/darwinbot2.py | Python | mit | 1,018 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-26 08:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image
class Migration(migrations.Migration):
initial = True
dependencies = [
('cms', '0016_au... | rouxcode/django-cms-plugins | cmsplugins/headers/migrations/0001_initial.py | Python | mit | 2,379 |
"""
Given a binary tree, convert it to BST. The conversion should be done in such a way
that keeps the original structure of binary tree.
Input:
10
/ \
2 7
/ \
8 4
Output:
8
/ \
4 10
/ \
2 7
Input:
10
/ \
... | prathamtandon/g4gproblems | Graphs/binary_tree_to_bst.py | Python | mit | 1,610 |
#PART 1: Terminology
#1) Give 3 examples of boolean expressions.
#a) "apple" == "apple"
#b) 1 != 1
#c) 5 >= 6
#2) What does 'return' do?
#'Return' returns a value. It can be used after an calculation is
#executed. When the python interpreter solves a math problem, you can
#"return" the value back into the interpreter... | jaejun1679-cmis/jaejun1679-cmis-cs2 | cs2quiz2.py | Python | cc0-1.0 | 2,209 |
import logging
import datetime
import pandas as pd
import numpy as np
import os
import boto3
from dataactcore.config import CONFIG_BROKER
from dataactcore.interfaces.db import GlobalDB
from dataactcore.logging import configure_logging
from dataactcore.models.stagingModels import DetachedAwardProcurement
from dataactco... | fedspendingtransparency/data-act-broker-backend | dataactcore/scripts/delete_deleted_fpds_idv.py | Python | cc0-1.0 | 6,000 |
# -*- test-case-name: twisted.test.test_ssl -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
This module implements memory BIO based TLS support. It is the preferred
implementation and will be used whenever pyOpenSSL 0.10 or newer is installed
(whenever L{twisted.protocols.tls} is impor... | Kagami/kisa | lib/twisted/internet/_newtls.py | Python | cc0-1.0 | 8,938 |
###
# Copyright 2011 Diamond Light Source 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... | erwindl0/python-rpc | org.eclipse.triquetrum.python.service/scripts/scisoftpy/python/pycomparisons.py | Python | epl-1.0 | 1,127 |
# -*- coding:utf8 -*-
a = 3
b = 4
print a+b | LyanJin/J_lyan | New.py | Python | epl-1.0 | 44 |
"""
Experiment with bezier surface and bspline surface
"""
from OCC.gp import *
from OCC.Geom import *
from OCC.TColGeom import *
from OCC.TColgp import *
from OCC.TColStd import *
from OCC.GeomConvert import *
from OCC.BRepBuilderAPI import *
from OCC.TopoDS import *
from OCC.STEPControl import *
def bezier_surfa... | GeoMop/PythonOCC_Examples | src/bspline_surface_pure.py | Python | gpl-2.0 | 5,550 |
#!/usr/bin/env python
import os, kxg, pyglet
import tokens, gui, messages
class SandboxLoop (kxg.Loop):
def __init__(self):
world = tokens.World()
referee = tokens.Referee()
window = pyglet.window.Window()
actor = gui.Gui(window)
actor.setup_pregame()
actors_to_g... | kxgames/kingdoms-of-life | seacow.py | Python | gpl-2.0 | 5,188 |
from django.db import models
from edc_base.model.models.base_uuid_model import BaseUuidModel
from edc_meta_data.managers import CrfMetaDataManager
from edc_offstudy.models import OffStudyModelMixin
from edc_visit_tracking.models import CrfModelMixin
from .test_visit import TestVisit
class TestOffStudy(CrfModelMixin... | botswana-harvard/edc-testing | edc_testing/models/test_off_study.py | Python | gpl-2.0 | 605 |
#!/usr/bin/python
""" The report generator handles commands from the user to configure reports,
then obtains the data from the requested file,
then writes the report file.
"""
import rxt
import os
import sys
import locale
import traceback
import simpl
import simplejson
import time
import datetime
import csv
im... | xhan-shannon/SystemControlView | utils/ReportGenerator.py | Python | gpl-2.0 | 460,449 |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
LrsPlugin
A QGIS plugin
Linear reference system builder and editor
-------------------
begin : 2017-5-29
copyright ... | blazek/lrs | lrs/lrs/lrslayer.py | Python | gpl-2.0 | 3,504 |
#!/usr/bin/env python
import urllib2
import time
import random
import string
randstr = lambda n: ''.join(random.choice(string.ascii_letters + string.digits) for i in xrange(n))
def timing_attack(url, request_type="HEAD", data=None, headers=None, sleeptime = 3, cmd='() { :;}; PATH="/bin:/usr/bin:/usr/local/bin:$PATH" ... | SleepProgger/another_shellshock_test | shellshock_cgi.py | Python | gpl-2.0 | 2,092 |
"""THis module contains the core functions needed to compute pam models"""
import logging
import random
import bpy
import mathutils
import numpy
from . import constants
from . import grid
from . import model
from . import exceptions
from . import layer
from . import connection_mapping
from .mesh import *
import mul... | MartinPyka/Parametric-Anatomical-Modeling | pam/pam.py | Python | gpl-2.0 | 34,811 |
import datetime
import pytz
from config import settings
from lib.util_sqlalchemy import ResourceMixin
from snakeeyes.extensions import db
from snakeeyes.blueprints.billing.models.credit_card import CreditCard
from snakeeyes.blueprints.billing.models.coupon import Coupon
from snakeeyes.blueprints.billing.gateways.stri... | 26huitailang/bsawf | snakeeyes/blueprints/billing/models/subscription.py | Python | gpl-2.0 | 7,274 |
import re
from os.path import abspath
from build.project import Project
from build.zlib import ZlibProject
from build.meson import MesonProject
from build.cmake import CmakeProject
from build.autotools import AutotoolsProject
from build.ffmpeg import FfmpegProject
from build.openssl import OpenSSLProject
from build.bo... | dhocker/MPD | python/build/libs.py | Python | gpl-2.0 | 15,098 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"Fully test this module's functionality through the use of fixtures."
#
import megacosm
from flask.ext.testing import TestCase
import fakeredis
import fixtures
from megacosm import oneliners
import re
class MegacosmFlaskTestCast(TestCase):
def create_app(self):
... | CityGenerator/Megacosm-Generator | tests/test_oneliners.py | Python | gpl-2.0 | 25,299 |
##
# Copyright 2012-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | akesandgren/easybuild-framework | test/framework/module_generator.py | Python | gpl-2.0 | 69,283 |
# This file is part of Parti.
# Copyright (C) 2008, 2009 Nathaniel Smith <njs@pobox.com>
# Parti is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
import gtk
import wimpiggy.lowlevel
from wimpiggy.wm import Wm
from wimpiggy.keys import HotkeyMan... | njsmith/partiwm | parti/parti_main.py | Python | gpl-2.0 | 2,693 |
#!/usr/bin/env python
#Copyright 2009 Sebastian Hagen
# This file is part of liasis.
#
# liasis 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 ... | sh01/liasis | src/liasis/test/__init__.py | Python | gpl-2.0 | 709 |
"""fontTools.t1Lib.py -- Tools for PostScript Type 1 fonts
Functions for reading and writing raw Type 1 data:
read(path)
reads any Type 1 font file, returns the raw data and a type indicator:
'LWFN', 'PFB' or 'OTHER', depending on the format of the file pointed
to by 'path'.
Raises an error when the fi... | olivierdalang/stdm | third_party/FontTools/fontTools/t1Lib.py | Python | gpl-2.0 | 9,506 |
"""
"""
from __future__ import print_function
from ..misc import mkdir
from ..noise import estimate_noise_ps, estimate_noise_tv
from ..models import *
from ..stats import *
from math import log
import pyfits
import numpy as np
from copy import copy, deepcopy
def contiguous_regions(condition):
"""
Fin... | BayesFlare/bayesflare | bayesflare/finder/find.py | Python | gpl-2.0 | 45,609 |
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 23 04:56:43 2014
@author: aaron
"""
import os
import subprocess
import numpy as np
import config as cfg
def runCore_DTQW1D():
if cfg.TEST_MODE:
os.system("neblina -id %d HIPERWALK_TEMP_DTQW1D.nbl %d %d %d %d %d %d %d >> /dev/null "%(cfg.HARDWAREID,cfg.S... | hiperwalk/hpwalk | Archive/neblina.py | Python | gpl-2.0 | 22,919 |
#!/usr/bin/env python
import Pyro.core
import Pyro.naming
import string
import MySQLdb
import time
import random
import threading
try:
from phamerator import *
except:
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import alignmentDatabase
from errorHandler import *
import db_conf
... | byuphamerator/phamerator-dev | phamerator/phamServer_InnoDB.py | Python | gpl-2.0 | 16,847 |
from django import forms
from django.contrib.auth.forms import UserCreationForm
from .models import WhatTheUser
class RegistrationForm(UserCreationForm):
#first_name = forms.CharField()
#last_name = forms.CharField()
#email = forms.EmailField()
#password1 = forms.CharField()
#password2 = forms.Cha... | mikeshultz/whatthediff | whatthediff/forms.py | Python | gpl-2.0 | 818 |
import logging
import gevent
import nsq.master
import nsq.node_collection
import nsq.connection
_logger = logging.getLogger(__name__)
class Producer(nsq.master.Master):
def __init__(self, node_collection, tls_ca_bundle_filepath=None,
tls_auth_pair=None, compression=False, identify=None,
... | dsoprea/NsqSpinner | nsq/producer.py | Python | gpl-2.0 | 2,076 |
import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | xmendez/wfuzz | src/wfuzz/plugins/printers/printers.py | Python | gpl-2.0 | 13,472 |
#CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2015, Intel Corporation
#
#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; Version 2.
#
#This program is distributed in t... | naterh/chipsec | source/tool/chipsec/modules/common/secureboot/keys.py | Python | gpl-2.0 | 5,186 |
#!/usr/bin/python
# Exploit toolkit using shodan module for search exploit & host lookup
# Code : by jimmyromanticdevil
#
# Download :
# Before you run this code you must install shodan lib.
# $ wget [url]http://pypi.python.org/packages/source/s/shodan/shodan-0.4.tar.gz[/url]
# $ tar xvf shodan-0.2.tar.gz
# $ c... | ArioX/tools | shodan.py | Python | gpl-2.0 | 9,697 |
import os
import re
import time
import shutil
import pprint
import filecmp
import os.path
import tempfile
import unittest
import threading
import subprocess
from .fixtures import PACKAGESDIR
OUTPUTDIR = None
OUTPUTDIR_LOCK = threading.Lock()
def get_outputdir():
global OUTPUTDIR
if OUTPUTDIR:
return ... | rpm5/createrepo_c | acceptance_tests/tests/base.py | Python | gpl-2.0 | 12,537 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: NFM SCANNER
# Author: JED MARTIN
# Description: NFM SCANNER EXPERIMENT
# Generated: Tue Jan 31 21:07:35 2017
##################################################
if __name__ == '__main... | unclejed613/gnuradio-projects-rtlsdr | scanner/scanner.py | Python | gpl-2.0 | 14,567 |
from flask.cli import FlaskGroup
from app import app, db
cli = FlaskGroup(app)
@cli.command("create_db")
def create_db():
db.drop_all()
db.create_all()
db.session.commit()
if __name__ == "__main__":
cli()
| charmasaur/cw | appengine/manage.py | Python | gpl-2.0 | 227 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 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 option) any later... | dset0x/invenio-checker-old | invenio_checker/redis_helpers.py | Python | gpl-2.0 | 7,746 |
from element_tree import xml_compare_with_visitor, MyElementTree
from default_visitor import StdVisitor
import sys
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
if len(sys.argv) != 3:
sys.stderr.write("Usage: python %s oldfile newfile" % sys.argv[0])
else:
... | ZhaoYonggang198/xpdiff | __init__.py | Python | gpl-2.0 | 512 |
import unittest
import os
from katello.tests.core.action_test_utils import CLIOptionTestCase, CLIActionTestCase
from katello.tests.core.organization import organization_data
from katello.tests.core.template import template_data
import katello.client.core.template
from katello.client.core.template import Delete
from k... | iNecas/katello | cli/test/katello/tests/core/template/template_delete_test.py | Python | gpl-2.0 | 1,936 |
# Copyright (C) 2020 Red Hat, Inc., Jake Hunsaker <jhunsake@redhat.com>
# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU Gen... | TurboTurtle/sos | sos/policies/init_systems/systemd.py | Python | gpl-2.0 | 1,563 |
import numpy as np
import scipy
import scipy.linalg
import time
import os
import sys
def run_loaded_test(symbolcode, code1, code2, max_seconds=0.1):
env = {"np": np, "scipy": scipy, "scipy.linalg": scipy.linalg}
exec(symbolcode, env)
targets = env['targets']
env1 = env.copy()
env2 = env.copy()
... | davmre/matrizer | tests/test_generated_python.py | Python | gpl-2.0 | 2,452 |
# Copyright (C) 2010-2012 Red Hat, Inc.
# This work is licensed under the GNU GPLv2 or later.
# Test secret series command, check the set secret value, get secret value
import base64
from libvirttestapi.src import sharedmod
from xml.dom import minidom
from libvirt import libvirtError
required_params = ('secretUUID',... | libvirt/libvirt-test-API | libvirttestapi/repos/secret/setSecret.py | Python | gpl-2.0 | 2,012 |
#!/usr/bin/env python
# -*- coding: ISO-8859-15 -*-
#
# Copyright (C) 2005-2007 David Guerizec <david@guerizec.net>
#
# Last modified: 2006 Sep 02, 01:40:01 by david
#
# 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... | OutOfOrder/sshproxy | lib/console_extra/__init__.py | Python | gpl-2.0 | 1,214 |
import pokemon
import random
import re
import display
class Batalha:
def __init__(self, pokeList = []):
self.display = display.Display()
self.pkmn = []
if (len(pokeList) == 0):
self.pkmn.append(pokemon.Pokemon())
self.pkmn.append(pokemon.Pokemon())
else:
self.pkmn = pokeList
self.turno = self.Ini... | QuartetoFantastico/projetoPokemon | batalha.py | Python | gpl-2.0 | 4,953 |
#-*- coding: utf-8 -*-
import urllib,re,string,urlparse,sys,os
import xbmc, xbmcgui, xbmcaddon, xbmcplugin
from resources.libs import main
#Mash Up - by Mash2k3 2012.
addon_id = 'plugin.video.movie25'
selfAddon = xbmcaddon.Addon(id=addon_id)
art = main.art
prettyName = 'MailRu'
MAINURL='http://api.video.mail.ru/video... | noba3/KoTos | addons/plugin.video.movie25/resources/libs/plugins/mailru.py | Python | gpl-2.0 | 4,583 |
## @package patTuple
# Configuration file to produce PAT-tuples and ROOT-tuples for X->HH->bbTauTau analysis.
#
# \author Claudio Caputo
#
# Copyright 2015
#
# This file is part of X->HH->bbTauTau.
#
# X->HH->bbTauTau is free software: you can redistribute it and/or modify
# it under the terms of the GNU General ... | hh-italian-group/h-tautau | Studies/python/ttbarGenStudies_cfg.py | Python | gpl-2.0 | 8,374 |
###############################################################################
# #
# Copyright 2019. Triad National Security, LLC. All rights reserved. #
# This program was produced under U.S. Government contract 89233218CNA000001 #
... | CSD-Public/stonix | src/stonix_resources/rules/CheckPartitioning.py | Python | gpl-2.0 | 6,607 |
# -*- coding: utf-8 -*-
"""
* Copyright (c) 2017 SUSE LLC
*
* openATTIC 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 package is distributed in the hope that it will be useful... | openattic/openattic | backend/volumes/migrations/0002_remove.py | Python | gpl-2.0 | 5,838 |
import paramiko
ses_dict={}
sesiones=[]
upr=[]
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('yvasa850', username='e449806', password='Ema84nue')
chan = ssh.invoke_shell()
# Ssh and wait for the password prompt.
chan.send('su - mwpsyz01 \n')
buff = ''
#i=0
while n... | eldie1984/Scripts | pg/pruebas/prueba_ses.py | Python | gpl-2.0 | 1,904 |
#!/usr/bin/env python3
# Needs pyserial module!
# And crc16!
import crc16
import serial
ser = serial.Serial()
ser.baudrate = 9600
ser.port = '/dev/ttyUSB0'
ser.open()
SLIP_END = 0xC0
SLIP_ESC = 0xDB
SLIP_ESC_END = 0xDC
SLIP_ESC_ESC = 0xDD
def slip_decode(buf):
out = bytearray()
i = 0
while i < len(buf)... | RockinRoel/standaert-ha | scripts/logger.py | Python | gpl-2.0 | 1,612 |
# CubiCal: a radio interferometric calibration suite
# (c) 2017 Rhodes University & Jonathan S. Kenyon
# http://github.com/ratt-ru/CubiCal
# This code is distributed under the terms of GPLv2, see LICENSE.md for details
from __future__ import print_function
import numpy as np
from numpy.ma import masked_array
from cubi... | ratt-ru/CubiCal | cubical/machines/ifr_gain_machine.py | Python | gpl-2.0 | 8,532 |
# -*- coding: utf-8 -*-
##############################################################################
# 2011 E2OpenPlugins #
# #
# This file is open source software; you can redistribute... | svox1/e2openplugin-OpenWebif | plugin/controllers/models/info.py | Python | gpl-2.0 | 22,829 |
#!/usr/bin/env python2
""" This is the main module, used to launch the persistency engine """
#from persio import iohandler
import persui.persinterface as ui
def main():
""" Launches the user interface, and keeps it on."""
interface = ui.Persinterface()
while True:
interface.run()
if __name__ == ... | jepio/pers_engine | persengine.py | Python | gpl-2.0 | 733 |
from .adsobinapi import adsobin, adsowritebin
__all__ = ["adsobin", "adsowritebin"]
| Simularia/arinfopy | arinfopy/__init__.py | Python | gpl-2.0 | 85 |
# -*- coding: utf-8 -*-
"""QGIS Unit tests for the OGR/GPKG provider.
.. note:: 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.... | wbyne/QGIS | tests/src/python/test_provider_ogr_gpkg.py | Python | gpl-2.0 | 6,014 |
# ~*~ coding: utf-8 ~*~
import os
import re
import pytz
from django.utils import timezone
from django.shortcuts import HttpResponse
from .utils import set_current_request
class TimezoneMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
... | liuzheng712/jumpserver | apps/jumpserver/middleware.py | Python | gpl-2.0 | 1,668 |
#!/usr/bin/env python
from brain.srv import *
import rospy
def handle_grip_loc():
print "returning grip location"
return GripLocResponse([-1,-1,-1])
def handle_move(piece, dest):
print "moving piece from " + str(piece) + " to " + str(goal)
return 0
def arm_server():
rospy.init_node('arm_server')... | bandi13/cs980-ROS-bot | ROS_ws/src/brain/scripts/arm-stub.py | Python | gpl-2.0 | 525 |
import os
import json
import numpy as np
try:
from numba.pycc import CC
cc = CC('calculate_numba')
except ImportError:
# Will use these as regular Python functions if numba is not present.
class CCSubstitute(object):
# Make a cc.export that doesn't do anything
def export(*args, **kwar... | ConservationInternational/ldmp-qgis-plugin | LDMP/calculate_numba.py | Python | gpl-2.0 | 4,469 |
def convertFile(binary_filename, header_filename, variable_name):
with open(binary_filename, 'rb') as b:
with open(header_filename, 'w') as h:
h.write('''static const unsigned char %s[] = { ''' % variable_name);
stuff = b.read()
h.write(',\n'.join('%d' % ord(stuff[i:i+1])... | droundy/bigbro | build/binary2header.py | Python | gpl-2.0 | 516 |
#
# Copyright (C) 2010 Norwegian University of Science and Technology
# Copyright (C) 2011-2015 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by
# ... | sigmunau/nav | python/nav/portadmin/snmputils.py | Python | gpl-2.0 | 31,038 |
INT_MAX = 2**31-1
INT_MIN = -INT_MAX-1
"""
Tuples of:
* Test file name without extension
* Initialization expression(s) (e.g. variable declarations)
* Expression for return statement
* Expected answer
"""
test_tuples = [
# constant
("positive_constant... | Valtis/YATCP | tests/programs/test_programs/generated_arithmetic_expression_tests_integers/_generate_tests.py | Python | gpl-2.0 | 26,983 |
from scipy.integrate import cumtrapz
from scipy.interpolate import interp1d
from scipy.stats import uniform
def sample_via_cdf(x, p, nsamp):
# get normalized cumulative distribution
cdf = cumtrapz(p, x, initial=0)
cdf = cdf/cdf.max()
# get interpolator
interp = interp1d(cdf, x)
# get uniform sa... | amaggi/bda | chapter_03/sample_via_cdf.py | Python | gpl-2.0 | 402 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# Copyright (C) 2004-2005 Eero Tamminen
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2008 Peter Landgren
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012-2016 Paul Franklin
#
# This program i... | dermoth/gramps | gramps/plugins/drawreport/statisticschart.py | Python | gpl-2.0 | 47,903 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2009-2010 Craig J. Anderson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the... | Forage/Gramps | gramps/plugins/drawreport/descendtree.py | Python | gpl-2.0 | 66,269 |
#!/usr/bin/env python
"""
killMS, a package for calibration in radio interferometry.
Copyright (C) 2013-2017 Cyril Tasse, l'Observatoire de Paris,
SKA South Africa, Rhodes University
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published ... | saopicc/killMS | killMS/__init__.py | Python | gpl-2.0 | 1,298 |
# encoding: utf-8
# module readline
# from /usr/lib/python3.4/lib-dynload/readline.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
""" Importing this module enables command line editing using GNU readline. """
# no imports
# functions
def add_history(string): # real signature unknown; restored from __doc__
"... | ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/readline.py | Python | gpl-2.0 | 6,031 |
import csv
import getpass
import io
import sqlite3
import json
import requests
import re
import urllib.request
import os
from geopy.geocoders import GoogleV3
from serveza.app import app
from serveza.db import db
from serveza.settings import PROJECT_ROOT, DB_PATH
from pprint import pprint
from bs4 import BeautifulSoup
... | Serveza/Server | serveza/scripts/resetdb.py | Python | gpl-2.0 | 3,940 |
#!/usr/bin/env python
##############################################################################
# This program is part of zenpacklib, the ZenPack API.
# Copyright (C) 2013-2015 Zenoss, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Lic... | argaliev/ZenPacks.community.HPiLO | ZenPacks/community/HPiLO/zenpacklib.py | Python | gpl-2.0 | 240,964 |
## This file is part of Invenio.
## Copyright (C) 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 option) any later versio... | PXke/invenio | invenio/legacy/bibcatalog/templates.py | Python | gpl-2.0 | 3,365 |
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import scipy.interpolate
from PIL import Image
matplotlib.use('Qt5Agg')
class matplotFF():
"""A class for plotting far-field measurements of lasers. It requires
the 'x z signal' format, but supports stitched measurements — the data
can b... | alkamid/lab-scripts | matplotlib-scripts/matplotFF.py | Python | gpl-2.0 | 9,814 |
__author__ = 'jkonieczny'
from books.models import *
import random
import datetime
from django.core.management.base import BaseCommand, CommandError
_names1 = [
"JAKUB",
"KACPER",
"SZYMON",
"MATEUSZ",
"FILIP",
"MICHAŁ",
"BARTOSZ",
"WIKTOR",
"PIOTR",
"DAWID",
"ADAM",
"M... | Razi91/BiblioTeKa | manage/management/commands/randoms.py | Python | gpl-2.0 | 5,194 |
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# kaizen - Continuously improve, build and manage free software
#
# Copyright (C) 2011 Björn Ricks <bjoern.ricks@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as publishe... | bjoernricks/kaizen | kaizen/phase/phase.py | Python | gpl-2.0 | 2,714 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# sin título.py
#
# Copyright 2012 Jesús Hómez <jesus@soneview>
#
# 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; ei... | jehomez/pymeadmin | prueba_de_inventario.py | Python | gpl-2.0 | 1,191 |
from django.conf.urls import patterns
urlpatterns = patterns('mirrors.views',
(r'^$', 'mirrors', {}, 'mirror-list'),
(r'^status/$', 'status', {}, 'mirror-status'),
(r'^status/json/$', 'status_json', {}, 'mirror-status-json'),
(r'^status/tier/(?P<tier>\d+)/$', ... | archhurd/archweb | mirrors/urls.py | Python | gpl-2.0 | 436 |
# Copyright (C) 2009, Lorenzo Berni
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the... | pdubroy/kurt | build/MacOS/PyInstaller/pyinstaller-svn-r812/hooks/django-import-finder.py | Python | gpl-2.0 | 2,102 |
#!/usr/bin/env python
from sys import path
import os.path
thisrep = os.path.dirname(os.path.abspath(__file__))
path.append(os.path.dirname(thisrep))
from random import randint
from pygame import *
from pygame import gfxdraw
from EasyGame import pathgetter,confirm
controls = """hold the left mouse button to draw
d = u... | PWr-Projects-For-Courses/SystemyWizyjne | toolbox/example/poly.py | Python | gpl-2.0 | 1,791 |
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------
# Portello membership system
# Copyright (C) 2014 Klubb Alfa Romeo Norge
#
# 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
# t... | KlubbAlfaRomeoNorge/members | constants.py | Python | gpl-2.0 | 1,596 |
# Patchwork - automated patch tracking system
# Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org>
# Copyright (C) 2015 Intel Corporation
#
# This file is part of the Patchwork package.
#
# Patchwork is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | ivyl/patchwork | patchwork/models.py | Python | gpl-2.0 | 33,987 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 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 optio... | kasioumis/invenio | invenio/modules/workflows/views/holdingpen.py | Python | gpl-2.0 | 16,341 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/base.py | Python | gpl-2.0 | 29,451 |
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 28 15:19:03 2015
@author: David Verelst
"""
from __future__ import print_function
import unittest
import numpy as np
import ExampleArray as lib
class TestExample(unittest.TestCase):
def setUp(self):
pass
def do_array_stuff(self, ndata):
x =... | davidovitch/f90wrap | examples/example-arrays/tests.py | Python | gpl-2.0 | 1,524 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2021 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 option) any later... | CERNDocumentServer/cds-videos | cds/modules/flows/errors.py | Python | gpl-2.0 | 1,558 |
# -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | felipenaselva/felipe.repository | script.module.placenta/lib/resources/lib/sources/en/to_be_fixed/sitedown/savaze.py | Python | gpl-2.0 | 4,194 |
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset: 4 -*-
import ConfigParser
import contextlib
import os
import platform
import pytest
import re
import subprocess
import sys
import telnetlib # nosec
# To use another host for running the tests, replace this IP address.
remote_ip = '10.1.2.30'
# To use anothe... | huiyiqun/check_mk | agents/windows/it/remote.py | Python | gpl-2.0 | 6,472 |
from api import *
simulaUnDia()
| juanAFernandez/project-S | mongoDBAPI/try.py | Python | gpl-2.0 | 32 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.