repo_name stringlengths 8 92 | path stringlengths 5 221 | copies stringclasses 10
values | size stringlengths 4 6 | content stringlengths 974 828k | license stringclasses 15
values | hash int64 -9,212,977,344,346,658,000 9,220,224,517B | line_mean float64 8.67 91.6 | line_max int64 15 966 | alpha_frac float64 0.29 0.86 | autogenerated bool 1
class | nl_text stringlengths 0 164k | nl_size int64 0 164k | nl_language stringclasses 17
values | nl_language_score float64 0.04 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apoorvemohan/haas | haas/drivers/switches/nexus.py | 1 | 2520 | # Copyright 2013-2014 Massachusetts Open Cloud Contributors
#
# 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 la... | apache-2.0 | -8,500,708,156,257,501,000 | 32.6 | 107 | 0.63254 | false | Copyright 2013-2014 Massachusetts Open Cloud Contributors 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 ... | 682 | en | 0.844174 |
ProjectQ-Framework/FermiLib-Plugin-Psi4 | fermilibpluginpsi4/_run_psi4.py | 1 | 8415 | # FermiLib plugin to interface with Psi4
#
# Copyright (C) 2017 ProjectQ-Framework (www.projectq.ch)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
... | lgpl-3.0 | 7,315,284,371,011,495,000 | 37.424658 | 79 | 0.579085 | false | This function converts MolecularData geometry to psi4 geometry.
Args:
geometry: A list of tuples giving the coordinates of each atom.
example is [('H', (0, 0, 0)), ('H', (0, 0, 0.7414))]. Distances in
angstrom. Use atomic symbols to specify atoms.
Returns:
geo_string: A string giving the geome... | 3,084 | en | 0.673412 |
kubevirt/vAdvisor | vadvisor/virt/parser.py | 1 | 1627 | from xml.etree.ElementTree import XMLParser
class GuestXmlParser:
int_tags = ["currentMemory", "memory"]
int_attribs = ["index", "port", "startport", "vram"]
def __init__(self):
self.json = {}
self.stack = [self.json]
self.catogory = None
def start(self, tag, attrib):
... | gpl-3.0 | 795,762,384,408,859,900 | 27.54386 | 56 | 0.533497 | false | 0 | en | 0.110449 | |
gri-is/lodjob | crom_scripts/deprecated/acquisition_manual.py | 1 | 1582 | import pprint
from cromulent.model import * # imports models
from cromulent.vocab import * # imports model subcomponents
from utils.aat_labels import aat_labels
from utils.aat_label_fetcher import get_or_fetch
from utils.data_parsing import find_values
from utils.crom_helpers import props, toJSON, toString, printStr... | agpl-3.0 | -9,017,786,665,425,611,000 | 31.285714 | 80 | 0.733881 | false | imports models imports model subcomponents start by looking at knoedler_purchase_info + knoedler tables for each seller id use: purchase.knoedler_purchase_sellers_collection[0].purchase_seller_uid or purchase.knoedler_purchase_sellers_collection[0].gpi_people.person_ulan "1890-01-05T00:00:00Z" "1890-01-04T00:00:00Z" pu... | 552 | en | 0.602885 |
moggers87/django-bitfield | bitfield/tests/tests.py | 1 | 17505 | from __future__ import absolute_import
import pickle
from django.db import connection, models
from django.db.models import F
from django.test import TestCase
from bitfield import BitHandler, Bit, BitField
from bitfield.tests import BitFieldTestModel, CompositeBitFieldTestModel, BitFieldTestModelForm
from bitfield.co... | apache-2.0 | -1,557,695,423,243,655,400 | 42.87218 | 578 | 0.649357 | false | noqa Django 1.5 muffed up the base class which breaks the pickle tests Note, it's fixed again in 1.6. Default value of 0. Test bit numbers. Negative test non-existant key. Test bool(). Create instance and make sure flags are working properly. Creating new instances shouldn't allow negative values. There should only be ... | 486 | en | 0.833317 |
adewynter/Tools | MLandDS/SpeechRecognition/dataPreprocessor.py | 1 | 5683 | # Data preprocessor for speech recognition
# Arguably the most important part of our infrastructure
# WARNING -- Disgustingly long class
# (c) Adrian deWynter, 2017, where applicable
from __future__ import print_function
from six.moves import urllib,xrange
from random import shuffle
from enum import Enum
import os,re... | mit | -1,158,133,404,492,838,400 | 22.105691 | 98 | 0.672356 | false | Data preprocessor for speech recognition Arguably the most important part of our infrastructure WARNING -- Disgustingly long class (c) Adrian deWynter, 2017, where applicable 8 bit 16 bit s16le Misc utils Alter datatype for efficiency 0-1 for Better convergence Pad I think the file should be closed, no? Batch utils 0-1... | 707 | en | 0.666447 |
MerlijnWajer/lewd | src/net.py | 1 | 1721 | """
This file is part of the LEd Wall Daemon (lewd) project
Copyright (c) 2009-2012 by ``brainsmoke'' and Merlijn Wajer (``Wizzup'')
lewd 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 ver... | gpl-3.0 | 3,525,649,452,878,843,400 | 29.732143 | 74 | 0.669959 | false | This file is part of the LEd Wall Daemon (lewd) project
Copyright (c) 2009-2012 by ``brainsmoke'' and Merlijn Wajer (``Wizzup'')
lewd 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 ... | 823 | en | 0.913255 |
landscapeio/pylint-common | setup.py | 1 | 1633 | # -*- coding: UTF-8 -*-
import sys
from setuptools import find_packages, setup
_version = '0.2.5'
_packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
_short_description = ("pylint-common is a Pylint plugin to improve Pylint "
"error analysis of the standard Python li... | gpl-2.0 | -4,498,307,940,988,987,400 | 28.690909 | 99 | 0.620943 | false | -*- coding: UTF-8 -*- pylint 1.4 dropped support for Python 2.6 see https://github.com/landscapeio/prospector/issues/18issuecomment-49857277 | 140 | en | 0.765274 |
barberscore/barberscore-api | project/apps/salesforce/models.py | 1 | 21997 | import json
# Third-Party
from model_utils import Choices
from distutils.util import strtobool
# Local
from apps.bhs.models import Convention, Award, Chart, Group, Person
from apps.registration.models import Contest, Session, Assignment, Entry
class SfConvention:
def parse_sf_notification(n):
d = {}
... | bsd-2-clause | -6,375,111,616,845,028,000 | 28.927891 | 116 | 0.519525 | false | Third-Party Local Created Modified UUID Status Name District Season Panel Year Open Date Close Date Start Date End Date Venue Location Time Zone Description Divisions Kinds Return parsed dict Created Modified UUID Name Status Kind Gender Level Season District Divisions Is Single Threshold Minimum advance spots Descript... | 1,648 | en | 0.780755 |
aaronn/django-rest-framework-passwordless | drfpasswordless/urls.py | 1 | 1129 | from drfpasswordless.settings import api_settings
from django.urls import path
from drfpasswordless.views import (
ObtainEmailCallbackToken,
ObtainMobileCallbackToken,
ObtainAuthTokenFromCallbackToken,
VerifyAliasFromCallbackToken,
ObtainEmailVerificationCallbackToken,
ObtainMobileVerifica... | mit | 6,030,230,326,098,474,000 | 52.761905 | 134 | 0.772365 | false | 0 | en | 0.110449 | |
yuanchima/Activation-Visualization-Histogram | datasets/svhn.py | 1 | 2526 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
import scipy.io
import scipy.ndimage as sn
import h5py
from util import log
# __PATH__ = os.path.abspath(os.path.dirname(__file__))
__PATH__ = './datasets/svhn'
rs = np.rand... | mit | 8,197,584,550,295,132,000 | 25.041237 | 96 | 0.563737 | false | __PATH__ = os.path.abspath(os.path.dirname(__file__)) preprocessing and data augmentation Data augmentation: rotate 0, 90, 180, 270 | 131 | en | 0.37883 |
simplelist/python_test01 | mechine/KNY.py | 1 | 3559 | #-*- coding: utf-8 -*-
from numpy import *
import operator
# 读取数据到矩阵
def file2matrix(filename):
# 打开数据文件,读取每行内容
fr = open(filename)
arrayOLines = fr.readlines()
# 初始化矩阵
numberOfLines = len(arrayOLines)
returnMat = zeros((numberOfLines,3))
# 初始化类标签向量
classLabelVector = []
# 循环读取... | lgpl-3.0 | 314,112,716,281,400,060 | 21 | 111 | 0.641604 | false | -*- coding: utf-8 -*- 读取数据到矩阵 打开数据文件,读取每行内容 初始化矩阵 初始化类标签向量 循环读取每一行数据 去掉回车符 提取4个数据项 将前三项数据存入矩阵 将第四项数据存入向量 数据归一化 读取矩阵中数据项的最大和最小值 获得最大和最小值间差值 初始化输出结果 获取矩阵的行数 矩阵运算:实现归一化公式中的 oldValue - min 一步 矩阵除法:实现归一化公式中的除法 返回归一化后的数据,数据范围及最小值矩阵 kNN算法实现 获取样本数据数量 矩阵运算,计算测试数据与每个样本数据对应数据项的差值 sqDistances 上一步骤结果平方和 取平方根,得到距离向量 按照距离从低到高排序 依次取出最... | 482 | zh | 0.990035 |
darrencheng0817/AlgorithmLearning | Python/leetcode/uglyNumber.py | 1 | 2890 | '''
Created on 2015年12月11日
https://leetcode.com/problems/ugly-number/
https://leetcode.com/problems/ugly-number-ii/
https://leetcode.com/problems/super-ugly-number/
@author: Darren
'''
'''
Write a program to check whether a given number is an ugly number.
Ugly numbers are positive numbers whose prime factors only incl... | mit | 3,427,185,567,020,352,500 | 32.5 | 390 | 0.651042 | false | :type n: int
:type primes: List[int]
:rtype: int
Created on 2015年12月11日
https://leetcode.com/problems/ugly-number/
https://leetcode.com/problems/ugly-number-ii/
https://leetcode.com/problems/super-ugly-number/
@author: Darren | 225 | en | 0.299001 |
proggy/fns | frogs.py | 1 | 1401 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright notice
# ----------------
#
# Copyright (C) 2014 Daniel Jung
# Contact: djungbremen@gmail.com
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Fo... | gpl-2.0 | 796,572,170,233,028,400 | 34.025 | 77 | 0.683797 | false | Frog definitions for this package. Requires the frog module.
!/usr/bin/env python -*- coding: utf-8 -*- Copyright notice ---------------- Copyright (C) 2014 Daniel Jung Contact: djungbremen@gmail.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen... | 909 | en | 0.819549 |
kapadia/toplotly | toplotly/__init__.py | 1 | 2486 |
import os
import json
from dateutil.parser import parse
import plotly
from plotly.graph_objs import Histogram, Scatter, Scatter3d, Data, Layout, XAxis, YAxis, ZAxis, Figure
__version__ = '0.0.1'
def is_numeric(x):
try:
float(x)
return True
except ValueError:
return False
def... | mit | -6,038,778,973,686,361,000 | 18.429688 | 102 | 0.530571 | false | Check column type Get username and api key | 42 | en | 0.524451 |
Liorst4/pysteamcli | pysteamcli/app_manifest.py | 1 | 1745 | #!/usr/bin/env python3
"""
Parse Steam's application manifest files.
"""
import itertools
def next_data(it):
"""
Advances an iterator until new data is found.
:param it: Character iterator.
:returns: Data found.
"""
quotation_mark = lambda c: c != '"'
data_begin = itertools.dropwhile... | mit | 4,851,794,010,905,452,000 | 18.388889 | 62 | 0.525501 | false | Advances an iterator until new data is found.
:param it: Character iterator.
:returns: Data found.
Advances the iterator until a scope closing mark is found.
:param it: Character iterator.
:returns: The content of the scope.
Parse the content of an acf file.
:param it: Character iterator.
:returns: The content of an... | 449 | en | 0.788957 |
xaime/sneaks | modules/report.py | 1 | 31061 | # - *- coding: utf- 8 - *- .
# SNEAKS - Snooping Early Alert Knowledge Service
from datetime import timedelta
from boomslang import *
import math
import pygeoip
import socket
from ConfigParser import RawConfigParser
import html2text
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
... | gpl-2.0 | -1,516,157,296,209,164,800 | 39.462842 | 120 | 0.619816 | false | Genera los gráficos de footprinting de la organización y todas las personas con detecciones
y los guarda en la carpeta temp
Genera un informe de eventos de footprinting para la organización
Genera un informe de eventos de footprinting para una persona
Envía un fichero html filename (el informe) a email. Las imágenes se... | 2,218 | es | 0.87748 |
rcbuild-info/scrape | rcbi/rcbi/spiders/MultirotorSuperstore.py | 1 | 3983 | import scrapy
from scrapy import log
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from rcbi.items import Part
import copy
import os
import urlparse
import urllib
MANUFACTURERS = ["Cobra", "Dinogy", "SkyRC", "DYS", "HQProp", "iPower", "Tattu", "GemFan", "SunnySky", "Emax... | apache-2.0 | 1,018,846,798,764,537,900 | 38.435644 | 359 | 0.614361 | false | Do price last so we can copy for tiered pricing. TODO(tannewt): Support tiered pricing. | 87 | en | 0.732491 |
daviur/py-cracking-the-coding-interview | arrays-and-strings/as18.py | 1 | 1607 | # The MIT License (MIT)
#
# Copyright (c) 2016 David I Urbina
#
# 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, mo... | mit | 774,038,168,573,921,400 | 40.205128 | 80 | 0.728065 | false | The MIT License (MIT) Copyright (c) 2016 David I Urbina 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, merge, pub... | 1,076 | en | 0.856078 |
edit4ever/script.module.tvh2kodi | default.py | 1 | 183136 | #!/usr/bin/env python
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2016-2017 Team LibreELEC
# Copyright (C) 2017 Tnds82 (tndsrepo@gmail.com)
#
# LibreELEC is free software: you can redistribute it... | gpl-3.0 | -8,064,920,706,645,967,000 | 58.770235 | 741 | 0.587203 | false | !/usr/bin/env python This file is part of LibreELEC - https://libreelec.tv Copyright (C) 2016-2017 Team LibreELEC Copyright (C) 2017 Tnds82 (tndsrepo@gmail.com) LibreELEC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr... | 786 | en | 0.863703 |
netkicorp/wns-api-server | netki/common/test_config.py | 1 | 3834 | __author__ = 'mdavid'
# Setup our test environment
import os
os.environ['NETKI_ENV'] = 'test'
from unittest import TestCase
from mock import patch
from StringIO import StringIO
from netki.common.config import ConfigManager
class ConfigManagerTestCase(TestCase):
def tearDown(self):
super(ConfigManagerTe... | bsd-3-clause | -2,711,859,175,844,189,000 | 28.5 | 83 | 0.655451 | false | Setup our test environment | 26 | en | 0.756463 |
mchung94/solitaire-player | pysolvers/solvers/deck.py | 1 | 2238 | """Card and Deck definitions.
Cards are strings containing a rank character followed by a suit character,
because it's simpler than defining a class or named tuple while still being
immutable, hashable, easy to create, and human-readable.
I also want to define a deck as just a tuple of cards that contain exactly
all ... | mit | -3,498,415,241,772,121,600 | 32.402985 | 78 | 0.714924 | false | Return the card's rank as a character.
Return a list of the cards that are duplicated in the tuple.
If a card is duplicated N times, the card should be in the result N times
so that the caller knows how many times it's been duplicated.
If is_standard_deck() returns false for a list, this function may help the
caller ... | 1,340 | en | 0.935197 |
vlegoff/tsunami | src/secondaires/navigation/chantier_naval.py | 1 | 4209 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | 7,937,201,013,783,846,000 | 38.54717 | 79 | 0.673903 | false | Classe décrivant un chantier naval.
Un chantier naval est un ensemble de salles que l'on peut utiliser pour
la réparation et la personnalisation d'un navire en particulier. Un
chantier naval possède une salle d'interaction (nommée 'salle_magasin')
et des points d'occupation qui déterminent le lieu des bassins. Si le
n... | 2,387 | fr | 0.374993 |
bhaveshAn/crisscross | crisscross/facades/email.py | 1 | 1397 | '''
Email
=====
The :class:`Email` provides access to public methods to use email of your
device.
.. note::
On Android `INTERNET` permission is needed.
Simple Examples
---------------
To send an e-mail::
>>> from crisscross import email
>>> recipient = 'abc@gmail.com'
>>> subject = 'Hi'
>>> tex... | mit | 5,783,431,339,681,985,000 | 24.87037 | 73 | 0.601288 | false | Email facade.
Open an email client message send window, prepopulated with the
given arguments.
:param recipient: Recipient of the message (str)
:param subject: Subject of the message (str)
:param text: Main body of the message (str)
:param create_chooser: Whether to display a program chooser to
... | 969 | en | 0.682931 |
sunu/oppia-test | models/parameter_test.py | 1 | 1279 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -8,525,175,909,755,323,000 | 31.794872 | 74 | 0.687256 | false | Test the Parameter class.
Tests the Parameter class.
Tests for parameter models.
Copyright 2013 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.apac... | 764 | en | 0.761752 |
jvivian/rnaseq-lib | src/rnaseq_lib/utils/expando.py | 1 | 2336 | # Taken from: https://github.com/BD2KGenomics/bd2k-python-lib
class Expando(dict):
"""
Pass inital attributes to the constructor:
>>> o = Expando(foo=42)
>>> o.foo
42
Dynamically create new attributes:
>>> o.bar = 'hi'
>>> o.bar
'hi'
Expando is a dictionary:
>>> isinst... | mit | -5,991,703,706,041,165,000 | 18.305785 | 88 | 0.51113 | false | Pass inital attributes to the constructor:
>>> o = Expando(foo=42)
>>> o.foo
42
Dynamically create new attributes:
>>> o.bar = 'hi'
>>> o.bar
'hi'
Expando is a dictionary:
>>> isinstance(o,dict)
True
>>> o['foo']
42
Works great with JSON:
>>> import json
>>> s='{"foo":42}'
>>> o = json.loads(s,object_hook=Expand... | 1,501 | en | 0.573883 |
QualiSystems/OpenStack-Shell | package/tests/test_cp/test_openstack/test_command/test_operations/test_connectivity_operation.py | 1 | 1574 | from unittest import TestCase
from mock import Mock
from cloudshell.cp.openstack.command.operations.connectivity_operation import ConnectivityOperation
class TestConnectivityOperation(TestCase):
def setUp(self):
self.connectivity_service = Mock()
self.conn_operation = ConnectivityOperation(connect... | isc | -8,626,905,349,689,318,000 | 49.774194 | 109 | 0.551461 | false | self.conn_operation.apply_connectivity = Mock(return_value=mock_result) | 71 | en | 0.332373 |
gtalarico/pyrevitplus | pyRevitPlus.tab/VP Tools.panel/Levels.pulldown/Save Levels.pushbutton/script.py | 1 | 4676 | """
Save Levels
Save the view dependant properties -
endpoint locations, level heads and leaders
of the selected building levels for re-use
Non-level elements will be skipped with dialog,
so it's advisable to apply filtering beforehead
TESTED REVIT API: 2020
@ejs-ejs
This script is part of PyRevitPlus: Extensions... | gpl-3.0 | -4,241,314,254,409,846,300 | 36.408 | 182 | 0.565013 | false | if len(selection) <> 1: UI.TaskDialog.Show('pyRevitPlus', 'Select a single grid line!') exit(0);if isinstance(cCurve, DB.Arc): tmp = cCurve.Center cLevelLine['Center'] = Point(tmp.X, tmp.Y,tmp.Z)if isinstance(el, DB.MultiSegmentGrid): UI.TaskDialog.Show('pyRevitPlus', 'Skipping yet unsupp... | 385 | en | 0.457712 |
biocore/qiime2 | qiime2/sdk/tests/test_artifact.py | 1 | 21617 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | 2,226,754,745,554,385,400 | 38.810313 | 79 | 0.593237 | false | ---------------------------------------------------------------------------- Copyright (c) 2016-2019, QIIME 2 development team. Distributed under the terms of the Modified BSD License. The full license is in the file LICENSE, distributed with this software. --------------------------------------------------------------... | 2,836 | en | 0.929658 |
ec429/sexpy | sml.py | 1 | 4208 | #!/usr/bin/python
from sexpy import SExp, tok_STRING
class HtmlNodeType(object):
def __init__(self, name, allowed_children):
self.name = name
self.ac = allowed_children
def __call__(self, context, *args):
if self.ac is None: # not specified
return
for arg in args:
... | mit | 5,023,051,822,639,744,000 | 38.327103 | 95 | 0.533745 | false | !/usr/bin/python not specified '':HtmlAttributeType(''), '':HtmlElementType('', None), | 100 | it | 0.136954 |
derolf/Plex.ArgusTV.bundle | Contents/Libraries/Shared/mysql/connector/charsets.py | 1 | 12320 | # -*- coding: utf-8 -*-
# MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There a... | gpl-2.0 | -6,391,614,368,225,597,000 | 42.076923 | 75 | 0.563799 | false | -*- coding: utf-8 -*- MySQL Connector/Python - MySQL driver written in Python. Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. MySQL Connector/Python is licensed under the terms of the GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors. There are special exc... | 1,958 | en | 0.61672 |
thepizzaking/whaawmp | src/common/lists.py | 1 | 5662 | # -*- coding: utf-8 -*-
# A few useful lists.
# Copyright © 2007-2011, Jeff Bailes <thepizzaking@gmail.com>.
# This file is part of Whaaw! Media Player (whaawmp)
#
# whaawmp is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | gpl-3.0 | 9,084,138,836,555,284,000 | 51.906542 | 106 | 0.583819 | false | -*- coding: utf-8 -*- A few useful lists. Copyright © 2007-2011, Jeff Bailes <thepizzaking@gmail.com>. This file is part of Whaaw! Media Player (whaawmp) whaawmp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fre... | 1,691 | en | 0.901302 |
babbageclunk/gatesym | gatesym/core_ffi.py | 1 | 1467 | from cffi import FFI
import os
SO_PATH = os.path.expanduser('~/Dropbox/code/rust/gatesymcore/target/release/libgatesymcore.so')
ffi = FFI()
ffi.cdef("""
void *network_new();
void network_free(void *ptr);
size_t network_add_gate(void *ptr, uint8_t kind, uint32_t cookie);
void network_add_link... | mit | 7,358,668,042,376,080,000 | 28.938776 | 96 | 0.629857 | false | 0 | en | 0.110449 | |
blckshrk/Weboob | weboob/applications/traveloob/traveloob.py | 1 | 4156 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon, Julien Hébert
#
# 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... | agpl-3.0 | -5,384,248,984,045,821,000 | 32.24 | 112 | 0.633694 | false | departures STATION [ARRIVAL]
List all departures for a given station.
roadmap DEPARTURE ARRIVAL
Display the roadmap to travel from DEPARTURE to ARRIVAL.
Command-line parameters:
--departure-time TIME requested departure time
--arrival-time TIME requested arrival time
TIME might be in form "yyyy-mm-dd ... | 1,159 | en | 0.809328 |
clones/django-evolution | django_evolution/tests/multi_db.py | 1 | 29302 | from django_evolution.tests.utils import test_sql_mapping
tests = r"""
>>> from django.db import models
>>> from django_evolution.mutations import ChangeField
>>> from django_evolution.tests.utils import test_proj_sig_multi, execute_test_sql, register_models_multi, deregister_models
>>> from django_evolution.diff imp... | bsd-3-clause | 8,471,837,691,026,984,000 | 41.652111 | 225 | 0.687769 | false | 0 | en | 0.110449 | |
StephenKinger/privaan | setup.py | 1 | 5110 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
import os
# notez qu'on import la lib
# donc assurez-vous que l'importe n'a pas d'effet de bord
import privaan
class PostDevelopComm... | mit | -9,133,602,008,088,023,000 | 35.731884 | 96 | 0.65654 | false | Post-installation for development mode.
Post-installation for installation mode.
!/usr/bin/env python -*- coding: utf-8 -*- notez qu'on import la lib donc assurez-vous que l'importe n'a pas d'effet de bord PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION Ceci n'... | 2,384 | fr | 0.98468 |
plinecom/JobManager | gui/submit/fileinfo/fileinfo.py | 1 | 1576 | from PyQt4 import QtGui, QtCore
import gui.submit.fileinfo.common
import gui.submit.fileinfo.maya1
import gui.submit.fileinfo.maya2
import gui.submit.fileinfo.maya_mentalray
import gui.submit.fileinfo.nuke
class FileInfoPanel(QtGui.QTabWidget):
def __init__(self, job_list, dispatcher_list, config_info, parent=No... | mit | 884,643,911,518,618,900 | 40.473684 | 112 | 0.654188 | false | 0 | en | 0.110449 | |
aziele/alfpy | tests/test_word_distance.py | 1 | 10504 | import unittest
from alfpy import word_pattern
from alfpy import word_vector
from alfpy import word_distance
from alfpy.utils import distmatrix
from . import utils
class DistanceTest(unittest.TestCase, utils.ModulesCommonTest):
def __init__(self, *args, **kwargs):
super(DistanceTest, self).__init__(*ar... | mit | 4,758,581,940,622,395,000 | 43.134454 | 77 | 0.564261 | false | The result of this method is identical to that from decaf+py. The result of this method is identical to that from decaf+py. The result of this method is identical to that from decaf+py. The result of this method is identical to that from decaf+py. The result of this method is identical to that from decaf+py. The result... | 619 | en | 0.979084 |
mitsuhiko/celery | celery/contrib/batches.py | 1 | 1489 | from itertools import count
from collections import deque, defaultdict
from celery.task.base import Task
class Batches(Task):
abstract = True
flush_every = 10
def __init__(self):
self._buffer = deque()
self._count = count().next
def execute(self, wrapper, pool, loglevel, logfile):
... | bsd-3-clause | -4,240,570,643,636,673,000 | 25.589286 | 68 | 0.599731 | false | increment_in_db(url, n=count) | 29 | en | 0.199091 |
dgfree/Minesweeper-Clone | screen.py | 1 | 6335 | # -*- coding: utf-8 -*-
"""
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/.
date: Mon Jan 19 14:52:04 2015
@author: daniel
"""
import pygame
from block import Block
from con... | mpl-2.0 | 1,783,015,336,399,862,800 | 35.408046 | 78 | 0.576006 | false | 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/.
date: Mon Jan 19 14:52:04 2015
@author: daniel
-*- coding: utf-8 -*- Bottom portion of screen to display counters, time, etc... | 564 | en | 0.915953 |
googlegenomics/gcp-variant-transforms | gcp_variant_transforms/libs/partitioning.py | 1 | 15496 | # Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 1,038,884,103,644,525,200 | 40.212766 | 80 | 0.657137 | false | Flattens call column to convert variant opt tables to sample opt tables.
Initialize `FlattenCallColumn` object.
In preparation to convert variant lookup optimized tables to sample lookup
optimized tables, we initiate this class with the base table name of variant
opt table (set using --output_table flag) and the list ... | 4,659 | en | 0.725191 |
datadreamer/research-chronology-revisited | cgi-bin/pydeliciouslibs/feedparser/feedparser.py | 2 | 121876 | #!/usr/bin/env python
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit http://feedparser.org/ for the latest version
Visit http://feedparser.org/docs/ for the latest documentation
Required: Python 2.1 or later
Recommended: Python 2.3 or later
Recommended: CJKCodecs... | mit | -7,598,199,181,045,882,000 | 42.02012 | 214 | 0.587925 | false | !/usr/bin/env python + "$Revision: 1.88 $"[11:15] + "-cvs" HTTP "User-Agent" header to send to servers when downloading feeds. If you are embedding feedparser in a larger application, you should change this to your application name and URL. HTTP "Accept" header to send to servers when downloading feeds. If you don't w... | 25,314 | en | 0.787172 |
MrSenko/Nitrate | tcms/settings/test.py | 1 | 1204 | from tcms.settings.devel import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
LISTENING_MODEL_SIGNAL = False
LOGGING = {
'version': 1,
'disable_existing_loggers':... | gpl-2.0 | -5,055,384,822,150,060,000 | 22.607843 | 95 | 0.442691 | false | 0 | en | 0.110449 | |
jlesquembre/jlle | jlle/scaffold/templates/setup.py | 1 | 1102 | from setuptools import setup
import os
version = '0.0.1.dev0'
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst'), 'rt') as f:
README = f.read()
setup(name='{{project}}',
version=version,
author='José Luis Lafuente',
author_email='jlesquembre@gmail.com'... | gpl-3.0 | 8,452,121,628,583,304,000 | 27.230769 | 55 | 0.559491 | false | entry_points = { 'console_scripts': [ 'doc2git = doc2git.cmdline:main', 'd2g = doc2git.cmdline:main', ], },install_requires=['sarge'] | 148 | en | 0.173266 |
jhmatthews/cobra | source/plotspec.py | 1 | 2652 | #! /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
'''
Generic plotting script for PYTHONRT
'''
import read_output as rd
import os, sys
import matplotlib.pyplot as plt
import numpy as np
import cobra_sub as sub
rd.setpars()
def strip(character, string):
''' strip a c... | gpl-2.0 | -2,380,292,950,757,573,600 | 16 | 95 | 0.647436 | false | Function for plotting a spec file outputted from the radiative transfer code PYTHONRT
:INPUT:
filename string
name of file
lmin, lmax float
wavelength range in AN... | 1,538 | en | 0.730937 |
newcastlemakerspace/mkrspc_web | data_migration.py | 1 | 2090 | import redis
import datetime
from site_config import REDIS_DB
import site_utils
import uuid
def _was_migration_applied(redis_conn, seq):
value = redis_conn.get('migration_%d' % seq)
if value is not None:
print "migration_%d - exists" % seq
return True
print "migration_%d - executing" % s... | gpl-3.0 | 2,701,100,883,988,187,000 | 23.022989 | 72 | 0.606699 | false | migration_201410241041 wiki categories | 38 | en | 0.268014 |
RyanBalfanz/reservoir-sampling-cli | sampler/command_line.py | 1 | 1294 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import operator
import random
import sys
def get_parser():
parser = argparse.ArgumentParser("Randomly sample k items from an input S containing n items.")
parser.add_argument("infile", nargs='?', type=argparse.FileType('r'), default=sys.stdin)
parser.ad... | mit | 1,964,912,365,201,834,000 | 28.409091 | 110 | 0.693972 | false | !/usr/bin/env python -*- coding: utf-8 -*- | 42 | en | 0.34282 |
aldryn/aldryn-redirects | aldryn_redirects/admin.py | 1 | 8613 | from __future__ import unicode_literals
from tablib import Dataset
from django.conf import settings
from django.contrib import admin, messages
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.shortcuts import redirect, render
from django.utils import timezone
from django.u... | bsd-3-clause | 7,284,398,277,118,702,000 | 37.797297 | 119 | 0.615929 | false | COMPAT: Django<1.10 <Queryset>.delete() can not be used with sliced querysets the add and change links don't work anyway with admin.VERTICAL radio fields if there is only one site, select it by default Custom attributes the add and change links don't work anyway with admin.VERTICAL radio fields if there is only one sit... | 343 | en | 0.853422 |
ai-se/XTREE | src/Planners/XTREE/smote.py | 1 | 3196 | #! /Users/rkrsn/anaconda/bin/python
from pdb import set_trace
from os import environ, getcwd
from os import walk
from os.path import expanduser
from pdb import set_trace
import sys
# Update PYTHONPATH
HOME = expanduser('~')
axe = HOME + '/git/axe/axe/' # AXE
pystat = HOME + '/git/pystats/' # PySTAT
cwd = getcwd() #... | mit | -2,068,732,287,555,262,000 | 27.792793 | 78 | 0.572904 | false | ! /Users/rkrsn/anaconda/bin/python Update PYTHONPATH AXE PySTAT Current Directory set_trace() set_trace() set_trace() reps = (len(data) - atleast) If you're thinking the following try/catch statement is bad coding etiquette i i . data.extend(newData) for r in newTbl._rows: print r.cells | 299 | en | 0.53655 |
MatthewWilkes/mw4068-packaging | src/melange/src/soc/models/timeline.py | 1 | 1544 | #!/usr/bin/env python2.5
#
# Copyright 2008 the Melange authors.
#
# 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 | 4,690,625,934,440,829,000 | 28.692308 | 74 | 0.738342 | false | The Timeline Model, representing the timeline for a Program.
This module contains the Timeline Model.
!/usr/bin/env python2.5 Copyright 2008 the Melange authors. 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 ... | 685 | en | 0.831356 |
Nydareld/IaGameServer | Server/PlayerThread.py | 1 | 4282 | from Server.Game import *
from threading import Thread
from CodIa.tuto.models import User
from CodIa.tuto.app import db
import threading
import time
import random
class PlayerThread(Thread):
def __init__(self, GameThread, username, ia):
Thread.__init__(self)
self.GameThread = GameThread
se... | gpl-3.0 | 7,055,425,905,077,996,000 | 35.57265 | 131 | 0.535172 | false | GameThread.game.joueurs[username]=Player(ia,username,GameThread.game.gamesize)attend le début du tours print("Barriere debut de tours "+str(threading.current_thread().name)) print(self.GameThread.barrierTours.parties)execute le code de l'IAprint(self.GameThread.barrierEtape.parties)print("avant acquire")print("pendant"... | 900 | fr | 0.333846 |
open-o/nfvo | drivers/vnfm/gvnfm/gvnfmadapter/driver/urls.py | 1 | 1060 | # Copyright 2017 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | 7,444,818,097,996,803,000 | 39.769231 | 100 | 0.734906 | false | Copyright 2017 ZTE Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ... | 584 | en | 0.864706 |
atmega/ipkg-utils | ipkg.py | 1 | 11947 | #!/usr/bin/env python
# Copyright (C) 2001 Alexander S. Guy <a7r@andern.org>
# Andern Research Labs
#
# 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 ... | mit | -7,228,900,134,880,194,000 | 29.633333 | 131 | 0.572612 | false | !/usr/bin/env python Copyright (C) 2001 Alexander S. Guy <a7r@andern.org> Andern Research Labs This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at you... | 2,006 | en | 0.883391 |
epsy/napper | napper/tests/test_restspec.py | 1 | 15960 | # napper -- A REST Client for Python
# Copyright (C) 2016 by Yann Kaiser and contributors.
# See AUTHORS and COPYING for details.
import io
import json
import re
from .. import restspec
from ..errors import UnknownParameters
from .util import Tests
class ConfigTests(Tests):
def make_spec(self, **obj):
o... | mit | 8,510,429,901,137,347,000 | 35.774194 | 88 | 0.527444 | false | napper -- A REST Client for Python Copyright (C) 2016 by Yann Kaiser and contributors. See AUTHORS and COPYING for details. | 123 | en | 0.830363 |
Nanguage/BioInfoCollections | others/bedgraph2bed.py | 1 | 1815 | import pandas as pd
import click
def skip_lines(path):
n = 0
with open(path) as f:
for line in f:
if line.startswith("track"):
n += 1
else:
break
return n
def read_bed(path):
n_skip = skip_lines(path)
df = pd.read_table(path, sep="\t... | gpl-3.0 | -4,500,874,446,086,020,600 | 24.928571 | 75 | 0.539394 | false | Expand bedGraph to BED.
Default expand to BED6, if set reference BED,
substitude the value section with bedgraph value. | 121 | en | 0.550235 |
zhy0216/random-read | utils/image_crawler.py | 1 | 2041 | import os.path
import shutil
from urlparse import urlparse, urljoin
import base64
import requests
from bs4 import BeautifulSoup
from blue.settings import DOWNLOAD_IMAGE_FOLDER, IMAGE_PREFIX
''' download the image from the article '''
IMAGE_DOWNLOAD_FOLDER = DOWNLOAD_IMAGE_FOLDER
def get_absolute_url(article_url, im... | mit | 6,987,141,486,954,231,000 | 24.835443 | 70 | 0.627634 | false | this is export to use ''.join(soup.body.contents) download image its better to use another worker catch the image can be caught | 127 | en | 0.922431 |
carthach/essentia | test/src/unittests/sfx/test_tctototal.py | 1 | 2182 | #!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), e... | agpl-3.0 | -6,654,946,886,523,032,000 | 29.732394 | 79 | 0.666361 | false | !/usr/bin/env python Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra This file is part of Essentia Essentia 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 (FSF), either version 3 ... | 757 | en | 0.876869 |
dreadatour/Cactus | cactus/tests/deployment/test_bucket_name.py | 1 | 1110 | # coding:utf-8
from cactus.tests.deployment import DummyUI, DummySite, DummyDeploymentEngine, BaseDeploymentTestCase
class BucketNameTestCase(BaseDeploymentTestCase):
def setUp(self):
super(BucketNameTestCase, self).setUp()
self.ui = DummyUI(create_bucket=False)
self.site = DummySite(self.... | bsd-3-clause | -5,000,288,575,577,189,000 | 31.647059 | 101 | 0.659459 | false | Test that we don't prompt the bucket name in case it's configured
Test that we prompt the bucket name in case it's not configured
coding:utf-8 | 144 | en | 0.947334 |
DrDos0016/z2 | museum_site/migrations/0011_auto_20170112_0208.py | 1 | 2385 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-12 02:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('museum_site', '0010_auto_20160826_2152'),
]
operations = [
migrations.Alter... | mit | -992,943,723,689,504,300 | 30.381579 | 93 | 0.534172 | false | -*- coding: utf-8 -*- Generated by Django 1.10.4 on 2017-01-12 02:08 | 68 | en | 0.713486 |
ericawright/bedrock | bedrock/firefox/views.py | 1 | 32602 | # -*- coding: utf-8 -*-
# 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 hashlib
import hmac
import re
from collections import OrderedDict
from urllib.parse impor... | mpl-2.0 | -329,211,271,012,326,140 | 35.921857 | 114 | 0.623765 | false | Take the attribution codes and return the URL encoded string
respecting max length.
Take the attribution codes and return the base64 encoded string
respecting max length and HMAC signature.
Return a JSON response containing the HMAC signed stub attribution value
-*- coding: utf-8 -*- This Source Code Form is subject ... | 2,288 | en | 0.76755 |
jaeilepp/eggie | mne/coreg.py | 1 | 40760 | """Coregistration between different coordinate frames"""
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD (3-clause)
from .externals.six.moves import configparser
import fnmatch
from glob import glob, iglob
import os
import re
import shutil
from warnings import warn
import numpy as np
from ... | bsd-2-clause | -7,231,553,313,191,468,000 | 34.259516 | 79 | 0.5934 | false | Decimate the number of points using a voxel grid
Create a voxel grid with a specified resolution and retain at most one
point per voxel. For each voxel, the point closest to its center is
retained.
Parameters
----------
pts : array, shape = (n_points, 3)
The points making up the head shape.
res : scalar
The r... | 13,622 | en | 0.701944 |
kustomzone/Fuzium | core/src/Ui/UiRequest.py | 1 | 25682 | import time
import re
import os
import mimetypes
import json
import cgi
from Config import config
from Site import SiteManager
from User import UserManager
from Plugin import PluginManager
from Ui.UiWebsocket import UiWebsocket
from Crypt import CryptHash
status_texts = {
200: "200 OK",
206: "206 Partial Cont... | mit | -3,974,623,801,601,027,000 | 43.203098 | 249 | 0.566545 | false | Get parameters Enviroment settings ['CONTENT_LENGTH', 'CONTENT_TYPE', 'GATEWAY_INTERFACE', 'HTTP_ACCEPT', 'HTTP_ACCEPT_ENCODING', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_COOKIE', 'HTTP_CACHE_CONTROL', 'HTTP_HOST', 'HTTP_HTTPS', 'HTTP_ORIGIN', 'HTTP_PROXY_CONNECTION', 'HTTP_REFERER', 'HTTP_USER_AGENT', 'PATH_INFO', 'QUERY_STRIN... | 4,286 | en | 0.574694 |
nthien/flaskup | flaskup/console.py | 2 | 1462 | # -*- coding: utf-8 -*-
import os
import argparse
from datetime import date
from flaskup.models import SharedFile
from flaskup.filters import filesizeformat
def action_clean(quiet):
today = date.today()
count = 0
deleted_files = []
for f in SharedFile.find_all():
if f.expire_date < today:
... | bsd-3-clause | -4,315,482,644,957,705,700 | 25.581818 | 82 | 0.596443 | false | -*- coding: utf-8 -*- parse arguments quiet? call function | 58 | en | 0.241448 |
jimmy201602/webterminal | permission/commons.py | 1 | 3118 | from django.contrib.auth.models import Permission
from django.utils.translation import ugettext_lazy as _
def parse_permission_tree():
permission_tree = {}
permission_tree_list = []
queryset = Permission.objects.filter(content_type__app_label__in=[
'common', 'permission'], codename__contains='can_... | gpl-3.0 | -1,413,970,611,561,117,400 | 46.242424 | 114 | 0.395125 | false | 0 | en | 0.110449 | |
revesansparole/oacontainer | src/openalea/container/property_graph.py | 1 | 9223 | # -*- python -*-
#
# OpenAlea.Core
#
# Copyright 2006-2009 INRIA - CIRAD - INRA
#
# File author(s): Fred Boudon <fred.boudon@cirad.fr>
#
# Distributed under the Cecill-C License.
# See accompanying file LICENSE.txt or copy at
# http://www.cecill.info/licences/Licence_CeCILL-C_V1-... | mit | -70,432,156,574,563,224 | 31.475352 | 80 | 0.545809 | false | Exception used when a property is missing.
Simple implementation of PropertyGraph using
dict as properties and two dictionaries to
maintain these properties
Add a new map between eid and a data.
args:
- property_name (str): name identifier for this property
- values (dict of (eid, any)): pre set values for some edge... | 2,952 | en | 0.640373 |
jds2001/sos | sos/plugins/mongodb.py | 1 | 1619 | # Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@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; either version 2 of the License, or
# (at your option) any later version.
# ... | gpl-2.0 | 880,026,662,020,041,000 | 30.745098 | 73 | 0.662137 | false | MongoDB document database
Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@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; either version 2 of the License, or (at your option) ... | 800 | en | 0.866682 |
wasade/american-gut-web | amgut/handlers/auth_handlers.py | 1 | 4373 | #!/usr/bin/env python
from tornado.web import authenticated
from tornado.escape import json_encode
from amgut.util import AG_DATA_ACCESS
from amgut.lib.mail import send_email
from amgut.handlers.base_handlers import BaseHandler
from amgut import media_locale, text_locale
# login code modified from https://gist.githu... | bsd-3-clause | -3,059,562,258,704,055,000 | 36.059322 | 85 | 0.584038 | false | user login, no page necessary
Logout handler, no page necessary
User Creation
!/usr/bin/env python login code modified from https://gist.github.com/guillaumevincent/4771570 Make sure that all fields were entered create the user if needed Create the kit and add the kit to the user Add the barcodes Email the verificatio... | 397 | en | 0.829426 |
Kynarth/pyqtcli | tests/test_addqres.py | 1 | 6428 | import os
import shutil
from click.testing import CliRunner
from pyqtcli.cli import pyqtcli
from pyqtcli.qrc import read_qrc
from pyqtcli.test.qrc import QRCTestFile
from pyqtcli.test.verbose import format_msg
from pyqtcli import verbose as v
def test_simple_addqres(config, test_resources):
runner = CliRunner()... | mit | -3,913,761,367,511,627,000 | 29.609524 | 77 | 0.660703 | false | Generate a qrc file named res and update config file Test addqres with default option Parse qrc file Check qresource has been added Check file subelements in qresource Check res_folder has been added to dirs variable of config file Make a new dir to complicate path between resources folder and qrc file Generate a qrc f... | 1,537 | en | 0.789379 |
felipenaselva/repo.felipe | plugin.video.uwc/favorites.py | 1 | 2571 | '''
Ultimate Whitecream
Copyright (C) 2015 mortael
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.
... | gpl-2.0 | -3,299,589,569,647,617,000 | 28.215909 | 85 | 0.668222 | false | Ultimate Whitecream
Copyright (C) 2015 mortael
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in ... | 659 | en | 0.907524 |
getefesto/efesto | tests/unit/handlers/BaseHandler.py | 1 | 1059 | # -*- coding: utf-8 -*-
from efesto.handlers import BaseHandler
from pytest import fixture
@fixture
def handler(magic):
handler = BaseHandler(magic())
handler.q = magic()
return handler
def test_basehandler_init(magic):
model = magic()
handler = BaseHandler(model)
assert handler.model == mo... | gpl-3.0 | 1,938,557,776,759,132,400 | 24.214286 | 74 | 0.663834 | false | Verifies that embeds work with backrefs.
-*- coding: utf-8 -*- | 64 | en | 0.913316 |
qinjunjerry/PyKeyBox | keybox.py | 1 | 15148 | #!/usr/bin/env python
"""A mini key/password manager written in python using the AES encryption algorithm."""
import os
import sys
import time
import os.path
import random
import sqlite3
import hashlib
import getpass
import argparse
import Crypto.Cipher.AES
class KeyBox(object):
TABLE_NAME = "keybox"
MASTE... | apache-2.0 | 3,663,396,818,684,847,600 | 38.75853 | 118 | 0.57057 | false | !/usr/bin/env python the AES key of the master password, to encrypt key content Use 8-bit string instead of unicode string, in order to read/write international characters like Chinese The following line would use unicode string self.conn.text_factory = lambda x: unicode(x, 'utf-8', 'ignore') the hash of the AES key, s... | 759 | en | 0.677548 |
hpcugent/vsc-processcontrol | test/processcontrol.py | 1 | 4021 | #
#
# Copyright 2013-2013 Ghent University
#
# This file is part of vsc-processcontrol,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules found... | lgpl-2.1 | -997,042,249,967,279,200 | 33.367521 | 107 | 0.648844 | false | Copyright 2013-2013 Ghent University This file is part of vsc-processcontrol, originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), with support of Ghent University (http://ugent.be/hpc), the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), the Hercules foundation (http://www.... | 1,723 | en | 0.775602 |
edgarli/proj8 | main.py | 1 | 14406 | import flask
from flask import render_template
from flask import request
from flask import url_for
import uuid
import json
import logging
# Date handling
import arrow # Replacement for datetime, based on moment.js
import datetime # But we still need time
from dateutil import tz # For interpreting local times
# OA... | artistic-2.0 | 5,545,990,509,238,872,000 | 32.737705 | 100 | 0.64376 | false | Sort key for the list of calendars: primary calendar first,
then other selected calendars, then unselected calendars.
(" " sorts before "X", and tuples are compared piecewise)
We need a Google calendar 'service' object to obtain
list of calendars, busy times, etc. This requires
authorization. If authorization is alre... | 4,936 | en | 0.87082 |
DigitalSlideArchive/large_image | large_image/constants.py | 1 | 1924 | #############################################################################
# Copyright Kitware 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/licen... | apache-2.0 | -6,192,587,494,464,616,000 | 28.6 | 77 | 0.591476 | false | Copyright Kitware Inc. Licensed under the Apache License, Version 2.0 ( the "License" ); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distrib... | 857 | en | 0.803466 |
pelotoncycle/shared_memory_bloomfilter | tests/test_bloomfilter_error_rate.py | 1 | 1471 | from tempfile import NamedTemporaryFile
from unittest import TestCase
from peloton_bloomfilters import BloomFilter, ThreadSafeBloomFilter, SharedMemoryBloomFilter
class Case(object):
def test(self):
self.assert_p_error(0.2, 1340)
self.assert_p_error(0.15, 870)
self.assert_p_error(0.1, 6... | gpl-3.0 | -8,275,922,267,959,018,000 | 30.978261 | 92 | 0.602311 | false | 0 | en | 0.110449 | |
facebookresearch/ParlAI | parlai/tasks/taskntalk/agents.py | 1 | 3737 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.teachers import Teacher
from parlai.utils.io import PathManager
from .build import build
import json
i... | mit | 5,102,321,009,451,953,000 | 27.968992 | 87 | 0.587905 | false | TaskNTalk basic teacher, it picks a random image and associates a random task with
it.
Metric updates and observation are to be implemented.
Default teacher for small dataset, invoked by ``taskntalk``.
Teacher for large dataset, invoked by ``taskntalk:large``.
Teacher for small dataset, invoked by ``taskntalk:small``.... | 1,068 | en | 0.863187 |
Brazelton-Lab/bio_utils | bio_utils/iterators/fasta.py | 1 | 5590 | #! /usr/bin/env python3
"""Faster, simpler, Screed-esque iterator for FASTA files
Copyright:
fasta.py iterate over and return entries of a FASTA file
Copyright (C) 2015 William Brazelton, Alex Hyer
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Ge... | gpl-3.0 | -4,799,499,336,410,846,000 | 33.294479 | 82 | 0.584258 | false | A simple class to store data from FASTA entries and write them
Attributes:
id (str): FASTA ID (everything between the '>' and the first space
of header line)
description (str): FASTA description (everything after the first
space of the header line)
sequence (str): FAST... | 3,248 | en | 0.777237 |
berrak/cookiecutter-py3starter | {{cookiecutter.github_repo_name}}/{{cookiecutter.package_name}}/cli.py | 1 | 1728 | #!/usr/bin/env python3
#
# Copyright {{ cookiecutter.author_name }}, {{ cookiecutter.initial_year_to_release }}
#
# 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/licen... | apache-2.0 | -237,356,212,394,522,000 | 29.315789 | 123 | 0.681713 | false | !/usr/bin/env python3 Copyright {{ cookiecutter.author_name }}, {{ cookiecutter.initial_year_to_release }} 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 U... | 647 | en | 0.824669 |
roiser/WLCG | ssbCvmfsStatus/wlcg-cvmfs4ssb.py | 1 | 10226 | #/bin/env python
import urllib, json, datetime
from xml.parsers import expat
class c4s :
def __init__(self):
self.cvmfsBaseVersionFile = 'cvmfsVersion.txt'
self.requestedVersion = ''
self.myVO = 'LHCb'
self.cvmfsColumnNo = 202
self.wlcgTopoColumnNo = 144
self.topoDict = {'WLCG':{}, self.myV... | mit | 7,568,485,905,248,002,000 | 39.741036 | 194 | 0.622531 | false | /bin/env python start probe functions eval functions retrieval functions self.ssbData['CvmfsProbeTime'][site] = metric['EndTime'] end probe functions get WLCG Mon mapping VO site name <-> site ID read CVMFS base line version number read topology file and create mapping VO site name <-> WLCG site name | 308 | en | 0.369967 |
arkabytes/abc | ABC/migrations/0005_auto_20171023_0929.py | 1 | 7572 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-23 09:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ABC', '0004_auto_20171023_0924'),
]
operations = [
migrations.AddField(
... | gpl-3.0 | 5,220,348,303,067,717,000 | 29.288 | 66 | 0.509377 | false | -*- coding: utf-8 -*- Generated by Django 1.11.4 on 2017-10-23 09:29 | 68 | en | 0.627551 |
Brickstertwo/git-commands | tests/unit/test_abandon.py | 1 | 7149 | import mock
import unittest
import testutils
from bin.commands import abandon
class TestAbandon(unittest.TestCase):
@mock.patch('bin.commands.utils.execute.check_output')
@mock.patch('bin.commands.utils.execute.call')
@mock.patch('bin.commands.utils.messages.info')
def test_abandon(self, mock_info, ... | mit | 7,174,117,415,107,765,000 | 36.041451 | 97 | 0.575465 | false | Same as test_abandon_dryRun since a quiet dry run isn't useful.
setup when then setup when then when pragma: no cover when pragma: no cover when pragma: no cover then setup when then setup when then setup when then | 221 | en | 0.728838 |
tomhur/domoticz-scripts | python/script_time_verisure.py | 1 | 3621 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import domoticz as d
import sys
import time
sys.path.insert(0, '/opt/python-verisure/')
import verisure
import pickle
import pytz
import urllib3
import certifi
from datetime import datetime
from tzlocal import get_localzone
debug = False
try:
execfile("/etc/domoticz/scrip... | mit | 8,858,491,424,379,706,000 | 28.680328 | 196 | 0.638498 | false | !/usr/bin/python -*- coding: utf-8 -*-LoginGet overviewAlarmSmartplugsClimate | 77 | en | 0.36228 |
AFMD/smallProjects | nanowire-network-simulations/manningp3plotedit6.py | 1 | 20377 | """
Created on Mon Jun 15 15:42:23 2020
@author: sturdzal
"""
#@title Imports
from shapely.geometry import LineString, MultiLineString, MultiPoint, Point
from shapely.ops import cascaded_union
from scipy.special import comb
from itertools import product
import scipy.stats as stats
import matplotlib.pyplot ... | gpl-2.0 | -3,190,882,586,409,944,000 | 40.416667 | 327 | 0.551112 | false | Created on Mon Jun 15 15:42:23 2020
@author: sturdzal
@title Importsfrom pykrylov.symmlq import symmlqfrom pykrylov.symmlq import *from symmlq import * import symmlqfrom pykrylov.linop import PysparseLinearOperatorfrom pykrylov.symmlq import *------------------Parameter-------------------- 100100R_junc_list = [1000,... | 4,170 | en | 0.674394 |
rbuffat/pyidf | tests/test_zonemixing.py | 1 | 5372 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.zone_airflow import ZoneMixing
log = logging.getLogger(__name__)
class TestZoneMixing(unittest.TestCase):
def setUp(self):
self.fd, self.path = tempfile.mkstemp()
... | apache-2.0 | 8,416,077,038,472,639,000 | 51.676471 | 142 | 0.706627 | false | alpha object-list object-list alpha real real real real object-list real object-list object-list object-list object-list object-list object-list object-list | 156 | en | 0.811396 |
applied-mixnetworks/txmix | txmix/udp_transport.py | 1 | 1452 |
from __future__ import print_function
import attr
from zope.interface import implementer
from twisted.internet.interfaces import IReactorUDP
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import defer
from txmix import IMixTransport
@implementer(IMixTransport)
@attr.s()
class UDPTrans... | gpl-3.0 | 8,444,479,411,809,278,000 | 29.25 | 83 | 0.683196 | false | implements the IMixTransport interface
i am called by the twisted reactor when our transport receives a UDP packet
send message to addr
where addr is a 2-tuple of type: (ip address, UDP port)
make this transport begin listening on the specified interface and UDP port
interface must be an IP address
XXX todo: assert t... | 367 | en | 0.77006 |
oscarfonts/sensor-widgets | doc/en/conf.py | 1 | 9203 | # -*- coding: utf-8 -*-
#
# Sensor Widgets documentation build configuration file, created by
# sphinx-quickstart on Fri Sep 4 12:48:01 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | mit | -4,561,226,566,972,050,400 | 31.40493 | 79 | 0.708356 | false | -*- coding: utf-8 -*- Sensor Widgets documentation build configuration file, created by sphinx-quickstart on Fri Sep 4 12:48:01 2015. This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this autogenerated file. All configuration ... | 7,886 | en | 0.648183 |
catapult-project/catapult | telemetry/telemetry/internal/platform/network_controller_backend.py | 3 | 7521 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import absolute_import
import os
from telemetry.internal.util import webpagereplay_go_server
from telemetry.internal.util import ts_proxy_se... | bsd-3-clause | -3,696,970,511,087,998,500 | 33.819444 | 80 | 0.68568 | false | Raised when the archive path does not exist for replay mode.
Control network settings and servers to simulate the Web.
Network changes include forwarding device ports to host platform ports.
Web Page Replay is used to record and replay HTTP/HTTPS responses.
Raised an existing browser would get different remote replay ... | 2,941 | en | 0.856612 |
felipenaselva/felipe.repository | script.module.placenta/lib/resources/lib/sources/fr/filmenstreaminghd.py | 1 | 6831 | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | gpl-2.0 | 2,041,355,159,829,254,000 | 36.740331 | 224 | 0.495389 | false | -*- coding: UTF-8 -*- ---------------------------------------------------------------------------- "THE BEER-WARE LICENSE" (Revision 42): @tantrumdev wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy m... | 620 | en | 0.657086 |
jasonbaldridge/try-tf | softmax-python3.py | 1 | 5020 | import tensorflow.python.platform
import numpy as np
import tensorflow as tf
import plot_boundary_on_data
# Global variables.
NUM_LABELS = 2 # The number of labels.
BATCH_SIZE = 100 # The number of training examples to use per training step.
# Define the flags useable from the command line.
tf.app.flags.DEFIN... | apache-2.0 | 6,272,947,537,748,210,000 | 34.857143 | 90 | 0.6251 | false | Global variables. The number of labels. The number of training examples to use per training step. Define the flags useable from the command line. Extract numpy representations of the labels and features given rows consisting of: label, feat_0, feat_1, ..., feat_n Arrays to hold the labels and feature vectors. Iterate... | 1,381 | en | 0.802778 |
vamdt/spider | douban/pics.py | 1 | 1638 | # coding=utf-8
import re
import urllib
import json
import os, random
BASE_DOWN_DIR = './download'
BASE_DOWN_POSTS_DIR = BASE_DOWN_DIR + '/posts'
BASE_URL = 'http://www.douban.com/photos/photo/2230938262/'
class AppURLopener(urllib.FancyURLopener):
version = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/5... | mit | 6,337,651,235,404,347,000 | 25.015873 | 162 | 0.616606 | false | coding=utf-8 | 12 | en | 0.61419 |
ewindisch/nova | nova/compute/manager.py | 1 | 251375 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 | -2,143,329,436,891,058,400 | 44.235739 | 79 | 0.561126 | false | Copyright 2010 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. Copyright 2011 Justin Santa Barbara 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... | 20,514 | en | 0.921588 |
agx/git-buildpackage | setup.py | 1 | 3370 | #!/usr/bin/python3
# vim: set fileencoding=utf-8 :
# Copyright (C) 2006-2011 Guido Günther <agx@sigxcpu.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 Software Foundation; either version 2 of the Li... | gpl-2.0 | 564,592,606,133,849,100 | 31.07619 | 75 | 0.635986 | false | Get version from debian changelog and write it to gbp/version.py
!/usr/bin/python3 vim: set fileencoding=utf-8 : Copyright (C) 2006-2011 Guido Günther <agx@sigxcpu.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... | 1,053 | en | 0.891179 |
rhazdon/django-sonic-screwdriver | django_sonic_screwdriver/apps/ban/migrations/0001_initial.py | 1 | 2978 | # Generated by Django 3.0.2 on 2020-01-23 13:24
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | mit | -282,668,870,110,881,380 | 62.361702 | 258 | 0.629953 | false | Generated by Django 3.0.2 on 2020-01-23 13:24 | 45 | en | 0.742755 |
cuckoobox/cuckoo | stuff/distributed/cluster-test.py | 1 | 3084 | # Copyright (C) 2017-2018 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import click
import requests
import time
class Script(object):
def __init__(self):
self.name = self.__class__.__name__.lower()
sel... | mit | -8,013,044,425,276,418,000 | 29.534653 | 76 | 0.519455 | false | Copyright (C) 2017-2018 Cuckoo Foundation. This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org See the file 'docs/LICENSE' for copying permission. | 161 | en | 0.78965 |
Illumina/HapMix | scripts/haplobams/split_by_haplotype_lib.py | 1 | 11911 | import sys
sys.path.append('/opt/rh/python27/root/usr/lib64/python2.7/site-packages/pysam')
sys.path.append('/home/ptedder/local/lib/python2.7/site-packages')
sys.path.append('/home/ptedder/local/lib64/python2.7/site-packages')
print sys.path
import random,pysam,re,subprocess,HTSeq,pdb,argparse
from collections import ... | gpl-3.0 | -1,688,665,998,435,795,000 | 43.114815 | 363 | 0.608513 | false | d={'hc':0,'hd':0,'bt':0,'ot':0,'rf':0,'fr':0}SKIPPING READ AS UNMAPPEDHYPOTHETICAL BUG IF INDEL AND SNP AT SAME POSCOUNT NUMBER OF MUTATIONS FOR EACH READ WHICH CAN BE ASSIGNED TO EACH HAPLOTYPEcheck hom/het and call: IS IT THE SECOND/ORPHAN READ? CAN THE READ BE ASSIGNED UNIQUELY TO EITHER OF THE HAPLOTYPES? IS IT THE... | 741 | en | 0.90151 |
Runscope/pysaml2 | src/saml2/pack.py | 1 | 8806 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
"""Contains classes and functions that are necessary to implement
different bindings.
Bindings normally consists of three parts:
- rules about what to send
- how to package the information
- which protocol to use
"""
import urlparse
import saml2
import base64
import u... | bsd-2-clause | -1,560,756,759,072,883,200 | 33.533333 | 92 | 0.607086 | false | The HTTP POST binding defines a mechanism by which SAML protocol
messages may be transmitted within the base64-encoded content of a
HTML form control.
:param message: The message
:param location: Where the form should be posted to
:param relay_state: for preserving and conveying state information
:return: A tuple con... | 2,134 | en | 0.711311 |
mosra/magnum-examples | src/python/magnum-primitives-scenegraph.py | 1 | 4843 | #!/usr/bin/env python3
#
# This file is part of Magnum.
#
# Original authors — credit is appreciated but not required:
#
# 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021
# — Vladimír Vondruš <mosra@centrum.cz>
#
# This is free and unencumbered software released into the p... | unlicense | 7,908,722,276,422,597,000 | 42.576577 | 81 | 0.674178 | false | !/usr/bin/env python3 This file is part of Magnum. Original authors — credit is appreciated but not required: 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 — Vladimír Vondruš <mosra@centrum.cz> This is free and unencumbered software released into the public domain. Anyo... | 1,496 | en | 0.889232 |
jeremiahyan/odoo | addons/account/models/chart_template.py | 1 | 74310 | # -*- coding: utf-8 -*-
from odoo.exceptions import AccessError
from odoo import api, fields, models, _
from odoo import SUPERUSER_ID
from odoo.exceptions import UserError, ValidationError
from odoo.http import request
from odoo.addons.account.models.account_tax import TYPE_TAX_USE
import logging
_logger = logging.g... | gpl-3.0 | -6,534,800,096,511,794,000 | 55.595583 | 274 | 0.642282 | false | Repartition lines give the possibility to directly give
a list of ids to create for tags instead of a list of ORM commands.
This function checks that tags_list uses this syntactic sugar and returns
an ORM-compliant version of it if it does.
This function creates bank journals and their account for each line
data retur... | 12,009 | en | 0.843867 |
vpol/gitinspector | gitinspector/version.py | 1 | 1300 | # coding: utf-8
#
# Copyright © 2012-2014 Ejwa Software. All rights reserved.
#
# This file is part of gitinspector.
#
# gitinspector 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 Lic... | gpl-3.0 | 7,889,733,652,444,446,000 | 33.157895 | 78 | 0.74114 | false | coding: utf-8 Copyright © 2012-2014 Ejwa Software. All rights reserved. This file is part of gitinspector. gitinspector 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 ... | 714 | en | 0.898776 |
Brocade-OpenSource/OpenStack-DNRM-Neutron | neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py | 1 | 2121 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 OpenStack Foundation
#
# 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,302,952,998,911,602,000 | 32.140625 | 78 | 0.728901 | false | ext_gw_mode
Revision ID: 128e042a2b68
Revises: 32b517556ec9
Create Date: 2013-03-27 00:35:17.323280
vim: tabstop=4 shiftwidth=4 softtabstop=4 Copyright 2013 OpenStack Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You ... | 871 | en | 0.754854 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.