repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rossmacarthur/dotfiles | src/bin/ips.py | 1 | 2375 | #!/usr/bin/env python
import re
import subprocess
import sys
try:
from itertools import izip_longest as zip_longest
except ImportError:
from itertools import zip_longest
def cmd(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = proc.commu... | mit | 2,503,024,137,759,607,300 | 24.265957 | 97 | 0.570105 | false | 3.462099 | true | false | false |
agiovann/Constrained_NMF | caiman/source_extraction/cnmf/online_cnmf.py | 1 | 132759 | #!/usr/bin/env python
""" Online Constrained Nonnegative Matrix Factorization
The general file class which is used to analyze calcium imaging data in an
online fashion using the OnACID algorithm. The output of the algorithm
is storead in an Estimates class
More info:
------------
Giovannucci, A., Friedrich, J., Kaufm... | gpl-2.0 | 6,921,836,185,124,489,000 | 49.787682 | 192 | 0.522345 | false | 3.366954 | false | false | false |
davidam/python-examples | gtk/table.py | 1 | 1509 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2018 David Arroyo Menéndez
# Author: David Arroyo Menéndez <davidam@gnu.org>
# Maintainer: David Arroyo Menéndez <davidam@gnu.org>
# This file 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 | -6,357,089,855,999,299,000 | 32.466667 | 70 | 0.726428 | false | 2.885057 | false | false | false |
commonsense/divisi | test/tests.py | 1 | 21584 | import unittest
from csc.divisi.tensor import DictTensor, DenseTensor
from csc.divisi.normalized_view import NormalizedView, TfIdfView
from csc.divisi.labeled_view import LabeledView, make_sparse_labeled_tensor
from csc.divisi.ordered_set import OrderedSet, IdentitySet
from csc.divisi.unfolded_set import UnfoldedSet
fr... | gpl-3.0 | 8,141,553,614,437,771,000 | 34.794362 | 108 | 0.56023 | false | 3.374609 | true | false | false |
peter-marriott/database-testing-with-docker | website_feature/web_service.py | 1 | 1890 | #!/usr/bin/env python
__author__ = 'PSM'
__version__ = "1.0.0"
import os
from bottle import auth_basic, route, run, response, request, abort
import psycopg2
import json
postgres_host = os.environ['APP_DB_HOST']
postgres_port = os.environ['APP_DB_PORT']
postgres_database = os.environ['APP_DB_DATABASE']
p... | apache-2.0 | -5,938,077,904,401,737,000 | 31.586207 | 194 | 0.601058 | false | 3.75 | false | false | false |
genevolv/dbrev | py/freevolv/models/dbrev/unique_keys_table.py | 1 | 3907 | ''' dbrev.unique_keys_table.UniqueKeysTable implements the
Flyweight pattern which handles caching.
'''
import logging
LOG = logging.getLogger(__name__)
# LOG.setLevel(logging.INFO)
# Long lines expected.
# pylint: disable=C0301
# Cyclic imports protected by functions
# pylint: disable=R0401
from freevolv.models... | bsd-2-clause | -1,987,666,346,601,208,800 | 39.697917 | 134 | 0.63527 | false | 3.7245 | false | false | false |
geobricks/geobricks_qgis_plugin_trmm | geobricks_qgis_plugin_trmm_libs/geobricks_trmm/core/trmm_core.py | 1 | 10303 | from ftplib import FTP
import datetime
import os
import webbrowser
conf = {
"source": {
"type": "FTP",
"ftp": {
"base_url": "arthurhou.pps.eosdis.nasa.gov",
"data_dir": "/pub/trmmdata/GIS/"
}
}
}
def list_years(username, password):
"""
List all the ava... | gpl-2.0 | 4,241,084,912,100,235,000 | 33.807432 | 125 | 0.480637 | false | 3.545423 | false | false | false |
DotStar-Game-of-Stocks/Website-Backend | StockScreener.py | 1 | 4555 | # -*- coding: utf-8 -*-
# StockScreener.py
"""
Version: 03.08.2015
A basic functionality Stock Screener class. Stock Data from yahoo api.
NOTE: needs two supplied .csv files of stock names.
@author: Luke_Wortsmann
"""
import csv
import datetime
import numpy as np
import matplotlib.colors as colors
import matplotlib... | mit | 6,407,063,835,193,309,000 | 30.413793 | 116 | 0.528211 | false | 3.853638 | false | false | false |
davenportw15/SnailMail | snailmail/models/user.py | 1 | 1963 | from sqlalchemy import Column, Integer, String, LargeBinary, \
Float
from sqlalchemy.orm import relationship, backref
from snailmail.database import Base
from snailmail.models import secure_pass
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key = True,nullable=False,
... | mit | -5,248,619,745,861,831,000 | 31.716667 | 67 | 0.6108 | false | 4.276688 | false | false | false |
pbougue/navitia | source/jormungandr/jormungandr/street_network/taxi.py | 1 | 8843 | # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public t... | agpl-3.0 | -7,714,249,329,209,951,000 | 43.888325 | 116 | 0.673301 | false | 3.923248 | true | false | false |
wpreimes/gldas | src/gldas/grid.py | 1 | 3720 | # The MIT License (MIT)
#
# Copyright (c) 2018, TU Wien
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | bsd-3-clause | 4,018,085,457,937,867,300 | 32.827273 | 88 | 0.654839 | false | 3.49953 | false | false | false |
aetherith/groupcurses | setup.py | 1 | 1416 | #!/usr/bin/env python
from os import path
from codecs import open
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file.
with open(path.join(here, 'README.md'), encoding='utf-8') as fh:
long_description = fh.read()
setup(
name... | mit | -4,076,119,948,699,361,300 | 27.32 | 64 | 0.600989 | false | 3.736148 | false | true | false |
roquepulido/plugin.video.miratuserietv | default.py | 1 | 10488 | #-------------------------------------------------------------------------------
# Name: plugin.video.miratuserietv
# Purpose: Plugin para Kodi/XBMC para ver las series del canal miratuserie.tv
#
# Author: roque.pulido@outlook.com
#
# Created: 07/11/2014
# Copyright: (c) roque.pulido 2014
# Licence: ... | gpl-2.0 | -4,961,655,181,172,353,000 | 49.912621 | 246 | 0.542429 | false | 3.477454 | false | false | false |
avlach/univbris-ocf | vt_manager/src/python/vt_manager/communication/sfa/drivers/VTSfaDriver.py | 1 | 3668 | import time
import datetime
#
from vt_manager.communication.sfa.util.faults import MissingSfaInfo, UnknownSfaType, \
RecordNotFound, SfaNotImplemented, SliverDoesNotExist
from vt_manager.communication.sfa.util.defaultdict import defaultdict
from vt_manager.communication.sfa.util.sfatime import utcparse, datetime_... | bsd-3-clause | 9,115,502,676,254,307,000 | 38.869565 | 142 | 0.682388 | false | 3.380645 | false | false | false |
libsmelt/Simulator | netos_machine.py | 1 | 2876 | #!/usr/bin/env python
#
# Copyright (c) 2013-2016, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
import sys
i... | mit | -7,326,401,569,838,633,000 | 26.92233 | 77 | 0.620306 | false | 4.19854 | false | false | false |
Arabidopsis-Information-Portal/PMR_API | services/metabolite_api/request_builder.py | 1 | 4260 | # PMR WebServices
# Copyright (C) 2016 Manhoi Hur, Belyaeva, Irina
# This file is part of PMR WebServices API.
#
# PMR API 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
... | gpl-2.0 | 8,480,292,778,197,000,000 | 32.023256 | 88 | 0.664789 | false | 3.933518 | false | false | false |
abertal/alpha | webapp/forms.py | 1 | 12767 | from decimal import Decimal as D
from django import forms
from django.utils.text import force_text
from django.utils.translation import ugettext_lazy as _
from core import models
class Fieldset:
def __init__(self, name, index):
self.name = name
self.index = index
self.fields = []
class... | bsd-3-clause | 214,026,866,460,382,180 | 30.413793 | 106 | 0.571429 | false | 3.975686 | false | false | false |
conejoninja/xbmc-seriesly | servers/netutv.py | 1 | 3060 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# seriesly - XBMC Plugin
# Conector para netutv
# http://blog.tvalacarta.info/plugin-xbmc/seriesly/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core import scrapert... | gpl-3.0 | 7,309,933,548,955,201,000 | 35.404762 | 174 | 0.60844 | false | 2.945087 | false | false | false |
RedFantom/GSF-Parser | parsing/ships.py | 1 | 7076 | """
Author: RedFantom
Contributors: Daethyra (Naiii) and Sprigellania (Zarainia)
License: GNU GPLv3 as in LICENSE
Copyright (C) 2016-2018 RedFantom
"""
# Standard Library
from os import path
import pickle as pickle
# Project Modules
from data import abilities
from data.components import *
from data.ships import ship_na... | gpl-3.0 | -7,690,446,241,302,984,000 | 32.065421 | 97 | 0.574194 | false | 4.055014 | false | false | false |
bparzella/secsgem | secsgem/secs/functions/s12f07.py | 1 | 2596 | #####################################################################
# s12f07.py
#
# (c) Copyright 2021, Benjamin Parzella. All rights reserved.
#
# 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 Fou... | lgpl-2.1 | -5,046,960,924,571,834,000 | 25.489796 | 69 | 0.475732 | false | 3.620642 | false | false | false |
codingpoets/tigl | bindings/bindings_generator/fortran03_generator.py | 1 | 21404 | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 16 13:57:10 2015
@author: Martin Siggel <martin.siggel@dlr.de>
@author: Melven Roehrig-Zoellner <Melven.Roehrig-Zoellner@DLR.de>
"""
class GeneratorException(Exception):
def __init__(self, errormsg, arg):
msg = errormsg + '\n'
msg += 'Argument wa... | apache-2.0 | -5,941,662,421,966,014,000 | 36.950355 | 127 | 0.495748 | false | 3.928781 | false | false | false |
elmeunick9/UPBGE-CommunityAddon | addon/community/game_project_export.py | 1 | 4527 | from .macro import *
from . import utils
import bpy, os, shutil, platform
from bpy.props import *
import time
class ExportGameProject(bpy.types.Operator):
bl_idname = "wm.export_game_project"
bl_label = "Export Game Project"
platform = EnumProperty(
name="Platform",
items=(('WIN32', "Windows-32", "Windows 3... | gpl-3.0 | -9,155,636,709,679,000,000 | 33.830769 | 147 | 0.653634 | false | 3.011976 | false | false | false |
PeterMosmans/security-scripts | display_results.py | 1 | 4452 | #!/usr/bin/env python3
import argparse
import ipaddress
import json
import sys
import textwrap
try:
from colorama import Fore, Style
except ImportError as exception:
print(
f"[-] Please install required modules, e.g. pip3 install -r requirements.txt: {exception}",
file=sys.stderr,
)
NAME ... | gpl-3.0 | 2,329,771,670,418,436,000 | 32.223881 | 122 | 0.574798 | false | 4.20794 | false | false | false |
snurkabill/pydeeplearn | code/lib/batchtrainer.py | 1 | 5988 | """ A neural network trainer with various options: rmsprop, nerterov, momentum etc.
This trainer is used for multiple types of neural nets: dbns and cnns and it is designed
to be adaptable to other types of networks as well.
"""
__author__ = "Mihaela Rosca"
__contact__ = "mihaela.c.rosca@gmail.com"
import numpy as np... | bsd-3-clause | 3,457,759,112,202,329,000 | 35.742331 | 128 | 0.651804 | false | 4.178646 | false | false | false |
sweemeng/Malaysian-Bill-Watcher | billwatcher/json_api.py | 1 | 1487 | import logging
import datetime
from bottle import route, request
import models
log = logging.getLogger(__name__)
@route('/api/single/',method='GET')
def single_item():
id = request.GET.get('id')
session = models.DBSession()
bill = session.query(models.Bill).get(id)
data = serialize_bill(bill)
re... | gpl-3.0 | -8,427,734,129,044,881,000 | 25.087719 | 75 | 0.593813 | false | 3.41055 | false | false | false |
JohnMaguire/Cardinal | plugins/timezone/plugin.py | 1 | 1885 | from datetime import datetime
import pytz
from pytz.exceptions import UnknownTimeZoneError
from cardinal.decorators import command, help
TIME_FORMAT = '%b %d, %I:%M:%S %p UTC%z'
class TimezonePlugin:
@command(['time'])
@help("Returns the current time in a given time zone or GMT offset.")
@help("Syntax:... | mit | 139,403,135,715,226,830 | 31.5 | 78 | 0.551194 | false | 4.124726 | false | false | false |
LividInstruments/LiveRemoteScripts | Livid_Alias8_v2/Map.py | 1 | 1761 | # by amounra 0216 : http://www.aumhaa.com
# written against Live 9.6 release on 021516
from ableton.v2.control_surface.elements.color import Color
from aumhaa.v2.livid.colors import *
"""
Alias_Map.py
Created by amounra on 2012-12-30.
Copyright (c) 2010 __artisia__. All rights reserved.
This file allows the reassi... | mit | 9,048,668,274,083,625,000 | 24.157143 | 116 | 0.72402 | false | 2.795238 | false | false | false |
duthils/osmose-frontend | tools/oauth.py | 1 | 2231 | #! /usr/bin/env python
#-*- coding: utf-8 -*-
from rauth import OAuth1Service, OAuth1Session
import requests
################################################################################
oauth_client_key = "zGtBQ4zQfaWqy0G3HtRua2d00gvIcSfS4iHHwH2s"
oauth_client_secret = "2KOQG8eUVvcHcTGV5I12XsseRuaeBW0vcmRTTuli"
... | gpl-3.0 | -8,176,685,749,082,845,000 | 33.323077 | 85 | 0.652622 | false | 3.411315 | false | false | false |
aeklant/scipy | scipy/special/_precompute/struve_convergence.py | 1 | 3432 | """
Convergence regions of the expansions used in ``struve.c``
Note that for v >> z both functions tend rapidly to 0,
and for v << -z, they tend to infinity.
The floating-point functions over/underflow in the lower left and right
corners of the figure.
Figure legend
=============
Red region
Power series is clo... | bsd-3-clause | 3,068,402,179,615,213,600 | 27.6 | 108 | 0.578671 | false | 2.708761 | false | false | false |
libvirt/libvirt-test-API | libvirttestapi/repos/interface/undefine.py | 1 | 1429 | # Copyright (C) 2010-2012 Red Hat, Inc.
# This work is licensed under the GNU GPLv2 or later.
import libvirt
import os
from libvirt import libvirtError
required_params = ('ifacename',)
optional_params = {}
def check_undefine_interface(ifacename):
"""Check undefining interface result, if undefine interface is su... | gpl-2.0 | -4,677,875,443,509,877,000 | 28.770833 | 78 | 0.648006 | false | 3.958449 | false | false | false |
openstack/reno | reno/tests/test_config.py | 1 | 7472 | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | apache-2.0 | 8,058,576,337,098,630,000 | 32.963636 | 75 | 0.620048 | false | 3.837699 | true | false | false |
aloncarmel/sublimecollaborator | Devunity.py | 1 | 8315 | import sublime, sublime_plugin, urllib, urllib2
import json, pprint, os, threading
class DevunityCommand(sublime_plugin.TextCommand):
settings = sublime.load_settings('Devunity.sublime-settings')
userid = settings.get('userid')
activeedit = 0
def run(self, edit):
self.activeedit = edit
sublime.active_win... | apache-2.0 | -2,582,830,312,269,463,000 | 32.668016 | 153 | 0.652075 | false | 3.204239 | false | false | false |
mfsteen/CIQTranslate-Kristian | stopwatch/__init__.py | 1 | 2688 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- 7oars.com)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import time
"""stopwatch is a very simple Python module for measuring time.
Great for ... | gpl-3.0 | 6,051,765,677,769,618,000 | 25.613861 | 76 | 0.589658 | false | 3.845494 | false | false | false |
daniele-athome/kontalk-legacy-xmppserver | test/c2s.py | 1 | 10449 | import base64, socket, sys
from twisted.application import service
from twisted.internet import defer, protocol, reactor
from twisted.python import log
from twisted.words.protocols.jabber import client, error, jid, sasl, xmlstream
from twisted.words.xish import domish
XPATH_ALL = "//*"
XPATH_AUTH = "//auth[@xmlns='%s'... | gpl-3.0 | 915,064,024,074,831,900 | 32.815534 | 82 | 0.594507 | false | 3.89162 | false | false | false |
gpg/gpgme | lang/python/examples/howto/decrypt-file.py | 1 | 1834 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, unicode_literals
# Copyright (C) 2018 Ben McGinnes <ben@gnupg.org>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free S... | lgpl-2.1 | 7,964,200,065,721,778,000 | 34.960784 | 79 | 0.718648 | false | 3.773663 | false | false | false |
koorgoo/django-taggee | tests/test_fields.py | 1 | 3252 | from django.db import models
from django import forms
from django.test import SimpleTestCase, TransactionTestCase
from taggee.fields import TagField
from .models import TagModel
class TagFieldTestCase(SimpleTestCase):
def setUp(self):
self.tags = TagField()
self.model = TagModel()
def test_de... | mit | 1,015,086,087,884,022,500 | 40.164557 | 93 | 0.664822 | false | 3.50431 | true | false | false |
OGRECave/blender2ogre | io_ogre/ogre/ogre_import.py | 1 | 53110 | #!BPY
"""
Name: 'OGRE for Kenshi (*.MESH)'
Blender: 2.80
Group: 'Import/Export'
Tooltip: 'Import/Export Kenhi OGRE mesh files'
Author: Someone
Based on the Torchlight Impost/Export script by 'Dusho'
Thanks goes to 'goatman' for his port of Ogre export script from 2.49b to 2.5x,
and 'CCCenturion' for trying to refac... | lgpl-2.1 | 6,875,403,762,157,136,000 | 38.486989 | 152 | 0.557466 | false | 3.76293 | false | false | false |
jicruz/heroku-bot | lib/youtube_dl/extractor/xhamster.py | 1 | 8678 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
clean_html,
dict_get,
ExtractorError,
int_or_none,
parse_duration,
unified_strdate,
)
class XHamsterIE(InfoExtractor):
_VALID_URL = r'''(?x)
... | gpl-3.0 | 6,214,241,276,567,643,000 | 36.244635 | 117 | 0.485481 | false | 3.421924 | false | false | false |
MrKaKisen/nafsdm | master-nafsdm/webinterface/database.py | 1 | 2985 | # nafsdm webinterface
# nafsdm_web.py
# main file for the database connection
# (c) Vilhelm Prytz 2018
# https://github.com/mrkakisen/nafsdm
import sqlite3
# general db connection
def dbConnection():
try:
connection = sqlite3.connect("/home/master-nafsdm/data/domains.sql")
except Exception:
# ... | gpl-3.0 | 6,113,896,654,990,758,000 | 25.891892 | 133 | 0.643551 | false | 3.836761 | false | false | false |
ponyii/The-favorite-pocket-world-of-Nebuchadnezzar-III-The-Rhino-in-exile | game/world_map/world_shape.py | 1 | 1587 | from . import generate_map_matrix as gen_map
from globals import G
from helpers import join, inv
from .cell_and_map_classes import *
def generate_island_matrix_with_topology(m_type, name, size_params, options = {"topology" : "plane"}):
matrix = []
if m_type == 'one hex':
matrix, border_info = gen_map.... | gpl-3.0 | 7,234,513,594,142,816,000 | 38.7 | 163 | 0.603655 | false | 3.442516 | false | false | false |
openstates/bobsled | bobsled/core.py | 1 | 1954 | import os
import asyncio
from bobsled import storages, runners, callbacks
from bobsled.environment import EnvironmentProvider
from bobsled.tasks import TaskProvider
from bobsled.utils import get_env_config, load_args
class Bobsled:
def __init__(self):
self.settings = {"secret_key": os.environ.get("BOBSLED... | mit | -1,459,396,788,815,971,300 | 34.527273 | 87 | 0.644319 | false | 3.99591 | false | false | false |
Suor/django-cacheops | setup.py | 1 | 1826 | from setuptools import setup
# Remove build status and move Gitter link under title for PyPi
README = open('README.rst').read() \
.replace('|Build Status|', '', 1) \
.replace('|Gitter|', '', 1) \
.replace('===\n', '===\n\n|Gitter|\n')
setup(
name='django-cacheops',
version='6.0',
au... | bsd-3-clause | 1,452,332,891,949,993,700 | 29.433333 | 98 | 0.564622 | false | 3.852321 | false | false | false |
franek/weboob | modules/creditmutuel/browser.py | 1 | 7907 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# 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 yo... | agpl-3.0 | 1,434,991,462,271,775,200 | 39.721649 | 116 | 0.629114 | false | 3.648961 | false | false | false |
raysanders/astrophysics | detrend.py | 1 | 1723 | # detrend.py
#
# this takes a simple csv of time-series data and applies a 2nd or 3rd order polynomial fit.
# useful for "detrending" astronomical time series data before processing.
#
# Ray Sanders - rjs@raymondjsanders.com
#
import pprint
import os
import sys
import numpy
from matplotlib import pyplot
from scipy.opti... | mit | -3,842,746,991,211,643,000 | 25.921875 | 112 | 0.738247 | false | 3.214552 | false | false | false |
hehongyu1995/Dxf2GCode | dxfimport/geoent_polyline.py | 1 | 9035 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
############################################################################
#
# Copyright (C) 2008-2015
# Christian Kohlöffel
# Vinzenz Schulz
#
# This file is part of DXF2GCODE.
#
# DXF2GCODE is free software: ... | gpl-3.0 | 6,252,427,910,680,802,000 | 33.661538 | 96 | 0.508877 | false | 3.413636 | false | false | false |
TakesxiSximada/TIL | python/pymysql/simple.py | 1 | 1114 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import argparse
import pymysql
import jctconv
from pit import Pit
def main(argv=sys.argv[1:]):
parser = argparse.ArgumentParser()
parser.add_argument('--limit', type=int, default=10)
parser.add_argument('table')
parser.add_argument('columns', n... | apache-2.0 | 5,915,895,712,233,088,000 | 22.208333 | 63 | 0.512567 | false | 3.750842 | false | false | false |
Warprobot/diplom | project/application/entities/lessons/views.py | 1 | 7434 | # -*- coding: utf-8 -*-
from flask import request, jsonify, g, url_for, Blueprint, render_template, redirect, flash
from flask.ext.login import login_required, current_user
from project.application.entities import db, auth
from project.application.entities.lessons.forms import CreateLessonForm, UpdateLessonForm, Visit... | cc0-1.0 | -5,078,840,722,146,160,000 | 40.412429 | 124 | 0.636289 | false | 3.325771 | false | false | false |
Ultis/simulationcraft | dbc_extract/dbc/generator.py | 1 | 114925 | import sys, os, re, types, HTMLParser, urllib2
import parser, db, data, constants
def _rune_cost(generator, filter_data, record, *args):
cost = 0
for rune_type in xrange(0, 3):
for i in xrange(0, getattr(record, 'rune_cost_%d' % (rune_type + 1))):
cost |= 1 << (rune_type * 2 + i)
... | gpl-3.0 | 7,490,169,349,518,780,000 | 41.112495 | 240 | 0.47008 | false | 3.700454 | false | false | false |
mattnenterprise/servo | components/style/properties/data.py | 1 | 19981 | # 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/.
import re
PHYSICAL_SIDES = ["top", "left", "bottom", "right"]
LOGICAL_SIDES = ["block-start", "block-end", "inline-star... | mpl-2.0 | 8,708,897,814,598,610,000 | 37.798058 | 116 | 0.597768 | false | 3.800837 | false | false | false |
bitcraft/pyglet | pyglet/text/__init__.py | 1 | 17111 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | bsd-3-clause | -4,699,416,334,080,068,000 | 31.905769 | 78 | 0.567705 | false | 4.426022 | false | false | false |
Smith42/heart-cnn | data_preprocess.py | 1 | 3924 | from __future__ import print_function
import numpy as np
import os
import glob
import h5py
import pydicom
from numpy import interp
import scipy, scipy.ndimage
# Import and preprocess data
# If the heart image stored dir has changed:
# * Change the directory and regex of the heart images to import in importType.
# ... | gpl-3.0 | -3,199,217,271,000,052,000 | 31.7 | 104 | 0.649847 | false | 2.957046 | false | false | false |
mirestrepo/voxels-at-lems | bvpl/bvpl_octree/corners/global_corners/compute_harris_measure.py | 1 | 6439 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 14, 2011
@author:Isabel Restrepo
Threshold taylor coefficients. Each block is processed in a separate thread.
"""
import os;
import bvpl_octree_batch
import multiprocessing
import Queue
import time
import random
import optparse
import sys
from numpy im... | bsd-2-clause | -232,129,920,481,295,870 | 28.272727 | 114 | 0.606305 | false | 3.425 | false | false | false |
BDT-GER/SWIFT-TLC | source/Build/install_packages/SWIFT-Tape-Auditor/vs_auditor/vs_server.py | 1 | 1797 | # Copyright (C) 2014 BDT Media Automation GmbH
#
# Author: Stefan Hauser <stefan.hauser@bdt.de>
#
# 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... | apache-2.0 | -8,304,243,819,185,245,000 | 37.234043 | 78 | 0.705064 | false | 4.038202 | false | false | false |
Tanych/CodeTracking | 255-Verify-Preorder-Sequence-in-Binary-Search-Tree/solution.py | 1 | 1419 | class Solution(object):
def verifypostorder(self,postorder):
# left-right-root
stck=[]
maxnum=1<<31
for i in xrange(len(postorder)-1,-1,-1):
if postorder[i]>maxnum:return False
while stck and postorder[i]<stck[-1]:
maxnum=stck.pop()
... | mit | -4,707,336,899,848,069,000 | 27.979592 | 65 | 0.475687 | false | 3.704961 | false | false | false |
phborba/dsgtoolsop | Rendezvous/interface.py | 1 | 1704 | # -*- coding: UTF-8 -*-
import os, processing
from qgis.PyQt import QtGui, uic, QtCore, QtWidgets
from qgis.core import QgsProject, QgsMapLayerProxyModel, QgsMessageLog, Qgis
from qgis.PyQt.QtWidgets import QMessageBox
GUI, _ = uic.loadUiType(os.path.join(
os.path.dirname(__file__), 'window.ui'))
class Interface(... | gpl-2.0 | -9,205,741,619,144,123,000 | 39.571429 | 111 | 0.650235 | false | 3.672414 | false | false | false |
Niceboy5275/PythonChess | classes/fou.py | 1 | 1378 | from piece import piece
class fou(piece):
def move(self, pos_x, pos_y, tableau, array):
curColor = tableau.getPion(pos_x, pos_y).getColor()
curX = pos_x + 1
curY = pos_y + 1
while (tableau.getPion(curX, curY) == None and curX <= 7 and curY <= 7):
tableau.setPossible(curX,... | mit | 8,980,312,151,402,015,000 | 37.277778 | 80 | 0.537736 | false | 3.008734 | false | false | false |
williamgilpin/rk4 | rk4_poincare.py | 1 | 1762 | from matplotlib.pyplot import *
from scipy import *
from numpy import *
# a simple Runge-Kutta integrator for multiple dependent variables and one independent variable
def rungekutta4(yprime, time, y0):
# yprime is a list of functions, y0 is a list of initial values of y
# time is a list of t-values at which ... | mit | -4,431,364,145,526,167,000 | 30.482143 | 105 | 0.58059 | false | 2.579795 | false | false | false |
zentralopensource/zentral | zentral/utils/mt_models.py | 1 | 10233 | import copy
from datetime import datetime
import hashlib
from django.core.exceptions import FieldDoesNotExist
from django.contrib.postgres.fields import JSONField
from django.utils.functional import cached_property
from django.utils.timezone import is_aware, make_naive
from django.db import IntegrityError, models, tran... | apache-2.0 | -2,720,717,764,024,205,000 | 36.621324 | 104 | 0.467703 | false | 4.104693 | false | false | false |
Azure/azure-sdk-for-python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py | 1 | 20647 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 3,958,884,035,958,178,000 | 47.467136 | 178 | 0.642176 | false | 4.330327 | true | false | false |
googleapis/googleapis-gen | google/cloud/dialogflow/v2/dialogflow-v2-py/google/cloud/dialogflow_v2/services/conversations/transports/base.py | 1 | 8997 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 7,963,919,160,411,683,000 | 38.809735 | 161 | 0.624542 | false | 4.45396 | false | false | false |
edx/programs | programs/apps/programs/migrations/0009_make_program_uuid_unique.py | 1 | 1960 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mimetypes
import os
import uuid
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db import migrations, models
def regenerate_uuids(apps, schema_editor):
"""
If any cases of non-unique uuids are found, regenerate ... | agpl-3.0 | -5,256,977,882,687,598,000 | 32.220339 | 96 | 0.65051 | false | 4.083333 | false | false | false |
jinlongwang/app_qr_analysis | db/db_session.py | 1 | 1878 | import os
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from db.db_model import User
from settings import DATABASE_NAME, HOST, PASSWORD, USER
from common.strUtil import md5
__all__=['Singleton', 'DBOBJ']
class Singleton(object):
"""
Singleton class
"""
def __init__(self... | apache-2.0 | -7,988,730,517,855,004,000 | 28.809524 | 113 | 0.625666 | false | 3.888199 | false | false | false |
luci/luci-py | appengine/components/components/datastore_utils/sharding.py | 2 | 2242 | # Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Sharding Entity group utility function to improve performance.
This enforces artificial root entity grouping, which can be actually useful in
... | apache-2.0 | -6,702,349,479,990,282,000 | 34.03125 | 80 | 0.716325 | false | 3.63961 | false | false | false |
whip112/Whip112 | kuma/wiki/tests/__init__.py | 1 | 6109 | from datetime import datetime
import time
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
from django.utils.text import slugify
from html5lib.filters._base import Filter as html5lib_Filter
from nose.tools import nottest
from waffle.models import Flag
from kuma.... | mpl-2.0 | 379,874,290,353,152,060 | 27.816038 | 78 | 0.614994 | false | 3.787353 | true | false | false |
kdlucas/pyrering | lib/baserunner_test.py | 1 | 10873 | #!/usr/bin/python
#
# Copyright 2008 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 app... | apache-2.0 | 3,203,161,190,981,161,500 | 36.236301 | 79 | 0.679481 | false | 3.649883 | true | false | false |
pymango/pymango | misc/python/mango/fmm/MixtureModel.py | 1 | 8154 |
import mango.utils
from .Gaussian import *
import copy
import re
import sys
import scipy as sp
import numpy as np
import scipy.stats
from mango import mpi
try:
from mango.fmm._PwGaussianMixelMixtureModel import csvParsePgmmm
except:
csvParsePgmmm = None
logger, rootLogger = mpi.getLoggers(__name__)
class Mi... | bsd-2-clause | 6,068,016,349,111,098,000 | 32.555556 | 130 | 0.573584 | false | 3.546759 | false | false | false |
NSLS-II-SRX/controlsui | controlsui/mk1/model.py | 1 | 14548 | import enaml
from enaml.qt.qt_application import QtApplication
from atom.api import *
import numpy as np
import os
import h5py
import urllib
from matplotlib.figure import Figure
from matplotlib.axes import Axes
from matplotlib.lines import Line2D
import itertools
from xray_vision.backend.mpl import cross_section_2d as ... | bsd-3-clause | 5,408,338,253,360,184,000 | 34.482927 | 79 | 0.582211 | false | 3.669105 | false | false | false |
SamHames/scikit-image | doc/examples/plot_segmentations.py | 1 | 3976 | """
====================================================
Comparison of segmentation and superpixel algorithms
====================================================
This example compares three popular low-level image segmentation methods. As
it is difficult to obtain good segmentations, and the definition of "good"
oft... | bsd-3-clause | -5,113,946,976,706,737,000 | 41.752688 | 83 | 0.72661 | false | 3.63105 | false | false | false |
magnetikonline/identix | identix.py | 1 | 15510 | #!/usr/bin/env python3
import argparse
import fnmatch
import hashlib
import json
import os
import re
import shutil
import sys
import time
from typing import Dict, List, Optional, Set, Tuple
FILE_CHUNK_SHA1_SIZE = 8192
REPORT_FILE_FORMAT_TEXT = "text"
REPORT_FILE_FORMAT_JSON = "JSON"
REPORT_FILE_FORMAT_JSON_SEPARATORS... | mit | -494,548,544,623,865,200 | 32.211991 | 96 | 0.582785 | false | 4.066597 | false | false | false |
SeerHewer/BittrexDataCollector | BittrexDataCollector/models/data.py | 1 | 1233 | ''' This application was developed for gathering financial data
from the Bittrex API with the purpose of storing it locally, and to be
easily accessed by different analysis tools including Excel, and Python, or
any software that can deal with CSV files. '''
__title__ = 'Bittrex Data Collector'
__author__ = 'Jacob Wee... | mit | 313,572,295,275,930,050 | 27.697674 | 75 | 0.663423 | false | 3.658754 | false | false | false |
vascotenner/holoviews | holoviews/plotting/widgets/__init__.py | 1 | 14600 | from __future__ import unicode_literals
import os, uuid, json, math
import param
from ...core import OrderedDict, NdMapping
from ...core.options import Store
from ...core.util import (dimension_sanitizer, safe_unicode,
unique_array, unicode, isnumeric)
from ...core.traversal import hierarch... | bsd-3-clause | 9,217,717,949,783,156,000 | 38.89071 | 123 | 0.559932 | false | 4.135977 | false | false | false |
erdc/proteus | proteus/tests/surface_tension/rising_bubble_rans3p/pressureInitial_p.py | 1 | 1297 | from __future__ import absolute_import
from builtins import object
from math import *
from proteus import *
from proteus.default_p import *
try:
from .risingBubble import *
except:
from risingBubble import *
from proteus.mprans import PresInit
name = "pressureInitial"
#LevelModelType = PresInit.LevelModel
coef... | mit | 6,511,099,363,939,596,000 | 29.880952 | 71 | 0.676176 | false | 3.449468 | false | false | false |
ypid/scripts | cdcat/cdcat/converter.py | 1 | 3839 | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2015 Robin Schneider <ypid@riseup.net>
#
# SPDX-License-Identifier: AGPL-3.0-only
"""
Telnet login script.
"""
__version__ = '0.5'
# modules {{{
# std {{{
import re
import logging
# }}}
from lxml import etree
# }}}
class CdCatDatabase:
_RE_RSYNC = re.compile(
... | agpl-3.0 | 5,823,566,484,958,226,000 | 25.475862 | 129 | 0.500912 | false | 3.541513 | false | false | false |
bruderstein/PythonScript | PythonLib/full/idlelib/idle_test/test_searchengine.py | 3 | 11588 | "Test searchengine, coverage 99%."
from idlelib import searchengine as se
import unittest
# from test.support import requires
from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text
from tkinter import messagebox
from idlelib.idle_test.mock_tk import Var, Mbox
from idlelib.idle_test.mock_tk import Text as mo... | gpl-2.0 | -697,341,935,088,639,500 | 33.903614 | 77 | 0.592941 | false | 3.481971 | true | false | false |
besacier/WCE-LIG | wce_system/lib/shell_script/add_char_end_of_sentence.py | 1 | 3460 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 12 13:24:12 2014
"""
#####################################################################################################
# Groupe d'Étude pour la Traduction/le Traitement Automatique des Langues et de la Parole (GETALP)
# Homepage: http://getalp.i... | gpl-3.0 | 53,826,402,963,015,340 | 34.295918 | 141 | 0.596704 | false | 3.428147 | true | false | false |
codertx/lightil | jwt_auth/authentication.py | 1 | 2007 | from rest_framework import authentication
from rest_framework import exceptions
from django.core.exceptions import ObjectDoesNotExist
from django.conf import settings
from jwt_auth.models import TokenBlackList, User
import re
import jwt
def validate_token(token):
"""
Validate token
"""
# check whether... | mit | 1,255,989,938,556,783,400 | 29.409091 | 112 | 0.65421 | false | 4.733491 | false | false | false |
nbir/gambit-scripts | scripts/calc_visits/src/calc_visits.py | 1 | 12535 | # Gambit scripts
#
# Copyright (C) USC Information Sciences Institute
# Author: Nibir Bora <nbora@usc.edu>
# URL: <http://cbg.isi.edu/>
# For license information, see LICENSE
import os
import sys
import csv
import math
import pickle
import anyjson
import psycopg2
import matplotlib
import numpy as np
import lib.geo as ... | apache-2.0 | -1,908,312,494,149,285,600 | 32.337766 | 142 | 0.631113 | false | 2.586669 | false | false | false |
qiang437587687/pythonBrother | Borther/WebApp/orm.py | 1 | 13497 | # #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
#
# __author__ = 'zhangxianqiang'
#
# import asyncio, logging
#
# import aiomysql
#
# def log(sql, args=()):
# logging.info('SQL: %s' % sql)
#
# @asyncio.coroutine
# def creat_pool(loop, **kw):
# logging.info('creat database connection pool...')
# global __... | mit | 1,638,783,194,755,912,000 | 32.769036 | 171 | 0.534235 | false | 3.494878 | false | false | false |
jerbob92/CouchPotatoServer | couchpotato/core/plugins/release/main.py | 1 | 10124 | from couchpotato import get_session
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent, addEvent
from couchpotato.core.helpers.encoding import ss
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
from couchpotato.core.plugins.scanner.main import ... | gpl-3.0 | -6,602,918,566,604,401,000 | 33.790378 | 197 | 0.546622 | false | 4.01746 | false | false | false |
phantomii/restalchemy | restalchemy/tests/functional/restapi/ra_based/microservice/storable_models.py | 1 | 1070 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2016 Eugene Frolov <eugene@frolov.net.ru>
#
# 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
#
# ... | apache-2.0 | -5,931,309,392,571,769,000 | 32.4375 | 78 | 0.734579 | false | 3.728223 | false | false | false |
thumt/THUMT | thumt/utils/evaluation.py | 1 | 7503 | # coding=utf-8
# Copyright 2017-2020 The THUMT Authors
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import datetime
import glob
import operator
import os
import shutil
import time
import torch
import torch.distributed as dist
from thumt.data.vocab impo... | bsd-3-clause | -7,614,433,911,491,618,000 | 27.637405 | 79 | 0.555245 | false | 3.772247 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/scipy/io/matlab/tests/test_mio_funcs.py | 1 | 1887 | #!/usr/bin/env python
''' Jottings to work out format for __function_workspace__ matrix at end
of mat file.
'''
from __future__ import division, print_function, absolute_import
from os.path import join as pjoin, dirname
import sys
from io import BytesIO
from numpy.testing import \
assert_array_equ... | gpl-3.0 | 7,580,677,955,449,898,000 | 24.577465 | 72 | 0.600954 | false | 3.253448 | false | false | false |
huard/scipy-work | scipy/io/netcdf.py | 1 | 8702 | """NetCDF file reader.
This is adapted from Roberto De Almeida's Pupynere PUre PYthon NEtcdf REader.
classes changed to underscore_separated instead of CamelCase
TODO:
Add write capability.
"""
#__author__ = "Roberto De Almeida <rob@pydap.org>"
__all__ = ['netcdf_file', 'netcdf_variable']
import struct
import... | bsd-3-clause | -5,844,132,031,011,587,000 | 29.426573 | 129 | 0.52758 | false | 3.670181 | false | false | false |
datacommonsorg/website | server/routes/browser.py | 1 | 1095 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 3,409,441,612,738,864,600 | 32.181818 | 80 | 0.728767 | false | 3.674497 | false | false | false |
koldunovn/fixnc | tests/test_fixnc.py | 1 | 2624 | import pytest
import fixnc as fnc
from netCDF4 import Dataset
from collections import OrderedDict
import os
import numpy as np
fl2 = Dataset('./tests/test.nc')
nc = fnc.ncfile(fl2)
def test_repr():
assert len(nc.__repr__()) > 0
assert nc.__repr__().startswith('File')
def test_ncfile():
assert nc.dims.ke... | mit | 9,122,105,674,451,835,000 | 30.238095 | 114 | 0.578125 | false | 3.097993 | true | false | false |
jiyfeng/DPLP | code/datastructure.py | 1 | 2050 | ## datastructure.py
## Author: Yangfeng Ji
## Date: 08-29-2013
## Time-stamp: <yangfeng 02/14/2015 00:28:50>
class SpanNode(object):
""" RST tree node
"""
def __init__(self, prop):
""" Initialization of SpanNode
:type text: string
:param text: text of this span
"""
... | mit | 8,144,335,885,355,023,000 | 24.308642 | 52 | 0.55122 | false | 3.782288 | false | false | false |
tago-io/tago-python | !example/register_run_user.py | 1 | 1138 | # To run it, you should have inside the example folder
import sys
sys.path.append('..')
import tago
ANALYSYS_TOKEN = 'a5da3fc5-3cd5-4ee4-9ab4-d781aab65ffd'
def my_analysis(context, scope):
# Getting the account token from analysis environment variable
account_token = list(filter(lambda account_token: account_to... | mit | 4,953,442,311,131,126,000 | 28.179487 | 114 | 0.697715 | false | 3.376855 | false | false | false |
avicennax/jedi | scripts/sfn_tasks/flipflop/flipflop_both_noise.py | 1 | 3308 | from __future__ import division
import jedi.jedi as jedi
from jedi.utils import plot, init_tools, seedutil
import numpy as np
import cPickle
import sys
def main(seed):
# Setting Seeds
seeds = seedutil.load_seeds("main_seeds.npy", "../../../data/stability")
if seed is not None:
seeds = seeds[:seed]
... | mit | 1,362,968,733,767,643,400 | 33.46875 | 110 | 0.574063 | false | 3.285005 | false | false | false |
tboyce1/home-assistant | homeassistant/components/light/insteon_local.py | 6 | 2662 | """
Support for Insteon dimmers via local hub control.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/light.insteon_local/
"""
import logging
from datetime import timedelta
from homeassistant.components.light import (
ATTR_BRIGHTNESS, SUPPORT_BRIGH... | apache-2.0 | -5,968,967,339,932,307,000 | 26.163265 | 75 | 0.62885 | false | 3.802857 | false | false | false |
SergeySatskiy/codimension | codimension/utils/globals.py | 1 | 5489 | # -*- coding: utf-8 -*-
#
# codimension - graphics python two-way code editor and analyzer
# Copyright (C) 2010-2017 Sergey Satskiy <sergey.satskiy@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 Softw... | gpl-3.0 | 4,986,471,374,582,943,000 | 31.47929 | 74 | 0.627801 | false | 4.451744 | false | false | false |
sknepneklab/SAMoS | configurations/MakeConfigurations/random_plane.py | 1 | 7449 | # * *************************************************************
# *
# * Soft Active Mater on Surfaces (SAMoS)
# *
# * Author: Rastko Sknepnek
# *
# * Division of Physics
# * School of Engineering, Physics and Mathematics
# * University of Dundee
# *
# * (c) 2013, 2014
# *
# * School of Scienc... | gpl-3.0 | -3,206,215,340,464,915,000 | 31.814978 | 133 | 0.60102 | false | 2.73961 | false | false | false |
waveplot/schema | wpschema/waveplot.py | 1 | 5677 | # -*- coding: utf8 -*-
# Copyright (C) 2014 Ben Ockmore
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This progr... | gpl-3.0 | 3,258,521,387,253,779,000 | 29.521505 | 79 | 0.669896 | false | 3.848814 | false | false | false |
JNRowe/rdial | rdial/cmdline.py | 1 | 25667 | #
"""cmdline - Command line functionality for rdial."""
# Copyright © 2012-2019 James Rowe <jnrowe@gmail.com>
# Nathan McGregor <nathan.mcgregor@astrium.eads.net>
# Rach Holmes <rach.c.holmes@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0+
#
# This file is part of rdial.
... | gpl-3.0 | 2,768,469,959,864,319,000 | 29.429929 | 79 | 0.585317 | false | 3.979189 | false | false | false |
levilucio/SyVOLT | UMLRT2Kiltera_MM/transformation/no_contains/HBasicState2ProcDef.py | 1 | 3830 | from core.himesis import Himesis
import uuid
class HBasicState2ProcDef(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the DSLTrans rule BasicState2ProcDef.
"""
# Flag this instance as compiled now
self.is_compiled = True
... | mit | -2,122,819,429,758,119,000 | 33.818182 | 199 | 0.486945 | false | 3.868687 | false | false | false |
shwetank6044/gesture-hawk | extreme.py | 1 | 2411 | import cv2
import numpy as np
import imutils
import serial
#ser = serial.Serial('/dev/ttyACM0', baudrate = 9600) #ACM0
#ser.write(b'70')
cp1 = cv2.imread('ph1.jpg')
hsa = cv2.cvtColor(cp1, cv2.COLOR_BGR2HSV)
lower_blue = np.array([110,50,50])
upper_blue = np.array([130,255,255])
mask2 = cv2.inRange(... | gpl-3.0 | -378,719,779,454,187,970 | 31.146667 | 146 | 0.647449 | false | 2.118629 | false | false | false |
EdDev/vdsm | vdsm_hooks/vmfex/before_vm_start.py | 1 | 6564 | #!/usr/bin/python2
import os
import sys
import hooking
import traceback
import fcntl
import ast
from xml.dom import minidom
try:
# 3.0 compat
import libvirtconnection
libvirtconnection
except ImportError:
# 3.1 compat
from vdsm import libvirtconnection
'''
Placed in before_vm_start
vmfex hook:
Ad... | gpl-2.0 | -1,274,456,701,245,030,100 | 32.151515 | 72 | 0.630561 | false | 3.840843 | false | false | false |
codingo/Reconnoitre | Reconnoitre/lib/find_dns.py | 1 | 1914 | from Reconnoitre.lib.file_helper import check_directory
from Reconnoitre.lib.file_helper import load_targets
from Reconnoitre.lib.subprocess_helper import run_scan
def find_dns(target_hosts, output_directory, quiet):
check_directory(output_directory)
dns_server_list = []
results = 0
hostcount = 0
... | gpl-3.0 | -6,765,852,026,199,942,000 | 36.529412 | 73 | 0.560084 | false | 3.625 | false | false | false |
xhan-shannon/SystemControlView | base/vdstate.py | 1 | 17273 | #--*-- coding:utf-8 --*--
'''
Created on 2015��5��19��
@author: stm
'''
from utils import DebugLog
from base.cmdmsg import CMDMsg, SERVERSCAN, INSTALLVIOS, UPDATEPASSWD,\
RECOVERPROFILE, POWERONSERVER, CREATEVIOSLPAR, PREPAREHOSTSFILE, DEFINESERVER,\
ASSIGNRESOURCE, REMVSERVER, RST_FW_FCTRY, RMV_NON_H... | gpl-2.0 | 4,629,208,511,062,365,000 | 33.230612 | 120 | 0.512195 | false | 3.616384 | false | false | false |
pyprism/Hiren-Disk | hiren/disk/views.py | 1 | 3350 | from django.shortcuts import render, redirect
from .models import Disk, Box
from django.contrib import auth
from django.contrib import messages
from django.http import HttpResponse
from django.core import serializers
from .disk import save_db
from os import system
from django.shortcuts import render_to_response
from .... | mit | 2,082,498,591,875,525,400 | 27.389831 | 89 | 0.617313 | false | 3.950472 | false | false | false |
rscalzo/GPIa | build_IDR.py | 1 | 6529 | #!/usr/bin/env python
"""
RS 2017/03/01: Simple target class to read in and hold JLA data
This reads in data files on type Ia supernova light curves from
"Improved cosmological constraints from a joint analysis
of the SDSS-II and SNLS supernova samples",
M. Betoule et al., A&A 568, A22 (2014).
I cal... | mit | -4,811,102,406,501,699,000 | 40.852564 | 79 | 0.565324 | false | 3.355087 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.