repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JacekPierzchlewski/RxCS | rxcs/console.py | 1 | 34322 | """
Module contains console printing functions for the RXCS. |br|
All of the console print in RxCS should be done using functions
from this module.
*Author*:
Jacek Pierzchlewski, Aalborg University, Denmark. <jap@es.aau.dk>
*Version*:
0.1 | 14-MAY-2014 : * Initial version. |br|
0.2 | 15-MAY-2014 : * Doc... | bsd-2-clause | -31,688,921,326,145,204 | 28.335043 | 117 | 0.519259 | false | 3.952326 | false | false | false |
jptomo/rpython-lang-scheme | rpython/rtyper/rbuiltin.py | 1 | 28498 | from collections import OrderedDict
from rpython.annotator import model as annmodel
from rpython.flowspace.model import Constant
from rpython.rlib import rarithmetic, objectmodel
from rpython.rtyper import raddress, rptr, extregistry, rrange
from rpython.rtyper.error import TyperError
from rpython.rtyper.lltypesystem ... | mit | -4,992,336,300,719,427,000 | 35.535897 | 84 | 0.634887 | false | 3.070574 | false | false | false |
nanuxbe/microbit-files | remote.py | 1 | 1244 | import radio
from microbit import button_a, button_b, display, Image, sleep, accelerometer
DIRECTIONS = [
(accelerometer.get_y, "backwards", "forwards"),
(accelerometer.get_x, "right", "left"),
]
ARROWS = {
"backwards": Image.ARROW_S,
"forwards": Image.ARROW_N,
"left": Image.ARROW_W,
"right": ... | mit | 4,887,598,229,450,565,000 | 20.448276 | 77 | 0.563505 | false | 3.181586 | false | false | false |
Lisergishnu/LTXKit | __init__.py | 1 | 1110 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Marco Benzi <marco.benzi@alumnos.usm.cl>
# @Date: 2015-06-08 16:12:27
# @Last Modified 2015-06-08
# @Last Modified time: 2015-06-08 17:38:03
#==========================================================================
#This program is free software: you can re... | gpl-2.0 | -5,476,987,294,272,240,000 | 38.642857 | 75 | 0.61982 | false | 3.881119 | false | false | false |
aleixq/python3-brisa | brisa/core/log.py | 1 | 4549 | # Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php or see LICENSE file.
# Copyright 2007-2008 Brisa Team <brisa-develop@garage.maemo.org>
""" Log module with colored logging feature. Common usage of this module can
be only importing it and calling one of the available functions: debug,
w... | mit | -6,357,651,957,540,853,000 | 29.736486 | 79 | 0.621016 | false | 4.025664 | false | false | false |
Balannen/LSMASOMM | atom3/Kernel/GraphGrammar/ASG_GGEditMetaModel.py | 1 | 1865 | # __ASG_GGEditMetaModel.py_____________________________________________________
from ASG import *
from ATOM3Type import *
from ATOM3 import *
class ASG_GGEditMetaModel(ASG, ATOM3Type):
def __init__(self, parent= None, ASGroot = None):
ASG.__init__(self, ASGroot, ['ASG_GGEditMetaModel' ,... | gpl-3.0 | 4,835,057,202,533,837,000 | 32.537037 | 113 | 0.624129 | false | 3.73 | false | false | false |
proggy/optparse2 | __init__.py | 1 | 18409 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright notice
# ----------------
#
# Copyright (C) 2012-2014 Daniel Jung
# Contact: djungbremen@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
# Softwa... | gpl-2.0 | 7,814,770,479,823,910,000 | 42.830952 | 86 | 0.634364 | false | 4.256416 | false | false | false |
m4nolo/steering-all | src/world/gameover.py | 2 | 1854 | import pygame
import dotworld
import menuworld
from src.define import *
from src.dot.dottext import DotText
class GameOver(dotworld.DotWorld):
def __init__(self, score):
dotworld.DotWorld.__init__(self)
self.counter = 0
self.limit = 400
self.alpha = 0
self.animState = 1
... | mit | 1,563,944,088,642,314,800 | 27.090909 | 121 | 0.552859 | false | 3.806982 | false | false | false |
mohsaad/Algorithms | machine_learning/gan/dcgan_tf.py | 1 | 15325 | from __future__ import print_function, division
import os
import util
import scipy as sp
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from datetime import datetime
LEARNING_RATE = 0.0002
BETA1 = 0.5
BATCH_SIZE = 64
EPOCHS = 2
SAVE_SAMPLE_PERIOD = 50
if not os.path.exists('samples'):
... | mit | 34,060,963,830,307,964 | 29.65 | 111 | 0.483458 | false | 3.644471 | false | false | false |
h4ck3rm1k3/gcc-python-plugin-1 | tests/plugin/switch/script.py | 4 | 2104 | # -*- coding: utf-8 -*-
# Copyright 2011 David Malcolm <dmalcolm@redhat.com>
# Copyright 2011 Red Hat, Inc.
#
# 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, o... | gpl-3.0 | 7,235,730,597,787,832,000 | 43.765957 | 83 | 0.577947 | false | 3.723894 | false | false | false |
polysquare/polysquare-travis-container | psqtraviscontainer/output.py | 1 | 1519 | # /psqtraviscontainer/output.py
#
# Helper classes to monitor and capture output as it runs.
#
# See /LICENCE.md for Copyright information
"""Helper classes to monitor and capture output as it runs."""
import sys
import threading
def monitor(stream,
modifier=None,
live=False,
out... | mit | -7,674,804,951,134,952,000 | 27.660377 | 75 | 0.612245 | false | 4.480826 | false | false | false |
asajeffrey/servo | tests/wpt/web-platform-tests/tools/wpt/install.py | 3 | 3912 | import argparse
from . import browser
latest_channels = {
'firefox': 'nightly',
'chrome': 'nightly',
'chrome_android': 'dev',
'edgechromium': 'dev',
'safari': 'preview',
'servo': 'nightly',
'webkitgtk_minibrowser': 'nightly'
}
channel_by_name = {
'stable': 'stable',
'release': 'sta... | mpl-2.0 | 5,533,614,927,335,678,000 | 35.90566 | 105 | 0.627556 | false | 4.337029 | true | false | false |
wjchen84/lfd | scripts/eval.py | 2 | 30870 | #!/usr/bin/env python
from __future__ import division
import time
import os.path
import h5py
import atexit
import trajoptpy
import numpy as np
from lfd.environment import sim_util
from lfd.environment import settings
from constants import MAX_ACTIONS_TO_TRY
from lfd.demonstration.demonstration import SceneState, Gr... | bsd-2-clause | -2,636,299,079,971,652,600 | 49.940594 | 252 | 0.637868 | false | 3.38784 | false | false | false |
CityGrid/arsenal | server/arsenalweb/views/api/enc.py | 1 | 5630 | '''Arsenal API ENC for puppet.'''
# Copyright 2015 CityGrid Media, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | 3,331,748,297,912,140,300 | 32.117647 | 86 | 0.615098 | false | 3.840382 | false | false | false |
markgw/jazzparser | src/jazzparser/utils/chords.py | 1 | 8399 | """Chord processing utilities.
A library of utility functions used throughout the Jazz Parser relating
to chord processing in the input.
"""
"""
============================== License ========================================
Copyright (C) 2008, 2010-12 University of Edinburgh, Mark Granroth-Wilding
This file is ... | gpl-3.0 | 8,030,450,507,503,783,000 | 32.329365 | 87 | 0.496011 | false | 3.526029 | false | false | false |
mwickert/scikit-dsp-comm | sk_dsp_comm/synchronization.py | 1 | 20890 | """
A Digital Communications Synchronization
and PLLs Function Module
A collection of useful functions when studying PLLs
and synchronization and digital comm
Copyright (c) March 2017, Mark Wickert
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted pr... | bsd-2-clause | 5,287,978,719,403,717,000 | 39.642023 | 95 | 0.560843 | false | 3.210882 | false | false | false |
cphyc/MHD_simulation | python/simul.py | 1 | 9256 | #!/usr/env python3
try:
import numpypy as np
except:
import numpy as np
try:
import cPickle as pickle
except ImportError:
import pickle
#import ipdb
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver
def TDMAsolver(a, b, c, d):
'''
TDMA solver, a b c d can be NumPy array type or Py... | apache-2.0 | -7,288,239,873,645,479,000 | 32.773723 | 97 | 0.469635 | false | 3.173525 | false | false | false |
CosmicFish/CosmicFish | python/cosmicfish_pylib/fisher_operations.py | 1 | 13671 | #----------------------------------------------------------------------------------------
#
# This file is part of CosmicFish.
#
# Copyright (C) 2015-2017 by the CosmicFish authors
#
# The CosmicFish code is free software;
# You can use it, redistribute it, and/or modify it under the terms
# of the GNU General Public L... | gpl-3.0 | 1,292,096,842,457,407,700 | 46.141379 | 160 | 0.633823 | false | 3.520731 | false | false | false |
Craig-Macomber/Panda3D-Terrain-System | renderer/geoClipMapper.py | 1 | 13967 | import math
from renderer import RenderNode
from terrain.bakery.gpuBakery import tileMapSize
from terrain.bakery.bakery import loadTex
from panda3d.core import *
#from terrain.textureRenderer import *
class GeoClipMapper(RenderNode):
def __init__(self,path,tileSource,minScale,focus):
RenderNode.__init__... | bsd-2-clause | 5,505,236,265,132,271,000 | 35.565445 | 180 | 0.549223 | false | 3.342987 | false | false | false |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/config/system/systemcmdpolicy.py | 1 | 9456 | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -3,354,399,022,787,214,300 | 31.163265 | 283 | 0.684433 | false | 3.473916 | false | false | false |
ramunasd/python-ant | src/ant/core/driver.py | 1 | 7358 | # -*- coding: utf-8 -*-
# pylint: disable=missing-docstring, invalid-name
##############################################################################
#
# Copyright (c) 2011, Martín Raúl Villalba
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documen... | mit | 2,149,521,618,508,776,000 | 30.435897 | 82 | 0.56838 | false | 4.373365 | false | false | false |
gdestuynder/MozDef | alerts/write_audit.py | 2 | 2157 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
#
# This code alerts on every successfully opened session... | mpl-2.0 | 2,070,204,838,203,926,800 | 35.559322 | 92 | 0.613815 | false | 3.965074 | false | false | false |
schoeke/django-openresources | openresources/urls.py | 2 | 4748 | # -*- coding: utf-8 -*-
# Copyright 2011 Florian Ledermann <ledermann@ims.tuwien.ac.at>
#
# This file is part of OpenResources
# https://bitbucket.org/floledermann/openresources/
#
# OpenResources is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... | agpl-3.0 | 3,711,478,665,950,113,000 | 45.48 | 158 | 0.657119 | false | 3.348378 | false | false | false |
innovationgarage/tfprism | tfprism/trainingserver.py | 1 | 4061 | #! /usr/bin/env python
import argparse
import sys
import tensorflow as tf
import netifaces
import dns.resolver
import pieshell
import multiprocessing
import click
FLAGS = None
def run_server(spec, job_name, task_index):
print "Starting server /job:%s/task:%s as %s..." % (job_name, task_index, spec[job_name][task_... | apache-2.0 | 577,285,489,258,239,600 | 29.30597 | 139 | 0.644669 | false | 3.062594 | false | false | false |
bingweichen/GOKU | backend/server/route/virtual_card_route.py | 1 | 7586 | # -*- coding: UTF-8 -*-
"""
@author: larry.shuoren@outlook.com
@time: 8/10/17
@desc: virtual card route
"""
import json
from flask import Blueprint
from flask import jsonify
from flask import request
from peewee import DoesNotExist
from flask_jwt_extended import jwt_required, get_jwt_identity
from playhouse.shortcuts ... | apache-2.0 | -77,828,308,756,038,660 | 23.164474 | 77 | 0.513477 | false | 3.424709 | false | false | false |
wylwang/vnpy | vnpy/trader/app/ctaStrategy/ctaEngine.py | 2 | 26400 | # encoding: UTF-8
'''
本文件中实现了CTA策略引擎,针对CTA类型的策略,抽象简化了部分底层接口的功能。
关于平今和平昨规则:
1. 普通的平仓OFFSET_CLOSET等于平昨OFFSET_CLOSEYESTERDAY
2. 只有上期所的品种需要考虑平今和平昨的区别
3. 当上期所的期货有今仓时,调用Sell和Cover会使用OFFSET_CLOSETODAY,否则
会使用OFFSET_CLOSE
4. 以上设计意味着如果Sell和Cover的数量超过今日持仓量时,会导致出错(即用户
希望通过一个指令同时平今和平昨)
5. 采用以上设计的原因是考虑到vn.trader的用户主要是对TB、MC和... | mit | -4,068,506,922,399,666,000 | 35.088685 | 111 | 0.485383 | false | 3.557197 | false | false | false |
Stanford-Legal-Tech-Design/legaltech-rapidpro | temba/tests.py | 1 | 15348 | from __future__ import unicode_literals
import json
import os
import redis
import string
import time
from datetime import datetime
from django.conf import settings
from django.contrib.auth.models import User, Group
from django.core.urlresolvers import reverse
from django.db import connection
from django.test import L... | agpl-3.0 | 2,440,041,185,708,644,000 | 35.198113 | 165 | 0.59252 | false | 3.89741 | true | false | false |
jskDr/jamespy | jmimo.py | 3 | 26574 | """
Author
--------
Best regards,
Sungjin (James) Kim, PhD
Postdoc, CCB in Harvard
sungjinkim@fas.harvard.edu
[Web] http://aspuru.chem.harvard.edu/james-sungjin-kim/
[Linkedin] https://www.linkedin.com/in/jamessungjinkim
[Facebook] https://www.facebook.com/jamessungjin.kim
[alternative email] jamessungjin.kim@gmai... | mit | -8,609,976,906,017,575,000 | 24.850195 | 114 | 0.629864 | false | 2.340291 | false | false | false |
gene1wood/trophy-store | trophystore/trophystore/models.py | 1 | 5171 | from django.db import models
import ast
# from utils import get_config
class ListField(models.TextField):
__metaclass__ = models.SubfieldBase
description = "Stores a python list"
def __init__(self, *args, **kwargs):
super(ListField, self).__init__(*args, **kwargs)
def to_python(self, value):... | bsd-3-clause | 1,828,234,501,277,176,000 | 36.201439 | 77 | 0.594276 | false | 3.950344 | false | false | false |
nugget/python-insteonplm | tests/mockCallbacks.py | 1 | 2602 | """Mock callback module to support device and state testing."""
import logging
_LOGGER = logging.getLogger(__name__)
# pylint: disable=unused-argument
# pylint: disable=too-many-instance-attributes
class MockCallbacks():
"""Mock callback class to support device and state testing."""
def __init__(self):
... | mit | -8,229,655,377,828,727,000 | 35.138889 | 74 | 0.641045 | false | 4.258592 | false | false | false |
guillempalou/scikit-cv | skcv/multiview/two_views/fundamental_matrix.py | 1 | 7756 | import numpy as np
from numpy.linalg import svd
from math import log
from scipy.optimize import leastsq
from skcv.multiview.util import normalize_points
def fundamental_matrix_from_two_cameras(camera1, camera2):
""" Computes the fundamental matrix from two projection
matrices
Parameters
----------
... | bsd-3-clause | 8,682,359,868,658,212,000 | 22.867692 | 83 | 0.582904 | false | 3.467143 | false | false | false |
gsteenss/Hacking-Team-Sweeper | simplescripts/sweeplinux.py | 1 | 1105 | #!/usr/bin/python2.7
# sweeplinux v0.1: a simple script to look for signs of HackingTeam RCS Linux agent
# gsteenss@riseup.net
#
# based on: https://github.com/0xPoly/Hacking-Team-Sweeper/blob/master/signatures/linux.md
import glob
import sys
from platform import platform,architecture
from os.path import expanduser
... | agpl-3.0 | -2,293,747,633,987,668,500 | 26.625 | 135 | 0.741176 | false | 3.328313 | false | false | false |
gpmidi/MCEdit-Unified | viewports/chunk.py | 6 | 2421 | from camera import CameraViewport
from OpenGL import GL
import mceutils
class ChunkViewport(CameraViewport):
defaultScale = 1.0 # pixels per block
def __init__(self, *a, **kw):
CameraViewport.__init__(self, *a, **kw)
def setup_projection(self):
w, h = (0.5 * s / self.defaultScale
... | isc | -7,397,464,745,655,106,000 | 25.604396 | 82 | 0.530772 | false | 3.478448 | false | false | false |
weareua/MarkIT | groups/views.py | 1 | 1326 | # -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse
from django.core.urlresolvers import reverse_lazy
from django.views.generic import DeleteView
from django.contrib import messages
from groups.models import Group
def groups_list(request):
groups = Group.objects.all... | mit | 5,010,538,765,097,069,000 | 25.12 | 66 | 0.657734 | false | 3.658263 | false | false | false |
kyokley/BattlePyEngine | src/battlePy/random_player.py | 1 | 1105 | import random
from battlePy.default_config import BOARD_HEIGHT, BOARD_WIDTH
from battlePy.player import Player
from battlePy.ship import RIGHT, UP
class RandomPlayer(Player):
def initPlayer(self):
self.name = 'RandomPlayer'
def placeShips(self):
for ship in self.ships:
isValid = ... | mit | -7,574,655,506,449,167,000 | 32.484848 | 88 | 0.517647 | false | 4.316406 | false | false | false |
lowerquality/gentle | gentle/util/cyst.py | 1 | 2574 | # Twisted lazy computations
# (from rmo-sketchbook/cyst/cyst.py)
import mimetypes
import os
from twisted.web.static import File
from twisted.web.resource import Resource
from twisted.web.server import Site, NOT_DONE_YET
from twisted.internet import reactor
class Insist(Resource):
isLeaf = True
def __init__(... | mit | -2,386,617,986,116,249,600 | 29.282353 | 78 | 0.607615 | false | 3.818991 | false | false | false |
jotes/pontoon | pontoon/base/tests/test_admin.py | 1 | 3321 | import pytest
from django.contrib.auth.models import User
from django.contrib.admin.sites import AdminSite
from django.test.client import RequestFactory
from pontoon.base.admin import UserAdmin
from pontoon.base.models import PermissionChangelog
from pontoon.test.factories import (
GroupFactory,
LocaleFactory... | bsd-3-clause | 5,479,512,884,144,492,000 | 25.357143 | 85 | 0.650407 | false | 3.452183 | true | false | false |
public0821/nettest | nettest/tools/tcpreceiver.py | 1 | 1927 | #!/usr/bin/env python3
from nettest.sockets import TcpSocket
import argparse
import time
import select
import socket
class TcpReceiver(object):
def __init__(self):
self._setup_args()
def _setup_args(self):
parser = argparse.ArgumentParser(description=_("accept tcp connection and receive tc... | apache-2.0 | -5,926,593,848,506,962,000 | 37.54 | 121 | 0.514271 | false | 4.359729 | false | false | false |
goidor/chat-django | chat_django/chat/views.py | 1 | 2110 | from django.shortcuts import render, redirect
from django.views.generic import ListView
from django.views.generic.detail import DetailView
from django.db.models import Q
from django.views.generic.edit import (
CreateView,
UpdateView
)
from django.contrib.auth.models import User
from .models import Room, Messag... | gpl-3.0 | -1,029,722,574,820,200,400 | 33.032258 | 87 | 0.627962 | false | 3.534338 | false | false | false |
navigator8972/ensemble_ioc | PyMDP_Utils.py | 1 | 6193 | """
Utilities for PyMDP module
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
import matplotlib.patches as mpatches
def BarycentricInterpolation(bins, pnts):
"""
barycentricinterpolation for given points,
return the barycentric coordinates for points within the g... | bsd-2-clause | 482,157,451,004,387,400 | 36.08982 | 127 | 0.582593 | false | 3.467525 | false | false | false |
Southpaw-TACTIC/Team | src/python/Lib/site-packages/PySide/examples/animation/animatedtiles/animatedtiles.py | 1 | 6785 | #!/usr/bin/env python
# This file was taken from Riverbank's examples,
# which was an adaptation of the original C++ Qt's examples.
from PySide import QtCore, QtGui
import animatedtiles_rc
# PyQt doesn't support deriving from more than one wrapped class so we use
# composition and delegate the property.
class Pix... | epl-1.0 | -753,075,092,396,192,300 | 29.426009 | 91 | 0.64112 | false | 3.48306 | false | false | false |
DotNetAge/freezes | freezes/views.py | 1 | 6371 | # -*- coding: utf-8 -*-
# !/usr/bin/python
__author__ = 'Ray'
from flask import g, render_template, send_from_directory, Blueprint, current_app, url_for, jsonify
from os import path
from urlparse import urljoin
from werkzeug.contrib.atom import AtomFeed
from fnmatch import fnmatch
from datetime import datetime
from w... | bsd-3-clause | 3,633,069,214,335,844,400 | 33.437838 | 115 | 0.53304 | false | 3.880024 | false | false | false |
201213580/midescuentogt | servidor/conexiones.py | 1 | 2042 | import MySQLdb
def consultaRecuperar(consulta):
cnx = MySQLdb.connect(host='micupongt.cjyaceyawgbr.us-east-2.rds.amazonaws.com', user='manuel13580', passwd='Manuel5897-',
db='micupongt')
cursor = cnx.cursor()
cursor.execute(consulta)
#cnx.close() no se cierra porque activa una excepcion.
return cursor
def cons... | apache-2.0 | 6,424,390,343,573,191,000 | 31.412698 | 123 | 0.739961 | false | 2.539801 | false | false | false |
myron0330/caching-research | section_cmab/simulation/base.py | 1 | 2092 | # -*- coding: UTF-8 -*-
# **********************************************************************************#
# File:
# **********************************************************************************#
from section_cmab.agent import Agent
from section_cmab.algorithms.lp_solvers import primal_dual_recover
from se... | mit | -477,107,893,832,023,940 | 45.488889 | 105 | 0.573614 | false | 4.192385 | true | false | false |
ds-hwang/chromium-crosswalk | third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py | 59 | 4028 | # Copyright (c) 2010 Google Inc. 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 ... | bsd-3-clause | 3,983,772,429,179,721,700 | 42.311828 | 92 | 0.693396 | false | 4.450829 | true | false | false |
dfang/odoo | addons/fleet/__manifest__.py | 23 | 1331 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name' : 'Fleet Management',
'version' : '0.1',
'sequence': 165,
'category': 'Human Resources',
'website' : 'https://www.odoo.com/page/fleet',
'summary' : 'Vehicle, leasing, insurances, costs',
... | agpl-3.0 | 2,143,881,206,663,646,000 | 29.25 | 74 | 0.629602 | false | 3.530504 | false | false | false |
adamklawonn/CityCircles | citycircles_iphone/build_back2/iphoneDistribution-iphonesimulator/CityCircles.app/globalmaptiles.py | 28 | 16529 | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers b... | gpl-3.0 | 4,539,766,909,753,469,400 | 36.565909 | 103 | 0.651885 | false | 3.278913 | false | false | false |
Bitka0/serenade | homepage/navigation/templatetags/navigation_t.py | 1 | 2401 | # coding: utf-8
# Copyright (c) 2011 Lukas Martini, Phillip Thelen.
# This file may be used and distributed under the terms found in the
# file COPYING, which you should have received along with this
# program. If you haven't, please refer to bofh@junge-piraten.de.
from django.template import Library, Node
from home... | mit | -9,106,934,015,875,573,000 | 24.273684 | 94 | 0.685964 | false | 3.008772 | false | false | false |
astrorigin/oroboros | oroboros/core/bicharts.py | 1 | 11219 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Charts with two subcharts.
"""
from decimal import Decimal
import swisseph as swe
from oroboros.core.charts import Chart
from oroboros.core.planets import all_planets
from oroboros.core.aspects import all_aspects
from oroboros.core.results import PlanetDataList
fro... | gpl-3.0 | 7,579,024,174,989,201,000 | 24.439909 | 108 | 0.639807 | false | 2.730348 | false | false | false |
joshalbrecht/memdam | memdam/eventstore/sqlite.py | 1 | 23420 |
import uuid
import datetime
import re
import os
import sqlite3
import time
import itertools
import pytz
import lockfile
import memdam
import memdam.common.field
import memdam.common.event
import memdam.eventstore.api
@memdam.vtrace()
def execute_sql(cur, sql, args=()):
'''Just for debugging'''
return cur.ex... | gpl-2.0 | -464,807,978,104,279,200 | 41.659381 | 199 | 0.598719 | false | 3.805037 | false | false | false |
Fmakdemir/f-qr-fixer | fqrfixer.py | 1 | 14438 | #!/usr/bin/env python3
#from __future__ import division
import PIL
import sys
import os
import argparse
import numpy as np
def print_fqr_format():
print('''fqr file format:
*...xxx***x*x**x
xx****xxxx*..***
'x' or 'X' => black
'.' => white
'*' => unknown
It should be an NxN matrix with only 'x', '.' and '*' charac... | mit | 6,055,672,657,051,218,000 | 24.241259 | 97 | 0.541418 | false | 2.392774 | false | false | false |
Hazardius/pySimpleSpatialFactsBase | pssfb_spacial_fact.py | 1 | 3373 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" File containing simple spacial fact definition. """
from pssfb_additional import enum
# RCC5
# DR - disconnected
# PO - partially overlapping
# PP - proper part
# PPI - proper part inversed
# EQ - equal
rel_type = enum(DR = "DR", PO = "PO", PP = "PP", PPI = "PPI", EQ... | mit | 4,269,032,095,824,677,000 | 33.773196 | 156 | 0.54373 | false | 3.206274 | false | false | false |
spreeker/democracygame | democracy/gamelogic/score.py | 1 | 1385 | """
This module implements the Emocracy game rules as far as score keeping is
concerned. The rest of the game rules are in actions.py
this module needs to get a lot bigger..
"""
from gamelogic.levels import change_score
VOTE_SCORE = 1
USER_VOTE_SCORE = 20
TAG_SCORE = 1
PROPOSE_SCORE = 2
PROPOSE_VOTE_SCORE = 1
ISSUE_... | bsd-3-clause | 8,474,513,008,962,748,000 | 26.7 | 79 | 0.666426 | false | 3.329327 | false | false | false |
ken0-1n/GenomonHotspotCall | lib/hotspotCall/fisher_info.py | 1 | 9661 |
#! /usr/bin/env python
import math
import numpy
from scipy.stats import fisher_exact as fisher
import re
target = re.compile( '([\+\-])([0-9]+)([ACGTNRMacgtnrm]+)' )
remove_chr = re.compile( '\^.' )
class FisherInfo:
def __init__(self):
self.chr = 0
self.start = 0
self.end = 0
... | gpl-3.0 | 432,586,200,704,145,800 | 30.366883 | 117 | 0.495497 | false | 3.323357 | false | false | false |
Axilent/ace-client | ace/plugins/dox/utils.py | 1 | 3668 | """
Utilities for Dox.
"""
from ace import config
import os.path
from os import getcwd, mkdir, remove, walk
import hashlib
def check_init():
"""
Checks if Dox has been properly initialized.
"""
env = config.get_env()
if not env.has_option('Project','project'):
raise ValueError('Project n... | bsd-3-clause | -1,341,919,190,596,814,000 | 30.084746 | 171 | 0.59542 | false | 3.550823 | false | false | false |
kenhys/tokyodebian-monthly-report | utils/gae/testSystem.py | 1 | 14049 | #coding=utf-8
#
# Code to test the system.
#
import unittest
import urlparse
import os
from webtest import TestApp
from google.appengine.api import apiproxy_stub_map
from google.appengine.api import datastore_file_stub
from google.appengine.api import mail_stub
from google.appengine.api import user_service_stub
from g... | gpl-2.0 | 5,947,947,450,598,396,000 | 34.012563 | 107 | 0.583567 | false | 4.087709 | true | false | false |
devunt/ika | ika/ircobjects.py | 1 | 5758 | import re
from datetime import datetime
from ika.models import Account, Channel
from ika.utils import tokenize_modestring
class IRCModeMixin:
modesdef = dict()
def __init__(self):
self.modes = dict()
@property
def modestring(self):
string = '+'
params = list()
for k,... | agpl-3.0 | 8,605,814,057,841,487,000 | 25.781395 | 91 | 0.516325 | false | 4.066384 | false | false | false |
dirko/pyhacrf | setup.py | 2 | 1515 | from setuptools import setup, Extension
from codecs import open
from os import path
# from Michael Hoffman's http://www.ebi.ac.uk/~hoffman/software/sunflower/
class NumpyExtension(Extension):
def __init__(self, *args, **kwargs):
from numpy import get_include
from numpy.distutils.misc_util import ... | bsd-3-clause | -776,888,844,945,481,500 | 31.934783 | 99 | 0.645545 | false | 3.65942 | false | false | false |
Brazelton-Lab/lab_scripts | derive_pathway_steps.py | 1 | 16412 | #! /usr/bin/env python2
"""
Copyright:
derive_pathway+steps.py Obtain gene list from pathway databases
Copyright (C) 2016 William Brazelton, Alex Hyer
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 Fr... | gpl-2.0 | 8,494,539,280,182,244,000 | 39.423645 | 79 | 0.509505 | false | 4.309874 | false | false | false |
eset/malware-research | winnti_group/winnti_group_unpack.py | 1 | 4389 | # -*- encoding: utf-8 -*-
#
# This script unpacks the payload from Winnti Group samples using their custom
# packer. For details, see:
# https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Winnti.pdf
#
# For feedback or questions contact us at: github@eset.com
# https://github.com/eset/malware-research/
#
# ... | bsd-2-clause | -1,076,169,081,500,170,800 | 36.495726 | 88 | 0.61933 | false | 3.680369 | false | false | false |
caronc/newsreap | newsreap/NNTPBinaryContent.py | 1 | 1934 | # -*- coding: utf-8 -*-
#
# A NNTP Binary File Representation
#
# Copyright (C) 2015-2016 Chris Caron <lead2gold@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either versio... | gpl-3.0 | 6,874,197,596,624,833,000 | 34.814815 | 86 | 0.601344 | false | 3.971253 | false | false | false |
marcoscrcamargo/ic | opencv/classifiers/svm.py | 1 | 4640 | # import the necessary packages
from sklearn import svm
from sklearn.calibration import CalibratedClassifierCV
# from sklearn.cross_validation import train_test_split
# resolvendo problemas de compatibilidade
from sklearn.model_selection import train_test_split
from imutils import paths
import numpy as np
import argp... | gpl-3.0 | 1,263,451,520,084,172,800 | 28.188679 | 73 | 0.681897 | false | 2.894573 | true | false | false |
JohnCEarls/DataDirac | datadirac/aggregator/resultset.py | 1 | 13038 | import boto.sqs
import logging
import time
import boto
import json
import numpy as np
import tempfile
import hashlib
from collections import defaultdict
from boto.sqs.message import Message
from boto.s3.key import Key
import base64
import datetime
from boto.dynamodb2.exceptions import ConditionalCheckFailedException
im... | gpl-3.0 | -7,814,231,075,353,104,000 | 31.034398 | 89 | 0.541417 | false | 3.977425 | false | false | false |
navoj/ecell4 | python/samples/reaction_reader/blbr/blbr.py | 1 | 1781 | from ecell4.reaction_reader.decorator2 import species_attributes, reaction_rules
from ecell4.reaction_reader.network import generate_reactions
@species_attributes
def attributegen():
R(r1,r2,r=(r1,r2)) | R0
L(l1,l2,l=(l1,l2)) | L0
@reaction_rules
def rulegen():
# Ligand addition
R(r) + L(_1,_2,l=[_1,... | gpl-2.0 | 4,637,524,014,636,223,000 | 22.746667 | 80 | 0.528916 | false | 2.286264 | false | false | false |
phihag/jippy | jippy/_jvm_intf.py | 1 | 56525 | import ctypes
_jboolean = ctypes.c_ubyte
_jbyte = ctypes.c_ubyte
_jchar = ctypes.c_short
_jshort = ctypes.c_int16
_jint = ctypes.c_int32
_jlong = ctypes.c_int64
_jfloat = ctypes.c_float
_jdouble = ctypes.c_double
_jsize = _jint
class _jobject_struct(ctypes.Structure):
__fields = []
_jobject = ctypes.POINTER(_jo... | apache-2.0 | 834,388,089,160,075,500 | 38.036602 | 65 | 0.387368 | false | 5.12466 | false | false | false |
theteam/django-theteamcommon | src/theteamcommon/middleware.py | 1 | 1267 | from django.conf import settings
from django.utils.http import urlquote
class ChangeContentType(object):
STATIC_CONTENT = [settings.MEDIA_URL,
settings.STATIC_URL,
settings.ADMIN_MEDIA_PREFIX,
]
FILE_ASSOCIATION = {'htc': 'text/x-component'}
... | mit | 9,081,709,442,860,570,000 | 33.243243 | 113 | 0.604578 | false | 4.154098 | false | false | false |
gaso/users_statistics | report/report_users_by_month.py | 1 | 3125 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | gpl-2.0 | 1,735,793,882,997,414,100 | 34.522727 | 83 | 0.5648 | false | 3.96071 | false | false | false |
neutrons/web_reflectivity | web_reflectivity/fitting/catalog.py | 1 | 3476 | #pylint: disable=bare-except, invalid-name, too-many-nested-blocks, too-many-locals, too-many-branches
"""
Optional utilities to communicate with ONcat.
ONcat is an online data catalog used internally at ORNL.
@copyright: 2018 Oak Ridge National Laboratory
"""
import sys
import datetime
import logging
fro... | apache-2.0 | 675,756,985,683,754,000 | 34.469388 | 102 | 0.61939 | false | 3.95 | false | false | false |
ah744/ScaffCC_RKQC | llvm/test/Scripts/coff-dump.py | 10 | 16172 | #!/usr/bin/env python
#===-- coff-dump.py - COFF object file dump utility-------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===----------------------------------------... | bsd-2-clause | 8,050,534,616,835,100,000 | 26.410169 | 112 | 0.554353 | false | 2.99426 | false | false | false |
michaelrup/scancode-toolkit | src/textcode/strings.py | 5 | 8700 | #
# Copyright (c) 2016 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | apache-2.0 | -2,972,077,459,978,382,300 | 30.407942 | 115 | 0.635172 | false | 3.62349 | false | false | false |
KonstantinShemyak/python-javatools | javatools/crypto.py | 2 | 6109 | # This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be usefu... | lgpl-3.0 | 540,998,306,147,703,550 | 31.668449 | 89 | 0.671141 | false | 3.770988 | false | false | false |
fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extractKobatoChanDaiSukiScan.py | 1 | 9274 | def extractKobatoChanDaiSukiScan(item):
"""
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
if 'Lookism' in item['tags']:
return None
if 'webtoon' in item['tags']:
return None
if '*Announcements*' in item... | bsd-3-clause | 4,132,580,538,126,302,000 | 96.631579 | 164 | 0.383761 | false | 4.611636 | false | false | false |
cwacek/python-jsonschema-objects | python_jsonschema_objects/util.py | 1 | 6181 | import six
import copy
import json
class lazy_format(object):
__slots__ = ("fmt", "args", "kwargs")
def __init__(self, fmt, *args, **kwargs):
self.fmt = fmt
self.args = args
self.kwargs = kwargs
def __str__(self):
return self.fmt.format(*self.args, **self.kwargs)
def sa... | mit | -3,246,414,182,600,502,000 | 26.59375 | 87 | 0.576282 | false | 4.079868 | false | false | false |
marmyshev/transitions | openlp/core/lib/theme.py | 1 | 23608 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | -182,272,033,019,598,620 | 34.65861 | 95 | 0.574346 | false | 4.183977 | false | false | false |
40323230/Pyslvs-PyQt5 | pyslvs_ui/entities/relocate_point_ui.py | 1 | 16987 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pyslvs_ui/entities/relocate_point.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from... | agpl-3.0 | 921,782,860,108,813,000 | 58.81338 | 115 | 0.714134 | false | 3.360435 | false | false | false |
zozo123/buildbot | master/buildbot/test/unit/test_buildslave_protocols_pb.py | 1 | 9511 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even... | gpl-3.0 | -7,822,177,358,557,186,000 | 39.130802 | 101 | 0.667963 | false | 3.913992 | true | false | false |
buffer/thug | thug/ActiveX/modules/JavaDeploymentToolkit.py | 1 | 1913 |
import logging
log = logging.getLogger("Thug")
def launch(self, arg):
log.ThugLogging.add_behavior_warn("[Java Deployment Toolkit ActiveX] Launching: %s" % (arg, ))
tokens = arg.split(' ')
if tokens[0].lower() != 'http:':
return
for token in tokens[1:]:
if not token.lower().startsw... | gpl-2.0 | 5,999,459,635,673,854,000 | 37.26 | 111 | 0.509671 | false | 4.185996 | false | false | false |
alvaroaleman/ansible | lib/ansible/inventory/__init__.py | 32 | 34639 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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
# (at your option) an... | gpl-3.0 | -3,553,771,108,302,727,700 | 39.184455 | 155 | 0.582984 | false | 4.335837 | false | false | false |
kate-v-stepanova/TACA | taca/illumina/MiSeq_Runs.py | 2 | 3883 | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.HiSeq_Runs import HiSeq_Run
from taca.utils import misc
from flowcell_parser.classes import RunParameter... | mit | 8,839,568,075,589,495,000 | 33.669643 | 124 | 0.594128 | false | 3.914315 | false | false | false |
ESOedX/edx-platform | common/djangoapps/util/request_rate_limiter.py | 2 | 1692 | """
A utility class which wraps the RateLimitMixin 3rd party class to do bad request counting
which can be used for rate limiting
"""
from __future__ import absolute_import
from django.conf import settings
from ratelimitbackend.backends import RateLimitMixin
class RequestRateLimiter(RateLimitMixin):
"""
Use ... | agpl-3.0 | 8,674,315,781,843,019,000 | 27.677966 | 89 | 0.638298 | false | 3.971831 | false | false | false |
SarahPythonista/acmpy | examples/cs106a/breakout.py | 1 | 3149 | from spgl.graphics.gwindow import *
from spgl.graphics.gobjects import *
from spgl.graphics.gevents import *
from spgl.gtimer import *
from spgl.grandom import *
import time
window = GWindow()
window.setWindowTitle("Breakout")
# waitForClick()
ball = GOval(20,20, window.getWidth()/2, window.getHeight()/2... | mit | 2,413,356,645,683,590,000 | 28.872549 | 97 | 0.62496 | false | 2.58751 | false | false | false |
SanPen/PracticalGridModeling | examples/topology_engine.py | 1 | 22254 | import numpy as np
import pandas as pd
from scipy.sparse import csc_matrix, lil_matrix, diags
from JacobianBased import IwamotoNR
np.set_printoptions(linewidth=10000, precision=3)
# pd.set_option('display.height', 1000)
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('d... | gpl-3.0 | -660,275,719,816,353,900 | 29.822715 | 129 | 0.517795 | false | 3.464197 | false | false | false |
jmuhlich/bayessb | examples/robertson/figs_msb_paper.py | 1 | 10106 | import bayessb
from pysb.examples.robertson import model
import pysb.integrate
import numpy
import matplotlib.pyplot as plt
import matplotlib.gridspec as mgridspec
import matplotlib.ticker as mticker
import functools
import sys
def likelihood(mcmc, position, data, scale_factor, sigma):
yout = mcmc.simulate(positio... | bsd-2-clause | -3,516,009,876,200,924,000 | 40.93361 | 109 | 0.596279 | false | 3.475241 | false | false | false |
fraser-lab/EMRinger | Phenix_Scripts/em_rscc.py | 1 | 4393 |
"""
Script to calculate per-residue RSCCs for a model versus an EM map with an
arbitrary origin.
"""
from __future__ import division
from mmtbx import real_space_correlation
import iotbx.phil
from cctbx import crystal
from cctbx import maptbx
from scitbx.array_family import flex
import sys
master_phil_str = """
mo... | bsd-3-clause | 266,659,448,091,182,000 | 31.301471 | 91 | 0.642841 | false | 2.768116 | false | false | false |
jzbontar/orange-tree | Orange/widgets/evaluate/owliftcurve.py | 1 | 8101 | """
Lift Curve Widget
-----------------
"""
from collections import namedtuple
import numpy
import sklearn.metrics as skl_metrics
from PyQt4 import QtGui
from PyQt4.QtGui import QColor, QPen
from PyQt4.QtCore import Qt
import pyqtgraph as pg
import Orange.data
import Orange.evaluation.testing
from Orange.widgets ... | gpl-3.0 | -6,325,582,373,010,567,000 | 28.458182 | 76 | 0.602642 | false | 3.540647 | false | false | false |
ingadhoc/odoo-nautical | nautical_x/wizard/contract_wizard.py | 2 | 1680 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp.osv import fields, osv
from openerp... | agpl-3.0 | 3,110,272,112,382,063,000 | 38.069767 | 125 | 0.544048 | false | 3.971631 | false | false | false |
lzhjie/benchmark | db_bench/DbBench.py | 1 | 15971 | # coding: utf-8
# Copyright (C) zhongjie luo <l.zhjie@qq.com>
import datetime, random, os, sys, copy, json
if sys.version_info.major >= 3:
from .tools.StopWatch import StopWatch
from .tools.ProgressBar import ProgressBar, MultiBar
from .tools.ColorPrint import ColorPrint
from .tools.MultiProcess import... | mit | -6,949,132,136,422,048,000 | 31.426531 | 105 | 0.561143 | false | 3.804837 | false | false | false |
larsks/cloud-init | cloudinit/config/cc_mcollective.py | 1 | 5204 | # Copyright (C) 2009-2011 Canonical Ltd.
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
#
# Author: Marc Cluet <marc.cluet@canonical.com>
# Based on code by Scott Moser <scott.moser@canonical.com>
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
# This file is part of cloud-init. See LICENSE file fo... | gpl-3.0 | -6,567,645,452,130,444,000 | 34.401361 | 79 | 0.623174 | false | 3.826471 | true | false | false |
VirusTotal/msticpy | tests/test_timeseries.py | 1 | 2573 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import os
... | mit | -4,295,610,028,682,117,600 | 35.239437 | 84 | 0.597357 | false | 3.675714 | true | false | false |
KaranToor/MA450 | google-cloud-sdk/lib/surface/compute/target_pools/remove_health_checks.py | 6 | 2895 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 5,334,987,423,451,908,000 | 35.64557 | 77 | 0.717098 | false | 4.07173 | false | false | false |
jamesrhaley/boilJS | GitBoil.py | 1 | 2946 | from subprocess import call
import shutil
import simplejson
from collections import OrderedDict
import os
import sys
# this is almost done but there is something wrong with the
# updating of the package.json file
## Helpers
# performs git clone into a new directory
def _clone_mkdir(git_url, new_name):
hole_path ... | mit | -1,293,920,882,973,797,400 | 28.46 | 86 | 0.590631 | false | 3.901987 | false | false | false |
JoeJasinski/WindyTransit | mobiletrans/mtdistmap/route_planner.py | 1 | 2026 | from __future__ import division
from django.contrib.gis.geos import Point, fromstr
from mobiletrans.mtlocation import models
from mobiletrans.mtdistmap.cta_conn import load_transitnetwork
from mobiletrans.mtdistmap.transit_network import Path
def distance_to_time(distance, unit="m", units_per_min=60):
return_value... | mit | -1,532,410,679,510,258,700 | 44.022222 | 131 | 0.653011 | false | 3.399329 | false | false | false |
sissaschool/elementpath | elementpath/regex/unicode_subsets.py | 1 | 18850 | #
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... | mit | 2,546,672,420,595,934,000 | 36.927565 | 97 | 0.564403 | false | 3.761724 | false | false | false |
Aeronautics/aero | aero/adapters/npm.py | 1 | 1826 | # -*- coding: utf-8 -*-
__author__ = 'nickl-'
__all__ = ('Npm', )
from string import strip
from re import match, sub
from aero.__version__ import __version__,enc
from .base import BaseAdapter
class Npm(BaseAdapter):
"""
Node package manager adapter.
"""
def search(self, query):
response = se... | bsd-3-clause | -2,070,850,359,834,000,600 | 31.035088 | 87 | 0.468237 | false | 3.566406 | false | false | false |
Morisset/PyNeb_devel | pyneb/sample_scripts/Choroni_School/ex2_1.py | 1 | 2618 | """
this file contains the definitions of the functions used to answer the questions of
exercise 2.1 of PLASMA DIAGNOSTICS
to execute these functions, one first needs to
import a few libraries as listed at the beginning of the file run_ex.py
as well as this file.
the functions can then be called as explained in the... | gpl-3.0 | 7,602,913,074,641,236,000 | 37.5 | 87 | 0.65317 | false | 3.486019 | false | false | false |
tanzaho/python-goose | goose/images/extractors.py | 3 | 2648 | # -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... | apache-2.0 | 3,659,734,277,561,665,000 | 34.306667 | 96 | 0.655589 | false | 3.882698 | false | false | false |
Emory-LCS/Alma-Public | NewEbooks/new_ebooks_api.py | 1 | 5458 | #!/opt/rh/python27/root/usr/bin/python
# -*- coding: utf-8 -*-
r"""
Program name: parse_new_ids.py
Author: Bernardo Gomez/Alex Cooper
Date: june, 2016
Purpose:
"""
import os
import sys
import re
import requests
import xml.etree.ElementTree as elementTree
def get_item_info(result_node,id_list):
outc... | gpl-3.0 | -8,139,539,969,137,573,000 | 27.134021 | 99 | 0.572188 | false | 3.463198 | false | false | false |
Caoimhinmg/PmagPy | programs/customize_criteria.py | 1 | 2371 | #!/usr/bin/env python
from __future__ import print_function
from builtins import input
import sys
import pmagpy.pmag as pmag
def main():
"""
NAME
customize_criteria.py
DESCRIPTION
Allows user to specify acceptance criteria, saves them in pmag_criteria.txt
SYNTAX
customize_crit... | bsd-3-clause | 5,930,729,533,313,144,000 | 31.479452 | 118 | 0.611556 | false | 3.406609 | false | false | false |
neuroidss/nupic.studio | nupic_studio/htm/node_sensor.py | 1 | 13088 | import os
import collections
import numpy
import operator
import math
import dateutil.parser
from PyQt4 import QtGui, QtCore
from nupic_studio import getInstantiatedClass
from nupic_studio.ui import Global
from nupic_studio.htm import maxPreviousSteps, maxFutureSteps, maxPreviousStepsWithInference
from nupic_... | gpl-2.0 | 3,352,760,374,799,920,000 | 34.055096 | 248 | 0.648227 | false | 4.524024 | false | false | false |
trailofbits/mcsema | tools/mcsema_disass/binja/util.py | 1 | 9080 | # Copyright (c) 2017 Trail of Bits, 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 ... | apache-2.0 | -7,528,632,476,422,962,000 | 25.627566 | 91 | 0.686454 | false | 3.29822 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.