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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
trnewman/VT-USRP-daughterboard-drivers_python | gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py | 1 | 4324 | #!/usr/bin/env python
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
... | gpl-3.0 | -6,943,813,279,968,118,000 | 32.51938 | 70 | 0.531684 | false | 3.057992 | true | false | false |
shoopio/shoop | shuup_tests/front/test_product_detail_theme_settings.py | 2 | 1852 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import pytest
from bs4 import BeautifulSoup
from django.core.urlr... | agpl-3.0 | -130,816,210,023,205,390 | 39.26087 | 102 | 0.717603 | false | 3.667327 | false | false | false |
leapalazzolo/XSS | xss.py | 1 | 15177 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import threading
import urllib
import argparse
import urlparse
import logging
import urllib2
import httplib
import Queue
import re
import hashlib
import mechanize
from links import links
from bdd import bdd
logging.config.fileConfig('log.ini')
LOGGER = logging.getL... | mit | -3,690,244,999,868,630,000 | 42.265714 | 275 | 0.577797 | false | 3.404227 | false | false | false |
gjbex/parameter-weaver | src/vsc/parameter_weaver/r/formatter.py | 1 | 4627 | #
# ParameterWeaver: a code generator to handle command line parameters
# and configuration files for C/C++/Fortran/R/Octave
# Copyright (C) 2013 Geert Jan Bex <geertjan.bex@uhasselt.be>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | gpl-3.0 | -7,407,597,421,357,546,000 | 43.066667 | 137 | 0.593689 | false | 3.61767 | true | false | false |
zlsa/io_object_mu | shader.py | 1 | 16608 | # vim:ts=4:et
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This prog... | gpl-2.0 | -3,028,747,332,299,951,600 | 42.137662 | 181 | 0.629034 | false | 3.097929 | false | false | false |
gsdlab/claferMooStandalone | 2012-models-clafermultiobjective-data-generator/spl_datagenerator/AppendPartialInstanceAndGoals.py | 1 | 6436 | '''
Created on Jul 29, 2012
@author: rafaelolaechea
'''
import argparse
from xml.etree import ElementTree
from xml_parser_helper import load_xml_model
import spl_claferanalyzer
import math
_namespaces = {'c1': 'http://gsd.uwaterloo.ca/clafer', 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
def generate_and_ap... | mit | 7,967,141,363,815,726,000 | 60.884615 | 198 | 0.644344 | false | 3.754959 | false | false | false |
shmilee/gdpy3 | src/loaders/hdf5pck.py | 1 | 2125 | # -*- coding: utf-8 -*-
# Copyright (c) 2020 shmilee
'''
Contains Hdf5 pickled file loader class.
'''
import numpy
try:
import h5py
except ImportError as exc:
raise ImportError(
'Hdf5PckLoader requires h5py(bindings for HDF5). But %s' % exc) from None
from ..glogger import getGLogger
from ..utils i... | mit | -7,078,559,083,106,932,000 | 24.297619 | 81 | 0.584 | false | 3.33595 | false | false | false |
matejsuchanek/pywikibot-scripts | import_displaytitle.py | 1 | 2212 | #!/usr/bin/python
import pywikibot
from pywikibot.pagegenerators import (
page_with_property_generator,
GeneratorFactory,
NamespaceFilterPageGenerator,
)
from pywikibot.tools import first_lower
from .wikidata import WikidataEntityBot
class LabelSettingBot(WikidataEntityBot):
def __init__(self, **kw... | gpl-2.0 | 8,543,132,277,754,839,000 | 29.722222 | 79 | 0.599458 | false | 4.073665 | false | false | false |
reflectometry/osrefl | osrefl/loaders/reduction/registry.py | 1 | 5834 | # This program is public domain
"""
File extension registry.
This provides routines for opening files based on extension,
and registers the built-in file extensions.
"""
import os.path
class ExtensionRegistry(object):
"""
Associate a file loader with an extension.
Note that there may be multiple loaders... | bsd-3-clause | -3,973,083,359,821,198,300 | 31.960452 | 84 | 0.594275 | false | 4.03179 | false | false | false |
dims/neutron | neutron/agent/linux/ip_lib.py | 1 | 37003 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -8,870,841,089,214,430,000 | 34.85562 | 79 | 0.550334 | false | 4.026442 | false | false | false |
polyrabbit/WeCron | WeCron/remind/utils.py | 1 | 1829 | # coding: utf-8
from __future__ import unicode_literals, absolute_import
from datetime import timedelta
from django.utils import timezone
from lru import lru_cache_function
from common import wechat_client
def delta2dict( delta ):
"""Accepts a delta, returns a dictionary of units"""
delta = abs( delta )
... | gpl-3.0 | 2,957,145,779,826,193,400 | 27.758065 | 76 | 0.581043 | false | 3.212613 | false | false | false |
mattboyer/sqbrite | src/sqlite_recover.py | 1 | 9263 | # MIT License
#
# Copyright (c) 2017 Matt Boyer
#
# 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, p... | mit | -5,541,782,990,340,641,000 | 30.722603 | 79 | 0.589766 | false | 4.124221 | false | false | false |
freevo/freevo1 | src/util/fxdparser.py | 1 | 11394 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# Parser for fxd files
# -----------------------------------------------------------------------
# $Id$
#
# Notes:
# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home ... | gpl-2.0 | 4,557,053,931,857,020,000 | 29.063325 | 85 | 0.50316 | false | 4.264222 | false | false | false |
fotinakis/sentry | tests/sentry/tasks/test_reports.py | 1 | 7050 | from __future__ import absolute_import
import functools
from datetime import datetime, timedelta
import mock
import pytest
import pytz
from django.core import mail
from sentry.app import tsdb
from sentry.models import Project, UserOption
from sentry.tasks.reports import (
DISABLED_ORGANIZATIONS_USER_OPTION_KEY, ... | bsd-3-clause | 4,375,424,478,622,912,000 | 25.603774 | 83 | 0.563972 | false | 3.544495 | true | false | false |
chronicle/api-samples-python | detect/v2/get_error.py | 1 | 2378 | #!/usr/bin/env python3
# Copyright 2021 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 | 3,125,052,403,888,399,000 | 28.358025 | 74 | 0.676619 | false | 3.471533 | false | false | false |
abelhj/svtools | svtools/bedpetovcf.py | 1 | 2644 | import argparse, sys
from svtools.bedpe import Bedpe
from svtools.vcf.file import Vcf
from svtools.bedpetovcfconverter import BedpeToVcfConverter
import svtools.utils as su
# primary function
def bedpeToVcf(bedpe_file, vcf_out):
myvcf = Vcf()
converter = BedpeToVcfConverter(myvcf)
in_header = True
# p... | mit | -7,623,955,371,000,402,000 | 33.337662 | 153 | 0.521936 | false | 3.922849 | false | false | false |
grigno/djangocms-link | setup.py | 3 | 1448 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
from djangocms_link import __version__
REQUIREMENTS = [
'django-cms>=3.2.0',
'djangocms-attributes-field>=0.1.1',
]
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environmen... | bsd-3-clause | 6,398,822,837,265,778,000 | 28.55102 | 75 | 0.645718 | false | 3.830688 | false | true | false |
piantado/LOTlib | LOTlib/Hypotheses/Proposers/InsertDeleteProposer.py | 1 | 1346 | """Mixing Insert and Delete Proposers for backward compatibility"""
from LOTlib.Hypotheses.Proposers.DeleteProposer import *
from LOTlib.Hypotheses.Proposers.InsertProposer import *
from LOTlib.Hypotheses.Proposers.MixtureProposer import *
from LOTlib.Miscellaneous import lambdaOne, nicelog
class InsertDeleteProposer... | gpl-3.0 | -1,844,579,424,687,758,000 | 43.866667 | 111 | 0.725111 | false | 3.505208 | false | false | false |
leonard-wei/hashcalclib | hashcalclib/hashcalclib.py | 1 | 86985 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# python version: 2.7.5 final, serial: 0
# Author: Leonard Wei <gooxxgle.mail@gmail.com>
"""Hash calculation library
This module is an hash calculation library that:
- calculate the input strings or files
- output the result for later verificat... | gpl-2.0 | -3,266,934,450,197,240,300 | 37.420936 | 80 | 0.542335 | false | 4.093604 | false | false | false |
isvalkyrie/LCWMachine | sentiment very simple.py | 1 | 6231 | #coding:utf-8
import sys
import nltk.classify.util
from nltk.classify import NaiveBayesClassifier
from nltk.corpus import names
def word_feats(words):
return dict([(word, True) for word in words])
positive_vocab = ['iyi','güzel','Tebrikler','tebrik ederim','tebrik','teşekkür', 'ederiz',':)','m at @LCWaikiki','ino... | gpl-3.0 | 8,283,427,697,944,422,000 | 81.763889 | 411 | 0.706662 | false | 2.157495 | false | false | false |
npp/npp-api | data/management/commands/import_shelter_population.py | 1 | 1839 | from django import db
from django.conf import settings
from django.core.management.base import NoArgsCommand
from data.models import ShelterPopulation
import csv
# National Priorities Project Data Repository
# import_new_aids_cases.py
# Updated 6/25/2010, Joshua Ruihley, Sunlight Foundation
# Imports Census Shelter P... | mit | 6,527,005,569,106,580,000 | 40.818182 | 124 | 0.667754 | false | 3.641584 | false | false | false |
idiap/acoustic-simulator | degrade-audio-safe-random.py | 1 | 42549 | #!/usr/bin/python
#Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
#Written by Marc Ferras <marc.ferras@idiap.ch>,
#
#This file is part of AcSim.
#
#AcSim 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 ... | gpl-3.0 | 1,202,465,438,931,763,700 | 31.881762 | 258 | 0.59301 | false | 2.512044 | false | false | false |
cheerss/Fast-Style-Combination | neural_style.py | 1 | 9173 | # Copyright (c) 2015-2017 Anish Athalye. Released under GPLv3.
import os
import numpy as np
import scipy.misc
from stylize import stylize
import math
from argparse import ArgumentParser
from PIL import Image
from sys import stderr
import time
# default arguments
CONTENT_WEIGHT = 5e0
CONTENT_WEIGHT_BLEND = 1
STYLE... | agpl-3.0 | -4,931,044,437,905,474,000 | 40.885845 | 177 | 0.637196 | false | 3.868832 | false | false | false |
DemocracyClub/yournextrepresentative | ynr/apps/wombles/views.py | 1 | 1342 | from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import User
from django.db.models import Count
from django.views.generic import DetailView, ListView
from candidates.models import LoggedAction
from wombles.models import WombleTags
class SingleWombleView(LoginRequiredMixin, De... | agpl-3.0 | 5,623,654,047,260,902,000 | 29.5 | 64 | 0.646796 | false | 3.597855 | false | false | false |
davidbroadwater/nyc-subway-datascience-project | project_3/linear_regression/predictions.py | 1 | 3956 | import pandas as pd
import numpy as np
def normalize_features(array):
"""
Normalize the features in our data set.
"""
array_normalized = (array-array.mean())/array.std()
mu = array.mean()
sigma = array.std()
return array_normalized, mu, sigma
def compute_cost(features, values, theta):
"""
... | mit | 3,973,742,337,469,923,300 | 36.330189 | 116 | 0.681244 | false | 3.825919 | false | false | false |
alexei-matveev/ccp1gui | idle/Percolator.py | 1 | 2612 | from WidgetRedirector import WidgetRedirector
from Delegator import Delegator
class Percolator:
def __init__(self, text):
# XXX would be nice to inherit from Delegator
self.text = text
self.redir = WidgetRedirector(text)
self.top = self.bottom = Delegator(text)
self.bottom.... | gpl-2.0 | -4,278,931,989,671,904,000 | 29.729412 | 71 | 0.594181 | false | 3.824305 | false | false | false |
leigh123linux/cinnamon-screensaver | src/dbusdepot/accountsServiceClient.py | 2 | 1463 | #!/usr/bin/python3
import gi
gi.require_version('AccountsService', '1.0')
from gi.repository import GObject, AccountsService
import os
from util import utils, trackers
class AccountsServiceClient(GObject.Object):
"""
Singleton for working with the AccountsService, which we use
to retrieve the user's face... | gpl-2.0 | 2,336,327,375,661,552,600 | 29.479167 | 96 | 0.583732 | false | 3.943396 | false | false | false |
bacemtayeb/Tierra | src/modules/scanner/net_map.py | 1 | 2921 | import socket
from datetime import datetime
from util import Error
from scapy.all import *
from scanner import Scanner
from zoption import Zoption
class net_map(Scanner):
def __init__(self):
super(net_map, self).__init__('NetMap')
self.available_hosts = {}
self.config.update({"net_mask":Zo... | gpl-3.0 | -5,535,189,645,058,641,000 | 38.472973 | 113 | 0.451558 | false | 4.432473 | false | false | false |
Linaro/lava-server | share/javascript.py | 1 | 6326 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# javascript.py
#
# Copyright 2015 Neil Williams <codehelp@debian.org>
#
# 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 ... | agpl-3.0 | -163,854,966,127,510,600 | 35.994152 | 85 | 0.516282 | false | 4.315143 | false | false | false |
atfinke/WikiRaces | data/main.py | 1 | 1289 | import os
import csv
import lzma
import pickle
DIRECTORY_PATH = 'WKRRaces'
def files():
directory = DIRECTORY_PATH
f = []
for file in os.listdir(directory):
if file.endswith(".csv"):
f.append(os.path.join(directory, file))
return f
def history_item(item, is_null_time):
s = ite... | mit | -7,833,673,281,117,440,000 | 23.788462 | 76 | 0.52211 | false | 3.437333 | false | false | false |
hisuley/sxj | blog/blogpost/views.py | 1 | 2753 | from django.shortcuts import render_to_response, get_object_or_404
from blogpost.models import BlogPost
from blogpost.forms import BlogForm
from django.http import HttpResponseRedirect
def blogList(request):
blogs = BlogPost.objects.all()
return render_to_response('blogpost/blog_list.html', {'blogs': blogs})
... | mit | -4,427,486,751,830,666,000 | 34.307692 | 91 | 0.607701 | false | 3.665779 | false | false | false |
cqw1/palliassist_webportal | app/migrations/0019_auto_20170218_0001.py | 1 | 1965 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-18 06:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0018_auto_20170217_2220'),
]
operations = [
migrations.RemoveField(
... | mit | 888,934,080,564,559,900 | 27.478261 | 49 | 0.528753 | false | 4.281046 | false | false | false |
juice-ryang/online-judge | OnlineJudgeServer/process_capsule.py | 1 | 5696 | """Process Capsule: The PExpect Wrapper."""
from errno import ESRCH as NoSuchProcess
from os import kill, environ
from os.path import join
from signal import SIGTERM as CTRL_C
from chardet import detect as Chardet
from pexpect import (
spawn,
TIMEOUT,
EOF,
)
__author__ = "Minho Ryang (minhoryang@gmail.co... | gpl-3.0 | -3,458,395,335,906,989,000 | 29.956522 | 83 | 0.578827 | false | 4.01976 | false | false | false |
jungla/ICOM-fluidity-toolbox | Detectors/offline_advection/plot_Richardson_2D_const_both.py | 1 | 7931 | #!~/python
import fluidity_tools
import matplotlib as mpl
mpl.use('ps')
import matplotlib.pyplot as plt
import myfun
import numpy as np
import os
import lagrangian_stats
import advect_functions
from scipy import interpolate
import csv
import advect_functions
def RD_t(par2Dzr,tt,px,py):
RD_2Dm = [] #np.zeros((px+py,t... | gpl-2.0 | -3,794,594,153,725,665,300 | 34.248889 | 178 | 0.626907 | false | 1.986723 | false | false | false |
pytorch/fairseq | fairseq/modules/lightconv_layer/cuda_function_gen.py | 1 | 9642 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
def gen_forward():
kernels = [3, 5, 7, 15, 31, 63, 127, 255]
seqs = [32 * x for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,... | mit | -6,413,420,319,502,811,000 | 32.363322 | 141 | 0.478117 | false | 4.082134 | false | false | false |
dsavransky/EXOSIMS | EXOSIMS/PlanetPopulation/SAG13.py | 1 | 14420 | from EXOSIMS.PlanetPopulation.KeplerLike2 import KeplerLike2
from EXOSIMS.util.InverseTransformSampler import InverseTransformSampler
import astropy.units as u
import astropy.constants as const
import numpy as np
import scipy.integrate as integrate
import sys
# Python 3 compatibility:
if sys.version_info[0] > 2:
x... | bsd-3-clause | -8,000,334,332,726,684,000 | 41.536873 | 167 | 0.560957 | false | 3.25361 | false | false | false |
dvklopfenstein/PrincetonAlgorithms | tests/test_EdgeWeightedDirectedCycle.py | 1 | 1770 | #/usr/bin/env python
# TBD: Finish Python port
#*****************************************************************************
# Compilation: javac EdgeWeightedDirectedCycle.java
# Execution: java EdgeWeightedDirectedCycle V E F
# Dependencies: EdgeWeightedDigraph.java DirectedEdge.java Stack.java
#
# Find... | gpl-2.0 | 8,139,211,552,957,363,000 | 28.016393 | 80 | 0.554237 | false | 3.110721 | false | false | false |
Harvard-ATG/HarvardCards | modules/flashcard-loader/initial_data.py | 1 | 6227 | #
# The script creates the json files which can be directly imported into HarvardCards Django App.
# It looks for the json file in the folder specified by the variable "path_files_folder"
# Usage:
# ./initial_data.py [json_file]
# Note: For now, you can execute ./initial_data.py and the script will use the arthistory... | bsd-3-clause | -7,857,226,104,967,788,000 | 31.952381 | 117 | 0.495263 | false | 3.996791 | false | false | false |
babyliynfg/cross | tools/project-creator/Python2.6.6/Lib/test/test_grammar.py | 1 | 32152 | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
# NOTE: When you run this test as a script from the command line, you
# get warnings about certain hex/oct constants. Since those are
# issued by the parser, you can't suppress them by adding a
# filterwarnings() call t... | mit | 1,437,335,187,774,944,500 | 31.249224 | 132 | 0.463019 | false | 3.450526 | true | false | false |
JoshMayberry/ME342Final | source/views/frmThermoInput.py | 1 | 5298 | import wx
#from ..logic import LogicThermoInput
class Frm_ThermoInput ( wx.Frame ):
#Note: Most of this frame is built by logic, because it needs to determine what is to be shown.
def __init__( self, parent ):
windowSize = self.setSize()
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString,... | mit | -1,833,855,268,306,803,500 | 40.724409 | 386 | 0.694979 | false | 2.608567 | false | false | false |
Timtam/cards-against-humanity | editor/current_card.py | 1 | 10710 | from shared.card import CARD_BLACK, CARD_PLACEHOLDER_LENGTH, CARD_WHITE
from shared.exceptions import CardValidityError
from .const import *
class CurrCardWindow(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent,
name="current card panel")
frame = self.GetT... | mit | 5,581,464,990,867,145,000 | 33.217252 | 126 | 0.643231 | false | 3.607275 | false | false | false |
cevap/ion | test/functional/test_framework/bignum.py | 1 | 1910 | #!/usr/bin/env python3
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Big number routines.
This file is copied from python-bitcoinlib.
"""
import struct
# generic big endian MPI format
def bn_bytes(v, have_ext=False):
... | mit | -1,210,553,528,431,300,900 | 18.690722 | 69 | 0.51623 | false | 2.880845 | false | false | false |
juliarizza/certificate_generator | app.py | 1 | 6448 | # -*- coding: utf-8 -*-a
import sys
import os.path
from PyQt4 import QtGui, QtCore
from controllers import *
from models import *
from global_functions import images_dir
class Window(QtGui.QMainWindow):
"""
Main window of the app.
"""
def __init__(self):
"""
Setup widgets.
... | gpl-3.0 | -5,823,370,606,249,623,000 | 31.790816 | 328 | 0.643535 | false | 3.964837 | true | false | false |
hiuwo/acq4 | acq4/pyqtgraph/opengl/items/GLScatterPlotItem.py | 1 | 7446 | from OpenGL.GL import *
from OpenGL.arrays import vbo
from .. GLGraphicsItem import GLGraphicsItem
from .. import shaders
from ... import QtGui
import numpy as np
__all__ = ['GLScatterPlotItem']
class GLScatterPlotItem(GLGraphicsItem):
"""Draws points at a list of 3D positions."""
def __init__(self, **kw... | mit | 6,061,750,020,788,004,000 | 39.688525 | 116 | 0.506849 | false | 3.916886 | false | false | false |
google/nerfies | nerfies/models.py | 1 | 15699 | # Copyright 2021 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 | -6,959,720,088,576,652,000 | 36.92029 | 79 | 0.671763 | false | 3.578527 | true | false | false |
adelomana/30sols | F5.EGRIN/classMembershipAssigner.py | 1 | 1747 | ###
### this script assigns most voted class to corems
###
import sys
# 0. user defined variables
gene2ClassFile='/Volumes/omics4tb/alomana/projects/TLR/data/annotation/si.table.1.si.ribosomal.protein.index.information.csv'
geneDictionaryFile='/Volumes/omics4tb/alomana/projects/TLR/data/annotation/si.table.1.gene.dic... | gpl-3.0 | -4,864,261,541,465,796,000 | 30.196429 | 125 | 0.670864 | false | 3.108541 | false | false | false |
MingjunZhou/nltk_book | ch3_Processing_Raw_Text/normalizing_text.py | 1 | 1438 | import nltk
class IndexedText(object):
def __init__(self, stemmer, text):
self._text = text
self._stemmer = stemmer
self._index = nltk.Index((self._stem(word), i)
for (i, word) in enumerate(text))
def concordance(self, word, width=40):
key = se... | bsd-3-clause | 3,717,364,423,540,974,000 | 34.073171 | 85 | 0.595967 | false | 3.298165 | false | false | false |
ssdxiao/kimchi | plugins/sample/model.py | 1 | 3802 | #
# Project Kimchi
#
# Copyright IBM, Corp. 2013
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This lib... | lgpl-2.1 | 6,800,119,525,657,207,000 | 28.022901 | 79 | 0.622567 | false | 4.119177 | false | false | false |
repotvsupertuga/tvsupertuga.repository | script.module.cryptolib/lib/cryptopy/cipher/cbc.py | 1 | 4602 | """ cryptopy.cipher.cbc
CBC mode of encryption for block ciphers.
This algorithm mode wraps any BlockCipher to make a
Cipher Block Chaining mode.
Note !!!! auto IV uses python default random :-(
should not be 'too bad' (tm) for this cbc applicaiton
Copyright (c) 2002 by Paul A. Lambert
R... | gpl-2.0 | 7,249,871,556,218,602,000 | 41.220183 | 102 | 0.612125 | false | 4.127354 | false | false | false |
gacarrillor/CopyLayersAndGroupsToClipboard | copyLayersAndGroupsToClipboard.py | 1 | 4969 | # -*- coding:utf-8 -*-
"""
/***************************************************************************
CopyLayersAndGroupsToClipboard
A QGIS plugin
Copy selected layers and groups from Layers Panel to clipboard, so that they can be pasted in other QGIS instances.
... | gpl-3.0 | -2,783,662,690,106,625,000 | 44.587156 | 152 | 0.588448 | false | 4.370273 | false | false | false |
HazardSJ/HazardBot | enwiki/afd_relisted_cat_remover.py | 1 | 2150 | import re
import pywikibot
pywikibot.config.family = "wikipedia"
pywikibot.config.mylang = "en"
site = pywikibot.Site()
site.login()
class AFDRelistedCatRemover(object):
"""Removes closed from relisted AfD categories"""
def __init__(self):
self.categories = [
pywikibot.Category(site, "... | mit | 9,115,213,321,937,454,000 | 29.714286 | 119 | 0.528837 | false | 4.325956 | false | false | false |
kaeawc/django-auth-example | test/controllers/user/test_profile.py | 1 | 1382 | # -*- coding: utf-8 -*
from test.account import Account
from test.account import AccountTestCase
class GetUserProfileSpec(AccountTestCase):
def test_success(self):
"""
A user should be able to get a profile with valid credentials
"""
email = Account.create_email()
passwor... | mit | -5,176,994,730,170,144,000 | 29.733333 | 83 | 0.664255 | false | 4.606667 | true | false | false |
HiddenData/django-parler | parler/templatetags/parler_tags.py | 1 | 7519 | import inspect
from django.core.urlresolvers import resolve, reverse, Resolver404
from django.template import Node, Library, TemplateSyntaxError
from django.utils.translation import get_language
from django.utils import six
from parler.models import TranslatableModel, TranslationDoesNotExist
from parler.utils.context i... | apache-2.0 | -1,220,666,122,938,297,900 | 43.755952 | 201 | 0.650618 | false | 4.313827 | false | false | false |
JMMolenaar/cadnano2.5 | cadnano/gui/controllers/documentcontroller.py | 1 | 30136 | import os
import sys
from cadnano import app, setReopen, setBatch
from cadnano.fileio.nnodecode import decode, decodeFile
from cadnano.fileio.encoder import encode
from cadnano.gui.views.documentwindow import DocumentWindow
from cadnano.gui.ui.dialogs.ui_about import Ui_About
from cadnano.gui.views import styles
imp... | mit | 7,849,018,739,122,012,000 | 37.98577 | 177 | 0.603 | false | 4.246301 | false | false | false |
Axelrod-Python/axelrod-evolver | tests/integration/test_population_sizes.py | 1 | 2559 | import tempfile
import unittest
import axelrod as axl
import axelrod_dojo as axl_dojo
class TestPopulationSizes(unittest.TestCase):
def test_basic_pop_size(self):
# Set up Tmp file
temp_file = tempfile.NamedTemporaryFile()
# we will set the objective to be
cycler_objective = axl_... | mit | -7,320,343,215,414,218,000 | 36.086957 | 92 | 0.545526 | false | 4.497364 | true | false | false |
zrhans/python | exemplos/Examples.lnk/bokeh/glyphs/sprint.py | 1 | 4385 | from __future__ import print_function
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.browserlib import view
from bokeh.resources import INLINE
from bokeh.models.glyphs import Circle, Text
from bokeh.models import ColumnDataSource, Range1d, DataRange1d, Plot, LinearAxis, SingleInterval... | gpl-2.0 | -8,231,620,859,429,287,000 | 37.80531 | 132 | 0.679361 | false | 2.695144 | false | false | false |
wellfire/hepdata-matchinggifts | setup.py | 1 | 1718 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload')
sys.exit()
with open("... | gpl-2.0 | 6,160,371,015,012,609,000 | 26.709677 | 66 | 0.591967 | false | 3.655319 | false | false | false |
GunnerJnr/_CodeInstitute | Stream-3/Full-Stack-Development/9.Django-Blog-Part-Five/1.Adding-Images-To-A-Post/Blog_prj/Blog_app/models.py | 1 | 1569 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from django.template.defaultfilters import slugify
# Create your models here.
class Post(models.Model):
"""
Here we'll define our Post model
"""
# author is linked to a regis... | mit | -2,301,413,656,304,438,000 | 35.488372 | 89 | 0.674952 | false | 3.855037 | false | false | false |
dongjoon-hyun/tools | collector/ted.py | 1 | 4466 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# 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 agr... | apache-2.0 | -3,571,654,614,636,652,000 | 33.620155 | 107 | 0.549933 | false | 3.743504 | false | false | false |
gzamboni/sdnResilience | loxi/of11/instruction.py | 1 | 10743 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
# See the file LICENSE.pyloxi which should have been included in the source distribution
# Automatically generated by LOXI from ... | gpl-2.0 | -9,002,718,958,986,910,000 | 27.801609 | 88 | 0.536349 | false | 3.812278 | false | false | false |
ivanamihalek/data_management | tests_and_hacks/dropbox_test.py | 1 | 4084 | #!/usr/bin/python
import contextlib
import datetime
import os
import sys
from time import time, gmtime
import unicodedata
import dropbox
#from dropbox.files import FileMetadata, FolderMetadata
####################################
def upload(dbx, fullname, folder, subfolder, name, overwrite=False):
"""Upload a f... | gpl-3.0 | -8,857,571,880,684,488,000 | 36.136364 | 106 | 0.600637 | false | 3.591909 | false | false | false |
0x07Ltd/django-condition-chain | settings/dev_south.py | 1 | 2886 | """
Django settings for Django Condition Chain project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
""... | unlicense | -2,016,599,049,804,123,600 | 25.477064 | 76 | 0.698198 | false | 3.477108 | false | false | false |
jandecaluwe/ca | myhdl/calc_next_age/tb.py | 1 | 1332 | from random import randrange
from myhdl import *
vectors = tuple([randrange(0, 9) for i in range(1000)])
from calc_next_age import calc_next_age
def tb():
age_out = Signal(bool(0))
live_count = Signal(intbv(0, min=0, max=9))
step = Signal(bool(0))
clock = Signal(bool(0))
reset =... | mit | 3,440,448,091,142,341,600 | 23.218182 | 64 | 0.517267 | false | 3.639344 | false | false | false |
alancutter/web-animations-perf-bot | common_args.py | 1 | 2682 | # 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 a... | apache-2.0 | 4,329,061,355,499,458,000 | 29.827586 | 160 | 0.712155 | false | 3.761571 | false | false | false |
aptgraph/aptgraph-python | pyaptgraph/pyaptgraph.py | 1 | 2068 | import json
from urllib2 import urlopen, HTTPError
class PyAptgraph(object):
def __init__(self, apiKey, debug=False):
'''
Connect to the Aptgraph API
@param string $apikey Your Aptgraph apikey
@param boolean $debug Turn on/off debugging messages
'''
self.apiKey = ... | mit | 315,635,748,071,512,960 | 28.542857 | 69 | 0.573985 | false | 4.299376 | false | false | false |
PaddlePaddle/models | dygraph/similarity_net/nets/losses/hinge_loss.py | 1 | 1549 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | -3,637,561,529,339,984,000 | 29.98 | 75 | 0.63654 | false | 4.033854 | false | false | false |
maxweisspoker/simplebitcoinfuncs | simplebitcoinfuncs/__init__.py | 1 | 2888 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
try:
from __builtin__ import bytes, str, open, super, range, zip, round, int, pow, object, input
except ImportError: pass
try:
from __builtin__ import raw_input as input
except: pass
from c... | mit | 6,413,897,269,713,879,000 | 47.1 | 207 | 0.76334 | false | 3.52381 | false | true | false |
nakamura-akifumi/ndl_search_harvester | ndl_search_xml2kjson.py | 1 | 10066 | import os.path
from lxml import etree
from datetime import *
import time
from elasticsearch import Elasticsearch
import glob
import json
import re
from urllib.parse import urlparse
import platform
import kassis_config
def json2es():
es = Elasticsearch()
es.indices.create(index='my-index', ignore=400)
es.in... | mit | 6,493,383,532,114,012,000 | 36.559701 | 119 | 0.435227 | false | 3.941269 | false | false | false |
impakho/PyProxy | server.py | 1 | 7402 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import socket
import threading
def isset(obj):
if obj == 0: return 0
return 1
def getMethod(header):
if 'CONNECT' in header[0:10]: return 1
return 0
def getHost(header):
rn = '\r\n'
kw = 'Host: '
if no... | mit | 6,333,505,266,663,583,000 | 29.460905 | 91 | 0.450014 | false | 4.089503 | false | false | false |
CassioAmador/profile_tcabr | visualization_tools/plot_prof3.py | 1 | 5976 | ARRUMAR
import Pmw
import Tkinter as tk
import matplotlib as mpl
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from os import chdir,listdir,path,getcwd
import read_signal as rs
class PlotWindow():
de... | mit | 3,925,428,603,610,781,700 | 33.953216 | 155 | 0.588353 | false | 3.334821 | false | false | false |
radicalbit/ambari | ambari-common/src/main/python/resource_management/core/providers/package/zypper.py | 1 | 9954 | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | apache-2.0 | 6,781,222,302,554,648,000 | 38.188976 | 147 | 0.659835 | false | 3.584444 | false | false | false |
weijia/clip_trans | docs/conf.py | 1 | 8469 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | bsd-3-clause | 4,289,514,529,717,521,400 | 29.8 | 76 | 0.705632 | false | 3.75732 | true | false | false |
BubuLK/sfepy | sfepy/terms/terms.py | 1 | 50040 | from __future__ import absolute_import
import re
from copy import copy
import numpy as nm
from sfepy.base.base import (as_float_or_complex, get_default, assert_,
Container, Struct, basestr, goptions)
from sfepy.base.compat import in1d
# Used for imports in term files.
from sfepy.terms.ex... | bsd-3-clause | 3,292,874,449,945,586,000 | 30.235955 | 80 | 0.498062 | false | 4.164794 | false | false | false |
vyouzhis/energy | epyalgo/pyAlgoMACD.py | 1 | 3572 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# home
#
#
# vim:fileencoding=utf-8:sw=4:et -*- coding: utf-8 -*-
#
# 测试 pyalgotrade 回测
#
import _index
from energy.libs.MongoStock import Feed
from energy.libs.eAlgoLib import eAlgoLib as eal
from pyalgotrade import strategy
from pyalgotrade import bar
from pyalgotrade.tec... | apache-2.0 | -5,943,910,787,479,727,000 | 32.28972 | 139 | 0.606962 | false | 3.428296 | false | false | false |
Ogreman/django-termsearch | setup.py | 1 | 1525 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import termsearch
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = termsearch.__version__
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
print("You probably wa... | bsd-3-clause | 1,652,145,105,580,968,400 | 26.745455 | 66 | 0.606557 | false | 3.8125 | false | false | false |
ponty/confduino | confduino/hwpackinstall.py | 1 | 1582 | from confduino.hwpacklist import hwpack_dir
from confduino.util import tmpdir, download, clean_dir
from entrypoint2 import entrypoint
from path import Path as path
from pyunpack import Archive
import logging
log = logging.getLogger(__name__)
def find_hwpack_dir(root):
"""search for hwpack dir under root."""
... | bsd-2-clause | 6,995,062,261,170,890,000 | 24.934426 | 61 | 0.627686 | false | 3.309623 | false | false | false |
DecipherOne/Troglodyte | Trog Build Dependencies/Python26/Lib/ctypes/test/test_pep3118.py | 1 | 7979 | import unittest
from ctypes import *
import re, struct, sys
if sys.byteorder == "little":
THIS_ENDIAN = "<"
OTHER_ENDIAN = ">"
else:
THIS_ENDIAN = ">"
OTHER_ENDIAN = "<"
class memoryview(object):
# This class creates a memoryview - like object from data returned
# by the private _ctypes._buffe... | mit | -3,965,634,519,125,117,000 | 36.815166 | 98 | 0.442411 | false | 4.132056 | true | false | false |
tomerfiliba/plumbum | plumbum/typed_env.py | 1 | 4944 | # -*- coding: utf-8 -*-
import inspect
import os
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
NO_DEFAULT = object()
# must not inherit from AttributeError, so not to mess with python's attribute-lookup flow
class EnvironmentVariableError(KeyErro... | mit | 804,424,250,104,359,600 | 27.090909 | 90 | 0.555623 | false | 4.214834 | false | false | false |
mwv/Term-Discovery-Evaluation | term-discovery-evaluation/corpus.py | 1 | 7265 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ------------------------------------
# file: corpus.py
# date: Wed February 26 21:29 2014
# author:
# Maarten Versteegh
# github.com/mwv
# maartenversteegh AT gmail DOT com
#
# Licensed under GPLv3
# ------------------------------------
"""corpus: interface functions to the ... | gpl-3.0 | -7,209,121,632,736,023,000 | 33.268868 | 78 | 0.49649 | false | 4.18732 | false | false | false |
sofianehaddad/gosa | tests/polynomial_qsa.py | 1 | 2066 | # -*- Python -*-
#
# @file polynomial_qsa.py
# @brief Validation of sensitivity evaluation for quantiles with the Polynomial model
#
# Copyright (C) 2017 Airbus-IMACS
#
# Written by Sofiane Haddad, haddad@imacs.polytechnique.fr
# Nabil Rachdi, nabil.rachdi@... | lgpl-3.0 | -2,314,937,719,259,113,500 | 35.245614 | 130 | 0.726041 | false | 3.321543 | false | false | false |
sam81/pysoundanalyser | setup.py | 1 | 2433 | #! /usr/bin/env python
from distutils.core import setup
setup(
version="0.2.41",
author="Samuele Carcagno",
author_email="sam.carcagno@google.com;",
description="Alpha Version of pysoundanalyser, a program for visualizing sounds ",
long_description=\
"""
Alpha Version of pysoundanalyser, a p... | gpl-3.0 | -3,591,694,968,007,235,000 | 47.66 | 95 | 0.497739 | false | 4.275923 | false | false | false |
uclouvain/osis | program_management/tests/ddd/factories/domain/program_tree/LDROI200M_DROI2M.py | 1 | 5123 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | -2,357,909,044,270,934,500 | 34.804196 | 105 | 0.550586 | false | 3.92638 | false | false | false |
Dhiru/gstudio | gnowsys-ndf/gnowsys_ndf/ndf/views/topics.py | 1 | 37319 | ''' -- imports from python libraries -- '''
# import os -- Keep such imports here
import json
''' -- imports from installed packages -- '''
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from django.http import HttpRespo... | agpl-3.0 | 6,580,081,560,925,266,000 | 46.17952 | 168 | 0.478764 | false | 4.305376 | false | false | false |
pedrolegold/uforge-cli | src/uforgecli/commands/usergrp/usergrp_user.py | 1 | 7301 |
__author__="UShareSoft"
from ussclicore.argumentParser import ArgumentParser, ArgumentParserError
from ussclicore.cmd import Cmd, CoreGlobal
from texttable import Texttable
from uforgecli.utils.org_utils import org_get
from ussclicore.utils import generics_utils, printer
from uforgecli.utils.uforgecli_utils import *
... | apache-2.0 | -121,964,161,889,345,520 | 51.913043 | 192 | 0.497055 | false | 5.014423 | false | false | false |
lizter/EIT_ORK | formulas.py | 1 | 1469 | from math import cos, sin, sqrt, radians, pi
g = 9.81
def air_pressure(wind_speed, window_width, window_height, wind_direction, window_angle, window_opening_angle, left_hinge):
v = wind_speed
b = window_width
h = window_height
theta = radians(270 - wind_direction + window_angle + 180 if left_hinge e... | apache-2.0 | -3,350,965,730,043,490,000 | 31.666667 | 128 | 0.647379 | false | 3.092632 | false | false | false |
jzitelli/poolvr | pool_table.py | 1 | 11254 | """
three.js/Cannon.js pool table definition
"""
from copy import deepcopy
import numpy as np
from three import *
INCH2METER = 0.0254
FT2METER = INCH2METER / 12
def pool_table(L_table=2.3368, W_table=None, H_table=0.77,
L_playable=None, W_playable=None,
ball_diameter=2.25*INCH2METER,... | mit | 3,356,710,787,776,119,000 | 48.359649 | 121 | 0.528168 | false | 3.310974 | false | false | false |
thgcode/soundrts | soundrts/serverclient.py | 1 | 9004 | import asynchat
import re
import string
import sys
import time
from lib.log import debug, info, warning, exception
from lib.msgs import insert_silences, encode_msg
import res
from serverroom import Anonymous, InTheLobby, OrganizingAGame, WaitingForTheGameToStart, Game
class ConnectionToClient(asynchat.async_chat):
... | bsd-3-clause | 4,041,552,617,449,451,500 | 31.272401 | 93 | 0.560751 | false | 3.679608 | false | false | false |
Svolcano/python_exercise | dianhua/worker/crawler/unicom/date.py | 1 | 1724 | # -*- coding: utf-8 -*-
import datetime
DATE_DICT = {'1':('01-01', '01-31'),
'2-1':('02-01', '02-28'),
'2-2':('02-01', '02-29'),
'3':('03-01', '03-31'),
'4':('04-01', '04-30'),
'5':('05-01', '05-31'),
'6':('06-01', '06-30'),
'7... | mit | 5,921,346,665,807,874,000 | 30.345455 | 78 | 0.437355 | false | 3.240602 | false | false | false |
numeristical/introspective | docs/conf.py | 1 | 10191 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ML Insights documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 9 13:32:07 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
... | mit | -4,084,634,108,976,235,000 | 27.951705 | 80 | 0.692376 | false | 3.553347 | true | false | false |
ItsCalebJones/SpaceLaunchNow-Server | api/v300/serializers.py | 1 | 10556 | from rest_framework.relations import HyperlinkedRelatedField
from drf_queryfields import QueryFieldsMixin
from api.models import *
from rest_framework import serializers
from api.utils.custom_serializers import TimeStampField
class AgencySerializer(QueryFieldsMixin, serializers.HyperlinkedModelSerializer):
typ... | apache-2.0 | -682,478,685,765,358,500 | 42.80083 | 117 | 0.653278 | false | 3.701262 | true | false | false |
kgilmo/penning_artiq | artiq/gui/state.py | 1 | 2502 | import asyncio
from collections import OrderedDict
import logging
from artiq.tools import TaskObject
from artiq.protocols import pyon
logger = logging.getLogger(__name__)
# support Qt CamelCase naming scheme for save/restore state
def _save_state(obj):
method = getattr(obj, "save_state", None)
if method is... | gpl-3.0 | -2,374,052,132,486,960,000 | 31.076923 | 77 | 0.567146 | false | 4.358885 | false | false | false |
googleapis/python-kms | samples/snippets/iam_remove_member.py | 1 | 2168 | # 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 agreed to in writing, s... | apache-2.0 | -5,256,517,923,785,935,000 | 34.540984 | 88 | 0.672509 | false | 3.687075 | false | false | false |
google/llvm-premerge-checks | scripts/pipeline_main.py | 1 | 1892 | #!/usr/bin/env python3
# Copyright 2020 Google LLC
#
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law ... | apache-2.0 | 8,349,910,997,647,970,000 | 38.416667 | 125 | 0.696089 | false | 3.503704 | false | false | false |
JohnGriffiths/ConWhAt | conwhat/utils/image.py | 1 | 2902 |
import nibabel as nib
import numpy as np
from numpy import pi,sin,cos
from nipy.labs.spatial_models.discrete_domain import grid_domain_from_image
from scipy.spatial import cKDTree
from scipy import ndimage
from scipy.ndimage.morphology import binary_dilation
from scipy.ndimage import binary_fill_holes
def ellip... | bsd-3-clause | -2,670,668,860,836,767,000 | 28.02 | 90 | 0.538249 | false | 3.168122 | false | false | false |
vincent-noel/libSigNetSim | libsignetsim/model/sbml/Event.py | 1 | 10156 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br)
#
# This file is part of libSigNetSim.
#
# libSigNetSim 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 Fou... | gpl-3.0 | 5,140,891,710,092,126,000 | 28.612245 | 128 | 0.749508 | false | 3.170777 | false | false | false |
azraq27/padre | padre/matching.py | 1 | 6523 | '''uses methods from the ``gini`` library for flexible matching'''
from gini.semantics import Bottle,Concept
from gini import logic
import padre as p
import neural as nl
import copy
bottle = Bottle()
p.subjects()
bottle.vocab = [
# Direct objects
Concept('atlas_do', ['atlases','templates']),
Concept('subj... | gpl-2.0 | -7,026,389,746,121,759,000 | 41.633987 | 181 | 0.621187 | false | 4.064174 | false | false | false |
srusskih/SublimeBicycleRepair | bike/parsing/fastparserast.py | 1 | 9697 | from __future__ import generators
from parserutils import generateLogicalLines, maskStringsAndComments, maskStringsAndRemoveComments
import re
import os
import compiler
from bike.transformer.save import resetOutputQueue
TABWIDTH = 4
classNameRE = re.compile("^\s*class\s+(\w+)")
fnNameRE = re.compile("^\s*def\s+(\w+)"... | mit | -2,268,760,539,575,058,000 | 28.654434 | 98 | 0.615757 | false | 3.961193 | false | false | false |
madmax983/h2o-3 | h2o-py/h2o/transforms/preprocessing.py | 1 | 5987 | from .transform_base import H2OTransformer
import warnings
from ..assembly import H2OCol
class H2OScaler(H2OTransformer):
"""
Standardize an H2OFrame by demeaning and scaling each column.
The default scaling will result in an H2OFrame with columns
having zero mean and unit variance. Users may specify the
c... | apache-2.0 | 4,007,664,278,434,533,400 | 36.654088 | 120 | 0.648739 | false | 3.45271 | false | false | false |
metabolite-atlas/metatlas | docs/tools/build_modref_templates.py | 2 | 1868 | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os, sys
# local imports
from apigen import ApiDocWriter
# version comparison
from distutils.version import LooseVersion as V
#*****************************************************************************
def abort(error):
... | bsd-3-clause | 8,446,329,203,060,879,000 | 31.206897 | 79 | 0.59743 | false | 4.490385 | false | false | false |
scwuaptx/CTF | 2016-writeup/hitb-gsec/hashbash.py | 1 | 1169 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwnpwnpwn import *
from pwn import *
#host = "10.211.55.28"
#port = 8888
host = "54.179.187.55"
port = 2301
r = remote(host,port)
def add(data):
r.recvuntil(":")
r.sendline("add")
r.recvuntil(":")
r.sendline(data)
for i in range(9):
add("61"*16... | gpl-2.0 | 6,141,928,770,232,406,000 | 20.254545 | 79 | 0.612489 | false | 2.40535 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.