repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
caterinaurban/Lyra | src/lyra/frontend/cfg_generator.py | 1 | 53675 | import ast
import optparse
import sys
from lyra.core.cfg import *
from lyra.core.expressions import Literal
from lyra.core.statements import *
from lyra.core.types import IntegerLyraType, BooleanLyraType, resolve_type_annotation, \
FloatLyraType, ListLyraType, TupleLyraType, StringLyraType, DictLyraType, SetLyraTy... | mpl-2.0 | 5,630,675,610,013,542,000 | 46.416078 | 103 | 0.605701 | false |
denys-duchier/Scolar | ZopeProducts/exUserFolder/__init__.py | 1 | 3400 | #
# Extensible User Folder
#
# (C) Copyright 2000-2005 The Internet (Aust) Pty Ltd
# ACN: 082 081 472 ABN: 83 082 081 472
# All Rights Reserved
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MER... | gpl-2.0 | -6,918,314,890,740,817,000 | 39 | 88 | 0.717353 | false |
mobify/dj-saml-idp | saml2idp/views.py | 1 | 5988 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import os
from django.contrib import auth
from django.core.validators import URLValidator
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ImproperlyConfigured, ValidationError
... | mit | -1,988,701,014,868,627,700 | 28.643564 | 83 | 0.675685 | false |
openworm/PyOpenWorm | post_install.py | 1 | 1749 | from __future__ import absolute_import
from __future__ import print_function
import os, shutil, sys
from sysconfig import get_path
from glob import glob
from pkgutil import get_loader
from subprocess import call
def get_library_location(package):
# get abs path of a package in the library, rather than locally
... | mit | 6,506,810,623,881,900,000 | 38.75 | 76 | 0.699257 | false |
2013Commons/HUE-SHARK | apps/beeswax/src/beeswax/urls.py | 1 | 3280 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 5,420,627,907,366,661,000 | 50.25 | 120 | 0.685671 | false |
cuckoo5/soap | Soap_know/handler/formula.py | 1 | 1592 | #coding=utf-8
import tornado.web
import util.config as config
import util.constants as constants
from db.manager import FormulaManager, OilManager
from handler.base import BaseHandler
class FormulaHandler(BaseHandler):
def initialize(self):
self.all_use = constants.use
self.all_difficult_degree ... | gpl-3.0 | 3,997,204,989,561,479,000 | 36.904762 | 114 | 0.645101 | false |
taolei87/sru | DrQA/drqa/model.py | 1 | 5679 | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import torch.o... | mit | -4,923,884,610,044,888,000 | 35.171975 | 83 | 0.573693 | false |
anirudhSK/chromium | tools/perf/measurements/timeline_based_measurement.py | 1 | 4448 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import timeline as timeline_module
from metrics import timeline_interaction_record as tir_module
from telemetry.page import page_measurement
fro... | bsd-3-clause | 5,216,105,921,857,188,000 | 39.436364 | 80 | 0.74955 | false |
Sh4kE/fun-with-wiki-science | arxiv_import.py | 1 | 1272 | from bs4 import BeautifulSoup
import urllib
import config as c
from pymongo import MongoClient
client = MongoClient()
db = client.articles.entries
def gen_index(seed=db.count()):
i = seed
while True:
i +=1
yield i
index = gen_index()
def generate_filename(entry, directory = c.ARTICLE_DIR):
authors = [... | mit | 7,861,832,377,089,369,000 | 30.8 | 75 | 0.623428 | false |
sophron/wifiphisher | wifiphisher/extensions/roguehostapdinfo.py | 1 | 4097 | """
Extension that interacts with roguehostapd to print relevant information. For example,
information regarding automatic association attacks.
"""
from collections import defaultdict
import wifiphisher.common.constants as constants
class Roguehostapdinfo(object):
"""
Handles for printing KARMA attack infor... | gpl-3.0 | -7,268,679,541,904,218,000 | 32.040323 | 107 | 0.569929 | false |
ruzhytskyi/Koans | python2/koans/about_sets.py | 1 | 1706 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutSets(Koan):
def test_sets_make_keep_lists_unique(self):
highlanders = ['MacLeod', 'Ramirez', 'MacLeod', 'Matunas',
'MacLeod', 'Malcolm', 'MacLeod']
there_can_only_be_only_one = set(highlanders)
... | mit | 7,430,903,744,952,290,000 | 38.674419 | 103 | 0.556858 | false |
abutcher/cf-diff | cfdiff/cfdiff.py | 1 | 4597 | # -*- coding: utf-8 -*-
# cf-diff Cloud Formations Diff Tool
# Copyright © 2014, Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | gpl-3.0 | 270,328,807,369,022,750 | 36.365854 | 102 | 0.601828 | false |
gdreid/job-salary-prediction | code/vectorization/text_extractor.py | 1 | 6819 | '''
Created on 2016
@author: Graham Reid
Builds a 2-gram vectorizer using scikit learn count vectorizer. Only really
interesting thing here is that I didn't concatenate all of the fields together.
This helps to preserve context.
'''
import random
import pickle
import numpy as np
from sklearn.feature_extraction.text ... | gpl-3.0 | 5,507,033,565,940,186,000 | 35.859459 | 83 | 0.751723 | false |
baseride/pyZabbixSender | pyZabbixSender/pyZabbixSenderBase.py | 1 | 7074 | # -*- coding: utf-8
# Copyright 2015 Kurt Momberg <kurtqm (at) yahoo(dot)com(dot)ar>
# > Based on work by Klimenko Artyem <aklim007(at)gmail(dot)com>
# >> Based on work by Rob Cherry <zsend(at)lxrb(dot)com>
# >>> Based on work by Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
# License: GNU GPLv2
import struct
imp... | gpl-2.0 | -1,269,972,157,071,972,000 | 37.237838 | 403 | 0.625954 | false |
tanchao/algo | interviews/zenefits/three_sum.py | 1 | 1745 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'tanchao'
class Solution:
# @param {integer[]} nums
# @return {integer[][]}
def threeSum(self, nums):
res = []
if len(nums) < 3:
return res
nums.sort() # sorted array for value judgement
for i in range... | mit | -540,101,211,688,594,900 | 36.148936 | 89 | 0.373066 | false |
IPIDataLab/Mongo-IRD-load | python/excell_parse.py | 1 | 9770 | #!/usr/bin/python
from xlrd import cellname
import re
from datetime import datetime
from utils import na_check, split_str_array, get_cell, geocode
#############################
#############################
# This file parses incoming
# excell workbooks to convert
# to JSON object array for input
# into MongoDB.
##... | gpl-2.0 | 8,808,311,664,993,507,000 | 26.521127 | 170 | 0.59304 | false |
mzhr/snakepig_engine | src/game.py | 1 | 1551 | import pyglet
from pyglet.window import key
from src import world
class GameStates:
MAIN_MENU = 0
GAME_LOAD = 1
GAME_PLAY = 2
GAME_MENU = 3
class Window(pyglet.window.Window):
def __init__(self, *args, **kwargs):
# Initialize window.
super(Window, self).__init__(800, 600, *args, **kwargs)
# Initilize wi... | mit | 319,767,813,804,100,160 | 26.210526 | 57 | 0.711154 | false |
sheagcraig/python-jss | jss/jssobjectlist.py | 1 | 1229 | #!/usr/bin/env python
# Copyright (C) 2014-2017 Shea G Craig
#
# 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 ... | gpl-3.0 | 5,142,232,485,675,961,000 | 33.138889 | 77 | 0.719284 | false |
voidpp/vcp | vcp/system_package_manager_handlers.py | 1 | 3348 | import os
import re
import logging
from subprocess import check_call, check_output, CalledProcessError, PIPE
from abc import ABCMeta, abstractmethod, abstractproperty
import platform
from .exceptions import SystemPackageManagerHandlerException
logger = logging.getLogger(__name__)
def register(name, determiner):
... | mit | -888,727,097,514,618,100 | 28.368421 | 102 | 0.629331 | false |
SylvainCecchetto/plugin.video.catchuptvandmore | plugin.video.catchuptvandmore/resources/lib/skeletons/pl_live.py | 1 | 2824 | # -*- coding: utf-8 -*-
"""
Catch-up TV & More
Copyright (C) 2016 SylvainCecchetto
This file is part of Catch-up TV & More.
Catch-up TV & More 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 Foundat... | gpl-2.0 | -4,897,177,479,738,291,000 | 35.076923 | 97 | 0.625444 | false |
srusskih/SublimeBicycleRepair | bike/refactor/inlineVariable.py | 1 | 3533 | from bike.query.findDefinition import findAllPossibleDefinitionsByCoords
from bike.query.findReferences import findReferences
from bike.parsing.parserutils import maskStringsAndRemoveComments, linecontinueRE
from bike.transformer.undo import getUndoStack
from bike.transformer.save import queueFileToSave
from parser imp... | mit | 3,738,141,442,008,807,000 | 36.585106 | 115 | 0.741296 | false |
dayatz/taiga-back | tests/unit/conftest.py | 1 | 1094 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2017 Anler Hernández ... | agpl-3.0 | -6,924,775,376,019,081,000 | 44.458333 | 74 | 0.756187 | false |
jkandasa/integration_tests | cfme/tests/cli/test_appliance_console.py | 1 | 14121 | import pytest
from collections import namedtuple
from wait_for import wait_for
from cfme.utils import os
from cfme.utils.log_validator import LogValidator
from cfme.utils.log import logger
from cfme.utils.conf import hidden
import tempfile
import lxml.etree
import yaml
TimedCommand = namedtuple('TimedCommand', ['comma... | gpl-2.0 | -3,463,984,314,061,797,400 | 48.547368 | 100 | 0.629913 | false |
MLR-au/esrc-cnex | service/app/config.py | 1 | 3159 |
import os
import sys
import os.path
import ConfigParser
import collections
import traceback
import ast
from pyramid.httpexceptions import HTTPBadRequest
import logging
log = logging.getLogger(__name__)
class ConfigBase:
def __init__(self):
pass
def get(self, section, param, aslist=False):
... | bsd-3-clause | -5,075,897,506,453,778,000 | 32.606383 | 128 | 0.552073 | false |
wagnerpeer/gitexplorer | gitexplorer/visualizations/punchcard.py | 1 | 3117 | '''
Created on 28.08.2017
@author: Peer
'''
from collections import defaultdict
import datetime
from itertools import chain
import matplotlib.pyplot as plt
from gitexplorer.basics import GitExplorerBase
def draw_punchcard(infos,
xaxis_range=24,
yaxis_range=7,
... | mit | 8,640,303,030,174,708,000 | 27.861111 | 110 | 0.616619 | false |
jaked122/MUF-highlighting | MufLoad.py | 1 | 17718 | #!/bin/python3
from telnetlib import Telnet
import re
from hashlib import sha512
from typing import *
from time import sleep
from os import stat, path
import yaml
import argparse
import datetime
prognameMatch = re.compile("\(\(\( filename: (.+) \)\)\)")
progDependencyMatch = re.compile("\(\(\( dependsOn: (.+) \)\)\)")... | mit | -9,212,332,200,114,590,000 | 38.112583 | 122 | 0.4943 | false |
ablifedev/ABLIRC | ABLIRC/install/external_lib/HTSeq/__init__.py | 1 | 39255 | """HTSeq is a package to process high-throughput sequencing data.
See http://www-huber.embl.de/users/anders/HTSeq for documentation.
"""
import itertools, warnings, os, shlex
try:
from _HTSeq import *
except ImportError:
if os.path.isfile( "setup.py" ):
raise ImportError( "Cannot import 'HTSeq' when work... | mit | 5,902,803,634,480,403,000 | 36.890927 | 203 | 0.543472 | false |
jceipek/Mind-Rush | biofeedback.py | 1 | 7491 | #
# biofeedback.py
#
# Copyright (C)2011 Julian Ceipek and Patrick Varin
#
# Redistribution is permitted under the BSD license. See LICENSE for details.
#
try:
import multiprocessing
except:
raise Exception("Unable to load multiprocessing Python module.")
try:
import serial
except:
raise Exception(""... | bsd-3-clause | -5,254,349,475,841,835,000 | 37.813472 | 89 | 0.536243 | false |
kebrister/lscat-blcontrols | pmac/mk_pgpmac_redis.py | 1 | 36959 | #! /usr/bin/python
# coding=utf-8
import sys
import iniParser
import datetime
if len(sys.argv) <= 1:
print >> sys.stderr, "Usage: %s headOfRedisVariableNames [prefIniFileName [hardIniFileName]]"
sys.exit(-1)
if len(sys.argv) > 1:
head = sys.argv[1]
if len(sys.argv) > 2:
pref_ini = sys.argv[2]
else:
... | gpl-3.0 | 2,189,701,493,260,907,300 | 47.952318 | 172 | 0.516572 | false |
listen-lavender/webcrawl | webcrawl/queue/lib/queue.py | 1 | 8585 | """A multi-producer, multi-consumer queue."""
from time import time as _time
try:
import threading as _threading
except ImportError:
import dummy_threading as _threading
from collections import deque
import heapq
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
class Empty(Exception):
"... | mit | 4,989,844,749,189,693,000 | 34.184426 | 85 | 0.588818 | false |
robmcmullen/peppy | peppy/configprefs.py | 1 | 3479 | # peppy Copyright (c) 2006-2010 Rob McMullen
# Licenced under the GPLv2; see http://peppy.flipturn.org for more info
"""
Managing user config files and directories.
"""
import os, os.path, types
from ConfigParser import ConfigParser
import cPickle as pickle
import wx
from peppy.lib.userparams import *
from peppy.deb... | gpl-2.0 | 8,596,785,216,098,643,000 | 28.483051 | 88 | 0.538661 | false |
ptressel/sahana-eden-madpub | models/000_config.py | 1 | 14638 | # -*- coding: utf-8 -*-
"""
Deployment settings
All settings which are typically edited for a deployment should be done here
Deployers shouldn't typically need to edit any other files.
"""
# Remind admin to edit this file
FINISHED_EDITING_CONFIG_FILE = True # change to True after you finish editing this f... | mit | 1,233,628,247,905,388,000 | 39.325069 | 192 | 0.646331 | false |
MirkoDziadzka/pyhkdf | src/hkdf.py | 1 | 3000 | """
This is a straight forward implementation of RFC 5869
HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
http://tools.ietf.org/html/rfc5869
"""
import warnings
from Crypto.Hash import SHA512, HMAC
class HKDF:
"""
HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)
usage:
... | mit | -7,948,960,739,531,117,000 | 29.927835 | 98 | 0.609 | false |
blindsightcorp/rigor | test/constants.py | 1 | 2408 | import datetime
import os.path
kDirName, filename = os.path.split(os.path.abspath(__file__))
kFixtureFile = os.path.join(kDirName, 'types.db')
kTestFile = os.path.join(kDirName, 'test.db')
kTestDirectory = os.path.join(kDirName, 'tempdir', 'child')
kConfigFile = os.path.join(kDirName, 'testing.ini')
kConfigFile2 = os.... | bsd-2-clause | -5,517,956,473,567,648,000 | 57.731707 | 271 | 0.685631 | false |
ninjin/contra | gtbtokenize.py | 1 | 12308 | #!/usr/bin/env python
# Implements a GENIA Treebank - like tokenization.
# This is a python translation of my GTB-tokenize.pl, which in turn
# draws in part on Robert MacIntyre's 1995 PTB tokenizer,
# (http://www.cis.upenn.edu/~treebank/tokenizer.sed) and Yoshimasa
# Tsuruoka's GENIA tagger tokenization (tokenize.cp... | isc | 1,279,164,132,318,494,200 | 37.704403 | 197 | 0.576129 | false |
sgibbes/carbon-budget | analyses/hadoop_analysis.py | 1 | 3108 | ### Code for running Hadoop clusters on the model endpoints
### then using the cumulative summing script to sum the endpoint and area by tcd threshold.
### Also, sample code for copying results from spot machine to s3 for two endpoints.
### git clone https://github.com/wri/gfw-annual-loss-processing
'''
For annual ga... | apache-2.0 | 1,434,611,297,971,112,400 | 99.258065 | 359 | 0.79601 | false |
openmips/stbgui | lib/python/Components/Harddisk.py | 1 | 27772 | import os
import time
from Tools.CList import CList
from SystemInfo import SystemInfo
from Components.Console import Console
from boxbranding import getBoxType, getMachineBuild
import Task
def readFile(filename):
file = open(filename)
data = file.read().strip()
file.close()
return data
def getProcMounts():
try:
... | gpl-2.0 | 3,402,724,838,510,467,000 | 28.67094 | 155 | 0.662214 | false |
localmed/django-assetfiles | assetfiles/filters/sass.py | 1 | 4949 | from __future__ import unicode_literals
import os
from django.conf import settings
from django.contrib.staticfiles.finders import find
from assetfiles.filters import BaseFilter, CommandMixin, ExtensionMixin
import assetfiles.settings
from assetfiles.exceptions import SassFilterError
class SassFilter(ExtensionMixin... | mit | 3,942,540,000,699,276,300 | 31.136364 | 81 | 0.589614 | false |
greenbender/pynntp | nntp/iodict.py | 1 | 3453 | """
Case-insentitive ordered dictionary (useful for headers).
Copyright (C) 2013-2020 Byron Platt
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)... | gpl-3.0 | 4,563,081,144,591,528,400 | 25.976563 | 75 | 0.585578 | false |
InsightSoftwareConsortium/ITKExamples | src/Filtering/MathematicalMorphology/ErodeAGrayscaleImage/Code.py | 1 | 1553 | #!/usr/bin/env python
# Copyright NumFOCUS
#
# 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.txt
#
# Unless required by applicable law or ... | apache-2.0 | 1,056,718,304,177,390,500 | 27.759259 | 75 | 0.773342 | false |
mganeva/mantid | scripts/Muon/GUI/Common/muon_data_context.py | 1 | 20168 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, div... | gpl-3.0 | 6,414,852,969,859,135,000 | 40.669421 | 136 | 0.61662 | false |
andrewgailey/robogen | robogen/rgkit/backup bots/SfparI.py | 1 | 19116 | ##################################
## ##
## ____ __ ##
## / ___| / _|_ __ __ _ _ __ ##
## \___ \| |_| '_ \ / _` | '__| ##
## ___) | _| |_) | (_| | | ##
## |____/|_| | .__/ \__,_|_| ##
## |_| ##
## ##
## ... | unlicense | -6,406,700,526,533,794,000 | 38.172131 | 80 | 0.568372 | false |
praekelt/malaria24-django | malaria24/settings/base.py | 1 | 8348 | """
Django settings for base malaria24.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
from os.path import abspath, dirname, join
from os import environ
from djan... | bsd-2-clause | -8,339,247,801,502,718,000 | 26.826667 | 81 | 0.65333 | false |
litui/openparliament | parliament/default_settings.py | 1 | 5763 | import os
DEBUG = True
ADMINS = [
('Michael Mulley', 'michael@michaelmulley.com'),
]
MANAGERS = ADMINS
PROJ_ROOT = os.path.dirname(os.path.realpath(__file__))
CACHE_MIDDLEWARE_KEY_PREFIX = 'parl'
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
# Set to True to disable functionality where user-provided data is saved
PA... | agpl-3.0 | 7,099,144,173,799,089,000 | 28.860104 | 105 | 0.639597 | false |
matthiask/zivinetz | tests/testapp/test_changes.py | 1 | 1099 | from datetime import date
from django.test import TestCase
from testapp import factories
from zivinetz.models import AssignmentChange
class ChangesTestCase(TestCase):
def test_change_tracking(self):
assignment = factories.AssignmentFactory.create()
self.assertEqual(AssignmentChange.objects.cou... | mit | 6,544,142,790,884,116,000 | 27.921053 | 86 | 0.688808 | false |
kozistr/Awesome-GANs | awesome_gans/magan/magan_train.py | 1 | 7449 | import time
import numpy as np
import tensorflow as tf
import awesome_gans.image_utils as iu
import awesome_gans.magan.magan_model as magan
from awesome_gans.datasets import CelebADataSet as DataSet
from awesome_gans.datasets import DataIterator
results = {'output': './gen_img/', 'model': './model/MAGAN-model.ckpt'}... | mit | 8,328,749,761,969,198,000 | 34.303318 | 118 | 0.470936 | false |
doctori/PythonTDD | functional_tests/test_login.py | 1 | 1831 | import time
from .base import FunctionalTest
TEST_EMAIL = 'patrick.mouche@mockmyid.com'
class LoginTest(FunctionalTest):
def switch_to_new_window(self, text_in_title):
retries = 60
while retries > 0:
for handle in self.browser.window_handles:
self.browser.switch_to_wi... | gpl-2.0 | 630,886,441,368,789,200 | 32.290909 | 72 | 0.619334 | false |
napjon/moocs_solution | introcs-udacity/Search Engine(jonappsearch)/main.py | 1 | 1817 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | mit | -7,123,328,385,974,137,000 | 23.890411 | 79 | 0.628509 | false |
IPVL/swift_test | swift/proxy/server.py | 1 | 2944 | from swift.ipvl.inspect_custom import whoami, whosdaddy
pass # (WIS) print __name__
required_filters = [
{'name': 'catch_errors'},
{'name': 'gatekeeper',
'after_fn': lambda pipe: (['catch_errors']
if pipe.startswith('catch_errors')
else [])... | mit | -6,019,711,509,896,874,000 | 39.328767 | 107 | 0.529891 | false |
vnevoa/DiffTrike | SoapBox/sb_joystick.py | 1 | 2438 | #
# Copyright 2011 Vasco Nevoa.
#
# This file is part of DiffTrike.
#
# DiffTrike 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 la... | gpl-3.0 | -457,062,874,747,265,800 | 31.078947 | 127 | 0.653815 | false |
Infinidat/lanister | manage.py | 1 | 7158 | #! /usr/bin/python
from __future__ import print_function
import os
import sys
import time
import random
import string
import subprocess
from _lib.bootstrapping import bootstrap_env, from_project_root, requires_env, from_env_bin
from _lib.ansible import ensure_ansible
bootstrap_env(["base"])
from _lib.params import ... | bsd-3-clause | -4,284,564,785,641,032,700 | 31.536364 | 176 | 0.637748 | false |
olivierlemasle/murano | murano/tests/unit/engine/test_mock_context_manager.py | 1 | 5012 | # 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
# distributed u... | apache-2.0 | 1,920,191,678,098,974,000 | 36.684211 | 79 | 0.69992 | false |
ipeterov/convenient-rpc | task_server/lib/tasks.py | 1 | 3496 | import uuid
import time
from functools import partial
from collections import Counter
from threading import Thread
from queue import Queue, Empty
class TaskManager:
@staticmethod
def hash_task(task):
return hash(''.join(str(task.get(key, '')) for key in ('package', 'version', 'function')))
def __... | mit | 3,637,333,381,968,971,300 | 25.484848 | 98 | 0.543764 | false |
dlshriver/pinq | tests/test_queryable_first.py | 1 | 1194 | import unittest
import pinq
class queryable_first_tests(unittest.TestCase):
def setUp(self):
self.queryable0 = pinq.as_queryable([])
self.queryable1 = pinq.as_queryable(range(1))
self.queryable2 = pinq.as_queryable(range(1, 11))
def test_first_only_element(self):
self.assertE... | mit | -665,743,693,051,481,600 | 34.117647 | 79 | 0.69263 | false |
acesonl/remotecare | remotecare/core/backends.py | 1 | 1343 | # -*- coding: utf-8 -*-
"""
The standard email backend is replaced by a custom
ModelBackend that supports getting the user based
on the stored hmac email value.
:subtitle:`Class definitions:`
"""
from django.contrib.auth.backends import ModelBackend
from apps.account.models import User
from django.contrib.auth.hashers... | gpl-3.0 | 3,425,033,322,685,303,300 | 30.97619 | 79 | 0.630678 | false |
rukai/GameToy | timer.py | 1 | 1829 | class Timer:
def __init__(self, interrupts):
self.interrupts = interrupts
self.div = 0 # FF04
self.sub_div = 0
self.tima = 0 # FF05
self.sub_tima = 0
self.tma = 0 # FF06
# FF07 bits 2-0
self.timer_run = False
... | gpl-3.0 | -91,548,163,793,290,540 | 24.402778 | 77 | 0.503007 | false |
pcmoritz/ray-1 | test/actor_test.py | 1 | 55166 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import random
import numpy as np
import os
import sys
import time
import unittest
import ray
import ray.test.test_utils
class ActorAPI(unittest.TestCase):
def tearDown(self):
... | apache-2.0 | 7,384,625,375,820,351,000 | 34.182398 | 79 | 0.554418 | false |
icodemachine/Stem | stem/descriptor/tordnsel.py | 1 | 3950 | # Copyright 2013-2014, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
Parsing for `TorDNSEL <https://www.torproject.org/projects/tordnsel.html.en>`_
exit list files.
::
TorDNSEL - Exit list provided by TorDNSEL
"""
import stem.util.connection
import stem.util.str_tools
import stem.... | lgpl-3.0 | -5,719,108,573,632,208,000 | 32.760684 | 133 | 0.661772 | false |
our-city-app/oca-backend | src/rogerthat/pages/service_page.py | 1 | 7102 | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | apache-2.0 | 8,330,832,025,943,103,000 | 41.023669 | 134 | 0.689383 | false |
edx/ecommerce | ecommerce/extensions/offer/migrations/0046_offerassignmentemailsentrecord.py | 1 | 1471 | # Generated by Django 2.2.16 on 2020-11-02 07:04
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('offer', '0045_codeassignmentn... | agpl-3.0 | -4,716,142,410,958,759,000 | 44.96875 | 148 | 0.622706 | false |
kzcashteam/kzcash | share/qt/extract_strings_qt.py | 1 | 1857 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/kzcashstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' form... | mit | 8,326,102,238,316,943,000 | 22.807692 | 79 | 0.581583 | false |
ebeshero/Pittsburgh_Frankenstein | collateXPrep/python/Part9-allWitnessIM_collation_to_xml.py | 1 | 11044 | from collatex import *
from xml.dom import pulldom
import re
import glob
from datetime import datetime, date
# import pytz
# from tzlocal import get_localzone
# today = date.today()
# utc_dt = datetime(today, tzinfo=pytz.utc)
# dateTime = utc_dt.astimezone(get_localzone())
# strDateTime = str(dateTime)
now = datetime... | agpl-3.0 | -5,091,329,732,725,098,000 | 50.830986 | 188 | 0.631431 | false |
mganeva/mantid | scripts/Muon/GUI/Common/utilities/xml_utils.py | 1 | 4492 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 2,430,794,358,631,994,000 | 35.819672 | 111 | 0.642698 | false |
ZobairAlijan/osf.io | api_tests/base/test_serializers.py | 1 | 5406 | # -*- coding: utf-8 -*-
import httplib as http
from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase, DbTestCase
from tests import factories
from tests.utils import make_drf_request
from api.base.settings.defaults import API_BASE
from api.base.serializers import JSONAPISerializer
from api.nodes... | apache-2.0 | -2,315,594,354,815,570,400 | 37.340426 | 101 | 0.620607 | false |
fernandog/Medusa | ext/tornado/gen.py | 1 | 47881 | """``tornado.gen`` implements generator-based coroutines.
.. note::
The "decorator and generator" approach in this module is a
precursor to native coroutines (using ``async def`` and ``await``)
which were introduced in Python 3.5. Applications that do not
require compatibility with older versions of Pytho... | gpl-3.0 | 5,848,268,275,463,006,000 | 34.91973 | 93 | 0.60454 | false |
saadmk11/your-query | src/questions/urls.py | 1 | 1139 | from django.conf.urls import url
from .views import (question_list,
question_detail,
question_ask,
question_update,
category_list,
category,
answer_update,
question_delete,
... | mit | -2,008,724,676,322,331,100 | 44.56 | 95 | 0.533802 | false |
parroyo/python_menu | python_menu/menu.py | 1 | 5783 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 of the License, or (at your option) any later version.
#
# This library ... | lgpl-3.0 | -3,854,620,723,446,406,000 | 30.950276 | 131 | 0.583434 | false |
jserver/pagila | pagila/settings.py | 1 | 2178 | """
Django settings for pagila project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | bsd-3-clause | -8,704,175,519,857,630,000 | 21.926316 | 71 | 0.705234 | false |
openstack/smaug | karbor/tests/unit/operationengine/engine/triggers/timetrigger/test_time_trigger_multi_node.py | 1 | 9846 | # 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... | apache-2.0 | -7,400,826,263,336,520,000 | 34.039146 | 79 | 0.57729 | false |
jmvrbanac/Specter | specter/reporting/xunit.py | 1 | 5284 | from xml.etree.ElementTree import Element, tostring as element_to_str
import six
from specter import _
from specter.spec import DescribeEvent
from specter.reporting import AbstractParallelReporter, AbstractSerialReporter
class XUnitReporter(AbstractSerialReporter, AbstractParallelReporter):
""" A simple xUnit fo... | mit | -3,182,528,697,849,075,700 | 27.874317 | 78 | 0.576268 | false |
adamnew123456/jobmon | jobmon/ticker.py | 1 | 3108 | """
A tickers are responsible for calling into the supervisor periodically, and
getting it to handle restarts.
"""
import logging
import os
import select
import threading
import time
from jobmon import util
LOGGER = logging.getLogger('jobmon.ticker')
class Ticker(threading.Thread, util.TerminableThreadMixin):
""... | bsd-2-clause | 7,884,936,955,516,481,000 | 27.777778 | 78 | 0.559524 | false |
cebel/pyctd | src/pyctd/manager/database.py | 1 | 17991 | # -*- coding: utf-8 -*-
"""PyCTD loads all CTD content in the database. Content is available via functions."""
import configparser
import gzip
import io
import logging
import os
import re
import sys
import time
from configparser import RawConfigParser
import numpy as np
import pandas as pd
from requests.compat impor... | apache-2.0 | -5,251,697,769,737,774,000 | 35.942505 | 118 | 0.593908 | false |
lindemann09/pyForceDAQ | forceDAQ/data_handling/convert.py | 1 | 8601 | #!/usr/bin/env python
"""
Functions to convert force data
This module can be also executed.
"""
__author__ = 'Oliver Lindemann'
import os
import sys
import gzip
import numpy as np
from .read_force_data import read_raw_data, data_frame_to_text
PAUSE_CRITERION = 500
MSEC_PER_SAMPLES = 1
REF_SAMPLE_PROBE = 1000
MIN_D... | mit | -2,560,907,721,749,583,000 | 30.276364 | 99 | 0.58063 | false |
Donkyhotay/MoonPy | twisted/protocols/sip.py | 1 | 41973 | # -*- test-case-name: twisted.test.test_sip -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Session Initialization Protocol.
Documented in RFC 2543.
[Superceded by 3261]
This module contains a deprecated implementation of HTTP Digest authentication.
See L{twisted.cred.cred... | gpl-3.0 | -9,162,486,065,959,605,000 | 30.464018 | 119 | 0.565435 | false |
pakpoomton/CellmodellerShadow | Models/Biofilm_g40.py | 1 | 2119 | import random
from CellModeller.Regulation.ModuleRegulator import ModuleRegulator
from CellModeller.Biophysics.BacterialModels.CLBacterium import CLBacterium
from CellModeller.GUI import Renderers
import numpy
import math
max_cells = 400000
#cell_colors = {0:[0.0, 1.0, 0.0],
# 1:[0.0, 0.0, 1.0],
# ... | bsd-3-clause | -3,343,838,500,989,668,000 | 29.271429 | 142 | 0.632374 | false |
markokr/sysca | sysca/keys.py | 1 | 6591 | """Key handling
"""
import os
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import ec, rsa, dsa
from cryptography.hazmat.primitives.hashes import SHA256, SHA384, SHA512
from cryptography.hazmat.primitives.serialization import (Encoding, PublicFormat)
from .ex... | isc | -4,393,379,388,745,196,000 | 29.655814 | 102 | 0.648308 | false |
pendingchaos/WIP12 | scripts/update_extensions.py | 1 | 1594 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
extensions = os.listdir("../include/extensions")
try:
extensions.remove("extensions.h")
except ValueError:
pass
output = open("../src/extensions/extensions.cpp", "w")
output.write("""//Generated by update_extensions.py. Do not edit. Edit update_extensi... | gpl-3.0 | 6,310,849,901,766,840,000 | 24.709677 | 117 | 0.666876 | false |
kdebrab/pandas | pandas/tests/frame/test_timeseries.py | 1 | 29973 | # -*- coding: utf-8 -*-
from __future__ import print_function
from datetime import datetime, time
import pytest
from numpy import nan
from numpy.random import randn
import numpy as np
from pandas import (DataFrame, Series, Index,
Timestamp, DatetimeIndex, MultiIndex,
to_date... | bsd-3-clause | -1,191,242,468,060,212,500 | 34.767303 | 78 | 0.523471 | false |
Adrimel/pdb-tools | pdb_fetch.py | 1 | 3126 | #!/usr/bin/env python
"""
Fetches a PDB file (optionally the biological unit) from the RCSB database.
usage: python pdb_fetch.py [-biounit] <pdb id>
example: python pdb_fetch.py 1CTF
Author: {0} ({1})
This program is part of the PDB tools distributed with HADDOCK
or with the HADDOCK tutorial. The utilities in this ... | mit | -5,713,528,853,672,365,000 | 28.214953 | 95 | 0.590531 | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/toon/DistributedNPCSpecialQuestGiverAI.py | 1 | 8582 | from direct.task.Task import Task
from panda3d.core import *
from panda3d.direct import *
from DistributedNPCToonBaseAI import *
from toontown.quest import Quests
class DistributedNPCSpecialQuestGiverAI(DistributedNPCToonBaseAI):
def __init__(self, air, npcId, questCallback = None, hq = 0):
DistributedNPC... | apache-2.0 | -1,137,695,837,540,636,300 | 36.973451 | 119 | 0.62433 | false |
munin/munin | utils/add_padding_script.py | 1 | 4569 | #!/usr/bin/python3
# This file is part of Munin.
# Munin is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# Munin is distributed in t... | gpl-2.0 | -1,024,861,984,553,755,300 | 36.760331 | 150 | 0.585905 | false |
fedora-infra/gilmsg | setup.py | 1 | 1729 | # This file is part of gilmsg.
# Copyright (C) 2015 Red Hat, Inc.
#
# gilmsg 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.
#... | lgpl-2.1 | -1,347,992,148,444,289,300 | 28.305085 | 78 | 0.693464 | false |
pydsigner/taskit | taskit/common.py | 1 | 4251 | import time
import json
import pickle
import sys
from .log import null_logger, ERROR
__all__ = ['DEFAULT_PORT', 'STOP', 'KILL', 'STATUS', 'bytes', 'basestring',
'show_err', 'FirstBytesCorruptionError', 'FirstBytesProtocol',
'JSONCodec', 'PickleCodec']
DEFAULT_PORT = 54543
if bytes is str:
... | lgpl-3.0 | -2,156,986,932,203,192,000 | 25.905063 | 80 | 0.530699 | false |
botswana-harvard/edc-sync | edc_sync/tests/test_sync.py | 1 | 10697 | from django.apps import apps as django_apps
from django.core.exceptions import MultipleObjectsReturned
from django.test import TestCase, tag
from django.test.utils import override_settings
from ..constants import INSERT, UPDATE
from ..models import OutgoingTransaction
from ..site_sync_models import site_sync_models
fr... | gpl-2.0 | 1,377,763,837,804,787,700 | 44.135021 | 91 | 0.586146 | false |
conan-io/conan | conans/test/functional/conanfile/runner_test.py | 1 | 9622 | import os
import platform
import textwrap
import unittest
import pytest
import six
from conans.client.runner import ConanRunner
from conans.client.tools import environment_append
from conans.test.utils.mocks import TestBufferConanOutput
from conans.test.utils.tools import TestClient
class RunnerTest(unittest.TestCa... | mit | 4,628,935,908,947,907,000 | 37.488 | 101 | 0.574101 | false |
xu2243051/easyui-menu | easyui/utils.py | 1 | 1633 | #coding:utf-8
'''
这个通用的自定义功能页面
'''
from django.conf.urls import patterns, url
def model_serialize(queryset, extra_fields=[], remove_fields = [], fields = []):
"""
@param queryset queryset
@return a list of dict [{}, {}]
自定义的json转换函数,跟extramixin中的get_fields密切相关
"""
return_list = []
for obje... | apache-2.0 | 5,187,833,718,034,250,000 | 30.854167 | 91 | 0.551341 | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/services/mail/signedmessage.py | 1 | 6389 | # Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Classes for simpler handling of PGP signed email messages."""
__metaclass__ = type
__all__ = [
'SignedMessage',
'signed_message_from_string',
'strip_pgp_signa... | agpl-3.0 | -9,070,205,200,195,638,000 | 36.804734 | 78 | 0.604633 | false |
alex/warehouse | tests/unit/test_csp.py | 1 | 8157 | # 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
# distributed under the Li... | apache-2.0 | 5,533,382,380,218,571,000 | 30.015209 | 76 | 0.533897 | false |
shichao-an/ctci | chapter9/question9.5.py | 1 | 1696 | from __future__ import print_function
"""
Write a method to compute all permutations of a string
"""
def get_permutations1(s):
"""
Append (or prepend) every character to each permutation of the
string which does not contain the current character
"""
if not s:
return ['']
else:
... | bsd-2-clause | 3,653,016,667,504,779,000 | 19.190476 | 74 | 0.527123 | false |
jzrake/mara-tools | mara_tools/lic/lic.py | 1 | 1617 | import numpy as np
def lic_flow(vectors,len_pix=10):
vectors = np.asarray(vectors)
m,n,two = vectors.shape
if two!=2:
raise ValueError
result = np.zeros((2*len_pix+1,m,n,2),dtype=np.int32) # FIXME: int16?
center = len_pix
result[center,:,:,0] = np.arange(m)[:,np.newaxis]
result[ce... | gpl-2.0 | -3,010,048,274,979,160,600 | 25.95 | 73 | 0.30303 | false |
SupayrPoney/RopeSkippingTimer | main.py | 1 | 7577 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import PyQt5
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import time
import math
import winsound
EXERCISETIME = 60
class MainWidget(QWidget):
freqChangeSignal = pyqtSignal(object)
togglerSignal = pyqtSignal()
"""... | mit | -8,393,405,739,307,940,000 | 30.702929 | 110 | 0.605649 | false |
note286/lan-encryption-file-transfer | recvUI.py | 1 | 4152 | from tkinter.filedialog import *
import lan_ip
import tkinter as tk
from tkinter import ttk
from fileTransfer import *
from receiver import *
import _thread
from custom_function import *
from tkinter import messagebox
class RecvPage(tk.Frame):
def __init__(self, parent, root):
super().... | mit | -3,757,951,539,771,199,500 | 39.553191 | 119 | 0.574027 | false |
scottw13/BET-1 | test/test_sensitivity/test_chooseQoIs.py | 1 | 12612 | # Copyright (C) 2014-2015 The BET Development Team
"""
This module contains tests for :module:`bet.sensitivity.chooseQoIs`.
Most of these tests should make sure certain values are within a tolerance
rather than exact due to machine precision.
"""
import unittest
import bet.sensitivity.gradients as grad
import bet.sens... | gpl-3.0 | 5,350,519,979,868,272,000 | 40.215686 | 83 | 0.601729 | false |
qsnake/gpaw | gpaw/test/parallel/ut_invops.py | 1 | 19638 | #!/usr/bin/env python
import sys
import numpy as np
try:
# Matplotlib is not a dependency
import matplotlib as mpl
mpl.use('Agg') # force the antigrain backend
except (ImportError, RuntimeError):
mpl = None
from ase.units import Bohr
from gpaw.mpi import world, distribute_cpus
from gpaw.utilities.to... | gpl-3.0 | 4,405,885,119,348,233,700 | 38.197605 | 86 | 0.58453 | false |
mindsnacks/Zinc | tests/testZincModels.py | 1 | 12102 | import os.path
from zinc.models import *
from zinc.helpers import *
from tests import *
class ZincIndexTestCase(TempDirTestCase):
def test_versions_for_nonexistant_bundle(self):
index = ZincIndex()
self.assertTrue(len(index.versions_for_bundle("meep")) == 0)
def test_add_version_for_bundle... | mit | 810,171,094,399,158,000 | 40.023729 | 92 | 0.647248 | false |
NRGI/resource-contracts-etl | ocr-tests/ABBYY/AbbyyOnlineSdk.py | 1 | 3234 | #!/usr/bin/python
# Usage: process.py <input file> <output file> [-language <Language>] [-pdf|-txt|-rtf|-docx|-xml]
import argparse
import base64
import getopt
import MultipartPostHandler
import os
import re
import sys
import time
import urllib2
import urllib
import xml.dom.minidom
class ProcessingSettings:
Languag... | gpl-2.0 | -7,730,318,793,496,702,000 | 30.398058 | 112 | 0.717378 | false |
google/tink | python/tink/hybrid/_hybrid_wrapper.py | 1 | 4204 | # Copyright 2019 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 agreed to in writing,... | apache-2.0 | -5,839,068,032,982,058,000 | 37.568807 | 80 | 0.705519 | false |
fintanr/hcup-stats | parse-hcup-results.py | 1 | 19302 | #!/usr/bin/python
#
# Extract data from the Wikipedia Heineken Cup Pool Stages
# and create a tidy data set for use in R
#
# A lot of this code handles corner cases and deals with variants
# in the wikipedia pages, and it hasn't been refactored
#
import re
import sys
import unicodedata
from urllib2 import urlopen
from... | apache-2.0 | 4,643,953,281,704,777,000 | 37.604 | 111 | 0.510258 | false |
Emmunaf/WarmaneAutovote | Mlogin.py | 1 | 6146 | #!/usr/bin/python
# Thanks: Glusk for the GREAT help
# karapidiola for the base script
from socket import *
import hashlib
try:
import _srp as srp
except:
print("Need py_srp")
exit(1)
def generate_K(S):
"""Generate K from S with SHA1 Interleaved"""
s_bytes = srp.long_to_bytes(S)
# Has... | mit | -2,810,643,457,059,818,500 | 31.347368 | 109 | 0.522291 | false |
chrisbro-MSFT/Office-Online-Test-Tools-and-Documentation | docs/native/src/conf.py | 1 | 1133 | # -*- coding: utf-8 -*-
from path import Path
# Load shared config file
execfile(Path('../../_shared/conf.py').abspath())
# -- General configuration -----------------------------------------------------
project = u'Office Native WOPI Integration Documentation'
# Configure sphinx.ext.intersphinx
# noinspection PyUn... | mit | 5,119,103,167,326,265,000 | 33.333333 | 80 | 0.596646 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.