code stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 226 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k |
|---|---|---|---|---|---|
#
# gPrime - A web-based genealogy program
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Gary Burton
#
# 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 ... | sam-m888/gprime | gprime/plug/menu/_note.py | Python | gpl-2.0 | 1,763 |
from routersploit.modules.creds.cameras.jvc.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults... | dasseclab/dasseclab | clones/routersploit/tests/creds/cameras/jvc/test_ftp_default_creds.py | Python | gpl-2.0 | 612 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'cluz_form_remove.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
... | AnotherBobSmith/CLUZ | forms/cluz_form_remove.py | Python | gpl-2.0 | 3,682 |
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2013-2016 David Howland
#
# 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 la... | dhowland/EasyAVR | keymapper/easykeymap/boards/sigma.py | Python | gpl-2.0 | 9,214 |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# MonsterTV Regex de streamingfreetv
# Version 0.1 (17.10.2014)
#------------------------------------------------------------
# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
# Gracias a la librería plugintools de Jesús (www.... | manusev/plugin.video.kuchitv | resources/regex/streamingfreetv.py | Python | gpl-2.0 | 4,423 |
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset: 4 -*-
import glob
import os
import pytest
from remote import (assert_subprocess, remote_ip, remotedir, remoteuser,
run_subprocess, sshopts)
import sys
localdir = os.path.dirname(os.path.abspath(__file__))
def lock_cmd(subcmd):
retur... | huiyiqun/check_mk | agents/windows/it/conftest.py | Python | gpl-2.0 | 2,192 |
# -*- coding: utf-8 -*-
from django.db.models import Aggregate
#from django.db.models.sql.aggregates import Aggregate as SQLAggregate
#class SQLConcat(SQLAggregate):
#sql_function = 'group_concat'
#@property
#def sql_template(self):
#if separator in self.extra and separator is not None:
... | hdzierz/Kaka | mongcore/django_ext.py | Python | gpl-2.0 | 787 |
'''
Created on May 9, 2009
@summary: Some useful manipulations on layers.
@author: guevara
'''
from gimpfu import *
from util.Cst_ import *
logger = logging.getLogger(__name__)
DEF_LY_WIDTH = 100
DEF_LY_HEIGHT = 100
class LayerUtil (object):
LY_TOP_POSITION = "top"
LY_BOTTOM_POSITION = "bottom"
def __ini... | candide-guevara/gimp_pk_card_creator | Python/util/LayerUtil_.py | Python | gpl-2.0 | 4,462 |
# -*- coding: utf-8 -*-
from django import forms
from django.conf import settings
from django.contrib.auth.models import User
from odf.odf2xhtml import ODF2XHTML, load
from tcms.core.contrib.xml2dict.xml2dict import XML2Dict
from tcms.core.forms.fields import UserField, StripURLField
from tinymce.widgets import TinyM... | ShaolongHu/Nitrate | tcms/testplans/forms.py | Python | gpl-2.0 | 20,537 |
#!/usr/bin/python3
from os.path import expanduser
home = expanduser('~')
file_list = []
for i in range(2048):
with open(home + "/mount_hmfs/orphan_{:d}.txt".format(i), 'w') as file:
file_list.append(file)
file.write("ssssssssssssssssssss")
#hold files
while True:
pass
| timemath/hmfs | fs/hmfs/test/hold_file_open.py | Python | gpl-2.0 | 296 |
#! /usr/bin/env python
## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Nils Weiss <nils@we155.de>
## This program is published under a GPLv2 license
"""
CANSocket.
"""
from kamene.packet import *
from kamene.fields import *
import kamene.sendrecv as se... | phaethon/scapy | kamene/layers/can.py | Python | gpl-2.0 | 4,119 |
#
#
# Copyright (C) 2004 Philip J Freeman
#
# This file is part of halo_radio
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | ph1l/halo_radio | HaloRadio/PlaylistListMaker.py | Python | gpl-2.0 | 1,038 |
##
## func delegation tools
## These are some helper methods to make dealing with delegation
## dictionary trees a little more sane when dealing with delegation
## and related functions.
##
## Copyright 2008, Red Hat, Inc.
## Steve Salevan <ssalevan@redhat.com>
##
## This software may be freely redistributed under the ... | ssalevan/func | func/overlord/delegation_tools.py | Python | gpl-2.0 | 7,199 |
__author__ = 'David Magee, Carolina Correia, and Kevin Rue-Albrecht'
__copyright__ = "Copyright 2014, GPLv2"
from . import RNAseqIO
from . import SeqDataTypes
| kevinrue/RNAfastqDeconvolute | src/__init__.py | Python | gpl-2.0 | 160 |
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
import time
import logging
import os
class FileHandler():
"""
Handler to use when monitor a directory.
"""
def on_created(self, src_path, is_directory):
logging.info('On created: "%s", directory: %s', sr... | heroandtn3/syncx | file_monitor.py | Python | gpl-2.0 | 1,978 |
import sys, pickle, copy
import numpy as np
import matplotlib.pyplot as pl
import astropy.io.fits as pyfits
import magellanic.regionsed as rsed
import magellanic.mcutils as utils
from magellanic.lfutils import *
try:
import fsps
from sedpy import observate
except ImportError:
#you wont be able to predict... | bd-j/magellanic | magellanic/sfhs/prediction_scripts/predicted_total.py | Python | gpl-2.0 | 5,894 |
# encoding=utf-8
# pykarta/geometry/from_text.py
# Copyright 2013--2020, Trinity College
# Last modified: 9 February 2020
import re
from . import Point
# Create a Point() from a text string describing a latitude and longitude
#
# Example from Wikipedia article Whitehouse: 38° 53′ 51.61″ N, 77° 2′ 11.58″ W
# \u2032 --... | david672orford/pykarta | pykarta/geometry/from_text.py | Python | gpl-2.0 | 2,761 |
from cx_Freeze import setup, Executable
import sys
base = None
if sys.platform == "win32":
#base = "Win32GUI"
base = "Console"
executables = [
Executable("G_outgauge.py",
base=base,
icon="icon.ico"
)
]
include_files=[]
include_files.append(("LogitechLcdEnginesWrapper.dll... | 50thomatoes50/G_outgauge.py | setup.py | Python | gpl-2.0 | 907 |
import bpy
import os
def setSceneOpts():
global channels
global sizex
global sizey
global selected_to_active
# VARIABLES
sizex = bpy.context.scene.bake_pbr_channels.sizex
sizey = bpy.context.scene.bake_pbr_channels.sizey
selected_to_active= bpy.context.scene.bake_pbr_channels.selt... | oscurart/BlenderAddons | oscurart_bake_pbr_maps_linear.py | Python | gpl-2.0 | 13,463 |
import syslog
from flask import Flask, request, render_template, send_from_directory
from flask.ext.bootstrap import Bootstrap
import json
import re
import syslog
import urllib2
from datetime import timedelta
from flask import make_response, request, current_app
from functools import update_wrapper
import sstoreclient
... | bikeshare/bikeshare-web | bikeshare.py | Python | gpl-2.0 | 4,352 |
import unittest
from rsync_usb.ChunkLocation import ChunkLocation
class ChunkLocationTests(unittest.TestCase):
'''Test TargetHashesWriter and TargetHashesReader'''
def testProperties(self):
pos = ChunkLocation('dummy', 100, 10)
self.assertEqual(pos.path, 'dummy')
self.... | shearern/rsync-usb | src/rsync_usb_tests/ChunkLocationTests.py | Python | gpl-2.0 | 4,596 |
# Portions Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# progress.py progress bars related code
#
# Copyright (C) 2010 Augie Fackler <durin42@gmail.com>
#
# This software may be used and distributed... | facebookexperimental/eden | eden/hg-server/edenscm/mercurial/progress.py | Python | gpl-2.0 | 26,512 |
# coding: utf-8
"""
Bugzilla stats such as verified, filed or fixed bugs
This plugin uses ``python-bugzilla`` module to gather the stats.
Use the ``bugzilla login`` command to initialize Bugzilla cookies
which then will be used for authentication. Reports will contain
only publicly available issues if cookies are not... | tvieira/did | did/plugins/bugzilla.py | Python | gpl-2.0 | 16,426 |
#!/usr/bin/env python
def backword(s):
length = len(s)
i = -1
t = s
while i >= -length:
t += s[i]
i -= 1
return t
| opensvn/test | src/study/python/backward.py | Python | gpl-2.0 | 151 |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
import os
import os.path
import pathlib
import platform
import unittest
from .lib.testcase import IntegrationTestCase
if plat... | facebookexperimental/eden | eden/integration/linux_cgroup_test.py | Python | gpl-2.0 | 2,902 |
from Screens.Screen import Screen
from Components.ActionMap import ActionMap
from Components.config import config
from Components.AVSwitch import AVSwitch
from Components.SystemInfo import SystemInfo
from GlobalActions import globalActionMap
from enigma import eDVBVolumecontrol, eTimer, eServiceReference
from boxbrandi... | popazerty/e2_sh4 | lib/python/Screens/Standby.py | Python | gpl-2.0 | 9,640 |
# -*- coding: utf-8 -*-
import fauxfactory
from cfme.configure.configuration import Category
from cfme.rest.gen_data import categories as _categories
import pytest
from utils.update import update
from utils.wait import wait_for
from utils import error
@pytest.mark.tier(2)
@pytest.mark.sauce
def test_category_crud():
... | jdemon519/cfme_tests | cfme/tests/configure/test_tag_category.py | Python | gpl-2.0 | 4,147 |
# -*- coding: utf-8 -*-
'''
Flixnet Add-on
Copyright (C) 2017 homik
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 l... | azumimuo/family-xbmc-addon | plugin.video.showboxarize/resources/lib/sources_pl/filister.py | Python | gpl-2.0 | 5,852 |
# Bruno Capuano 2020
# display the camera feed using OpenCV
import time
import cv2
# Camera Settings
camera_Width = 640 # 1024 # 1280 # 640
camera_Heigth = 480 # 780 # 960 # 480
frameSize = (camera_Width, camera_Heigth)
video_capture = cv2.VideoCapture(1)
time.sleep(1.0)
while True:
ret, frameOrig = video_cap... | elbruno/Blog | 20200610 Camera/01Camera.py | Python | gpl-2.0 | 567 |
__author__ = 'sofiaelm'
# version 1.0
"""
"""
from pymel.all import *
import maya.cmds as cmds
# Regex for our scene name structure. Example: genericTurnLeft45A_v013_sm
SCENE_FILE_NAME_REGEX = r'[a-zA-Z]+[0-9]+[A-Z]{1}_v[0-9]{3}_[a-zA-Z]{2}'
# Regex for our top node name structure. Example: genericTurnLeft45A
SCEN... | Phoenyx/TruemaxScriptPackage | Truemax/exportAnimFBX.py | Python | gpl-2.0 | 3,473 |
# Portions Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# transaction.py - simple journaling scheme for mercurial
#
# This transaction scheme is intended to gracefully handle program
# errors and int... | facebookexperimental/eden | eden/hg-server/edenscm/mercurial/transaction.py | Python | gpl-2.0 | 25,993 |
# -*- coding: utf-8 -*-
#
import qrcode
try:
#pylint: disable = E, W, R, C
from PyQt6.QtGui import QImage, QPixmap,QPainter # @UnusedImport @Reimport @UnresolvedImport
from PyQt6.QtCore import Qt # @UnusedImport @Reimport @UnresolvedImport
except Exception:
#pylint: disable = E, W, R, C
from PyQ... | artisan-roaster-scope/artisan | src/artisanlib/qrcode.py | Python | gpl-3.0 | 1,715 |
# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from tardis.tardis_portal.models import Dataset
@python_2_unicode_compatible
class Equipment(models.Model):
key = models.CharField(unique=True, max_length=30)
dataset = models.ManyToManyField(Da... | wettenhj/mytardis | tardis/apps/equipment/models.py | Python | gpl-3.0 | 826 |
"""
Settings for reputation changes that apply to
user in response to various actions by the same
users or others
"""
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import REP_AND_BADGES
from askbot.deps.livesettings import ConfigurationGroup, IntegerValue
from django.utils.translation... | stianrh/askbot-nordic | askbot/conf/badges.py | Python | gpl-3.0 | 5,005 |
import mraa
import time
from multiprocessing import Queue,Process
import move_avge
CO2_BYTE = 9
NUM_INCOME_BYTE = 13
S8_message = b"\xFE\x04\x00\x00\x00\x04\xE5\xC6"
class sensor(Process):
def __init__(self, q):
Process.__init__(self)
self.q = q
self.u=mraa.Uart(1)
self.u.setBaudRate(9600)
self.u.setMod... | cclljj/AnySense_7688 | lib/gas_co2_s8.py | Python | gpl-3.0 | 1,189 |
#!/usr/bin/env python
# remoteobj v0.4, best yet!
# TODO: This will get wrecked by recursive sets/lists/dicts; need a more picklish method.
# TODO: Dict/sets/lists should get unpacked to wrappers that are local for read-only access,
# but update the remote for write access. Note that __eq__ will be an interesting... | KernelAnalysisPlatform/KlareDbg | static2/ida/remoteobj.py | Python | gpl-3.0 | 16,409 |
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
from blueman.Functions import dprint
from blueman.bluez.obex.Base import Base
class AgentManager(Base):
def __init__(self):
super(AgentManager, self).__init... | die-uhus/blueman | blueman/bluez/obex/AgentManager.py | Python | gpl-3.0 | 976 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('layers', '24_to_26'),
]
operations = [
migrations.CreateModel(
name='QGISServerLayer',
fields=[
... | kartoza/geonode | geonode/qgis_server/migrations/0001_initial.py | Python | gpl-3.0 | 597 |
# Orca
#
# Copyright 2005-2009 Sun Microsystems Inc.
#
# This library 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 2.1 of the License, or (at your option) any later version.
#
# This... | Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/orca/scripts/apps/packagemanager/__init__.py | Python | gpl-3.0 | 850 |
import urllib
import lxml.html
connection = urllib.urlopen('http://www.amazon.in/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=iphone')
dom = lxml.html.fromstring(connection.read())
for link in dom.xpath('//li[@id="result_0"]/@data-asin'): # select the url in href for all a tags(links)
print link
| smartyrad/Python-scripts-for-web-scraping | beauty.py | Python | gpl-3.0 | 314 |
# Hihi is the grandfather of all geeks in IIITA. He and his crazy ideas.....Huh..... Currently, hihi is working on his most famous project
# named 21 Lane, but he is stuck at a tricky segment of his code.
# Hihi wants to assign some random IP addresses to users, but he won't use rand(). He wants to change the current... | OmkarPathak/Python-Programs | CompetitiveProgramming/HackerEarth/Bit_Manipulation/P05_HihiAndCrazyBits.py | Python | gpl-3.0 | 1,216 |
import ctypes as ct
class Box(ct.Structure):
_fields_ = [
('tid', ct.c_size_t),
('ptr', ct.c_void_p),
('deleter', ct.CFUNCTYPE(None, ct.c_void_p)),
]
class TypeSystem(ct.Structure):
_fields_ = [
('type_counter', ct.c_size_t),
('add_type', ct.CFUNCTYPE(ct.c_size_t... | drufat/pybindcpp | pybindcpp/api.py | Python | gpl-3.0 | 790 |
VIDEO = "../static_files/videos/arena_10x2_sortTubes.mp4"
DRAW_FRAMES = True | gilestrolab/ethoscope | src/ethoscope/tests/integration_api_tests/_constants.py | Python | gpl-3.0 | 76 |
#!/usr/bin/env python
"""
@author: Sindre Tosse
"""
import datetime
import json
from math import radians, cos, sin, asin, sqrt
import cherrypy
import googlemaps
import requests
RAIN_TRESHOLD = 1.0 # mm
WIND_TRESHOLD = 5.0 # m/s
class RouteManager:
exposed=True
def __init__(self):
self.data_hub = Dat... | bonus85/greenroute | logic_server/logic.py | Python | gpl-3.0 | 9,010 |
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... | gem/geonode | geonode/layers/views.py | Python | gpl-3.0 | 29,767 |
"""Tests for views of tracker application."""
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.test import TestCase
from tracker.models import (Expenditure, Purse)
User = get_user_model()
class HomeTest(TestCase):
"""Test home view."""
def setUp(self):
... | orontee/porte-monnaie | site/tracker/tests/test_views.py | Python | gpl-3.0 | 19,399 |
"""Test code for iiif.auth_basic.
See http://flask.pocoo.org/docs/0.10/testing/ for Flask notes.
"""
from flask import Flask, request, make_response, redirect
from werkzeug.datastructures import Headers
import base64
import json
import re
import unittest
from iiif.auth_basic import IIIFAuthBasic
dummy_app = Flask('d... | zimeon/iiif | tests/test_auth_basic.py | Python | gpl-3.0 | 3,828 |
from types import NoneType
from ert.cwrap import BaseCClass, CWrapper
from ert.enkf import ENKF_LIB
from ert.util import Matrix
class ObsData(BaseCClass):
def __init__(self):
c_pointer = ObsData.cNamespace().alloc()
super(ObsData, self).__init__(c_pointer)
def __len__(self):
""" @rty... | iLoop2/ResInsight | ThirdParty/Ert/devel/python/python/ert/enkf/obs_data.py | Python | gpl-3.0 | 2,908 |
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2011 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""Qt utilities"""
import os, re
import os.path as osp
from spyderlib.qt.QtGui import (QAction, QStyle, QWidget, QIcon, QApplication,
... | jromang/retina-old | distinclude/spyderlib/utils/qthelpers.py | Python | gpl-3.0 | 13,370 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009, Gustavo Narea <me@gustavonarea.net>.
# All Rights Reserved.
#
# This software is subject to the provisions of the BSD-like license at
# http://www.repoze.org/LICENSE.txt. A copy of the license... | jokajak/itweb | data/env/lib/python2.6/site-packages/repoze.who_testutil-1.0.1-py2.6.egg/tests/fixture/__init__.py | Python | gpl-3.0 | 729 |
from django.contrib import admin
from .models import Equipo, Jugadore
# Register your models here.
admin.site.register(Equipo)
admin.site.register(Jugadore)
| i32argaj/practicas-is | ligaFutbol/liga/admin.py | Python | gpl-3.0 | 159 |
'''
Created on Oct 30, 2014
@author: Arrington
'''
from pyHopeEngine import engineCommon as ECOM
from pyHopeEngine.actors.components.aiComponent import AIComponent
from superPong.actors.ballAI.ballProcesses.ballChooseStateProcess import BallChooseStateProcess
from superPong.actors.ballAI.pongBallBrain import MainBall... | Trinak/SuperPong | superPong/actors/components/ballAIComponent.py | Python | gpl-3.0 | 1,814 |
# This file is part of cloud-init. See LICENSE file for license information.
from collections import namedtuple
import copy
import os
from uuid import uuid4
from cloudinit import safeyaml
from cloudinit import util
from cloudinit.tests.helpers import (
CiTestCase, dir2dict, populate_dir, populate_dir_with_ts)
fr... | larsks/cloud-init | tests/unittests/test_ds_identify.py | Python | gpl-3.0 | 39,041 |
from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE
try:
import json
except ImportError:
import simplejson as json
requires_api_version = '2.5'
plugin_type = (TYPE_INTERACTIVE,)
def config_hook(conduit):
parser = conduit.getOptParser()
parser.add_option('', '--json', dest='json', acti... | deanwilson/yum-transaction-json | transaction-json.py | Python | gpl-3.0 | 1,282 |
# -*- coding: utf-8 -*-
import LineAlpha
from LineAlpha.Gen.ttypes import *
from datetime import datetime
import time,random,sys,json,codecs,threading,glob
cl = LineAlpha.LINE()
cl.login(qr=True)
cl.loginResult()
kk = LineAlpha.LINE()
kk.login(qr=True)
kk.loginResult()
ki = LineAlpha.LINE()
ki.login(qr=True)
ki.logi... | rachmansenpai/rach-devp | chivasbot.py | Python | gpl-3.0 | 83,839 |
#!/usr/bin/env python3
import random
import sys
f=open("BACON","r")
o=open("BINARY","w")
z=f.readlines()
k=[]
oo=""
st=sys.argv[1]
ss=''.join(['%08d'%int(bin(ord(i))[2:]) for i in st])
print("ENCRYPTING...")
print("Word => ",st,end="\n\n")
print("Encrypted => ",end="")
for i in z:
k.append(i.strip())
for i in ss:
... | DISMGryphons/GryphonCTF2017-Challenges | challenges/crypto/BinaryBacon/generate/create.py | Python | gpl-3.0 | 740 |
# This script will check http://services.scribus.net for broken assets
import lxml.html
url = "http://services.scribus.net"
doc = lxml.html.parse(url)
# pattern matching for relative urls: <a href="scribus_fonts.xml">
content_parsed = doc.xpath('href')
# also ignore scribusversions.xml
# Create a scraper class to ... | scribusproject/scribus-tools | resource-checker/scribus-services-check.py | Python | gpl-3.0 | 408 |
#!/usr/bin/env python
from hive import *
from bee import *
from random import random as rand
import numpy as np
class HiveCom(Hive):
def __init__(self, x, y, n_bees, grid_size, grid):
self.directions = []
Hive.__init__(self, x, y, n_bees, grid_size, grid)
def assign_settings(self, bee):
... | tatarbrot/foraging | hive_com.py | Python | gpl-3.0 | 687 |
import os
import gc
import platform
import sys
import time
import tempfile
import warnings
from optparse import OptionParser
import gpaw.mpi as mpi
from gpaw.hooks import hooks
from gpaw import debug
from gpaw.version import version
def run():
description = ('Run the GPAW test suite. The test suite can be run i... | robwarm/gpaw-symm | gpaw/test/test.py | Python | gpl-3.0 | 5,364 |
"""
Copyright (c) 2010 cmiVFX.com <info@cmivfx.com>
This file is part of AtomSplitter.
AtomSplitter 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... | justinfx/AtomSplitter | ui/__init__.py | Python | gpl-3.0 | 776 |
# -*- coding: utf-8 -*-
"""swiftsc.utils unit tests."""
import unittest
from swiftsc import utils as u
from swiftsc.tests import test_vars as v
class UtilsTests(unittest.TestCase):
"""Unit test of utils.py"""
def test_check_mimetype(self):
"""test checking mimetype"""
self.assertEqual(v.TEST... | mkouhei/swiftsc | swiftsc/tests/test_utils.py | Python | gpl-3.0 | 1,071 |
"""Spike analysis software.
"""
from __future__ import division, print_function, absolute_import
__author__ = "Marek Rudnicki"
__version__ = "0.7.2"
import os
if 'THpdb' in os.environ:
import pdb
import sys
import traceback
def info(type, value, tb):
traceback.print_exception(type, value... | timtammittee/thorns | thorns/__init__.py | Python | gpl-3.0 | 1,184 |
# Copyright (C) 2010 Trinity Western University
from cube.books.models import Book
from cube.twupass.settings import TWUPASS_LOGOUT_URL
from django.contrib.auth.models import User
from django.contrib import admin
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template, redi... | kd7iwp/cube-bookstore | cube/urls.py | Python | gpl-3.0 | 2,981 |
import logging
from json import dumps
from qbittorrentapi.decorators import Alias
from qbittorrentapi.decorators import aliased
from qbittorrentapi.decorators import login_required
from qbittorrentapi.decorators import response_json
from qbittorrentapi.decorators import response_text
from qbittorrentapi.decorators imp... | Vagab0nd/SiCKRAGE | lib3/qbittorrentapi/app.py | Python | gpl-3.0 | 6,184 |
import os
import sqlite3
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
# create our little application :)
app = Flask(__name__)
app.config.from_object(__name__)
# Load default config and override config from an environment variable
app.config.update(dict(
DATABAS... | ppayter-cc/user-story-manager-ppayter-cc | smanager.py | Python | gpl-3.0 | 5,881 |
# -*- coding: utf-8 -*-
## Description: class NetworkML for loading NetworkML from file or xml element into MOOSE
## Version 1.0 by Aditya Gilra, NCBS, Bangalore, India, 2011 for serial MOOSE
## Version 1.5 by Niraj Dudani, NCBS, Bangalore, India, 2012, ported to parallel MOOSE
## Version 1.6 by Aditya Gilra, NCBS, Ban... | BhallaLab/moose | moose-core/python/moose/neuroml/NetworkML.py | Python | gpl-3.0 | 25,761 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
created on Tue Jul 29 10:12:58 2014
@author: mcollado
"""
import random
from ConfigParser import SafeConfigParser
import sys
from multiprocessing import Process
import time
import os
import logging
from daemon import runner
# import paho.mqtt.publish as publish
# import ... | SensSolutions/sens_platform | psens/discarted/psens2.py | Python | gpl-3.0 | 3,984 |
# -*- coding: utf-8 -*-
#
# diffoscope: in-depth comparison of files, archives, and directories
#
# Copyright © 2015 Jérémy Bobbio <lunar@debian.org>
#
# diffoscope 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 Foundati... | bnewbold/diffoscope | tests/comparators/test_java.py | Python | gpl-3.0 | 2,039 |
import argparse
from ..api import _v1
class HelloHandler:
def __init__(
self, args: argparse.Namespace, now: _v1.Now, add_entry: _v1._private.AddEntry,
):
self._args = args
self._now = now
self._add_entry = add_entry
def __call__(self):
self._add_entry(_v1.Entry(s... | larose/utt | utt/plugins/0_hello.py | Python | gpl-3.0 | 593 |
#First import pwn tools
from pwn import *
#Declare the binary, and run it
elf = ELF("./f5_64")
context(binary=elf)
target = process("./f5_64")
#Grab the buf0 address
buf0_address = p64(elf.symbols["buf0"])
#Unpack sh and store as a string
sh = str(u64("sh\0\0\0\0\0\0"))
#Finish crafting the exploit and send it
tar... | guyinatuxedo/escape | fmt_str/f5_64/exploit.py | Python | gpl-3.0 | 448 |
# -*- coding: utf-8 -*-
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
if PY3:
import urllib.parse as urlparse # Es muy lento en PY2. En PY3 es nativo
else:
import urlparse # Usamos... | alfa-addon/addon | plugin.video.alfa/channels/sexgalaxy.py | Python | gpl-3.0 | 4,331 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
#-------------------------------------------------------------------------------
#
# DAI - Desarrollo de Aplicaciones para Internet
#
# 2014 Ernesto Serrano <erseco@correo.ugr.es>
#
#-------------------------------------------------------------------------------
Progra... | erseco/ugr_desarrollo_aplicaciones_internet | Practica_01/ejercicio_01.py | Python | gpl-3.0 | 1,395 |
#!/usr/bin/env python3
"""docstring"""
import os
import sys
args = sys.argv[1:]
if len(args) != 1:
print('Usage: {} WORD'.format(os.path.basename(sys.argv[0])))
sys.exit(1)
word = args[0]
number = 0
for letter in word:
number += ord(letter)
print('"{}" = "{}"'.format(word, number))
| kyclark/metagenomics-book | python/map/gematria2.py | Python | gpl-3.0 | 301 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ISS', '0021_poster_auto_subscribe'),
]
operations = [
migrations.AddField(
model_name='poster',
name... | RyanJenkins/ISS | ISS/migrations/0022_poster_posts_per_page.py | Python | gpl-3.0 | 420 |
"""
Study Project
Copyright (C) 2015 Study Project Authors and Contributors
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.
Th... | csebastian2/study | study/__init__.py | Python | gpl-3.0 | 886 |
# -*- coding: utf-8 -*-
"""
utility for the planning database
"""
from __future__ import print_function
from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
import logging
import string
from datetime import datetime,date,timedelta
import databasemod... | Hydrosys4/Master | actuatordbmod.py | Python | gpl-3.0 | 9,532 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2011-2014 WikiTeam developers
# 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 optio... | rsomeon/wikiteam | testing/test_dumpgenerator.py | Python | gpl-3.0 | 14,795 |
#!/usr/bin/env python2
# encoding=utf-8
from __future__ import division, print_function
from math import ceil, floor, log10, pi
from sys import argv, stdout
from xml.dom import minidom
import bz2
import csv
# local imports
from my_helper_functions_bare import *
def pretty_mean_std(data):
return uncertain_number_... | macioosch/dynamo-hard-spheres-sim | to_csv_pretty.py | Python | gpl-3.0 | 3,184 |
import logging
import sys
import time
import traceback
from weakref import WeakValueDictionary
import bs4
from selenium import webdriver
from app.services import slack
from app.utils import db
class BaseScraper(object):
""" Abstract class for implementing a datasource. """
_instances = WeakValueDictionary... | remysaissy/paris-immo-finder | app/scrapers/base_scraper.py | Python | gpl-3.0 | 6,157 |
# Copywrite © 2017 Joe Rogge, Jacob Gasyna and Adele Rehkemper
#This file is part of Rhythm Trainer Pro. Rhythm Trainer Pro 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... | jacobgasyna/Hackathon2017 | basics.py | Python | gpl-3.0 | 3,296 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import os
from glob import glob
import argparse
import time
import datetime
from multiprocessing import Pool
# local import
from ast import ast
import result
AST_EXT_FILE = ".ast"
CSV_EXT_FILE = ".csv"
CPP_EXT_FILE = ("*.cc", "*.cpp")
# TODO support sigterm and close ... | mathben/python_clang_parser | main.py | Python | gpl-3.0 | 12,033 |
#! /usr/bin/python2.6
# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
# intentionally NOT "/usr/bin/env python". On many systems
# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
# scripts, and /usr/local/bin is the default directory where Python is
# installed, so /usr/bin/env woul... | astagi/twitterene | twitterene/tweepy/cgi.py | Python | gpl-3.0 | 34,465 |
from base import Input
from wapiti import get_json
class GoogleNews(Input):
prefix = 'gn'
def fetch(self):
return get_json('http://ajax.googleapis.com/ajax/services/search/news?v=1.0&q=' + self.page_title)
def process(self, f_res):
if f_res['responseStatus'] == 403 or not f_res.get('resp... | slaporte/qualityvis | inputs/google.py | Python | gpl-3.0 | 1,054 |
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... | imajes/Sick-Beard | sickbeard/nzbget.py | Python | gpl-3.0 | 6,926 |
import os
from django.contrib.messages import constants
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECR... | valentine20xx/portal | portal/settings.py | Python | gpl-3.0 | 4,119 |
import RPi.GPIO as GPIO
import time
import pygame
GPIO.setmode(GPIO.BCM)
PIR_PIN = 4
GPIO.setup(PIR_PIN,GPIO.IN)
time.sleep(2)
playing = 0
start = 0
count = 0
limit = 10
while True:
time.sleep(1)
if GPIO.input(PIR_PIN):
if playing == 0:
start = 1
if playing == 1:
start = 0
count = 0
#print "PIR activa... | ferriman/SSandSP | raspberrypi/expo.py | Python | gpl-3.0 | 693 |
# Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... | cjaymes/pyscap | src/scap/model/ai_1_1/ExtendedInformationType.py | Python | gpl-3.0 | 933 |
from pupa.scrape import Person, Scraper
from openstates.utils import LXMLMixin
class VIPersonScraper(Scraper, LXMLMixin):
def scrape(self, chamber, term):
pass
yield Person()
# home_url = 'http://www.legvi.org/'
# doc = lxml.html.fromstring(self.get(url=home_url).text)
# U... | openstates/openstates | openstates/vi/legislators.py | Python | gpl-3.0 | 490 |
from Acquisition import aq_inner
from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile
from opencore.browser.base import BaseView, view
from opencore.project import LATEST_ACTIVITY
from opencore.project import PROJ_HOME
from opencore.project.utils import get_featurelets
from plone.memoize.instance ... | socialplanning/opencore | opencore/project/browser/base.py | Python | gpl-3.0 | 3,338 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
imapHost = "mail.me.com"
imapUser = "user"
imapPassword = "pw"
smtpHost = "mail.me.com"
smtpUser = "user"
smtpPassword = "pw"
fromAddress = "list@me.com"
listName = "PyMailinglist"
mailingList = ['user1@me.com','user2@me.com']
adminsList = ['admin@me.com']
| tigerxy/pymailinglist | mailerconfig.py | Python | gpl-3.0 | 307 |
#
# disOps.py v 1.0.0
#
# Copyright (C) 2011 Gil Dabah, http://ragestorm.net/disops/
#
# disOps is a part of the diStorm project, but can be used for anything.
# The generated output is tightly coupled with diStorm data structures which can be found at instructions.h.
# The code in diStorm that actually walks th... | abahdanovich/distorm | disOps/disOps.py | Python | gpl-3.0 | 22,792 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 by YOUR NAME HERE
#
# This file is part of RoboComp
#
# RoboComp 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 o... | robocomp/robocomp-robolab | components/localization/UWBpublisher/src/specificworker.py | Python | gpl-3.0 | 6,357 |
"""
Copyright 2008-2009 Serge Matveenko
This file is part of Picket.
Picket 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.
Picket is dist... | lig/picket_classic | apps/picket/urls.py | Python | gpl-3.0 | 3,812 |
#!/usr/bin/env python
# coding=utf-8
"""157. Solving the diophantine equation <sup>1</sup>/<sub><var>a</var></sub>+<sup>1</sup>/<sub><var>b</var></sub>= <sup><var>p</var></sup>/<sub>10<sup><var>n</var></sup></sub>
https://projecteuler.net/problem=157
Consider the diophantine equation 1/a+1/b= p/10n with a, b, p, n po... | openqt/algorithms | projecteuler/pe157-solving-the-diophantine-equation-sup1supsubvaravarsubsup1supsubvarbvarsub-supvarpvarsupsub10supvarnvarsupsub.py | Python | gpl-3.0 | 823 |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2016 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | crisely09/horton | horton/io/molpro.py | Python | gpl-3.0 | 5,611 |
#!/usr/bin/env python
##
## ari
##
## the realraum audience response indicator
##
##
## Copyright (C) 2015 Christian Pointner <equinox@spreadspace.org>
##
## This file is part of ari.
##
## ari is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as publi... | realraum/ari | test/overlay-test.py | Python | gpl-3.0 | 6,283 |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""CNF formulas type with support of linear forms
This CNF formula type supports
- linear equations mod 2
- integer linear inequalities on literals (no coefficients)
for example 'atmost k'
Copyright (C) 2021 Massimo Lauria <lauria.massimo@gmail.com>
https://github.com/... | MassimoLauria/cnfgen | cnfgen/formula/linear.py | Python | gpl-3.0 | 7,042 |
# -*- coding: utf-8 -*-
# #
# #
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; ei... | pferreir/indico-backup | bin/utils/db_log.py | Python | gpl-3.0 | 5,979 |
import datetime
import hashlib
from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.auth import get_user_model
from django.db import models, IntegrityError
from django.utils.translation import ugettext_lazy as _
from django.db.models import signals
from taggit.managers imp... | USStateDept/geonode | geonode/groups/models.py | Python | gpl-3.0 | 9,016 |
# coding=utf-8
"""
An abstract cache for cache replacement algorithms
Author: Jason Yang <peter.waynechina@gmail.com> 2016/05
"""
import abc
class Cache:
__metaclass__ = abc.ABCMeta
all = ["access",
"get",
"access",
"evict",
"_update",
"_insert"]
... | 1a1a11a/mimircache | PyMimircache/cache/abstractCache.py | Python | gpl-3.0 | 3,025 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.