code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Zomboided # # 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)...
Zomboided/VPN-Manager
managefiles.py
Python
gpl-2.0
11,679
# -*- coding: utf-8 -*- """ uds.warnings ~~~~~~~~~~~~ :copyright: Copyright (c) 2015, National Institute of Information and Communications Technology.All rights reserved. :license: GPL2, see LICENSE for more details. """ import warnings def deprecated(func): """This is a decorator which can be used to mark func...
nict-isp/uds-sdk
uds/warnings.py
Python
gpl-2.0
979
__author__ = 'dako' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element_by_...
EvilDako/PyTraining
fixture/session.py
Python
gpl-2.0
1,421
#!/usr/bin/env python # -*- coding: utf-8 -*- from time import gmtime, strftime import ephem import wx.calendar # Test # here = ephem.Observer() # here.lat = '-17.576166667' # here.lon = '-149.618575000' class App(wx.App): def OnInit(self): self.frame = MyFrame("Lunacy", (50, 60), (640, 220)) self.frame.Show() ...
wadda/Lunacy
lunacy.py
Python
gpl-2.0
10,999
#-------------------------------------------------- # Revision = $Rev: 20 $ # Date = $Date: 2011-08-05 20:42:24 +0200 (Fri, 05 Aug 2011) $ # Author = $Author: stefan $ #-------------------------------------------------- from pluginInterfaces import PluginFit, Parameter,leastsqFit import numpy as np class PluginFit...
wakalixes/sqldataplot
plugins/pluginFitSigmoidal.py
Python
gpl-2.0
1,665
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- """ sha1Hash_test.py Unit tests for sha1.py """ from crypto.hash.sha1Hash import SHA1 import unittest import struct assert struct.calcsize('!IIIII') == 20, '5 integers should be 20 bytes' class SHA1_FIPS180_TestCases(unittest.TestCase): """ SHA-1...
dknlght/dkodi
src/script.module.cryptopy/lib/crypto/hash/sha1Hash_test.py
Python
gpl-2.0
2,199
#!C:\Users\SeanSaito\Dev\aviato\flask\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'kartograph.py==0.6.8','console_scripts','kartograph' __requires__ = 'kartograph.py==0.6.8' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('kartograph.py==0.6.8...
hrishioa/Aviato
flask/Scripts/kartograph-script.py
Python
gpl-2.0
364
# Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper 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 any later version. # Infoshopkeeper ...
johm/infoshopkeeper
popups/checkout.py
Python
gpl-2.0
2,958
from datetime import * from Tweetstream import * from UserAnalyser import * from TimeAnalyser import * import math import sys import pickle #Frequency over the common def load_list(filein): d = dict() for l in filein: l = eval(l) d[l[0]] = l[1] return d if __name__ == "__main__": follow = load_list(open(sys....
agdavis/contextual_features
gen_user_followers.py
Python
gpl-2.0
1,139
class Solution(object): def setZeroes(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ width,height = len(matrix[0]),len(matrix) for i in xrange(height): foundzero = False ...
hufeiya/leetcode
python/73_Set_Matrix_Zeroes.py
Python
gpl-2.0
1,004
""" core/api/serializers.py is the module for core model api data serializers """ #import core django module from django.contrib.auth.models import User, Permission #import external modules from rest_framework import serializers #import project modules from core.models import (Product, ProductCategory, UnitOfMea...
eHealthAfrica/LMIS
LMIS/core/api/serializers.py
Python
gpl-2.0
3,856
def hamming(s,t): dist = 0 for x in range(len(s)): if s[x]!=t[x]: dist+=1 return dist
adijo/rosalind
old/hamming_distance.py
Python
gpl-2.0
100
# ------------------------------------------------------------------------------------------------- # Rick, a Rust intercal compiler. Save your souls! # # Copyright (c) 2015-2021 Georg Brandl # # This program is free software; you can redistribute it and/or modify it under the terms of the # GNU General Public License...
birkenfeld/rick
test.py
Python
gpl-2.0
4,893
""" Windows Process Control winprocess.run launches a child process and returns the exit code. Optionally, it can: redirect stdin, stdout & stderr to files run the command as another user limit the process's running time control the process window (location, size, window state, desktop) Works on Windows NT, 20...
alexei-matveev/ccp1gui
jobmanager/winprocess.py
Python
gpl-2.0
7,039
# pylint: disable = C0301 from bs4 import BeautifulSoup from urllib2 import urlopen import pandas as pd pos_idx_map = { 'qb': 2, 'rb': 3, 'wr': 4, 'te': 5, } def make_url(pos, wk): ii = pos_idx_map[pos] fstr = "http://fantasydata.com/nfl-stats/nfl-fantasy-football-stats.aspx?fs=1&stype=0&sn=1...
yikelu/nfl_fantasy_data
htmls2csvs.py
Python
gpl-2.0
2,265
#!/usr/bin/env python # coding: utf-8 """ Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unle...
QuantiModo/QuantiModo-SDK-Python
SwaggerPetstore/models/json_error_response.py
Python
gpl-2.0
1,773
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 versio...
WoLpH/EventGhost
eg/Utils.py
Python
gpl-2.0
17,930
#!/bin/python import re import sys import os from datetime import date class VersionHandler: def __init__(self, file): self.file = file self.major = 0 self.minor = 0 self.revision = 0 self.build = 1 self.touch() def read(self): try: f = open(self.file, 'r') lines = f.readlines() f.close() ...
mickem/nscp
build/python/VersionHandler.py
Python
gpl-2.0
2,824
"""Template filters and tags for helping with dates and datetimes""" # pylint: disable=W0702,C0103 from django import template from nav.django.settings import DATETIME_FORMAT, SHORT_TIME_FORMAT from django.template.defaultfilters import date, time from datetime import timedelta register = template.Library() @registe...
sigmunau/nav
python/nav/django/templatetags/date_and_time.py
Python
gpl-2.0
1,012
import time import midipy as midi midi.open(128, 0, "midipy test", 0) for (note, t) in [(48,0.5),(48,0.5),(50,1.0),(48,1.0),(53,1.0),(52,1.0), (48,0.5),(48,0.5),(50,1.0),(48,1.0),(55,1.0),(53,1.0)]: midi.note_on(note,127) time.sleep(t/2) midi.note_off(note,127) midi.close()
tcoxon/wiitar
midipy_src/test.py
Python
gpl-2.0
311
import os import os.path from amuse.units import units from amuse.datamodel import Particle from amuse.ext.star_to_sph import pickle_stellar_model from amuse.community.mesa.interface import MESA as stellar_evolution_code from xiTau_parameters import triple_parameters def evolve_giant(giant, stop_radius): stell...
hilaglanz/TCE
articles/A_evolve_outer_star_to_giant.py
Python
gpl-2.0
1,405
""" WSGI config for ahaha project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
pimiento/captures
captures/wsgi.py
Python
gpl-2.0
1,132
from gi.repository import Gtk import gourmet.gtk_extras.dialog_extras as de from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin from .recipe_emailer import RecipeEmailer from gettext import gettext as _ class EmailRecipePlugin (MainPlugin, UIPlugin): ui_string = ''' <menubar name="Rec...
thinkle/gourmet
gourmet/plugins/email_plugin/emailer_plugin.py
Python
gpl-2.0
1,934
# encoding: utf-8 # module PIL._imaging # from /usr/lib/python2.7/dist-packages/PIL/_imaging.so # by generator 1.135 # no doc # no imports # Variables with simple values DEFAULT_STRATEGY = 0 FILTERED = 1 FIXED = 4 HUFFMAN_ONLY = 2 jpeglib_version = '8.0' PILLOW_VERSION = '2.5.1' RLE = 3 zlib_version = '1.2.8' ...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PIL/_imaging.py
Python
gpl-2.0
3,425
# Copyright (C) 2008-2010 INRIA - EDF R&D # Author: Damien Garaud # # This file is part of the PuppetMaster project. It checks the module # 'network'. # # This script is free; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; eit...
garaud/puppetmaster
test/network_test.py
Python
gpl-2.0
8,973
#! /usr/bin/env python """ ``climactic.suite`` ------------------- .. autoclass:: ClimacticTestSuite """ import logging import unittest from pathlib import Path from climactic.case import ClimacticTestCase logger = logging.getLogger(__name__) class ClimacticTestSuite(unittest.TestSuite): """ A collection...
b33j0r/climactic
climactic/suite.py
Python
gpl-2.0
2,252
#!hyphen-venv/bin/python import imp from migrate.versioning import api from app import db from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO migration = SQLALCHEMY_MIGRATE_REPO + \ '/versions/%03d_migration.py' % \ (api.db_version( ...
bkfunk/HyphenCMS
db_migrate.py
Python
gpl-2.0
1,012
# pylint:disable=R0201 from OpenOrange import * from User import User from RetroactiveAccounts import RetroactiveAccounts class HeirFinder(RetroactiveAccounts): def doReplacements(self, txt): d = {1:"ONE", 2:"TWO"} us = User.bring("USER") txt = txt.replace(":1", us.Name + d[1]) re...
ancho85/pylint-playero-plugin
tests/input/func_noerror_query_heir.py
Python
gpl-2.0
522
from __future__ import division from __future__ import print_function from __future__ import absolute_import import wx from .common import update_class class Separator(wx.StaticLine): def __init__(self, parent): wx.StaticLine.__init__(self, parent.get_container(), -1, wx.Defau...
lunixbochs/fs-uae-gles
launcher/fs_uae_launcher/fsui/wx/separator.py
Python
gpl-2.0
394
# multiAgents.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to # http://inst.ee...
sumitb/cse537
multiagent/multiAgents.py
Python
gpl-2.0
7,379
# -*- coding: utf-8 -*- # # This file is part of CERN Document Server. # Copyright (C) 2016, 2019 CERN. # # CERN Document Server 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 # Licens...
CERNDocumentServer/cds
tests/e2e/conftest.py
Python
gpl-2.0
5,085
import wpilib import hal from wpilib import RobotDrive class KwarqsDriveMech(RobotDrive): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.weight_multiplier = 1 def set_multiplier(self, in_multi = None): if in_multi != None : sel...
frc2423/2015
recycle_rush/custom/kwarqs_drive_mech.py
Python
gpl-2.0
3,114
#!/usr/bin/python3 import sys from gi.repository import GExiv2 phototags = { 'Exif.Photo.ExposureTime': "Belichtung:\t", 'Exif.Photo.FNumber': "Blende:\t\tF", # 'Exif.Photo.ExposureProgram', 'Exif.Photo.ISOSpeedRatings': "ISO:\t\t", # 'Exif.Photo.SensitivityType', # 'Exif.Photo.ExifVersion', ...
pseyfert/pyexiv2-scripts
dumpPHOTO.py
Python
gpl-2.0
997
""" WSGI config for mongobacked project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mongobacked.settings") from djang...
ludi1001/IonMedicationSystem
mongobacked/mongobacked/wsgi.py
Python
gpl-2.0
397
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
rajul/tvb-framework
setup.py
Python
gpl-2.0
2,824
#!/usr/bin/env python '''# shufflez.py ''' # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following ...
Logic-gate/shuffelz
shuffelz.py
Python
gpl-2.0
4,742
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('codecompetitions', '0006_auto_20140805_2234'), ] operations = [ migrations.AddField( model_name='problem', ...
baryon5/mercury
codecompetitions/migrations/0007_auto_20140805_2253.py
Python
gpl-2.0
1,067
# Copyright (C) 2009 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.net> # # 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 # ...
veusz/veusz
veusz/document/emf_export.py
Python
gpl-2.0
14,778
# # The Python Imaging Library. # $Id$ # # TIFF file handling # # TIFF is a flexible, if somewhat aged, image file format originally # defined by Aldus. Although TIFF supports a wide variety of pixel # layouts and compression methods, the name doesn't really stand for # "thousands of incompatible file formats," it jus...
ppizarror/Ned-For-Spod
bin/external/pil/TiffImagePlugin.py
Python
gpl-2.0
27,979
#!/usr/local/bin/python3 class TestClass(object): def foo(): doc = "The foo property." def fget(self): return self._foo def fset(self, value): self._foo = value def fdel(self): del self._foo return locals() foo = property(**foo()) ...
Etzeitet/pythonjournal
pythonjournal/proptest.py
Python
gpl-2.0
953
#!/usr/bin/python import sys, os, urllib, argparse, base64, time, threading, re from gi.repository import Gtk, WebKit, Notify webView = None def refresh(widget, event): global webView webView.reload() window_title = '' def HandleTitleChanged(webview, title): global window_title window_title = title ...
DavidMulder/simple_browse
simple_browse.py
Python
gpl-2.0
8,391
""" WSGI config for nykampweb project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SET...
dqnykamp/nykampweb
nykampweb/wsgi.py
Python
gpl-2.0
395
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2007 Zuza Software Foundation # # This file is part of translate. # # translate 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...
lehmannro/translate
storage/wordfast.py
Python
gpl-2.0
16,175
import logging import struct from memory import Memory from network import Mac, IpAddress from gbe import Gbe LOGGER = logging.getLogger(__name__) # Offsets for fields in the memory map, in bytes OFFSET_CORE_TYPE = 0x0 OFFSET_BUFFER_SIZE = 0x4 OFFSET_WORD_LEN = 0x8 OFFSET_MAC_ADDR = 0xc OFFSET_IP_ADDR = ...
ska-sa/casperfpga
src/onegbe.py
Python
gpl-2.0
26,401
""" Django settings for Outcumbent project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
praxeo/outcumbent
Outcumbent/settings.py
Python
gpl-2.0
2,140
""" This package supplies tools for working with automated services connected to a server. It was written with IRC in mind, so it's not very generic, in that it pretty much assumes a single client connected to a central server, and it's not easy for a client to add further connections at runtime (But possible, though y...
kaaveland/anybot
im/__init__.py
Python
gpl-2.0
449
''' Access Control Lists testing based on newpynfs framework Aurelien Charbon - Bull SA ''' from random_gen import * from optparse import OptionParser import commands import os import threading import time import random alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-() ~' t_alphabet=len(a...
anthony-kolesov/arc_ltp
testcases/network/nfsv4/acl/test_long_acl.py
Python
gpl-2.0
1,341
# kamene.contrib.description = Label Distribution Protocol (LDP) # kamene.contrib.status = loads # http://git.savannah.gnu.org/cgit/ldpscapy.git/snapshot/ldpscapy-5285b81d6e628043df2a83301b292f24a95f0ba1.tar.gz # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
phaethon/scapy
kamene/contrib/ldp.py
Python
gpl-2.0
13,902
#common sets up the conduit environment from common import * #setup test test = SimpleSyncTest() #Setup the key to sync gconf = test.get_dataprovider("GConfTwoWay") gconf.module.whitelist = ['/apps/metacity/general/num_workspaces'] folder = test.get_dataprovider("TestFolderTwoWay") test.prepare(gconf, folder) test.s...
arsfeld/conduit
test/python-tests/TestSyncGConfFolder.py
Python
gpl-2.0
1,001
from razer.client import DeviceManager from razer.client import constants as razer_constants # Create a DeviceManager. This is used to get specific devices device_manager = DeviceManager() print("Found {} Razer devices".format(len(device_manager.devices))) print() # Disable daemon effect syncing. # Without this, th...
z3ntu/razer-drivers
examples/basic_effect.py
Python
gpl-2.0
718
"""Pets now have a description Revision ID: 0c431867c679 Revises: 5b1bdc1f3125 Create Date: 2016-11-07 18:36:25.912155 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0c431867c679' down_revision = '5b1bdc1f3125' branch_labels = None depends_on = None def upgr...
asif-mahmud/Pyramid-Apps
pethouse/alembic/versions/0c431867c679_pets_now_have_a_description.py
Python
gpl-2.0
659
class movie: """Stores movie metadata""" # The constructor takes # - The Title # - The youtube trailer # - The poster image URL def __init__(self, title, youtube_trailer, poster_url): self.title = title self.trailer_youtube_url = youtube_trailer self.poster_image...
amilendra/Udacity_FullStack_P1_MovieTracker
media.py
Python
gpl-2.0
338
from __future__ import with_statement from fabric.api import task @task def md5(): """ Check MD5 sums (unavailable, empty, with content) """ import hashlib from fabric.api import cd, hide, run, settings import fabtools with cd('/tmp'): run('touch f1') assert fabtools.f...
juanantoniofm/accesible-moodle
fabtools/tests/fabfiles/md5.py
Python
gpl-2.0
590
# -*- coding: utf-8 -*- """ Emotiv acquisition : Reverse engineering and original crack code written by Cody Brocious (http://github.com/daeken) Kyle Machulis (http://github.com/qdot) Many thanks for their contribution. Need python-crypto. """ import multiprocessing as mp import numpy as np import msgpack...
Hemisphere-Project/Telemir-DatabitMe
Telemir-EEG/pyacq/pyacq/core/devices/emotiv.py
Python
gpl-2.0
12,623
# -*- coding: utf-8 -*- # # Nitrate is copyright 2010 Red Hat, Inc. # # Nitrate 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 pr...
tkdchen/nitrate-xmlrpc
nitratexmlrpc/api/user.py
Python
gpl-2.0
5,535
# # # Copyright 2013-2014 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (ht...
geimer/easybuild-framework
test/framework/toy_build.py
Python
gpl-2.0
33,739
from utils import textAppend, textPrepend, textCut, textEditLastChar, error, textCursorPos class File: """ Represents a file (A separated class allow to open several files at a time. The class also holds the whole file content. (The vim buffers only store either the accepted chunks, or the editing statement) """ ...
QuanticPotato/vcoq
plugin/file.py
Python
gpl-2.0
4,084
# -*- coding:utf-8 -*- import tradeStrategy as tds import sendEmail as se import tradeTime as tt import tushare as ts import pdSql_common as pds from pdSql import StockSQL import numpy as np import sys,datetime from pydoc import describe from multiprocessing import Pool import os, time import file_config ...
allisnone/pytrade
low_high33_backtest.py
Python
gpl-2.0
42,194
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from django.db import models from django.apps import apps from empresa.models import Empresa import json import os import tempfile import datetime import requests class Parking(models.Model): empresa = models.OneToOneField(Empresa) ...
amd77/parker
inventario/models.py
Python
gpl-2.0
7,559
# -*- coding: utf-8 -*- """ Created on Thu Nov 19 17:38:50 2015 @author: deep """ from binaryTree import BTree, generateRandomTree, inorder def largestBST(root): if root.left is None and root.right is None: return True, 1, root.value, root.value if root.left: isBSTL, sizeL, minL, maxL = large...
ddeepak6992/Algorithms
Binary-Tree/largest_BST_in_a_binary_tree.py
Python
gpl-2.0
953
from collections import OrderedDict from rest_framework import pagination from rest_framework.response import Response __author__ = 'alexandreferreira' class DetailPagination(pagination.PageNumberPagination): def get_paginated_response(self, data): return Response(OrderedDict([ ('count', sel...
alexandreferreira/namesearch-example
namesearch/pagination.py
Python
gpl-2.0
948
## # Copyright 2013-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
pescobar/easybuild-framework
easybuild/toolchains/gcccuda.py
Python
gpl-2.0
1,443
#!/usr/bin/python3.3 import unittest import sys sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation") from datetime import time from time_conv import Time class TimeTestCase(unittest.TestCase): ''' Tests with numbered degrees of bad or good dat...
paradiseOffice/sandbox_API_v1.0
paradise_office_site/sandbox_v1.0/cygnet_maker/cy_tests/test_time.py
Python
gpl-2.0
1,622
#!/usr/bin/python3 import argparse import traceback import sys import netaddr import requests from flask import Flask, request from jinja2 import Environment, FileSystemLoader, TemplateNotFound endpoints = "read/networks read/oplog read/snmp read/switches-management public/distro-tree public/config public/dhcp publ...
tech-server/gondul
templating/templating.py
Python
gpl-2.0
3,215
from datetime import datetime from grazyna.utils import register @register(cmd='weekend') def weekend(bot): """ Answer to timeless question - are we at .weekend, yet? """ current_date = datetime.now() day = current_date.weekday() nick = bot.user.nick if day in (5, 6): answer = "Ocz...
firemark/grazyna
grazyna/plugins/weekend.py
Python
gpl-2.0
562
from kvmap.code.projections import * from urllib2 import urlopen from httplib import HTTPConnection from threading import Thread from kivy.logger import Logger from kivy.loader import Loader from os.path import join, dirname import time, os import hashlib try: from pyproj import Proj from xml.etree import Element...
jchome/LocalGuide-Mobile
kvmap/overlays/WMSOverlayServer.py
Python
gpl-2.0
5,614
# -*- coding: utf-8 -*- # Copyright (C) 2015 Luis López <luis@cuarentaydos.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) any late...
ldotlopez/appkit
tests/config.py
Python
gpl-2.0
2,801
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bugman.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
aliasav/Bugman
bugman/manage.py
Python
gpl-2.0
249
import ctypes.wintypes as ctypes import braille import brailleInput import globalPluginHandler import scriptHandler import inputCore import api INPUT_MOUSE = 0 INPUT_KEYBOARD = 1 INPUT_HARDWARE = 2 MAPVK_VK_TO_VSC = 0 KEYEVENTF_EXTENDEDKEY = 0x0001 KEYEVENTF_KEYUP = 0x0002 KEYEVENT_SCANCODE = 0x0008 KEY...
nishimotz/NVDARemote
addon/globalPlugins/remoteClient/input.py
Python
gpl-2.0
3,588
# -*- coding: utf-8 -*- from imio.history.config import HISTORY_COMMENT_NOT_VIEWABLE from imio.history.interfaces import IImioHistory from imio.history.testing import IntegrationTestCase from plone import api from plone.memoize.instance import Memojito from Products.Five.browser import BrowserView from zope.component ...
IMIO/imio.history
src/imio/history/tests/test_documentbylineviewlet.py
Python
gpl-2.0
3,189
from django import template from django.template.loader_tags import BaseIncludeNode from django.template import Template from django.conf import settings from pages.plugins import html_to_template_text, SearchBoxNode from pages.plugins import LinkNode, EmbedCodeNode from pages import models from django.utils.text impo...
mivanov/editkit
editkit/pages/templatetags/pages_tags.py
Python
gpl-2.0
6,764
from opencvBuilder import exists,generate
bverhagen/openCV-sconsbuilder
opencvBuilder/__init__.py
Python
gpl-2.0
42
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "umiss_project.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
CadeiraCuidadora/UMISS-backend
umiss_project/manage.py
Python
gpl-3.0
811
#!C:\Python27\ """th_logger.py holds logging handler and config for the Regression test""" import logging from testProperty import TEST_OUTPUT_PATH test_logger = logging.getLogger('TEST_HARNESS') handler = logging.FileHandler(TEST_OUTPUT_PATH + 'runTest.log') formatter = logging.Formatter('%(asctime)s %(name)-10s %(l...
roy-boy/python_scripts
th_logger.py
Python
gpl-3.0
447
''' ******************************************************************************* * ButtonEvent.py 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 o...
iocanto/bug-python-libraries
ButtonEvent.py
Python
gpl-3.0
2,246
#!/usr/bin/env python # coding=utf-8 """ Distinct powers Problem 29 Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16, 2^5=32 3^2=9, 3^3=27, 3^4=81, 3^5=243 4^2=16, 4^3=64, 4^4=256, 4^5=1024 5^2=25, 5^3=125, 5^4=625, 5^5=3125 If they are then placed in numerical...
openqt/algorithms
projecteuler/ac/old/pe029_distinct_powers.py
Python
gpl-3.0
823
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany ...
Dioptas/Dioptas
dioptas/model/Configuration.py
Python
gpl-3.0
34,175
import time import json import pytz from datetime import datetime, timedelta from django.utils import timezone from django.conf import settings from rest_framework import status from rest_framework.decorators import api_view, permission_classes from rest_framework.response import Response from rest_framework.permissi...
dspichkin/djangodashpanel
djangodashpanel/security/views.py
Python
gpl-3.0
9,113
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-10 04:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('article', '0002_auto_20160810_0134'), ] operations = [ migrations.RemoveField...
zhangvs1988/zhangyl-Djangodemo
article/migrations/0003_auto_20160810_1219.py
Python
gpl-3.0
806
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.widgets.ipython import create_widget from spyderlib.plu...
jromang/retina-old
distinclude/spyderlib/plugins/ipython.py
Python
gpl-3.0
2,012
import numpy as np STR_NOBOND = """AU 3 1 2 1 1 0.00000000 0.00000000 0.00000000 -0.66387672 0.00000000 -0.00000000 0.34509720 3.78326969 -0.00000000 -0.00000000 3.96610412 0.00000000 3.52668267 0.00000000 -0.00000000 -2.98430053 0.00000000 -0.00000000 ...
vahtras/loprop
tests/test_bond.py
Python
gpl-3.0
7,956
# coding: utf-8 import os import urllib import numpy as np import pickle from Experiment import Experiment ROOT_PATH = './full_dataset/article_4_data/grouped_ephys' ZIPFILE_PATH = './full_dataset/article_4_data' EXPM_PATH = './results/experiments/' URL = 'http://microcircuits.epfl.ch/data/released_data/' if not os....
awakenting/gif_fitting
bbp_analysis/bluebrain_data_io.py
Python
gpl-3.0
9,533
# # controller.py # # Copyright (C) 2013-2014 Ashwin Menon <ashwin.menon@gmail.com> # Copyright (C) 2015-2018 Track Master Steve <trackmastersteve@gmail.com> # # Alienfx is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software ...
ashwinm76/alienfx
alienfx/core/controller.py
Python
gpl-3.0
11,875
from django.test import TestCase from django.utils.timezone import now from promises.models import Promise, Category from popolo.models import Person from taggit.models import Tag from ..models import TagExtraCss nownow = now() class TagsExtraCssTestCase(TestCase): def setUp(self): self.person = Person.ob...
ciudadanointeligente/check-it
promises_web/tests/tags_extra_css_tests.py
Python
gpl-3.0
1,786
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt') as f: requirements = f.read().splitlines() with open('cli-requirements.txt') as f: cli_requirements = f.read().splitlines() setuptools.setup( name="uwg", use_scm_version=True, setu...
chriswmackey/UWG_Python
setup.py
Python
gpl-3.0
1,278
import re import sys import whoisSrvDict import whoispy_sock import parser_branch OK = '\033[92m' FAIL = '\033[91m' ENDC = '\033[0m' def query(domainName): rawMsg = "" tldName = "" whoisSrvAddr = "" regex = re.compile('.+\..+') match = regex.search(domainName) if not match: # Invalid ...
nemumu/whoispy
whoispy/whoispy.py
Python
gpl-3.0
1,198
from vectores_oo import Vector x = input('vector U componente X= ') y = input('vector U componente X= ') U = Vector(x,y) m = input('vector V magnitud= ') a = input('vector V angulo= ') V = Vector(m=m, a=a) E = input('Escalar= ') print "U=%s" % U print "V=%s" % V print 'UxE=%s' % U.x_escalar(E) print 'VxE=%s'...
rgarcia-herrera/vectores
vectores.py
Python
gpl-3.0
446
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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...
jbrendel/RESTx
src/python/restx/components/_ResourceCreateForm.py
Python
gpl-3.0
9,666
#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010 # Copyright (C) Matthias Dieter Wallnoefer 2009 # # Based on the original in EJS: # Copyright (C) Andrew Tridgell <tridge@samba.org> 2005 # # This program is free software; you can redistribute it and/or ...
gwr/samba
source4/scripting/python/samba/samdb.py
Python
gpl-3.0
28,037
# # Copyright 2009-2010 Goran Sterjov # This file is part of Myelin. # # Myelin 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, either version 3 of the License, or # (at your option) a...
gsterjov/Myelin
bindings/python/myelin/introspection/value.py
Python
gpl-3.0
11,453
from chiplotle.geometry.shapes.path import path from chiplotle.geometry.transforms.perpendicular_displace \ import perpendicular_displace def line_displaced(start_coord, end_coord, displacements): '''Returns a Path defined as a line spanning points `start_coord` and `end_coord`, displaced by scalars `displ...
drepetto/chiplotle
chiplotle/geometry/shapes/line_displaced.py
Python
gpl-3.0
763
import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']) actual = permiss...
Arcbot-Org/Arcbot
tests/discord/test_permission.py
Python
gpl-3.0
1,719
import requests import hashlib import json import random import sys class ApiItemAmount(object): def __new__(self, item_type, amount): return {"type": item_type, "amount": amount} class SagaAPI(object): secret = "" episodeLengths = {} apiUrl = "" clientApi = "" unlockLevelItemId = -1 ...
boskee/regicide
regicide.py
Python
gpl-3.0
8,891
#!/usr/bin/python3 from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from sklearn.cluster import KMeans from sklearn import datasets from PIL import Image, ImageChops from scipy.spatial.distance import cdist import matplotlib.pyplot as plt from random ...
mikehankey/fireball_camera
scan-stills2.py
Python
gpl-3.0
42,716
from math import sqrt from collections import defaultdict, Counter from fractions import Fraction def reverse_erathos(n): d = defaultdict(set) for i in range(2, n + 1): if i not in d: j = 2 * i while j <= n: d[j].add(i) j += i return d def to...
rodgzilla/project-euler
problem_070/problem.py
Python
gpl-3.0
895
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos 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, ...
Ebag333/Pyfa
eos/db/gamedata/item.py
Python
gpl-3.0
3,101
#!/usr/bin/env python """ A pure python ping implementation using raw socket. Note that ICMP messages can only be sent from processes running as root. Derived from ping.c distributed in Linux's netkit. That code is copyright (c) 1989 by The Regents of the University of California. That cod...
jredrejo/controlaula
Backend/src/ControlAula/Utils/ping.py
Python
gpl-3.0
7,021
#!/usr/bin/python from src.sqllist import GLOBALS class BasicResolver(object): """General resolver class""" def __init__(self, conn=None): self.conn = conn pass def resolve(self, detections, sources): """Template resolve function. Returns resolution status and an array...
jjdmol/LOFAR
CEP/GSM/bremen/src/resolve.py
Python
gpl-3.0
2,496
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2019 khalim19 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
khalim19/gimp-plugin-export-layers
export_layers/pygimplib/gui/itembox.py
Python
gpl-3.0
18,637
""" Follow Me activity for Sugar Copyright (C) 2010 Peter Hewitt 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 late...
walterbender/followme
rc_skip_last.py
Python
gpl-3.0
1,984