repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
google-research/google-research | ieg/models/networks.py | 1 | 6213 | # coding=utf-8
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -5,460,517,137,014,571,000 | 30.861538 | 94 | 0.668759 | false | 3.878277 | false | false | false |
duyanning/epm | epmaux.py | 1 | 4755 | # -*- coding: utf-8 -*-
import glob
import os
import os.path
from Project import *
from Solution import *
import settings
def findSlnFile():
slnFilesList = glob.glob("*.epmsln")
if slnFilesList:
return os.path.abspath(slnFilesList[0])
else:
return None
def findPrjFile():
topArrived = F... | gpl-2.0 | 4,667,911,168,519,587,000 | 20.995305 | 62 | 0.584205 | false | 3.058094 | false | false | false |
5610110083/Safety-in-residential-project | cgi-bin.bak/alert.py | 1 | 6736 | #!/usr/bin/python
#Import modules for CGI handling
import cgi, cgitb
import Cookie, os, time
import pigpio
form = cgi.FieldStorage()
siren = form.getvalue('siren')
if siren is None:
siren = 'off'
cookie = Cookie.SimpleCookie()
cookie_string = os.environ.get('HTTP_COOKIE')
def getCookies():
if not cook... | apache-2.0 | 8,159,313,501,922,653,000 | 40.331288 | 228 | 0.535036 | false | 3.54713 | false | false | false |
Supernito/newAlbum | newAlbums.py | 1 | 3218 | #! /usr/bin/python3
# -*- coding: utf-8 -*-
# Launch alerts with new upcoming albums from a rateyourmusic profile page.
# Copyright (C) 2012 Juan "Nito" Pou juanpou@ono.com
#
# 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 | -8,543,200,850,126,310,000 | 39.2375 | 114 | 0.669671 | false | 3.423404 | false | false | false |
UQ-UQx/edx-platform_lti | lms/djangoapps/verify_student/views.py | 8 | 43784 | """
Views for the verification flow
"""
import json
import logging
import decimal
import datetime
from collections import namedtuple
from pytz import UTC
from edxmako.shortcuts import render_to_response, render_to_string
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http i... | agpl-3.0 | -5,840,974,628,600,776,000 | 37.508355 | 126 | 0.638932 | false | 4.251699 | false | false | false |
trattner/bugsy | a_star.py | 1 | 6805 | #Problem Set
#Name: Andrew Trattner
#Collaborators: none
#Time Spent: 0:
#for leslie kaelbling bling bling
#Michael and Andy
#Weight of time and solution cost
import time
import heapq
from math import log
import sys
import random
class Puzzle:
"""
A 15-puzzle instance which takes input st... | mit | -981,670,542,914,969,100 | 29.073059 | 96 | 0.541367 | false | 3.502316 | false | false | false |
d-grossman/pelops | pelops/datasets/chip.py | 3 | 3808 | import abc
import collections
import os
import pelops.utils as utils
# ================================================================================
# Chip Factory
# ================================================================================
class DatasetFactory(object):
@staticmethod
def create_dat... | apache-2.0 | 4,133,334,592,035,739,000 | 32.113043 | 82 | 0.516544 | false | 3.682785 | false | false | false |
spWang/gitHooks | CheckSameImgName.py | 1 | 5808 | #!/usr/bin/env python
# coding=utf-8
import sys
import os
import re
import subprocess
from util.colorlog import *
imgList = []
def open_fun():
return check_out_put('git config githooks.sameimg', False ,"YES")
pass
def reset_check_same_img_state():
if check_out_put('git config githooks.sameimg', False ,"... | mit | 5,624,008,729,853,020,000 | 25.351485 | 75 | 0.492108 | false | 3.529178 | false | false | false |
shawncaojob/LC | PY/484_find_permutation.py | 1 | 2188 | # 484. Find Permutation Add to List
# DescriptionHintsSubmissionsSolutions
# Total Accepted: 3628
# Total Submissions: 6837
# Difficulty: Medium
# Contributors:
# love_Fawn
# By now, you are given a secret signature consisting of character 'D' and 'I'. 'D' represents a decreasing relationship between two numbers, 'I' r... | gpl-3.0 | -2,517,826,722,081,091,600 | 41.901961 | 626 | 0.628885 | false | 3.586885 | false | false | false |
vctandrade/flask-digest | flask_digest/stomach.py | 1 | 3248 | from time import time
from os import urandom
from flask import request, make_response
from werkzeug.exceptions import BadRequest
from werkzeug.exceptions import Unauthorized
from werkzeug.http import dump_header
from functools import wraps
from hasher import digest, hash_all
from challenge import Challenge
from cleani... | mit | -2,952,257,741,928,500,000 | 27 | 70 | 0.589594 | false | 3.880526 | false | false | false |
ARPA-SIMC/arkimet | python/arkimet/formatter/origin.py | 1 | 1081 | from arkimet.formatter import Formatter
from arkimet.formatter.eccodes import GribTable
import os
# Load code table 0: Identification of centers
grib1_centres = GribTable.load(1, "0")
# Amend the table with the ARPAE SIMC information
grib1_centres.set(200, "arpa", "ARPAE SIMC Emilia Romagna")
def format_origin(v):
... | gpl-2.0 | -8,952,181,404,394,375,000 | 32.78125 | 96 | 0.620722 | false | 3.315951 | false | false | false |
thesquelched/libcloud | libcloud/compute/drivers/libvirt_driver.py | 36 | 10206 | # 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"); you may not use ... | apache-2.0 | -8,741,521,864,836,086,000 | 29.465672 | 79 | 0.591025 | false | 4.2 | false | false | false |
SageEx/ostendit | post1/Article/models.py | 1 | 2236 | from django.db import models
from time import time
from django.core.files import File
from django.core.files.storage import FileSystemStorage
def get_upload_file_name(instance,filename):
return 'assets/uploaded_files/%s_%s' %(str(time()).replace('.','_'),filename)
class MyUser(models.Model) :
id = models.AutoFiel... | gpl-2.0 | 7,885,271,932,139,022,000 | 43.72 | 104 | 0.743739 | false | 3.254731 | false | false | false |
MattNolanLab/ei-attractor | grid_cell_model/simulations/007_noise/submit_param_sweep_velocity_ii_connections.py | 1 | 1288 | #!/usr/bin/env python
'''
Bump velocity gain estimation - probabilistic connections
In these simulations, the synapse weights have a constant value, but the
probability of connection between 2 neurons is generated according to synaptic
profile.
These simulations do the following:
- Bump is initialized, in the beg... | gpl-3.0 | 4,261,486,708,205,059,000 | 30.414634 | 78 | 0.689441 | false | 3.628169 | false | false | false |
glasnt/voc | voc/python/blocks.py | 1 | 11400 | import dis
from ..java import (
Code as JavaCode,
opcodes as JavaOpcodes,
ExceptionInfo as JavaExceptionInfo,
LineNumberTable
)
from .utils import extract_command, find_blocks
from .opcodes import Ref, resolve_jump, jump, Opcode, ALOAD_name, ICONST_val
class IgnoreBlock(Exception):
"""An escape ... | bsd-3-clause | -1,599,176,171,060,307,500 | 36.623762 | 130 | 0.562895 | false | 4.314913 | false | false | false |
mornsun/javascratch | src/topcoder.py/LC_329_Longest_Increasing_Path_in_a_Matrix.py | 1 | 2533 | #!/usr/bin/env python
#coding=utf8
'''
Given an integer matrix, find the length of the longest increasing path.
From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside of the boundary (i.e. wrap-around is not allowed).
Example 1:
nums = [
[9,9,4... | gpl-2.0 | 1,638,731,116,429,267,200 | 25.957447 | 175 | 0.56968 | false | 2.86863 | false | false | false |
Frostbit/frostbit.cz | web/phpmyadmin/doc/conf.py | 1 | 9671 | # -*- coding: utf-8 -*-
#
# phpMyAdmin documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 26 14:04:48 2012.
#
# 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
# autogenerated file.
#
# ... | mit | 868,334,724,589,480,000 | 30.8125 | 82 | 0.709854 | false | 3.705364 | true | false | false |
campagnola/acq4 | acq4/devices/MicroManagerCamera/mmcamera.py | 3 | 16088 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division, with_statement
import re
from collections import OrderedDict
from acq4.devices.Camera import Camera, CameraTask
from acq4.util import Qt
import six
import time, sys, traceback
from numpy import *
from acq4.util.metaarray impo... | mit | -4,563,842,008,806,499,300 | 37.766265 | 135 | 0.533503 | false | 4.111423 | true | false | false |
nttks/edx-platform | lms/envs/ga_bok_choy.py | 1 | 1490 | """
Settings for Bok Choy tests that are used by gacco.
"""
import json
import os
from path import Path as path
_DIR_ROOT = PROJECT_ROOT = path(__file__).abspath().dirname()
# commo.py
OAUTH_OIDC_ISSUER = 'https:/example.com/oauth2'
EDXMKTG_LOGGED_IN_COOKIE_NAME = 'edxloggedin'
PLATFORM_NAME = "Your Platform Name Her... | agpl-3.0 | -7,145,676,591,693,874,000 | 29.408163 | 110 | 0.704027 | false | 2.684685 | false | false | false |
namjae/AutobahnTestSuite | autobahntestsuite/autobahntestsuite/case/case9_1_5.py | 14 | 1156 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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
##
## ht... | apache-2.0 | -5,765,509,760,482,125,000 | 35.290323 | 87 | 0.57526 | false | 4 | false | false | false |
openstack/smaug | karbor/services/protection/flows/utils.py | 1 | 4438 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | -2,316,023,959,607,218,000 | 35.983333 | 75 | 0.631365 | false | 4.178908 | false | false | false |
caesar2164/edx-platform | lms/djangoapps/django_comment_client/tests/test_utils.py | 1 | 62494 | # -*- coding: utf-8 -*-
import datetime
import json
import ddt
import mock
from mock import patch, Mock
from nose.plugins.attrib import attr
from pytz import UTC
from django.utils.timezone import UTC as django_utc
from django.core.urlresolvers import reverse
from django.test import TestCase, RequestFactory
from edxmak... | agpl-3.0 | 6,319,221,860,039,545,000 | 41.767967 | 138 | 0.489405 | false | 4.781817 | true | false | false |
flying-circus/pyfilesystem | fs/expose/sftp.py | 14 | 13577 | """
fs.expose.sftp
==============
Expose an FS object over SFTP (via paramiko).
This module provides the necessary interfaces to expose an FS object over
SFTP, plugging into the infrastructure provided by the 'paramiko' module.
For simple usage, the class 'BaseSFTPServer' provides an all-in-one server
class based on... | bsd-3-clause | 2,643,095,422,974,950,400 | 33.285354 | 132 | 0.668336 | false | 3.599417 | false | false | false |
openstack/manila | manila/volume/cinder.py | 1 | 11905 | # Copyright 2014 Mirantis 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... | apache-2.0 | 7,066,490,876,305,074,000 | 35.97205 | 79 | 0.614112 | false | 4.287 | false | false | false |
bcdev/esa-pfa | pfa-algalblooms/pytools/gen_archive_delta.py | 1 | 6085 | import argparse
import os
import sys
import numpy
import beampy
import pprint
import datetime
tool_version = '1.0'
jpy = beampy.jpy
ImageManager = jpy.get_type('org.esa.beam.jai.ImageManager')
ImageIO = jpy.get_type('javax.imageio.ImageIO')
File = jpy.get_type('java.io.File')
ProgressMonitor = jpy.get_type('com.bc.c... | gpl-3.0 | -8,039,856,341,499,838,000 | 38.512987 | 112 | 0.596056 | false | 3.267991 | false | false | false |
cernvm/renegade | cern-cloudinit-modules/src/usr/lib/python2.6/site-packages/cloudinit/config/cc_ganglia.py | 1 | 11684 | #################################################################################
# Author: Cristovao Cordeiro <cristovao.cordeiro@cern.ch> #
# #
# Cloud Config module for Ganglia service. Testes and working on SLC6 machines. #
# Documentation in: #
# https://twiki.cern.ch/twiki/bin/view/LCG/CloudInit... | gpl-3.0 | -7,933,895,568,555,480,000 | 35.061728 | 184 | 0.564276 | false | 3.360368 | true | false | false |
sirex/databot | databot/db/models.py | 1 | 2417 | import enum
import datetime
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql, mysql, sqlite
BigInteger = sa.BigInteger()
BigInteger = BigInteger.with_variant(postgresql.BIGINT(), 'postgresql')
BigInteger = BigInteger.with_variant(mysql.BIGINT(), 'mysql')
BigInteger = BigInteger.with_variant(sqlite.IN... | agpl-3.0 | 2,344,313,871,371,077,000 | 37.983871 | 108 | 0.604882 | false | 3.818325 | false | false | false |
linux-modder/packagedb | pkgdb/model/languages.py | 2 | 2668 | # -*- coding: utf-8 -*-
#
# Copyright © 2009 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2, or (at your option) any later version. This
# program is distributed in th... | gpl-2.0 | 7,151,676,354,845,833,000 | 30.702381 | 79 | 0.688321 | false | 3.927729 | false | false | false |
stefanv/scipy3 | scipy/optimize/cobyla.py | 2 | 2799 | """Interface to Constrained Optimization By Linear Approximation
Functions:
fmin_coblya(func, x0, cons, args=(), consargs=None, rhobeg=1.0, rhoend=1e-4,
iprint=1, maxfun=1000)
Minimize a function using the Constrained Optimization BY Linear
Approximation (COBYLA) method
"""
import _cobyla
from nu... | bsd-3-clause | 80,808,287,703,779,280 | 27.561224 | 85 | 0.613433 | false | 3.93118 | false | false | false |
citrix-openstack-build/nova | nova/db/sqlalchemy/migrate_repo/versions/178_add_index_to_compute_node_stats.py | 16 | 1358 | # Copyright 2013 Rackspace Hosting
# 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 require... | apache-2.0 | -7,379,162,390,768,311,000 | 35.702703 | 78 | 0.720177 | false | 3.611702 | false | false | false |
jenskutilek/TypoLabs2016 | penCollection/svgPen.py | 1 | 8335 | #MenuTitle: SVG Pen
from fontTools.pens.basePen import BasePen
# See also:
# http://www.w3.org/TR/SVG/paths.html#PathDataBNF
# https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
# SVG path parsing code from:
# http://codereview.stackexchange.com/questions/28502/svg-path-parsing
def parse_svg_path(pat... | mit | -3,942,385,653,941,689,000 | 30.934866 | 194 | 0.435273 | false | 3.527296 | false | false | false |
SimplyKnownAsG/mpi-action-framework | examples/py/example04_compare_to_mpi4py.py | 1 | 1403 |
from mpi4py.MPI import COMM_WORLD
import maf
import timeit
import numpy
import cPickle
import marshal
def bcast(obj, rank=0):
if isinstance(obj, basestring):
return maf.MafComm.World.bcast(obj)
else:
return marshal.loads(maf.MafComm.World.bcast(marshal.dumps(obj)))
maf.bcast = bcast
def com... | apache-2.0 | 8,000,663,964,630,884,000 | 31.627907 | 92 | 0.63578 | false | 2.880903 | false | false | false |
KIT-MRT/PLCC | calibrate_PLCC.py | 1 | 10462 | #!/usr/bin/env python
# encoding: utf-8
#
# This file is part of PLCC.
#
# Copyright 2016 Johannes Graeter <johannes.graeter@kit.edu (Karlsruhe Institute of Technology)
#
# PLCC comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
#
# PLCC is free software: you can redistribute it and/or modify
# it under the... | gpl-3.0 | 1,224,790,894,326,006,300 | 42.231405 | 118 | 0.629612 | false | 3.133273 | false | false | false |
imbolc/single_access | single_access/__init__.py | 1 | 1336 | import os
import sys
import fcntl
def lock(filename):
'''
Open file in 'r+' mode and lock it.
Return file handler or None
'''
if not hasattr(lock, '_files'):
lock._files = {}
try:
if not os.path.isfile(filename):
open(filename, 'w').close()
f = open(filename... | isc | 8,152,955,618,006,340,000 | 23.290909 | 70 | 0.549401 | false | 4.06079 | false | false | false |
lemonov/meld | meld/diffutil.py | 2 | 17187 | ### Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>
### Copyright (C) 2009 Kai Willadsen <kai.willadsen@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 versio... | gpl-2.0 | -3,643,078,912,185,846,000 | 36.940397 | 108 | 0.504742 | false | 3.616032 | false | false | false |
bioShaun/OMrnaseq | rnaseq/modules/assembly/get_gene_to_trans.py | 1 | 1351 | '''
get gene-transcript map from gtf file or gff3 file
'''
import sys
import os
from HTSeq import GFF_Reader
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--gff', help = 'assembled GTF file or gff', required = True)
parser.add_argument('--out_dir', help = 'Output directory.', re... | gpl-3.0 | 6,604,584,260,956,801,000 | 35.527778 | 81 | 0.628423 | false | 3.022371 | false | false | false |
boh1996/LectioAPI | scrapers/leave_reasons.py | 1 | 4043 | #!/usr/bin/python
# -*- coding: utf8 -*-
from bs4 import BeautifulSoup as Soup
import urls
import re
import proxy
from datetime import *
import time
from time import mktime
import values
import codecs
import functions
import authenticate
def leave_reasons ( config, session = False ):
url = "https://www.lectio.dk/lec... | mit | 4,628,613,581,396,081,000 | 37.150943 | 222 | 0.62701 | false | 2.857244 | false | false | false |
asgard-lab/neutron | neutron/tests/tempest/auth.py | 12 | 24446 | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | apache-2.0 | -5,691,595,905,934,516,000 | 36.151976 | 79 | 0.596539 | false | 4.260369 | false | false | false |
oliverbo/eapptools | page.py | 1 | 3154 | # Handles loaging of a page
import logging
import json
import eapptools
from eapptools import user_manager
from eapptools import js
import webapp2
from google.appengine.api import users
import jinja2
logger = logging.getLogger("page_handler")
_JINJA_ENVIRONMENT = jinja2.Environment(
loader = jinja2.FileSystemLo... | mit | 6,769,426,194,584,743,000 | 29.047619 | 122 | 0.687381 | false | 3.292276 | false | false | false |
mzp/iTerm2 | tests/esctest/tests/nel.py | 3 | 4759 | from esc import NUL, S7C1T, S8C1T
import escargs
import esccmd
import escio
from escutil import AssertEQ, AssertScreenCharsInRectEqual, GetCursorPosition, GetScreenSize, knownBug, optionRequired
from esctypes import Point, Rect
class NELTests(object):
def test_NEL_Basic(self):
"""Next Line moves the cursor down ... | gpl-2.0 | -3,322,961,976,299,234,300 | 33.992647 | 118 | 0.670309 | false | 3.22863 | true | false | false |
EduPepperPDTesting/pepper2013-testing | lms/djangoapps/tnl_integration/migrations/0006_auto__add_tnldomains__add_field_tnldistricts_domain.py | 1 | 9575 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'TNLDomains'
db.create_table('tnl_domains', (
('id', self.gf('django.db.models.fi... | agpl-3.0 | 2,390,643,719,417,720,000 | 68.89781 | 182 | 0.558538 | false | 3.599624 | false | false | false |
amandaprorok/diversity | graph.py | 1 | 1348 | import networkx as nx
import numpy as np
import nxmod
class Graph(object):
def __init__(self, M, fully_connected=False):
# M: Number of nodes.
self._num_nodes = M
if fully_connected:
self._graph = nx.complete_graph(M)
else:
self._graph = nx.connected_watts_strogatz_graph(M, 3, 0.6)
d... | mit | 3,047,975,639,156,200,000 | 26.510204 | 92 | 0.661721 | false | 3.098851 | false | false | false |
CSF-JH/crossbarexamples | authentication/ticket/static/client.py | 2 | 4883 | ###############################################################################
##
## Copyright (C) Tavendo GmbH and/or collaborators. All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met:
##
## 1.... | apache-2.0 | -7,177,570,197,768,203,000 | 39.355372 | 148 | 0.65984 | false | 4.205857 | false | false | false |
biolink/ontobio | tests/test_local_ttl.py | 1 | 1159 | from ontobio.ontol_factory import OntologyFactory
import logging
from ontobio.io.ontol_renderers import GraphRenderer
PART_OF = 'BFO:0000050'
QUALITY = 'PATO:0000001'
PLOIDY = 'PATO:0001374'
EUPLOID = 'PATO:0001393'
SHAPE = 'PATO:0000052'
Y_SHAPED = 'PATO:0001201'
def test_local_json_parse():
"""
Load ontolo... | bsd-3-clause | 8,534,830,922,233,440,000 | 29.5 | 90 | 0.680759 | false | 2.926768 | false | false | false |
ZephrFish/UnlmtdCalc | UnlmtdCalc_0.01.py | 1 | 2590 | #!/bin/python
#
# UnlmtdCalc Cinema Film Calculator
# This application takes the value of a Cineworld Unlimited Card and works out depending on what ticket tier you choose:
# _ _ _ _ _ ____ _
# | | | |_ __ | |_ __ ___ | |_ __| |/ ___|__ _| | ___
# | | | |... | mit | -5,230,224,204,075,162,000 | 35.478873 | 161 | 0.548649 | false | 2.94653 | false | false | false |
alexryndin/ambari | ambari-server/src/main/resources/stacks/ADH/1.5/services/HIVE/package/scripts/webhcat_service.py | 3 | 3772 | """
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"); you may not use this ... | apache-2.0 | 4,521,439,414,751,526,000 | 33.925926 | 121 | 0.700954 | false | 3.599237 | false | false | false |
pinterb/st2 | st2common/st2common/constants/system.py | 7 | 1184 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | -9,020,899,413,095,512,000 | 36 | 74 | 0.739865 | false | 3.677019 | false | false | false |
sestrella/ansible | test/units/plugins/inventory/test_aws_ec2.py | 24 | 7345 | # -*- coding: utf-8 -*-
# Copyright 2017 Sloane Hertel <shertel@redhat.com>
#
# This file is part of Ansible
#
# Ansible 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-3.0 | 675,934,779,908,731,000 | 39.136612 | 120 | 0.595643 | false | 3.648783 | true | false | false |
hamish2014/FreeCAD_assembly2 | assembly2/utils/boltMultipleCircularEdges.py | 1 | 3467 | from assembly2.constraints.common import *
from assembly2.constraints.circularEdgeConstraint import parseSelection
from assembly2.importPart import duplicateImportedPart
class CircularEdgeSelectionGate:
def allow(self, doc, obj, sub):
return CircularEdgeSelected( SelectionExObject(doc, obj, sub) )
class ... | lgpl-2.1 | -8,557,593,219,256,642,000 | 36.684783 | 131 | 0.652726 | false | 4.026713 | false | false | false |
computbiolgeek/seq_utils | src/read_substitution_matrix_from_txt.py | 1 | 2617 | import numpy as np
# read bit-valued substitution matrices into dictionaries
filename = '/hd0/lib14/workspace/seq_utils/data/PAM250.txt'
with open(filename, 'rt') as f:
lines = f.readlines()
lines = [line.strip() for line in lines if not line.startswith('#')]
aas = lines.pop(0)
aas = aas.split()
ll = [[int(i)... | gpl-3.0 | -1,138,190,400,025,574,300 | 32.139241 | 97 | 0.545663 | false | 2.960407 | false | false | false |
alfa-jor/addon | plugin.video.alfa/channels/dramasjc.py | 1 | 9717 | # -*- coding: utf-8 -*-
# -*- Channel DramasJC -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
import re
import urllib
from channelselector import get_thumb
from core import httptools
from core import scrapertools
from core import servertools
from core import tmdb
from core.item im... | gpl-3.0 | 2,469,631,247,180,497,000 | 32.439716 | 120 | 0.553336 | false | 3.858562 | false | false | false |
DrDos0016/z2 | tools/one-offs/reviews_html_to_markdown.py | 1 | 1054 | import os
import sys
import django
sys.path.append("/var/projects/museum/")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "z2.settings")
django.setup()
from z2_site.models import Review
def main():
found = 0
for review in Review.objects.all():
old = review.content
review.content = review... | mit | 6,339,590,725,687,875,000 | 23.511628 | 62 | 0.504744 | false | 3.889299 | false | false | false |
a10networks/acos-client | acos_client/v30/dns.py | 2 | 1552 | # Copyright (C) 2016, A10 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/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 | 3,541,045,596,259,926,500 | 30.673469 | 78 | 0.643686 | false | 3.889724 | false | false | false |
JavierCoggiola/CostoPorKm | error.py | 1 | 2089 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'error.ui'
#
# Created: Wed Aug 28 13:44:25 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeE... | unlicense | 208,686,237,664,924,740 | 37.685185 | 103 | 0.676879 | false | 3.671353 | false | false | false |
TheStackBox/xuansdk | SDKLibrary/com/cloudMedia/theKuroBox/sdk/resource/languageLoader.py | 1 | 1748 | ##############################################################################################
# Copyright 2014-2015 Cloud Media Sdn. Bhd.
#
# This file is part of Xuan Application Development SDK.
#
# Xuan Application Development SDK is free software: you can redistribute it and/or modify
# it under the terms of... | gpl-3.0 | 3,730,880,835,276,636,000 | 30.981132 | 94 | 0.547483 | false | 4.842105 | false | false | false |
zachcp/qiime | scripts/process_qseq.py | 15 | 3667 | #!/usr/bin/env python
# File created on 30 Mar 2011
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME project"
__credits__ = ["Greg Caporaso", "Jose Antonio Navas Molina"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "g... | gpl-2.0 | -5,521,284,501,740,325,000 | 38.430108 | 92 | 0.571584 | false | 3.667 | false | false | false |
zackzachariah/feelslike | models/accessory.py | 1 | 3294 | # Created 2014 by Zack Sheppard. Licensed under the MIT License (see LICENSE file)
from sys import maxint
from datetime import timedelta, datetime
from weatherfact import WeatherFact
from airfeel import Airfeel
from skyfeel import Skyfeel
from changingweatherfact import ChangingWeatherFact
"""
A class for storing da... | mit | 3,598,852,661,606,828,500 | 30.980583 | 113 | 0.667881 | false | 3.409938 | false | false | false |
Pikecillo/genna | external/4Suite-XML-1.0.2/test/Xml/Core/test_saxlette.py | 1 | 14789 | import os
from xml.sax import make_parser, SAXException, SAXParseException
from xml.sax.handler import property_lexical_handler
from xml.sax.handler import property_declaration_handler
from xml.sax.xmlreader import XMLReader
from xml.sax.saxutils import prepare_input_source
from Ft.Lib import Uri
from Ft.Xml.Domlette ... | gpl-2.0 | -4,577,905,025,626,096,600 | 29.058943 | 78 | 0.640138 | false | 3.69725 | true | false | false |
ChristopherMacGown/roundabout | tests/utils.py | 1 | 1037 | import json
import os
import unittest
from roundabout.config import Config
def testdata(filename):
return os.path.join(os.path.dirname(__file__), "data", filename)
def load(filename):
with open(filename) as fp:
return json.JSONDecoder().decode(fp.read())
class was_called(object):
def __init__(se... | apache-2.0 | 7,281,403,320,863,809,000 | 24.292683 | 68 | 0.606557 | false | 3.92803 | false | false | false |
rogerthat-platform/rogerthat-gig-g8 | src/gig/authentication.py | 1 | 3719 | # Copyright (c) 2016, Rogerthat
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the fol... | bsd-2-clause | 8,134,722,385,608,210,000 | 41.261364 | 145 | 0.735951 | false | 3.822199 | false | false | false |
Formlabs/OpenFL | examples/stipple/stipple2flp.py | 1 | 2964 | #!/usr/bin/env python
"""
This is a Python script that turns a stipple file into a .flp
The source file should be generated by stippler.py
"""
from math import ceil
import json
import argparse
# This file lives in examples/stipple
import sys
sys.path.append('../..')
import numpy as np
import OpenFL.FLP as F
def m... | apache-2.0 | 81,138,383,733,523,020 | 35.592593 | 87 | 0.606613 | false | 3.418685 | false | false | false |
Dangetsu/vnr | Frameworks/Sakura/py/libs/mousehook/screenselector.py | 1 | 5921 | # coding: utf8
# screenselector.py
# 8/16/2014 jichi
# Windows only
# See: http://sourceforge.net/apps/mediawiki/pyhook/index.php?title=PyHook_Tutorial
# On mouse click warning:
# See: http://sourceforge.net/tracker/?func=detail&aid=2986042&group_id=235202&atid=1096323
# func = self.keyboard_funcs.get(msg)
# => func =... | gpl-3.0 | -2,999,865,545,917,269,000 | 27.603865 | 97 | 0.61949 | false | 3.522308 | false | false | false |
bernardokyotoku/pylibdaqmx | nidaqmx/libnidaqmx.py | 1 | 124830 | #!/usr/bin/env python
#
# Please follow
# http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines
#
# Author: Pearu Peterson
# Created: July 2009
"""
See http://pylibnidaqmx.googlecode.com/
"""
__all__ = ['AnalogInputTask', 'AnalogOutputTask',
'DigitalInputTask', 'DigitalOutputTask',
'Count... | bsd-3-clause | 4,200,511,833,230,925,300 | 34.860385 | 132 | 0.580774 | false | 4.177851 | false | false | false |
ktan2020/legacy-automation | win/Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/ed_xml.py | 1 | 3368 | ###############################################################################
# Name: ed_thread.py #
# Purpose: Provides a base class for managing XML files and data. #
# Author: Cody Precord <cprecord@editra.org> ... | mit | -3,425,992,848,021,921,000 | 29.185185 | 79 | 0.453979 | false | 4.539084 | false | false | false |
zerosum0x0/koadic | core/loader.py | 1 | 5276 | import os
import sys
import inspect
import core.plugin
import random
import string
def load_plugins(dir, instantiate = False, shell = None):
plugins = {}
for root, dirs, files in os.walk(dir):
sys.path.append(root)
# make forward slashes on windows
module_root = root.replace(dir, "").... | apache-2.0 | -1,089,154,292,004,303,200 | 44.094017 | 216 | 0.593442 | false | 3.246769 | false | false | false |
darkoc/clowdflows | workflows/MUSE/visualization_views.py | 2 | 1878 | from django.shortcuts import render
import os
def MUSE_display_summation(request,input_dict,output_dict,widget):
if sum(input_dict['intList']) == input_dict['sum']:
check = 'The calculation appears correct.'
else:
check = 'The calculation appears incorrect!'
return render(request,... | gpl-3.0 | 1,666,553,622,527,003,400 | 37.957447 | 155 | 0.636848 | false | 3.675147 | false | false | false |
mhabib1981/pySecn00b | arcsight_eNotify.py | 1 | 2320 | import sys
import smtplib
import getpass
from time import sleep
from time import strftime
from email.mime.text import MIMEText
def main():
if len(sys.argv)!=3:
print'''
==================================
Arcsight Notfication Trace Utility
==================================
Usage: %s <log file> [OPTION]
-w trace WA... | cc0-1.0 | -4,791,727,631,180,545,000 | 21.307692 | 82 | 0.642241 | false | 3.012987 | false | false | false |
timvaillancourt/mongodb_consistent_backup | mongodb_consistent_backup/Archive/Tar/Tar.py | 2 | 3989 | import os
import logging
from copy_reg import pickle
from multiprocessing import Pool
from time import sleep
from types import MethodType
from TarThread import TarThread
from mongodb_consistent_backup.Errors import Error
from mongodb_consistent_backup.Pipeline import Task
# Allows pooled .apply_async()s to work on ... | apache-2.0 | 2,525,162,248,127,293,000 | 37.728155 | 117 | 0.566057 | false | 4.216702 | false | false | false |
uclouvain/OSIS-Louvain | base/views/institution.py | 1 | 5513 | ##############################################################################
#
# 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 | -618,560,025,119,360,600 | 37.013793 | 109 | 0.689405 | false | 3.830438 | false | false | false |
HybridF5/jacket | jacket/tests/compute/unit/virt/libvirt/volume/test_smbfs.py | 1 | 4658 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 470,604,282,508,464,900 | 43.788462 | 78 | 0.609918 | false | 3.818033 | true | false | false |
jeroendierckx/Camelot | camelot/view/controls/editors/noteeditor.py | 1 | 2297 | # ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | gpl-2.0 | -4,309,552,332,366,518,000 | 37.283333 | 79 | 0.60862 | false | 4.317669 | false | false | false |
wtsi-medical-genomics/snoopy | setup.py | 1 | 1854 | from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
package_data = []
os.chdir(os.path.join(here, 'snoopy'))
for (path, directories, filenam... | gpl-3.0 | -8,894,835,518,040,880,000 | 32.727273 | 131 | 0.626214 | false | 3.783673 | false | false | false |
DemocracyFoundation/Epitome | Demoscopesis/views.py | 1 | 3841 | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render, redirect
from django.template import loader
from django.contrib.auth.decorators import login_required
from django.urls import reverse
from django.utils import timezone
from django.contrib import messages
f... | agpl-3.0 | 5,461,231,391,674,055,000 | 39.010417 | 112 | 0.648789 | false | 3.80297 | false | false | false |
yuhangc/HRI_planner | scripts/hri/test_human_tracking.py | 1 | 2887 | #!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import rospy
from std_msgs.msg import Bool
from people_msgs.msg import PositionMeasurementArray
from people_msgs.msg import People
import tty, termios, sys
from experiment_manager import getchar
# save the trajectories of all detected vehicle... | apache-2.0 | 2,036,742,491,452,267,500 | 26.759615 | 115 | 0.614825 | false | 3.568603 | false | false | false |
artscoop/django-translatable | tests/models/tests.py | 1 | 8557 | from django.utils import unittest
from django.utils.translation import activate as activate_language
import translatable
from models import Translatable, Translation
class BaseClassesTestCase(unittest.TestCase):
def test_is_translatable_model_abstract(self):
try:
abstract = translatable.models... | bsd-3-clause | -7,337,507,840,107,045,000 | 40.741463 | 99 | 0.671263 | false | 4.213195 | true | false | false |
swbooking/RobotMaria | snippets/sensorState/sensorState.py | 1 | 9733 | #!/usr/bin/env python
#
#
# Pure Big Mad Boat Men sample sensor implementation, v0.1
#
#
## required
import atexit
import collections
import datetime
import Queue
import threading
import time
## for example only
import random
#### util
def ForceDtor(cls):
""" class decorator to force __del__ call at process e... | mit | 3,703,025,304,400,081,400 | 29.415625 | 121 | 0.619645 | false | 3.797503 | false | false | false |
maru/fiubar | fiubar/users/migrations/0001_initial.py | 1 | 4246 | # Generated by Django 2.0.3 on 2018-04-05 08:04
import django.contrib.auth.models
import django.contrib.auth.validators
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
... | mit | 326,759,010,105,790,340 | 64.323077 | 329 | 0.630947 | false | 4.345957 | false | false | false |
Intelworks/OpenTAXII | opentaxii/taxii/services/handlers/discovery_request_handlers.py | 2 | 1730 |
from .base_handlers import BaseMessageHandler
from ...exceptions import raise_failure
import libtaxii.messages_11 as tm11
import libtaxii.messages_10 as tm10
class DiscoveryRequest11Handler(BaseMessageHandler):
supported_request_messages = [tm11.DiscoveryRequest]
@classmethod
def handle_message(cls, s... | bsd-3-clause | 346,589,001,855,759,500 | 29.892857 | 79 | 0.710983 | false | 4.379747 | false | false | false |
egrajeda/egrajeda.github.io | _scripts/add-link.py | 1 | 2745 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script que recibe la información de un enlace y lo agrega a la colección, al
mismo tiempo que actualiza o agrega una blog post para reflejar eso en la
página de inicio.
"""
import argparse
import datetime
import json
import re
import subprocess
from pprint import pprint
L... | mit | -1,847,966,893,051,338,000 | 29.808989 | 119 | 0.625456 | false | 3.10181 | false | false | false |
edouardtheron/py-midi | tests/test_message_object.py | 1 | 1316 | import pytest
from midi.midi import Message
from midi.types import NoteOff, SysEx
from midi.utils import get_status_value
@pytest.fixture
def note_off_msg():
note_off = NoteOff(10, 100)
return Message(note_off, 1)
@pytest.fixture
def sysex_msg():
"""A SysEx message with 4 bytes of random data with manu... | gpl-3.0 | 7,133,369,282,552,164,000 | 29.604651 | 79 | 0.648936 | false | 3.074766 | false | false | false |
gangadhar-kadam/mic-erpnext | stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py | 4 | 3944 | # ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# 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 yo... | agpl-3.0 | 4,645,763,258,779,873,000 | 36.932692 | 101 | 0.714249 | false | 3.031514 | false | false | false |
danmichaelo/mwclient | tests/test_sleep.py | 6 | 1575 | # encoding=utf-8
from __future__ import print_function
import unittest
import time
import mock
import pytest
from mwclient.sleep import Sleepers
from mwclient.sleep import Sleeper
from mwclient.errors import MaximumRetriesExceeded
if __name__ == "__main__":
print()
print("Note: Running in stand-alone mode. Con... | mit | 3,339,522,111,079,963,600 | 26.155172 | 72 | 0.626667 | false | 3.571429 | true | false | false |
GreenBlast/Linger | LingerActions/StartACIfTempAction.py | 1 | 1451 | import LingerActions.LingerBaseAction as lingerActions
class StartACIfTempAction(lingerActions.LingerBaseAction):
"""Starting AC if temperature is above min temperature"""
def __init__(self, configuration):
super(StartACIfTempAction, self).__init__(configuration)
# Fields
self.rmbridge... | mit | 3,501,924,238,734,588,000 | 41.676471 | 150 | 0.669883 | false | 3.869333 | false | false | false |
franek/weboob | modules/opacwebaloes/backend.py | 1 | 2271 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2012 Jeremy Monnet
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at you... | agpl-3.0 | 1,234,826,776,675,556,600 | 31.913043 | 89 | 0.64509 | false | 4.019469 | true | false | false |
unapiedra/DigikamWeb | settings.py | 1 | 5491 | # Settings for my machine.
MEDIA_ROOT = '/home/ada/DigikamWeb/tmp/' # Must be absolute filepath with trailing slash!
MEDIA_URL = '/home/ada/DigikamWeb/tmp/' #
PHOTO_URL = 'http://localhost:8080/' # URL where Photos are stored.
## Settings for tests.
#MEDIA_ROOT = '/home/ada/DigikamWeb/test/'
#MEDIA_URL = MEDIA_ROOT
#PH... | gpl-3.0 | 2,893,715,573,482,311,000 | 32.895062 | 122 | 0.664906 | false | 3.495226 | false | false | false |
pyxll/pyxll-examples | profiling/profiling_tools.py | 1 | 6122 | """
Profiling tools for use with PyXLL.
This code accompanies the blog post
https://www.pyxll.com/blog/how-to-profile-python-code-in-excel
"""
from pyxll import xl_menu, xl_app, xlcAlert
from win32com.client import constants
from functools import wraps
from ctypes import c_int64, byref, windll
import win32clipboard
im... | unlicense | -2,136,870,831,136,294,000 | 28.574879 | 115 | 0.653708 | false | 3.82386 | false | false | false |
PeterWangIntel/blink-crosswalk | LayoutTests/http/tests/websocket/connection-throttling_wsh.py | 42 | 1115 | import cgi
import time
import threading
lock = threading.Lock()
connections = set()
next_test_id = 0
def web_socket_do_extra_handshake(request):
query_string = request.ws_resource.split('?', 1)
if len(query_string) == 1:
return
params = cgi.parse_qs(query_string[1])
mode = params["mode"][0]
... | bsd-3-clause | -3,387,730,743,018,986,000 | 22.229167 | 71 | 0.620628 | false | 3.596774 | true | false | false |
piyushroshan/xen-4.3 | tools/python/xen/remus/device.py | 19 | 12280 | # Remus device interface
#
# Coordinates with devices at suspend, resume, and commit hooks
import os, re, fcntl
import netlink, qdisc, util
class ReplicatedDiskException(Exception): pass
class BufferedNICException(Exception): pass
class CheckpointedDevice(object):
'Base class for buffered devices'
def post... | gpl-2.0 | 7,408,355,187,825,673,000 | 29.93199 | 104 | 0.569055 | false | 3.860421 | false | false | false |
izimobile/libshorttext | text-predict.py | 1 | 3048 | #!/usr/bin/env python
#from __future__ import print_function
from sys import argv, stderr
from os import path
from libshorttext.classifier import *
def exit_with_help():
stderr.write("""Usage: text-predict.py [options] test_file model output
options:
-f
Overwrite the existing output file.
-a {0|... | bsd-3-clause | -420,638,829,738,003,700 | 28.882353 | 133 | 0.533465 | false | 4.037086 | false | false | false |
azam-a/gocd2gmail2slack | gocd2gmail2slack/gmail.py | 2 | 3620 |
import httplib2
import os
from apiclient import discovery
import oauth2client
from oauth2client import client
from oauth2client import tools
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
flags = None
SCOPES = 'https://www.googleapis.co... | mit | 6,603,440,361,906,187,000 | 27.730159 | 75 | 0.63674 | false | 3.986784 | false | false | false |
eReuse/DeviceHub | ereuse_devicehub/resources/event/device/reserve/settings.py | 1 | 2668 | from ereuse_devicehub.resources.account.settings import unregistered_user
from ereuse_devicehub.resources.event.device.settings import EventSubSettingsMultipleDevices, EventWithDevices, \
materialized_components
class Reserve(EventWithDevices):
components = materialized_components
deadline = {
'ty... | agpl-3.0 | -2,689,379,304,527,691,300 | 35.547945 | 117 | 0.577586 | false | 4.142857 | false | false | false |
Scoudem/modsim | Ass3/nbody/particle.py | 1 | 1269 | '''
File: particle.py
Authors:
- Sjoerd Wenker, 10617558
- Tristan van Vaalen, 10551832
'''
import numpy as np
import math
class Particle:
'''
'''
def __init__(self, mass, pos, vel):
self.mass = mass
self.pos = np.asarray(pos, dtype='float64')
self.vel = np.asarray(vel, dtype='f... | apache-2.0 | 292,650,302,318,571,460 | 23.403846 | 66 | 0.546099 | false | 3.117936 | false | false | false |
mcgonagle/ansible_f5 | library/iworkflow_system_setup.py | 1 | 8230 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'status': ['preview'],
'supp... | apache-2.0 | -7,420,827,445,118,074,000 | 27.184932 | 91 | 0.591009 | false | 4.092491 | false | false | false |
Nexedi/neoppod | neo/lib/pt.py | 1 | 11460 | #
# Copyright (C) 2006-2019 Nexedi SA
#
# 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 program is distributed... | gpl-2.0 | 458,228,876,432,920,700 | 33.107143 | 79 | 0.573997 | false | 3.939498 | false | false | false |
ppwwyyxx/tensorflow | tensorflow/python/data/kernel_tests/skip_test.py | 12 | 2034 | # Copyright 2017 The TensorFlow 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 applica... | apache-2.0 | -5,594,212,337,488,547,000 | 31.285714 | 80 | 0.67355 | false | 3.911538 | true | false | false |
jscontreras/learning-gae | pgae-examples-master/1e/python/ch14/djangonohelper/settings.py | 1 | 2774 | # Django settings for djangonohelper project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = '' # Or path to database fi... | lgpl-3.0 | 8,334,071,591,936,861,000 | 34.113924 | 101 | 0.708363 | false | 3.515843 | false | false | false |
flumotion-mirror/flumotion | flumotion/component/plugs/html5/html5.py | 3 | 3785 | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L.
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
#
# This file may be distributed and/or modified under the terms of
# the GNU Lesser General Pub... | lgpl-2.1 | -5,679,631,993,724,616,000 | 29.28 | 75 | 0.616909 | false | 3.984211 | false | false | false |
benoitc/pistil | pistil/tcp/arbiter.py | 4 | 1053 | # -*- coding: utf-8 -
#
# This file is part of pistil released under the MIT license.
# See the NOTICE for more information.
import logging
import os
from pistil import util
from pistil.pool import PoolArbiter
from pistil.tcp.sock import create_socket
log = logging.getLogger(__name__)
class TcpArbiter(PoolArbiter... | mit | -103,522,710,470,559,120 | 23.488372 | 72 | 0.626781 | false | 3.452459 | false | false | false |
pkill-nine/qutebrowser | qutebrowser/utils/objreg.py | 2 | 10108 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | -4,762,008,009,878,453,000 | 31.088889 | 79 | 0.606945 | false | 4.194191 | false | false | false |
OCA/manufacture | mrp_bom_tracking/tests/test_mrp_bom_tracking.py | 1 | 1909 | # 2019 Eficent Business and IT Consulting Services S.L.
# - Lois Rilo <lois.rilo@eficent.com>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
class TestBomTracking(common.SavepointCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
... | agpl-3.0 | -8,260,994,751,211,380,000 | 29.301587 | 69 | 0.541121 | false | 3.331588 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.