commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
52e282b8c51c71db61cb0163df02caf2dce63b45
add pretty function repr extension
extensions/pretty_func_repr.py
extensions/pretty_func_repr.py
""" Trigger pinfo (??) to compute text reprs of functions, etc. Requested by @katyhuff """ import types from IPython import get_ipython def pinfo_function(obj, p, cycle): """Call the same code as `foo?` to compute reprs of functions Parameters ---------- obj: The object being formatted...
Python
0.000001
48ee097349b4315b9f3c726b734aa20e878b2288
Add binary-numbers-small resource
csunplugged/resources/views/binary_cards_small.py
csunplugged/resources/views/binary_cards_small.py
"""Module for generating Binary Cards (Small) resource.""" import os.path from PIL import Image, ImageDraw, ImageFont from utils.retrieve_query_parameter import retrieve_query_parameter def resource_image(request, resource): """Create a image for Binary Cards (Small) resource. Args: request: HTTP re...
Python
0.006224
864bf2bb3bdb731d0725cc33891145f2a7da17d3
Add initialization functions for database connection
db/common.py
db/common.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm.session import sessionmaker from sqlalchemy.schema import MetaData from sqlalchemy.ext.declarative import declarative_base from utils import get_connection_string_fr...
Python
0.000001
ba0e1d90f5f33ed63c56c2788873624731a7a0b5
add file
regxtest.py
regxtest.py
''' ((abc){4}) [1-5]{5} 5+ 5* 5? ''' EQUL = 1 COUNT = 2 ANY = 3 TREE = 4 class Node def __init__(self, ntype, parent = None): self.type = ntype self.c = None self.children = [] self.parent = parent class RegX: def __init__(self, regstr): self.curnode...
Python
0.000001
0100a3468dbada1e7ec3cbeaebda7ee11874ab8b
find similarly related words
relation.py
relation.py
#!/usr/bin/env python """Given phrases p1 and p2, find nearest neighbors to both and rank pairs of neighbors by similarity to vec(p2)-vec(p1) in given word representation. The basic idea is a straightforward combination of nearest neighbors and analogy as in word2vec (https://code.google.com/p/word2vec/). """ import...
Python
0.999999
11380e7db081960757cbde2c4d2e69b695648782
Add routine to calculate density.
density.py
density.py
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.DENSITY # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- def density(r, norm, rs, alpha, beta, gamma): """ Densit...
Python
0
ec853b51c26e9a0e36a9a213fbf6a47c679c3b12
Add cleaning pipeline for dictionaries
scripts/dcleaner.py
scripts/dcleaner.py
#!/usr/bin/env python3 # Author = Thamme Gowda tg@isi.edu # Date = August 9th, 2017 # Title = Dictionary Cleaner # Description = # This script has a dictionary cleaning pipeline. # Note: You have to setup your rules in get_rules() function # TODO: Do spelling correction of english words using edit dista...
Python
0
3fb3662e58e35ccb283074c1078e1c9e7aaf88ed
Add live test for session
LendingClub/tests/live_session_test.py
LendingClub/tests/live_session_test.py
#!/usr/bin/env python import sys import unittest import getpass from logger import TestLogger sys.path.insert(0, '.') sys.path.insert(0, '../') sys.path.insert(0, '../../') from LendingClub import session class LiveTestSession(unittest.TestCase): http = None session = None logger = None def setUp(...
Python
0
9e4858e652fba57f767a9c6d921853a6487301bd
Add a test for the version string parsing code
epsilon/test/test_version.py
epsilon/test/test_version.py
""" Tests for turning simple version strings into twisted.python.versions.Version objects. """ from epsilon import asTwistedVersion from twisted.trial.unittest import SynchronousTestCase class AsTwistedVersionTests(SynchronousTestCase): def test_simple(self): """ A simple version string can be tu...
Python
0.00002
dff8d43edd0e831605f1b1c3b2d261fcf05dca9a
Add wordpress guid replace script
script/wordpress/guid.py
script/wordpress/guid.py
import MySQLdb import urlparse poe = "https://wordpress.wordpress" db = MySQLdb.connect(db="wordpress",user="",passwd="") c = db.cursor() sql = "SELECT ID,guid from wp_posts;" c.execute(sql) records = c.fetchall() for record in records: o = urlparse.urlparse(record[1]) url = poe + o.path if o.query: u...
Python
0
c48ec87b3e1c672864fc8c5bfe1aa551c01846ee
add basic tcp server
Server.py
Server.py
""" File: Server.py Author: Daniel Schauenberg <schauend@informatik.uni-freiburg.de> Description: class for implementing a search engine web server """ import socket from operator import itemgetter class Webserver: """ class for implementing a web server, serving the inverted index search engine to the out...
Python
0.000001
94403aedd21947c30b5d8159fcd42288050afc3a
Create 6kyu_personalized_brand_list.py
Solutions/6kyu/6kyu_personalized_brand_list.py
Solutions/6kyu/6kyu_personalized_brand_list.py
from collections import OrderedDict def sorted_brands(history): poplr=OrderedDict() for i in history: try: poplr[i['brand']]+=1 except: poplr[i['brand']]=1 return sorted(poplr.keys(), key=lambda x: poplr[x], reverse=1)
Python
0
48cac034e7b402e2d4b3cb52d2cae51b44928e0b
add Faster R-CNN
examples/faster_rcnn/eval.py
examples/faster_rcnn/eval.py
from __future__ import division import argparse import sys import time import chainer from chainer import iterators from chainercv.datasets import voc_detection_label_names from chainercv.datasets import VOCDetectionDataset from chainercv.evaluations import eval_detection_voc from chainercv.links import FasterRCNNVG...
Python
0.000384
b098f2ad30339c0efb9728741b796fe9f2db7f74
Make sure mopidy startup doesn't block
mycroft/skills/playback_control/mopidy_service.py
mycroft/skills/playback_control/mopidy_service.py
from mycroft.messagebus.message import Message from mycroft.util.log import getLogger from mycroft.skills.audioservice import AudioBackend from os.path import dirname, abspath, basename import sys import time logger = getLogger(abspath(__file__).split('/')[-2]) __author__ = 'forslund' sys.path.append(abspath(dirname(...
from mycroft.messagebus.message import Message from mycroft.util.log import getLogger from mycroft.skills.audioservice import AudioBackend from os.path import dirname, abspath, basename import sys import time logger = getLogger(abspath(__file__).split('/')[-2]) __author__ = 'forslund' sys.path.append(abspath(dirname(...
Python
0
7a6add647200e4fb1cb4506f7ec40a4f4424b43d
Create Human_tracker_arduino.py
Human_tracker_arduino.py
Human_tracker_arduino.py
# -*- coding: utf-8 -*- """ ------------------------------------------------------------------------------- Created during Winter Semester 2015 OpenCV Human face tracker combined with arduino powered bot to follow humans. @authors: Yash Chandak Ankit Dhall TODO: convert frame specific values to percenta...
Python
0.000008
874e2c35bb0aea38a1161d96b8af484a69336ea6
Add htpasswd.py to the contrib tree as it may be useful more generally than just for the Testing branch
contrib/htpasswd.py
contrib/htpasswd.py
#!/usr/bin/python """Replacement for htpasswd""" import os import random try: import crypt except ImportError: import fcrypt as crypt from optparse import OptionParser def salt(): """Returns a string of 2 randome letters""" # FIXME: Additional characters may be legal here. letters = 'abcdefghijkl...
Python
0.000003
88eb8887bd71702fbf0c5095d8c2d637876de4b8
Add the upload_file_test
examples/upload_file_test.py
examples/upload_file_test.py
from seleniumbase import BaseCase class FileUploadButtonTests(BaseCase): """ The main purpose of this is to test the self.choose_file() method. """ def test_file_upload_button(self): self.open("https://www.w3schools.com/jsref/tryit.asp" "?filename=tryjsref_fileupload_get") ...
Python
0.000018
a98ba6efa109383ecc1dfeb07691dc0a4a4e2a5b
Update migrations
django_afip/migrations/0002_auto_20150909_1837.py
django_afip/migrations/0002_auto_20150909_1837.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('afip', '0001_initial'), ] operations = [ migrations.AlterField( model_name='tax', name='amount', ...
Python
0.000001
9668580633a1a8baaa59030e5a52d2478222cbd2
Add cost tracking file to openstack
nodeconductor/openstack/cost_tracking.py
nodeconductor/openstack/cost_tracking.py
from . import models from nodeconductor.cost_tracking import CostTrackingBackend class OpenStackCostTrackingBackend(CostTrackingBackend): @classmethod def get_monthly_cost_estimate(cls, resource): backend = resource.get_backend() return backend.get_monthly_cost_estimate()
Python
0
4be42297e48421cf41275b67aecfee691ca10e9e
Create grab_junos.py
grab_junos.py
grab_junos.py
#!/usr/bin/python # Author: Scott Reisinger # Date: 06062015 # Purpose: Automate config grab for JUNOS devices (Or any other vendor but Juniper is the best so..) # # You will need to install the SSH utilities from paramiko # If you are on a mac there is an easy tutorial here: # http://osxdaily.com/2012/07/10/how-to-in...
Python
0.00007
2dfa68eb458cfc7d6166ede8a222b1d11b9577a0
Create grabscreen.py
grabscreen.py
grabscreen.py
# Done by Frannecklp import cv2 import numpy as np import win32gui, win32ui, win32con, win32api def grab_screen(region=None): hwin = win32gui.GetDesktopWindow() if region: left,top,x2,y2 = region width = x2 - left + 1 height = y2 - top + 1 else: width = win32a...
Python
0
6bbea60eb3eac4da75ac4e590c5729056b05d63b
test imgs retrieval
get_exp_imgs.py
get_exp_imgs.py
import argparse import os import itertools import random from math import log10 import scipy.stats as stats import torch.backends.cudnn as cudnn import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler import torchvision.utils as vutils from tensorboardX import SummaryWriter from torch.autograd impor...
Python
0.000005
0486e02bbaefea63a2dff9983be51623a184dc66
test python interpreter
test/test_interpreter_layer.py
test/test_interpreter_layer.py
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # import cocos from cocos.director import director import pyglet if __name__ == "__main__": director.init() interpreter_layer = cocos.layer....
Python
0.000062
76baf574ba5a4ff9e835412e27fd2ebc634a9992
add Cython register test
new_pymtl/translation_tools/verilator_sim_test.py
new_pymtl/translation_tools/verilator_sim_test.py
from verilator_sim import get_verilated from new_pmlib.regs import Reg from new_pymtl import SimulationTool def test_reg(): model = Reg(16) print "BEGIN" vmodel = get_verilated( model ) print "END" vmodel.elaborate() sim = SimulationTool( vmodel ) sim.reset() assert vmodel.out == 0 vmodel...
Python
0
214aa96b5e816ad6386fc20fed684152ac8181d1
add migration for ip to generic ip field change
newsletters/migrations/0003_auto_20150701_1840.py
newsletters/migrations/0003_auto_20150701_1840.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('newsletters', '0002_auto_20150630_0009'), ] operations = [ migrations.AlterField( model_name='subscription', ...
Python
0
f90a9e585b5de36b3abc11cf454cde75a44a1a6b
Include Overlay Utils
evaluation/overlay_utils.py
evaluation/overlay_utils.py
#!/usr/bin/env python """Utility functions for segmentation tasks.""" from PIL import Image import scipy.ndimage import numpy as np def replace_colors(segmentation, color_changes): """ Replace the values in segmentation to the values defined in color_changes. Parameters ---------- segmentation ...
Python
0
c37452e7cd4401bd7cbb8e855af65c26d730187c
add web_utl for crawler
crawler/web_util.py
crawler/web_util.py
#!/usr/bin/env python # -*- coding:utf-8 -*- """ chrome有个功能,对于请求可以直接右键copy as curl,然后在命令行里边用curl 模拟发送请求。现在需要把此curl字符串处理成requests库可以传入的参数格式, http://stackoverflow.com/questions/23118249/whats-the-difference-between-request-payload-vs-form-data-as-seen-in-chrome """ import re from functools import wraps import traceback...
Python
0
9733b08f8e9837e4f4246ad18b89b689cfe816dc
Test shape manipulation of Representations
astropy/coordinates/tests/test_representation_methods.py
astropy/coordinates/tests/test_representation_methods.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import numpy as np from ... import units as u from .. import SphericalRepresentation, Longitude, Latitude from ...tests.helper import pytest from ...utils.compat.numpycompat import NUMPY_LT_1_9 class TestManipulation(): """M...
Python
0
a12dd320df30404df8c8ec196e21067376cc1e2c
Add tests of table and column pickling
astropy/table/tests/test_pickle.py
astropy/table/tests/test_pickle.py
import cPickle as pickle import numpy as np import pytest from ...table import Table, Column, MaskedColumn @pytest.fixture(params=[0, 1, -1]) def protocol(request): """ Fixture to run all the tests for protocols 0 and 1, and -1 (most advanced). """ return request.param def test_pickle_column(proto...
Python
0
fb5f6b5db2e2701692dd0a35dfad36d7b6dd4f2d
Create example file
example.py
example.py
from blender_wrapper.api import Scene from blender_wrapper.api import Camera from blender_wrapper.api import SunLamp from blender_wrapper.api import ORIGIN def main(): scene = Scene(1500, 1000, filepath="~/Desktop/") scene.setup() camera = Camera((1, 0, 1), (90, 0, 0), view_align=True) camera.add_to_...
Python
0.000001
62032986f4e57c85f842c16fdb916b0a19bdbd0e
Create _webui.py
marionette_tg/plugins/_webui.py
marionette_tg/plugins/_webui.py
import flask import gnupg, base64 #https://gist.github.com/dustismo/6203329 / apt-get install libleveldb1 libleveldb-dev && pip install plyvel #import plyvel #leveldb, very fast, you can even run the database in ram if you want #import MySQLdb #if you want mysql from os import urandom from base64 import b64decode impor...
Python
0.000001
68e16ca50bec3802184e098548aa2c2584c352b2
Add main example code
signal_decorator.py
signal_decorator.py
#!/usr/bin/python __author__ = 'Neil Parley' from functools import wraps import signal import sys def catch_sig(f): """ Adds the signal handling as a decorator, define the signals and functions that handle them. Then wrap the functions with your decorator. :param f: Function :return: Function wra...
Python
0.000033
bec85af38596c2a4c38b8a53e3960a9ba375fe6f
remove sklearn.test()
sklearn/__init__.py
sklearn/__init__.py
""" Machine learning module for Python ================================== sklearn is a Python module integrating classical machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are acc...
""" Machine learning module for Python ================================== sklearn is a Python module integrating classical machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are acc...
Python
0
950bdd0f528fc61175c39dc2ade6abb9d46d767a
Change plan on book
contacts/migrations/0027_auto_20170106_0627.py
contacts/migrations/0027_auto_20170106_0627.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-01-06 06:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0026_auto_20161231_2045'), ] operations = [ migrations.AlterFie...
Python
0
97c87237de87c91d66a92c1cacc362a7b831b8ef
add script to install python modules with pip
install_py_modules.py
install_py_modules.py
# this will install most necessary packages for this project # that you may not already have on your system import pip def install(package): pip.main(['install', package]) # Example if __name__ == '__main__': # for scraping akc.org for a list of breed names and pics install('Scrapy') # for calculatin...
Python
0
98e822a78722e735b31817e74cc5e310fcb43c9a
add missed migration (HomeBanner verbose texts)
brasilcomvc/portal/migrations/0005_homebanner_verbose.py
brasilcomvc/portal/migrations/0005_homebanner_verbose.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0004_homebanner_image_upload_to'), ] operations = [ migrations.AlterModelOptions( name='homebanner', ...
Python
0
7fc947fec85b1bb621c7014b2008e1c3c0cce28c
add epg code (based on Brian Hargreaves' Matlab code)
epg/epg.py
epg/epg.py
#!/usr/bin/python # EPG Simulation code, based off of Matlab scripts from Brian Hargreaves <bah@stanford.edu> # 2015 Jonathan Tamir <jtamir@eecs.berkeley.edu> import numpy as np from numpy import pi, cos, sin, exp, conj from warnings import warn def epg_rf(FpFmZ, alpha, phi): """ Propagate EPG states through an ...
Python
0
35310a8fa136b5b6e094401a8289f5eabeb28cbc
Create batterylevel.py
home/hairygael/batterylevel.py
home/hairygael/batterylevel.py
def batterylevel(): power_now = subprocess.call ("WMIC PATH Win32_Battery Get EstimatedChargeRemaining", "r".readline()) ANSWER = float(power_now) * 100 , "%" i01.mouth.speak(str(ANSWER))
Python
0.000063
bd301eebd91a5dcca00d2b17b95f1e82bd8a572f
Add unit tests for show_server and list_servers
tempest/tests/services/compute/test_servers_client.py
tempest/tests/services/compute/test_servers_client.py
# Copyright 2015 IBM Corp. # # 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 t...
Python
0.000001
c7851b61268848cf1b02d9e5c845a846ded4c2a7
Update __init__.py
tendrl/node_agent/objects/cluster_message/__init__.py
tendrl/node_agent/objects/cluster_message/__init__.py
from tendrl.commons import etcdobj from tendrl.commons.message import Message as message from tendrl.commons import objects class ClusterMessage(objects.BaseObject, message): internal = True def __init__(self, **cluster_message): self._defs = {} message.__init__(self, **cluster_message) ...
from tendrl.commons import etcdobj from tendrl.commons.message import Message as message from tendrl.commons import objects class ClusterMessage(objects.BaseObject, message): internal = True def __init__(self, **cluster_message): self._defs = {} message.__init__(self, **cluster_message) ...
Python
0.000072
7fddacd1a751c095f70693bb703bb9959a706ae1
Add an example with end to end data
example.py
example.py
""" Example script for getting events over a Zaqar queue. To run: $ export IDENTITY_API_VERSION=3 $ source ~/devstack/openrc $ python example.py """ import json import os import uuid import requests import websocket from keystoneauth1.identity import v3 from keystoneauth1 import session client_id = str(uuid.uuid4(...
Python
0.00006
e1907624a143d0733cd89e5458d104ed0a4fee43
Add simple tasks
fabfile.py
fabfile.py
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name
Python
0.999917
50769229ce8ef4e84f345184b0aebf036bc0e179
add fabfile
fabfile.py
fabfile.py
from fabric.api import local, put, run, cd, sudo def status(): run("systemctl status web") def restart(): sudo("systemctl restart web") def deploy(): local('tar -czf cydev_web.tgz web static/') put("cydev_web.tgz", "~/cydev.ru") with cd("~/cydev.ru"): run("tar -xvf cydev_web.tgz") resta...
Python
0.000002
fe0d8aa2e8293a14c9f2b0ac9fe9c51a99b75f16
Make gallery images a bit smaller.
docs/source/notebook_gen_sphinxext.py
docs/source/notebook_gen_sphinxext.py
# # Generation of RST from notebooks # import glob import os import os.path import warnings warnings.simplefilter('ignore') from nbconvert.exporters import rst def setup(app): setup.app = app setup.config = app.config setup.confdir = app.confdir app.connect('builder-inited', generate_rst) retu...
# # Generation of RST from notebooks # import glob import os import os.path import warnings warnings.simplefilter('ignore') from nbconvert.exporters import rst def setup(app): setup.app = app setup.config = app.config setup.confdir = app.confdir app.connect('builder-inited', generate_rst) retu...
Python
0
2af8c695c1463c080ce8c4bff7e3d81662a49c81
implement generic decorator and register function
dispatk.py
dispatk.py
""" This function is inspired by singledispatch of Python 3.4+ (PEP 443), but the dispatch happens on the key extracted fro the arguments values. from dispatk import dispatk @dispatk(lambda n: int(n)) def fib(n): return fib(n-1) + fib(n-2) @fib.register(0) def _(n): return 0 @fib.register(1, 2) def _(n): ...
Python
0
e823c55f62c8aa1d72ec3bf2b58288b3dd413561
Create radix_sort.py
sorts/radix_sort.py
sorts/radix_sort.py
def radixsort(lst): RADIX = 10 maxLength = False tmp , placement = -1, 1 while not maxLength: maxLength = True # declare and initialize buckets buckets = [list() for _ in range( RADIX )] # split lst between lists for i in lst: tmp = i / placement buckets[tmp % RADIX].append(...
Python
0.000003
2b810eb1900ca96c7fb2d8b63b70b7b0df8b9ed5
Create find_digits.py
algorithms/implementation/python3/find_digits.py
algorithms/implementation/python3/find_digits.py
#!/bin/python3 import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip()) count = 0 digits = str(n) for digit in digits: if int(digit) != 0: if n % int(digit) == 0: count += 1 print(count)
Python
0.998631
c723865ae8013020f6f0a28cd41592c3dc900968
add a second test for process_dc_env.
tests/process_dc_env_test_2.py
tests/process_dc_env_test_2.py
#!/usr/bin/env python import sys import os import argparse # There is a PEP8 warning about this next line not being at the top of the file. # The better answer is to append the $dcUTILS/scripts directory to the sys.path # but I wanted to illustrate it here...so your mileage may vary how you want from process_dc_env imp...
Python
0
51aefefc3cdcd131678e921a29b5acd5b9601b81
add a unit-tests that essentially import the the python python file in src/dynamic_graph/
tests/python/python_imports.py
tests/python/python_imports.py
#!/usr/bin/env python import unittest class PythonImportTest(unittest.TestCase): def test_math_small_entities(self): try: import dynamic_graph.sot.core.math_small_entities except ImportError as ie: self.fail(str(ie)) def test_feature_position_relative(self): ...
Python
0
606118fa4c7b203d986f37d061777beb843b278b
add consistency checker
catalog/model/check_consistency.py
catalog/model/check_consistency.py
from toolz.curried import operator from api.eoss_api import Api from dateutil.parser import parse import datetime import requests, grequests import time import logging import click from utilities import chunks logger = logging.getLogger() def append_data(file, data): with open(file, "a") as myfile: fo...
Python
0.000001
f8067853546a9c25716aef6bc9f255591cb65626
Add migration to change the project results report URL
akvo/rsr/migrations/0125_auto_20180315_0829.py
akvo/rsr/migrations/0125_auto_20180315_0829.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations ORIGINAL_URL = '/en/reports/project_results/{project}?format={format}&download=true' NEW_URL = ORIGINAL_URL + '&p_StartDate={start_date}&p_EndDate={end_date}' REPORT_ID = 1 def add_start_end_dates_report_url(apps, schem...
Python
0
2aa0990746b71086b4c31ee81ac8874436c63e32
Add a few tests (close #4)
tests/test_crosslinking_bot.py
tests/test_crosslinking_bot.py
from datetime import datetime from datetime import date, timedelta import pytest from crosslinking_bot import crosslinking_bot as cb class TestParseDate: def test_return_today(self): today = datetime.today().date() assert 'today' == cb.parse_date(today) def test_return_1_day_ago(self): ...
Python
0.000001
bf97c20edc50cbe245f49bf867406eecc843404b
Add the wsgi app handler for serverless (amending last commit)
drift/contrib/aws/lambdawsgiapp.py
drift/contrib/aws/lambdawsgiapp.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module converts an AWS API Gateway proxied request to a WSGI request. Pretty much copied verbatim from https://github.com/logandk/serverless-wsgi """ import base64 import os import sys import logging from werkzeug.datastructures import Headers from werkzeug.wrapper...
Python
0
3a178c100cbf64b8ab60954a9b9ea5a01640f842
Integrate LLVM at llvm/llvm-project@852d84e36ed7
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "852d84e36ed7a3db0ff4719f44a12b6bc09d35f3" LLVM_SHA256 = "3def20f54714c474910e5297b62639121116254e9e484ccee04eee6815b5d58c" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "0128f8016770655fe7a40d3657f00853e6badb93" LLVM_SHA256 = "f90705c878399b7dccca9cf9b28d695a4c6f8a0e12f2701f7762265470fa6c22" tf_http_archive( ...
Python
0.000001
52f49543dd7bf01a2a24db435d8461b7c8921789
Integrate LLVM at llvm/llvm-project@9a764ffeb6f0
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "9a764ffeb6f06a87c7ad482ae39f8a38b3160c5e" LLVM_SHA256 = "8f000d6541d64876de8ded39bc140176c90b74c3961b9ca755b1fed44423c56b" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "72136d8ba266eea6ce30fbc0e521c7b01a13b378" LLVM_SHA256 = "54d179116e7a79eb1fdf7819aad62b4d76bc0e15e8567871cae9b675f7dec5c1" tf_http_archive( ...
Python
0.000001
9365d95e8f739c8c13bf0520ac20ad07a3387a42
Avoid building blink_heap_unittests to unblock the Blink roll
public/all.gyp
public/all.gyp
# # Copyright (C) 2011 Google Inc. 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 conditions an...
# # Copyright (C) 2011 Google Inc. 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 conditions an...
Python
0.998657
45254d35def51a5e8936fe649f8c3fc089cd4a6d
add `schemas.py`
todo/schemas.py
todo/schemas.py
"""Request/Response Schemas are defined here""" # pylint: disable=invalid-name from marshmallow import Schema, fields from marshmallow_enum import EnumField from todo.enums import Status class TaskSchema(Schema): """Schema for api.portal.models.Panel""" id = fields.Int(required=True) title = fields.Str(...
Python
0.000001
4f9660704445e6da62fc4e893d93fc84288303d4
Integrate LLVM at llvm/llvm-project@aec908f9b248
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "aec908f9b248b27cb44217081c54e2c00604dff7" LLVM_SHA256 = "c88b75b4d60b960c7da65b7bacfdf8c5cf4c7846ab85a334f1ff18a8b50f2d98" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "5dcd6afa20881490b38f3d88c4e59b0b4ff33551" LLVM_SHA256 = "86f64f78ba3b6c7e8400fe7f5559b3dd110b9a4fd9bfe9e5ea8a4d27301580e0" tf_http_archive( ...
Python
0.000001
735dee2da41bf8df8519d516bd9b231ff440f5f9
Create globals.system module for Python & system related settings
source/globals/system.py
source/globals/system.py
# -*- coding: utf-8 -*- ## \package globals.system # MIT licensing # See: LICENSE.txt import sys PY_VER_MAJ = sys.version_info[0] PY_VER_MIN = sys.version_info[1] PY_VER_REL = sys.version_info[2] PY_VER_STRING = u'{}.{}.{}'.format(PY_VER_MAJ, PY_VER_MIN, PY_VER_REL)
Python
0
b83b09f937f91a870165d88730a36faaee8a5261
add a parser of metadata
retsmeta.py
retsmeta.py
# -*- coding: utf-8 -*- from xml.etree import ElementTree class MetaParser(object): def GetResources(self): pass def GetRetsClass(self, resource): pass def GetTables(self, resource, rets_class): pass def GetLookUp(self, resource, rets_class): pass c...
Python
0.000118
f2e5c56297a00ebf4b5029b702f8441adca83a8e
Update 'systemd' module from oslo-incubator
cinder/openstack/common/systemd.py
cinder/openstack/common/systemd.py
# Copyright 2012-2014 Red Hat, Inc. # # 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...
# Copyright 2012-2014 Red Hat, Inc. # # 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...
Python
0
bbb445b691f7370059c7bf9c94e2e9c6f4155273
update to latest
tasks/base.py
tasks/base.py
import os from invoke import run class BaseTest(object): def download_mspec(self): if not os.path.isdir("../mspec"): run("cd .. && git clone --depth=100 --quiet https://github.com/ruby/mspec") def download_rubyspec(self): if not os.path.isdir("../rubyspec"): run("cd ....
import os from invoke import run class BaseTest(object): def download_mspec(self): if not os.path.isdir("../mspec"): run("cd .. && git clone --depth=100 --quiet https://github.com/ruby/mspec") run("cd ../mspec && git checkout v1.6.0") def download_rubyspec(self): if n...
Python
0
50843d6a2c93be4e05a0a2da338e4b0e0d99d294
Add tls proxy helper
jujuxaas/tls_proxy.py
jujuxaas/tls_proxy.py
import copy import select import socket import ssl import sys import threading import logging logger = logging.getLogger(__name__) class TlsProxyConnection(object): def __init__(self, server, inbound_socket, inbound_address, outbound_address): self.server = server self.inbound_socket = inbound_socket se...
Python
0
420c14d38fdddc3ed5d646a99c355b707be011fc
Add tests for ansible module
instance/tests/test_ansible.py
instance/tests/test_ansible.py
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # 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 Soft...
Python
0
7d7fd5b167528654b9fed5b0c971c2b8110d93ea
Create wrapper_exploit.py
wrapper_exploit.py
wrapper_exploit.py
# Author: Chris Duffy # Date: May 2015 # Purpose: An sample exploit for testing UDP services import sys, socket, strut, subprocess program_name = 'C:\exploit_writing\vulnerable.exe' fill ="A"*#### eip = struct.pack('<I',0x########) offset = "\x90"*## available_shellcode_space = ### shell =() #Code to insert # NOPs to f...
Python
0
ef24797a12e8a8919ddb11c7b6763154c5c3aad1
transform DR script to observe exceptions
transform_DR.py
transform_DR.py
__author__ = 'kuhn' __author__ = 'kuhn' from batchxslt import processor from batchxslt import cmdiresource import codecs import os dgd_corpus = "/home/kuhn/Data/IDS/svn_rev1233/dgd2_data/metadata/corpora/extern" dgd_events = "/home/kuhn/Data/IDS/svn_rev1233/dgd2_data/metadata/events/extern" dgd_speakers = "/home/kuhn...
Python
0
60b5228818c92f4d13b0a054956a5f834c7f7549
Implement remove.py
programs/genesis_util/remove.py
programs/genesis_util/remove.py
#!/usr/bin/env python3 import argparse import json import sys def dump_json(obj, out, pretty): if pretty: json.dump(obj, out, indent=2, sort_keys=True) else: json.dump(obj, out, separators=(",", ":"), sort_keys=True) return def main(): parser = argparse.ArgumentParser(description="Rem...
Python
0.0001
6e43f611420068f0829fc64c1963ee51931b0099
change name of data.py
node-interactions.py
node-interactions.py
import operator from os import listdir from os.path import isfile, join import sys def get_dict_of_all_contacts(): datapath = 'flu-data/moteFiles' datafiles = [f for f in listdir(datapath) if isfile(join(datapath,f)) ] dict_of_all_contacts = dict() for datafile in datafiles: node_contacts = dic...
Python
0.000016
4b9925a429692175ad1e0a89859a67117cbba9fe
Create pirates_of_the_caribbean.py
extras/pirates_of_the_caribbean.py
extras/pirates_of_the_caribbean.py
#This makes the coding of the song easier def note(n): if n == 1:return 880 elif n == 2:return 987.77 elif n == 3:return 1046.5 elif n == 4:return 1174.66 elif n == 5:return 1318.51 elif n == 6:return 1396.91 elif n == 7:return 1567.98 elif n == 8:return 1760.00 elif n == 9:return 93...
Python
0.999871
45064a2b6279cfe303c978929daeaa027a001ce0
add a script to create posts, elections, area types, etc.
elections/cr/management/commands/cr_create_basic_site.py
elections/cr/management/commands/cr_create_basic_site.py
# -*- coding: utf-8 -*- from datetime import date from django.core.management.base import BaseCommand from django.db import transaction from django.utils.text import slugify from candidates.models import ( AreaExtra, OrganizationExtra, PostExtra, PartySet ) from elections.models import AreaType, Election from po...
Python
0
f8afd9d77a61f2baae15fec841817b0f97e573f9
add redone twitterminal.py script
twitterminal.py
twitterminal.py
#!/usr/bin/env python3 # # Tweet from the shell. # # Requires the following pip packages: # * simplejson # * twitter (NOT python-twitter, aka Python Twitter Tools) # import sys, os, argparse, subprocess, logging # twitter requires a json module # simplejson is updated more and may be faster # see: http://stackove...
Python
0
0c6becaa179aba9408def1b3cce61d5ec1509942
Load the simul module and run a simulation
python/main.py
python/main.py
from simul import * if __name__ == '__main__': # create a new simulation s = Simulation(Re=5) # initial conditions psi(0) = 0, Omega(0) = 0 s.psi.initial("null") s.omega.initial("null") # T_n(t=0) = sin(pi*k*dz) & T_0(t=0) = 1-k*dz s.T.initial(lambda n, k: T_0(n,k,s)) # main loop over...
Python
0
eb40e609122787e9e82479905479d955568e3f36
add test for constants configuration
astropy/constants/tests/test_constants_config.py
astropy/constants/tests/test_constants_config.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst import importlib import os import pytest import tempfile from astropy.tests.helper import catch_warnings from astropy.config import paths def write_test_config(dir, physical_constants=None, astronomical_constants=None): """Wri...
Python
0.000001
90169095a9e1adbc23e1efa35ea0e1a9a09259de
Solve Code Fights sortByHeight problem
Problems/sortByHeight.py
Problems/sortByHeight.py
#!/usr/local/bin/python # Code Fights Arcade Mode def sortByHeight(a): trees = [i for i, t in enumerate(a) if t == -1] humans = sorted([h for h in a if h != -1]) for tree in trees: humans.insert(tree, -1) return humans def main(): a = [-1, 150, 190, 170, -1, -1, 160, 180] new = sort...
Python
0.999278
5820a2b6130ea7be9eb86341aa6b3b69861a9a36
Create example.py
example.py
example.py
from lxmlmate import ObjectifiedElementProxy print("#To create a brand new xml:") p = ObjectifiedElementProxy( rootag='Person' ) p.name = 'peter' p.age = 13 print( p ) print(''' ##<Person> ## <name>peter</name> ## <age>13</age> ##</Person> ''') print('===================') print( p.name ) print(''' ##<n...
Python
0.000001
1a97d686ed5afd9a97083bc09f6c4bfb4ef124fc
Add quick helpers to get a client
helpers.py
helpers.py
from zaqarclient.queues import client import os conf = { 'auth_opts': { 'backend': 'keystone', 'options': { 'os_username': os.environ.get('OS_USERNAME'), 'os_password': os.environ.get('OS_PASSWORD'), 'os_project_name': os.environ.get('OS_PROJECT_NAME', 'admin'),...
Python
0
7aee3720617aa3442245e2d0bf3de7393e4acb01
Add lc0133_clone_graph.py
lc0133_clone_graph.py
lc0133_clone_graph.py
"""Leetcode 133. Clone Graph Medium URL: https://leetcode.com/problems/clone-graph/ Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph. Each node in the graph contains a val (int) and a list (List[Node]) of its neighbors. Example: Input: {"$id":"1","neighbors":[{"$i...
Python
0.000002
ef63c538aff066230030aaf02981933b652830e4
Create module_posti.py
pyfibot/modules/module_posti.py
pyfibot/modules/module_posti.py
# -*- encoding: utf-8 -*- """ Get package tracking information from the Finnish postal service """ from __future__ import unicode_literals, print_function, division from bs4 import BeautifulSoup import requests from datetime import datetime, timedelta lang = 'en' def command_posti(bot, user, channel, args): """...
Python
0.000001
fbfdc979b5fbb7534a625db390b92856714dcfe1
add basic tests for model_utils
pysat/tests/test_model_utils.py
pysat/tests/test_model_utils.py
import numpy as np import sys from nose.tools import assert_raises, raises import pandas as pds import pysat from pysat import model_utils as mu class TestBasics(): def setup(self): """Runs before every method to create a clean testing setup.""" self.testInst = pysat.Instrument(platform='pysat',...
Python
0
458a4a3e5759c4ea1e5b33349288012a86d0d97d
revert syntax object instantiation change as it appears to be buggy. use an optional, dedicated value mangling methods instead.
pysnmp/entity/rfc3413/mibvar.py
pysnmp/entity/rfc3413/mibvar.py
# MIB variable pretty printers/parsers import types from pyasn1.type import univ from pysnmp.smi.error import NoSuchObjectError # Name def mibNameToOid(mibView, name): if type(name[0]) == types.TupleType: modName, symName = apply(lambda x='',y='': (x,y), name[0]) if modName: # load module if neede...
# MIB variable pretty printers/parsers import types from pyasn1.type import univ from pysnmp.smi.error import NoSuchObjectError # Name def mibNameToOid(mibView, name): if type(name[0]) == types.TupleType: modName, symName = apply(lambda x='',y='': (x,y), name[0]) if modName: # load module if neede...
Python
0
6cd8b4c733de5a4ed39e3d3ba3d06e78b04dbb4b
read a value from a file that is in ConfigObj format - no section check
python/2.7/read_config_value.py
python/2.7/read_config_value.py
#!/usr/bin/env python from configobj import ConfigObj import argparse import os import sys def read_config(fname, skey): config = ConfigObj(fname, raise_errors=True) return config[skey] def main(): parser = argparse.ArgumentParser(description='read a value from a ConfigObj file', prog=os.path.basename(__file__)) ...
Python
0
837d1f26ad339fbe4338ef69c947f83042daba9f
add prelim script for looking at incident data
Scripts/fire_incident.py
Scripts/fire_incident.py
#Weinschenk #12-14 from __future__ import division import numpy as np import pandas as pd from pylab import * from matplotlib import rcParams rcParams.update({'figure.autolayout': True}) incident = pd.read_csv('../Data/arlington_incidents.csv', header=0) total_incidents = len(incident['incident_class_code']) total_fi...
Python
0.000001
ab00f54344e4aa39503a59551e87db2ed4be9c3d
Create print_rectangle.py
python3/print_rectangle.py
python3/print_rectangle.py
while 1: m, n = input().split()# m:height, n:width if m == "0" and n == "0": breaku for i in range(int(m)): print("#" * int(n)) print()
Python
0.001609
989a94c81f74a17707e66f126960b6bb45e9b4d5
Add index to cover testgroup_details (previous runs)
migrations/versions/3042d0ca43bf_index_job_project_id.py
migrations/versions/3042d0ca43bf_index_job_project_id.py
"""Index Job(project_id, status, date_created) where patch_id IS NULL Revision ID: 3042d0ca43bf Revises: 3a3366fb7822 Create Date: 2014-01-03 15:24:39.947813 """ # revision identifiers, used by Alembic. revision = '3042d0ca43bf' down_revision = '3a3366fb7822' from alembic import op def upgrade(): op.execute('...
Python
0
b96f39b3527cef7fd9766315fbdf7b87b6315ec8
add watch file which generated by scratch
src/car_control_manual/scratch/watch_file.py
src/car_control_manual/scratch/watch_file.py
from __future__ import print_function """Watch File generated by Scratch 1. save Scratch file *.sb2 into the same directory or specify with path 2. change name *.sb2 to *.zip 3. unzip *.zip file and read json data from project.json """ import sys, time, logging, os, zipfile import watchdog from watchdog....
Python
0
46b3c0c024dd0d8dbb80911d04848571b3176be7
add yaml config reader
config.py
config.py
# -*- coding: utf-8 -*- import (os, sys, yaml) class Settings(dict): ''' base settings class ''' def __init__( self, data = None ): super( Settings, self ).__init__() if data: self.__update( data, {} ) def __update( self, data, did ): dataid = id(data) did[ dat...
Python
0
8b9fe74976d77df32d73792f74ef4ddea1eb525f
Add Config.get() to skip KeyErrors
config.py
config.py
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
Python
0
7dde102dd51db08f9021234fa3d8f11ab165b210
add custom_preprocess.py
src/custom_preprocess.py
src/custom_preprocess.py
import unittest import csv from datetime import datetime, timedelta def load_raw_data_and_split_by_dt(path, output_dir): base_datetime = datetime.strptime('141021', '%y%m%d') output_file_dict = {(base_datetime + timedelta(days=x)).strftime('%y%m%d'): open( output_dir + '/' + (base_datetime + timedelta...
Python
0.000001
81c55f35fdbaaf0892402345719cd89fde51e160
Create test_trove_utils.py
unit_tests/test_trove_utils.py
unit_tests/test_trove_utils.py
import mock import unittest import reactive.designate_utils as dutils #DOMAIN_LIST = b""" #b78d458c-2a69-47e7-aa40-a1f9ff8809e3 frodo.com. 1467534540 #fa5111a7-5659-45c6-a101-525b4259e8f0 bilbo.com. 1467534855 """ SERVER_LIST = b""" 77eee1aa-27fc-49b9-acca-3faf68126530 ns1.www.example.com. """ class TestTroveUtils...
Python
0.000004
1f5134b36846cf0e5e936888a4fe51a2012e0d78
Create alternate_disjoint_set.py (#2302)
data_structures/disjoint_set/alternate_disjoint_set.py
data_structures/disjoint_set/alternate_disjoint_set.py
""" Implements a disjoint set using Lists and some added heuristics for efficiency Union by Rank Heuristic and Path Compression """ class DisjointSet: def __init__(self, set_counts: list) -> None: """ Initialize with a list of the number of items in each set and with rank = 1 for each set ...
Python
0
8c078a12e7915ea91a2345bd0f6093ae0ee3df18
Add ConfigRegistrar class for loading and registering pack configs.
st2common/st2common/bootstrap/configsregistrar.py
st2common/st2common/bootstrap/configsregistrar.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Python
0
4c53ffbd9b23238b3402752f33fcabb2724921f4
Add dunder init for lowlevel.
astrodynamics/lowlevel/__init__.py
astrodynamics/lowlevel/__init__.py
# coding: utf-8 from __future__ import absolute_import, division, print_function
Python
0
ae79ca36e3cfca362414f2293a4c6d295c6db38b
Create addroundkey.py
research/aes/addroundkey.py
research/aes/addroundkey.py
import sys sys.path.append("../..") import pyrtl from pyrtl import * import keyexpansion from keyexpansion import * """ AddRoundKey round of AES. Input: 128-bit state array. Output: 128-bit state array. """ def addroundkey_initial(state, expanded_key): input_wire_1 = pyrtl.WireVector(bitwidth=128, name='input_wi...
Python
0.000002
94f922c77ee89a5b54b99e135a5045f450badb0e
add new script to dump nice looking release notes like. Borrowed from antlr.
scripts/github_release_notes.py
scripts/github_release_notes.py
# Get github issues / PR for a release # Exec with "python github_release_notes.py YOUR_GITHUB_API_ACCESS_TOKEN 1.19" import sys from collections import Counter from github import Github TOKEN=sys.argv[1] MILESTONE=sys.argv[2] g = Github(login_or_token=TOKEN) # Then play with your Github objects: org = g.get_organiz...
Python
0
fe08ce77958c637539b24817ffca45587fa31a7e
Implement shared API
platformio/shared.py
platformio/shared.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
Python
0.00001
42297354f575e2c82346cf033202c5dfad5ddd99
Add python class for writing out xyz files of trajectory coordinates
lib/examples/nacl_amb/utils.py
lib/examples/nacl_amb/utils.py
#!/usr/bin/env python import numpy class TrajWriter(object): ''' A class for writing out trajectory traces as an xyz file, for subsequent visualization. ''' def __init__(self, trace, w, filename='trace.xyz'): self.trace = trace self.w = w self.filename = filename sel...
Python
0.000072
d5125205801b9771115a052162ee700f64601557
Create frequency.py
frequency.py
frequency.py
import sys import csv csv.field_size_limit(sys.maxsize) from pymystem3 import Mystem import time import cProfile from collections import defaultdict class CsvHandler: INPUTFILE = 'wiki_noxml_full.txt' OUTPUTFILE = 'my_frequency_list.csv' def __init__(self): self.file_name = self.INPUTFILE ...
Python
0.00011
0c719d59b6155ed50692810fab57814370fde1bb
Create fcp_xml2csv.py
fcp_xml2csv.py
fcp_xml2csv.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################ # FoodCheckPeel XML2CSV Converter # # This script converts the FoodCheckPeel XML # file to the Comma Separated Values file type # so it's easier to import to common spreadsheet # applications. # Based on the script posted h...
Python
0
88bd6466940d21d52c0d5235ace10b6a97d69d46
Create emailtoHIBP.py
emailtoHIBP.py
emailtoHIBP.py
#!/usr/bin/python #EmailtoHIBP.py #Author: Sudhanshu Chauhan - @Sudhanshu_C #This Script will retrieve the Domain(s) at which the specified account has been compromised #It uses the API provided by https://haveibeenpwned.com/ #Special Thanks to Troy Hunt - http://www.troyhunt.com/ #For MaltegoTransform librar...
Python
0
cd2e95c157f5ea09000a540fc4689a2aa3e82006
Add Applebee's. Closes #108.
locations/spiders/applebees.py
locations/spiders/applebees.py
# -*- coding: utf-8 -*- import scrapy import json import re from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from locations.items import GeojsonPointItem class ApplebeesSpider(scrapy.Spider): name = "applebees" allowed_domains = ["restaurants.applebees.com"] start_ur...
Python
0