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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sunhwan/NAMD-replica | wham/myptwham_pt_grand.py | 1 | 10158 | from StringIO import StringIO
import sys, os
import numpy as np
os.environ["CC"] = "gcc-4.9"
os.environ["CXX"] = "g++-4.9"
debug = False
n_max = False
if len(sys.argv) > 1: n_max = int(sys.argv[1])
input = sys.stdin
pmf_filename = input.readline().strip() # stores pmf
rho_filename = input.readline().strip() # stores... | bsd-2-clause | 4,400,316,292,958,923,300 | 37.332075 | 340 | 0.511616 | false | 2.680211 | false | false | false |
zackzachariah/feelslike | weather.py | 1 | 1194 | # Created 2014 by Zack Sheppard. Licensed under the MIT License (see LICENSE file)
"""
Main handlers for the two pages that make up the clear-weather app
"""
from flask import Flask, request, url_for
import api_endpoint, os, web_endpoints
app = Flask(__name__)
if (not app.debug):
import logging
from logging im... | mit | -6,699,916,966,404,352,000 | 29.615385 | 82 | 0.742044 | false | 3.218329 | false | false | false |
valmynd/MediaFetcher | src/plugins/youtube_dl/youtube_dl/downloader/common.py | 1 | 12568 | from __future__ import division, unicode_literals
import os
import re
import sys
import time
import random
from ..compat import compat_os_name
from ..utils import (
decodeArgument,
encodeFilename,
error_to_compat_str,
format_bytes,
shell_quote,
timeconvert,
)
class FileDownloader(object):
"""File Downloader ... | gpl-3.0 | 557,000,624,049,092,600 | 31.308483 | 105 | 0.667489 | false | 3.151454 | false | false | false |
drvinceknight/Nashpy | tests/unit/test_replicator_dynamics.py | 1 | 62289 | """
Tests for Replicator Dynamics
"""
import numpy as np
import pytest
from hypothesis import given, settings
from hypothesis.strategies import integers
from hypothesis.extra.numpy import arrays
from nashpy.learning.replicator_dynamics import (
get_derivative_of_fitness,
replicator_dynamics,
get_derivative... | mit | 8,769,032,210,956,131,000 | 47.587363 | 84 | 0.561769 | false | 2.281732 | true | false | false |
scaramallion/pynetdicom | pynetdicom/apps/storescu/storescu.py | 1 | 9028 | #!/usr/bin/env python
"""A Storage SCU application.
Used for transferring DICOM SOP Instances to a Storage SCP.
"""
import argparse
import os
from pathlib import Path
import sys
from pydicom import dcmread
from pydicom.errors import InvalidDicomError
from pydicom.uid import (
ExplicitVRLittleEndian, ImplicitVRLi... | mit | 6,390,212,979,904,259,000 | 29.093333 | 78 | 0.588835 | false | 3.876342 | false | false | false |
nave91/teak-nbtree | src/rank.py | 1 | 4248 | from lib import *
import re
from globfilerank import *
def obs(f,alli):
now = alli
line = f.readline()
while(line):
lst = line.split()
for i in lst:
isitnum = re.match('^([^0-9]|\.)',i)
if isitnum:
now = i
else:
v = float(i... | gpl-2.0 | -2,870,331,426,623,933,000 | 23.988235 | 66 | 0.476695 | false | 2.776471 | false | false | false |
cobbler/cobbler | tests/xmlrpcapi/image_test.py | 1 | 2527 | import pytest
# TODO: Create fixture where image is create
@pytest.fixture(scope="function")
def remove_item(remote, token):
"""
Remove an item with the given name.
:param token: The fixture to have the token for authenticated strings available.
:param remote: The fixture to have the base xmlrpc con... | gpl-2.0 | -5,530,098,281,154,148,000 | 20.973913 | 84 | 0.557974 | false | 4.108943 | true | false | false |
pmatigakis/Huginn | huginn/instruments.py | 1 | 6186 | """
The hugin.instruments module contains classes that simulate the aircraft's
instruments
"""
import math
from math import sqrt, log
from huginn.fdm import Position, Velocities, Atmosphere, Orientation
from huginn.constants import a0, T0, g, M, R
from huginn.unit_conversions import convert_jsbsim_pressure, ur
def t... | bsd-3-clause | 6,210,240,152,551,229,000 | 27.506912 | 75 | 0.642903 | false | 3.985825 | false | false | false |
satishgoda/programmingusingpython | sandbox/rhomStub/randd/uv_master.py | 1 | 6009 | import bpy
# Get a handle to the active object
object = bpy.context.active_object
# If the object is in edit mode, come out of it
if object.mode == 'EDIT':
bpy.ops.object.mode_set(mode='OBJECT', toggle=True)
# Get a handle to the active object's mesh data
bmesh = object.data
####################################... | gpl-2.0 | 9,153,331,899,270,852,000 | 39.601351 | 130 | 0.59128 | false | 3.942913 | false | false | false |
rbauction/sfdclib | sfdclib/metadata.py | 1 | 10823 | """ Class to work with Salesforce Metadata API """
from base64 import b64encode, b64decode
from xml.etree import ElementTree as ET
import sfdclib.messages as msg
class SfdcMetadataApi:
""" Class to work with Salesforce Metadata API """
_METADATA_API_BASE_URI = "/services/Soap/m/{version}"
_XML_NAMESPACES... | mit | -2,345,350,160,945,566,700 | 42.119522 | 100 | 0.588931 | false | 3.990782 | true | false | false |
bema-ligo/pycbc | pycbc/inference/sampler.py | 1 | 1386 | # Copyright (C) 2016 Christopher M. Biwer
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distribut... | gpl-3.0 | 3,212,687,464,336,453,600 | 36.459459 | 79 | 0.664502 | false | 4.291022 | false | false | false |
handcraftsman/GeneticAlgorithmsWithPython | es/ch03/genetic.py | 1 | 3034 | # File: genetic.py
# Del capítulo 3 de _Algoritmos Genéticos con Python_
#
# Author: Clinton Sheppard <fluentcoder@gmail.com>
# Copyright (c) 2017 Clinton Sheppard
#
# 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... | apache-2.0 | 243,886,378,590,808,930 | 30.684211 | 79 | 0.652492 | false | 3.013013 | false | false | false |
basilhskk/ergasies | ergasia8.py | 1 | 1425 | #imports
import tweepy
from tweepy import OAuthHandler
#keys
ckey='...'
csecret='...'
atoken='...'
asecret='...'
#error handling twitter let me draw only 5000 ids at a time
try:
auth = OAuthHandler(ckey, csecret)
auth.set_access_token(atoken, asecret)
api = tweepy.API(auth, wait_on_rate_limit=True, wait_o... | gpl-3.0 | -8,160,394,223,410,080,000 | 29.978261 | 101 | 0.669474 | false | 2.896341 | false | false | false |
jimzhan/pyx | rex/core/fs.py | 1 | 4479 | # -*- coding: utf-8 -*-
"""
Functions that interact with local file system.
"""
from __future__ import with_statement
import os
import shutil
import logging
import itertools
from rex.core import regex
logger = logging.getLogger(__name__)
#============================================================================... | apache-2.0 | -6,516,505,945,339,783,000 | 21.852041 | 96 | 0.546997 | false | 4.335915 | false | false | false |
chengsoonong/acton | acton/proto/wrappers.py | 1 | 16442 | """Classes that wrap protobufs."""
import json
from typing import Union, List, Iterable
import acton.database
import acton.proto.acton_pb2 as acton_pb
import acton.proto.io
import google.protobuf.json_format as json_format
import numpy
import sklearn.preprocessing
from sklearn.preprocessing import LabelEncoder as SKL... | bsd-3-clause | -1,972,909,586,038,859,800 | 27.202401 | 79 | 0.562827 | false | 4.518274 | false | false | false |
miracle2k/flask-assets | tests/helpers.py | 1 | 1105 | from flask.app import Flask
from webassets.test import TempEnvironmentHelper as BaseTempEnvironmentHelper
from flask_assets import Environment
try:
from flask import Blueprint
Module = None
except ImportError:
# Blueprints only available starting with 0.7,
# fall back to old Modules otherwise.
Blue... | bsd-2-clause | 1,334,822,051,698,322,400 | 28.078947 | 77 | 0.694118 | false | 4.316406 | false | false | false |
numericube/twistranet | twistranet/twistapp/models/twistable.py | 1 | 31887 | """
Base of the securable (ie. directly accessible through the web), translatable and full-featured TN object.
A twist-able object in TN is an object which can be accessed safely from a view.
Normally, everything a view manipulates must be taken from a TN object.
Content, Accounts, MenuItems, ... are all Twistable ob... | agpl-3.0 | 8,492,852,835,539,124,000 | 43.911268 | 151 | 0.581365 | false | 4.452248 | false | false | false |
beagles/neutron_hacking | neutron/tests/unit/bigswitch/test_restproxy_plugin.py | 1 | 13331 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Big Switch Networks, 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/lice... | apache-2.0 | -6,112,451,128,211,050,000 | 41.864952 | 79 | 0.57295 | false | 4.131081 | true | false | false |
rob-hills/Booktype | lib/booktype/apps/edit/tasks.py | 1 | 2110 | import json
import celery
import urllib2
import httplib
import sputnik
from booki.editor import models
def fetch_url(url, data):
try:
data_json = json.dumps(data)
except TypeError:
return None
req = urllib2.Request(url, data_json)
req.add_header('Content-Type', 'application/json')
... | agpl-3.0 | 1,521,317,830,055,630,300 | 23.264368 | 88 | 0.536019 | false | 3.644214 | false | false | false |
giacomov/fermi_blind_search | fermi_blind_search/database.py | 1 | 14427 | #!/usr/bin/env python
from contextlib import contextmanager
import argparse
import sys
import sshtunnel
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from fermi_blind_search.configuration import get_config
from fermi_blind_search import myLoggi... | bsd-3-clause | 5,104,153,105,042,348,000 | 36.375648 | 121 | 0.563249 | false | 4.606322 | true | false | false |
saisai/algorithms_by_other | splinte-interplation/spline-interpolation.py | 1 | 2896 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def niceCubicPolynomial(p):
tmp = ""
if p["a"] == 1:
tmp += " x^3"
elif p["a"] != 0:
tmp += "%.2fx^3" % p["a"]
if p["b"] == 1:
tmp += "\t+ x^2"
elif p["b"] != 0:
tmp += "\t+ %.2fx^2" % p["b"]
else:
tmp += "\t\... | mit | -5,942,451,878,458,563,000 | 27.96 | 66 | 0.397099 | false | 2.362153 | false | false | false |
Edeleon4/PoolShark | scripts/hist.py | 1 | 2214 | import cv2
import numpy as np
frame = cv2.imread('/mnt/c/Users/T-HUNTEL/Desktop/hackathon/table3.jpg')
h,w,c = frame.shape
print frame.shape
# Convert BGR to HSV
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
BORDER_COLOR = 0
def flood_fill(image, x, y, value):
count = 1
points = [(x, y)]
"Flood fill on a... | mit | -4,887,612,138,901,576,000 | 25.357143 | 80 | 0.604788 | false | 2.777917 | false | false | false |
arypbatista/gobspy | gobspyide/common/position.py | 1 | 4075 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2017 Ary Pablo Batista <arypbatista@gmail.com>, Pablo Barenbaum <foones@gmail.com>
#
# 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... | gpl-3.0 | 1,046,354,306,264,107,000 | 33.82906 | 103 | 0.637301 | false | 3.313008 | false | false | false |
nistats/nistats | nistats/design_matrix.py | 1 | 17077 | """
This module implements fMRI Design Matrix creation.
Design matrices are represented by Pandas DataFrames
Computations of the different parts of the design matrix are confined
to the make_first_level_design_matrix function, that create a DataFrame
All the others are ancillary functions.
Design matrices contain thr... | bsd-3-clause | -7,965,344,307,184,148,000 | 35.963203 | 79 | 0.624758 | false | 4.033302 | false | false | false |
angr/cle | cle/backends/cgc/cgc.py | 1 | 1352 | from ...address_translator import AT
from .. import register_backend
from ..elf import ELF
from ...patched_stream import PatchedStream
ELF_HEADER = bytes.fromhex("7f454c46010101000000000000000000")
CGC_HEADER = bytes.fromhex("7f43474301010143014d6572696e6f00")
class CGC(ELF):
"""
Backend to support the CGC e... | bsd-2-clause | -3,029,612,784,850,716,000 | 32.8 | 94 | 0.664201 | false | 3.414141 | false | false | false |
crateio/crate.web | crate/web/search/indexes.py | 1 | 2307 | from django.db.models import signals
from celery_haystack.indexes import CelerySearchIndex as BaseCelerySearchIndex
from crate.web.packages.models import Package, Release, ReleaseFile
class PackageCelerySearchIndex(BaseCelerySearchIndex):
# We override the built-in _setup_* methods to connect the enqueuing
... | bsd-2-clause | 6,856,013,931,906,348,000 | 43.365385 | 96 | 0.714781 | false | 3.890388 | false | false | false |
makinacorpus/reportlab-ecomobile | src/reportlab/platypus/paraparser.py | 1 | 37402 | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/paraparser.py
__version__=''' $Id$ '''
__doc__='''The parser used to process markup within paragraphs'''
import string
import re
from types im... | bsd-3-clause | 6,241,397,755,660,166,000 | 34.284906 | 135 | 0.557778 | false | 3.475699 | false | false | false |
romulojales/to-be-musician | to_be_a_musician/songs/migrations/0005_remove_duplicate_slugs.py | 1 | 7856 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Don't use "from appname.models import ModelName".
# Use orm.... | apache-2.0 | -7,906,301,131,644,745,000 | 69.142857 | 208 | 0.53055 | false | 3.739172 | false | false | false |
dontnod/weblate | weblate/trans/migrations/0021_auto_20190321_1004.py | 1 | 3976 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-03-21 10:04
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("trans", "0020_auto_20190321_0921")]
operations = [
mig... | gpl-3.0 | -1,935,226,728,235,325,400 | 36.158879 | 62 | 0.429326 | false | 5.026549 | false | false | false |
lukerosiak/inspectors-general | inspectors/treasury.py | 2 | 15149 | #!/usr/bin/env python
import datetime
import logging
import os
import re
from urllib.parse import urljoin, unquote
from utils import utils, inspector, admin
# https://www.treasury.gov/about/organizational-structure/ig/Pages/audit_reports_index.aspx
archive = 2005
# options:
# standard since/year options for a yea... | cc0-1.0 | 3,522,391,499,883,024,000 | 37.255051 | 204 | 0.676678 | false | 3.169247 | false | false | false |
Igglyboo/Project-Euler | 1-99/30-39/Problem35.py | 1 | 1086 | from time import clock
def timer(function):
def wrapper(*args, **kwargs):
start = clock()
print(function(*args, **kwargs))
print("Solution took: %f seconds." % (clock() - start))
return wrapper
@timer
def find_answer():
total = 0
primes = sieve(1000000)
primes.remove(0)
... | unlicense | 2,629,917,463,131,232,000 | 20.294118 | 63 | 0.503683 | false | 3.372671 | false | false | false |
karstenw/nodebox-pyobjc | examples/Extended Application/sklearn/examples/ensemble/plot_ensemble_oob.py | 1 | 4073 | """
=============================
OOB Errors for Random Forests
=============================
The ``RandomForestClassifier`` is trained using *bootstrap aggregation*, where
each new tree is fit from a bootstrap sample of the training observations
:math:`z_i = (x_i, y_i)`. The *out-of-bag* (OOB) error is the average er... | mit | 7,607,601,848,409,383,000 | 32.385246 | 82 | 0.64056 | false | 3.569676 | false | false | false |
ruofengchen/mc-hawking | rap_gen.py | 1 | 6438 | import subprocess
from numpy import *
from scipy import *
import wave
import scipy.io.wavfile
import scipy.signal
import random
import pylab
import pdb
'''By Ruofeng Chen, April 2013'''
voices = ["Albert", "Bad News", "Bahh", "Bells", "Boing", "Bubbles", "Cellos", "Deranged", "Good News", "Hysterical", "Pipe Organ", ... | gpl-2.0 | 5,563,728,229,412,827,000 | 34.373626 | 164 | 0.540385 | false | 2.82989 | false | false | false |
Hackplayers/Empire-mod-Hackplayers | lib/stagers/windows/starfighters_xsl.py | 1 | 61839 | from lib.common import helpers
from termcolor import colored
class Stager:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'XSL Launcher StarFighter',
'Author': ['@CyberVaca'],
'Description': ('Generates a .xsl launcher for Empire.'),
'Com... | bsd-3-clause | -4,492,481,551,449,662,500 | 82.566216 | 209 | 0.755138 | false | 2.072769 | false | false | false |
grlee77/numpy | numpy/f2py/crackfortran.py | 1 | 130739 | #!/usr/bin/env python3
"""
crackfortran --- read fortran (77,90) code and extract declaration information.
Copyright 1999-2004 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESS... | bsd-3-clause | 7,846,563,131,492,437,000 | 37.362383 | 207 | 0.469806 | false | 3.83073 | false | false | false |
guozengxin/myleetcode | python/wordSearchII.py | 1 | 2827 | # https://leetcode.com/problems/word-search-ii/
class Solution(object):
def findWords(self, board, words):
"""
:type board: List[List[str]]
:type words: List[str]
:rtype: List[str]
"""
trie = Trie()
for w in words:
trie.insert(w)
res = set... | mit | 7,831,944,678,315,443,000 | 24.25 | 70 | 0.474708 | false | 3.638353 | false | false | false |
Leopardob/Kistie | kcode/kcore/KstMaya.py | 1 | 28693 | '''
K.I.S.T.I.E (Keep, It, Simple, Take, It, Easy)
Created on 1 Jan 2013
@author: Leonardo Bruni, leo.b2003@gmail.com
Kistie Maya Module Library
This Kistie implementation i's part of project 'Kistie_Autorig' by Leonardo Bruni, leo.b2003@gmail.com
'''
#ToDo: implement a debug mode for print or not
import pymel as pm ... | bsd-3-clause | -8,954,775,622,513,176,000 | 34.689055 | 303 | 0.545569 | false | 4.001813 | false | false | false |
xiangke/pycopia | mibs/pycopia/mibs/CISCO_VOICE_IF_MIB.py | 1 | 6172 | # python
# This file is generated by a program (mib2py). Any edits will be lost.
from pycopia.aid import Enum
import pycopia.SMI.Basetypes
Range = pycopia.SMI.Basetypes.Range
Ranges = pycopia.SMI.Basetypes.Ranges
from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N... | lgpl-2.1 | -397,005,942,782,059,600 | 33.870056 | 607 | 0.733798 | false | 2.627501 | false | false | false |
atilag/qiskit-sdk-py | qiskit/qasm/_node/_unaryoperator.py | 1 | 1662 | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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 | 6,572,356,457,025,158,000 | 28.678571 | 79 | 0.619134 | false | 4.373684 | false | false | false |
hardikvasa/google-images-download | google_images_download/google_images_download.py | 1 | 52513 | #!/usr/bin/env python
# In[ ]:
# coding: utf-8
###### Searching and Downloading Google Images to the local disk ######
# Import Libraries
import sys
version = (3, 0)
cur_version = sys.version_info
if cur_version >= version: # If the Current Version of Python is 3.0 or above
import urllib.request
from urllib... | mit | -2,625,954,641,360,469,500 | 50.941642 | 622 | 0.552625 | false | 4.112538 | false | false | false |
itoijala/pyfeyner | pyfeyner/deco.py | 1 | 12057 | #
# pyfeyner - a simple Python interface for making Feynman diagrams.
# Copyright (C) 2005-2010 Andy Buckley, Georg von Hippel
# Copyright (C) 2013 Ismo Toijala
#
# pyfeyner 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... | gpl-2.0 | 4,276,754,985,112,377,000 | 38.661184 | 99 | 0.565066 | false | 3.576683 | false | false | false |
tranthibaokhanh/thoughtloungev2 | lib/flask_marshmallow_local/fields.py | 1 | 4727 |
# -*- coding: utf-8 -*-
"""
flask_marshmallow.fields
~~~~~~~~~~~~~~~~~~~~~~~~
Custom, Flask-specific fields. See the following link for a list of all available
fields from the marshmallow library.
See http://marshmallow.readthedocs.org/en/latest/api_reference.html#module-marshmallow.fields
"""
im... | mit | 1,358,582,022,125,161,700 | 27.475904 | 97 | 0.57986 | false | 3.919569 | false | false | false |
AdaptivePELE/AdaptivePELE | AdaptivePELE/constants/constants.py | 1 | 7191 | from __future__ import absolute_import, division, print_function, unicode_literals
import os
import socket
machine = socket.getfqdn()
print("MACHINE", machine)
if "bsccv" in machine:
PELE_EXECUTABLE = "/data/EAPM/PELE/PELE++/bin/rev12360/Pele_rev12360_mpi"
DATA_FOLDER = "/data/EAPM/PELE/PELE++/data/rev12360/Da... | mit | -6,549,988,297,967,724,000 | 42.05988 | 129 | 0.522459 | false | 2.998749 | false | false | false |
ksu-mechatronics-research/deep-visual-odometry | models/hand_crafted/alexnet_inspired/alexNet_14q/alexnet14.py | 1 | 2703 | # The Model of DeepVO
from keras.layers import Input
from keras.layers.core import Dense, Dropout, Activation, Flatten, Lambda
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
from keras.models import Model
from keras.layers.advanced_activation... | mit | -4,285,629,334,953,081,000 | 32.37037 | 95 | 0.691454 | false | 3.580132 | false | false | false |
droodle/kansha | kansha/checklist/comp.py | 1 | 5840 | # --
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
# --
from nagare import component, database, security
import json
from kansha.title import comp as ... | bsd-3-clause | -5,212,961,767,522,489,000 | 29.103093 | 109 | 0.568151 | false | 3.880399 | false | false | false |
Tintri/tintri-api-examples | snapshot_vm.py | 1 | 5628 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2016 Tintri, Inc.
#
# 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 withou... | mit | -2,311,016,554,236,844,000 | 31.344828 | 107 | 0.663468 | false | 3.450644 | false | false | false |
flavour/eden | modules/s3/s3roles.py | 1 | 73907 | # -*- coding: utf-8 -*-
""" S3 User Roles Management
@copyright: 2018-2019 (c) Sahana Software Foundation
@license: MIT
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 withou... | mit | 2,148,195,638,398,239,000 | 34.396073 | 119 | 0.441798 | false | 4.9062 | false | false | false |
berrange/gerrymander | gerrymander/operations.py | 1 | 5420 | #
# Copyright (C) 2014 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | 132,657,920,464,158,480 | 31.071006 | 80 | 0.533948 | false | 4.185328 | false | false | false |
Hawaii-Smart-Energy-Project/Maui-Smart-Grid | setup.py | 1 | 4642 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for MSG Data Processing and Operations.
Additional file-based inclusions can be found in MANIFEST.in.
The distribution archive is created as a source distribution,
http://docs.python.org/2/distutils/sourcedist.html, using
python setup.py sdist
Inst... | bsd-3-clause | 7,457,005,088,255,912,000 | 43.951456 | 80 | 0.540605 | false | 4.050744 | false | false | false |
ctrevino/DIGITS | digits/dataset/images/classification/test_imageset_creator.py | 1 | 2642 | #!/usr/bin/env python
"""
Functions for creating temporary datasets
Used in test_views
"""
import os
import time
import argparse
from collections import defaultdict
import numpy as np
import PIL.Image
IMAGE_SIZE = 10
IMAGE_COUNT = 10 # per category
def create_classification_imageset(folder, image_size=None, imag... | bsd-3-clause | 678,515,116,100,906,200 | 25.686869 | 98 | 0.603331 | false | 3.731638 | false | false | false |
menghanY/LeetCode-Python | LinkedList/SwapNodesInPairs.py | 1 | 1237 | <<<<<<< HEAD
from ListNode import ListNode
class Solution(object):
def swapPairs(self, head):
if not head or not head.next :
return head
resNode = head.next
while head :
pre = head
head = head.next.next
=======
# https://leetcode.com/problems/swap-nodes-i... | mit | 8,618,302,866,557,902,000 | 19.278689 | 52 | 0.497171 | false | 3.484507 | false | false | false |
alexryndin/ambari | ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py | 1 | 23458 | #!/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 | 5,204,235,272,387,705,000 | 41.728597 | 262 | 0.665956 | false | 3.656742 | true | false | false |
jorisvandenbossche/ircelsos | ircelsos/tests/test_util.py | 1 | 1165 | # -*- coding: utf-8 -*-
from __future__ import print_function, division
import unittest
import pytest
from ircelsos.util import print_stations, print_pollutants
from ircelsos import metadata
def strip(s):
s = s.splitlines()
s = [line.strip() for line in s]
s = "\n".join(s)
return s
@pytest.mark.u... | bsd-2-clause | 5,899,053,136,330,087,000 | 26.738095 | 71 | 0.556223 | false | 3.25419 | true | false | false |
PhilipHomburg/ripe.atlas.sagan | ripe/atlas/sagan/http.py | 1 | 2943 | from .base import Result, ValidationMixin
class Response(ValidationMixin):
def __init__(self, data, **kwargs):
ValidationMixin.__init__(self, **kwargs)
self.raw_data = data
self.af = self.ensure("af", int)
self.body_size = self.ensure("... | gpl-3.0 | 4,170,459,175,948,925,000 | 29.978947 | 89 | 0.49983 | false | 3.982409 | false | false | false |
autosportlabs/RaceCapture_App | autosportlabs/racecapture/widgets/heat/heatgauge.py | 1 | 6048 | #
# Race Capture App
#
# Copyright (C) 2014-2017 Autosport Labs
#
# This file is part of the Race Capture App
#
# This 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 ... | gpl-3.0 | 8,670,585,709,165,813,000 | 30.831579 | 114 | 0.582837 | false | 3.64118 | false | false | false |
stencila/hub | manager/projects/ui/views/reviews.py | 1 | 1679 | from django.http import HttpRequest, HttpResponse
from django.shortcuts import render
from projects.api.serializers import ReviewUpdateSerializer
from projects.api.views.reviews import ProjectsReviewsViewSet
def list(request: HttpRequest, *args, **kwargs) -> HttpResponse:
"""
List reviews for a project.
... | apache-2.0 | -6,900,870,597,921,345,000 | 34.723404 | 86 | 0.69327 | false | 3.950588 | false | false | false |
mxmaslin/Test-tasks | tests_django/apps/playschool/migrations/0001_initial.py | 1 | 1954 | # Generated by Django 2.1.1 on 2018-09-29 17:59
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Record',... | gpl-3.0 | 5,469,782,674,536,385,000 | 38.877551 | 177 | 0.547083 | false | 4.211207 | false | false | false |
handsomegui/Gereqi | gereqi/Ui_about.py | 1 | 4402 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'about.ui'
#
# Created: Fri Sep 10 23:16:30 2010
# by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_About(object):
def setupUi(self, About):
... | gpl-3.0 | -5,543,503,231,855,172,000 | 72.35 | 335 | 0.696887 | false | 2.993878 | false | false | false |
nnugumanov/yandex-tank | yandextank/plugins/ShellExec/plugin.py | 1 | 2286 | '''
Contains shellexec plugin
'''
from ...common import util
from ...common.interfaces import AbstractPlugin
class Plugin(AbstractPlugin):
'''
ShellExec plugin
allows executing shell scripts before/after test
'''
SECTION = 'shellexec'
def __init__(self, core, config_section):
Abstract... | lgpl-2.1 | 941,401,629,749,793,200 | 27.936709 | 79 | 0.559055 | false | 4.031746 | true | false | false |
Jackeriss/Typora-Blog | app/util/time_util.py | 1 | 3493 | import functools
import logging
import time
from datetime import datetime
import pytz
from app.util.config_util import config
def str2datetime(value, default=None, time_format="%Y-%m-%d %H:%M:%S"):
try:
return datetime.strptime(value, time_format)
except Exception as exception:
logging.excep... | mit | 6,112,573,830,291,964,000 | 28.626087 | 88 | 0.57059 | false | 3.695228 | false | false | false |
SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/plugin.video.muchmovies.hd/default.py | 1 | 51620 | # -*- coding: utf-8 -*-
'''
Much Movies HD XBMC Addon
Copyright (C) 2014 lambda
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
(... | gpl-2.0 | -4,796,895,218,968,150,000 | 45.186472 | 868 | 0.534018 | false | 3.821722 | false | false | false |
kkummer/RixsToolBox | RTB_EnergyCalibration.py | 1 | 21352 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#/*##########################################################################
# Copyright (C) 2016 K. Kummer, A. Tamborino, European Synchrotron Radiation
# Facility
#
# This file is part of the ID32 RIXSToolBox developed at the ESRF by the ID32
# staff and the ESR... | mit | -7,016,220,558,226,067,000 | 40.281188 | 106 | 0.598258 | false | 4.24493 | false | false | false |
zedoul/AnomalyDetection | test_discretization/test_scikit_sc.py | 1 | 3101 | # -*- coding: utf-8 -*-
"""
http://www.astroml.org/sklearn_tutorial/dimensionality_reduction.html
"""
print (__doc__)
import numpy as np
import copy
from sklearn.cluster import KMeans
from sklearn.cluster import k_means
from sklearn.manifold import spectral_embedding
from sklearn.utils import check_random_state
impo... | mit | 1,723,285,607,583,526,000 | 28.254717 | 105 | 0.64979 | false | 3.411441 | false | false | false |
turdusmerula/kipartman | kipartman/dialogs/dialog_main.py | 1 | 3486 | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Dec 18 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
impor... | gpl-3.0 | -5,311,697,587,579,618,000 | 32.84466 | 177 | 0.647734 | false | 3.068662 | true | false | false |
ayazmaroof/Yscrape | yelpsite/yelpsite/settings.py | 1 | 2059 | """
Django settings for yelpsite project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | mit | 7,521,403,698,506,085,000 | 23.807229 | 71 | 0.728023 | false | 3.237421 | false | false | false |
Eric89GXL/vispy | examples/basics/scene/linear_region.py | 2 | 2298 | # -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Demonstration of InfiniteLine visual.
"""
import sys
import numpy as np
from vispy import app, scene
# vertex positions of data to draw
N = 200
pos = np.z... | bsd-3-clause | 8,837,949,601,075,203,000 | 29.64 | 73 | 0.563098 | false | 2.802439 | false | false | false |
jralls/gramps | gramps/plugins/export/exportgedcom.py | 1 | 59838 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008-2009 Gary Burton
# Copyright (C) 2008 Robert Cheramy <robert@cheramy.net>
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2010 Nick Ha... | gpl-2.0 | -1,091,929,293,636,996,400 | 37.137667 | 81 | 0.520455 | false | 3.604482 | false | false | false |
berserkerbernhard/Lidskjalv | code/networkmonitor/modules/misc/switchhandler.py | 1 | 6889 | from modules.lidskjalvloggingtools import loginfo
import telnetlib
import time
WAIT = 5
class SwitchHandler():
def __init__(self, u, p, e):
self.loginpasswords = [p]
self.loginusername = u
self.loginenable = e
self.logintries = 5
self.telnettimeout = 10
def get_swit... | gpl-3.0 | 8,448,278,225,030,082,000 | 32.935961 | 74 | 0.497169 | false | 3.378617 | false | false | false |
TerryHowe/ansible-modules-hashivault | ansible/modules/hashivault/hashivault_pki_cert_sign.py | 1 | 6865 | #!/usr/bin/env python
from ansible.module_utils.hashivault import hashivault_auth_client
from ansible.module_utils.hashivault import hashivault_argspec
from ansible.module_utils.hashivault import hashivault_init
from ansible.module_utils.hashivault import hashiwrapper
ANSIBLE_METADATA = {'status': ['preview'], 'suppor... | mit | -7,423,627,915,068,720,000 | 37.567416 | 120 | 0.606555 | false | 4.103407 | false | false | false |
justinvforvendetta/electrum-boli | plugins/plot.py | 1 | 3669 | from PyQt4.QtGui import *
from electrum_boli.plugins import BasePlugin, hook
from electrum_boli.i18n import _
import datetime
from electrum_boli.util import format_satoshis
from electrum_boli.bitcoin import COIN
try:
import matplotlib.pyplot as plt
import matplotlib.dates as md
from matplotlib.patches i... | gpl-3.0 | -4,475,255,244,508,078,600 | 28.119048 | 156 | 0.562551 | false | 3.806017 | false | false | false |
subash68/pyconvideo | src/pyconvideo/settings.py | 1 | 3180 | """
Django settings for pyconvideo project.
Generated by 'django-admin startproject' using Django 1.9.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os... | gpl-3.0 | -5,179,506,293,819,358,000 | 24.853659 | 91 | 0.688679 | false | 3.517699 | false | false | false |
xiang12835/python_web | py2_web2py/web2py/gluon/packages/dal/pydal/contrib/imap_adapter.py | 4 | 43046 | # -*- coding: utf-8 -*-
import datetime
import re
import sys
from .._globals import IDENTITY, GLOBAL_LOCKER
from .._compat import PY2, integer_types, basestring
from ..connection import ConnectionPool
from ..objects import Field, Query, Expression
from ..helpers.classes import SQLALL
from ..helpers.methods import use_... | apache-2.0 | 6,151,325,805,287,477,000 | 39.879392 | 120 | 0.519421 | false | 4.500366 | false | false | false |
joegomes/deepchem | deepchem/models/tf_new_models/graph_topology.py | 1 | 16190 | """Manages Placeholders for Graph convolution networks.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Han Altae-Tran and Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "MIT"
import numpy as np
imp... | mit | -5,590,897,651,264,117,000 | 31.773279 | 101 | 0.635207 | false | 3.732995 | false | false | false |
techbliss/Python_editor | 7.0/plugins/Code editor/pyeditor.py | 1 | 41135 | # Created by Storm Shadow www.techbliss.org
# Created by Storm Shadow www.techbliss.org
print "\n" #getting the box fit
print " ###################################################\n" \
" # Author Storm Shadow # \n" \
" # Hotkeys # \n" \
" ... | unlicense | -4,438,855,489,847,117,000 | 42.621421 | 338 | 0.644755 | false | 3.556545 | false | false | false |
dorneanu/crudappify | apps/orgapp/app/admin/views.py | 1 | 6660 | from flask import Blueprint
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext import admin
from flask.ext.admin.contrib import sqla
from flask.ext.admin import Admin, BaseView, expose
from flask.ext.admin.base import MenuLink
from flask.ext.admin.babel import gettext, ngettext, lazy_gettext
from flask.ext.admi... | mit | -3,902,489,461,993,599,500 | 31.487805 | 156 | 0.618018 | false | 3.661352 | false | false | false |
seppemans/businesstimedelta | businesstimedelta/businesstimedelta.py | 1 | 2641 | import datetime
import pytz
def localize_unlocalized_dt(dt):
"""Turn naive datetime objects into UTC.
Don't do anything if the datetime object is aware.
https://docs.python.org/3/library/datetime.html#datetime.timezone
"""
if dt.tzinfo is not None and dt.tzinfo.utcoffset(dt) is not None:
r... | mit | 6,038,156,290,826,573,000 | 31.207317 | 91 | 0.581598 | false | 4.294309 | false | false | false |
flypy/flypy | flypy/runtime/lowlevel_impls.py | 1 | 1431 | # -*- coding: utf-8 -*-
"""
Low-level implementations of opaque methods.
"""
from __future__ import print_function, division, absolute_import
import string
from flypy.compiler import opaque
from pykit import ir, types as ptypes
def add_impl(opaque_func, name, implementation, restype=None, restype_func=None):
"... | bsd-2-clause | 8,591,202,777,185,511,000 | 29.446809 | 81 | 0.665968 | false | 3.795756 | false | false | false |
dmitru/pines | pines/estimators.py | 1 | 4069 | # coding=utf-8
import numpy as np
from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin
from sklearn.utils import check_X_y, check_array
from sklearn.utils.validation import NotFittedError
from pines.tree_builders import TreeType, ProblemType
class DecisionTreeClassifier(BaseEstimator, ClassifierM... | mit | -3,523,422,632,452,845,000 | 35.00885 | 79 | 0.576554 | false | 3.958171 | false | false | false |
yeukhon/homework | computer-security/commitment/verifier.py | 1 | 1699 | #!/usr/bin/env python
import sys
import os
from Crypto import Random
from Crypto.Random import random as R
import cPickle as pcl
import hashlib as H
# # # paper-rock-scissors over a line # # #
# 1. wait for init message
# 2. wait for commitment to one of the values
# 3. send random choice in {paper,rock,scissors}
# 4.... | mpl-2.0 | -892,549,920,783,651,600 | 25.546875 | 67 | 0.664509 | false | 2.865093 | false | false | false |
i3visio/osrframework | osrframework/wrappers/reddit.py | 1 | 3889 | ################################################################################
#
# Copyright 2015-2020 Félix Brezo and Yaiza Rubio
#
# This program is part of OSRFramework. You can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Softwa... | agpl-3.0 | 4,466,890,473,808,879,000 | 37.88 | 82 | 0.523405 | false | 4.358744 | false | false | false |
influence-usa/python-opencivicdata-django | opencivicdata/models/base.py | 1 | 3359 | import re
import uuid
from django.db import models
from django.core.validators import RegexValidator
from jsonfield import JSONField
from uuidfield import UUIDField
from .. import common
class OCDIDField(models.CharField):
def __init__(self, *args, **kwargs):
self.ocd_type = kwargs.pop('ocd_type')
... | bsd-3-clause | -3,939,492,258,956,639,000 | 29.816514 | 98 | 0.6234 | false | 3.687157 | false | false | false |
prman-pixar/RenderManForBlender | rman_ui/rman_ui_light_handlers/__init__.py | 2 | 43288 | import bpy
import gpu
from gpu_extras.batch import batch_for_shader
from ...rfb_utils import transform_utils
from ...rman_constants import RMAN_AREA_LIGHT_TYPES
from .barn_light_filter_draw_helper import BarnLightFilterDrawHelper
from mathutils import Vector, Matrix
import mathutils
import math
_DRAW_HANDLER_ = None
_... | mit | 8,597,294,281,433,653,000 | 30.923304 | 186 | 0.543777 | false | 2.626221 | false | false | false |
ajinabraham/Mobile-Security-Framework-MobSF | StaticAnalyzer/views/android/android_rules.py | 1 | 19226 | """
Rule Format
1. desc - Description of the findings
2. type
a. string
b. regex
3. match
a. single_regex - if re.findall(regex1, input)
b .regex_and - if re.findall(regex1, input) and re.findall(regex2, input)
c. regex_or - if re.findall(regex1, input) or re.findall(regex2, input)
d. ... | gpl-3.0 | 4,659,156,025,997,647,000 | 33.277064 | 246 | 0.512379 | false | 3.44861 | false | false | false |
vene/ambra | ambra/classifiers.py | 1 | 6082 | import numpy as np
from sklearn.base import BaseEstimator
from sklearn.linear_model import LogisticRegression, Ridge
from sklearn.utils.extmath import safe_sparse_dot
from sklearn.utils.validation import check_random_state
from pairwise import pairwise_transform, flip_pairs
def _nearest_sorted(scores, to_find, k=10... | bsd-2-clause | 3,683,267,477,776,859,000 | 37.0125 | 93 | 0.598652 | false | 3.794136 | false | false | false |
ch1bo/ambicam | preview.py | 1 | 3567 | # Interactive preview module, run with python -i
import cv2
import numpy as np
import picamera
import picamera.array
import sys
import multiprocessing as mp
RESOLUTION = (640,480)
FRAMERATE = 5
OFFSET = 10
M = np.load('M.npy')
width, height = np.load('res.npy')
def compute_map(M_inv, x, y, width, height):
coords ... | mpl-2.0 | -1,066,425,132,792,566,400 | 41.464286 | 95 | 0.630782 | false | 3.225136 | false | false | false |
yuri-kilochek/graphematizer | tests/run.py | 1 | 5005 | import os
import os.path
import subprocess
import argparse
import collections
import itertools
import time
import sys
GRAPHEMATIZER_PATH = os.path.normpath('../graphematizer')
TERMINAL_WIDTH = 80
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('test_set', help='Test set to run.')
arg_parser.add_argumen... | gpl-3.0 | -6,139,452,096,908,997,000 | 32.817568 | 117 | 0.57003 | false | 3.294931 | true | false | false |
ceos-seo/data_cube_utilities | data_cube_utilities/transect/interpolate.py | 1 | 1702 | import numpy as np
from itertools import islice
nan = np.nan
def window(seq, n=2):
"Returns a sliding window (of width n) over data from the iterable"
" s -> (s0,s1,...s[n-1]), (s1,s2,...,sn), ... "
it = iter(seq)
result = tuple(islice(it, n))
if len(result) == n:
yield... | apache-2.0 | -6,673,177,766,192,212,000 | 28.859649 | 125 | 0.583431 | false | 3.431452 | false | false | false |
prabhugs/mynote | mynote/notes/tests.py | 1 | 1217 | from django.test import TestCase
import datetime
from django.utils import timezone
from notes.models import Post
# Create your tests here.
class PostMethodTests(TestCase):
def test_waspublishedrecently_with_future_post(self):
"""
:return: False for post whose published_date is in the future
... | mit | -825,587,557,338,921,200 | 37.0625 | 83 | 0.677896 | false | 4.070234 | true | false | false |
mikan/racm | src/racm_ui_edit_dialog.py | 1 | 1597 | """Subclass of EditDialog, which is generated by wxFormBuilder."""
import wx
import racm_ui
# Implementing EditDialog
class EditDialog(racm_ui.EditDialog):
_main_frame = None
_row = -1
def __init__(self, parent, main_frame, host, port, name, row):
racm_ui.EditDialog.__init__(self, parent)
... | bsd-3-clause | -3,549,579,078,472,662,500 | 32.270833 | 100 | 0.603632 | false | 3.629545 | false | false | false |
jianglab/tomography | tomoThickness.py | 1 | 32556 | #!/usr/bin/env python
#
# Author: Rui Yan <yan49@purdue.edu>, Sep 2015
# Copyright (c) 2012 Purdue University
#
# This software is issued under a joint BSD/GNU license. You may use the
# source code in this file under either license. However, note that the
# complete EMAN2 and SPARX software packages have some GPL dep... | gpl-2.0 | -8,677,815,489,985,896,000 | 40.003778 | 266 | 0.6252 | false | 3.118391 | false | false | false |
masamitsu-murase/pausable_unittest | pausable_unittest/utils/winutils.py | 1 | 1893 | # coding: utf-8
import subprocess
import tempfile
import os
def register_schtasks(task_name, path, user, password=None, admin=True):
command = ["schtasks.exe", "/Create", "/RU", user]
if password:
command += ["/RP", password]
command += [
"/SC", "ONLOGON", "/TN", task_name, "/... | mit | -6,031,662,333,350,813,000 | 32.418182 | 73 | 0.570523 | false | 3.675728 | false | false | false |
listyque/TACTIC-Handler | thlib/side/client/examples/checkin_render_layer.py | 1 | 4903 | import sys, os, shutil, getopt
from tactic_client_lib import TacticServerStub
SEARCH_TYPE = "prod/render"
def move_file(file_paths, new_dir):
'''move file to the handoff dir'''
new_file_paths = []
for file_path in file_paths:
file_name = os.path.basename(file_path)
new_file_path = '%s/%s'... | epl-1.0 | 7,825,519,813,304,723,000 | 31.686667 | 142 | 0.563533 | false | 3.563227 | false | false | false |
beezz/trustpaylib | trustpaylib.py | 1 | 17356 | # -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
trustpaylib
===========
TrustPay payment solution constants and utils.
"""
import sys
import hmac
import hashlib
import collections
try:
unicode
from urllib import urlencode
except NameError:
def unicode(s):
return s
from urllib.parse import urlen... | bsd-3-clause | 4,386,366,306,178,861,600 | 26.546032 | 78 | 0.576755 | false | 3.842781 | false | false | false |
MOOCworkbench/MOOCworkbench | quality_manager/models.py | 1 | 2510 | from django.db import models
from django.template.defaultfilters import slugify
from model_utils.models import TimeStampedModel
from experiments_manager.models import ChosenExperimentSteps
class ExperimentMeasure(models.Model):
name = models.CharField(max_length=255, editable=False)
description = models.Text... | mit | -3,190,671,055,506,624,500 | 32.466667 | 94 | 0.650199 | false | 3.903577 | false | false | false |
swehner/foos | plugins/leds.py | 1 | 3191 | #!/usr/bin/env python
import time
import sys
import threading
import queue
import collections
from foos.bus import Bus
class Pattern:
def __init__(self, time, leds=[]):
self.time = time
self.leds = leds
def flatten(l):
for el in l:
if isinstance(el, collections.Iterable):
... | gpl-3.0 | -5,291,139,710,385,785,000 | 26.508621 | 82 | 0.483861 | false | 3.468478 | false | false | false |
ChristosChristofidis/h2o-3 | h2o-py/tests/testdir_hdfs/pyunit_NOPASS_HDFS_kmeans_mllib_1_large.py | 1 | 2412 | #----------------------------------------------------------------------
# Purpose: This test compares k-means centers between H2O and MLlib.
#----------------------------------------------------------------------
import sys
sys.path.insert(1, "../../")
import h2o
import numpy as np
def kmeans_mllib(ip, port):
h2... | apache-2.0 | -4,750,684,882,160,498,000 | 42.872727 | 119 | 0.548093 | false | 3.272727 | false | false | false |
GeographicaGS/GeoServer-Python-REST-API | src/geoserverapirest/ext/sld/sld.py | 1 | 15360 | #!/usr/bin/env python
# coding=UTF-8
import geoserverapirest.ext.sld.core as core, geoserverapirest.ext.sld.color as color
import geoserverapirest.ext.sld.ranges as ranges
"""
This set of classes works as helpers to construct SLD and should be the only entry point to this module.
They are designed to work supplying d... | mit | 7,179,470,238,680,441,000 | 26.824275 | 127 | 0.601081 | false | 3.960547 | false | false | false |
openstack/os-win | os_win/tests/unit/utils/test_jobutils.py | 1 | 14327 | # Copyright 2015 Cloudbase Solutions Srl
#
# 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,470,856,766,625,067,300 | 42.024024 | 79 | 0.619879 | false | 3.602464 | true | false | false |
xesscorp/KiPart | kipart/kipart.py | 1 | 39760 | # -*- coding: utf-8 -*-
# MIT license
#
# Copyright (C) 2015-2019 by XESS Corp.
#
# 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... | mit | 7,613,360,735,598,875,000 | 34.217006 | 145 | 0.558249 | false | 3.551268 | false | false | false |
yeming233/horizon | openstack_dashboard/dashboards/admin/networks/tables.py | 1 | 5042 | # Copyright 2012 NEC Corporation
#
# 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 ag... | apache-2.0 | -2,542,113,935,013,305,300 | 35.80292 | 78 | 0.62138 | false | 4.411199 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.