repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
michael-afanasiev/specfemHelperScripts | setup_specfem_lasif.py | 1 | 11312 | #!/usr/bin/env python
import os, errno, shutil
import sys, subprocess
import argparse
import xml.etree.ElementTree as ET
class ParameterError(Exception):
pass
class PathError(Exception):
pass
class MesherNotRunError(Exception):
pass
class colours:
ylw = '\033[93m'
blu = '\033[94m'
... | gpl-2.0 | 1,261,488,015,305,045,000 | 32.368732 | 80 | 0.613419 | false | 3.656109 | false | false | false |
stvstnfrd/edx-platform | cms/djangoapps/contentstore/management/commands/git_export.py | 1 | 2578 | """
This command exports a course from CMS to a git repository.
It takes as arguments the course id to export (i.e MITx/999/2020 ) and
the repository to commit too. It takes username as an option for identifying
the commit, as well as a directory path to place the git repository.
By default it will use settings.GIT_R... | agpl-3.0 | -4,141,749,198,761,361,000 | 39.28125 | 137 | 0.671063 | false | 4.19187 | false | false | false |
paulmathews/nova | nova/openstack/common/rpc/amqp.py | 1 | 15162 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 - 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | apache-2.0 | -1,366,094,623,838,141,700 | 34.591549 | 79 | 0.618388 | false | 4.15625 | false | false | false |
chaddienhart/UdacityP4-GAE-API | conference.py | 1 | 29852 | #!/usr/bin/env python
"""
conference.py -- Udacity conference server-side Python App Engine API;
uses Google Cloud Endpoints
$Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $
created by wesc on 2014 apr 21
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
from datetime import datetime
import ... | apache-2.0 | 2,507,629,036,731,198,000 | 38.696809 | 116 | 0.630946 | false | 4.227131 | false | false | false |
pasquantonio/blackjack_terminal | src/blackjack.py | 1 | 20969 | #!/usr/bin/env python
import sqlite3
import argparse
import sys
import time
from player_class import Player, Fore, randint
from bot_player_class import BotPlayer
from dealer_class import Dealer
from deck_class import Deck
"""
Global Game Functions
"""
def create_players(p, bots, minimum, maximum):
""" Create and ap... | mit | -4,642,748,919,596,337,000 | 25.883333 | 73 | 0.611665 | false | 2.961723 | false | false | false |
apmichaud/vitess-apm | py/zk/zkocc.py | 1 | 9075 | import itertools
import json
import logging
import os
import random
import threading
from net import bsonrpc
from net import gorpc
class ZkOccError(Exception):
pass
#
# the ZkNode dict returned by these structures has the following members:
#
# Path string
# Data string
# Stat ZkStat
# Children []strin... | bsd-3-clause | -6,605,538,623,471,355,000 | 29.867347 | 116 | 0.641102 | false | 3.467711 | false | false | false |
marcofucci/mooshell | models.py | 1 | 9791 | from datetime import date, timedelta, datetime
import os
from django.db import models
from django.db.models.signals import pre_save, post_save
from django.contrib.auth.models import User
from django.conf import settings
from managers import JSDependencyManager, JSLibraryManager, PastieManager, ShellManager
def ne... | mit | 6,345,273,455,268,990,000 | 26.121884 | 126 | 0.704525 | false | 3.096458 | false | false | false |
AusTac/parma | b3/pkg_handler.py | 1 | 4322 | #
# BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2005 Michael "ThorN" Thornton
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your opti... | gpl-2.0 | 8,140,766,433,042,558,000 | 36.591304 | 103 | 0.63975 | false | 3.876233 | false | false | false |
xiedidan/luna-network | resnext/createGroundTruth.py | 1 | 1336 | # -*- coding:utf-8 -*-
import os
from glob import glob
import numpy as np
try:
import cPickle as pickle
except:
import pickle
# create label for resnext tests
# glob filename from nodules/, write label to groundTruths/
class GroundTruthCreator(object):
def __init__(self, dataPath, phrase = "train"):
... | gpl-3.0 | -5,242,850,325,965,492,000 | 30.069767 | 83 | 0.599551 | false | 3.76338 | false | false | false |
langcog/wordbank | instruments/schemas/English_American_WG.py | 1 | 79336 | from django.db import models
from instruments.base import BaseTable
class English_American_WG(BaseTable):
item_1_choices = [('yes', 'yes'), ('no', 'no')]
item_1 = models.CharField(max_length=3, choices=item_1_choices, null=True)
item_2_choices = [('yes', 'yes'), ('no', 'no')]
item_2 = models.CharField... | gpl-2.0 | 4,795,566,595,396,682,000 | 79.218402 | 95 | 0.678746 | false | 3.374564 | false | false | false |
cinemapub/bright-response | scripts/lib/tweepy/tweepy/models.py | 1 | 12175 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from tweepy.error import TweepError
from tweepy.utils import parse_datetime, parse_html_value, parse_a_href
class ResultSet(list):
"""A list like object that holds results from a Twitter API query."""
def __init__(self, max_id=None, s... | mit | -6,371,270,057,078,195,000 | 27.313953 | 84 | 0.55269 | false | 3.938855 | false | false | false |
FEniCS/instant | test/test07.py | 1 | 1463 | from __future__ import print_function
import pytest
import numpy as N
import time
from instant import build_module
import sys
from functools import reduce
c_code = """
void func(int n1, double* array1, int n2, double* array2){
double a;
if ( n1 == n2 ) {
for (int i=0; i<n1; i++) {
a = arra... | gpl-3.0 | -8,838,894,799,438,679,000 | 24.666667 | 95 | 0.535885 | false | 3.04158 | false | false | false |
nextmovesoftware/smilesreading | scripts/WeiningerCEX.py | 1 | 1431 | import subprocess
import common
cex = """$D<MOL>
/_P<molecule>
/_V<Molecule>
/_S<1M>
/_L<XSMILES>
/_X<Molecule represented in XSMILES (Exchange SMILES)>
|
$MOL<%s>
|
"""
def isAromaticSmiles(smi):
N = len(smi)
for i in range(N):
x = smi[i]
if x == ":": return True
... | bsd-2-clause | -1,685,238,090,709,962,200 | 27.8125 | 111 | 0.542278 | false | 3.15894 | false | false | false |
lowlevel86/wakefulness-forecaster | 03_PlanRendezvous/genRendezvous.py | 1 | 2962 | import sys
import datetime
import time
true = 1
false = 0
if len(sys.argv) != 5:
print("This program creates a wake up schedule for catching an appointment.")
print("Usage: ")
print("python genRendezvous.py [date] [time] [minutes until end] [lengthen 'l' or shorten 's' sleep-wake cycle]")
print("date format: yyyy-... | mit | 4,711,496,272,851,396,000 | 34.686747 | 114 | 0.755908 | false | 3.114616 | false | false | false |
botstory/todo-bot | todo/tasks/task_story_helper.py | 1 | 1160 | from botstory.ast import story_context
from todo.tasks import tasks_document
async def current_task(ctx):
"""
get current task from ctx
:param ctx:
:return:
"""
task_id = story_context.get_message_data(ctx, 'option', 'matches')[0]
return await tasks_document.TaskDocument.objects.find_by_id... | mit | 5,986,695,735,030,772,000 | 23.166667 | 85 | 0.626724 | false | 3.442136 | false | false | false |
melecptp/trivial_pursuit_quiz | app.py | 1 | 2745 | # -*- coding:utf8 -*-
# !/usr/bin/env python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | apache-2.0 | 8,824,544,032,651,616,000 | 27.852632 | 113 | 0.686246 | false | 3.689098 | false | false | false |
yakky/django-localflavor | localflavor/us/forms.py | 1 | 4819 | """
USA-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select, CharField
from django.utils.encoding import smart_text
from django.u... | bsd-3-clause | 2,101,800,050,063,301,000 | 33.92029 | 112 | 0.600332 | false | 3.864475 | false | false | false |
rwl/PyCIM | CIM14/IEC61970/Core/ReportingGroup.py | 1 | 5830 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | -2,979,352,487,377,241,600 | 39.486111 | 135 | 0.693139 | false | 4.47429 | false | false | false |
f0rk/sigdebug | sigdebug/__init__.py | 1 | 1776 | # Copyright 2011 Ryan P. Kelly <rpkelly@cpan.org>
#
# This code was inspired by this thread on stackoverflow:
# http://stackoverflow.com/questions/132058/getting-stack-trace-from-a-running-python-application
#
# This code is BSD licensed, please see LICENSE for the full text.
import sys
import signal
import traceback
... | bsd-2-clause | 5,138,224,729,121,091,000 | 26.75 | 97 | 0.693131 | false | 3.877729 | false | false | false |
arthurtyukayev/python-safer | safer/api.py | 1 | 1255 | from requests import Session
SAFER_KEYWORD_URL = 'https://safer.fmcsa.dot.gov/keywordx.asp'
SAFER_QUERY_URL = 'https://safer.fmcsa.dot.gov/query.asp'
sess = Session()
sess.headers.update({
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate',
'Acc... | mit | 7,464,027,450,929,518,000 | 26.888889 | 102 | 0.603984 | false | 2.7951 | false | false | false |
derdmitry/socraticqs2 | mysite/mysite/urls.py | 1 | 1282 | from django.conf.urls import patterns, include, url
from django.apps import apps
from mysite.views import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^$', home_page),
# Examples:
# url(r'^$', 'mysite.views.h... | apache-2.0 | -236,776,820,969,100,900 | 28.136364 | 72 | 0.614665 | false | 3.347258 | false | true | false |
Eficent/odoo-operating-unit | sale_stock_operating_unit/models/sale.py | 1 | 2065 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Eficent (<http://www.eficent.com/>)
# <contact@eficent.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | agpl-3.0 | 5,402,796,366,250,727,000 | 38.711538 | 78 | 0.583051 | false | 4.089109 | false | false | false |
Geoportail-Luxembourg/geoportailv3 | geoportal/geoportailv3_geoportal/lib/sw_helper.py | 1 | 1302 | import os
import glob
import time
UNUSED = '/static-ngeo/UNUSED_CACHE_VERSION/build/'
BUILD_PATH = '/app/geoportailv3_geoportal/static-ngeo/build'
def get_built_filenames(pattern):
return [os.path.basename(name) for name in glob.glob(BUILD_PATH + '/' + pattern)]
def get_urls(request):
main_js_url = UNUSED ... | mit | -468,138,615,993,281,700 | 30.756098 | 102 | 0.635177 | false | 3.027907 | false | false | false |
arpho/mmasgis5 | mmasgis/pvListQueryBuilderBase.py | 1 | 2003 | from constants import *
class PvListQueryBuilderBase:
"""
@param utbs:[Utb]
"""
def __init__(self,utbs):
self.utbs=utbs
self.cons=cons
def usesIstat(self):
b=False
for u in self.utbs:
b=b or u.usesIstat()
return b
def usesCap(self):
b=False
for u in self.utbs:
b=b or u.usesCap()
return... | mit | -6,272,507,948,375,201,000 | 16.275862 | 62 | 0.612581 | false | 2.611473 | false | false | false |
RayRuizhiLiao/ITK_4D | Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py | 1 | 6544 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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
#
# ... | apache-2.0 | -4,370,467,138,431,609,300 | 31.906736 | 79 | 0.6386 | false | 3.705549 | false | false | false |
amyxchen/openhtf | examples/example_plug.py | 1 | 3172 | # Copyright 2014 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | apache-2.0 | 4,989,892,666,170,478,000 | 36.761905 | 75 | 0.703972 | false | 4.114137 | false | false | false |
csarn/qthexedit | docks/struct_explorer.py | 1 | 8347 | from PySide.QtCore import *
from PySide.QtGui import *
from construct import *
from construct.adapters import *
from math import *
from binascii import *
#from ..mmapslice import *
def red(cons):
cons.color = Qt.red
return cons
class TreeNode(object):
def __init__(self, value, row, parent, cons, name=""... | gpl-2.0 | 6,008,047,980,486,020,000 | 32.25498 | 107 | 0.5487 | false | 4.009126 | false | false | false |
synth3tk/the-blue-alliance | controllers/main_controller.py | 1 | 14227 | import os
import logging
import datetime
import webapp2
from google.appengine.api import memcache
from google.appengine.ext import ndb
from google.appengine.ext.webapp import template
import tba_config
from base_controller import CacheableHandler
from consts.event_type import EventType
from consts.notification_type ... | mit | 7,097,353,811,669,205,000 | 33.7 | 146 | 0.605258 | false | 3.630263 | false | false | false |
brvnl/master | parser/ArticleOrganizer.py | 1 | 6740 | # encoding=utf8
from parser.Calendar import Calendar
from parser.Definitions import Definitions
import logging
import datetime
import csv
import sys
#======================================================================================
# This file contains classes to help on the organization of the files. The basic ... | gpl-3.0 | -3,853,865,321,979,589,000 | 36.45 | 106 | 0.544659 | false | 4.460622 | false | false | false |
mdrasmus/spimap | test/scripts/old/test_hky.py | 1 | 1196 | import scipy
from scipy.linalg import expm, logm, eig
from scipy import dot
def makeQ(bgfreq, tsvratio):
a, c, g, t = bgfreq
y = c + t
r = a + g
p = r / y
b = 1. / (2*r*y * (1 + tsvratio))
ay = (r*y*tsvratio - a*g - c*t) / \
(2*(1.+tsvratio)*(y*a*g*p + r*c*t))
ar = p * ay
... | gpl-2.0 | 8,262,586,175,940,815,000 | 19.271186 | 48 | 0.4699 | false | 2.278095 | false | false | false |
linsalrob/bioinformatics | bin/translate_longest_orf.py | 1 | 1066 | """
Translate a sequence (eg. a metagenome) and print the longest ORF
"""
import sys
import os
from robseq import translate
from rob import read_fasta
from rob import rc
try:
faf = sys.argv[1]
size = int(sys.argv[2])
except:
sys.exit(sys.argv[0] + " <fasta file> <min orf size in amino acids>")
fa = r... | mit | 4,582,330,701,247,208,400 | 21.208333 | 73 | 0.54878 | false | 3.116959 | false | false | false |
oneklc/dimod | dimod/reference/composites/higherordercomposites.py | 1 | 14849 | # Copyright 2018 D-Wave Systems 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... | apache-2.0 | 7,922,676,447,443,684,000 | 34.694712 | 94 | 0.608728 | false | 4.502426 | false | false | false |
seibert-media/Highton | highton/models/comment.py | 1 | 1176 | from highton.models import HightonModel
from highton.highton_constants import HightonConstants
from highton import fields
from highton import call_mixins
class Comment(
HightonModel,
call_mixins.DetailCallMixin,
call_mixins.CreateCallMixin,
call_mixins.UpdateCallMixin,
call_mixins.DeleteCallMixin,... | apache-2.0 | -1,080,316,019,135,606,400 | 35.75 | 92 | 0.743197 | false | 3.542169 | false | false | false |
kaosbeat/monaxo | midi.py | 1 | 1847 | #! /usr/bin/env python
import time, random, threading, monome, sched
import rtmidi
import loop16
from seq16 import Seq16
from monome import Monome
from midiout import *
# try to find a monome (you can skip this if you already know the host/port)
print "looking for a monome..."
host, port = monome.find_any_monome()
pr... | mit | 4,509,165,289,863,783,400 | 16.590476 | 92 | 0.624256 | false | 2.175501 | false | false | false |
frmdstryr/enaml-kivy | enamlkv/kv/api.py | 1 | 8801 | #------------------------------------------------------------------------------
# Copyright (c) 2016, frmdstryr.
#
# Distributed under the terms of the MIT License.
#
# The full license is in the file LICENSE, distributed with this software.
#-----------------------------------------------------------------------------... | mit | 530,521,388,394,943,040 | 58.466216 | 162 | 0.709465 | false | 3.577642 | false | false | false |
Nefry/taurus | bzt/modules/aggregator.py | 1 | 20567 | """
Aggregating results into DataPoints
Copyright 2015 BlazeMeter 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 ... | apache-2.0 | -1,317,869,710,146,653,200 | 32.771757 | 118 | 0.581611 | false | 3.742176 | false | false | false |
huguesv/azure-sdk-for-python | azure-mgmt-storage/setup.py | 1 | 2220 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | apache-2.0 | 1,544,755,160,999,081,500 | 33.6875 | 88 | 0.605405 | false | 4.448898 | false | false | false |
USGSDenverPychron/pychron | pychron/experiment/tasks/experiment_panes.py | 1 | 26112 | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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... | apache-2.0 | 1,861,105,749,135,323,400 | 50 | 119 | 0.455078 | false | 5.233915 | false | false | false |
Som-Energia/invoice-janitor | CUPS/sips_comparator.py | 1 | 3601 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import tqdm
import click
from erppeek import Client
from datetime import datetime, date
import configdb
ATR_CASES = ['C2']
ATR_STEPS = ['01']
def create_file(c, from_date, file_output):
atr_ids = c.GiscedataSwitching.search([('create_date','>=', from_dat... | agpl-3.0 | -8,360,267,966,215,296,000 | 40.390805 | 163 | 0.556234 | false | 3.069906 | false | false | false |
akrherz/iem | htdocs/plotting/auto/scripts100/p120.py | 1 | 5184 | """last spring temp"""
import datetime
from pandas.io.sql import read_sql
import pandas as pd
import matplotlib.dates as mdates
from pyiem.plot import figure_axes
from pyiem.util import get_autoplot_context, get_dbconn
from pyiem.exceptions import NoDataFound
def get_description():
""" Return a dict describing h... | mit | -6,493,876,069,943,078,000 | 31.198758 | 78 | 0.52527 | false | 3.437666 | false | false | false |
devgi/bpf | src/bpf/validate.py | 1 | 5558 | import struct
from bpf.opcodes import (BPF_CLASS, BPF_LD, BPF_LDX, BPF_MODE, BPF_MEMWORDS,
BPF_IMM, BPF_IND, BPF_MSH, BPF_ABS, BPF_LEN, BPF_MEM,
BPF_ST, BPF_STX, BPF_ALU, BPF_OP, BPF_ADD, BPF_SUB,
BPF_MUL, BPF_OR, BPF_AND, BPF_RSH, BPF_LSH, BPF... | mit | 7,272,572,571,908,061,000 | 37.867133 | 79 | 0.54516 | false | 3.768136 | false | false | false |
ParkJinSang/Logle | learning/svm/libsvm/svm.py | 1 | 9604 | #!/usr/bin/env python
from ctypes import *
from ctypes.util import find_library
from os import path
import sys
__all__ = ['libsvm', 'svm_problem', 'svm_parameter',
'toPyModel', 'gen_svm_nodearray', 'print_null', 'svm_node', 'C_SVC',
'EPSILON_SVR', 'LINEAR', 'NU_SVC', 'NU_SVR', 'ONE_CLASS',
... | mit | 596,766,394,582,458,200 | 28.280488 | 122 | 0.637755 | false | 2.647189 | false | false | false |
wtpayne/hiai | a3_src/h70_internal/da/check/pytype.py | 1 | 3135 | # -*- coding: utf-8 -*-
"""
Module containing mypy type checking coroutines.
---
type:
python_module
validation_level:
v00_minimum
protection:
k00_public
copyright:
"Copyright 2016 High Integrity Artificial Intelligence Systems"
license:
"Licensed under the Apache License, Version 2.0 (the Lice... | apache-2.0 | 4,167,324,877,451,305,000 | 28.857143 | 79 | 0.556619 | false | 4.446809 | false | false | false |
dcalacci/Interactive_estimation | game/control/models.py | 1 | 1069 | from django.db import models
from django.conf import settings
# from game.round.models import Round
# Create your models here.
class Control(models.Model):
user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, unique=True)
start_time = models.DateTimeField(auto_now_add=True, null=Tr... | mit | 7,463,442,458,747,134,000 | 33.483871 | 96 | 0.733396 | false | 3.859206 | false | false | false |
abisee/pointer-generator | data.py | 1 | 11262 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
# Modifications Copyright 2017 Abigail See
#
# 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... | apache-2.0 | 8,850,772,225,426,416,000 | 39.804348 | 216 | 0.666223 | false | 3.594638 | false | false | false |
cherry-wb/viper | viper/common/network.py | 1 | 1068 | import socket
import urllib2
import socks
#import lib.socks as socks
from viper.common.out import print_error
def download(url, tor=False):
def create_connection(address, timeout=None, source_address=None):
sock = socks.socksocket()
sock.connect(address)
return sock
import socket
... | bsd-3-clause | 8,534,516,328,192,233,000 | 27.105263 | 103 | 0.632022 | false | 3.59596 | false | false | false |
frossigneux/python-kwstandbyclient | kwstandbyclient/utils.py | 1 | 5680 | # Copyright (c) 2013 Mirantis 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 agreed to in writ... | apache-2.0 | 1,058,510,070,111,552,500 | 33.634146 | 81 | 0.601761 | false | 4.048468 | false | false | false |
jonhadfield/ansible-lookups | aws_subnet_ids_from_names.py | 1 | 1411 | # (c) 2017, Jon Hadfield <jon@lessknown.co.uk>
"""
Description: This lookup takes an AWS region and a list of one or more
subnet names and returns a list of matching subnet ids.
Example Usage:
{{ lookup('aws_subnet_ids_from_names', ('eu-west-1', ['subnet1', 'subnet2'])) }}
"""
from __future__ import (absolute_import, ... | mit | -5,266,085,152,718,669,000 | 33.414634 | 95 | 0.651311 | false | 3.855191 | false | false | false |
tsuna/tcollector | tcollector.py | 1 | 58569 | #!/usr/bin/env python
# This file is part of tcollector.
# Copyright (C) 2010 The tcollector Authors.
#
# This program 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 3 of the License, o... | gpl-3.0 | -8,030,747,697,064,389,000 | 39.957343 | 117 | 0.56716 | false | 4.322435 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/virtual_network_gateway_connection_list_entity_py3.py | 1 | 7889 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -7,734,023,908,964,083,000 | 50.901316 | 412 | 0.675624 | false | 4.043567 | false | false | false |
lcc755/WorkTerm1 | 3IfStatements/1Sounds/Code/playNote.py | 1 | 1297 | from nanpy import (ArduinoApi, SerialManager, Tone)
from time import sleep
#Connect to Arduino. Automatically finds serial port.
connection = SerialManager()
speaker = 14 #AO on Arduino
tone = Tone(speakerpin, connection) #Setting "tone" to mean using the "speaker" pin on the "connection". See tone library in Na... | apache-2.0 | 5,221,883,863,522,235,000 | 29.880952 | 135 | 0.624518 | false | 3.163415 | false | false | false |
Instanssi/Instanssi.org | Instanssi/store/utils/paytrail.py | 1 | 1289 | # -*- coding: utf-8 -*-
import hashlib
import requests
class PaytrailException(Exception):
pass
def validate_failure(order_no, timestamp, authcode, secret):
m = hashlib.md5()
m.update('{}|{}|{}'.format(order_no, timestamp, secret).encode('UTF-8'))
return authcode == m.hexdigest().upper()
def vali... | mit | 5,314,636,159,189,205,000 | 27.021739 | 96 | 0.626067 | false | 3.725434 | false | false | false |
ActiveState/code | recipes/Python/212565_copickle__module_serialize_code/recipe-212565.py | 1 | 1544 | """ Create portable serialized representations of Python <code> Objects"""
import new
import pickle
def co_dumps(s):
"""pickles a code object,arg s is the string with code
returns the code object pickled as a string"""
co = compile(s,'<string>','exec')
co_tup=[co.co_argcount,co.co_nlocals, co.co_stac... | mit | -668,232,421,904,555,500 | 34.090909 | 82 | 0.649611 | false | 2.732743 | false | false | false |
cackharot/fbeazt | src/foodbeazt/resources/store_order_report.py | 1 | 2259 | from datetime import datetime
from dateutil import parser as dtparser, tz
from bson import ObjectId, json_util
from flask import g, request
from flask_restful import Resource
from service.StoreOrderService import StoreOrderService
from service.StoreService import StoreService
from foodbeazt.fapp import mongo, store_adm... | apache-2.0 | 4,817,031,853,769,750,000 | 40.833333 | 106 | 0.626826 | false | 3.928696 | false | false | false |
zhiyu-he/algorithm-trip | growth/oj/leet_code/algorithms/122-best-time-to-buy-and-sell-stock-ii.py | 1 | 1289 | # -*- coding: utf-8 -*-
'''
TIPS:
1. operation (buy, sell)
2. for each (buy, sell), we find the longest incr sequence
3. but the most important question why longest incr sequence is work?
'''
class Solution(object):
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype... | gpl-2.0 | 8,956,034,449,981,051,000 | 25.306122 | 73 | 0.534523 | false | 2.883669 | false | false | false |
ltucker/radarpost | radarpost/tests/test_feeds.py | 1 | 6884 | from helpers import *
def test_feed_basic():
"""
test_feed_basic
create a mailbox
subscribe to a feed
update the subscription
assert expected items are in the mailbox
"""
from radarpost.feed import FeedSubscription, update_feed_subscription, parse, AtomEntry
from radarpost.mailbox ... | gpl-2.0 | 4,724,863,857,700,947,000 | 30.295455 | 91 | 0.641488 | false | 3.737242 | true | false | false |
nelsyeung/half-metals-analysis | lib/compounds/five_elements.py | 1 | 2465 | """ Class for generate 5 elements compounds """
import os
import sys
import inspect
baseLibDir = os.path.join(os.path.realpath(os.path.dirname(
inspect.getfile(inspect.currentframe()))), '..')
sys.path.append(baseLibDir)
import nmod
from compound import Compound
class FiveElements(Compound):
""" Five... | mit | 3,695,346,537,015,509,500 | 41.5 | 70 | 0.494118 | false | 3.317631 | false | false | false |
wangjiezhe/FetchNovels | novel/sources/tianna.py | 1 | 1167 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from urllib.parse import urljoin
from pyquery import PyQuery
from novel import serial, utils
BASE_URL = 'http://www.tianna.la/tnw{}/'
class Tianna(serial.SerialNovel):
def __init__(self, tid):
super().__init__(utils.base_to_url(BASE_URL, tid), '#content',... | gpl-3.0 | 3,946,425,903,942,329,300 | 27.463415 | 76 | 0.502999 | false | 3.52568 | false | false | false |
anthonysandrin/kafka-utils | kafka_utils/kafka_cluster_manager/cluster_info/topic.py | 1 | 1887 | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ... | apache-2.0 | 2,210,050,034,550,098,700 | 28.484375 | 74 | 0.659247 | false | 4.398601 | false | false | false |
jrg365/gpytorch | gpytorch/utils/pivoted_cholesky.py | 1 | 3313 | #!/usr/bin/env python3
import torch
from .. import settings
def pivoted_cholesky(matrix, max_iter, error_tol=None):
from ..lazy import lazify, LazyTensor
batch_shape = matrix.shape[:-2]
matrix_shape = matrix.shape[-2:]
if error_tol is None:
error_tol = settings.preconditioner_tolerance.val... | mit | -3,026,770,446,488,931,300 | 38.440476 | 119 | 0.582554 | false | 3.222763 | false | false | false |
snapcore/snapcraft | tests/unit/sources/test_checksum.py | 1 | 2784 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2017-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 | 8,382,165,105,227,043,000 | 33.8 | 83 | 0.650862 | false | 3.726908 | true | false | false |
nomad-mystic/nomadmystic | fileSystem/school-projects/development/softwaredesignandcomputerlogiccis122/cis122lab2/python/Lab2.py | 1 | 2465 | # file = Lab2.py
# programmer = Keith Murphy
# date created = 1-15-2014
# last mod = 1-25-2014
#
# input_list:
# width_1, length_1, width_2, length_2
# output_list:
# rectangle_1_area, rectangle_2_area, average_area_of_rectangles
#
# Variables
# Declare real width_1
# Declare real length... | mit | -3,367,064,113,916,565,000 | 37.515625 | 111 | 0.711562 | false | 3.442737 | false | false | false |
rubgombar1/sharing-cars | sharingcars/announcements/views.py | 1 | 9234 | from django.views.generic.edit import CreateView
from django.core.urlresolvers import reverse_lazy, reverse
from django.views.generic.list import ListView
from django.views.generic import DeleteView
from django.db.models import Q
from django.shortcuts import redirect
from django.views.generic.detail import DetailView
f... | gpl-3.0 | -7,470,523,588,939,033,000 | 39.682819 | 127 | 0.700563 | false | 3.95122 | false | false | false |
seecr/seecr-test | seecr/test/calltrace.py | 1 | 6216 | ## begin license ##
#
# "Seecr Test" provides test tools.
#
# Copyright (C) 2005-2009 Seek You Too (CQ2) http://www.cq2.nl
# Copyright (C) 2012, 2019-2021 Seecr (Seek You Too B.V.) https://seecr.nl
#
# This file is part of "Seecr Test"
#
# "Seecr Test" is free software; you can redistribute it and/or modify
# it under ... | gpl-2.0 | 4,696,377,958,694,295,000 | 37.85 | 171 | 0.624517 | false | 4.041612 | true | false | false |
bluerover/6lbr | examples/6lbr/test/RouterLlsec.py | 1 | 1672 | #!/usr/bin/python2.7
import unittest
import config
from time import sleep
class RouterLlsec(config.scenarios, unittest.TestCase):
def modeSetUp(self):
config.security_layer=1
self.support.backbone.prefix=config.eth_prefix
self.support.wsn.prefix=config.wsn_prefix
self.br = self.sup... | bsd-3-clause | 8,836,917,602,680,402,000 | 51.25 | 168 | 0.691986 | false | 3.35743 | true | false | false |
MaYaSeVeN/Reverse-IP-Bing-API | reverseIP.py | 1 | 8382 | # -*- coding: utf-8 -*-
__author__ = 'Nop Phoomthaisong (aka @MaYaSeVeN)'
__version__ = 'reverseIP version 1.0 ( http://mayaseven.com )'
import urllib
import urllib2
import json
import re
import sys
import optparse
import socket
def main():
print "\n" + __version__
usage = "Usage: python " + sys.argv[
... | gpl-2.0 | 5,043,467,834,300,942,000 | 36.756757 | 142 | 0.517299 | false | 3.568327 | false | false | false |
bokeh/bokeh | tests/unit/bokeh/core/test_templates.py | 1 | 3107 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 5,802,592,885,021,280,000 | 40.426667 | 91 | 0.380753 | false | 5.753704 | true | false | false |
chmanchester/firefox-ui-tests | firefox_puppeteer/ui/toolbars.py | 1 | 13343 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from marionette import Wait, By
from ..api.keys import Keys
from ..api.l10n import L10n
from ..base import BaseLib
from... | mpl-2.0 | 4,035,289,342,934,853,000 | 32.191542 | 92 | 0.601589 | false | 4.055623 | false | false | false |
wdmchaft/taskcoach | taskcoachlib/gui/dialog/preferences.py | 1 | 19285 | # -*- coding: UTF-8 -*-
'''
Task Coach - Your friendly task manager
Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org>
Copyright (C) 2008 Rob McMullen <rob.mcmullen@gmail.com>
Task Coach is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License ... | gpl-3.0 | -8,869,947,193,191,827,000 | 43.090069 | 111 | 0.597454 | false | 3.793165 | false | false | false |
jmwright/cadquery-projects | generative-design/simple_beam/simple_beam_design.py | 1 | 1744 | from random import randint
import cadquery as cq
from Helpers import show
# Generates a random solid, and keeps trying till it finds one
def generate(width=10, height=10, startingPoints=6):
points = []
# Make sure that we get stop points for the random points that make sense
xStop = w
yStop = h / 2.0... | apache-2.0 | 5,019,286,939,047,338,000 | 25.424242 | 77 | 0.643349 | false | 3.694915 | false | false | false |
theo-l/django | django/utils/deprecation.py | 4 | 5058 | import asyncio
import inspect
import warnings
from asgiref.sync import sync_to_async
class RemovedInDjango40Warning(DeprecationWarning):
pass
class RemovedInDjango41Warning(PendingDeprecationWarning):
pass
RemovedInNextVersionWarning = RemovedInDjango40Warning
class warn_about_renamed_method:
def _... | bsd-3-clause | -4,542,584,378,597,957,000 | 34.87234 | 90 | 0.602017 | false | 4.35284 | false | false | false |
prozum/mastermixer | web/web.py | 1 | 3740 | # -*- coding: utf-8 -*-
"""
:copyright: (c) 2014 by Armin Ronacher.
:copyright: (c) 2014 by Niclas Moeslund Overby.
:license: BSD, see LICENSE for more details.
"""
from sqlite3 import dbapi2 as sqlite3
from flask import Flask, request, session, g, redirect, url_for, abort, \
render_template, flash
a... | mit | -8,129,914,217,948,837,000 | 28.210938 | 129 | 0.615138 | false | 3.494393 | false | false | false |
swannapa/erpnext | erpnext/accounts/doctype/subscription/subscription.py | 1 | 10400 | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import calendar
from frappe import _
from frappe.desk.form import assign_to
from frappe.utils.jinja import validate_templa... | gpl-3.0 | -6,931,336,271,616,514,000 | 32.551613 | 104 | 0.710288 | false | 3.081481 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/currency_constant_service/transports/grpc.py | 1 | 10221 | # -*- coding: utf-8 -*-
# Copyright 2020 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... | apache-2.0 | -9,060,951,187,651,923,000 | 43.633188 | 112 | 0.611878 | false | 4.825779 | false | false | false |
JuhaniImberg/cses.py | cses/commands/actions.py | 1 | 6758 | import click
import sys
import time
import os
from cses.cli import cli
from cses.api import API
from cses.db import DB
from cses.commands.tasks import pass_course
from cses.commands.tasks import pass_task
from cses.tasks import detect_type, languages
from cses.ui import clr, color_prompt
@cli.command()
@click.pass_c... | mit | -2,871,418,818,631,801,300 | 28.382609 | 79 | 0.583309 | false | 3.629431 | true | false | false |
festicket/django-notification | notification/migrations/0002_version_2.py | 1 | 9845 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Renaming field 'Notice.user'
db.rename_column('notification_notice', 'user_id', 'recipient_id')
#... | mit | -3,072,889,652,861,836,300 | 70.347826 | 217 | 0.555104 | false | 3.782174 | false | false | false |
tmshv/k2 | Tools/qgis_export_street_features.py | 1 | 1910 | # -*- coding: utf-8 -*-
import re
import os
import json
out_filename = os.path.expanduser('~/osm_features.geojson')
layer = iface.activeLayer()
# features = layer.getFeatures()
features = layer.selectedFeatures()
properties = [('OSM_ID', int), 'NAME', 'REF', 'HIGHWAY', 'ONEWAY', 'BRIGDE', 'TUNNEL', 'MAXSPEED', 'LA... | mit | 8,231,745,914,096,852,000 | 22.8875 | 127 | 0.592147 | false | 3.429084 | false | false | false |
NeCTAR-RC/nova | nova/availability_zones.py | 1 | 9190 | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | 473,693,852,520,149,500 | 37.613445 | 79 | 0.626224 | false | 4.278399 | false | false | false |
ahmadassaf/zulip | zerver/views/messages.py | 1 | 43747 | from __future__ import absolute_import
from django.utils.translation import ugettext as _
from django.utils.timezone import now
from django.conf import settings
from django.core import validators
from django.core.exceptions import ValidationError
from django.db import connection
from django.db.models import Q
from dja... | apache-2.0 | -1,849,675,274,020,769,500 | 43.685393 | 183 | 0.605207 | false | 4.125519 | false | false | false |
emirot/codefights | interviewPractice/isListPalindrome.py | 1 | 1577 | # Definition for singly-linked list:
# class ListNode(object):
# def __init__(self, x):
# self.value = x
# self.next = None
#
def isListPalindrome(l):
tmp = l
list_len = 0
left = 0
right = 0
while tmp:
list_len += 1
tmp = tmp.next
tmp = l
if list_len == 0 or ... | apache-2.0 | -476,341,232,066,421,950 | 22.893939 | 42 | 0.464172 | false | 4.074935 | false | false | false |
lmazuel/azure-sdk-for-python | azure-batch/azure/batch/models/pool_evaluate_auto_scale_options.py | 1 | 1773 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -4,791,265,605,864,592,000 | 44.461538 | 106 | 0.663847 | false | 4.191489 | false | false | false |
saulshanabrook/pushgp.py | setup.py | 1 | 1109 | from setuptools import setup, find_packages
setup(
name='pushgp',
version='0.1.0',
description='Use genetic programming, implemented with Push, for machine learning.',
long_description=open('README.rst').read(),
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
url='https://g... | bsd-3-clause | -5,720,976,648,348,623,000 | 30.685714 | 90 | 0.597836 | false | 3.696667 | false | false | false |
gtamazian/bioformats | bioformats/eggnog.py | 1 | 4319 | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# Gaik Tamazian, 2019
# mail (at) gtamazian (dot) com
"""Routines for reading, writing and processing eggNOG output files."""
import sys
from . import gff3
from . import snpeff
from . import vcf
assert sys.version_info >= (3, 5), "Python 3.5 or higher required"
def lo... | mit | 1,900,790,480,074,695,400 | 35.294118 | 76 | 0.500347 | false | 3.620285 | false | false | false |
amdouglas/OpenPNM | test/integration/test_source1.py | 1 | 4317 | import OpenPNM
import scipy as sp
print('-----> Using OpenPNM version: '+OpenPNM.__version__)
pn = OpenPNM.Network.Cubic(shape=[10,10,40],spacing=0.0001)
pn.add_boundaries()
Ps = pn.pores('boundary',mode='not')
Ts = pn.find_neighbor_throats(pores=Ps,mode='intersection',flatten=True)
geom = OpenPNM.Geometry.Toray090(ne... | mit | 9,075,524,792,746,184,000 | 48.62069 | 139 | 0.506139 | false | 3.258113 | false | false | false |
luwei0917/awsemmd_script | script/BuildAllAtomsFromLammps_seq.py | 1 | 12949 | #!/usr/bin/python
# ----------------------------------------------------------------------
# Copyright (2010) Aram Davtyan and Garegin Papoian
# Papoian's Group, University of Maryland at Collage Park
# http://papoian.chem.umd.edu/
# Last Update: 03/04/2011
# ---------------------------------------------------------... | mit | -3,018,403,266,057,203,700 | 29.75772 | 104 | 0.426211 | false | 2.898165 | false | false | false |
monkeysecurity/botor | setup.py | 1 | 1204 | """
Botor
=====
A thin wrapper around boto3
:copyright: (c) 2016 by Netflix, see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
import sys
import os.path
from setuptools import setup, find_packages
ROOT = os.path.realpath(os.path.join(os.path.dirname(__file__)))
# When executing the setup.py,... | apache-2.0 | -2,690,839,259,569,215,500 | 20.909091 | 76 | 0.628738 | false | 3.185185 | false | false | false |
aitjcize/QCamber | src/codegen/codegen.py | 1 | 3393 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#
# codegen.py
#
# Copyright (C) 2013 - Wei-Ning Huang (AZ) <aitjcize@gmail.com>
# All Rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | gpl-3.0 | 3,293,000,234,375,598,600 | 29.845455 | 80 | 0.591217 | false | 3.873288 | false | false | false |
coll-gate/collgate | server/accession/migrations/0007_auto_20180328_1749.py | 1 | 2013 | # Generated by Django 2.0.2 on 2018-03-28 15:49
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accession', '0006_action_name'),
]
operations = [
migrations.Cr... | mit | -8,494,079,501,967,267,000 | 41.829787 | 180 | 0.604074 | false | 4.202505 | false | false | false |
jcjl013/ylplines | setup.py | 1 | 1461 | #!/usr/bin/env python
"""
ylplines - Clarity for Yelp
Copyright (C) 2016 Jeff Lee
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 versi... | gpl-3.0 | 9,151,149,374,232,757,000 | 27.647059 | 69 | 0.638604 | false | 3.495215 | false | false | false |
Balandat/cont_no_regret | ContNoRegret/NoRegretAlgos.py | 1 | 23992 | '''
Basic Algorithms for the Continuous No-Regret Problem.
@author: Maximilian Balandat
@date May 25, 2015
'''
import numpy as np
from .LossFunctions import ZeroLossFunction, ctypes_integrate
from .DualAveraging import compute_nustar
from .Domains import nBox, UnionOfDisjointnBoxes, DifferenceOfnBoxes
from .Potential... | mit | -6,658,337,883,254,105,000 | 55.056075 | 152 | 0.520007 | false | 3.565463 | false | false | false |
Jan-zou/LeetCode | python/HashTable/205_isomorphic_strings.py | 1 | 1289 | # !/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Description:
Given two strings s and t, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replaced to get t.
All occurrences of a character must be replaced with another character while preserving the order of chara... | mit | -6,590,881,442,122,380,000 | 29.690476 | 116 | 0.576416 | false | 3.641243 | false | false | false |
gaasedelen/lighthouse | coverage/frida/frida-drcov.py | 1 | 10181 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import json
import os
import signal
import sys
import frida
"""
Frida BB tracer that outputs in DRcov format.
Frida script is responsible for:
- Getting and sending the process module map initially
- Getting the code execution events
- Pars... | mit | -5,940,395,265,699,300,000 | 28.682216 | 82 | 0.595718 | false | 3.589915 | false | false | false |
anandpdoshi/frappe | frappe/commands/site.py | 1 | 14212 | from __future__ import unicode_literals, absolute_import
import click
import hashlib, os, sys
import frappe
from frappe.commands import pass_context, get_site
from frappe.commands.scheduler import _is_scheduler_enabled
from frappe.limits import update_limits, get_limits
from frappe.installer import update_site_config
f... | mit | -2,448,101,645,080,719,400 | 31.226757 | 244 | 0.726428 | false | 3.101702 | false | false | false |
berth64/modded_modded_1257ad | source/header_common.py | 1 | 23877 | ###################################################
# header_common.py
# This file contains common declarations.
# DO NOT EDIT THIS FILE!
###################################################
#client events
multiplayer_event_set_item_selection = 0
multiplayer_event_set_bot_selection ... | agpl-3.0 | -3,918,707,714,485,447,000 | 38.19697 | 188 | 0.631863 | false | 2.931852 | false | false | false |
telnik/jCnC | db_manip.py | 1 | 4702 | #!/usr/bin/python2
import sys, sqlite3, argparse
class dbmanager:
"""
DataStore Class for Juniper Devices
Stores hosts, thier usernames and passwords, and groups.
Groupes are lists of hosts with names.
Methods:
create_host -- insert a new host
modify_host_name -- modify a hosts host name
modify_host_user --... | mit | -5,491,197,333,589,773,000 | 34.89313 | 241 | 0.711399 | false | 3.404779 | false | false | false |
dialogflow/fulfillment-translate-python | translate_response.py | 1 | 4345 | #!/usr/bin/env python
# Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | -1,530,639,517,313,129,200 | 40.778846 | 79 | 0.690679 | false | 3.626878 | false | false | false |
schaabs/sandbox | py/keyvault/crytpography/algorithms/rsa_oaep.py | 1 | 1049 | from ..algorithm import EncryptionAlgorithm
from ..transform import CryptoTransform
from abc import ABCMeta
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
def _default_encryption_padding():
return padding.OAEP(mgf=padding.MGF1(algorithm=hashes.SHA1(... | mit | 3,135,554,473,970,366,500 | 25.225 | 103 | 0.720686 | false | 3.496667 | false | false | false |
UncleRus/MultiConf | src/ui/dialogs.py | 1 | 3974 | # -*- coding: utf-8 -*-
from PySide.QtCore import *
from PySide.QtGui import *
class AsyncProcess (QThread):
progressUpdated = Signal (int)
changed = Signal (str)
errorOccured = Signal (str)
bannerUpdated = Signal (str)
def __init__ (self, target, parent, changeCursor = False):
... | gpl-3.0 | 6,590,716,775,031,166,000 | 31.394958 | 127 | 0.60921 | false | 4.148225 | false | false | false |
jbking/python-stdnet | stdnet/backends/redisb/client/extensions.py | 1 | 16403 | import os
from hashlib import sha1
from collections import namedtuple
from datetime import datetime
from copy import copy
from stdnet.utils.structures import OrderedDict
from stdnet.utils import iteritems, format_int
from stdnet import odm
try:
import redis
except ImportError: # pragma nocover
... | bsd-3-clause | -7,290,421,867,818,127,000 | 27.87796 | 79 | 0.533805 | false | 4.226488 | false | false | false |
graziano-giuliani/pythoncode | pyuwphysret/common/pyfiles/atmos/mr2rho.py | 1 | 1485 | #!/usr/bin/env python
# dp2e.py
import numpy as num
def mr2rho(w,t,p):
"""rho = mr2rho(w,t,p)
w in g/kg
t in K
p in mb
This was provide by Holger Linne' from Max Planck Institute.
Dave Turner
Pacific Northwest National Laboratory
Currently at the University of Wisconsin-Madison
dave.turner@pnl.gov
"""
rh... | mit | -3,557,386,664,818,324,000 | 33.534884 | 77 | 0.521212 | false | 1.894133 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.