code stringlengths 2 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
#!/usr/bin/env python
"""
For the moment we're not using this, but it would be nice to do so
at some point. It isn't really relevant to the researcher RDF export, the
idea would be to export details of a web-presence, to compile a complete directory
of websites in the Medical Sciences Division.
"""
... | envycontent/msd.rdfexport | msd/rdfexport/researcher/helper/webpresence.py | Python | gpl-2.0 | 1,575 |
#!/usr/bin/env python
'''
BlueBanana Rat Config Decoder
'''
__description__ = 'BlueBanana Rat Config Extractor'
__author__ = 'Kevin Breen http://techanarchy.net http://malwareconfig.com'
__version__ = '0.1'
__date__ = '2014/04/10'
#Standard Imports Go Here
import os
import sys
import string
from zipfile import ZipFi... | 1ookup/RATDecoders | BlueBanana.py | Python | gpl-2.0 | 3,304 |
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
ledpin = 18
GPIO.setup(ledpin, GPIO.OUT)
try:
while True:
GPIO.output(ledpin, 1)
time.sleep(0.5)
GPIO.output(ledpin, 0)
time.sleep(0.5)
except KeyboardInterrupt:
GPIO.cleanup()
| VA3SFA/rpi_hw_demo | led/blink.py | Python | gpl-2.0 | 312 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2013 Martijn Kaijser
#
# 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 ... | SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/script.artwork.downloader/lib/common.py | Python | gpl-2.0 | 1,305 |
# coding=utf-8
"""
Widgets Module
"""
__author__ = 'Matt Eland'
| IntegerMan/Pi-MFD | PiMFD/UI/Widgets/__init__.py | Python | gpl-2.0 | 66 |
#!/usr/bin/python3
# requires:
# - pysocks for socks5 proxy socket, required by requesocks
# - certifi for HTTPS certificate validation, also used in depths of requesocks
# - requesocks
import requesocks
import certifi
#SOCKS5_PROXY = '127.0.0.1:9050'
SOCKS5_PROXY = '192.168.20.1:9050'
USER_AGENT = 'Mozilla/5.0 (W... | minlexx/xnovacmd | tests/test_requesocks.py | Python | gpl-2.0 | 1,339 |
#!/usr/bin/python
# -*- coding: UTF-8, tab-width: 4 -*-
# Python Coding Style: http://docs.python.org/tutorial/controlflow.html#intermezzo-coding-style
# Command Line Arguments Parser: http://docs.python.org/library/argparse.html
from __future__ import division
from sys import argv, stdout, stderr
from codecs import... | mk-pmb/heidisql-ubuntu-util | cfg.unpack.py | Python | gpl-2.0 | 3,798 |
#!/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'eduardo'
import unittest
import os
import os.path
import cocar.tests
from ..session import Host, SnmpSession, NmapSession
from ..model import network
from .. import utils
class TestDiscover(unittest.TestCase):
"""
Testa descoberta de ativos de rede util... | lightbase/cocar-agente | cocar/tests/test_discover.py | Python | gpl-2.0 | 2,936 |
__author__ = 'herald olivares'
# -*- coding: utf-8 -*-
from django.contrib import admin
from upc.sunat.models import Person, Concept, Debt
class PersonAdmin(admin.ModelAdmin):
list_display = ('name', 'ruc', 'phone', 'type')
class ConceptAdmin(admin.ModelAdmin):
pass
class DebtAdmin(admin.ModelAdmin):
li... | heraldmatias/dew | django-sunat/src/upc/sunat/admin.py | Python | gpl-2.0 | 532 |
# -*- coding: utf-8 -*-
import codecs
import json
import unittest
from pkg_resources import resource_filename
from calmjs.parse import es5
class ExamplesTestCase(unittest.TestCase):
"""
A test case that automatically load the examples JS module into the
data attribute for the test instance, and to provi... | calmjs/nunja.stock | src/nunja/stock/testing/case.py | Python | gpl-2.0 | 1,097 |
"""
Collection of tools for the IQTools library
Xaratustrah
2017
"""
import os
import logging as log
from scipy.signal import hilbert
from scipy.io import wavfile
import xml.etree.ElementTree as et
import numpy as np
import types
import uproot3
import uproot3_methods.classes.TH1
from iqtools.iqbase import IQBase
fr... | xaratustrah/iq_suite | iqtools/tools.py | Python | gpl-2.0 | 10,337 |
#!/usr/bin/python
import os
import shutil
import zipfile
import zlib
import os.path
def _ignore(src, name ):
if src == './UPLOAD/':
print name
return ['RESTDIR', 'conf.inc.php', 'Nuked-Klan.zip', '.hg', 'make.py']
else:
return []
def _RecImport(src, dst, zip):
elements = os.listdir... | donaldinou/nuked-gamer | make.py | Python | gpl-2.0 | 988 |
# Calliope
# Copyright (C) 2017, 2018 Sam Thursfield <sam@afuera.me.uk>
#
# 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 versio... | ssssam/calliope | tests/conftest.py | Python | gpl-2.0 | 872 |
#!/usr/bin/python3
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# 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 y... | odahoda/noisicaa | noisicaa/value_types/key_signature_test.py | Python | gpl-2.0 | 1,559 |
from functools import partial
from navmazing import NavigateToSibling, NavigateToAttribute
from cfme import Credential
from cfme.exceptions import CandidateNotFound, OptionNotAvailable
import cfme.fixtures.pytest_selenium as sel
import cfme.web_ui.toolbar as tb
from cfme.web_ui import (
AngularSelect, Form, Selec... | jdemon519/cfme_tests | cfme/configure/access_control.py | Python | gpl-2.0 | 24,877 |
# -*- coding: utf-8 -*-
"""
Catch-up TV & More
Copyright (C) 2019 SylvainCecchetto
This file is part of Catch-up TV & More.
Catch-up TV & More 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 Foundat... | SylvainCecchetto/plugin.video.catchuptvandmore | plugin.video.catchuptvandmore/resources/lib/channels/fr/alsace20.py | Python | gpl-2.0 | 7,749 |
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | autotest/arc | setup.py | Python | gpl-2.0 | 1,316 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('subscriptions', '0001_initial'),
]
operations = [
migrations.AlterUniqueTogether(
name='personalarticle',
un... | aaronkurtz/gourmand | gourmand/subscriptions/migrations/0002_make_unique_per_user.py | Python | gpl-2.0 | 516 |
# This file is part of Invenio.
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2017 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 o... | CERNDocumentServer/invenio | modules/websubmit/lib/functions/Print_Success_SRV.py | Python | gpl-2.0 | 1,933 |
import uuid
import time
from hashlib import md5
from ..json_store import LoginTokenStore
__author__ = 'bromix'
class AccessManager(object):
def __init__(self, context):
self._settings = context.get_settings()
self._jstore = LoginTokenStore()
self._json = self._jstore.get_data()
... | kreatorkodi/repository.torrentbr | plugin.video.youtube/resources/lib/youtube_plugin/kodion/utils/access_manager.py | Python | gpl-2.0 | 12,104 |
# This configuration was automatically generated by install.sh
from os.path import dirname, join as path_join
# This configuration file specifies the global setup of the brat
# server. It is recommended that you use the installation script
# instead of editing this file directly. To do this, run the following
# command... | DiscourseDB/discoursedb-core | composeddb/brat/config.py | Python | gpl-2.0 | 3,622 |
#!/usr/bin/python
from body3 import *
function_decl(link='extern',srcp='eval.c:216',
body=bind_expr(
body=statement_list(
E0=decl_expr(
ftype=void_type(algn='8',name='126')),
E1=decl_expr(
ftype=void_type(algn='8',name='126')),
E2=modify_expr(
OP0=var_decl(algn='32',srcp=... | h4ck3rm1k3/gcc_py_introspector | data/body4.py | Python | gpl-2.0 | 6,023 |
from ggrade import read_tab_file
import argparse
################################################################################
################################################################################
def main():
# Parse the input arguments
parser = argparse.ArgumentParser()
parser.add_argument... | mattbellis/ggrade | scripts/parse_response_file.py | Python | gpl-2.0 | 2,923 |
#
# Copyright (c) 2004 Conectiva, Inc.
# Copyright (c) 2005--2013 Red Hat, Inc.
#
# From code written by Gustavo Niemeyer <niemeyer@conectiva.com>
# Modified by Joel Martin <jmartin@redhat.com>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager is free software; you can redistribute it and/or
# m... | PaulWay/spacewalk | client/solaris/smartpm/smart/interfaces/up2date/interface.py | Python | gpl-2.0 | 19,239 |
# -*- coding: cp1254 -*-
# please visit http://www.iptvxtra.net
import xbmc,xbmcgui,xbmcplugin,sys
icondir = xbmc.translatePath("special://home/addons/plugin.audio.radio7ulm/icons/")
plugin_handle = int(sys.argv[1])
def add_video_item(url, infolabels, img=''):
listitem = xbmcgui.ListItem(infolabels['title'], icon... | noba3/KoTos | addons/plugin.audio.radio7ulm/default.py | Python | gpl-2.0 | 1,255 |
#
# Utility functions for the command line drivers
#
# Copyright 2006-2007, 2013, 2014 Red Hat, Inc.
# Jeremy Katz <katzj@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either ver... | Akasurde/virt-manager | virtinst/cli.py | Python | gpl-2.0 | 79,481 |
"""
WSGI config for elmolino project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "elmolino.settings")
from django.core... | palichis/elmolino | elmolino/wsgi.py | Python | gpl-2.0 | 391 |
from django.core.urlresolvers import resolve
from django.template.loader import render_to_string
from django.test import TestCase
from django.http import HttpRequest
from django.utils.html import escape
from unittest import skip
from lists.views import home_page
from lists.models import Item, List
from lists.forms im... | joshsmith2/superlists | lists/tests/test_views.py | Python | gpl-2.0 | 5,826 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-01-10 22:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dns', '0002_auto_20151228_0134'),
]
operations = [
migrations.CreateModel(
... | garncarz/dns-server | dns/migrations/0003_redirection.py | Python | gpl-2.0 | 640 |
import os,sys,cv2,pdb
from sklearn.decomposition import TruncatedSVD
from pylab import *
def get_feature(imgpath):
img = cv2.imread(imgpath,0)
img = cv2.resize(img,(32,64))
img = np.float32(img)
img = img / 255
img = np.reshape(img, (1,32*64))
return img
def extract_sample_from_image(imgdir):
... | z01nl1o02/tests | learn_svd.py | Python | gpl-2.0 | 1,675 |
import fsui
class TextArea(fsui.TextArea):
pass
| FrodeSolheim/fs-uae-launcher | workspace/ui/text_area.py | Python | gpl-2.0 | 54 |
from ctypes import *
import ctypes
from ctypes.wintypes import *
from _ssl import SSLError
import sys
CRYPT32 = windll.Crypt32
SCHANNEL = windll.SChannel
# Lots of "Magic" constants, mainly from schannel.h
SCH_CRED_NO_SYSTEM_MAPPER = 0x00000002
SCH_CRED_NO_DEFAULT_CREDS = 0x00000010
SCH_CRED_REVOCATION_CHECK_CHAIN... | lsowen/pySchannelSSL | sslcontext.py | Python | gpl-2.0 | 19,919 |
#! /usr/bin/env python
"""
##############################################################################
##
##
## @Name : graphicsRequestBroker.py
##
##
## @author : Nicholas Lemay
##
## @since : 2007-06-28, last updated on 2008-04-23
##
##
## @license : MetPX Copyright (C) 2004-2006 Environment Canada
## ... | khosrow/metpx | pxStats/bin/webPages/graphicsRequestBroker.py | Python | gpl-2.0 | 8,456 |
from django.db import models
# Create your models here.
class Tipo_Vehiculo(models.Model):
"""docstring for Tipo_Vehiculo"""
def __init__(self, *args, **kwargs):
super(Tipo_Vehiculo, self).__init__(*args, **kwargs)
tipo_vehiculo = models.CharField(max_length=100, unique=True)
adicional1 = mode... | jrmendozat/mtvm | Vehiculo/models.py | Python | gpl-2.0 | 2,597 |
#! /usr/bin/env python
import unittest
import time
from Communication import Communication
class CommunicationTest(unittest.TestCase):
def setUp(self):
'''
Verify environment is setup properly.
'''
self.controller = Communication()
self.b_list = self.controller.get_blu... | mparra-mpz/CURIOSITY | CURIOSITY/test/CommunicationTest.py | Python | gpl-2.0 | 1,149 |
import xbmc
import xbmcgui
import xbmcaddon
import xbmcplugin
import sys
import urllib
import shows
import settings
def menu(handle):
total_items = 4
addDirectory(handle, 'All', 14, True, settings.addon_path + '/manage.png', total_items)
addDirectory(handle, 'Continuing', 14, True, settings.addon_path + '... | Hiltronix/plugin.video.sickrage | resources/lib/show_filter.py | Python | gpl-2.0 | 1,116 |
import time
import numpy
from golib.config.golib_conf import gsize, B, W, E
import camkifu.stone
from camkifu.core import imgutil
class StonesFinderTuto(camkifu.stone.StonesFinder):
""" This class has been used to write a tutorial on how to create a new StonesFinder.
Run Camkifu with this class as the defa... | ArnaudPel/CamKifu | src/camkifu/stone/sf_tuto.py | Python | gpl-2.0 | 3,397 |
from Adafruit_ADS1x15 import ADS1x15 as A2DObject
from functools import partial
# create AI channel objects
class aiChannel:
def __init__(self,confDict):
#open connection on physicalChannel
self.name = confDict['labelText']
self.i2cAddress = confDict['i2cAddress']
self.connectionT... | stevens4/rover3 | lowLevelLibrary.py | Python | gpl-2.0 | 9,709 |
# Copyright (c) 2007-2009 Citrix Systems 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; version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... | mcclurmc/xcp-console | XSConsoleConfig.py | Python | gpl-2.0 | 2,099 |
#!/usr/bin/env python3
"""
Author: Kartamyshev A.I. (Darth Feiwante)
"""
def inherit_icalc_isotropic(new_structure = '', start_new_version = None, base_calculation = (None, None, None), database = None, min_mult = 1, max_mult = 1, num_points = 2, geo_folder = '', it_folder = '', override = False):
"""
This f... | dimonaks/siman | siman/structure_functions.py | Python | gpl-2.0 | 8,328 |
import ArtusConfigBase as base
def config():
conf = base.BaseConfig('mc', '2012', analysis='ee')
conf["InputFiles"] = base.setInputFiles(
ekppath="",
nafpath="/pnfs/desy.de/cms/tier2/store/user/dhaitz/2014_08_08_data_QCD/kappa_QCD_170-250_*.root"
)
conf['EnableLumiReweighting'] = True
... | dhaitz/CalibFW | cfg/artus/background_ee_qcd_170-250.py | Python | gpl-2.0 | 497 |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... | AndrewPeelMV/Blender2.78c | 2.78/scripts/addons/blender_cloud/texture_browser.py | Python | gpl-2.0 | 38,526 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012 Zuza Software Foundation
#
# This file is part of Pootle.
#
# 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 t... | arky/pootle-dev | pootle/runner.py | Python | gpl-2.0 | 6,998 |
# #
# Copyright 2009-2015 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://vscentrum.be/nl/en),
# the Hercules foundation (ht... | torbjoernk/easybuild-framework | easybuild/framework/easyblock.py | Python | gpl-2.0 | 93,981 |
# -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2013, 2019-2020 Laurent Monin
# Copyright (C) 2014, 2017 Sophist-UK
# Copyright (C) 2017 Sambhav Kothari
# Copyright (C) 2018 Wieland Hoffmann
# Copyright (C) 2018-2019 Philipp Wolfer
#
# This program is free software; you can ... | musicbrainz/picard | test/test_bytes2human.py | Python | gpl-2.0 | 4,925 |
import math
from math import *
#We have put this in the same order as the types in the LeapSDK.
finger_names = ['thumb', 'index', 'middle', 'ring', 'pinky']
'''
Function that returns the palm orientation
@hand: the hand that we're analysing.
'''
def palmOrientation (hand):
palmNormal = hand.palm_normal
y = pa... | LuisSuall/Sleight_of_hand | Finger_run_II/utils/extendedHand.py | Python | gpl-2.0 | 1,259 |
#=====================================================
# Copyright (C) 2011 Andrea Arteaga <andyspiros@gmail.com>
#=====================================================
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the F... | andyspiros/numbench | numbench/benchprint.py | Python | gpl-2.0 | 1,916 |
from django.conf.urls import patterns, url
from rest_framework.urlpatterns import format_suffix_patterns
from snippets.v3_0 import views
urlpatterns = patterns('',
url(r'^v3_0/snippets/$', views.SnippetList.as_view()),
url(r'^v3_0/snippets/(?P<pk>[0-9]+)/$', views.SnippetDetail.as_view()),
)
urlpatterns = for... | lgarest/django_snippets_api | snippets/v3_0/urls.py | Python | gpl-2.0 | 353 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('zeltlager_registration', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='jugendgruppe',
... | jjbgf/eventbooking | zeltlager_registration/migrations/0002_auto_20150211_2011.py | Python | gpl-2.0 | 675 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'ArtistMedia.is_default_image'
db.delete_column(u'artist_artistmedia', 'is_default_image')
... | hcwiley/the-front | the_front/the_front/artist/migrations/0005_auto__del_field_artistmedia_is_default_image__del_field_artistmedia_na.py | Python | gpl-2.0 | 8,560 |
from Personne import *
class AgentSpecial(Personne):
"""
Exemple d'héritage simple
--->>>> l'héritage multiple est possible
-> hérite des exceptions
Classe définissant un agent spécial.
Elle hérite de la classe Personne"""
def __init__(self, nom, matricule):
"""Un agent se définit par s... | syncrase/pythonScriptTest | AgentSpecial.py | Python | gpl-2.0 | 617 |
#!/usr/bin/env python
#
# 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.
import optparse
import os
import sys
from util import build_utils
from util import proguard_util
_DANGEROUS_OPTIMIZATIONS = [
... | Passw/gn_GFW | build/android/gyp/proguard.py | Python | gpl-3.0 | 3,458 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "labs_django.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| heldergg/labs | labs_django/manage.py | Python | gpl-3.0 | 254 |
from django.contrib import admin
from eventex.core.models import Talk
from eventex.core.models import Course
from eventex.core.models import Speaker
from eventex.core.models import Contact
class ContactInline(admin.TabularInline):
model = Contact
extra = 1
class SpeakerModelAdmin(admin.ModelAdmin):
i... | adrianomargarin/wttd-eventex | eventex/core/admin.py | Python | gpl-3.0 | 1,325 |
from braces.views import LoginRequiredMixin
from django.views.generic import UpdateView
from oauth2_provider.exceptions import OAuthToolkitError
from oauth2_provider.http import HttpResponseUriRedirect
from oauth2_provider.models import get_application_model as get_oauth2_application_model
from oauth2_provider.settings... | DheerendraRathor/ldap-oauth2 | application/views.py | Python | gpl-3.0 | 4,953 |
# Author: matigonkas
# URL: https://github.com/SiCKRAGETV/sickrage
#
# This file is part of SickRage.
#
# SickRage 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... | hale36/SRTV | sickbeard/providers/strike.py | Python | gpl-3.0 | 3,919 |
# -*- coding: utf-8 -*-
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
## File is released under public domain and you can use without limitations
#########################################################################
... | urrego093/proyecto_mv | applications/welcome/models/db.py | Python | gpl-3.0 | 4,097 |
from trueskill import TrueSkill, Rating, rate
import argparse
from pytba import api as tba
import math
class FrcTrueSkill:
def __init__(self):
self.env = TrueSkill(draw_probability=0.02)
self.trueskills = {}
self.events = {}
def update(self, red_alliance, red_score, blue_alliance, blu... | Ninjakow/TrueSkill | ranking.py | Python | gpl-3.0 | 5,051 |
# Generated by Django 2.2.4 on 2019-08-26 18:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('helpdesk', '0027_auto_20190826_0700'),
]
operations = [
migrations.AlterFi... | auto-mat/klub | local_migrations/migrations_helpdesk/0028_auto_20190826_2034.py | Python | gpl-3.0 | 2,149 |
# -*- coding: utf-8 -*-
# * Authors:
# * TJEBBES Gaston <g.t@majerti.fr>
# * Arezki Feth <f.a@majerti.fr>;
# * Miotte Julien <j.m@majerti.fr>;
import os
from pyramid.httpexceptions import HTTPFound
from autonomie.forms.admin import (
ActivityConfigSchema,
)
from autonomie.models.activity import (
... | CroissanceCommune/autonomie | autonomie/views/admin/accompagnement/activities.py | Python | gpl-3.0 | 2,419 |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import os
import sys
from constants import *
#For using unicode utf-8
reload(sys).setdefaultencoding("utf-8")
from PyQt4 import QtCore
from PyQt4 import QtGui
from uiQt_aboutdialog import Ui_aboutDialog
class aboutDialog(QtGui.QDialog, Ui_aboutDialog):
def __init__(se... | osmank3/bilge-katalog-old | qt/aboutDialog.py | Python | gpl-3.0 | 1,347 |
#!/usr/bin/env python3
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from models.settingsmodel import SettingsModel
from views.clipboardview import ClipBoardView
from views.downloadview import DownloadView
from views.settingsview import SettingsDialog, SettingsToolBar, Configurabl... | valmynd/MediaFetcher | src/main.py | Python | gpl-3.0 | 9,141 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provides class BaseCodeEditor; base class for
CodeEditor class in Coder
and CodeBox class in dlgCode (code component)
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd.
# Distributed under the term... | psychopy/versions | psychopy/app/coder/codeEditorBase.py | Python | gpl-3.0 | 19,323 |
import re
import keyword
import logging
import builtins
from keypad.api import BufferController, autoconnect
from keypad.core.syntaxlib import SyntaxHighlighter, lazy
_python_kwlist = frozenset(keyword.kwlist) - frozenset('from import None False True'.split())
_python_builtins = frozenset(x for x in dir(builtins) i... | sam-roth/Keypad | keypad/plugins/pymodel/syntax.py | Python | gpl-3.0 | 5,339 |
"""
__init__.py
ist303-miye
Copyright (C) 2017
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 distribute... | morpheby/ist303-miye | client/__init__.py | Python | gpl-3.0 | 755 |
"""
model.py
by Ted Morin
contains a function to predict 10-year Atrial Fibrilation risks using beta coefficients from
10.1016:S0140-6736(09)60443-8
2010 Development of a Risk Score for Atrial Fibrillation in the Community
Framingham Heart Study
translated and optimized from FHS online risk calculator's javascript
... | doirisks/dori | models/10.1016:S0140-6736(09)60443-8/model.py | Python | gpl-3.0 | 3,494 |
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
# Copyright (C) Zing contributors.
#
# This file is a part of the Zing project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from django... | iafan/zing | pootle/apps/pootle_store/unit/filters.py | Python | gpl-3.0 | 5,933 |
import random
from .tiles import base
INITIAL_TILES = [
base.ASSASSIN, base.BOWMAN, base.CHAMPION, base.DRAGOON, base.FOOTMAN,
base.GENERAL, base.KNIGHT, base.LONGBOWMAN, base.MARSHALL, base.PIKEMAN,
base.PIKEMAN, base.PRIEST, base.RANGER, base.SEER, base.WIZARD,
]
class Game(object):
def __init__(... | rorytrent/the-duke | duke/game.py | Python | gpl-3.0 | 499 |
#!/usr/bin/env python
import sys
import re
import subprocess
from jinja2 import Template
import replacements
TEMPLATENAME = "base.svg.template"
# modifiers for layers in order as in keymap
MODIFIERS = [
[],
["SHIFT"],
["MOD3"],
["MOD3", "SHIFT"],
["MOD4"],
["MOD4", "... | neo-layout/neo-layout | grafik/bilder-einzeln/flat/generate-graphics.py | Python | gpl-3.0 | 4,077 |
import pygame
from vec_2d import Vec2d
import time
from types import *
from graphics_helper import Plotter
#------------------------------------------------------------------------
#
# This file is part of Conquer.
#
# Conquer is free software: you can redistribute it and/or modify
# it under the terms of th... | alex-tug/conquer | gamemenu.py | Python | gpl-3.0 | 11,388 |
# -*- coding: utf-8 -*-
#
# (c) 2018 Alberto Planas <aplanas@gmail.com>
#
# This file is part of KManga.
#
# KManga 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... | aplanas/kmanga | scraper/scraper/middlewares.py | Python | gpl-3.0 | 10,942 |
import os
import argparse
import datetime
import yaml
import api.src.common.initial_environment_config
from ..models.dense import create_model
from ..data_processing.data_generator import DataGenerator
from ..common.config import TrainingConfig, DataConfig, Config
from ..common.utils import print_info, ensure_dir
from... | kacper1095/asl-translator | api/src/scripts/train_simple_network.py | Python | gpl-3.0 | 3,211 |
# -*- coding: utf-8 -*-
# -*- Channel PeliculasySeries -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
import re
import urllib
import base64
from channelselector import get_thumb
from core import httptools
from core import jsontools
from core import scrapertools
from core import ... | alfa-jor/addon | plugin.video.alfa/channels/peliculasyseries.py | Python | gpl-3.0 | 12,489 |
"""
Unit tests for utility functions.
"""
import numpy as np
import pytest
from thrifty import util
@pytest.mark.parametrize("num", [15, 16])
def test_fft_bin(num):
"""Validate fft_bin against numpy's fftfreq function."""
expected = np.fft.fftfreq(num, 1./num)
got = np.array([util.fft_bin(i, num) for i ... | swkrueger/Thrifty | tests/test_util.py | Python | gpl-3.0 | 385 |
#
# Delete a device from a group
# Copyright © 2020 Dave Hocker
#
# 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 3 of the License.
#
# See the LICENSE file for more details.
#
from co... | dhocker/athomepowerlineserver | commands/delete_group_device.py | Python | gpl-3.0 | 1,253 |
#!/usr/bin/python3
from pyrob.api import *
@task
def task_8_28():
if wall_is_above() != True:
while (wall_is_above() != True):
move_up()
while (wall_is_on_the_left() != True):
move_left()
while(wall_is_on_the_right() != True and wall_is_beneath() and wall_is_above()):... | lesina/labs2016 | Laba04/task_18.py | Python | gpl-3.0 | 862 |
from unidown.tools import unlink_dir_rec
class TestDeleteDirRec:
def test_non_existence(self, tmp_path):
no_folder = tmp_path.joinpath("./donotexist/")
assert not no_folder.exists()
unlink_dir_rec(no_folder)
assert not no_folder.exists()
def test_recursive(self, tmp_path):
... | IceflowRE/MR-eBook-Downloader | tests/tools_test.py | Python | gpl-3.0 | 762 |
"""Constants used in Mackup."""
# Current version
VERSION = '0.8.7'
# Support platforms
PLATFORM_DARWIN = 'Darwin'
PLATFORM_LINUX = 'Linux'
# Directory containing the application configs
APPS_DIR = 'applications'
# Mackup application name
MACKUP_APP_NAME = 'mackup'
# Default Mackup backup path where it stores its f... | Timidger/mackup | mackup/constants.py | Python | gpl-3.0 | 677 |
class Solution(object):
def isSelfCrossing(self, x):
"""
:type x: List[int]
:rtype: bool
"""
inf = float('inf')
n = len(x)
if n < 3:
return False
ruld = [0, 0, 0, 0] # right, up, left, down
next_max = inf
current = [-x[1], ... | wufangjie/leetcode | 335. Self Crossing.py | Python | gpl-3.0 | 1,217 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/stuart/src/kdevelop projects/tennis/player_create.ui'
#
# Created: Mon Nov 3 22:00:23 2014
# by: PyQt4 UI code generator 4.10.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_... | stustustu123/tennis | Ui_player_create.py | Python | gpl-3.0 | 38,024 |
#!/usr/bin/env python
"""
This script plots various quantities.
"""
from __future__ import division, print_function
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import argparse
ylabels = {"cl": r"$C_l$", "cd": r"$C_d$", "cl/cd": r"$C_l/C_d$", "k": "$k$",
"omega": r"$\omega$", "eps... | karasinski/NACAFoil-OpenFOAM | plot.py | Python | gpl-3.0 | 1,969 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
try:
from configparser import RawConfigParser
except ImportError:
from ConfigParser import RawConfigParser
import glob
import os
import shutil
import subprocess
import sys
config = RawConfigParser(allow_no_value=True)
config... | gridsync/gridsync | scripts/make_appimage.py | Python | gpl-3.0 | 4,585 |
#!/bin/false
# -*- coding: utf-8 -*-
from objects.orobject import OrObject
from objects.function import Function
from objects.number import Number
from objects.file import File
from objects.inheritdict import InheritDict
from objects.ordict import OrDict
from objects.orddict import ODict
import objects.console as cons... | pavpanchekha/oranj | oranj/core/builtin.py | Python | gpl-3.0 | 1,879 |
#!/usr/bin/env python3
# Copyright 2020 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0+
import sys
from wazo_auth_client import Client as AuthClient
from wazo_confd_client import Client as ConfdClient
from xivo.chain_map import ChainMap
from xivo.config_helper import read_config_file_hier... | wazo-pbx/xivo-tools | pjsip/sync-username-and-names.py | Python | gpl-3.0 | 2,588 |
from server.util import ScriptManager
def objectClick2_2213(player, obId, obX, obY):
player.getPA().openUpBank()
def objectClick2_11758(player, obId, obX, obY):
player.getPA().openUpBank() | TheRealVestige/VestigeX-Server | Data/scripts/player/objects/objectclick2.py | Python | gpl-3.0 | 196 |
import pygame
def arrow_image(color):
img = pygame.Surface((7, 6))
img.fill((226, 59, 252))
img.set_colorkey((226, 59, 252), pygame.RLEACCEL)
pygame.draw.polygon(img, color, ((0, 0), (3, 3), (6, 0)))
return img
class Menu(object):
def __init__(self, font, options):
self.font = fon... | jmimu/pyNekketsu | retrogamelib/dialog.py | Python | gpl-3.0 | 4,110 |
#Idol Mech Logic
__author__="jim"
__date__ ="$Dec 22, 2010 3:01:06 PM$"
import procgame
import locale
import logging
from procgame import *
base_path = config.value_for_key_path('base_path')
game_path = base_path+"games/indyjones/"
speech_path = game_path +"speech/"
sound_path = game_path +"sound/"
music_path = game... | mypinballs/indianajones | idol_bkup.py | Python | gpl-3.0 | 11,157 |
# Utility functions for OpenMORA scripts
#
# Part of OpenMora - https://github.com/OpenMORA
import os, sys, string
import platform
import yaml
def get_mora_paths():
""" Returns a list of paths with MORA modules, from the env var MORA_PATH
"""
if not 'MORA_PATH' in os.environ:
print('**ERROR** Environment variabl... | OpenMORA/mora-base | scripts/morautils.py | Python | gpl-3.0 | 2,018 |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | thica/ORCA-Remote | src/ORCA/widgets/core/ScrollableLabelLarge.py | Python | gpl-3.0 | 15,619 |
#!/usr/bin/python
import xml.sax
import glob
from xml.etree import ElementTree
import os
debug = 0
currentPath = os.path.dirname(os.path.abspath(__file__))
def printl(string):
if debug:
print "[xml_parser:Debug] "+ str(string)
def main ():
p = getProviders()
print p[2].getIncomingServers()
def ... | blu3f1r3/sMail-Checker | xml_parser.py | Python | gpl-3.0 | 2,892 |
from django.conf.urls import url
from . import views
app_name = 'persons'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^thanks/$', views.thanks, name='thanks'),
url(r'^upload/$', views.upload_file, name='upload_file'),
url(r'^success... | grodrigo/django_general | persons/urls.py | Python | gpl-3.0 | 427 |
"""Backwards compatible tunnel handler for
phpsploit v1 backdoors, aka:
<?php eval(base64_decode($_POST[%%PASSKEY%%])); ?>
"""
__all__ = ["Request_V1_x"]
from . import handler
from .exceptions import BuildError
class Request_V1_x(handler.Request):
def __init__(self):
"""Force default method to POST,... | nil0x42/phpsploit | src/core/tunnel/compat_handler.py | Python | gpl-3.0 | 837 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
import os.path
from django import template
FMT = 'JPEG'
EXT = 'jpg'
QUAL = 75
register = template.Library()
def resized_path(path, size, method):
"Returns the path for the resized image."
dir, name = os.path.split(path)
image_name, ext = name.rsplit('.', 1)... | dw9694/django_blog | blog/templatetags/image_tags.py | Python | gpl-3.0 | 2,209 |
from src import cron
from src.api import Api
api = Api()
def fetch_photo():
api.fetch_photo()
@cron.route('/worker', methods=['GET'])
def scheduler_worker():
fetch_photo()
return 'fetch photo...'
| Assassinss/daily-artwork | src/worker.py | Python | gpl-3.0 | 229 |
'''
Copyright(C) 2016, Stamus Networks
Written by Laurent Defert <lds@stamus-networks.com>
This file is part of Scirius.
Scirius 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, o... | StamusNetworks/scirius | rules/management/commands/kibana_export.py | Python | gpl-3.0 | 1,475 |
# Copyright (C) 2009-2013 Roman Zimbelmann <hut@lepus.uberspace.de>
# This software is distributed under the terms of the GNU GPL version 3.
from inspect import isfunction
from ranger.ext.signals import SignalDispatcher, Signal
from ranger.core.shared import FileManagerAware
from ranger.gui.colorscheme import _colors... | mullikine/ranger | ranger/container/settings.py | Python | gpl-3.0 | 8,531 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import dbus
import avahi
import socket
from folavirt.networking.NetworkInterface import NetworkInterface
"""
Klasa służy do rozgłąszania czegoś poprzez Avahi
"""
class AvahiBroadcaster():
def __init__(self, name, avahiname, avahiport):
self._service_name = n... | lokipl/folavirt | lib/folavirt/networking/AvahiBroadcaster.py | Python | gpl-3.0 | 1,356 |
# Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... | cjaymes/pyscap | src/scap/model/oval_5/defs/independent/EnvironmentVariable58StateElement.py | Python | gpl-3.0 | 1,279 |
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | chrislit/abydos | abydos/distance/_strcmp95.py | Python | gpl-3.0 | 8,223 |
# Copyright 2011 Sebastien Maccagnoni-Munch
#
# This file is part of Omoma.
#
# Omoma 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 3.
#
# Omoma is distributed in the hope that it will be useful,
# b... | TheGU/omoma | omoma/omoma_web/templatetags/__init__.py | Python | gpl-3.0 | 666 |