code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para gamovideo # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re from core import jsunpack from core import logg...
MoRgUiJu/morguiju.repo
plugin.video.pelisalacarta/servers/gamovideo.py
Python
gpl-2.0
2,846
# Smoking' Guns 1.1 parser for BigBrotherBot(B3) (www.bigbrotherbot.net) # Copyright (C) 2010 Courgette # # 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 # (...
AusTac/parma
b3/parsers/smg11.py
Python
gpl-2.0
26,738
# -*- coding: utf-8 -*- '''Base TestCase class for OSF unittests. Uses a temporary MongoDB database.''' import abc import datetime as dt import functools import logging import re import unittest import uuid import blinker import responses import mock import pytest from django.test import TestCase as DjangoTestCase fr...
icereval/osf.io
tests/base.py
Python
apache-2.0
12,936
from rawweb import * def main(raw_stream,ssl): ''' This Burpy module is specially written to find CSRF vulnerability in Facebook Application. It has already found few minor CSRF vulnerability in FB application. Few them was qualifed for Bug Bounty. It simply checks whether CSRF token validation is present in Server...
ccgreen13/burpy
modules/fbxsrf.py
Python
gpl-2.0
1,716
from flask import Blueprint main = Blueprint('main', __name__) from . import views, errors
piratecb/up1and
app/main/__init__.py
Python
mit
98
""" The MIT License (MIT) Copyright (c) 2015-2021 Kim Blomqvist 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, copy, modify, ...
kblomqvist/yasha
yasha/yasha.py
Python
mit
5,426
#!/usr/bin/python from gi.repository import Gtk from gi.repository import AppIndicator3 as appindicator import os,argparse parser = argparse.ArgumentParser() parser.add_argument("silentcast_number", help="The number of Silentcast instances running. \ The system tray indicator icon will show the silentcast_num...
voor/silentcast
unity_indicator.py
Python
gpl-3.0
1,268
"""Prepare an input text for word segmentation * The input text must be in a phonologized form (a suite of phones, syllables or words tokens as specified by the token separator). * The input text is checked for errors in formatting (presence of punctuation, missing separators, etc...). * The output text contains...
bootphon/wordseg
wordseg/prepare.py
Python
gpl-3.0
10,673
#!/usr/bin/env python from CryptowallDropboxRecoveryLib.utils import * import sys # # Remove .aaa files whose name matches a restored file # def cleanup_folder(api_client, path): sys.stdout.write('Listing files in %s\n' % path) try: resp = api_client.metadata(path = path) contents = resp['cont...
l01cd3v/CryptowallDropboxRecovery
CryptowallCleanup.py
Python
gpl-2.0
1,802
# D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_duplicate(nums): # +++your code here+++ return # E. Given two lists sorted in increasing ord...
morfioce/basic-python3
2 Lists/list2.py
Python
mit
1,903
# -*- coding: utf-8 -*- """Unit tests for the Web Service client.""" import base64 import datetime import json import unittest from mock import patch, MagicMock from requests.exceptions import ConnectionError from genweb.serveistic.ws_client.problems import ( Client, ClientException, Problem) class TestWSClie...
UPCnet/genweb.serveistic
genweb/serveistic/tests/test_ws_client_problems.py
Python
gpl-3.0
10,661
from django.contrib import admin from discussion.models import Comment, Discussion, Post from orderable.admin import OrderableAdmin class CommentInline(admin.TabularInline): extra = 1 model = Comment raw_id_fields = ('user',) class PostAdmin(admin.ModelAdmin): inlines = (CommentInline,) list_fil...
incuna/django-discussion
discussion/admin.py
Python
bsd-2-clause
645
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # 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 requ...
tylertian/Openstack
openstack F/python-novaclient/novaclient/v1_1/flavor_access.py
Python
apache-2.0
2,568
import os from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.ONEANDONE) drv = cls(key=os.environ.get("ONEANDONE_TOKEN")) rules = [ {"protocol": "TCP", "port_balancer": 80, "port_server": 80, "source": "0.0.0.0"}, { "protocol": "TCP"...
apache/libcloud
docs/examples/compute/oneandone/create_load_balancer.py
Python
apache-2.0
756
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
SanaMobile/sana.protocol_builder
src-django/authentication/migrations/0001_initial.py
Python
bsd-3-clause
704
class Singleton(type): """ Use as metaclass! Example use in ``utilities/monitor.py`` . """ def __init__(self, *args, **kws): super(Singleton, self).__init__(*args, **kws) self._instance = None def __call__(self, *args, **kws): if not self._instance: self._ins...
TillArndt/CmsToolsAC3b
cmstoolsac3b/singleton.py
Python
gpl-3.0
404
import copy import datetime import re import time from unittest import TestCase, skipIf import mongomock from mongomock import ConfigurationError from mongomock import Database from mongomock import InvalidURI from mongomock import OperationFailure from .utils import DBRef try: from bson.objectid import ObjectI...
drorasaf/mongomock
tests/test__mongomock.py
Python
bsd-3-clause
73,475
import logging import pytest from _pytest.logging import LogCaptureFixture from aiobotocore.session import AioSession from aiobotocore.config import AioConfig from aiobotocore import httpsession @pytest.mark.moto @pytest.mark.asyncio async def test_get_service_data(session): handler_called = False def hand...
aio-libs/aiobotocore
tests/test_session.py
Python
apache-2.0
1,425
import sys sys.path.insert(1, "../../../") import h2o import random import copy def weights_vi(ip,port): # Connect to h2o h2o.init(ip,port) random.seed(1234) ###### create synthetic dataset1 with 3 predictors: p1 predicts response ~90% of the time, p2 ~70%, p3 ~50% response = ['a' for y in range(1...
ChristosChristofidis/h2o-3
h2o-py/tests/testdir_algos/deeplearning/pyunit_weights_var_impDeepLearning.py
Python
apache-2.0
6,772
from flask import Blueprint, request, current_app as app from twoxy.blueprints.base import TemplateView from twoxy.database.models import Blacklisted from twoxy.database import db_ctx as db from twoxy.util import ratelimit, random_twitter_auth, is_tweet_allowed import json import datetime import twitter blueprint = ...
ableiten/twoxy
twoxy/blueprints/main.py
Python
gpl-2.0
3,469
# -*- coding: utf-8 -*- # Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
google/GiftStick
tests/directory_tests.py
Python
apache-2.0
2,385
from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table from sqlalchemy.orm import create_session from sqlalchemy.orm import dynamic_loader from sqlalchemy.or...
mitsuhiko/werkzeug
examples/plnt/database.py
Python
bsd-3-clause
1,872
__version__ = "0.5.2" default_app_config = 'rest_registration.apps.RestRegistrationConfig'
szopu/django-rest-registration
rest_registration/__init__.py
Python
mit
91
# Copyright (C) 2004-2006 Python Software Foundation # Authors: Baxter, Wouters and Warsaw # Contact: email-sig@python.org """FeedParser - An email feed parser. The feed parser implements an interface for incrementally parsing an email message, line by line. This has advantages for certain applications, such as thos...
IronLanguages/ironpython2
Src/StdLib/Lib/email/feedparser.py
Python
apache-2.0
20,492
"""Constants for the analytics integration.""" from datetime import timedelta import logging import voluptuous as vol ANALYTICS_ENDPOINT_URL = "https://analytics-api.home-assistant.io/v1" DOMAIN = "analytics" INTERVAL = timedelta(days=1) STORAGE_KEY = "core.analytics" STORAGE_VERSION = 1 LOGGER: logging.Logger = lo...
adrienbrault/home-assistant
homeassistant/components/analytics/const.py
Python
apache-2.0
1,234
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl from .strings import ( basestring, unicode, bytes, file, tempfile, safe_string ) from .numbers import long, NUMERIC_TYPES # Python 2.6 try: from collections import OrderedDict except ImportError: from .odict...
aragos/tichu-tournament
python/openpyxl/compat/__init__.py
Python
mit
1,900
import _plotly_utils.basevalidators class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="show", parent_name="isosurface.spaceframe", **kwargs ): super(ShowValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
plotly/plotly.py
packages/python/plotly/plotly/validators/isosurface/spaceframe/_show.py
Python
mit
416
from .lmnn import LargeMarginNearestNeighbor, make_lmnn_pipeline from .bayesopt import find_hyperparams
johny-c/pylmnn
pylmnn/__init__.py
Python
bsd-3-clause
104
import indicomobile.db.event as db_event import indicomobile.db.session as db_session import indicomobile.db.contribution as db_contribution def get_favorites_events(events, user_id): for event in events: event["favorite"] = db_event.is_favorite(event["id"], user_id) return events def get_favorites_co...
indico/indico-mobile
indicomobile/core/favorites.py
Python
gpl-3.0
1,946
from django.urls import re_path from explorer.views import MainView from explorer.views import QueryView, NewQueryView from explorer.views import DeleteQueryView, DownloadQueryView from explorer.views import SqlQueryView app_name = 'rdrf' urlpatterns = [ re_path(r'^query/(?P<query_id>\w+)/?$', QueryVi...
muccg/rdrf
rdrf/explorer/urls.py
Python
agpl-3.0
844
#!/usr/bin/env python # Copyright KOLIBERO under one or more contributor license agreements. # KOLIBERO licenses this file to You 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.apach...
goliasz/mlaas-cfreco-mini
src/main/python/train.py
Python
apache-2.0
2,895
"""Contains factories related to processes."""
qbahn/grortir
grortir/main/model/processes/factories/__init__.py
Python
mit
47
''' Copyleft Jan 27, 2017 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego, Email: airanmehr@gmail.com ''' import numpy as np; np.set_printoptions(linewidth=200, precision=5, suppress=True) import pandas as pd; pd.options.display.max_rows = 20; pd.options.display.expand_frame_repr = False import os; import CLEAR....
airanmehr/bio
Scripts/TimeSeriesPaper/RealData/CompositeSignal.py
Python
mit
3,376
import logging logger = logging.getLogger(__name__) from .engine import Engine from .controller import View, Controller
Petr-By/qtpyvis
tools/activation/__init__.py
Python
mit
121
import time from datetime import date, datetime from json import JSONEncoder from iso8601 import iso8601 class DateTimeJSONEncoder(JSONEncoder): def default(self, value): if isinstance(value, (datetime, date)): return to_iso(value) else: return super(DateTimeJSONEncoder, ...
attm2x/m2x-python-mqtt
m2x_mqtt/utils.py
Python
mit
1,625
import rospy from hri_api.util import Singleton class InitNode(): __metaclass__ = Singleton def __init__(self): rospy.init_node("hri_application", anonymous=True)
jdddog/hri
hri_api/src/hri_api/util/init_node.py
Python
bsd-3-clause
182
""" Copyright 2013 Dustin Frisch <fooker@lab.sh> This file is part of ddserver. ddserver 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 your option) any later vers...
ddserver/ddserver
ddserver/updater/nic.py
Python
agpl-3.0
7,151
from rest_framework.routers import DefaultRouter from cdtAction import views router = DefaultRouter(trailing_slash=False) router.register(r'user', views.UserViewSet, base_name='user') urlpatterns = router.urls urlpatterns += []
restait/cdt
cdt/cdtAction/urls.py
Python
bsd-3-clause
232
from django.core.management.base import BaseCommand from django.core.management import call_command import os class Command(BaseCommand): def handle(self, *args, **kwargs): print('[Barsystem installer]') self.generate_secret_key() self.migrate() self.createsuperuser() self....
TkkrLab/barsystem
barsystem/src/barsystem/management/commands/install_barsystem.py
Python
mit
2,135
import codecs import json import os import random import asyncio import re from cloudbot import hook from cloudbot.util import textgen nick_re = re.compile("^[A-Za-z0-9_|.\-\]\[\{\}]*$", re.I) cakes = ['Chocolate', 'Ice Cream', 'Angel', 'Boston Cream', 'Birthday', 'Bundt', 'Carrot', 'Coffee', 'Devils', 'Fruit', ...
Red-M/CloudBot
plugins/foods.py
Python
gpl-3.0
8,196
from . import base, pages from .base import Context, Contexts from .pages import Page
fidals/refarm-site
pages/context/__init__.py
Python
mit
86
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # 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 o...
pszemus/grpc
tools/run_tests/artifacts/package_targets.py
Python
apache-2.0
4,899
SITE_NAME = 'HTMD' SITE_URL = '' ### Optional Settings ### SITE_LOGO = '' SITE_DESCRIPTION = '' # @site_username SITE_TWITTER = '' # URL of a Facebook page SITE_FACEBOOK = '' # Unique Facebook ID used for platforminsights # https://developers.facebook.com/docs/platforminsights FACEBOOK_APP_ID = '' # Where to look fo...
Siecje/htmd
htmd/config.py
Python
mit
731
import csv import sys import json from star import Star f = open(sys.argv[1], "rt") outfile = open('stars.js', 'w') reader = csv.DictReader(f) stars = [] print("Processing rows") i = 0 for row in reader: print("Processing row "+str(i)) star = Star(row) stars.append(star) json.dump(star.__dict__, outfil...
nversbra/InfoViz
resources/CSVtoJSONConverter/converter.py
Python
mit
416
# -*- coding: utf-8 -*- """phoneauto: an androind automation tool :copyright: (c) 2015 by tksn :license: MIT """ from __future__ import unicode_literals
tksn/phoneauto
phoneauto/__init__.py
Python
mit
155
from django.conf.urls import patterns, url from views import edit_question urlpatterns = patterns('', url('new', edit_question, name="new") )
dcoetzee/questionvault
src/questionvault/apps/questions/urls.py
Python
unlicense
183
""" thetvdb.com Python API (c) 2009 James Smith (http://loopj.com) (c) 2014 Wayne Davison <wayne@opencoder.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 (at...
KODeKarnage/script.sub.missing
resources/lib/thetvdbapi.py
Python
gpl-3.0
10,006
from django.utils.encoding import smart_bytes import six def dict_strip_unicode_keys(uni_dict): """ Converts a dict of unicode keys into a dict of ascii keys. Useful for converting a dict to a kwarg-able format. """ if six.PY3: return uni_dict return {smart_bytes(key): value for key...
beedesk/django-tastypie
tastypie/utils/dict.py
Python
bsd-3-clause
349
from flask import Flask, render_template, request from pyquery import PyQuery as pq import pyjade import requests from urllib.parse import unquote_plus from statistics import mean from threading import Thread from queue import Queue TEMPLATE_NAME_INDEX = "index.jade" TEMPLATE_NAME_RESULTS = "results.jade" TEMPLATE_FOL...
mrandri19/magicBot
src/crawler.py
Python
mit
6,064
from hearthbreaker.agents import registry from hearthbreaker.cards.heroes import hero_for_class from hearthbreaker.constants import CHARACTER_CLASS from hearthbreaker.engine import Deck, card_lookup, Game from hearthbreaker.cards import * from hearthbreaker.replay import * from hearthbreaker.agents.basic_agents import ...
jirenz/CS229_Project
Replay_generator.py
Python
mit
1,391
import scipy.io.wavfile import subprocess import matplotlib.pyplot class Preprocess(object): ''' TODO: Instantiate object or just treat these as static methods??? TODO: Should both audio AND video have beat and frequency analysis??? ''' # Location where audio files will be stored @staticmethod...
pdxcycling/carv.io
audio_analysis/code/preprocess_audio.py
Python
mit
1,061
from tests import * import unittest import xmlrunner import sys import os if __name__ == "__main__": with open('testReport.xml', 'wb') as report: unittest.main( testRunner=xmlrunner.XMLTestRunner(output=report), failfast=False, buffer=False, catchbreak=False)
NTUTVisualScript/Visual_Script
tests/main.py
Python
mit
297
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import zipfile from contextlib import contextmanager from pants.backend.jvm.targets.jar_library import JarLibrary from pants.backend.jvm.targets.unpacked_jars import UnpackedJar...
tdyas/pants
tests/python/pants_test/backend/jvm/tasks/test_ivy_imports.py
Python
apache-2.0
3,130
from .operations import * from .base import get_member, get_member_dot, PyJsFunction, Scope class OP_CODE(object): _params = [] # def eval(self, ctx): # raise def __repr__(self): return self.__class__.__name__ + str( tuple([getattr(self, e) for e in self._params])) # ------...
alfa-addon/addon
plugin.video.alfa/lib/js2py/internals/opcodes.py
Python
gpl-3.0
21,830
# Ant-FS # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> # # 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, copy...
Tigge/openant
ant/fs/commandpipe.py
Python
mit
6,956
#!/usr/bin/env python # # Copyright 2004,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your opt...
UpYou/relay
my_gnuradio/gr/qa_iir.py
Python
gpl-3.0
5,424
# -*- coding: utf-8 -*- # ##################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # Copyright (C) 2013 INIT Tech Co., Ltd (http://init.vn). # This program is free software: you can redistribute it a...
quanvm009/codev7
openerp/addons_quan/lifestyle/wizard/create_out_finished_wizard.py
Python
agpl-3.0
12,206
import json import unittest import mock from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.urlresolvers import reverse from django.db import transaction from django.http import HttpResponse from django.test import override_settings, TestCase, Tra...
proversity-org/edx-platform
common/djangoapps/student/tests/test_email.py
Python
agpl-3.0
21,184
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
EmanueleCannizzaro/scons
test/TEX/TEXFLAGS.py
Python
mit
3,365
"""pizzasite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')...
AndreiMiculita/WADLab
pizzasite/pizzasite/urls.py
Python
gpl-3.0
841
import sys sys.path.insert(1,"../../../") import h2o, tests def weights_and_biases(ip, port): print "Test checks if Deep Learning weights and biases are accessible from R" covtype = h2o.upload_file(h2o.locate("smalldata/covtype/covtype.20k.data")) covtype[54] = covtype[54].asfactor() dlmodel = h...
bospetersen/h2o-3
h2o-py/tests/testdir_algos/deeplearning/pyunit_weights_and_biasesDeeplearning.py
Python
apache-2.0
2,182
# Copyright (c) 2019 UAVCAN Consortium # This software is distributed under the terms of the MIT License. # Author: Pavel Kirienko <pavel@uavcan.org> from ._input import UDPInputSession as UDPInputSession from ._input import PromiscuousUDPInputSession as PromiscuousUDPInputSession from ._input import SelectiveUDPInput...
UAVCAN/pyuavcan
pyuavcan/transport/udp/_session/__init__.py
Python
mit
729
from . import account_rc_type from . import account_invoice
OCA/l10n-italy
l10n_it_fatturapa_in_rc/models/__init__.py
Python
agpl-3.0
60
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. #
kxepal/phoxpy
phoxpy/tests/modules/__init__.py
Python
bsd-3-clause
216
import sys sys.path.insert(1, "../../") import h2o, tests def expr_show(ip,port): iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris_wheader.csv")) print "iris:" iris.show() ################################################################### # expr[int], expr._data is pending...
bospetersen/h2o-3
h2o-py/tests/testdir_misc/pyunit_expr_show.py
Python
apache-2.0
551
import numpy as np import cv2 import sys def direction(window): angles = [] direction000 = np.array(window) * np.array([[0,0,0], [1,1,1], [0,0,0]]) direction045 = np.array(window) * np.array([[0,0,1], [0,1,0], [1,0,0]]) direction090 = np.array(window) * np.array([[0,1,0], [0,1,0], [0,1,0]]) directi...
rerthal/mc920
proj14/proj14.py
Python
gpl-3.0
1,374
# 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 writing, software # d...
mahak/nova
nova/tests/unit/api/openstack/compute/test_server_tags.py
Python
apache-2.0
16,680
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: charles.ferguson # # Created: 20/05/2015 # Copyright: (c) charles.ferguson 2015 # Licence: <your licence> #--------------------------------------------------------------...
ncss-tech/geo-pit
updateAttTable/wholesale_change.py
Python
gpl-2.0
3,943
from platform import system import os from os.path import sep, expanduser, join as join_path from collections import defaultdict from glob import glob from random import gammavariate import pygame as pg import settings from util import dd class Conf (object): IDENT = 'damage-control' USE_SAVEDATA = False ...
ikn/damage-control
game/conf.py
Python
gpl-3.0
13,448
import sys s = "41"*61 #junk s += "66e20608" #pop eax #s += "5de10a08" #pop edi, ret s += "0b000000" #11 s += "25d90608" #int 0x80 s += "57cb0b08" #ptr to /bin/sh s += "00000000" # NULL s += "00000000" # NULL s = s.decode("hex") sys.stdout.write("86\n") sys.stdout.write(s)
mttbrown/binary_exploits
first_rop/pwn.py
Python
gpl-3.0
276
from django.contrib import admin from .models import Category, Post class CategoryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} class PostAdmin(admin.ModelAdmin): list_display = ('title', 'publish', 'status') list_filter = ('publish', 'categories', 'status') search_fields = ...
TrueCryer/freetorial
blog/admin.py
Python
gpl-3.0
469
# Copyright (C) 2018, Yu Sheng Lin, johnjohnlys@media.ee.ntu.edu.tw # This file is part of Nicotb. # Nicotb 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 opti...
johnjohnlin/nicotb
sim/ahb/Ahb_test.py
Python
gpl-3.0
2,569
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys, os from peewee import * if os.path.exists('test.db'): os.remove('test.db') # tworzymy instancję bazy używanej przez modele baza = SqliteDatabase('test.db') # ':memory:' # klasa bazowa class BazaModel(Model): class Meta: database = baza # kla...
roninek/python101
bazy/orm/peewee/ormpw03.py
Python
mit
1,632
LICENSE = \ """ The MIT License (MIT) Copyright (c) 2015 Bryan Worrell 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, copy, m...
bworrell/cutiestix
cutiestix/__init__.py
Python
mit
1,100
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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...
googleapis/python-dialogflow-cx
samples/generated_samples/dialogflow_v3beta1_generated_session_entity_types_delete_session_entity_type_async.py
Python
apache-2.0
1,532
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import re class SpiderTaishaHsbcPipeline(object): def process_item(self, item, spider): print(">>>process_item<<<"...
jinzekid/codehub
python/dev_Spiders/spider_taisha_hsbc/spider_taisha_hsbc/pipelines.py
Python
gpl-3.0
2,519
''' Crunchyroll urlresolver plugin Copyright (C) 2013 voinage This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is ...
wndias/bc.repository
script.module.urlresolver/lib/urlresolver/plugins/crunchyroll.py
Python
gpl-2.0
2,847
import os from unittest import skipIf from .base_testcase import BaseTestCase from selenium.webdriver.support.ui import WebDriverWait, Select from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By fro...
RCOS-Grading-Server/HWserver
tests/e2e/test_submission.py
Python
bsd-3-clause
11,278
# -*- coding: utf-8 -*- from abc import abstractmethod import logging import os import urllib.request import urllib.parse import urllib.error import wx import outwiker.core.system import outwiker.core.commands from outwiker.core.application import Application from outwiker.core.defines import APP_DATA_KEY_ANCHOR fro...
unreal666/outwiker
src/outwiker/gui/htmlrenderwebkit.py
Python
gpl-3.0
11,408
from __future__ import print_function, division, absolute_import import functools import os import sys import warnings # --------------------------------------------------------------------- # Simple File Read and Store Utilities # --------------------------------------------------------------------- def saveToFile(f...
kirichoi/tellurium
tellurium/utils/misc.py
Python
apache-2.0
8,843
import pytest import demistomock as demisto from IntegrationsCheck_Widget_IntegrationsErrorsInfo import main from test_data.constants import FAILED_TABLE, FAILED_TABLE_EXPECTED @pytest.mark.parametrize('list_, expected', [ ([{'Contents': 'Item not found (8)'}], {'data': [{'Brand': None, ...
demisto/content
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsErrorsInfo/IntegrationsCheck_Widget_IntegrationsErrorsInfo_test.py
Python
mit
1,338
class PythonFrame(object): """frame backend using a Python objects: pyspark.rdd.RDD, [(str, dtype), (str, dtype), ...]""" def __init__(self, rdd, schema=None): self.rdd = rdd self.schema = schema
shibanis1/spark-tk
python/sparktk/frame/pyframe.py
Python
apache-2.0
221
""" Common test utilities for courseware functionality """ from abc import ABCMeta, abstractmethod from datetime import datetime import ddt from mock import patch from lms.djangoapps.courseware.url_helpers import get_redirect_url from student.tests.factories import AdminFactory, UserFactory, CourseEnrollmentFactory f...
rhndg/openedx
lms/djangoapps/courseware/testutils.py
Python
agpl-3.0
7,021
# calculate_multipart_etag Copyright (C) 2015 # Tony Lastowka <tlastowka at gmail dot com> # https://github.com/tlastowka # # # calculate_multipart_etag 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 Found...
tlastowka/calculate_multipart_etag
calculate_multipart_etag.py
Python
gpl-3.0
2,427
# coding: utf-8 import logging import pickle import numpy as np import pandas as pd from app.models import RepoStarring logger = logging.getLogger('django') def prepare_user_item_df(min_stargazers_count): repos = RepoStarring.objects \ .filter(stargazers_count__gte=min_stargazers_count) \ .val...
vinta/albedo
app/utils_repo.py
Python
mit
1,845
import bootstrap_lexer class ParsingError(Exception): pass def parse(tokens, top_level=True): _list = [] saw_closing_paren = False while tokens: token_class, token = tokens.pop(0) if token_class == bootstrap_lexer.OpenParen: _list.append(parse(tokens, top_level=False)) ...
Wilfred/Lython
bootstrap_parser.py
Python
gpl-3.0
749
""" Testing helpers. """
ereOn/redis-lua
redis_lua/testing.py
Python
lgpl-3.0
25
#!/usr/bin/env python2 """ basic example of using Madrigal to query data Michael Hirsch https://scivision.co/madrigal-api-install-and-basic-example-for-geospace-remote-sensing-query/ """ from __future__ import print_function,division # try: from madrigalWeb import madrigalWeb as MW except ImportError as e: exi...
scienceopen/madrigal-examples
basicQuery.py
Python
gpl-3.0
3,608
NAMES = ["Agatha", "Bernard", "Lucy", "Russle", "April", "Sammy"]
jl4ge/cs3240-labdemo
names.py
Python
mit
67
# -*- coding: utf-8 -*- """ Created on 01 Mar 2016 @author: Éric Piel Copyright © 2016 Éric Piel, Delmic This file is part of Odemis. Odemis 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. Odemis is...
gstiebler/odemis
src/odemis/gui/plugin/__init__.py
Python
gpl-2.0
19,444
from __future__ import print_function import sys from rflib import * registers = [ "SYNC1", "SYNC0", "PKTLEN", "PKTCTRL1", "PKTCTRL0", "ADDR", "CHANNR", "FSCTRL1", "FSCTRL0", "FREQ2", "FREQ1", "FREQ0", "MDMCFG4", "MDMCFG3", "MDMCFG2", "MDMCFG1", "MDMCFG0", "DEVIATN", "MCSM2", "...
mariusae/pingrf
cc11xx/registers.py
Python
bsd-3-clause
915
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' compliance_checker/tests/test_util.py ''' import unittest from compliance_checker import util class TestUtils(unittest.TestCase): ''' Test suite for utilities ''' def test_datetime_is_iso(self): """ Test that ISO 8601 dates are properl...
DanielJMaher/compliance-checker
compliance_checker/tests/test_util.py
Python
apache-2.0
1,605
from selenium.webdriver.firefox.webdriver import WebDriver from session import SessionHelper from group import GroupHelper # class with helpful for tests functions class Application: def __init__(self): self.driver = WebDriver() self.driver.implicitly_wait(30) self.session = SessionHelper(...
Antikiy/python_training
fixture/application.py
Python
apache-2.0
571
#!/usr/bin/env python # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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....
nischu7/paramiko
demos/demo_sftp.py
Python
lgpl-2.1
3,649
"""forestry_game URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cl...
nime88/forestry-game
forestry_game/urls.py
Python
mit
2,000
""" Example 1: In this example, we will try some basic API connections. """ from common_settings import * #This queries the top level schema and gets all of the available models, and their associated endpoints and schema. #The ?format=json is needed to let the API know how to return the data. #Supported formats are '...
pombredanne/discern
docs/examples/connect_to_api.py
Python
agpl-3.0
1,210
from setuptools import setup, find_packages setup( name='django-repomgmt', version='0.1.1', description='APT repo management, buildd, etc.', author='Soren Hansen', author_email='sorhanse@cisco.com', url='http://github.com/sorenh/python-django-repomgmt', packages=find_packages(), include...
sorenh/python-django-repomgmt
setup.py
Python
apache-2.0
903
import re import weakref from buildbot import util class Properties(util.ComparableMixin): """ I represent a set of properties that can be interpolated into various strings in buildsteps. @ivar properties: dictionary mapping property values to tuples (value, source), where source is a string ...
kzys/buildbot
buildbot/process/properties.py
Python
gpl-2.0
5,112
import random import time from collections import OrderedDict from plenum.common.util import randomString try: import ujson as json except ImportError: import json import pytest from plenum.recorder.recorder import Recorder TestRunningTimeLimitSec = 350 def test_add_to_recorder(recorder): last_check_...
evernym/plenum
plenum/test/recorder/test_recorder.py
Python
apache-2.0
6,601
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
tensorflow/tensorflow
tensorflow/python/debug/lib/common.py
Python
apache-2.0
2,967