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
__problem_title__ = "Largest palindrome product" __problem_url___ = "https://projecteuler.net/problem=4" __problem_description__ = "A palindromic number reads the same both ways. The largest palindrome " \ "made from the product of two 2-digit numbers is 9009 = 91 × 99. Find " \ ...
jrichte43/ProjectEuler
Problem-0004/solutions.py
Python
gpl-3.0
774
from __future__ import unicode_literals from django.db import models class Artist(models.Model): first_name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) bio = models.TextField(null=True, blank=True) email_address = models.EmailField() created = models.DateTimeFi...
highsineburgh/gallery_api
gallery_api/gallery/models.py
Python
gpl-3.0
1,130
#!/usr/bin/env python """ Simple-stupid time tracker script ================================= Timetrack opyright (C) 2010, Branko Vukelic <studio@brankovukelic.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 Soft...
foxbunny/Timetrack
tt.py
Python
gpl-3.0
7,554
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
tsdmgz/ansible
lib/ansible/modules/network/nxos/nxos_file_copy.py
Python
gpl-3.0
7,272
# -*- coding: utf-8 -*- # LINZ-2-OSM # Copyright (C) 2010-2012 Koordinates Ltd. # # 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) an...
opennewzealand/linz2osm
linz2osm/workslices/migrations/0004_auto__add_field_workslicefeature_layer_in_dataset.py
Python
gpl-3.0
7,883
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Impact function Test Cases.** .. 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; eithe...
borysiasty/inasafe
safe/impact_functions/generic/classified_polygon_building/test/test_classified_polygon_building.py
Python
gpl-3.0
7,265
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import argparse import glob import logging import string import unicodedata, re from geeknote import GeekNote from storage import Storage from editor import Editor import tools # set default logger (write log to file) def_logpath = os.path.join(os.getenv('USERP...
Xunius/txt2evernote
lib/geeknote/gnsync.py
Python
gpl-3.0
9,526
# # This file is part of opsd. # # opsd 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. # # opsd is distributed in the hope that it wil...
warwick-one-metre/opsd
warwick/observatory/operations/actions/superwasp/park_telescope.py
Python
gpl-3.0
1,410
from time import sleep import LNdigitalIO DELAY = 1.0 # seconds if __name__ == "__main__": LNdigital = LNdigitalIO.LNdigitals() while True: LNdigital.leds[7].toggle() sleep(DELAY)
LeMaker/LNdigitalIO
examples/blink.py
Python
gpl-3.0
209
def isItPrime(N): # same as before for D in range(2, N): if N % D == 0: print(N, "is not prime; divisible by", D) return print(N, "is prime") isItPrime(324635459)
cemc/cscircles-wp-content
lesson_files/lesson18/primality-big.py
Python
gpl-3.0
206
from distutils.core import setup import yavd setup ( name = 'YAVD', version = yavd.__version__, description= 'Download videos from Youtube and others.', author = '10n1z3d', author_email = '10n1z3d@w.cn', url = '', license = 'GPLv3', packages = ['YAVD'], ...
10n1z3d/YAVD
setup.py
Python
gpl-3.0
391
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2012 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
parinporecha/backend_gtgonline
GTG/gtk/browser/custominfobar.py
Python
gpl-3.0
8,564
''' @date Aug 28, 2010 @author: Matthew A. Todd This file is part of Test Parser by Matthew A. Todd Test Parser 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...
matcatc/Test_Parser
src/TestParser/View/Tkinter/__init__.py
Python
gpl-3.0
714
from django.http import HttpResponse, JsonResponse from pa3_web.models import Subscriber # # Example of a subscription client # def delete_subscriber(phone_number): [sub.delete() for sub in Subscriber.objects.filter(protocol='sms', identifier=phone_number)...
sistason/pa3
src/pa3_frontend/pa3_django/pa3_web/subscription_sms_handling.py
Python
gpl-3.0
411
#!/usr/bin/env python # deals with uploading grbl to arduino # placed in a separate script to secondboot.py because I couldn't figure out how to CD into # the right directory within python, so instead I'll do the "cd'ing" in rc.local, and call standalone script*** #*** EDIT: apparently passing cwd="directory" as an ar...
mn1del/rpi_cnc_img
secondboot_arduino.py
Python
gpl-3.0
1,627
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php or see LICENSE file. # # Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com). # Copyright 2006, Frank Scholz <coherence@beebits.net> # Copyright 2007-2008 Brisa Team <brisa-develop@garage.maemo.org> """ Contains the MSearch class which ca...
henkelis/sonospy
sonospy/brisa/upnp/control_point/msearch.py
Python
gpl-3.0
6,719
# -*- coding: utf-8 -*- import pygame import os from game_boards import game000 class LogoImg(pygame.sprite.Sprite): 'holds the logo in top left corner' def __init__(self, mainloop): # Call the parent's constructor pygame.sprite.Sprite.__init__(self) self.mainloop = mainloop se...
OriHoch/pysiogame
classes/logoimg.py
Python
gpl-3.0
3,434
import random # generate a random bit order # you'll need to save this mapping permanently, perhaps just hardcode it # map how ever many bits you need to represent your integer space mapping = range(34) mapping.reverse() # alphabet for changing from base 10 chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' # shuffle t...
klanestro/vortaro
words/tools.py
Python
gpl-3.0
1,001
# -*- coding: utf-8 -*- """ Velocity Kodi Addon Copyright (C) 2016 blazetamer 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 y...
odicraig/kodi2odi
addons/plugin.video.velocity/default.py
Python
gpl-3.0
85,418
import argparse from datetime import datetime, timedelta from sched import scheduler from sys import stdout from time import time from .husmow import TokenConfig, API def run_logger(tc, args, stop_time): mow = API() mow.set_token(tc.token, tc.provider) mow.select_robot(args.mower) sch = scheduler(ti...
chrisz/pyhusmow
pyhusmow/status_logger.py
Python
gpl-3.0
4,539
""" Module for storing static data structures """ import os import sys VERSION = 0.9999 PID = os.getpid() S3SITE_CFG_DIR = os.path.join(os.path.expanduser('~'), '.s3site') S3SITE_CFG_FILE = os.path.join(S3SITE_CFG_DIR, 'config') S3SITE_LOG_DIR = os.path.join(S3SITE_CFG_DIR, 'logs') S3SITE_META_FILE = '__s3site.cfg' ...
jtriley/s3site
s3site/static.py
Python
gpl-3.0
2,179
# -*- coding: utf-8 -*- """ Created on Thu Jan 19 21:03:22 2017 Stolen from jasper @author: mb """ import sys import socket import logging if sys.version_info < (3, 3): from distutils.spawn import find_executable else: from shutil import which as find_executable def check_network_connection(server="www.goog...
titiwu/simpl
simpl/diagnose.py
Python
gpl-3.0
1,732
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
vaygr/ansible
lib/ansible/modules/monitoring/uptimerobot.py
Python
gpl-3.0
3,698
# Copyright (c) 2014, Santiago Videla # # This file is part of pyzcasp. # # caspo 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. # # c...
svidela/pyzcasp
setup.py
Python
gpl-3.0
2,214
{ 'name': "Blockchain Waves Synchro", 'version': '1.0', 'depends': ['base', 'sale', 'sales_team', 'delivery', 'barcodes', 'mail', 'report', 'portal_sale', 'website_portal', ...
stanta/darfchain
darfchain/__manifest__.py
Python
gpl-3.0
668
import random import numpy as np import pprint import sys def generate_random_params(max_rumtime_mins = 2880, param_seed = 1234): random.seed(param_seed) np.random.seed(param_seed) # duration TIME_TAKEN_FOR_ONE_SIMULATION = 40 # minutes # params we are concerened about #CLUST...
roshantha9/AbstractManycoreSim
src/util_scripts/ccpbased_remapping_random_params_generation.py
Python
gpl-3.0
2,693
from celery.exceptions import Ignore from django.urls import reverse from oioioi.base.tests import TestCase from oioioi.contests.models import Contest, ProblemInstance, Submission from oioioi.evalmgr.tasks import create_environ from oioioi.programs.controllers import ProgrammingContestController from oioioi.suspendjud...
sio2project/oioioi
oioioi/suspendjudge/tests.py
Python
gpl-3.0
3,682
# -*- coding: utf-8 -*- import unittest from config.context import Attribute, attr class Data(object): pass class AttributeTestCase(unittest.TestCase): def setUp(self): self.data= Data() self.data.int2= 1 self.integer= 3 self.int1= Attribute("int1", ...
claashk/python-config
tests/context/attribute.py
Python
gpl-3.0
3,198
from django.http import HttpResponsePermanentRedirect from dairy.models import Dairy from dairy.serializers import DairyListSerializer, DairyDetailSerializer from dairy.permissions import DairyPermission from rest_framework import viewsets from rest_framework.response import Response class DairyViewSet(viewsets.ModelV...
Nelayah/blogCMS
dairy/views.py
Python
gpl-3.0
763
from kaiju.core.config.structures.application.web.ErrorConfig import ErrorConfig class OnErrorConfig(object): @staticmethod def parse_xml(web_xml): """ :param web_xml: :param variables: :return: """ handler = web_xml.get('handler') if not handler: ...
keikenuro/kaiju-libnow
kaiju_libnow/kaiju/core/config/structures/application/web/OnErrorConfig.py
Python
gpl-3.0
1,090
from django.contrib.auth.models import User from django.contrib.sessions.models import Session from django.utils import timezone from django.http import HttpResponse, HttpResponseRedirect from rest_framework.renderers import JSONRenderer class JSONResponse(HttpResponse): """ An HttpResponse that renders its c...
stoic1979/chatzilla
dashboard/utils.py
Python
gpl-3.0
1,054
#!/usr/bin/python3 # -*- coding: utf-8 -*- ################################################################################ # Anceps Copyright (C) 2014 Suizokukan # Contact: suizokukan _A.T._ orange dot fr # # This file is part of Anceps. # Anceps is free software: you can redistribute it and/or modify # ...
suizokukan/anceps
anceps.py
Python
gpl-3.0
1,215
#!/usr/bin/env python # This file is part of the Printrun suite. # # Printrun 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. # # Prin...
3DP-Unlimited/3DP-Printrun
printrun/gl/trackball.py
Python
gpl-3.0
2,746
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 by Erwin Marsi and TST-Centrale # # This file is part of the DAESO Framework. # # The DAESO Framework 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 ...
emsrc/daeso-framework
lib/daeso/stats/corpus.py
Python
gpl-3.0
6,068
# -*- coding: utf-8 -*- """ This file contains all of tests realized on the modele module. @author: Felix Molina @version: 1.0 """ import os import modele def unitTest_participantDataVerification(): """ This function tests if the verification of participant data is right with the participantDataVerificatio...
felixmol/PRO3600
src/v1/unit validation/unit modele/unit_test_modele.py
Python
gpl-3.0
11,518
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
timlinux/geonode
setup.py
Python
gpl-3.0
1,905
''' Copyright 2017 Anders Lykke Gade This file is part of Worksets. Worksets 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. Worksets is d...
DozyDolphin/Worksets
setup.py
Python
gpl-3.0
1,774
#Calcwylator using Python 3 and tkinter print("""Calcwylator Version 0.1.0 Copyright (C) 2016 Somewun This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.""") f...
somewun/Calcwylator
Calcwylator.py
Python
gpl-3.0
4,221
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # 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 ...
tomkralidis/geonode
geonode/monitoring/__init__.py
Python
gpl-3.0
3,733
"""Smoke tests for the ``CLI`` end-to-end scenario. :Requirement: Cli Endtoend :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: Hammer :Assignee: gtalreja :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from fauxfactory import gen_alphanumeric from fauxfactory import...
lpramuk/robottelo
tests/foreman/endtoend/test_cli_endtoend.py
Python
gpl-3.0
12,481
from __future__ import annotations # standard libraries import asyncio import typing # third party libraries import numpy.typing # local libraries from nion.data import Image from nion.swift import MimeTypes from nion.swift import Thumbnails from nion.swift.model import DisplayItem from nion.swift.model import Docum...
nion-software/nionswift
nion/swift/DataItemThumbnailWidget.py
Python
gpl-3.0
19,101
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2014 Sébastien Helleu <flashcode@flashtux.org> # # 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 opt...
guns/weechat
doc/docgen.py
Python
gpl-3.0
29,781
#!/usr/bin/env python2 #This script keeps the bot running, restarts it, and writes error logs when it bugs out. import logging try: open('errors.log', 'r').close() except IOError: open('errors.log', 'w').close() logging.basicConfig(level=logging.WARNING, filename='errors.log', filemode = 'a', format='[%(asctime)s] ...
feblehober123/GETWatchBot2
run.py
Python
gpl-3.0
620
from .typestring import TypeString
michaelpb/omnithumb
omnithumb/types/__init__.py
Python
gpl-3.0
35
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from getpass import getuser import json from os import environ from pipes import quote from socket import gethostname from time import time from .exceptions import NodeLockedException from .utils import cached_property, temp...
timbuchwaldt/bundlewrap
bundlewrap/lock.py
Python
gpl-3.0
8,144
#!/usr/bin/env python # -*- coding: utf-8 -*- # publish-patches.py - publish patches for the given distribution # # Copyright © 2008 Canonical Ltd. # Author: Scott James Remnant <scott@ubuntu.com>. # # This program is free software: you can redistribute it and/or modify # it under the terms of version 3 of the GNU Gene...
dbnicholson/merge-our-misc
publish_patches.py
Python
gpl-3.0
4,618
import logging import json import re import smtplib from channels.consumer import SyncConsumer from django.conf import settings from django.contrib.sites.models import Site from django.core.mail import EmailMessage from django.urls import reverse from .models import Mail logger = logging.getLogger(__name__) class Mai...
Puyb/inscriptions_roller
inscriptions/consumers.py
Python
gpl-3.0
1,896
# -*- coding: utf-8 -*- _counties = [ ("Aberdeenshire", "Aberdeenshire"), ("Anglesey", "Anglesey"), ("Angus", "Angus"), ("Argyll", "Argyll"), ("Ayrshire", "Ayrshire"), ("Banffshire", "Banffshire"), ("Bedfordshire", "Bedfordshire"), ("Berwickshire", "Berwickshire"), ("Breconshire", "B...
willprice/mentor-finder
mentor_finder/models/county.py
Python
gpl-3.0
3,324
""" Copyright 2016 Jake Wimberley. This file is part of RunToRun. RunToRun 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 v...
JakeWimberley/Weathredds
rtr/urls.py
Python
gpl-3.0
1,521
from tests.base_test import BaseTest from core.weexceptions import FatalException from testfixtures import log_capture from core.terminal import Terminal from core.sessions import SessionURL, SessionFile from core import modules from core import messages import subprocess def setUpModule(): subprocess.check_output...
dtrip/weevely3
tests/test_terminal.py
Python
gpl-3.0
8,149
from pywb.rewrite.rewrite_live import LiveRewriter from pywb.rewrite.url_rewriter import UrlRewriter from pywb.rewrite.wburl import WbUrl from pywb import get_test_dir from io import BytesIO # This module has some rewriting tests against the 'live web' # As such, the content may change and the test may break urlrew...
machawk1/pywb
pywb/rewrite/test/test_rewrite_live.py
Python
gpl-3.0
9,395
from phystricks import * def exCircleThree(): pspict,fig = SinglePicture("exCircleThree") circle = Circle(Point(0,0),1.5) circle.angleI = 45 circle.angleF = 380 circle.wave(0.1,0.1) circle.parameters.color = "green" circleB = Circle(Point(0,0),1.5) circleB.angleI = circle.angleF-360 ...
LaurentClaessens/phystricks
testing/demonstration/exCircleThree.py
Python
gpl-3.0
652
# -*- coding: utf-8 -*- # This file is part of Tautulli. # # Tautulli 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. # # Tautul...
JonnyWong16/plexpy
plexpy/classes.py
Python
gpl-3.0
2,312
# -*- coding: utf-8 -*- import socket import ibm_db conn = ibm_db.connect("DATABASE=sample;HOSTNAME=66.3.44.37;PORT=60004;PROTOCOL=TCPIP;UID=cyrus;PWD=cyrus;", "", "") sql = "SELECT PHONENO FROM EMPLOYEE" def queryData(s): result = [] if conn: try: stmt = ibm_db.exec_immediate(conn, s) ...
cysuncn/python
study/Socket/SocketClient.py
Python
gpl-3.0
1,102
# subsystemBonusCaldariOffensive3RemoteShieldBoosterHeat # # Used by: # Subsystem: Tengu Offensive - Support Processor type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "overloadSelfDurati...
bsmr-eve/Pyfa
eos/effects/subsystembonuscaldarioffensive3remoteshieldboosterheat.py
Python
gpl-3.0
459
import datetime import nrkdownload.utils def test_valid_filename(string=r":blah/bl:ah.ext"): filename = nrkdownload.utils.valid_filename(string) assert filename == "blahblah.ext" def test_parse_duration(string="PT3H12M41.6S"): # PT28M39S : 28m39s # PT3H12M41.6S : 3h12m41.6s duration = nrkdownlo...
marhoy/nrk-download
tests/test_utils.py
Python
gpl-3.0
721
# -*- coding: utf-8 -*- """ Started on Wed Sep 13 15:55:22 2017 @author: carlos.arana Descripcion: Creación de dataset para el parámetro 0311 "Superficie Agricola" Informacion disponible para 2015 """ import pandas as pd import numpy as np import sys # Librerias locales utilizadas module_path = r'D:\PCCS\01_Dmine\...
Caranarq/01_Dmine
03_UsoDeSuelo/P0311/P0311.py
Python
gpl-3.0
8,216
# -*- coding: utf-8 -*- # # Galaxy documentation build configuration file, created by # sphinx-quickstart on Tue Mar 6 10:44:44 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/doc/source/conf.py
Python
gpl-3.0
8,789
# Import from standard libraries from __future__ import division, absolute_import, print_function import tensorflow as tf, importlib from six import iteritems # Import from our libraries import core.losses from core.common import Channel, get_debug_session from core.evaluation import basic_stats_numpy, classification_...
tfXYZ/tfXYZ
apps/classification.py
Python
gpl-3.0
4,593
#!/usr/bin/env python3 # temper.py -*-python-*- # Copyright 2018 by Pham Urwen (urwen@mail.ru) # # 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 limitat...
Cat5TV/nems-scripts
temper.py
Python
gpl-3.0
14,754
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "day12bbs.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the...
dianshen/github
day12bbs/manage.py
Python
gpl-3.0
806
# -*- coding:utf-8 -*- import smtplib from email.header import Header from email.mime.text import MIMEText from email.utils import parseaddr, formataddr from core.enigma import Enigma from model.email import Email from util.config import Config class EmailSender: @classmethod def format_addr(cls, s): ...
AaronGeist/Llama
core/emailsender.py
Python
gpl-3.0
1,822
# This file is part of ZUKS-Controller. # # ZUKS-Controller 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. # # ZUKS-Controller is dist...
ZUKSev/ZUKS-Controller
server/server/wsgi.py
Python
gpl-3.0
1,072
#!/usr/bin/env python3 import argparse, time import numpy as np import django from django.utils import timezone import datetime, os import sys import db6 as db os.environ.setdefault("DJANGO_SETTINGS_MODULE", "BasicBrowser.settings") django.setup() from tmv_app.models import * def read_state(filename, terms): ...
mcallaghan/tmv
BasicBrowser/import_hlda.py
Python
gpl-3.0
5,188
## Progam packages from ..market_environment.Market_Environment import Market_Environment from ..core_math import credit_pickles ## Python packages from xlrd import open_workbook import xlrd import xlwings as xw import numpy as np class Asset_data(object): """ Objective: ========== This cla...
jbalm/ActuarialCashFlowModel
asset/Asset_data.py
Python
gpl-3.0
6,459
from gtool.core.types.core import Aggregator class Average(Aggregator): def __init__(self, config=None): super(Average, self).__init__(config=config) def compute(self): selectionDict = super(Average, self).compute() _selection = [v for v in selectionDict.values()][0] _name =...
gtoolframework/gtool
gtool/plugins/average.py
Python
gpl-3.0
881
import tensorflow as tf import load_image import matplotlib.pyplot as plt import numpy as np def weight_variable(shape): """initialize weights with a small ammount of noise to break symmetry and prevent 0 gradients""" initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial) def bi...
leobrowning92/tf_edu
position_fc_net.py
Python
gpl-3.0
2,905
#!/usr/bin/env python ######################################### # Installation module for arachni ######################################### # AUTHOR OF MODULE NAME AUTHOR="Nathan Underwood (sai nate)" # DESCRIPTION OF THE MODULE DESCRIPTION="Website / webapp vulnerability scanner." # INSTALLATION TYPE # OPTIONS GIT...
piratica/ptf
vulnerability-analysis/arachni.py
Python
gpl-3.0
614
############################################################################### # # # 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 ...
dparks1134/DrawM
drawm/__init__.py
Python
gpl-3.0
1,491
from flask import jsonify from unittest import TestCase from wapi.tests import TestMixin from wapi import fields_required import json class TestFieldsRequired(TestMixin, TestCase): def setUp(self): super(TestFieldsRequired, self).setUp() @self.app.route("/") @fields_required(...
sharifyounes/wapi
wapi/tests/test_fields_required.py
Python
gpl-3.0
6,170
# This Python file uses the following encoding: utf-8 from __future__ import division from colorsegmentation.image.ImageService import * from colorsegmentation.image.Points import * import numpy as np import numpy.ma as ma import copy as cp from ia870 import * import sys sys.setrecursionlimit(10000) class MaxTree(ob...
filaboia/colorsegmentation
py/colorsegmentation/maxtree/MaxTree.py
Python
gpl-3.0
11,619
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-01 18:09 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('polls', '0008_reg_ser'), ] operations = [ mi...
saulario/pruebas
python/mysite/polls/migrations/0009_auto_20170501_1809.py
Python
gpl-3.0
1,944
#!/usr/bin/env python # coding=utf-8 import sys import os from qtpy import QtGui, QtWidgets, QtCore from appbase.MultiWorkspaceWindow import MultiWorkspaceWindow from appbase.Application import Application from fancytools.os.PathStr import PathStr from imgProcessor.reader.qImageToArray import qImageToArray # from int...
radjkarl/dataArtist
dataArtist/gui.py
Python
gpl-3.0
20,228
import curses from pygments import token class ColorProfile: def __init__(self): self._map = { token.Text : 4, token.Keyword : 3, token.Comment : 2, token.Number : 5, token.Name : 6, token.Error : 7, token.Punctuation : 8, token.Whitespace : 0 } def color_for(self, attr): #this shoul...
federicotdn/piter
src/colors.py
Python
gpl-3.0
477
# Copyright 2014, candidtim (https://github.com/candidtim) # # This file is part of Vagrant AppIndicator for Ubuntu. # # Vagrant AppIndicator for Ubuntu 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 v...
candidtim/vagrant-appindicator
vgapplet/machineindex.py
Python
gpl-3.0
4,627
# Generated by Django 2.0.4 on 2019-01-10 11:23 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
texta-tk/texta
account/migrations/0001_initial.py
Python
gpl-3.0
909
from orpsoc.orpsocconfigparser import OrpsocConfigParser from orpsoc.config import Config import os import logging logger = logging.getLogger(__name__) class System: def __init__(self, system_file): logger.debug('__init__() *Entered*' + '\n system_file=' + str(system_file) ...
Carlosaarodrigues/orpsoc
orpsoc/system.py
Python
gpl-3.0
1,541
# -*- coding: utf-8 -*- # # This file is part of the jabber.at homepage (https://github.com/jabber-at/hp). # # This project 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 (...
debalance/hp
hp/conversejs/views.py
Python
gpl-3.0
878
# -*- 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): # Changing field 'Timetable.year' db.alter_column('tafe_timetable', 'year', self.gf('django.db.models.field...
datakid/tvet
tafe/migrations/0058_auto__chg_field_timetable_year.py
Python
gpl-3.0
25,222
__author__ = 'Mars' import random class Question: def __init__(self, monster): self.name = "Question" self.monster = monster class PercentMonsterLevel1(Question): def __init__(self, monster): Question.__init__(self,monster) self.name = "PercentMonsterLevel1" def makeQ(se...
rdp1070/PokeMath
Question.py
Python
gpl-3.0
5,970
""" The module series exports functions to compute power series solutions with Newton's method in double, double double, or quad double precision. """ def replace_symbol(pol, idx): """ In the polynomial pol, replaces the first symbol by the symbol at place idx. """ from phcpy.phcpy2c2 import py2c_...
janverschelde/PHCpack
src/Python/PHCpy2/phcpy/series.py
Python
gpl-3.0
26,702
import pandas from ExternalParsersHookUp import RakuCommandFunctions from ExternalParsersHookUp import ParseWorkflowSpecifications dfStarwars = pandas.read_csv("https://raw.githubusercontent.com/antononcube/R-packages/master/DataQueryWorkflowsTests/inst/extdata/dfStarwars.csv") dfStarwarsFilms = pandas.read_csv("https...
antononcube/ConversationalAgents
Packages/Python/ExternalParsersHookUpApp/examples.py
Python
gpl-3.0
1,315
#!/usr/bin/env python import errno import os import re import sys from configparser import ConfigParser import jinja2 from errbot.version import VERSION def new_plugin_wizard(directory=None): """ Start the wizard to create a new plugin in the current working directory. """ if directory is None: ...
apophys/err
errbot/plugin_wizard.py
Python
gpl-3.0
4,848
# (c) 2013-2015 Joost Yervante Damad <joost@damad.be> # License: GPL # default values for settings color_schemes = {} color_schemes['default'] = { 'background': (0.0, 0.0, 0.0, 1.0), 'grid': (0.5, 0.5, 0.5, 1.0), 'axes': (1.0, 0.0, 0.0, 1.0), 'name': (1.0, 1.0, 1.0, 1.0), 'value': (1.0, 1.0, 1.0, 1.0),...
andete/madparts
gui/defaultsettings.py
Python
gpl-3.0
1,561
# coding=utf-8 """html to jinja2首席挖洞官 将本目录/子目录下的html文件中使用到的 *静态文件* 的URL改为使用jinja2 + flask url_for渲染 href="css/base.css" -> href="{{ url_for("static", filename="css/base.css") }}" 挖洞前会在文件同目录做一个.bak后缀名的备份文件。 Usage: $ cd my_project $ python2 translate.py """ from __future__ import print_function import re im...
bllli/tsxyAssistant
app/templates/translate.py
Python
gpl-3.0
1,644
#!/usr/bin/env ../../jazzshell """ Supplies a set of admin operations for trained models. ============================== License ======================================== Copyright (C) 2008, 2010-12 University of Edinburgh, Mark Granroth-Wilding This file is part of The Jazz Parser. The Jazz Parser is free softw...
markgw/jazzparser
bin/models/chordlabel/admin.py
Python
gpl-3.0
5,587
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from django.http import JsonResponse from django.http import HttpResponseRedirect from django.http import Http404, HttpResponse ...
firesunCN/My_CTF_Challenges
bctf_2017/diary/diary_server/firecms/oauth_client/views.py
Python
gpl-3.0
9,288
from htmldoc import * from chunk import * from module import * from js import * #? This global variable is used to specify where the javascript files are on the server. JavascriptDir = "./" #<_ view="internal">A Marker showing where the RPCs are installed</_> rpcim = Marker("js") rpcs=[""" <script language='JavaScri...
gandrewstone/yadog
PyHtmlGen/json.py
Python
gpl-3.0
2,038
from trueskill import TrueSkill, Rating, rate import argparse import requests from datetime import datetime #from pytba import api as tba class FrcTrueSkill: def __init__(self): self.env = TrueSkill(draw_probability=0.02) self.trueskills = {} self.events = {} self.get_previous_matc...
Ninjakow/TrueSkill
frc_trueskill.py
Python
gpl-3.0
3,512
#!/usr/bin/python # -*- coding: utf-8 -*- # Python 3.2 code # # Copyright (c) 2012 Jeff Smits # # 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 opt...
Apanatshka/C3P
c3p/tests/all_tests.py
Python
gpl-3.0
1,036
#!/usr/bin/env python import re import sys import os config = [] for infile in sys.argv[2:]: with open(infile) as f: config.append((os.path.splitext(os.path.basename(infile))[0], f.read())) code = open(sys.argv[1], 'w') code.write("//generated by " + sys.argv[0] + " DO NOT EDIT\n\n") code.write("#includ...
rene-dev/stmbl
tools/create_config.py
Python
gpl-3.0
784
# -*- coding: utf-8 -*- """ Terminal view. """ # system import os import sys # pipped if os.name != 'nt': from blessings import Terminal # color codes TERM_ORANGE = 0 TERM_RED = 1 TERM_GREEN = 2 TERM_YELLOW = 3 TERM_BLUE = 4 TERM_PINK = 5 TERM_CYAN = 6 class TerminalView: """ Terminal view to basic CLI inf...
stephanepechard/projy
projy/TerminalView.py
Python
gpl-3.0
997
# -*-coding: utf-8-*- from sqlalchemy import ( Column, Integer, String, Table, ForeignKey, ) from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.hybrid import hybrid_property from ..models import ( DBSession, Base ) employee_contact = Table( 'employee_contact', B...
mazvv/travelcrm
travelcrm/models/employee.py
Python
gpl-3.0
6,963
import datetime from jinja2 import Environment, PackageLoader from mailer import Mailer, Message from models.config import config from models.jobrunhistory import jobrunhistory from lib.jinjafilters import jinjafilters from lib.logger import logger class statusemail(): jobrunhistory = None history = None ...
Nextpertise/autorsyncbackup
src/lib/statusemail.py
Python
gpl-3.0
11,943
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import re import writeXml import io import logging import collections import os from mutagen.mp3 import MP3 dictionary = { 'eng': [u'and', u'of', u'the', u'to', u'and' , u'from'], 'fra': [u'et']} def maxSplit(language, p): ...
DarthVeder/daFre
split.py
Python
gpl-3.0
12,276
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
retr0h/ansible
lib/ansible/inventory/__init__.py
Python
gpl-3.0
15,950
''' Copyright (C) 2015 Constantin Tschuertz 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 any later version. This program is distributed in the hope that it wi...
ConstantinT/jAEk
crawler/tests/databasetest.py
Python
gpl-3.0
7,988
'''Main simulation run: Simulation of a stationary bump.''' from __future__ import absolute_import, print_function, division from numpy.random import choice from nest.hl_api import NESTError from grid_cell_model.models.parameters import getOptParser from grid_cell_model.models.gc_net_nest import BasicGridCellNetwork ...
MattNolanLab/ei-attractor
grid_cell_model/simulations/common/simulation_stationary.py
Python
gpl-3.0
3,476
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
mozvip/Sick-Beard
sickbeard/providers/piratebay/__init__.py
Python
gpl-3.0
15,509
# -*- coding: utf-8 -*- # # pyOptimalEstimation documentation build configuration file, created by # sphinx-quickstart on Mon Dec 15 11:43:06 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated f...
maahn/pyOptimalEstimation
docs/conf.py
Python
gpl-3.0
7,888