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
# -*- coding: utf-8 -*- # Copyright 2013 Christoph Reiter <reiter.christoph@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 Free Software Foundation; either version 2 of the License, or # (at your option) an...
elbeardmorez/quodlibet
quodlibet/quodlibet/ext/events/searchprovider.py
Python
gpl-2.0
5,620
# Generated by Django 2.0.6 on 2018-11-21 08:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('invoicing', '0018_invoice_attachments'), # ('invoicing', '0020_auto_20181001_1025'), ] operations = [ migrations.AddField( ...
PragmaticMates/django-invoicing
invoicing/migrations/0021_invoice_related_document.py
Python
gpl-2.0
463
# Copyright 2016, 2017 Richard Rodrigues, Nyle Rodgers, Mark Williams, # Virginia Tech # # This file is part of Coremic. # # Coremic 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 Lice...
richrr/coremicro
src/core/process_data.py
Python
gpl-2.0
2,807
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from gll import gll from lagrange import lagrange from legendre import legendre def lagrange1st(N): """ # Calculation of 1st derivatives of Lagrange polynomials # at GLL collocation points # out = legendre1st(N) # out is a matrix wi...
daniel-koehn/Theory-of-seismic-waves-II
12_1D_SH_Spectral_Elements/lagrange1st.py
Python
gpl-3.0
1,327
# Copyright 2012 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia # This file is part of ngs_crumbs. # ngs_crumbs 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, ...
JoseBlanca/ngs_crumbs
crumbs/seq/sff_extract.py
Python
gpl-3.0
7,004
import os dir_path = os.path.dirname(os.path.realpath(__file__)) def get_full_data_filename(f, reldir='data'): """ Gets the full path to the data file `f`. """ return os.path.join(dir_path, reldir, f) def parse_file(fname, parser): """ Parses the file `fname` using the parser `parser` and ret...
iradicek/clara
tests/utils.py
Python
gpl-3.0
498
# ##### 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...
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/scripts/startup/bl_ui/space_nla.py
Python
gpl-3.0
6,129
import pytz import urllib from datetime import datetime from pupa.scrape import Scraper, Bill, VoteEvent from openstates.utils import LXMLMixin TIMEZONE = pytz.timezone("US/Central") VOTE_TYPE_MAP = {"yes": "yes", "no": "no"} class NEBillScraper(Scraper, LXMLMixin): def scrape(self, session=None): if ...
openstates/openstates
openstates/ne/bills.py
Python
gpl-3.0
10,305
from django.db.models import Q from door_to_door_bot import bot_settings, models from door_to_door_bot.common import * from street_agitation_bot.emoji import * from street_agitation_bot import utils import traceback import re import collections from datetime import datetime, date, timedelta from telegram import (Rep...
Kurpilyansky/street-agitation-telegram-bot
door_to_door_bot/bot.py
Python
gpl-3.0
21,674
# -*- coding: utf8 -*- __author__ = 'Clemens Prescher' class PickModel(): num_pick_models = 0 def __init__(self, number_picks): self.id = PickModel.num_pick_models PickModel.num_pick_models += 1 self._prefix = "id"+str(self.id)+"_" self.current_pick = 0 self.number_p...
Luindil/PeakThis
peakthis/model/PickModel.py
Python
gpl-3.0
2,797
# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in...
estaban/pyload
module/plugins/accounts/StahnuTo.py
Python
gpl-3.0
1,610
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright 2006-2009 (C) Raster Software Vigo (Sergio Costas) # Copyright 2006-2007 (C) Peter Gill - win32 parts # This file is part of DeVeDe # # DeVeDe is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
rastersoft/Devede
devede_fonts.py
Python
gpl-3.0
2,685
#!/usr/bin/python # Copyright 2012, 2013 Andrew Lamoureux # # This file is a part of FunChess # # FunChess 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...
lwerdna/chess
PgnViewer.py
Python
gpl-3.0
4,672
# -*- coding: utf-8 -*- ''' Created on 10-Jul-2015 @author: 3cky ''' from twisted.python import log from wokkel.muc import MUCClient from fnmatch import fnmatch class MUCNotifier(MUCClient): """ Multi-user chat notifier. """ def __init__(self, chatJID, nick, appIdPatterns): MUCClient.__init_...
3cky/google-play-review-notify
reviewnotify/notifiers.py
Python
gpl-3.0
1,388
from feedgen.feed import FeedGenerator def format_itunes_duration(td): return "{hours:02d}:{minutes:02d}:{seconds:02d}".format( hours=td.seconds//3600, minutes=(td.seconds//60)%60, seconds=int(td.seconds%60) ) def add_entry(fg, md): fe = fg.add_entry() fe.id(md.id) fe.title...
calpaterson/dircast
dircast/feed.py
Python
gpl-3.0
848
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import datetime import logging # used for logging import time # needed for sleep() and duration from .core_functions import CoreFunctions as Core from .config import Config from .daemon_handler import DaemonHandler class WrapperHandler: """ This class handles...
uhuc-de/minecraft-vanilla-server-toolset
bin/mvst/wrapper_handler.py
Python
gpl-3.0
5,058
from django.http import HttpResponseRedirect from django.http import HttpResponseForbidden from django.http import HttpResponseBadRequest from django.shortcuts import render_to_response from django.template.loader import render_to_string from django.contrib import auth from django.core.context_processors import csrf #f...
bplower/cssef
WebInterface/WebInterface/modules/competition/views/blueteam.py
Python
gpl-3.0
17,106
# -*- coding: utf-8 -*- import os import numpy as n from collections import OrderedDict from vtk import * from qt4 import * class Structure: ''' Base class for all crystal baseStructs ''' def __init__(self): self.natoms = 0 self.composition = '' self.system = "" self.bra...
jessedsmith/Arcte
modules/containers.py
Python
gpl-3.0
23,623
#!/usr/bin/env python import sys import socket input_addr, output_addr, node_id, node_type = sys.argv[1:] input_host, input_port = input_addr.split(':') output_host, output_port = output_addr.split(':') #blank hosts default to localhost input_host = input_host if input_host else 'localhost' output_host = output_host ...
ptrgags/socket-ring
ring.py
Python
gpl-3.0
3,317
import socket import threading from socksv.tcpRelay import tcpRelay from pluginHelper.IPlugin import ILoginSocketProvider from socksv.socksvSocketServer import socksvSocketServer from pluginHelper.pluginStackPrototype import pluginStackPrototype class socksvRemoteServer(socksvSocketServer): CMD_CONNECT...
securesocketimproved/ssi
socksv/socksvRemoteServer.py
Python
gpl-3.0
5,289
# _*_ coding= utf-8 _*_ import sys sys.path.append("/usr/local/Cellar/numpy/1.11.0/lib/python2.7/site-packages") sys.path.append("/usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages") import numpy as np import cv2 import json import os import re # targetFilePath = '/Users/gehongpeng/PycharmProjects/TableDe...
GeHongpeng/PythonProject
DetectTables/DetectTablesFromImages.py
Python
gpl-3.0
9,252
""" Generates a list of [b, N, n] where N is the amount of b-bit primes and n is the amount of b-bit safe primes. """ import gmpy import json for b in xrange(1,33): N = 0 n = 0 p = gmpy.mpz(2**b) while True: p = gmpy.next_prime(p) if p > 2**(b+1): break if gmpy....
bwesterb/germain
exact.py
Python
gpl-3.0
437
""" models.py Set up all our ORM Models """ import os import flask_sqlalchemy from . import app app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL'] app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = flask_sqlalchemy.SQLAlchemy(app) class ThingModel(db.Model): id = db.Column(db.Integer, p...
OliverSherouse/excella-2016
rest_app/models.py
Python
gpl-3.0
457
# -*- coding:utf-8 -*- from Crypto.Cipher import AES from Crypto.Hash import MD5 import binascii import urllib2 import string, random # algorithm MODE = AES.MODE_CBC def __getKeyObject(key): obj = AES.new(md5Encoding(key), MODE) return obj def md5Encoding(msg): ''' get md5 encrypted text @param ...
zhyu/PasswdManager
util.py
Python
gpl-3.0
1,732
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings import uuid class Migration(migrations.Migration): dependencies = [ ('ISS', '0011_poster_timezone'), ] operations = [ mi...
RyanJenkins/ISS
ISS/migrations/0012_privatemessage.py
Python
gpl-3.0
1,032
# -*- coding: utf-8 -*- """Terrain slope calculation, and ground range spacing calculation from DEM. Author: Michael Denbina Copyright 2016 California Institute of Technology. All rights reserved. United States Government Sponsorship acknowledged. This program is free software: you ...
mdenbina/kapok
kapok/lib/slope.py
Python
gpl-3.0
2,658
from behave import fixture, use_fixture import os def after_scenario(context, scenario): extensions = ["bin", "txt", "cas", "sym", "wav", "rom", "z80", "com", "ram"] # cleanup build temp files for i in range(0, 4): file = f"~tmppre.{i}" if os.path.isfile(file): os.remove(file)...
Fubukimaru/asMSX
test/environment.py
Python
gpl-3.0
588
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 from django.db.models import Q, Manager def parseCondition(condition, user): ''' ''' k = condition.get('key', 'name') k = { 'user': 'user__username', }.get(k, k) if not k: k = 'name' v = condition['value'] op = conditio...
maysara/pandora_image
pandora/document/managers.py
Python
gpl-3.0
3,174
#Intro2Program 2_6 Copyright Lesaria #This program is aiming to find index of String B twice occurring in A. This is based on given B occured several times in A. #Ask user for string A aString = raw_input("Give the string A: ") #Ask user for string B bString = raw_input("Give the string B: ") #Find 1st time's index ind...
Lesaria/Interview
Intro2Program2.py
Python
gpl-3.0
502
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-04 17:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pashinin', '0014_auto_20170910_0441'), ] operations = [ migrations.CreateMo...
pashinin-com/pashinin.com
src/pashinin/migrations/0015_qa.py
Python
gpl-3.0
873
import socket import logging import string import time import threading import multiprocessing import Queue import select import pakbus def hexdump(pkt): return " ".join(["{:02x}".format(ord(x)) for x in pkt]) # # Quote PakBus packet # def quote(pkt): pkt = string.replace(pkt, '\xBC', '\xBC\xDC') # quote \xB...
amm042/pypakutil
examples/paksock.py
Python
gpl-3.0
10,096
""" Test using HAR files in Python tests against the Django ReST framework. """ from django import http from rest_framework import response from test_har import django_rest_har as test_har from test_har import tests class HARDogfoodDRFTests(tests.HARDogfoodTestCase, test_har.HARTestCase): """ Test using HA...
rpatterson/test-har
test_har/tests/test_drf.py
Python
gpl-3.0
563
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
Vagab0nd/SiCKRAGE
lib3/twilio/rest/fax/v1/fax/__init__.py
Python
gpl-3.0
19,977
# """test_python_compat - Python output compatibility tests""" # Copyright © 2012-2018 James Rowe <jnrowe@gmail.com> # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of versionah. # # versionah is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public Lic...
JNRowe/versionah
tests/test_python_compat.py
Python
gpl-3.0
1,950
from sklearn import svm from sklearn.multiclass import OneVsRestClassifier, OneVsOneClassifier import pickle import sys import numpy as np def load_data(path): data = pickle.load(open(path, 'rb')) keys = sorted(list(data.keys())) X = [] y = [] for k in keys: for x in data[k]: X...
hrantzsch/signature-verification
tools/svm.py
Python
gpl-3.0
1,068
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2019-03-05 14:58 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('database', '0020_daymetda...
manterd/myPhyloDB
database/migrations/0021_auto_20190305_1458.py
Python
gpl-3.0
1,211
from django.contrib import admin from leaflet.admin import LeafletGeoAdmin from models import Stair, Photo from django.conf import settings class OverrideLeafletGeoAdmin(LeafletGeoAdmin): # straight hint @ https://github.com/makinacorpus/django-leaflet/pull/28#issuecomment-23943492 settings_overrides = { ...
bedubs/hkstairs
stairdb/admin.py
Python
gpl-3.0
1,433
from sysobjects.production.process_control import controlProcess from sysdata.production.process_control_data import controlProcessData from syscore.objects import arg_not_supplied, missing_data from sysdata.mongodb.mongo_generic import mongoDataWithSingleKey from syslogdiag.log_to_screen import logtoscreen PROCESS_C...
robcarver17/pysystemtrade
sysdata/mongodb/mongo_process_control.py
Python
gpl-3.0
1,876
Forked processes are a traditional way to structure parallel tasks, and they are a fun- damental part of the Unix tool set. Forking is based on the notion of copying programs: when a program calls the fork routine, the operating system makes a new copy of that program and its process in memory and starts running that...
iitjee/steppinsPython
SystemProgramming/Parallel System/01 Forking.py
Python
gpl-3.0
5,146
# Generated by Django 2.0.1 on 2018-01-24 18:25 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bot', '0039_auto_20180124_1522'), ] operations = [ migrations.AlterField( model_name='alertausuario', ...
foxcarlos/decimemijobot
bot/migrations/0040_auto_20180124_1525.py
Python
gpl-3.0
852
# This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus # # MAUS 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. # ...
mice-software/maus
bin/utilities/envelope_tool/lib/beam_setup.py
Python
gpl-3.0
12,059
def agts(queue): al = queue.add('al.py', ncpus=8, walltime=12 * 60) queue.add('al.agts.py', deps=[al], creates=['Al_conv_ecut.png', 'Al_conv_k.png']) if __name__ == '__main__': import pylab as plt from ase.utils.eos import EquationOfState from ase.io import read def fit(filename)...
robwarm/gpaw-symm
doc/tutorials/lattice_constants/al.agts.py
Python
gpl-3.0
1,167
# # Copyright (C) 2013-2014 Emerson Max de Medeiros Silva # # This file is part of ippl. # # ippl 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 late...
emersonmx/ippl
ippl/genetic_algorithm/chromosome.py
Python
gpl-3.0
852
import unittest import mock import github from github import Requester from prboard import utils, filters, settings, hub class TestGithub(unittest.TestCase): def setUp(self): pass def test_github_init(self): """ Test if Github gets instantiated with addditional methods """ g = hub....
kumarvaradarajulu/prboard
prboard/tests/unit/test_hub.py
Python
gpl-3.0
2,446
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
tasleson/targetd
targetd/nfs.py
Python
gpl-3.0
10,459
import os import shutil import hashlib from collections import namedtuple, defaultdict from calaldees.files.scan import fast_scan ProcessedFileType = namedtuple('ProcessedFileType', ('source_hash_group', 'dict_key', 'attachment_type', 'ext', 'salt')) class ProcessedFilesManager(object): FILE_TYPES = ( Pr...
calaldees/KaraKara
processmedia2/processmedia_libs/processed_files_manager.py
Python
gpl-3.0
3,137
# Copyright 2011 Brendan Kidwell <brendan@glump.net>. # # This file is part of caliload. # # caliload 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 ...
bkidwell/caliload
caliload/metadata.py
Python
gpl-3.0
3,883
# -*- coding: utf8 -*- from phystricks import * def QEPZooNndwiS(): pspict,fig = SinglePicture("QEPZooNndwiS") pspict.dilatation_X(1) pspict.dilatation_Y(1) h=2 A=Point(0,0) B=Point(4,0) C=Point(1,-h) D=Point(6,-h) d1=Segment(A,B).dilatation(1.5) d2=Segment(D,C).dilatation(1.5)...
LaurentClaessens/phystricks
testing/demonstration/phystricksQEPZooNndwiS.py
Python
gpl-3.0
671
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import unittest, time, re from selenium.webdriver.common.action_chains import ActionCh...
stvoutsin/pyrothorn
testing/gui-tests/test01-simple-query-1.py
Python
gpl-3.0
3,107
# Licensed under GPL version 3 - see LICENSE.rst import numpy as np from astropy.io import ascii from .base import FlatOpticalElement, FlatStack from ..math.utils import norm_vector, e2h, h2e class FlatBrewsterMirror(FlatOpticalElement): '''Flat mirror operated at the Brewster angle. Calculation of the Fres...
hamogu/marxs
marxs/optics/multiLayerMirror.py
Python
gpl-3.0
7,308
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-10 21:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clog', '0009_auto_20160410_0452'), ] operations = [ migrations.AlterModelOpt...
jaufrec/whatnext
clog/migrations/0010_auto_20160410_2149.py
Python
gpl-3.0
710
""" Apply permissions on a project. """ import sys import opal.core import opal.perm PERMISSIONS = { 'administrate': 'PROJECT_ALL' } def add_arguments(parser): """ Add command specific options """ opal.perm.add_permission_arguments(parser, PERMISSIONS.keys()) parser.add_argument('--project', ...
apruden/opal
opal-python-client/src/main/python/opal/perm_project.py
Python
gpl-3.0
1,309
from statistics import median import numpy as np from PyQt5.QtCore import QRegExp, pyqtSlot, pyqtSignal from PyQt5.QtGui import QRegExpValidator, QIcon from PyQt5.QtWidgets import QWidget, QSpinBox, QLabel, QComboBox, QSlider from urh import settings from urh.dev import config from urh.dev.BackendHandler import Backe...
jopohl/urh
src/urh/controller/widgets/DeviceSettingsWidget.py
Python
gpl-3.0
24,781
#!/usr/bin/env python3.5 """ guillaumecantin.pythonanywhere.com/simulation Web interface for simulating dynamical systems Current file: vanderpol.py """ from django.shortcuts import render from django.utils.html import escape # Scientific libraries from matplotlib import pyplot as plt import numpy as np from scipy.i...
guillaumecantin/guillaumecantin.github.io
source/simulation/vanderpol.py
Python
gpl-3.0
3,577
# # Copyright (C) 2009-2012 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...
hmpf/nav
python/nav/ipdevpoll/shadows/interface.py
Python
gpl-3.0
17,311
#This script is built as a prototype during Mozilla HelloWeb Hackathon Kolkata 2016 #An Interactive Artificial Intelligence with a friendly personality to teach 5 year olds about HTML and WEB #Copyright Protected Under GPL3 License | Follow the License | Send Pull Requests import re import py import requests imp...
ultimatepritam/HelloWeb
DoraTheExplorer.py
Python
gpl-3.0
7,919
import sys, complete from argparse import ArgumentParser from config import config from file import load, save from hooks import post_add def add(conf): parser = ArgumentParser(usage="%(prog)s add arguments") parser.add_argument("-n", required=True, dest="name", help="password name") parser.add_argument("-...
lkrotowski/passwdk
src/passwdk/main.py
Python
gpl-3.0
2,401
from rest_framework.permissions import BasePermission class IsSuperUser(BasePermission): def has_object_permission(self, request, view, obj): return request.user.is_superuser
pkom/gesiesweb
gesiesweb/api/permissions.py
Python
gpl-3.0
188
class MedianSorter(): def __init__(self, median): self.__median = median def __call__(self, value1, value2): v1 = value1['age'] v2 = value2['age'] return -1 if abs(self.__median - v1) < abs(self.__median - v2) else 1
otaviosoares/search-artist-challenge
src/search_artists/search_artists/sorter.py
Python
gpl-3.0
258
import os import requests from flask import Flask, request, abort, redirect, jsonify from requests.exceptions import RequestException import quicklatex application = Flask(__name__) slack_client_id = os.environ['SLACK_CLIENT_ID'] slack_client_secret = os.environ['SLACK_CLIENT_SECRET'] slack_verification_token = os....
jamy015/slack-latex-bot
application.py
Python
gpl-3.0
2,527
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'client_fva/ui/ui_elements/mysignatures.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MySignatures(object): def setupUi(se...
luisza/dfva_client
src/client_fva/ui/mysignaturesui.py
Python
gpl-3.0
2,400
#!/usr/bin/python import yaml import os from pypodcaster.podcast import Channel, Item def test_channel(): path = os.path.dirname(__file__) sources_list = [path] options = yaml.safe_load(open("%s/channel.yml" % path)) print(Channel(sources_list, options).render_xml()) def test_item(): path = os....
mantlepro/pypodcaster
tests/test_pypodcaster.py
Python
gpl-3.0
467
import datetime name=["Wycliff","Muriithi"] student = {"name":name,"birthdate":datetime.date(1994,4,2),"phonenumber":"0714352764"} fullname = student.get('name') print fullname[1] print fullname[0] +" and "+ fullname[1] print student.get('phonenumber') bdate = student.get('birthdate') print bdate today = (datetime.da...
wycliffmuriithi/andela-lite-exercises
Code/students.py
Python
gpl-3.0
373
from freenit.schemas.user import BaseUserSchema class UserSchema(BaseUserSchema): pass
mekanix/flask-bootstrap-sql-rest
freenit/project/project/schemas/user.py
Python
gpl-3.0
93
# -*- coding: utf-8 -*- ''' Funimation|Now Add-on Copyright (C) 2016 Funimation|Now 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 yo...
Protocol-X/script.video.funimationnow
resources/lib/modules/menunav.py
Python
gpl-3.0
6,384
#!/usr/bin/python3 # encoding=utf-8 import time from socket import socket from select import select from hashlib import sha1 import pygame from pygame.locals import * from game import Player, Game TICKET_SHA1SUM = '7aa8398d0e80429a3380540b86f08987d0fb3e77' ''' 客户端发往服务器端的消息前缀: N 设置昵...
PyBargain/ice-mud-game
server.py
Python
gpl-3.0
3,444
# [1] https://doi.org/10.1016/0009-2614(91)90115-P # Helgaker, 1991 import numpy as np from scipy.optimize import newton from pysisyphus.tsoptimizers.TSHessianOptimizer import TSHessianOptimizer class TRIM(TSHessianOptimizer): def optimize(self): energy, gradient, H, eigvals, eigvecs, resetted = s...
eljost/pysisyphus
pysisyphus/tsoptimizers/TRIM.py
Python
gpl-3.0
1,861
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os __RCSID__ = "$Id$" def VmB(vmKey): __memScale = {"kB": 1024.0, "mB": 1024.0 * 1024.0, "KB": 1024.0, "MB": 1024.0 * 1024.0} __vmKeys = [ "VmPeak:", "VmSize:", "VmLck:...
ic-hep/DIRAC
src/DIRAC/Core/Utilities/MemStat.py
Python
gpl-3.0
1,174
# ################ A simple graphical interface which communicates with the server ##################################### # While client_gui only allows to set the facelets with the mouse, this file (client_gui2) also takes input from the # webcam and includes sliders for some opencv parameters. from tkinter import * ...
hkociemba/RubiksCube-TwophaseSolver
package_src/twophase/client_gui2.py
Python
gpl-3.0
12,351
#!/usr/bin/python -u # # Application Monitoring (version 1.5) # Alejandro Calderon @ ARCOS.INF.UC3M.ES # GPL 3.0 # import math import time import psutil import threading import multiprocessing import subprocess import os import sys import getopt import json def print_record ( format, data ): try: ...
acaldero/moon
app-mon.py
Python
gpl-3.0
5,026
import colorsys import logging from pyhap.accessory import Accessory from pyhap.const import CATEGORY_LIGHTBULB, CATEGORY_FAN from hackoort.bulb import Bulb def hls2rgb(h, l, s): """Convert h, l, s in 0-1 range to rgb in 0-255 :param h: hue :param l: luminance :param s: saturation :return: red,...
emsi/hackoort
python/oorthap/bulb.py
Python
gpl-3.0
4,950
# dr14_t.meter: compute the DR14 value of the given audiofiles # Copyright (C) 2011 Simone Riva # # 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...
magicgoose/dr14_t.meter
dr14tmeter/table.py
Python
gpl-3.0
16,975
# sqlalchemy import re from sqlalchemy import func, select, and_, or_ from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy_enum34 import EnumType from flask import current_app from . import * from compair.core import db, display_name_generator...
ubc/compair
compair/models/lti_models/lti_user.py
Python
gpl-3.0
9,485
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta, date from dateutil.relativedelta import relativedelta import logging from operator import itemgetter from werkzeug import url_encode from openerp import SUPERUSER_ID from opener...
web30s/odoo-9.0c-20160402
hello/templates/openerp/addons/crm/crm_lead.py
Python
gpl-3.0
61,664
# coding=UTF-8 import pandas as pd import numpy as np import pickle from axiomatic.base import AxiomSystem, MinMaxAxiom, MaxAxiom, MinAxiom, ChangeAxiom, IntegralAxiom from axiomatic.base import RelativeChangeAxiom, FirstDiffAxiom, SecondDiffAxiom, TrainingPipeline from axiomatic.axiom_training_stage import Frequency...
victorshch/axiomatic
integration_test_frequecy_axioms.py
Python
gpl-3.0
1,653
#main menu opcionMenu = 0 print "Menu principal" print "1) Submenu 1" print "2) Submenu 2" print "3) Retornar" opcionMenu = input("Opcion: ") if opcionMenu == 1: print "\nSubmenu 1" print "1) Opcion 1 submenu 1" print "2) Opcion 2 submenu 1" print "3) Volver a menu principal" opcionSubMenu = input("O...
xbash/LabUNAB
13_menu/menu_04.py
Python
gpl-3.0
1,207
def solve(s): if len(s) != 80: return '0'*80 elif s.startswith('1111') and not s.endswith('1111'): return s elif s.endswith('1111') and not s.startswith('1111'): return s[::-1] else: return '0'*80 def main(): ## with open('input.txt', 'r') as f: data = f.read().splitlines() s = data[0] ## # s = i...
Lipen/LipenDev
Azeroth/Northrend/TP Olymp/TaskB.py
Python
gpl-3.0
526
import json import requests stream_url = "https://api.new.livestream.com/accounts/23093026/events/6897778/" def get_manifest(): r = requests.get(stream_url) return r.content def main(): manifest = json.loads(get_manifest()) feeds = manifest['feed']['data'] parsed_list = [] for i in feeds: ...
hwndu/hwndu-tools
archiver/archive.py
Python
gpl-3.0
1,487
from flask import Blueprint, render_template, flash bp = Blueprint("home", __name__) @bp.route("/") def index(): return render_template("index.html")
bbglab/wok
web/home.py
Python
gpl-3.0
152
import math from django import template from django.template import RequestContext from django.template.loader import get_template from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from askbot.utils import functions from askbot....
divio/askbot-devel
askbot/templatetags/extra_tags.py
Python
gpl-3.0
4,079
# COPYRIGHT (C) 2020-2021 Nicotine+ Team # COPYRIGHT (C) 2016-2017 Michael Labouebe <gfarmerfr@free.fr> # COPYRIGHT (C) 2008-2009 Quinox <quinox@users.sf.net> # COPYRIGHT (C) 2006-2009 Daelstorm <daelstorm@gmail.com> # # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # This program is free software: you can ...
Nicotine-Plus/nicotine-plus
pynicotine/gtkgui/fileproperties.py
Python
gpl-3.0
5,188
# -*- coding: utf-8 -*- #==============================================================================# # # # Offline KI # # ...
TOC-Shard/moul-scripts
Python/xUserKIBase.py
Python
gpl-3.0
26,723
from stream import plugin from stream.scrapers import scraper from stream.ga import tracked from stream.caching import cached_route, shelf from stream.utils import ensure_fanart from stream.library import library_context BASE_URL = "%s/" % plugin.get_setting("base_eztv") HEADERS = { "Referer": BASE_URL, } SHOW_LI...
frjanibo/Stream
resources/site-packages/stream/scrapers/eztv.py
Python
gpl-3.0
9,432
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('spellweb', '0003_auto_20140920_0006'), ] operations = [ migrations.CreateModel( name='Attempt', fiel...
shearichard/spellsplash
splsplsh_project/spellweb/migrations/0004_auto_20140920_0007.py
Python
gpl-3.0
1,789
#!/usr/bin/env python3 import sys from util import proctal_cli, sleeper class Error(Exception): pass class UnexpectedMatchValue(Error): def __init__(self, expected, found): self.expected = expected self.found = found message = "Expected to match {expected} but got {found}.".format( ...
daniel-araujo/proctal
src/cli/tests/dump-range.py
Python
gpl-3.0
2,243
# -*- coding: UTF-8 -*- from django.contrib import admin from .models import * class UserAdmin(admin.ModelAdmin): list_display = ('nickName', 'realName') admin.site.register(User, UserAdmin) class UserLoginStatusAdmin(admin.ModelAdmin): list_display = ('key', 'description') admin.site.register(UserLogin...
xiaoyexu/xCRM
crm/admin.py
Python
gpl-3.0
12,452
#!/usr/bin/env python # -*- coding: utf-8 -*- """ NetGen is a tool for financial network analysis Copyright (C) 2013 Tarik Roukny (troukny@ulb.ac.be) 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, v...
troukny/NetGen
src/network_handler.py
Python
gpl-3.0
2,563
#!/usr/bin/env python # Copyright (c) 2013 Calin Crisan # This file is part of motionEye. # # motionEye 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) a...
ccrisan/motioneye
motioneye/meyectl.py
Python
gpl-3.0
8,206
import urlparse import urllib import uuid import hashlib import hmac import base64 import urllib2 import time import json import gzip import os import cookielib from StringIO import StringIO import requests import xbmc from globals import ADDON_PATH_PROFILE SETTINGS_FILE = 'adobe.json' UA_ATV = 'AppleCoreMedia/1.0.0....
kodi-addons/plugin.video.espn_3
resources/lib/adobe_activate_api.py
Python
gpl-3.0
11,244
from P_14 import * print("Shape of data: {}".format(iris_dataset["data"].shape)) input()
TNT-Samuel/Coding-Projects
Machine Learning with Python/Chapter 1/P_15.py
Python
gpl-3.0
90
# AsteriskLint -- an Asterisk PBX config syntax checker # Copyright (C) 2015-2016 Walter Doekes, OSSO B.V. # # 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 ...
ossobv/asterisklint
asterisklint/app/vall/app_directed_pickup.py
Python
gpl-3.0
1,203
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-31 17:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
tkupek/tkupek-elearning
tkupek_elearning/elearning/migrations/0001_initial.py
Python
gpl-3.0
1,728
########################################################################## # # This file is part of Lilith # made by J. Bernon and B. Dumont # # Web page: http://lpsc.in2p3.fr/projects-th/lilith/ # # In case of questions email bernon@lpsc.in2p3.fr dum33@ibs.re.kr # # # Lilith is free software: you can redistribu...
jeremy-bernon/Lilith
lilith/internal/effectivemu.py
Python
gpl-3.0
2,350
#! /usr/bin/python3 # -*- coding: utf-8 -*- import random """A faire : convertir les questions en cloze pour gérer les unités réécrire les feedback en respectant la présentation DIER écrire les dernière questions """ def convert_sci(nombre): if (nombre>1000) or (nombre<0.1): nombre_sciE='%.4E' %(nomb...
jn-gautier/exercices_moodle
phys/elec/elec_base.py
Python
gpl-3.0
23,892
"""Welcome cog Sends welcome DMs to users that join the server. """ import os import logging import discord from discord.ext import commands from __main__ import send_cmd_help # pylint: disable=no-name-in-module from cogs.utils.dataIO import dataIO # Requires checks utility from: # https://github.com/Rapp...
Injabie3/lui-cogs
welcome/welcome.py
Python
gpl-3.0
20,055
# -*- coding: utf-8 -*- """ Started on mon, apr 23rd, 2018 @author: carlos.arana """ # Librerias utilizadas import pandas as pd import sys module_path = r'D:\PCCS\01_Dmine\Scripts' if module_path not in sys.path: sys.path.append(module_path) from VarInt.VarInt import VarInt from classes.Meta import Meta from Com...
Caranarq/01_Dmine
04_Edificaciones/P0406/P0406.py
Python
gpl-3.0
2,794
#!/usr/bin/env python from distutils.core import setup setup( name='sewpy', version='1.0dev', packages=['sewpy'], description='Source Extractor Wrapper for Python', long_description=open('README.rst').read(), author='The MegaLUT developers', license='GPLv3', url='http://github.com/megalut/sewpy' )
megalut/sewpy
setup.py
Python
gpl-3.0
310
import unittest import math def main(): # read input nv = int(input().strip()) tree_raw = [ int(t) for t in input().strip().split(' ')] nexperiments = int(input().strip()) exp = [] for _ in range(nexperiments): exp.append( [ int(t) for t in input().strip().split(' ')] ) nodes =...
tuergeist/HackerRank
contests/w23/gravity1.py
Python
gpl-3.0
3,805
from etb_manager import ETBNetwork from etb_tests import etb_test, ETBTest from etb.terms import mk_subst, mk_map, mk_stringconst, mk_idconst, mk_numberconst, mk_claim, mk_literal from etb.parser import parse_literal class RemoteTest(ETBTest): @etb_test def invalid(self): query = self.etb.etb().query...
SRI-CSL/ETB
tests/remote_queries.py
Python
gpl-3.0
1,959
# This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus # # MAUS 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. # # MAUS...
mice-software/maus
src/common_py/calibration/get_kl_calib.py
Python
gpl-3.0
3,304