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
#!/usr/bin/env python3.5 user=input("user: ") passwd=input("password: ")
smartczm/python-learn
Old-day01-10/s13-day2/auth.py
Python
gpl-2.0
74
# OeQ autogenerated correlation for 'Window/Wall Ratio South in Correlation to the Building Age' import math import numpy as np import oeqCorrelation as oeq def get(*xin): # OeQ autogenerated correlation for 'Window to Wall Ratio in Southern Direction' A_WIN_S_BY_AW= oeq.correlation( const= 20818.6194135,...
UdK-VPT/Open_eQuarter
mole/stat_corr/window_wall_ratio_south_MFH_by_building_age_correlation.py
Python
gpl-2.0
514
# # Copyright (C) 2013 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 3 as published by # the Free Software Foundation. # # This program is distributed in the hope...
UNINETT/nav
python/nav/thresholdmon.py
Python
gpl-2.0
6,744
from django.test import TestCase, Client from django.conf import settings from django.db import IntegrityError from django.contrib.auth.models import User from api.models import Project, Task, Resource from tokenauth.authbackends import TokenAuthBackend from datetime import date import requests import responses imp...
TangentMicroServices/ProjectService
api/tests/tests.py
Python
gpl-2.0
6,753
class Solution(object): def isPowerOfFour(self, num): """ :type num: int :rtype: bool """ if num < 1: return False return num & (num - 1) == 0 and num & 0x55555555 > 0
Jacy-Wang/MyLeetCode
PowerofFour342.py
Python
gpl-2.0
232
#"Ron Ten-Hove" <rtenhove@forte.com>, by wondering why he doesn't get the expected result from passing params to unnamed templates, exposes a subtle gotcha. 15 May 2000 from Xml.Xslt import test_harness sheet_1 = """<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ...
Pikecillo/genna
external/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/rt_20000515.py
Python
gpl-2.0
1,364
#!/usr/bin/env python # Class Based implementation of the BHS calendar from datetime import datetime as dt from datetime import timedelta as td import csv, re from icalendar import Calendar, Event # What period is at what time? eg. period 1 from 8:40 - 9:45 from new_schedule_times import reg, l1, l2, l3, l4, l5, lunc...
alphydan/bhs-ical
new-bhs-cal/import_fun_and_stats.py
Python
gpl-2.0
13,512
from morsel.panda import * from morsel.nodes.controller import Controller from morsel.core.event_handler import EventHandler #------------------------------------------------------------------------------- class Keyboard(Controller): def __init__(self, keys = [], delay = None, **kargs): super(Keyboard, self).__...
kralf/morsel
python/lib/morsel/control/keyboard.py
Python
gpl-2.0
2,440
#! /usr/bin/env python # D.J. Bennett # 24/03/2014 """ pglt Stage 4: Phylogeny generation """ # PACKAGES import os import re import pickle import logging from Bio import Phylo import pglt.tools.phylogeny_tools as ptools from pglt.tools.system_tools import MissingDepError # RUN def run(wd=os.getcwd(), logger=logging....
DomBennett/pG-lt
pglt/stages/phylogeny_stage.py
Python
gpl-2.0
3,537
# Copyright (c) 2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of G...
candlepin/subscription-manager
src/rhsmlib/dbus/facts/base.py
Python
gpl-2.0
2,557
import os, shutil, re, glob, subprocess, logging, gzip from autotest.client.shared import log, global_config, software_manager from autotest.client import utils GLOBAL_CONFIG = global_config.global_config _LOG_INSTALLED_PACKAGES = GLOBAL_CONFIG.get_config_value('CLIENT', ...
ColinIanKing/autotest
client/base_sysinfo.py
Python
gpl-2.0
15,628
# -*- coding: utf-8 -*- # # GeoServer documentation build configuration file, created by # sphinx-quickstart on Tue Oct 28 10:01:09 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickl...
bmmpxf/suite
docs/postgis/src/conf.py
Python
gpl-2.0
6,298
import unittest import day02.solution as solution class TestDay02(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_part_one(self): test_input = [ 'abcdef', 'bababc', 'abbcde', 'abcccd', 'aabcdd'...
T-R0D/JustForFun
aoc2018/day02/test/test_solution.py
Python
gpl-2.0
1,946
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2013 Vassilii Khachaturov <vassilii@tarunz.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; eith...
pmghalvorsen/gramps_branch
gramps/gen/test/user_test.py
Python
gpl-2.0
1,410
# -*- coding: utf-8 -*- """ tornado websocket proxy for WF worker daemons """ # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. import json import os, sys import traceback from uuid import uuid4 from tornado import websocket, we...
zetaops/zengine
zengine/tornado_server/server.py
Python
gpl-3.0
5,363
HTML_TEMPLATE = """ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- Copyright: Darren Hester 2006, http://www.designsbydarren.com L...
tracykteal/replicate-filter
scripts/repeats_html_template.py
Python
gpl-3.0
2,972
import gi gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') gi.require_version('GObject', '2.0') from gi.repository import Gtk, Gdk, GObject from gcustom.audioWidget import cAudioWidget from gcustom.progressBar import cProgressBar class TimedStatusBar(Gtk.Statusbar): def __init__(self, timeout): ...
jtk1rk/xsubedit
view.py
Python
gpl-3.0
14,528
""" Created on September 20, 2011 @author: sbobovyc """ """ Copyright (C) 2011 Stanislav Bobovych 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, ...
sbobovyc/LabNotes
SolarViz/solar_graph.py
Python
gpl-3.0
3,845
import stdnum import re from datetime import datetime, date from django.utils import timezone from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from stdnum.it import codicefiscale def _valida_codice_fiscale(codice_fiscale): """ Validatore esteso che ver...
CroceRossaItaliana/jorvik
anagrafica/validators.py
Python
gpl-3.0
3,974
# -*- coding: utf-8 -*- from __future__ import unicode_literals from gtp import gtp from Tkinter import * from toolbox import * from toolbox import _ def get_full_sequence_threaded(worker,current_color,deepness): sequence=get_full_sequence(worker,current_color,deepness) threading.current_thread().sequence=sequence ...
pnprog/goreviewpartner
gnugo_analysis.py
Python
gpl-3.0
13,115
#!/usr/bin/env python # #45! The second number which is triangular, pentagonal, and hexagonal! # Luckily, all triangular numbers are all hexagonal! # For some reason, (N^2 + N)/2 == (2M^2 - M) # Option 1: Just check all hexagonal numbers for pentagonalness... # Option 2: Find some relation between hexagonal and p...
nayrbnayrb/projecteuler
0045/0045.py
Python
gpl-3.0
1,397
# -*- encoding: utf-8 -*- def tupleToString(t): return reduce(lambda x, y: str(x) +" "+ str(y), t) def stringToTuple(s): return tuple(s.split(" "))
barrazamiguel/pydrez
modelo/tuple.py
Python
gpl-3.0
157
# coding=utf-8 """Dialog test. .. 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. """ __author__ = 'pna...
pnakis/qgis_vector_transform
test/test_vector_transform_dialog.py
Python
gpl-3.0
1,563
#!/usr/bin/python #This is where you can set up your own scheduled by providing hour and minute when you want to start your task and duration where you say how long do you want to run it for. This is devided by each day of the week so you can run differen scheduler each day. It is possible to extend this with another ...
eneasz/RasHeating-Control
custom.py
Python
gpl-3.0
2,070
# -*- coding: utf-8 -*- from django.db import models class Person(models.Model): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) age = models.CharField(max_length=10) def __unicode__(self): return self.first_name class PersonFile(models.Model): ...
valdergallo/django-chrono
example/models.py
Python
gpl-3.0
963
# -*- 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): # Adding field 'Subreddit_Time_Series_Data.create_date' db.add_column(u'reddit_data_subreddit_time_series_da...
jonathanmorgan/reddit_data
migrations/0006_auto__add_field_subreddit_time_series_data_create_date__add_field_subr.py
Python
gpl-3.0
20,772
from django.conf.urls import url from core.views.generic import get_dashboard, delete from users.views.individuals import RegisterView from users.views.base import LoginView, logout_user from core.views.display import IndexView urlpatterns = [#url(r'^$', LoginView.as_view(), name='index'), url(...
acuriel/nahuatilli
core/urls.py
Python
gpl-3.0
840
# coding: utf-8 # ![ML Logo](http://spark-mooc.github.io/web-assets/images/CS190.1x_Banner_300.png) # # **Click-Through Rate Prediction Lab** # #### This lab covers the steps for creating a click-through rate (CTR) prediction pipeline. You will work with the [Criteo Labs](http://labs.criteo.com/) dataset that was us...
eusebioaguilera/scalablemachinelearning
Lab04/ML_lab4_ctr_student.py
Python
gpl-3.0
54,867
# This file is part of cloud-init. See LICENSE file for license information. from cloudinit.distros import rhel from cloudinit import log as logging LOG = logging.getLogger(__name__) class Distro(rhel.Distro): pass # vi: ts=4 expandtab
larsks/cloud-init
cloudinit/distros/centos.py
Python
gpl-3.0
245
''' Task Coach - Your friendly task manager Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
wdmchaft/taskcoach
tests/unittests/widgetTests/DragAndDropTest.py
Python
gpl-3.0
2,283
# -*- coding: utf-8 -*- from requests import (get, post, delete) from .base import Base class System(Base): def __init__(self, host, secret, endpoint='/plugins/restapi/v1/system/properties'): """ :param host: Scheme://Host/ for API requests :param secret: Shared secret key for API request...
etutionbd/openfire-restapi
ofrestapi/system.py
Python
gpl-3.0
1,675
from .ext_solutions import intrsc_values def main(id_star, x_star, y_star, extin_list, zams_indxs, zams_inter, M_abs, sp_type, m_obs, bv_obsrv, e_bv, ub_obsrv, e_ub): """ For each solution assigned to each observed star, find its absolute magnitude, intrinsic colors, spectral types, and distance...
Gabriel-p/UBV_move
modules/zams_solutions.py
Python
gpl-3.0
4,495
#-*- coding: utf-8 -*- ''' Created on 28 сент. 2010 @author: ivan ''' from gi.repository import Gtk from gi.repository import Gdk from foobnix.fc.fc import FC from foobnix.gui.state import LoadSave from foobnix.gui.model.signal import FControl class VolumeControls(LoadSave, Gtk.HBox, FControl): MAX_VALUE = 100 ...
kagel/foobnix
foobnix/gui/controls/volume.py
Python
gpl-3.0
2,868
def factorial(count): return count * factorial(count - 1) answer = factorial(6)
zamonia500/PythonTeacherMythenmetz
과외숙제/factorial.py
Python
gpl-3.0
86
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.item import Item, Field from scrapy.loader.processors import Join, MapCompose, TakeFirst from scrapy.loader import ItemLoader from w3lib.html i...
bernieyangmh/spider
spider_y/items.py
Python
gpl-3.0
1,245
import sys, random, ast try: import include, copy, pickle except: pass import retrieval_system, environment, evaluation import query as queryClass from queryRankers import * class QueryRanker(): def __init__(self, path_train_dataset, path_test_dataset, feature_count_dataset, min_freq_count, iterations, ...
hubert667/AIR
src/scripts/queryRanker.py
Python
gpl-3.0
3,450
#!/usr/bin/env python # encoding: utf-8 """A service to sync a local file tree to jottacloud. Copies and updates files in the cloud by comparing md5 hashes, like the official client. Run it from crontab at an appropriate interval. """ # This file is part of jottacloudclient. # # jottacloudclient is free software: you...
havardgulldahl/jottalib
src/jottalib/scanner.py
Python
gpl-3.0
5,128
import h5py as h5py import numpy as np import multiprocessing import os.path class _hdf5_io(): def __init__(self, path, fbase, ncpu=0, interval=None): self._path = path self._fbase = fbase self._parts = self._find_parts(self._path, self._fbase) self._nb_cpu = multiprocessing.cpu_c...
kyleaoman/simfiles
simfiles/_hdf5_io.py
Python
gpl-3.0
6,437
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-08 22:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('association', '0001_initial'), ] operations = [ migrations.AddField( ...
ZwaConnection/TheGuildWeb
apps/association/migrations/0002_association_email.py
Python
gpl-3.0
460
class ConnectionException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value)
AGHPythonCourse2017/zad3-chudy1997
song_singer/ConnectionException.py
Python
gpl-3.0
152
import maya.cmds as cmds from . import renamer_settings as settings class FieldReplacer(object): def __init__(self): print 'Initializing jsRenamer FieldReplacer...' #replaceMaterial = self.replaceMaterial def checkTemplate(self,node): #availPos = ['C','L','R','LF','RF','LB','RB','U',...
jszokoli/jsTK
jsRenamer/field_replacer.py
Python
gpl-3.0
6,998
# -*- coding: utf-8 -*- # Zeobuilder is an extensible GUI-toolkit for molecular model construction. # Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of Z...
molmod/zeobuilder
zeobuilder/nodes/reference.py
Python
gpl-3.0
6,367
"""Check the requirements parsing.""" import io from logassert import Multiple from fades import parsing, REPO_PYPI, REPO_VCS from tests import get_reqs def test_empty(): parsed = parsing._parse_requirement(io.StringIO(""" """)) assert parsed == {} def test_simple(): parsed = parsing._parse_requ...
PyAr/fades
tests/test_parsing/test_reqs.py
Python
gpl-3.0
3,030
from datetime import datetime import random import string import logging from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from askbot.models.post import Post from askbot.models.base import BaseQuerySetManager from askbot.conf import settings as ...
afdelgado/askbot
askbot/models/reply_by_email.py
Python
gpl-3.0
6,554
# -*- coding: utf-8 -*- # # web_container.py # # Copyright © 2016-2017 Antergos # # This file is part of whither. # # whither 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...
Antergos/whither
whither/toolkits/gtk/web_container.py
Python
gpl-3.0
985
from course import Course from course_offering import CourseOffering from distributive_requirement import DistributiveRequirement from instructor import Instructor from course_median import CourseMedian from review import Review from vote import Vote from student import Student
layuplist/layup-list
apps/web/models/__init__.py
Python
gpl-3.0
279
""" lintswitch lints your code in the background. http://github.com/grahamking/lintswitch """ import sys import socket import logging import os import os.path import argparse from threading import Thread try: # python 3 from queue import Queue except ImportError: # python 2 from Queue import Queue fro...
grahamking/lintswitch
lintswitch/main.py
Python
gpl-3.0
4,151
# This is a program for IP limit using picture recognition. # URL: http://bbs.csdn.net/human_validations/new # Input: human validations page # Get the jpeg from the url. # use picture recognition to get the string from the picture. # Authentication pass! # # this is try to use selenuim to login import re,os,sys import...
zhouqilin1993/IntelliDE
crawler/ForumSpider/ForumSpider/valide/picget.py
Python
gpl-3.0
3,264
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class NotificationsConfig(AppConfig): name = 'notifications'
elhanarinc/streambasednotifications
challenge/notifications/apps.py
Python
gpl-3.0
165
#!/usr/bin/env python # -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
pombredanne/PyGithub
scripts/compare_to_api_ref_doc.py
Python
gpl-3.0
6,149
from openerp import models, fields, api from openerp.tools.translate import _ import logging #from fingerprint import Fingerprint from dateutil import relativedelta from datetime import datetime as dt from dateutil import parser import xlsxwriter import StringIO from io import BytesIO import base64 import hashlib impor...
stanta/darfchain
darfchain/models/sale_order.py
Python
gpl-3.0
7,313
#! /usr/bin/env python import ftplib import ftputil ftp_host = ftputil.FTPHost("localhost", "ftptest", "d605581757de5eb56d568a4419f4126e") ftp_host._session.set_debuglevel(2) #import pdb; pdb.set_trace() ftp_host.listdir("/rootdir2") print ftp = ftplib.FTP("localhost", "ftptest", "d60558...
Crypt0s/Ramen
fs_libs/ftputil/sandbox/test_ticket_71.py
Python
gpl-3.0
411
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "street_agitation_bot.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ens...
Kurpilyansky/street-agitation-telegram-bot
manage.py
Python
gpl-3.0
818
#!/usr/bin/python # -*- coding: utf-8 -*- # # FPGA Deps collects the files of an HDL project # Copyright (C) 2015-2019 INTI # Copyright (C) 2015-2019 Rodrigo A. Melo # # 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...
INTI-CMNB-FPGA/fpga_helpers
fpgahelpers/fpga_deps.py
Python
gpl-3.0
7,332
#!/usr/bin/env python3 import arrow import math from . import statnett from . import ENTSOE from . import DK import logging import pandas as pd import requests def fetch_production(zone_key='NL', session=None, target_datetime=None, logger=logging.getLogger(__name__), energieopwek_nl=True): ...
corradio/electricitymap
parsers/NL.py
Python
gpl-3.0
9,768
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document class PhysicianServiceUnitSchedule(Document): pass
manassolanki/erpnext
erpnext/healthcare/doctype/physician_service_unit_schedule/physician_service_unit_schedule.py
Python
gpl-3.0
280
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class Employee(models.Model): _name = "hr.employee" _inherit = "hr.employee" child_all_count = fields.Integer( 'Indirect Surbordinates Count', compute='_...
t3dev/odoo
addons/hr_org_chart/models/hr_employee.py
Python
gpl-3.0
1,787
#!/usr/bin/python3 from itertools import cycle import random import sys import math import os import pygame import pickle from pygame.locals import * pgimagel = pygame.image.load FPS = 30 SCREENWIDTH = 288 SCREENHEIGHT = 512 # amount by which base can maximum shift to left PIPEGAPSIZE = 100 # gap between upper and l...
Moshifan100/pythongame
game.py
Python
gpl-3.0
15,122
#!/usr/bin/env python3 import os from wsgiref.handlers import CGIHandler import orjson import sys sys.path.append("..") import custom_functions try: from custom_functions import generate_toc_object except ImportError: from philologic.runtime import generate_toc_object try: from custom_functions import ...
ARTFL-Project/PhiloLogic4
www/reports/table_of_contents.py
Python
gpl-3.0
998
""" Django settings for votainteligente project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bu...
opencorato/votainteligente-portal-electoral
votainteligente/settings.py
Python
gpl-3.0
2,935
#!/usr/bin/python # UDPPingerServer.py # We will need the following module to generate randomized lost packets import random from socket import * # Create a UDP socket # Notice the use of SOCK_DGRAM for UDP packets serverSocket = socket(AF_INET, SOCK_DGRAM) # Assign IP address and port number to socket serverSocket.bi...
jameslivulpi/socketprogramming
udpServer.py
Python
gpl-3.0
872
# (c) 2012-2014, 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) an...
ralphbean/ansible
v2/ansible/plugins/connections/__init__.py
Python
gpl-3.0
1,862
import discord from discord.ext import commands from .utils import checks from __main__ import send_cmd_help try: import valve.source.a2s import valve.source.messages sourcequery_isinstalled = True except: sourcequery_isinstalled = False import socket import json try: from bs4 import BeautifulSoup ...
Shigbeard/shigbeard-cogs
gsinfo/gsinfo.py
Python
gpl-3.0
11,433
# -*- coding: utf-8 -*- # Copyright (C) 2009, 2014-2015 Rocky Bernstein <rocky@gnu.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...
rocky/python2-trepan
trepan/inout/base.py
Python
gpl-3.0
5,570
# -*- coding: utf-8 -*- # *********************************************************************** # Copyright (C) 2014 - 2017 Oscar Gerardo Lazo Arjona * # <oscar.lazo@correo.nucleares.unam.mx> * # *...
oscarlazoarjona/fast
fast/config.py
Python
gpl-3.0
1,912
# Taken directly from CMU 15112 Course notes: # http://www.cs.cmu.edu/~112/notes/eventBasedAnimationClass.py # eventBasedAnimationClass.py from Tkinter import * class EventBasedAnimationClass(object): def onMousePressed(self, event): pass def onKeyPressed(self, event): pass def onTimerFired(self): pass ...
ericl1u/eece7398
eventBasedAnimationClass.py
Python
gpl-3.0
1,836
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'KindleSearchDialog.ui' # # Created: Thu Apr 3 16:24:23 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 ex...
Alexsays/Kindle-Sync
KindleSearchDialog.py
Python
gpl-3.0
3,422
import nose.tools as nt import numpy as np from hyperspy.signal import Signal from hyperspy import signals from hyperspy.exceptions import DataDimensionError class Test1d: def setUp(self): self.s = Signal(np.arange(2)) @nt.raises(DataDimensionError) def test_as_image(self): self.s.as_im...
to266/hyperspy
hyperspy/tests/signal/test_signal_subclass_conversion.py
Python
gpl-3.0
2,881
# encoding: 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): # Adding field 'ShortURL.collect_date' db.add_column('shortim_shorturl', 'collect_date', self.gf('django.d...
arthurfurlan/django-shortim
src/shortim/migrations/0002_auto__add_field_shorturl_collect_date__add_field_shorturl_title__add_f.py
Python
gpl-3.0
2,839
from .api.api import Api from .api.bot_configuration import BotConfiguration from .version import __version__ __all__ = ['Api', 'BotConfiguration'] __version__ = __version__
Feduch/pyMessengerBotApi
messengerbot/__init__.py
Python
gpl-3.0
174
from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.http.response import HttpResponseRedirect from django.shortcuts import render_to_response from django.template.context impor...
i32algae/pruebais
usuario/views.py
Python
gpl-3.0
710
from WebAppDIRAC.Lib.WebHandler import WebHandler, asyncGen from DIRAC.Resources.Catalog.FileCatalog import FileCatalog from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getVOForGroup from DIRAC import gConfig, gLogger from DIRAC.Core.Utilities import Time from hashlib import md5 class FileCatalogHandler...
zmathe/WebAppDIRAC
WebApp/handler/FileCatalogHandler.py
Python
gpl-3.0
12,082
""" Provides the interface, each protocol implementation must implement to work with G4DS. Grid for Digital Security (G4DS) @author: Michael Pilgermann @contact: mailto:mpilgerm@glam.ac.uk @license: GPL (General Public License) """ class ProtocolInterface: """ Provides a common interface for all implementat...
kichkasch/ioids
g4ds/protocols/protocolinterface.py
Python
gpl-3.0
1,822
#!/usr/bin/env python3 """inject_repos.py - CI secret repos injection. """ import yaml from lxml import etree from lxml.etree import ElementTree as ET import argparse from six import iteritems def main(): repos_file, beaker_file = parse_args() repos = load_secret_data(repos_file) inject_repos(repos, beaker...
oVirt/jenkins
stdci_libs/inject_repos.py
Python
gpl-3.0
1,611
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
valentin-krasontovitsch/ansible
lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
Python
gpl-3.0
12,924
""" Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 7], you should return 4. Credits: Special thanks to @amrsaqr for adding this problem and creating all test cases. """ class Solution(object): def rangeBitwis...
urashima9616/Leetcode_Python
Leet201_BitwiswAndRange.py
Python
gpl-3.0
1,001
# This file is subject to the terms and conditions defined in # file 'LICENSE', which is part of this source code package. # Copyright (c) 2009 SKR Farms (P) LTD. # -*- coding: utf-8 -*- from pygments.lexer import RegexLexer from pygments.token import * try : from tayra.lexer import TTLLexer except : ...
prataprc/eazytext
eazytext/extension/ttlpygment.py
Python
gpl-3.0
3,677
import flask_babel from flask import request, url_for, current_app, g, session from flask_nav.elements import View class LanguageCodeFromPathMiddleware(object): def __init__(self, app, babel_by_url): self.app = app self.babel_by_url = babel_by_url def __call__(self, environ, start_response): ...
thedod/boilerplate-peewee-flask
application/sitepack/babel_by_url.py
Python
gpl-3.0
3,249
__author__ = 'dooferlad'
dooferlad/need-input
puke/templatetags/__init__.py
Python
gpl-3.0
25
# Author Anurag Kumar 12 Sept, 2017 #init file for this module.. from .paint import paint
anuragkumarak95/wordnet
wordnet/bin/__init__.py
Python
gpl-3.0
90
l=int(input()) d=list(input().split()) s={0:0} for i in range(l): for j in range(i+1,l): diff=abs(int(d[i])-int(d[j])) if diff not in s: s[abs(diff)]=1 else: s[diff]=s[diff]+1 f =lambda x:print(str(x)+" "+str(s[x])) f(max(s.keys()))
jzcxer/0Math
python/test.py
Python
gpl-3.0
286
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Loic Blot <loic.blot@unix-experience.fr> # 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....
jbenden/ansible
lib/ansible/modules/monitoring/logstash_plugin.py
Python
gpl-3.0
4,754
""" n! means n x (n - 1) x ... x 3 x 2 x 1 For example, 10! = 10 x 9 x ... x 3 x 2 x 1 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the digits in the number 100! Answer: 648 """ from math import factorial def factorial_digit_sum(x): return sum...
doozr/euler.py
p0020_factorial_digit_sum_test.py
Python
gpl-3.0
438
import pathlib import pprint import shutil from alcustoms import sql from alcustoms.tkinter import advancedtkinter, smarttkinter, style import tkinter as tk from tkinter import filedialog, messagebox, scrolledtext ttk = smarttkinter.ttk.ttk from alcustoms.methods import minimalist_pprint_pformat ##################...
AdamantLife/alcustoms
alcustoms/Programs/SQLExplorer.py
Python
gpl-3.0
16,142
################################################################################ # # esc_tools.py # # Library of electronic-structure related code - updated version of esc_lib. # ################################################################################ # # Copyright 2014 Kane O'Donnell # # This library is fr...
kaneod/physics
python/esc_tools.py
Python
gpl-3.0
45,419
# -*- coding: utf-8 -*- # author : kian-meng, ang # # input : a dna string at most 100 nt (NucleoTides) # output : 20 12 17 21 # # $ python counting_nucleotides.py # input : a dna string at most 100 nt (NucleoTides) # output : 20 12 17 21 f = open("rosalind_dna.txt", "r") dna_string = f.read() # method 1: using co...
kianmeng/codekata
rosalind/001_dna_counting_nucleotides/counting_nucleotides.py
Python
gpl-3.0
1,370
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Copyright (C) 2013, 2014 Canonical Ltd. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; version 3. # # Thi...
ubuntu-touch-apps/filemanager-app
tests/autopilot/filemanager/fixture_setup.py
Python
gpl-3.0
2,725
import astroid import nose from hypothesis import given, settings, HealthCheck from typing import Any import tests.custom_hypothesis_support as cs settings.load_profile("pyta") @given(cs.ifexp_node()) @settings(suppress_health_check=[HealthCheck.too_slow]) def test_ifexp(node): """Test the type setting of an IfEx...
RyanDJLee/pyta
tests/test_type_inference/test_ifexpr.py
Python
gpl-3.0
598
# SITools2 client for Python # Copyright (C) 2013 - Institut d'astrophysique spatiale # # 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 # (a...
SITools2/pySitools2_1.0
sitools2/clients/__init__.py
Python
gpl-3.0
829
__ERRORS__= { \ "NOROOT": "GPX root segment is missing.", \ "NOSEGMENTS": "Segments are missing.", \ "NOPTS": "Points are missing.", \ "NONAME": "Name is missing.", \ "NORTRIP": "No round trip segment .", \ "ILLSEGNUM": "Segment number is illegal.", \ "ILLPNTNUM": "Po...
r09491/gpxrte
rte/error.py
Python
gpl-3.0
725
#!/usr/bin/env python """ TURTLE An expert system shell inspired by CLIPS syntax @author Claudio Greco, Daniele Negro, Marco Di Pietro """ from core.exceptions.Exceptions import EvaluateException from core.typesystem.TypeSystem import BaseType, VariableType from core.entities.Fact import Fact from coll...
icse-turtle/turtle
src/core/WorkingMemory.py
Python
gpl-3.0
3,633
# -*coding: utf-8-*- from collections import Iterable from . import ResourcesQueryBuilder from ...models.resource import Resource from ...models.order import Order from ...models.person import Person from ...models.advsource import Advsource class OrdersQueryBuilder(ResourcesQueryBuilder): def __init__(self, c...
mazvv/travelcrm
travelcrm/lib/qb/orders.py
Python
gpl-3.0
1,209
../../../../share/pyshared/duplicity/asyncscheduler.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py
Python
gpl-3.0
54
#!/usr/bin/env python3 """ Copyright 2020 Paul Willworth <ioscode@gmail.com> This file is part of Galaxy Harvester. Galaxy Harvester is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 ...
pwillworth/galaxyharvester
html/getComponentList.py
Python
gpl-3.0
2,331
# Copyright (C) 2008 Google, Inc. All Rights Reserved. # Copyright (C) 2012 Michael Bryant. # # 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...
mikebryant/tsumufs
lib/tsumufs/metrics.py
Python
gpl-3.0
1,997
# -*- coding: utf-8 -*- """Tests for template combination @Requirement: TemplateCombination @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: API @TestType: Functional @CaseImportance: Medium @Upstream: No """ from nailgun import entities from requests.exceptions import HTTPError from robottelo.d...
sthirugn/robottelo
tests/foreman/api/test_template_combination.py
Python
gpl-3.0
3,545
# Fork: https://github.com/fabioz/u-msgpack-python # ''' This module provides a way to do full-duplex communication over a socket with umsgpack_s. Basic usage is: # Create our server handler (must handle decoded messages) class ServerHandler(ConnectionHandler, UMsgPacker): def _handle_d...
fabioz/mu-repo
mu_repo/umsgpack_s_conn.py
Python
gpl-3.0
15,598
def get_id_link(id='prensalibregt/posts?'): post = graph.get_object(id=id, fields='link') id_news = [] link_news = [] for posts in post['data']: id_news.append(posts['id']) link_news.append(posts['link']) #print(posts) return [id_news, link_news] [id_news, ...
mriosrivas/language_mining
get_id_link.py
Python
gpl-3.0
347
"""Module containing Connection class, connections between source and target populations.""" # Copyright 2013 Allen Institute # This file is part of dipde # dipde 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 Foundatio...
nicain/dipde_dev
dipde/internals/connection.py
Python
gpl-3.0
9,914
#!/usr/bin/python # -*- coding: utf-8 -*- import requests, threading from lxml import html class UrlThread(threading.Thread): def __init__(self, s): self.url = s threading.Thread.__init__(self) self.hrefs = [] self.title = "" self.content = "" def run(...
davidam/python-examples
webscraping/damcrawler/app/urlthread.py
Python
gpl-3.0
563