repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
todd-x86/tkplus | exception.py | 1 | 1522 | from form import Form
from button import Button
from label import Label
from image import Image
from memo import Memo
import os
import Tkinter as tk
import traceback
def handle_exception(ex, stacktrace=None):
err_icon = os.path.join(os.path.dirname(__file__), 'graphics', 'icon_error.gif')
frm = Form(caption='E... | apache-2.0 | -826,496,938,995,160,800 | 31.382979 | 84 | 0.618922 | false |
lingfliu/smart_tuwa | twrt/testbed/massive_scene_test.py | 1 | 3298 | import socket
import time
import sys
import random
import math
import threading
msg_header = 'AADD'
msg_stamp = '\x00\x00\x00\x00'
msg_id_gw = '2016A008'
msg_id_dev = '00000000'
msg_devtype = '\x01\x00'
msg_auth_key = '88888888'
msg_auth_datatype = '\x1c\x00'
msg_auth = msg_header+msg_stamp+msg_id_gw+msg_id_dev+ms... | apache-2.0 | -1,788,681,679,811,182,000 | 28.711712 | 229 | 0.583081 | false |
sublime-ycmd/sublime-ycmd | tests/lib/subtest.py | 1 | 1883 | #!/usr/bin/env python3
'''
tests/lib/subtest.py
Utility functions for running sub-tests within a test case. Includes additional
logging to add context during sub-test execution.
'''
import logging
import unittest
from tests.lib.decorator import log_function
logger = logging.getLogger('sublime-ycmd.' + __name__)
de... | mit | 7,860,737,243,510,147,000 | 30.383333 | 79 | 0.619225 | false |
charlesll/RamPy | legacy_code/IR_dec_comb.py | 1 | 6585 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 22 07:54:05 2014
@author: charleslelosq
Carnegie Institution for Science
"""
import sys
sys.path.append("/Users/charleslelosq/Documents/RamPy/lib-charles/")
import csv
import numpy as np
import scipy
import matplotlib
import matplotlib.gridspec as gridspec
from pylab ... | gpl-2.0 | 1,000,396,658,416,147,200 | 38.668675 | 193 | 0.632194 | false |
tarikgwa/nfd | newfies/mod_registration/forms.py | 1 | 1850 | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# 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) 2011-2014 Star2Billing S.L.
#
# The primar... | mpl-2.0 | 7,480,438,449,943,020,000 | 30.896552 | 76 | 0.6 | false |
argonemyth/argonemyth-blog | blog/migrations/0008_auto__add_field_photo_orientation.py | 1 | 8412 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Photo.orientation'
db.add_column(u'blog_photo', 'orientation',
self.gf... | gpl-3.0 | -4,360,855,887,661,198,000 | 72.798246 | 187 | 0.552306 | false |
astroScott/TeachingUtilities | classutils.py | 1 | 5241 | import os
from configparser import ConfigParser
import string
from numpy import std, mean
def read_config(file = 'configdata.cfg'):
"""
read the configuration file, by default configdata.cfg.
returns a dict containing relevant config info.
"""
config = ConfigParser()
config.read(file)
asse... | gpl-2.0 | -6,433,354,924,796,667,000 | 29.47093 | 96 | 0.552566 | false |
batra-mlp-lab/DIGITS | digits/dataset/tasks/analyze_db.py | 1 | 4644 | # Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
import sys
import os.path
import re
import digits
from digits.utils import subclass, override
from digits.task import Task
# NOTE: Increment this everytime the pickled object
PICKLE_VERSION = 1
@subclass
class AnalyzeDbTask(Task):
"""
Reads inf... | bsd-3-clause | 8,634,382,080,693,580,000 | 29.352941 | 106 | 0.566322 | false |
JSeam2/IsoGraph | old/gen_iso_graph.py | 1 | 4050 | # -*- coding: utf-8 -*-
"""
Generate adjacency matrices of isomorphic graphs
task
1) Check the sizes of isomorphic graphs you want to generate
2) Store them in different numpy files for various graph sizes
Build a table for example:
______________________________________
| Graph 1 | Graph 2 | Is Isomorphic? |
|-----... | mit | -5,893,967,120,085,904,000 | 27.814286 | 130 | 0.57883 | false |
adamfisk/littleshoot-client | server/common/appengine/patch/common/appenginepatch/ragendja/forms.py | 1 | 11392 | from copy import deepcopy
import re
from django.utils.datastructures import SortedDict, MultiValueDict
from django.utils.html import conditional_escape
from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode
from django.utils.safestring import mark_safe
from django.forms.widgets import flatatt
fr... | gpl-2.0 | 5,366,842,550,476,129,000 | 39.397163 | 196 | 0.561271 | false |
Shinoby1992/xstream | default.py | 1 | 1196 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
from os import getcwd
from os.path import join
from sys import path
import xbmc
from xbmc import log
from resources.lib import common
__settings__ = common.addon
__cwd__ = common.addonPath
# Add different library path
path.append(join(__cwd__, "resources",... | gpl-3.0 | -5,597,492,991,402,507,000 | 30.378378 | 153 | 0.624582 | false |
sokolic/miniSASS | minisass_registration/forms.py | 1 | 6601 | from django import forms
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
# Frank Sokolic: June 2018 - Disabled all the recaptcha code as version 1 is no longer supported
#from cmsplugin_contact.nospam.widgets import RecaptchaChallenge, RecaptchaResponse
from registration.forms ... | gpl-3.0 | -6,425,227,694,695,306,000 | 43.904762 | 177 | 0.609302 | false |
EvolutionClip/pyload | module/plugins/hooks/OverLoadMe.py | 1 | 1605 | # -*- coding: utf-8 -*-
from module.plugins.internal.MultiHook import MultiHook
class OverLoadMe(MultiHook):
__name__ = "OverLoadMe"
__type__ = "hook"
__version__ = "0.04"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
... | gpl-3.0 | 841,295,249,525,964,800 | 50.774194 | 138 | 0.456075 | false |
zathras777/pywind | pywind/elexon/cmd.py | 1 | 11805 | from datetime import timedelta, time, datetime, date
from pywind.elexon.api import B1420, B1330, B1320, FUELINST, \
DERSYSDATA, DERBMDATA, BMUNITSEARCH, \
B1610, B1630, UOU2T52W
from pywind.elexon.unit import BalancingData
from pywind.utils import StdoutForma... | unlicense | 6,573,191,138,269,887,000 | 35.661491 | 122 | 0.55036 | false |
LLNL/spack | lib/spack/spack/cmd/configure.py | 2 | 3097 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import argparse
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.... | lgpl-2.1 | -8,002,407,861,356,429,000 | 35.435294 | 119 | 0.683565 | false |
qsnake/gpaw | gpaw/test/wannier_ethylene.py | 1 | 2008 | import os
from ase import Atom, Atoms
from gpaw import GPAW
from gpaw.test import equal
from gpaw.wannier import Wannier
import numpy as np
# GPAW wannier example for ethylene corresponding to the ASE Wannier
# tutorial.
a = 6.0 # Size of unit cell (Angstrom)
ethylene = Atoms([Atom('H', (-1.235,-0.936 , 0 )),
... | gpl-3.0 | -7,751,138,382,603,430,000 | 29.424242 | 75 | 0.575697 | false |
jpypi/dup-image-search | simple_hash/fast_simple_hash.py | 1 | 1638 | #!/usr/bin/env python2
"""
simple_hash.py
Generates a hash using the "simple" method outlined on:
http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
:author: Brandon Arrendondo
:author: James Jenkins
:license: MIT
"""
import sys
import argparse
import numpy
import glo... | mit | 3,918,191,656,420,829,000 | 23.818182 | 79 | 0.617827 | false |
taget/node | scripts/password.py | 1 | 2111 | #!/usr/bin/python
# password.py - Copyright (C) 2010 Red Hat, Inc.
# Written by Joey Boggs <jboggs@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# Thi... | gpl-2.0 | -1,600,541,113,615,766,800 | 35.396552 | 81 | 0.702037 | false |
gamingrobot/SpockBot | spockbot/plugins/helpers/entities.py | 1 | 6663 | """
An entity tracker
"""
from spockbot.mcdata.utils import Info
from spockbot.plugins.base import PluginBase, pl_announce
class MCEntity(Info):
eid = 0
status = 0
nbt = None
metadata = None
class MovementEntity(MCEntity):
x = 0
y = 0
z = 0
yaw = 0
pitch = 0
on_ground = True
... | mit | -3,606,966,926,603,620,400 | 31.34466 | 70 | 0.585922 | false |
boundlessgeo/qgis-connect-plugin | boundlessconnect/connect.py | 1 | 16927 | # -*- coding: utf-8 -*-
from builtins import object
import os
import re
import json
import base64
import urllib2
import tempfile
from copy import copy
import webbrowser
from qgis.PyQt.QtGui import QIcon, QCursor
from qgis.PyQt.QtCore import Qt, QUrl, QFile, QEventLoop
from qgis.PyQt.QtWidgets import QMessageBox, QAp... | gpl-2.0 | 3,266,682,857,822,858,000 | 33.19596 | 170 | 0.555858 | false |
xxn59/weat | app/views.py | 1 | 14710 | from flask import render_template, flash, redirect, session, url_for, request, g, make_response
from flask.ext.login import login_user, logout_user, current_user, login_required
from . import db, lm
from . import app
from .forms import LoginForm, SignupForm, FoodForm, ChangePasswordForm, AddFoodForm, EditForm
from date... | mit | -8,336,185,183,291,548,000 | 34.617433 | 118 | 0.547927 | false |
wmealem/VerbTrainer | languages/spanish.py | 1 | 8117 | # Spanish verb conjugations
from collections import namedtuple, OrderedDict
# Spanish has two forms of the sps familiar - 'tú' and 'vos'
SpanishCategory = namedtuple('SpanishCategory', 'fps sps spsv tps fpp spp tpp')
_PRONOUNS = SpanishCategory('yo', 'tú', 'vos', 'él/ella/usted',
'nosotros/... | mit | 232,128,548,254,710,900 | 38.880597 | 81 | 0.513473 | false |
ajponte/yelpML | maps/tests/7.py | 1 | 4726 | test = {
'name': 'Problem 7',
'points': 3,
'suites': [
{
'cases': [
{
'answer': '7b94a2861b435311f9fceeb5e6f092c4',
'choices': [
'the restaurants in restaurants',
'the names of restaurants in restaurants',
'the extracted values for each res... | mit | -1,079,751,825,662,691,100 | 31.156463 | 85 | 0.371985 | false |
dayatz/taiga-back | tests/integration/resources_permissions/test_projects_choices_resources.py | 1 | 96198 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2017 Anler Hernández ... | agpl-3.0 | 2,196,972,104,921,484,500 | 40.751302 | 120 | 0.642913 | false |
GoogleCloudPlatform/declarative-resource-client-library | python/services/iam/role.py | 1 | 11094 | # Copyright 2021 Google LLC. 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 o... | apache-2.0 | -2,879,384,759,754,092,000 | 38.201413 | 87 | 0.655129 | false |
zadarastorage/zadarapy | zadarapy/vpsaos/drives.py | 1 | 2669 | # Copyright 2019 Zadara Storage, Inc.
# Originally authored by Jeremy Brown - https://github.com/jwbrown77
#
# 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... | apache-2.0 | 2,293,885,315,494,486,800 | 36.069444 | 77 | 0.694642 | false |
sekikn/ambari | ambari-server/src/test/python/custom_actions/TestUpdateRepo.py | 2 | 5282 | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | apache-2.0 | 2,976,111,629,241,852,400 | 44.543103 | 146 | 0.46933 | false |
luotao1/Paddle | python/paddle/dataset/cifar.py | 1 | 5299 | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 | 603,859,091,514,423,700 | 30.730539 | 188 | 0.66371 | false |
igordejanovic/textX | tests/functional/test_metamodel/test_model_params.py | 1 | 5362 | from __future__ import unicode_literals
from click.testing import CliRunner
import os.path
from pytest import raises
from textx import metamodel_from_str
from textx.cli import textx
from textx.exceptions import TextXError
from textx.generators import gen_file, get_output_filename
from textx import language, generator... | mit | 5,578,914,488,214,486,000 | 31.49697 | 85 | 0.614323 | false |
mulkieran/justbytes | src/justbytes/_errors.py | 1 | 3871 | # Copyright (C) 2015 - 2019 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in t... | gpl-2.0 | -550,328,828,070,604,900 | 30.471545 | 86 | 0.671144 | false |
edx/xblock-lti-consumer | lti_consumer/migrations/0002_ltiagslineitem.py | 1 | 1256 | # Generated by Django 2.2.16 on 2020-09-29 21:48
from django.db import migrations, models
import django.db.models.deletion
import opaque_keys.edx.django.models
class Migration(migrations.Migration):
dependencies = [
('lti_consumer', '0001_initial'),
]
operations = [
migrations.CreateMod... | agpl-3.0 | 6,771,993,912,979,698,000 | 42.310345 | 161 | 0.61465 | false |
Micronaet/micronaet-migration | base_accounting_program/accounting.py | 1 | 14040 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | agpl-3.0 | 3,122,961,838,378,075,600 | 37.565934 | 86 | 0.557701 | false |
inertialsense/InertialSenseSDK | python/pylib/ISToolsDataSorted.py | 1 | 51887 | '''
Created on Feb 22, 2014
@author: waltj
'''
from numbers import Number
import numpy as np
import os
import glob
import sys
import simplekml
import ctypes as ct
import pylib.pose as pose
import pylib.filterTools as ft
# Profiling code
import time as systime
from numpy import uint8 as u8
from numpy import uint16 as... | mit | -7,239,151,973,451,428,000 | 32.260897 | 170 | 0.488658 | false |
GPflow/GPflowOpt | doc/source/conf.py | 1 | 5534 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# GPflowOpt documentation build configuration file, created by
# sphinx-quickstart on Sun Apr 30 20:34:41 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | apache-2.0 | -5,716,388,727,266,818,000 | 29.574586 | 98 | 0.68305 | false |
rsip22/101 | Python/OO/cheapest_options/models/establishment.py | 1 | 1339 | import random
from constants import PRICE_TABLE
from enums import client
class Establishment:
"""
Class for an establishment in the chain.
Attributes:
name: (str) name of the establishment
stars: (int) establishment category
is_rewards: (bool) establishment client participates in... | gpl-2.0 | 1,346,721,449,851,784,400 | 30.880952 | 83 | 0.659447 | false |
majek/rons | rons/parser.py | 1 | 4184 | '''
Recursive decoder for Redis protocol. The code is quite reasonable and
has no external dependencies whatsoever.
To test run:
$ python -m doctest parser.py -v
'''
import collections
import itertools
class ProtocolError(Exception): pass
EMPTY=0
BULK=1
MULTIBULK=2
_State = collections.namedtuple('State', ['s', 'l'... | mit | 6,675,986,615,087,071,000 | 33.578512 | 234 | 0.48088 | false |
jameskyle/KExperiment | Scripts/create_task_list.py | 1 | 1800 | #!/opt/local/bin/python
import os
import sys
import re
import fnmatch
PROJECT_NAME = "KExperiment"
source_reg = re.compile(".*\.(cpp|h)$")
task_reg = re.compile("^\s*/+\s*(TODO|FIXME|BUG|NOTE|HACK):?\s*(.*)$", re.I)
source_match = source_reg.match
task_match = task_reg.match
def main():
output = os.path.join(os.... | gpl-3.0 | -2,010,988,968,146,286,000 | 28.52459 | 76 | 0.468333 | false |
energyPATHWAYS/energyPATHWAYS | energyPATHWAYS/dispatch_maintenance.py | 1 | 7610 |
from pyomo.environ import *
import numpy as np
import util
import config as cfg
import pdb
import pandas as pd
import copy
import dispatch_budget
import logging
def surplus_capacity(model):
return model.surplus_capacity + model.peak_penalty * model.weight_on_peak_penalty
def define_penalty_to_preference_high_cos... | mit | 2,130,111,249,588,512,000 | 54.152174 | 159 | 0.719054 | false |
alisonken1/openlp-projector-2.0 | openlp/projectors/projectormanager.py | 1 | 8836 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# -------------------------------------------------------... | gpl-2.0 | 7,618,840,756,520,493,000 | 44.307692 | 94 | 0.604935 | false |
blopker/PCLite | pclite/http/downloaders/__init__.py | 1 | 1722 | '''
The MIT License
Copyright (c) Bo Lopker, http://blopker.com
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, ... | mit | 3,695,211,512,528,499,700 | 33.44 | 77 | 0.752613 | false |
sergiusens/snapcraft | tests/unit/repo/test_deb.py | 1 | 19745 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 | -2,596,548,642,460,194,300 | 39.879917 | 99 | 0.62669 | false |
ryfeus/lambda-packs | Selenium_PhantomJS/source/service.py | 1 | 1299 | #!/usr/bin/env python
import httplib2
import datetime
import time
import os
import selenium
import json
import boto3
import requests
from dateutil.parser import parse
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from selenium.webdriver... | mit | 6,113,150,174,686,944,000 | 29.928571 | 173 | 0.774442 | false |
GermanRuizMarcos/Classical-Composer-Classification | code_10_1/classification.py | 1 | 30838 | '''
AUDIO CLASSICAL COMPOSER IDENTIFICATION BASED ON:
A SPECTRAL BANDWISE FEATURE-BASED SYSTEM
'''
import essentia
from essentia.standard import *
import glob
import numpy as np
import arff
from scipy import stats
import collections
import cv2
import matplotlib
import matplotlib.pyplot as plt
#### gabor filters
d... | gpl-3.0 | -2,955,891,104,601,257,000 | 25.267462 | 147 | 0.573027 | false |
facelessuser/backrefs | tests/test_wordbreak.py | 1 | 2754 | """Test `Word Break`."""
import unittest
from backrefs import uniprops
import re
class TestWordBreak(unittest.TestCase):
"""Test `Word Break` access."""
def test_table_integrity(self):
"""Test that there is parity between Unicode and ASCII tables."""
re_key = re.compile(r'^\^?[a-z0-9./]+$')
... | mit | 3,749,934,796,719,694,000 | 34.307692 | 115 | 0.611111 | false |
luoshao23/ML_algorithm | Clustering/Pred_KNN.py | 1 | 4903 | from random import random, randint
import math
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
weightdomain = [(0, 20)] * 4
def wineprice(rating, age):
peak_age = rating - 50
price = float(rating) / 2
if age > peak_age:
price = price * (5 - (age - peak_age))
else... | mit | 7,932,099,514,344,801,000 | 22.68599 | 79 | 0.564756 | false |
simonjbeaumont/planex | planex/init.py | 1 | 1365 | #!/usr/bin/env python
"""
Creates or regenerates a Makefile with special planex-init comments
"""
import os
import logging
MAKEFILE_PATH = "/usr/share/planex"
def create_makefile():
""" Checks if a Makefile exists with special planex-init comments in it.
If not, it creates or regenerates the Makefile while... | lgpl-2.1 | 3,865,575,972,869,228,500 | 23.818182 | 76 | 0.628571 | false |
jic-dtool/dtool-create | setup.py | 1 | 1165 | from setuptools import setup
url = "https://github.com/jic-dtool/dtool-create"
version = "0.23.4"
readme = open('README.rst').read()
setup(
name="dtool-create",
packages=["dtool_create"],
package_data={"dtool_create": ["templates/*"]},
version=version,
description="Dtool plugin for creating datase... | mit | -483,211,250,469,324,000 | 28.125 | 54 | 0.582833 | false |
Flexget/Flexget | setup.py | 1 | 2371 | import sys
from pathlib import Path
from typing import List
from setuptools import find_packages, setup
long_description = Path('README.rst').read_text()
# Populates __version__ without importing the package
__version__ = None
with open('flexget/_version.py', encoding='utf-8') as ver_file:
exec(ver_file.read()) ... | mit | 3,086,470,307,157,315,600 | 34.38806 | 118 | 0.640658 | false |
katarzynamazur/esxi_scripts | copy_register_vms/lifesaver.py | 1 | 1457 | #!/usr/bin/env python3
import sys
def help():
print("\nUsage:\n\t./{0} {1} {2}\n\n".format(sys.argv[0], "change_from", "change_to"))
if __name__ == "__main__":
if len(sys.argv) != 4 :
help()
else:
chgfrom = str(sys.argv[1])
chgto = str(sys.argv[2])
snapnum = str(sys.arg... | gpl-3.0 | -6,288,058,962,950,913,000 | 34.536585 | 163 | 0.482498 | false |
crazy-canux/xplugin_nagios | plugin/plugins/exchange_2010/src/check_exchange_mounts.py | 1 | 1410 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# Copyright (C) Canux CHENG <canuxcheng@gmail.com>
#
# 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 li... | gpl-2.0 | 1,217,782,461,142,924,300 | 44.483871 | 78 | 0.77234 | false |
vickyting0910/opengeocoding | 2reinter.py | 1 | 3991 | import pandas as pd
import glob
import time
import numpy as num
inter=sorted(glob.glob('*****.csv'))
w='*****.xlsx'
table1=pd.read_excel(w, '*****', index_col=None, na_values=['NA']).fillna(0)
w='*****.csv'
tab=pd.read_csv(w).fillna(0)
tab.is_copy = False
pd.options.mode.chained_assignment = None
t1=time.time()
... | bsd-2-clause | 1,550,327,785,720,675,800 | 41.457447 | 465 | 0.600601 | false |
farert/farert | db/scripts/distance_exp.py | 1 | 4515 | #!python3.0.1
# -*- coding: utf-8 -*-
"""
指定路線、駅1から駅2までの営業キロ、計算キロを得る
"""
import sys
import os
import jrdb
import time
t0 = time.time()
sql = """
select
(select max(sales_km) from t_lines where line_id=?1 and (station_id=?2 or station_id=?3))-
(select min(sales_km) from t_lines where line_id=?1 and (station_id=... | gpl-3.0 | -2,113,714,231,040,063,200 | 28.711268 | 116 | 0.638017 | false |
appcelerator/entourage | components/services/pylons/appcelerator-module/setup.py | 1 | 1264 | from setuptools import setup, find_packages
setup(name='Appcelerator',
version='0.0.0',
description="Python version of the Appcelerator web application framework for building fast, dynamic, AJAX based web 2.0 applications.",
long_description="""
""",
classifiers=[
'Development S... | apache-2.0 | 3,221,890,254,682,057,700 | 31.410256 | 142 | 0.614715 | false |
mic4ael/indico | indico/modules/rb/notifications/blockings.py | 1 | 1361 | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from flask import render_template
from indico.core.notifications import email_sender, make_email
@email... | mit | 8,535,712,263,884,984,000 | 36.805556 | 96 | 0.709772 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_ddos_custom_policies_operations.py | 1 | 20462 | # 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 | 1,644,179,812,605,597,700 | 49.774194 | 204 | 0.657218 | false |
kjagoo/wger_stark | wger/__init__.py | 1 | 1027 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
VERSION = (1, 8, 0, 'alpha', 3)
RELEASE = False
def get_version(version=None, release=None):
"""Derives a PEP386-compliant version number from VER... | agpl-3.0 | 6,015,827,220,061,252,000 | 26.026316 | 65 | 0.56962 | false |
irmen/Pyro5 | tests/test_echoserver.py | 1 | 2734 | """
Tests for the built-in test echo server.
Pyro - Python Remote Objects. Copyright by Irmen de Jong (irmen@razorvine.net).
"""
import time
import pytest
from threading import Thread, Event
import Pyro5.client
import Pyro5.errors
import Pyro5.utils.echoserver as echoserver
from Pyro5 import config
class EchoServe... | mit | -4,350,941,326,029,614,000 | 33.607595 | 108 | 0.622165 | false |
normanmaurer/autobahntestsuite-maven-plugin | src/main/resources/twisted/trial/runner.py | 1 | 26192 | # -*- test-case-name: twisted.trial.test.test_runner -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A miscellany of code used to run Trial tests.
Maintainer: Jonathan Lange
"""
__all__ = [
'TestSuite',
'DestructiveTestSuite', 'DryRunVisitor', 'ErrorHolder', 'LoggedSuite',
... | apache-2.0 | 4,596,502,648,089,220,000 | 32.029004 | 83 | 0.608048 | false |
rvbelefonte/Rockfish2 | rockfish2/extensions/cps/model.py | 1 | 3390 | """
Tools for working with Computer Programs in Seismology velocity models
"""
import os
import numpy as np
import datetime
import pandas as pd
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
from rockfish2 import logging
from rockfish2.models.profile import Profile
class CPSModel1d(Profile):
... | gpl-2.0 | -763,694,622,314,815,400 | 31.596154 | 79 | 0.515929 | false |
Metronote/metronotesd-alpha | lib/api.py | 1 | 26200 | #! /usr/bin/python3
import sys
import os
import threading
import decimal
import time
import json
import re
import requests
import collections
import logging
from logging import handlers as logging_handlers
D = decimal.Decimal
import apsw
import flask
from flask.ext.httpauth import HTTPBasicAuth
from tornado.wsgi impo... | mit | 844,158,280,509,889,700 | 43.328257 | 171 | 0.558554 | false |
madirish/hector | app/scripts/screenshot_scan/screenshot_scan.py | 1 | 4015 | #!/usr/bin/python
"""
This script is part of HECTOR.
by Josh Bauer <joshbauer3@gmail.com>
Modified by: Justin C. Klein Keane <jukeane@sas.upenn.edu>
Last modified: 31 July, 2014
This script requires python 2.5 or higher.
This script is a threaded screenshot scan
using phantomjs to render screenshots for urls
in Hecto... | gpl-3.0 | 7,748,538,781,216,978,000 | 33.62069 | 113 | 0.630386 | false |
neeasade/qutebrowser | tests/unit/completion/test_models.py | 1 | 15355 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foun... | gpl-3.0 | -80,187,015,943,444,350 | 37.873418 | 79 | 0.590231 | false |
mariodebian/jclic-browser | jclic_downloader.py | 1 | 14268 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Por Mario Izquierdo Rodríguez
#
# JclicDownloader descarga las actividades que se le pasen como filtro
#
import sgmllib
import sys
import urllib
import os
from time import sleep
import getopt
import zipfile
from xml.dom import minidom
# si test es True se usan archiv... | gpl-2.0 | 1,716,028,012,631,787,000 | 30.4163 | 146 | 0.523242 | false |
adamnew123456/myweb | myweb/frontend/cli.py | 1 | 9534 | """
A command-line based frontend for interacting with myweb.
"""
from myweb.backend import config, db, query, utils
import argparse
import os
import re
import sys
import tempfile
HELP = """myweb-cli - A command-line interface to myweb.
Usage:
myweb-cli <command> <args>
Commands:
search QUERY
Search... | bsd-2-clause | -6,819,532,572,932,881,000 | 33.05 | 78 | 0.588316 | false |
F5Networks/f5-common-python | f5/bigip/tm/util/clientssl_ciphers.py | 1 | 1459 | # coding=utf-8
#
# Copyright 2016 F5 Networks 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 a... | apache-2.0 | -7,911,479,951,064,563,000 | 29.354167 | 79 | 0.695264 | false |
Lamaw/Newzer | lemonde_extractor.py | 1 | 6762 | # -*- coding: utf-8 -*-
"""
This page defines the Implementation of an analyzer for "www.lemonde.fr"
"""
from HTMLParser import HTMLParser
from Isite_extractor import ISiteExtractor
class LeMondeExtractor(ISiteExtractor):
"""
This class implements the Page analyzer interface for "lemonde.fr" website
"""
... | mit | 5,026,453,896,365,185,000 | 39.740964 | 166 | 0.587844 | false |
murat1985/bagpipe-bgp | bagpipe/bgp/engine/worker.py | 2 | 5205 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# encoding: utf-8
# Copyright 2014 Orange
#
# 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
#
# Un... | apache-2.0 | 6,153,653,472,413,614,000 | 30.737805 | 78 | 0.634006 | false |
Balannen/LSMASOMM | atom3/Kernel/Layout/RandomLayout.py | 1 | 2169 | """
RandomLayout.py
Generates a random layout by moving all the nodes positions randomly in
a 640x480 pixel box. The connections are then optimized for the new layout.
Guaranteed to hit an aesthetic layout at infinity, not recognize it, and
keep on going for another infinity :p
Created Summer 2004, Denis... | gpl-3.0 | 2,312,483,921,526,542,000 | 34.79661 | 94 | 0.612725 | false |
Ell/goonauth | profiles/migrations/0012_auto__add_oauthapplication.py | 1 | 12056 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'OAuthApplication'
db.create_table(u'profiles_oauthapplica... | mit | -8,942,637,767,845,839,000 | 73.425926 | 257 | 0.560883 | false |
BorgERP/borg-erp-6of3 | verticals/garage61/acy_mrp_operator/mrp_operator.py | 1 | 10435 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
# Ignacio Ibeas <ignacio@acysos.com>
# $Id$
#
# This program i... | agpl-3.0 | -5,955,302,422,474,086,000 | 54.216931 | 255 | 0.589459 | false |
merlinmarek/ICTScan | Python/perspective_transformation/perspective_transformation.py | 1 | 2001 | #!/usr/bin/env python
import sys
import cv2
import numpy as np
point_count = 0;
y = [];
x = [];
def run_prespective_transform():
global src
src_quad = np.array([(x[0], y[0]), (x[1], y[1]), (x[2], y[2]), (x[3], y[3])], np.float32);
dst_quad = np.array([(0.0, 0.0), (1032.0, 0.0), (1032.0, 581.0), (0.0, 581.0)], np.f... | bsd-2-clause | -1,209,146,062,546,825,700 | 27.183099 | 167 | 0.623188 | false |
EBI-Metagenomics/emgapi | emgcli/routers.py | 1 | 1165 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017 EMBL - European Bioinformatics Institute
#
# 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/LICEN... | apache-2.0 | 6,991,314,538,226,056,000 | 32.285714 | 148 | 0.747639 | false |
rzr/synapse | synapse/handlers/__init__.py | 1 | 2767 | # -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,623,106,301,995,591,200 | 38.528571 | 76 | 0.731117 | false |
rob-smallshire/asq | asq/test/test_single.py | 1 | 1353 | import unittest
from asq.queryables import Queryable
__author__ = "Sixty North"
class TestSingle(unittest.TestCase):
def test_single(self):
a = [5]
b = Queryable(a).single()
self.assertEqual(b, 5)
def test_single_empty(self):
a = []
self.assertRaises(ValueError, lambd... | mit | 4,489,519,764,823,837,700 | 30.465116 | 95 | 0.610495 | false |
muratcansahin/itucsdb1626 | foodle/controllers/post_comments_controller.py | 1 | 3956 | #!/usr/bin/env python3
import foodle
import psycopg2
from psycopg2.extras import DictCursor
from flask import Blueprint, render_template, current_app, request, redirect, make_response, g
from foodle.utils.auth_hook import auth_hook_functor
post_comments_controller = Blueprint('post_comments_controller', __name__)
@po... | gpl-3.0 | 8,332,786,629,607,195,000 | 30.149606 | 105 | 0.555106 | false |
StackStorm/python-mistralclient | mistralclient/tests/unit/v2/test_cli_actions.py | 1 | 6033 | # Copyright 2014 Mirantis, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -2,008,417,211,071,417,300 | 29.316583 | 78 | 0.582132 | false |
lfblogs/aiopy | aiopy/required/aiohttp/protocol.py | 1 | 27699 | """Http related parsers and protocol."""
import collections
import functools
import http.server
import itertools
import re
import string
import sys
import zlib
from wsgiref.handlers import format_date_time
from aiopy.required import aiohttp
from aiopy.required.aiohttp import hdrs, errors
from .multidict import CIMul... | gpl-3.0 | 7,311,727,650,136,133,000 | 31.021965 | 79 | 0.567205 | false |
catmaid/catpy | tests/test_catmaid_client_application.py | 1 | 1603 | from __future__ import absolute_import
try:
import mock
except ImportError:
from unittest import mock
import pytest
from catpy.client import CatmaidClient
from catpy.applications.base import CatmaidClientApplication
PROJECT_ID = 10
BASE_URL = "http://not-catmaid.org"
@pytest.fixture
def catmaid_mock():
... | mit | 3,556,959,279,604,480,500 | 24.046875 | 87 | 0.704304 | false |
devsar/ae-people | apps/stats/views.py | 1 | 1376 | """
Stats views
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils import simplejson
from django.utils.trans... | apache-2.0 | -5,724,563,752,425,288,000 | 27.081633 | 77 | 0.655523 | false |
dc3-plaso/plaso | tests/engine/engine.py | 1 | 4086 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests the engine."""
import unittest
try:
from guppy import hpy
except ImportError:
hpy = None
from dfvfs.helpers import fake_file_system_builder
from dfvfs.lib import definitions as dfvfs_definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.path... | apache-2.0 | -3,996,707,161,918,341,600 | 32.752066 | 79 | 0.718413 | false |
svensaeger/Hatschi | wetterstation2.py | 1 | 1364 | from tkinter import *
import serial
import time
def ausgeben(daten):
datenEinzeln = daten.split()
root = Tk()
root.attributes("-fullscreen", True)
root.config(bg = "light green")
frameo = Frame(root)
frameu = Frame(root, bg = "light green")
temp = "0"
luftfeu = "0"
luftdruck = "0"
gas = "0"
regen = "0"... | gpl-3.0 | -2,927,763,637,541,461,000 | 14.678161 | 47 | 0.57478 | false |
MrHamdulay/daily-problems | yaseen/problem-3-binary-search.py | 1 | 1162 | class Node:
def __init__(self, value):
self.value = float(value)
self.parent = None
self.children = []
def addChild(self, child):
self.children.append(child)
def __repr__(self):
return '<value: %s children: (%s)>' % (self.value, len(self.children))
@property
def right(self):
return... | mit | 3,047,727,185,043,517,000 | 20.924528 | 85 | 0.641997 | false |
beihaiguaishou/HackRunningGo-SC | HaRunGo.py | 1 | 10445 | import fileinput
import requests
import json
import base64
import random
import datetime
import re
import time
import hashlib
from Phone import *
import uuid
import codecs
# Globle Var
file1 = open('route.data')
routes = file1.readlines()
file1.close()
file2 = codecs.open('tp.data', 'r', 'utf-8')
tps = file2.readline... | mit | 6,853,569,064,474,251,000 | 29.811209 | 122 | 0.578076 | false |
wangjiaxi/django-dynamic-forms | dynamic_forms/models.py | 2 | 8474 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
from collections import OrderedDict
from django.core.urlresolvers import reverse
from django.db import models
from django.db.transaction import atomic
from django.template.defaultfilters import slugify
from django.utils.crypto import get_rand... | bsd-3-clause | -1,659,677,495,397,635,600 | 37.60274 | 88 | 0.602792 | false |
google/makani | config/m600/tether.py | 1 | 1922 | # Copyright 2020 Makani Technologies 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... | apache-2.0 | -8,597,662,665,080,379,000 | 31.576271 | 77 | 0.680021 | false |
fenceFoil/canopto | tween_test_pygame.py | 1 | 4093 | #!/usr/bin/python
# M.E.Farmer 2013
# demo for tween library
# showing integration with PyGame
# moves text from random points using various tweens
# changes from random color to random color using the same tween
# Mouse click rotates through tweens and ESC closes demo
import sys
import pygame
import random
import twee... | bsd-3-clause | -5,670,639,753,451,498,000 | 38.737864 | 96 | 0.638651 | false |
alexakarpov/python-practice | primes.py | 1 | 1815 | #!/usr/bin/env python3
from math import sqrt, ceil
import unittest
DEFAULT_NUM_OF_PRIMES = 10
def get_n_primes(n=DEFAULT_NUM_OF_PRIMES):
def is_prime(num):
if num == 1 or num == 2:
return True
for i in range(2, ceil(sqrt(num))+1):
if num % i == 0:
return ... | mit | 1,045,455,945,428,647,200 | 26.923077 | 93 | 0.571901 | false |
ianjuma/ubuntu-git-notify | app/github-notif.py | 1 | 2513 | #!/usr/bin/python
import sys
import pynotify
capabilities = {'actions': False,
'body': False,
'body-hyperlinks': False,
'body-images': False,
'body-markup': False,
'icon-multi': False,
'icon-static': False,
'sound': False,
'image/svg+xml': False,
... | mit | 5,087,499,934,471,996,000 | 25.177083 | 66 | 0.585356 | false |
blaiseli/p4-phylogenetics | p4/tree_optsim.py | 1 | 19918 | import sys
import string
import types
import cStringIO
import math
import copy
import os
import func
import time
import glob
from var import var
from p4exceptions import P4Error
from node import Node, NodeBranch, NodePart, NodeBranchPart
import nexustoken
from distancematrix import DistanceMatrix
import numpy
import p... | gpl-2.0 | 7,518,539,616,332,160,000 | 38.441584 | 115 | 0.566523 | false |
jkettleb/iris | lib/iris/aux_factory.py | 1 | 70417 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | lgpl-3.0 | 7,830,086,257,781,286,000 | 38.427212 | 79 | 0.525384 | false |
hirobert/svgwrite | svgwrite/utils.py | 1 | 6106 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg util functions and classes
# Created: 08.09.2010
# Copyright (C) 2010, Manfred Moitzi
# License: GPLv3
"""
.. autofunction:: rgb
.. autofunction:: iterflatlist
.. autofunction:: strlist
.. autofunction:: get_unit
.. autofunction:... | gpl-3.0 | -841,790,652,813,798,900 | 26.138249 | 98 | 0.533082 | false |
AlvinPH/StockTool | StockTool/core.py | 1 | 7480 |
from . import helpers
import pandas as pd
import numpy as np
from pandas import DataFrame, Series
from pandas_datareader import data
from datetime import datetime, timedelta
import re
import os
import requests
import time
class StockInfo():
def __init__(self, StockNumber):
if isinstance(StockNumber, str)... | bsd-2-clause | -3,977,140,881,011,436,500 | 27.226415 | 137 | 0.629278 | false |
dtroyer/python-openstacksdk | openstack/tests/unit/clustering/v1/test_event.py | 1 | 2273 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -3,078,022,408,368,148,500 | 36.262295 | 75 | 0.673119 | false |
grycap/clues | cluesplugins/kubernetes.py | 1 | 13204 | #!/usr/bin/env python
#
# CLUES - Cluster Energy Saving System
# Copyright (C) 2015 - GRyCAP - Universitat Politecnica de Valencia
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either versio... | gpl-3.0 | -3,341,491,502,030,024,000 | 43.160535 | 117 | 0.529612 | false |
Dhole/miniBoy | helpers/gen.py | 1 | 1027 |
regs = ["B", "C", "D", "E", "H", "L", "(HL)", "A"]
d = 0x80
for i in range(0, 8):
print('\tSET_OP(0x%02X, "ADD A,%s", op_add, A, %s, 4);' % (i+d, regs[i % 8], regs[i % 8]));
for i in range(8, 16):
print('\tSET_OP(0x%02X, "ADC A,%s", op_adc, A, %s, 4);' % (i+d, regs[i % 8], regs[i % 8]));
d = 0x90
for i in range... | bsd-3-clause | -4,138,096,646,816,942,000 | 34.448276 | 93 | 0.478092 | false |
kirsty-tortoise/mathsmap | mathsmap/new_map.py | 1 | 2417 | """
Contains classes controlling wizards for making new maps
"""
import tkinter as tk
import mathsmap.colours as colours
class Wizard:
"""
A base class for all wizards in this project
"""
def clear(self):
"""
Remove all current widgets from top level of wizard
"""
for c... | mit | 4,506,016,835,669,896,000 | 31.226667 | 99 | 0.541167 | false |
tiagocoutinho/bliss | bliss/controllers/emulators/keithley.py | 1 | 2009 | # -*- coding: utf-8 -*-
#
# This file is part of the bliss project
#
# Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.
import time
import random
import gevent
from bliss.comm.scpi import Commands
from bliss.controllers.keithley_scpi_mapping import COMMAND... | lgpl-3.0 | -4,398,936,189,385,790,500 | 25.786667 | 83 | 0.592832 | false |
r-rathi/error-control-coding | perf/plot-pegd.py | 1 | 1496 | import numpy as np
import matplotlib.pyplot as plt
from errsim import *
def label(d, pe, pb, n):
if pb is None:
pb = pe
label = 'd={} pe={} n={} BSC'.format(d, pe, n)
else:
label = 'd={} pe={} n={} pb={}'.format(d, pe, n, pb)
return label
def plot(pe, fpath=None):
fig, ax = pl... | mit | -2,650,719,119,440,430,600 | 29.530612 | 82 | 0.561497 | false |
grimli/life-game | life_thread.py | 1 | 3242 | #!/usr/bin/python3
import random
from tkinter import *
import threading
import queue
class Evolver( threading.Thread ):
""" this thread calculate next status
The result is maid available to the shower trough a queue """
def __init__(self, queue):
threading.Thread.__init__(self)
self.queue = queue
... | gpl-3.0 | -5,946,927,809,734,057,000 | 32.42268 | 374 | 0.541641 | false |
RamonGuiuGou/l10n-spain | l10n_es_account_balance_report/__openerp__.py | 1 | 1064 | # -*- coding: utf-8 -*-
# Copyright 2004-2011 Pexego Sistemas Informáticos
# Copyright 2013 Zikzakmedia
# Copyright 2014 Juanjo Algaz
# Copyright 2014 Joaquín Gutierrez <joaquing.pedrosa@gmail.com>
# Copyright 2014-2016 Tecnativa - Pedro M. Baeza
# Copyright 2016 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (... | agpl-3.0 | -6,034,689,401,956,224,000 | 30.205882 | 67 | 0.606975 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.