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 -*-
r"""
Monkey patches to make the MacLane code work in standalone mode, i.e., without
modifying the sage source code at build time.
"""
#*****************************************************************************
# Copyright (C) 2016 Julian Rüth <julian.rueth@fsfe.org>
#
# Distributed und... | saraedum/mac_lane | __init__.py | Python | gpl-2.0 | 33,298 |
# This file is part of Merlin.
# Merlin is the Copyright (C)2008,2009,2010 of Robin K. Hansen, Elliot Rosemarine, Andreas Jacobsen.
# Individual portions may be copyright by individual contributors, and
# are included in this collective work with permission of the copyright
# owners.
# This program is free software; ... | ellonweb/merlin | Hooks/user/alias.py | Python | gpl-2.0 | 2,365 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 you... | arunkgupta/gramps | gramps/gen/filters/rules/person/_havechildren.py | Python | gpl-2.0 | 1,831 |
import svgwrite as svg
import xml
import sys
def convert(input,output,width,height,scale):
d = xml.etree.ElementTree.parse(input)
r = d.getroot()
scale = int(scale)
width = int(width)
height = int(height)
canvas = svg.Drawing(output, size=(str(width*s... | dannyperson/evolisa-tools | xml2svg.py | Python | gpl-2.0 | 1,707 |
# The MIT License (MIT)
#
# Copyright (c) 2016 Samuel Bear Powell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, co... | phborba/dsgtoolsop | auxiliar/sunposition/sunposition.py | Python | gpl-2.0 | 32,594 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Original Module by SIESA (<http://www.siesacr.com>)
# Refactored by CLEARCORP S.A. (<http://clearcorp.co.cr>)
#
# This program is free software: you can redis... | 3dfxsoftware/cbss-addons | purchase_import/__init__.py | Python | gpl-2.0 | 1,087 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A Morse Binary plotter
Copyright (C) 2015 by
Sébastien Celles <s.celles@gmail.com>
All rights reserved.
"""
import matplotlib.pyplot as plt
import morse_talk as mtalk
def _create_ax(ax):
"""
Create a Matplotlib Axe from ax
if ax is None a new Matplotlib ... | OrkoHunter/morse-talk | morse_talk/plotter.py | Python | gpl-2.0 | 1,931 |
import nest
import pylab as plt
import numpy as np
"""
Reproduce result of the pairing experiment from Pfister-Gerstner (2006) with the triplet model.
"""
nest.Install("stdpmodule")
nest.set_verbosity("M_WARNING")
def generateSpikes(neuron, times):
"""Trigger spike to given neuron at specified times."""
dela... | zifeo/nest-stdpmodule | examples/PfisterGerstnerPairing_connection.py | Python | gpl-2.0 | 2,909 |
# coding: utf-8
"""
======================================================================
Learning and Visualizing the BMS sensor-time-weather data structure
======================================================================
This example employs several unsupervised learning techniques to extract
the energy data... | TinyOS-Camp/DDEA-DEV | Archive/[14_09_13] Code_Base/df_data_analysis_ddea.py | Python | gpl-2.0 | 17,131 |
from rutinas import *
inputdir="ETERNA-INI/"
outputdir="ETERNA-OUT/"
inputdb=argv[1]
f=open(inputdir+"%s-INI/numeracionsismos.dat"%inputdb,"r")
allphases=[]
n=1
for line in f:
if "#" in line:continue
line=line.strip()
parts=line.split()
numsismo=parts[0]
fecha=parts[1]
hora=parts[2]
#print ... | seap-udea/tQuakes | util/Legacy/allphases-datojuliano.py | Python | gpl-2.0 | 1,457 |
import bpy
d = bpy.context.scene.cam_operations[bpy.context.scene.cam_active_operation]
d.cutter_type = 'END'
d.cutter_diameter = 0.003
d.cutter_length = 25.0
d.cutter_tip_angle = 60.0
| vilemnovak/blendercam | scripts/presets/cam_cutters/end_cyl_3.00mm.py | Python | gpl-2.0 | 186 |
#!/home/paulk/software/bin/python
from sys import argv,exit,stderr
from cPickle import dump,HIGHEST_PROTOCOL
import argparse
plain_chroms = map(str,range(1,23))+['X','Y','MT']
parser = argparse.ArgumentParser(description="Script to parse a gene-formatted file to give a PIC of 0-based regions by default")
parser.add_a... | polarise/RP-python | genefile_to_PIC.py | Python | gpl-2.0 | 1,729 |
# Copyright (C) 2013-2015
# Sean Poyser (seanpoyser@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, or (at your option)
# any later version.
#
# ... | EdLogan18/logan-repository | plugin.program.super.favourites/favourite.py | Python | gpl-2.0 | 14,110 |
# -*- coding: utf-8 -*-
def social_nail(entity, argument):
return True
#- Fine Funzione -
| Onirik79/aaritmud | src/socials/social_nail.py | Python | gpl-2.0 | 95 |
######################
# ANALYSIS QUESTIONS #
######################
# Change these default values to obtain the specified policies through
# value iteration.
def question2():
answerDiscount = 0.9
answerNoise = 0.2
return answerDiscount, answerNoise
def question3a():
answerDiscount = 0.9
answerNoise = 0.2
... | PhilippeMorere/PacmanRL | analysis.py | Python | gpl-2.0 | 1,604 |
# Copyright (C) 2008-2011 Dejan Muhamedagic <dmuhamedagic@suse.de>
# See COPYING for license information.
import os
import subprocess
from lxml import etree, doctestcompare
import copy
import bz2
from collections import defaultdict
from . import config
from . import options
from . import schema
from . import constant... | aspiers/crmsh | modules/xmlutil.py | Python | gpl-2.0 | 36,919 |
import sys
def bf(project, code=None, threshold=3):
Backfill(project, threshold=threshold, code=code).RTdict()
return
class Backfill():
def __init__(self, project, threshold=3, code=None):
self._project = project
self._threshold = threshold
self._code = code
def RTdict(self):
... | lycopoda/pyquan2 | backfill.py | Python | gpl-2.0 | 1,277 |
#!/usr/bin/python
#
# A mod_python environment for the symbol store collector
#
"""
Linux uploader:
// symupload.cc: Upload a symbol file to a HTTP server. The upload is sent as
// a multipart/form-data POST request with the following parameters:
// code_file: the basename of the module, e.g. "app"
// debug_file:... | boudewijnrempt/HyvesDesktop | 3rdparty/socorro/socorro/symbolcollector/modpython-symbolstore.py | Python | gpl-2.0 | 11,430 |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-# enable debugging
#/***************************************************************************
# * <+$FILENAME$;R+++++++++++++++++++++++++> Version <+$VERSION$;R+++++++>*
# * *
# * <+#BRIEF#;R+++... | drbeco/vimtemplates | templates/vim1_web.py | Python | gpl-2.0 | 2,851 |
import django_tables2 as tables
from django_tables2.utils import A
from django.utils.html import mark_safe
from kaka.utils import *
from .models import *
class TreeTable(KakaTable):
class Meta(KakaTable.Meta):
report = 'tree'
model = Tree
sequence = ["datasource", "name", "createddate", ... | hdzierz/Kaka | mongseafood/tables.py | Python | gpl-2.0 | 599 |
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# 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... | f3at/feat | src/feat/agents/base/dependency.py | Python | gpl-2.0 | 3,925 |
# This file is part of MyPaint.
# Copyright (C) 2009-2012 by Martin Renold <martinxyz@gmx.ch>
#
# 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 opt... | prescott66/mypaint | gui/colorpicker.py | Python | gpl-2.0 | 8,831 |
"""
Copyright (c) 2004, CherryPy Team (team@cherrypy.org)
All rights reserved.
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 condit... | Juanvvc/scfs | webserver/cherrytemplate/unittest/unittest.py | Python | gpl-2.0 | 4,016 |
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | michel-slm/bodhi | bodhi/tests/functional/test_releases.py | Python | gpl-2.0 | 7,861 |
class Solution:
# @param head, a ListNode
# @param m, an integer
# @param n, an integer
# @return a ListNode
# @ tail point to previous node, maybe head
# @ for m to n insert the element to tail.
# @ for m+1, insert at n
def reverseBetween(self, head, m, n):
Tpivot, newHead = Li... | yelu/leetcode | ReverseLinkedListII.py | Python | gpl-2.0 | 1,179 |
#
# ast_input_line.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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) a... | kperun/nestml | pynestml/meta_model/ast_input_line.py | Python | gpl-2.0 | 8,453 |
#!/usr/bin/env python3
# L-system with MIDI output state machine
# set production rules to match Inkscape
# By Mike Cook - December 2017
import time, copy
import rtmidi
midiout = rtmidi.MidiOut()
noteDuration = 0.3
axiom = "++F" # Bush
rules = [("F->","FF-[-F+F+F]+[+F-F-F]")]
newAxiom = axiom
def main():
glob... | Grumpy-Mike/Mikes-Pi-Bakery | Fractal_Music/Classic_Fractals.py | Python | gpl-2.0 | 4,725 |
import fabio, sys, numpy as np
stem = sys.argv[1]
if 1:
out=open("%s.bin"%(stem),"wb")
for i in range(1024):
im=fabio.open("%s/%s_%04d.edf"%(stem,stem,i)).data
im = (im+10)*10
out.write(im.clip(0,255).astype(np.uint8))
im=fabio.open("%s/%s_%04d.edf"%(stem,stem,0))
open("%s.nrrd"%(ste... | jonwright/ImageD11 | sandbox/ev78/edf2nrrd.py | Python | gpl-2.0 | 453 |
# -*- coding: utf-8 -*-
"""This module tests various ways how to set up the provisioning using the provisioning dialog."""
import fauxfactory
import pytest
import re
from datetime import datetime, timedelta
from cfme.common.provider import cleanup_vm
from cfme.common.vm import VM
from cfme.provisioning import provisio... | akrzos/cfme_tests | cfme/tests/infrastructure/test_provisioning_dialog.py | Python | gpl-2.0 | 10,707 |
"""This class contains the TestIcon class."""
import unittest
import pygame
from src.GameWindow import GameWindow
from src.Icon import Icon
from src.Point import Point
class TestIcon(unittest.TestCase):
"""This class unit tests the Icon class."""
def setUp(self):
"""Create a Test Icon and start pygam... | gregcorbett/SciBot | test/test_icon.py | Python | gpl-2.0 | 2,633 |
# ireal/irmath.py
#
# Copyright 2008 Rafael Menezes Barreto <rmb3@cin.ufpe.br,
# rafaelbarreto87@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
# This program is distri... | yig/intpy | intpy/src/ireal/irmath.py | Python | gpl-2.0 | 1,041 |
#!/usr/bin/env python
import os
import sys
import shutil
import os.path
import createrepo_c as cr
def do_repodata(path):
# Prepare repodata/ directory
repodata_path = os.path.join(path, "repodata")
if os.path.exists(repodata_path):
x = 0
while True:
new_repodata_path = "%s_%s" ... | janncker/createrepo_c | examples/python/simple_createrepo.py | Python | gpl-2.0 | 3,229 |
import psycopg2, json
import sys
import psycopg2.extras
conn = psycopg2.connect('dbname=wgraph user=nmcmaster')
def export():
out = {'links':{},'nodes':{}}
with conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor) as cursor:
cursor.execute('select id,name as title,description,image_size,image,source,sourceurl... | natemcmaster/historyexplorer | builder/exporter.py | Python | gpl-2.0 | 984 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA
#
# Author: Alan Wang <wzj401@gmail.com>
# Tianwei Liu <liutianweidlut@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the ... | umitproject/openmonitor-desktop-agent | umit/icm/agent/gui/Preference/PeerPage.py | Python | gpl-2.0 | 8,098 |
# -*- coding: utf-8 -*-
__author__ = 'zappyk'
PROJECT = 'GoogleSheets'
DESCRIPTION = 'Manage your Google Spreadsheets'
DESCRIPTION = 'Google Spreadsheet Read/Write (more?) manipulation'
VERSION = (0, 0, 1, 'beta', 1)
VERSION = (0, 0, 2, 'beta', 1)
##########################################################... | zappyk-github/zappyk-python | src/src_zappyk/googleSheets/GoogleSheets/__init__.py | Python | gpl-2.0 | 913 |
#
# Copyright (C) 2006, 2013, 2014 Red Hat, Inc.
# Copyright (C) 2006 Hugh O. Brock <hbrock@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | aurex-linux/virt-manager | virtManager/choosecd.py | Python | gpl-2.0 | 5,911 |
"""
2504 : 괄호의 값
URL : https://www.acmicpc.net/problem/2504
Input :
(()[[]])([])
Output :
28
"""
class Stack:
def __init__(self):
self._data = []
def __str__(self):
return str(self._data)
def push(self, x):
self._data += [x]
def pop(self):
... | 0x1306e6d/Baekjoon | baekjoon/2504.py | Python | gpl-2.0 | 1,729 |
"""
17010 : Time to Decompress
URL : https://www.acmicpc.net/problem/17010
Input :
4
9 +
3 -
12 A
2 X
Output :
+++++++++
---
AAAAAAAAAAAA
XX
"""
l = int(input())
for i in range(l):
n, x = input().split()
print(x * int(n))
| 0x1306e6d/Baekjoon | baekjoon/17010.py | Python | gpl-2.0 | 319 |
from Tools.Directories import resolveFilename, SCOPE_SYSETC
from Tools.HardwareInfo import HardwareInfo
import sys
def getVersionString():
return getImageVersionString()
def getImageVersionString():
try:
file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
lines = file.readlines()
for x in lines:
... | bally12345/enigma2 | lib/python/Components/About.py | Python | gpl-2.0 | 3,452 |
#
# Copyright 2014-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | lago-project/lago | lago/virt.py | Python | gpl-2.0 | 18,438 |
# Copyright 2011-2012 James McCauley
#
# 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 applicable law or agreed to in ... | ardhipoetra/SDN-workbench | l2_learning.py | Python | gpl-2.0 | 7,194 |
# talk.py
# Purpose - Simple. Get me the HTML for talkweb lingo
# Copyright (c) Madhukumar Seshadri
# All rights reserved
# Trademark and Licensing yet to be decided
# started - Unknown,assumed to be arond may 18th 2012
# Refer /doc/changes and /doc/features for change log and additional features
# Changes
# get a ta... | madhusv/talkweb | talk/doc/py-tmp/talk.py | Python | gpl-2.0 | 9,902 |
# Tests for algorithm Remi (original)
from Remi_original import RemiAlgorithmOriginal
import networkx as nx
import unittest
class TestRemiOriginal(unittest.TestCase):
# Methode appelee avant chaque test
def setUp(self):
pass
# Methode appelee apres chaque test
def tearDown(self):
pass
def test_elemen... | Temigo/whisper | tests/test_remi_original.py | Python | gpl-2.0 | 517 |
#!/usr/bin/python
# coding: utf-8
import sys
import os
import django
from django.core.management import execute_from_command_line
import shlex
import urllib
import socket
import subprocess
jms_dir = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
sys.path.append(jms_dir)
os.environ['DJANGO_SETTINGS_MODU... | Mr-Linus/geekcloud | install/next.py | Python | gpl-2.0 | 3,297 |
from database import Database
from models.blog import Blog
__author__ = 'jslvtr'
class Menu(object):
def __init__(self):
self.user = input("Enter your author name: ")
self.user_blog = None
if self._user_has_account():
print("Welcome back {}".format(self.user))
else:
... | brunotougeiro/python | udemy-python-web-apps/terminal_blog/menu.py | Python | gpl-2.0 | 1,833 |
# Rekall Memory Forensics
# Copyright (c) 2008-2011 Volatile Systems
# Copyright 2013 Google Inc. All Rights Reserved.
#
# 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 L... | dsweet04/rekall | rekall-core/rekall/plugins/overlays/windows/win7.py | Python | gpl-2.0 | 15,299 |
import re
from wx.stc import STC_FOLDLEVELHEADERFLAG, STC_FOLDLEVELBASE
from idn_highlight import ErlangHighlighter, ErlangHighlightType, IgorHighlighter, IgorHighlightType
from idn_lexer import BaseLexer
from idn_erlang_utils import IsModule
__author__ = 'Yaroslav'
class ErlangLexer(BaseLexer):
def __init__(self... | IDNoise/NoiseIDE | NoiseIDEPython/idn_erlang_lexer.py | Python | gpl-2.0 | 16,733 |
from nltk.probability import FreqDist
from nltk.corpus import stopwords
from nltk.tokenize import SpaceTokenizer, WhitespaceTokenizer
import nltk.tag, nltk.util, nltk.stem
from HTMLParser import HTMLParser
import htmlentitydefs
import re # regular expressions
import string, math
from bs4 import BeautifulSoup
import csv... | comp-journalism/commentIQ | processComments.py | Python | gpl-2.0 | 11,737 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
def parse_square(raw):
if raw in ["S", "R", "E"]:
return raw
else:
return int(raw)
def append(counter):
if counter == 0:
return []
else:
return [parse_square(raw_input())] + append(counter-1)
# game_area = append(int(raw_i... | pimiento/codingames | odeskcontest_2.py | Python | gpl-2.0 | 2,418 |
# a part of cropgui, a graphical front-end for lossless jpeg cropping
# Copyright (C) 2009 Jeff Epler <jepler@unpythonic.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; eithe... | onno74/cropgui | log.py | Python | gpl-2.0 | 2,017 |
#!python2
#-*- coding: utf-8 -*-
# LearningModels.py
# Author: Larvasapiens <sebastian.narvaez@correounivalle.edu.co>
# Created: 2015-09-30
# Last Modification: 2015-11-22
# Version: 1.2
#
# Copyright (C) {2016} {Sebastián Narváez Rodríguez}
#
# This program is free software; you can redistribute it and/or modi... | larvasapiens/htm-teul | Learning/LearningModels/FeedbackModel.py | Python | gpl-2.0 | 13,193 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001 Donald N. Allingham
#
# 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 opt... | gramps-project/gramps | gramps/gen/plug/docgen/fontscale.py | Python | gpl-2.0 | 17,840 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | zenodo/invenio | invenio/modules/deposit/testsuite/test_deposit_validators.py | Python | gpl-2.0 | 2,861 |
from django.conf import settings
from django.core.management.base import BaseCommand
import datetime
import logging
from calfire_tracker.manager_calfire import RetrieveCalFireCurrentIncidents
logger = logging.getLogger("calfire_tracker")
class Command(BaseCommand):
help = "Scrapes California Wildfires data from ... | SCPR/firetracker | calfire_tracker/management/commands/scraper_wildfires.py | Python | gpl-2.0 | 782 |
#a script for a-block'o-code
#Jacob Mickiewicz
from Adafruit_I2C import Adafruit_I2C
def addrFvect(x,y):
if((y<16)&(x<8)):
return (y<<3|x)
else:
return (0xff)
def I2cLex(x ,y):
address = addrFvect(x,y)
if(address == 0xff):
return lex.noblock
else:
i2caddr = Adafruit_I2C(address)
val = i2caddr.readU8(0... | erebus-labs/blocks-o-code | dev/BBB/i2cmaster.py | Python | gpl-2.0 | 1,042 |
# -*- coding: UTF-8 -*-
__revision__ = '$Id$'
# Copyright (c) 2005-2011 Vasco Nunes, Piotr Ożarowski
#
# 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... | FiloSottile/Griffith-mirror | lib/plugins/movie/PluginMovieIMDB.py | Python | gpl-2.0 | 16,353 |
#/*##########################################################################
# Copyright (C) 2004-2012 European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
#
# This toolkit is free software; you can redistribute it and/or m... | tonnrueter/pymca_devel | PyMca/FitPeakSelect.py | Python | gpl-2.0 | 19,711 |
from datetime import datetime
from datetime import timedelta
import pytest
from cfme import test_requirements
from cfme.infrastructure.provider.virtualcenter import VMwareProvider
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.blockers import BZ
from cfme.utils.wait import wait_for
... | izapolsk/integration_tests | cfme/tests/candu/test_gap_collection.py | Python | gpl-2.0 | 3,239 |
import argparse
import logging
from tracer.extensions.extension import Extension, register_syscall
from tracer.injector import InjectedMemory
class StoreToDict(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
if not getattr(namespace, self.dest):
setattr(na... | trnila/tracer | examples/extensions/replace_open_path.py | Python | gpl-2.0 | 1,988 |
#!/usr/bin/env python
"""
Copyright: (C) 2013 LeafLabs, LLC
License: MIT License
Author: bnewbold
Date: September 2013
Project: SNG Wired Leaf (SNG4)
This is essentially a port of the old packet_tool.py to work through the
daemon (instead of writing raw TCP packets).
It does not do any acquisition modes, HDF5 storage... | leaflabs/leafysd | util/debug_tool.py | Python | gpl-2.0 | 9,832 |
# ##### 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... | pawkoz/dyplom | blender/release/scripts/startup/bl_ui/properties_data_modifier.py | Python | gpl-2.0 | 46,076 |
class check_privilege_revoke_all_sysauth():
"""
check_privilege_revoke_all_sysauth
Ensure 'ALL' Is Revoked from Unauthorized 'GRANTEE' on SYSAUTH$
The SYSAUTH$ table contains details about which users and roles have
what system privileges.
"""
# References:
# http://www.davidlitchfield.... | foospidy/DbDat | plugins/oracle/check_privilege_revoke_all_sysauth.py | Python | gpl-2.0 | 1,203 |
#!/usr/bin/python3
##################################################################
#
# Run a test, including the provisioning and teardown of all nodes
#
# Copyright (C) 2021 SUSE Linux GmbH
#
##################################################################
import twopence
import argparse
import os
import curly
i... | okirch/susetest | python/susetest/executor.py | Python | gpl-2.0 | 25,259 |
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
SMB (Server Message Block), also known as CIFS.
"""
from scapy.packet import *
from scapy.fields import *
from scapy.laye... | smainand/scapy | scapy/layers/smb.py | Python | gpl-2.0 | 18,582 |
# for loop
for x in range(2, 9+1):
for y in range(1, 9+1):
print(x, ' * ', y, ' = ', x*y)
# print(str(x) + ' * ' + str(y) + ' = ' + str(x*y))
# print('%d * %d = %d' % (x, y, x*y))
# while loop
x = 2
while x < 9+1:
y = 1
while y < 9+1:
print(x, ' * ', y, ' = '... | yehnan/python_book_yehnan | ch02ex/ch02ex2.2_answer.py | Python | gpl-2.0 | 464 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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 you... | arunkgupta/gramps | gramps/gen/sort.py | Python | gpl-2.0 | 9,779 |
import datetime
from tlsspy.probe.base import Probe
class Timing(Probe):
def probe(self, address, certificates):
'''
Records the start time of the analysis run.
Provides the following keys:
* ``analysis.timing.start`` as ISO time
Probes that depend on this probe:
... | tehmaze/tlsspy | tlsspy/probe/probe_020_timing.py | Python | gpl-2.0 | 536 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008-2013 Zuza Software Foundation
#
# This file is part of Pootle.
#
# Pootle 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 th... | arky/pootle-dev | pootle/apps/pootle_app/management/__init__.py | Python | gpl-2.0 | 2,075 |
import pytest
from cfme.middleware.provider.hawkular import HawkularProvider
from cfme.middleware.server import MiddlewareServer
from cfme.utils.version import current_version
from server_methods import verify_server_running, verify_server_stopped
from server_methods import get_servers_set, verify_server_suspended
from... | jkandasa/integration_tests | cfme/tests/middleware/test_middleware_server.py | Python | gpl-2.0 | 7,450 |
# Django settings for academicControl project.
#encoding:utf-8
import os
RUTA_PROYECTO = os.path.dirname(os.path.realpath(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Helier Cortez', 'hdnymib@gmail.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.my... | hyms/academicControl | academicControl/settings.py | Python | gpl-2.0 | 5,571 |
from state import *
from sys import stdout
from utils import *
"""
This is how the board should be drawn.
5 . . K . .
4 . G G G .
3 . . . . .
2 D D D D D
1 . . . . .
A B C D E
Internally, the board is represented by converting the state (as a byte array),
to a list of 5 lists of strings, as such:
0 : 0... | francois-rd/madking | ui.py | Python | gpl-2.0 | 5,751 |
from .imaer_document import ImaerDocument
from .metadata import AeriusCalculatorMetadata
from .emission_source import (
EmissionSourceType,
EmissionSource,
EmissionSourceCharacteristics,
SpecifiedHeatContent,
Emission
)
from .roads import (
SRM2Road,
RoadSideBarrier,
StandardVehicle
)
fr... | opengeogroep/AERIUS-QGIS-plugins | ImaerPlugin/imaer4/__init__.py | Python | gpl-2.0 | 351 |
# This file is part of Superwas.
#
# Superwas 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.
#
# Superwas is distributed in the hope... | superclass/superwas | jms.py | Python | gpl-2.0 | 20,003 |
#! /usr/bin/env python
#
# smadata2.inverter.smabluetooth - Support for Bluetooth enabled SMA inverters
# Copyright (C) 2014 David Gibson <david@gibson.dropbear.id.au>
#
# 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 Fr... | NobodysNightmare/python-smadata2 | smadata2/inverter/smabluetooth.py | Python | gpl-2.0 | 20,732 |
'''Text progress bar library for Python.
A text progress bar is typically used to display the progress of a long
running operation, providing a visual cue that processing is underway.
The ProgressBar class manages the current progress, and the format of the line
is given by a number of widgets. A widget is an object ... | RePeet13/Project-Bot | bin/lib/progressbar/__about__.py | Python | gpl-2.0 | 976 |
#! coding: utf-8
import telegram
class Command:
def __init__(self, bot, message):
chat_id = message.chat_id
text = '''About Persub Bot
Author: Mohammad Amin Sameti (@mamins1376)
Source Code on GitHub: https://github.com/mamins1376/Persub-Bot
The goal of Persub Bot is giving the user the best subtitles a... | mamins1376/Persub-Bot | persubbot/commands/about.py | Python | gpl-2.0 | 515 |
# -*- coding: utf-8 -*-
import fauxfactory
import iso8601
import re
import socket
import sys
from collections import namedtuple
from os import path as os_path
from subprocess import check_call
from urlparse import urlparse
import paramiko
from scp import SCPClient
import diaper
from utils import conf, ports, version
... | jteehan/cfme_tests | utils/ssh.py | Python | gpl-2.0 | 26,511 |
#!/usr/bin/python
#
# Copyright (C) 2007-2009 Julian Andres Klode <jak@jak-linux.org>
# Copyright (C) 2003-2006 Darren Kirby <d@badcomputer.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;... | pat1/autoradio | autoradio/dir2ogg.py | Python | gpl-2.0 | 30,823 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kaka.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| hdzierz/Kaka | manage.py | Python | gpl-2.0 | 247 |
# pylint: disable=E1101,E1103,W0232
import datetime
import warnings
from functools import partial
from sys import getsizeof
import numpy as np
from pandas._libs import index as libindex, lib, Timestamp
from pandas.compat import range, zip, lrange, lzip, map
from pandas.compat.numpy import function as nv
from pandas ... | Ziqi-Li/bknqgis | pandas/pandas/core/indexes/multi.py | Python | gpl-2.0 | 94,471 |
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# 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... | f3at/feat | src/feat/common/manhole.py | Python | gpl-2.0 | 15,327 |
import helper
class check_user_users_with_defpwd():
"""
check_user_users_with_defpwd
Users with default passwords.
"""
# References:
# http://docs.oracle.com/cd/B28359_01/server.111/b28320/statviews_5074.htm
# https://www.sans.org/reading-room/whitepapers/analyst/oracle-database-security-se... | foospidy/DbDat | plugins/oracle/check_user_users_with_defpwd.py | Python | gpl-2.0 | 1,215 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import io
import tempfile
from uuid import uuid1
from unittest import TestCase
from unittest import mock
from castel import advcounter
from castel.drivers.fake import Fakeengine
from castel.drivers.stattext import Stattext
class TestAdvCounter(TestCase):
@mock.patch('sy... | reclaro/castel | castel/tests/test_Stattext.py | Python | gpl-2.0 | 12,437 |
"""
Snapshot target
"""
from DeComp.compress import CompressMap
from catalyst import log
from catalyst.support import normpath, cmd
from catalyst.base.targetbase import TargetBase
from catalyst.base.genbase import GenBase
from catalyst.fileops import (clear_dir, ensure_dirs)
class snapshot(TargetBase, GenBase):
""... | benkohler/catalyst | catalyst/targets/snapshot.py | Python | gpl-2.0 | 2,907 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-11-22 13:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('simon_app', '0004_auto_20201122_0919'),
]
operations = [
migrations.AddFie... | LACNIC/simon | simon-web/simon_app/migrations/0005_probeapirequest_test_type.py | Python | gpl-2.0 | 481 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('packages', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='signoffspecification',
... | brain0/archweb | packages/migrations/0002_auto_20160731_0556.py | Python | gpl-2.0 | 509 |
# -*- coding: UTF-8 -*-
# -Cleaned and Checked on 08-24-2019 by JewBMX in Scrubs.
# -Cleaned and Checked on 04-14-2020 by Tempest.
import urllib, urlparse
import traceback
from resources.lib.modules import client, log_utils
from resources.lib.modules import cleantitle
from resources.lib.modules import directstream
fr... | repotvsupertuga/tvsupertuga.repository | script.module.streamtvsupertuga/lib/resources/lib/sources/en/5movies.py | Python | gpl-2.0 | 5,312 |
import SMTPLogger | 3dfxsoftware/cbss-addons | bahmni_logger/__init__.py | Python | gpl-2.0 | 17 |
#!/usr/bin/env python
import numpy as np
import os
from os import walk
from get_samples import get_hog_samples
from get_classifier import get_classifier
from get_location import get_location
from output import output
from os.path import join
from shutil import rmtree
from sklearn.externals import joblib as pickle
imp... | magicknight/Observer | run.py | Python | gpl-2.0 | 8,980 |
__author__ = 'oskyar'
# user/admin.py
from django.contrib import admin
from .models import Topic, Subtopic
admin.site.register(Topic)
admin.site.register(Subtopic)
| oskyar/test-TFG | TFG/apps/topic/admin.py | Python | gpl-2.0 | 168 |
"""
libguestfs tools test utility functions.
"""
import logging
import signal
import os
import re
import aexpect
from avocado.utils import path
from avocado.utils import process
from . import propcan
class LibguestfsCmdError(Exception):
"""
Error of libguestfs-tool command.
"""
def __init__(self,... | clebergnu/avocado-vt | virttest/utils_libguestfs.py | Python | gpl-2.0 | 147,061 |
import fp
from fp import cfg
class bga(fp.base):
"""Generator for ball grid array footprints"""
def __init__(self, name, model, description, tags, package_width, package_height, pad_diameter, pad_grid, pad_distance, count_x, count_y):
super(bga, self).__init__(name, model, description, tags)
| PiWare/kicad_library | script/fpgen/bga.py | Python | gpl-2.0 | 299 |
## begin license ##
#
# "Meresco Components" are components to build searchengines, repositories
# and archives, based on "Meresco Core".
#
# Copyright (C) 2007-2009 SURF Foundation. http://www.surf.nl
# Copyright (C) 2007 SURFnet. http://www.surfnet.nl
# Copyright (C) 2007-2010 Seek You Too (CQ2) http://www.cq2.nl
# C... | seecr/meresco-components | meresco/components/http/apachelogger.py | Python | gpl-2.0 | 3,479 |
'''
doos: A multi-threaded server for running client-provided macros in OpenOffice.org
Copyright (C) 2008 - 2009 therudegesture and dustymugs
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 v... | dustymugs/doos | server/jobStatus.py | Python | gpl-3.0 | 1,210 |
# -*- coding: utf-8 -*-
from openerp import api, models
from openerp.addons.training_management.models.model_names import ModelNames
from openerp.addons.training_management.utils.date_utils import DateUtils
class TrainerWorkloadAnalyzer(models.AbstractModel):
_name = ModelNames.TRAINER_WORKLOAD_ANALYZER
@ap... | SNeuhausen/training_management | models/resource_analysis/trainer_workload_analyzer.py | Python | gpl-3.0 | 4,295 |
from common import primes
def main():
print(len(circularPrimesBelow(1000000)))
def circularPrimesBelow(limit):
primeList = []
for i in range(limit):
if isCircularPrime(i):
primeList.append(i)
return primeList
def isCircularPrime(n):
n = str(n)
for _ in range(len(n)):
if not primes.isPrime(int(n)):
re... | ZachOhara/Project-Euler | python/p031_p040/problem035.py | Python | gpl-3.0 | 398 |
#!/usr/bin/pythonw
# -*- coding: utf-8 -*-
in_file_directory = ['input/toy_data/']
in_file_name = ['data_test']
in_file_extension = ['txt']
in_file_delimiter = ['\t']
in_file_quote = ['off']
in_file_missing_value = ['NA']
raw_data_structure = [['From','str','To','str','IRI1','str','IRI2','str','Exposure','flo... | troukny/NetGen | src/config_web.py | Python | gpl-3.0 | 1,329 |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import cint, flt, cstr
from frappe import _
import frappe.defaults
from erpnext.accounts.utils import get_fisca... | brownharryb/erpnext | erpnext/controllers/stock_controller.py | Python | gpl-3.0 | 17,415 |
from .base import BaseConfig
__all__ = ["ImmunizationRoute"]
class ImmunizationRoute(BaseConfig):
@classmethod
def build_fhir_object_from_health(cls, health):
# Health routes
# ('im', 'Intramuscular'),
# ('sc', 'Subcutaneous'),
# ('id', 'Intradermal'),
# ('nas', 'Intra... | teffalump/health_fhir | gnu_health_fhir/config/converters/config_immunization_route.py | Python | gpl-3.0 | 3,070 |
import pickle
import sys
from collections import Counter
# Get kmap it from:
# https://github.com/gaborgulyas/kmap -- get "kmap.py"
# Which will also need:
# https://github.com/gaborgulyas/SelectPoints -- get "selectpoints.py"
from kmap import plot_kmap
from common import *
config, outpath = load_config("config_... | gaborgulyas/constrainted_fingerprinting | 06_plot_anonsets.py | Python | gpl-3.0 | 996 |