repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 22
values | size stringlengths 4 7 | content stringlengths 626 1.05M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 5.21 99.9 | line_max int64 12 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
libyal/libyal | yaldevtools/definitions.py | 1 | 1409 | # -*- coding: utf-8 -*-
"""The definitions."""
from __future__ import unicode_literals
DATA_TYPE_BOOLEAN = 'boolean'
DATA_TYPE_BINARY_DATA = 'binary_data'
DATA_TYPE_DOUBLE = 'double'
DATA_TYPE_FAT_DATE_TIME = 'fat_date_time'
DATA_TYPE_FILETIME = 'filetime'
DATA_TYPE_FLOAT = 'float'
DATA_TYPE_FLOATINGTIME = 'floating... | apache-2.0 | 2,838,674,518,745,749,000 | 27.755102 | 53 | 0.713272 | false |
Ircam-Web/mezzanine-organization | organization/pages/migrations/0014_auto_20161028_1516.py | 1 | 1131 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-28 13:16
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('pages', '0005_auto_20160923_1219'),
('organization-... | agpl-3.0 | 5,761,957,583,470,936,000 | 34.34375 | 184 | 0.594164 | false |
fmfn/UnbalancedDataset | imblearn/under_sampling/_prototype_selection/tests/test_instance_hardness_threshold.py | 2 | 3098 | """Test the module ."""
# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>
# Christos Aridas
# License: MIT
import pytest
import numpy as np
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.naive_bayes import GaussianNB as NB
from s... | mit | 3,621,761,623,600,403,500 | 31.270833 | 88 | 0.666559 | false |
dewuem/python-bioinf | sliding_window.py | 1 | 2485 | #!/usr/bin/env python2
# Daniel Elsner
# Creates a sliding window of sequence pieces to blast against
# takes two arguments, input file and window size. Only the first record
# in a fasta will be used, the rest ignored.
from Bio import SeqIO # read sequence files
import sys
# read your sequence file
try:
wit... | mit | -8,909,885,774,297,362,000 | 39.080645 | 91 | 0.646278 | false |
open-synergy/vertical-association | membership_autoextend/models/product_template.py | 1 | 1383 | # -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import fields, models
class ProductTemplate(models.Model):
_inherit = 'product.template'
membership_autoextend = fields.Boolean('Autoextend membership',
... | agpl-3.0 | -2,176,540,284,076,027,100 | 48.357143 | 76 | 0.65919 | false |
matthewkitching/constraint_local_search | constraints/alldiff.py | 1 | 1294 | from constraints.base_constraint import BaseConstraint
from collections import defaultdict
class AllDifferent(BaseConstraint):
def __init__(self, variables, identifier=None):
'''
AllDifferent is satisfied if every variable is assigned a different
value.
The moves_necessary is equal... | gpl-2.0 | -7,278,428,690,419,748,000 | 39.4375 | 78 | 0.659969 | false |
noba3/KoTos | addons/plugin.video.mediathek/mediathek/kika.py | 1 | 6715 | # -*- coding: utf-8 -*-
#-------------LicenseHeader--------------
# plugin.video.Mediathek - Gives access to most video-platforms from German public service broadcasters
# Copyright (C) 2010 Raptor 2101 [raptor2101@gmx.de]
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... | gpl-2.0 | -5,218,597,951,839,051,000 | 51.46875 | 167 | 0.651378 | false |
lkundrak/scraperwiki | services/jdatastore/datalib.py | 1 | 22102 | from twisted.python import log
import ConfigParser
import hashlib
import types
import os, string, re, sys
import time, datetime
import sqlite3
import base64
import shutil
import logging
import urllib
import traceback
import json
import csv
import StringIO
from twisted.internet import reactor
logger = None # filled ... | agpl-3.0 | -168,464,633,160,901,730 | 43.115768 | 190 | 0.588363 | false |
sebp/scikit-survival | doc/conf.py | 1 | 12316 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# scikit-survival documentation build configuration file
#
# 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 values have a... | gpl-3.0 | -5,840,506,738,319,099,000 | 30.256345 | 261 | 0.633618 | false |
Marginal/OverlayEditor | draw.py | 1 | 94208 | import OpenGL # for __version__
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.arrays import vbo
from OpenGL.extensions import alternate, hasGLExtension
from OpenGL.GL.shaders import compileShader, compileProgram
from OpenGL.GL.ARB.occlusion_query import *
glBeginQuery = alternate(glBeginQuery, glBeginQue... | gpl-2.0 | 7,955,717,471,736,110,000 | 45.453649 | 421 | 0.577393 | false |
D0tR4ck3t33r/redis-test-chat | client.py | 1 | 2690 | import redis
_DEBUG = True
r = redis.Redis(
host='127.0.0.1',
port=6379)
# Call chat_client._keepAlive everytime a method is used
def _keep_client_alive(fn):
# The wrapper method which will get called instead of the decorated method:
def wrapper(self, *args, **kwargs):
self._keepAliv... | gpl-3.0 | 4,861,558,684,750,658,000 | 27.315789 | 79 | 0.519703 | false |
PLOS/allofplos | allofplos/elements/article_elements.py | 1 | 18523 | """These functions are for parsing individual elements of the article XML tree
Eventually these functions will probably need to be a class.
"""
import datetime
import difflib
import re
import string
import lxml.etree as et
import unidecode
def parse_article_date(date_element, date_format='%d %m %Y'):
"""
Fo... | mit | -9,046,366,052,612,875,000 | 47.362924 | 142 | 0.624791 | false |
sheerluck/andrew | seconds.py | 1 | 3114 | #-*- coding: utf-8 -*-
class Seconds(object):
def __init__(self, count):
self._seconds = count
def this(self):
return "{} seconds".format(self._seconds)
class Minute(object):
def __init__(self, count):
self._minutes = count
self._seconds = Seconds(self._minutes * 60)
... | gpl-3.0 | -4,255,883,822,636,034,000 | 19.090323 | 59 | 0.577392 | false |
aldanor/pynab | ynab/models.py | 1 | 13989 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import six
import toolz
import collections
from enum import Enum
from dateparser.date import DateDataParser
from . import schema
from .util import force_encode
class AccountType(Enum):
CHECKING = 'Checking'
SAVINGS = 'Savings'
CREDIT_CARD ... | bsd-3-clause | 871,299,582,886,563,200 | 24.527372 | 98 | 0.611766 | false |
tectronics/yarest | yarest/gui/_edit.py | 1 | 21660 | ## -*- coding: utf-8 -*-
# Copyright © 2011-2012 Mike Fled <nonvenia@gmail.com>
import re, wx
from configobj import ConfigObj
from wx.lib.intctrl import IntCtrl
from yarest import ConnectionProfile
from ._constants import (BLANK_LINES, PORT_NUMBER_MAX, PORT_NUMBER_MIN,
RESIZE_NO, RESIZE_OK)
... | mit | 613,162,719,687,055,700 | 44.122917 | 81 | 0.579482 | false |
Gimpneek/exclusive-raid-gym-tracker | app/features/steps/page_object_models/selectors/listing.py | 1 | 1594 | """ Selectors for list view """
from selenium.webdriver.common.by import By
TITLES = (By.CSS_SELECTOR, '.column.content > h1')
GYMS_TO_VISIT_CARDS = (
By.CSS_SELECTOR,
'#gyms_to_visit .columns > .column > .card'
)
COMPLETED_GYMS_CARDS = (
By.CSS_SELECTOR,
'#completed_gyms .columns > .column > .card'
)
... | gpl-3.0 | -7,723,491,772,617,503,000 | 31.530612 | 76 | 0.663112 | false |
dashesy/pandas-tsdb | influxdb/indb_pd.py | 1 | 12410 | """InfluxDB interface to Pandas dataframe
Copyright Amiigo Inc.
"""
import pandas as pd
import numpy as np
import json
from indb_io import push_indb, query_indb, EmptyInput, InvalidData
def _is_null(val, zero_null=False):
"""check if value is missing
:param val: value to check
:param zero_null: if all-z... | bsd-3-clause | 9,087,867,320,843,652,000 | 30.025 | 93 | 0.545931 | false |
Gateswong/GatesMusicPet | music_pet/services/vgmdb.py | 1 | 5699 | # -*-: coding: utf-8 -*-
import requests
import json
import re
from ..audio import AudioTrack
LANGS = {
u"jp": (u"jp", u"Japanese"),
u"en": (u"en", u"English"),
}
def _get_json_by_link(link):
url = u'''http://vgmdb.info/%s''' % link
return _get_json(url)
def _get_json(url):
resp = requests.g... | mit | -4,544,880,001,078,173,000 | 25.384259 | 97 | 0.602737 | false |
vishnu2kmohan/dcos-commons | frameworks/helloworld/tests/test_secrets.py | 1 | 13700 | import logging
import pytest
import sdk_cmd
import sdk_install
import sdk_marathon
import sdk_plan
import sdk_tasks
import sdk_utils
from retrying import retry
from tests import config
log = logging.getLogger(__name__)
NUM_HELLO = 2
NUM_WORLD = 3
secret_content_default = "hello-world-secret-data"
secret_content_alt... | apache-2.0 | -7,747,007,387,317,984,000 | 37.055556 | 125 | 0.685255 | false |
adviti/melange | app/soc/modules/gsoc/views/proposal_review.py | 1 | 33758 | #!/usr/bin/env python2.5
#
# Copyright 2011 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 | -1,911,329,805,116,648,400 | 29.773017 | 79 | 0.666183 | false |
sunfall/giles | giles/games/ataxx/ataxx.py | 1 | 24616 | # Giles: ataxx.py
# Copyright 2012 Phil Bordelon
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progra... | agpl-3.0 | 1,148,322,591,392,057,900 | 35.960961 | 137 | 0.510156 | false |
mwil/collision | figs/ber_contour_AsAu/plot_ber_contour_AsAu.py | 1 | 3179 | # Copyright 2013-2014 Matthias Wilhelm
# 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 i... | gpl-3.0 | 5,220,181,277,542,690,000 | 40.828947 | 148 | 0.654923 | false |
sburnett/seattle | custominstallerbuilder/common/logging.py | 1 | 2344 | """
<Program Name>
logging.py
<Started>
December 2010
<Author>
Alex Hanson
<Purpose>
Provides a log_exception() function that can be called in the except portion
of a try...except block to log a formatted traceback to sys.stderr.
For exceptions that were not explicitly caught in a try...except block,
... | mit | -7,317,077,929,695,061,000 | 23.673684 | 79 | 0.689846 | false |
endlessm/chromium-browser | build/android/gyp/dex.py | 1 | 19214 | #!/usr/bin/env python
#
# Copyright 2013 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.
import argparse
import logging
import os
import re
import shutil
import sys
import tempfile
import zipfile
from util import build_ut... | bsd-3-clause | 7,710,404,384,167,602,000 | 35.95 | 80 | 0.67404 | false |
erigones/esdc-ce | api/authtoken/apps.py | 1 | 1738 | """
Copied+modified from rest_framework.authtoken.apps, which is licensed under the BSD license:
*******************************************************************************
Copyright (c) 2011-2016, Tom Christie
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, ar... | apache-2.0 | 4,715,227,434,735,411,000 | 50.117647 | 92 | 0.732451 | false |
jeremyosborne/python | multiproc/mproc.py | 1 | 2729 | # Why potentially use multiprocessing over threading?
# See:
#
# http://eli.thegreenplace.net/2012/01/16/python-parallelizing-cpu-bound-tasks-with-multiprocessing/
# and
# http://www.dabeaz.com/GIL/
# Notes about multiprocessing: Need to be able to do multiple imports on
# the __main__ file, and as such c... | mit | 5,438,134,134,401,925,000 | 33.1125 | 104 | 0.648223 | false |
pracedru/pyDesign | PyDesignData/PyDesignSerializer.py | 1 | 1563 | import json
import zlib
import base64
import PyDesignData.PyDesignDocument
__author__ = 'magnus'
def complex_handler(Obj):
if hasattr(Obj, 'jsonable'):
return Obj.jsonable()
else:
raise Exception('Object of type %s with value of %s is not JSON serializable' % (type(Obj), repr(Obj)))
def se... | mit | 1,326,747,839,351,036,200 | 30.26 | 111 | 0.62572 | false |
andreashorn/lead_dbs | ext_libs/OSS-DBS/OSS_platform/Math_module_MPI_only_FEniCS.py | 1 | 25928 | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 19 13:23:54 2018
@author: butenko
"""
from dolfin import *
from pandas import read_csv
from tissue_dielectrics import DielectricProperties
import numpy as np
import os
import subprocess
import pickle
import warnings
warnings.filterwarnings("ignore")
import importlib
#... | gpl-3.0 | 2,766,105,423,233,284,600 | 45.382826 | 266 | 0.627314 | false |
avinassh/haxor | hackernews/__init__.py | 1 | 13996 | #!/usr/bin/env python
"""
haxor
Unofficial Python wrapper for official Hacker News API
@author avinash sajjanshetty
@email hi@avi.im
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import asyncio
import datetime
import json
import sys
from urllib.parse import urljoin
import request... | mit | 7,675,574,859,662,946,000 | 28.341719 | 79 | 0.57345 | false |
geobricks/geobricks_modis | geobricks_modis_test/rest/test_modis_rest.py | 1 | 2136 | import json
import unittest
from flask import Flask
from geobricks_modis.rest.modis_rest import modis
class GeobricksModisRestTest(unittest.TestCase):
def setUp(self):
self.app = Flask(__name__)
self.app.register_blueprint(modis, url_prefix='/modis')
self.tester = self.app.test_client(sel... | gpl-2.0 | -8,529,286,641,541,722,000 | 39.301887 | 104 | 0.661985 | false |
combatopera/pym2149 | pym2149/dac.py | 1 | 3553 | # Copyright 2014, 2018, 2019, 2020 Andrzej Cichocki
# This file is part of pym2149.
#
# pym2149 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... | gpl-3.0 | 8,010,350,940,594,868,000 | 34.888889 | 112 | 0.710667 | false |
Pexego/PXGO_00019_2014_BU | project-addons/sale_shipping_except/__openerp__.py | 1 | 1210 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Pexego All Rights Reserved
# $Jesús Ventosinos Mayor <jesus@pexego.es>$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affer... | agpl-3.0 | 7,370,873,289,079,417,000 | 36.78125 | 78 | 0.578991 | false |
Lucas-Wong/ToolsProject | WeChat/AutoWeChat.py | 1 | 1366 | #! /usr/bin/env python
#_*_coding:utf-8_*_
import itchat, time
from itchat.content import *
@itchat.msg_register([TEXT, MAP, CARD, NOTE, SHARING])
def text_reply(msg):
#itchat.send('%s: %s' % (msg['Type'], msg['Text']), msg['FromUserName'])
itchat.send_msg('已经收到了消息,消息内容为%s' % msg['Text'], toUserName=msg['From... | gpl-3.0 | -4,828,230,460,930,350,000 | 38.516129 | 111 | 0.647059 | false |
NiclasEriksen/py-towerwars | src/test.py | 1 | 5993 | import unittest
# import main
import functions
tcase = unittest.TestCase
class TestColorCodeConverter(tcase):
def test_white(self):
self.assertEqual(functions.get_color(255, 255, 255, 255), (1, 1, 1, 1))
def test_red(self):
self.assertEqual(functions.get_color(255, 0, 0, 255), (1, 0, 0, 1)... | cc0-1.0 | 8,512,238,743,295,567,000 | 24.611111 | 79 | 0.519439 | false |
dvdme/forecastiopy | tests/test_ForecastIO.py | 1 | 1494 | import os
import sys
import json
import unittest
from forecastiopy import *
class TestForecastIO(unittest.TestCase):
def setUp(self):
with open('tests/resources/dummy_apikey.txt') as f:
apikey = f.read()
self.fio = ForecastIO.ForecastIO(apikey)
with open('tests/resources/re... | epl-1.0 | 843,940,500,443,580,300 | 27.75 | 72 | 0.605756 | false |
wbarfuss/pyunicorn | pyunicorn/climate/eventsynchronization_climatenetwork.py | 1 | 5600 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of pyunicorn.
# Copyright (C) 2008--2015 Jonathan F. Donges and pyunicorn authors
# URL: <http://www.pik-potsdam.de/members/donges/software>
# License: BSD (3-clause)
"""
Provides class for the analysis of dynamical systems and time series based
on event ... | bsd-3-clause | -5,787,141,346,296,175,000 | 39.28777 | 79 | 0.572857 | false |
kristerhedfors/xnet | xnet/io/serialize.py | 1 | 6892 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright(c) 2013 Krister Hedfors
#
import unittest
import StringIO
import cPickle
import hashlib
import hmac
import struct
class NutException(Exception):
pass
class InvalidMagic(NutException):
pass
class InvalidLength(NutException):
pass
class In... | bsd-3-clause | 241,163,241,223,117,340 | 25.205323 | 94 | 0.542078 | false |
gangeli/NaturalLI | pub/acl2015/pr_plot.py | 1 | 1168 | #!/usr/bin/env python
#
import sys
import matplotlib.pyplot as plt
#if len(sys.argv) < 4:
# print "Usage: File xlimit ylimit"
def pr(f):
precisions = []
recalls = []
with open(f, 'r') as f:
for line in f:
p, r = line.split("\t")
precisions.append(float(p))
recalls.appe... | mit | 6,420,919,372,658,777,000 | 25.545455 | 113 | 0.663527 | false |
AlexandreBiguet/NJLlikeModels | PythonStuffs/pnjlA.py | 1 | 3199 | #!/opt/local/bin/python
# coding: utf8
from scipy import optimize
from scipy import integrate
from pathlib import Path
import numpy as np
import sys
import njlA
import utils
class MpnjlA ( njlA.MnjlA ):
def __init__ ( self ):
njlA.MnjlA.__init__(self)
self.Phi = 0.0
self.Phi_min ... | gpl-3.0 | 5,631,456,100,910,675,000 | 27.061404 | 80 | 0.500156 | false |
Elian-0x/practice-python | tutos/How to Think Like a Computer Scientist/chap7.py | 1 | 3387 | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
# Learning python like a computer scientist chap7
# Elian
# Les chaines de caracteres
'''
Elles sont immutables, il n'est donc pas possible de modifier une
chaîne existante sans en créer une nouvelle
'''
import string
nom="Elian"
def ecrire_inverse(s):
length=len... | gpl-3.0 | -8,941,041,229,237,536,000 | 18.660819 | 69 | 0.692445 | false |
Facerafter/starcitizen-tools | extensions/EventLogging/server/tests/test_load.py | 1 | 7720 | # -*- coding: utf-8 -*-
"""
This script generates a stream of requests to beta-labs
(bits.beta.wmflabs.org) to test EventLogging load limitations.
Thanks to Emilio Monti for the Worker and ThreadPool codes!
https://code.activestate.com/recipes/577187-python-thread-pool/
"""
import json
import time
import string
impor... | gpl-3.0 | -1,500,287,337,348,135,200 | 33.774775 | 79 | 0.585363 | false |
lbdreyer/nc-time-axis | nc_time_axis/__init__.py | 1 | 10445 | """
Support for netcdftime axis in matplotlib.
"""
from __future__ import (absolute_import, division, print_function)
from six.moves import (filter, input, map, range, zip) # noqa
from collections import namedtuple
import matplotlib.dates as mdates
import matplotlib.ticker as mticker
import matplotlib.transforms a... | bsd-3-clause | 7,312,765,437,910,256,000 | 36.437276 | 79 | 0.589086 | false |
nave91/dbt | test/integration/012_profile_config_tests/test_profile_config.py | 1 | 1413 | from nose.plugins.attrib import attr
from test.integration.base import DBTIntegrationTest
import dbt.deprecations
class TestNoRunTargetDeprecation(DBTIntegrationTest):
def setUp(self):
DBTIntegrationTest.setUp(self)
self.run_sql_file("test/integration/012_profile_config_tests/seed.sql")
d... | apache-2.0 | -2,097,655,783,617,538,300 | 28.4375 | 79 | 0.519462 | false |
uts-magic-lab/pyride_nao | scripts/py_main.py | 1 | 2931 | import PyNAO
import math
import constants
import tinstate
import messenger
import tininfo
import time
from timers import timermanager
myMessenger = None
msgTryTimer = -1
calTryTimer = -1
cktime = time.time()
def userLogon( name ):
PyNAO.say( '%s has logged on.' % name )
tinstate.updateStatus( constants.USER_PRE... | gpl-3.0 | 5,249,737,204,137,457,000 | 23.838983 | 86 | 0.707608 | false |
KonradBreitsprecher/espresso | testsuite/dawaanr-and-bh-gpu.py | 1 | 5810 | from __future__ import print_function
import math
import unittest as ut
import numpy as np
from numpy import linalg as la
from numpy.random import random, seed
import espressomd
from espressomd.interactions import *
from espressomd.magnetostatics import *
from espressomd.analyze import *
from tests_common import *
fr... | gpl-3.0 | 3,505,035,319,132,454,000 | 41.720588 | 205 | 0.543373 | false |
richtermondt/ankiqt | ankiqt/ui/getshared.py | 1 | 8977 | # -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import ankiqt, simplejson, time, cStringIO, zipfile, tempfile, os, re
import traceback, urllib2, socket, cgi
from ankiqt.u... | gpl-3.0 | 2,402,456,029,569,720,300 | 35.197581 | 81 | 0.508745 | false |
captiosus/treadmill | treadmill/supervisor/__init__.py | 1 | 16553 | """Supervisor definition anc control.
Linux:
Manages daemontools-like services inside the container.
For each application container there may be multiple services defined, which
are controlled by skarnet.org s6 supervision suite.
Application container is started in chrooted environment, and the root
directory struc... | apache-2.0 | -1,955,057,397,741,377,800 | 27.103565 | 79 | 0.61137 | false |
warp1337/opencv_facerecognizer | src/ocvfacerec/facerec/operators.py | 1 | 5486 | # Copyright (c) 2015.
# Philipp Wagner <bytefish[at]gmx[dot]de> and
# Florian Lier <flier[at]techfak.uni-bielefeld.de> and
# Norman Koester <nkoester[at]techfak.uni-bielefeld.de>
#
#
# Released to public domain under terms of the BSD Simplified license.
#
# Redistribution and use in source and binary forms, with or wit... | bsd-3-clause | 1,871,205,741,122,541,000 | 33.942675 | 103 | 0.642362 | false |
AstroTech/workshop-python | _book/conf.py | 1 | 3091 | author = 'Matt Harasymczuk'
email = 'matt@astrotech.io'
project = 'Python 3: from None to Machine Learning'
description = "Matt Harasymczuk's Python 3: from None to Machine Learning"
extensions = [
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.imgmath',
# 'sphinx.ext.autosectionlabel',
# 'sp... | mit | 2,576,808,613,306,298,400 | 26.598214 | 128 | 0.612423 | false |
TheCoSMoCompany/biopredyn | Prototype/src/libsbml-5.10.0/examples/python/validateSBML.py | 1 | 6406 | #!/usr/bin/env python
##
## @file validateSBML.py
## @brief Validates one or more SBML files
## @author Akiya Jouraku (translated from libSBML C++ examples)
## @author Ben Bornstein
## @author Michael Hucka
##
## <!--------------------------------------------------------------------------
## This sample program... | bsd-3-clause | -5,608,578,717,612,800,000 | 31.683673 | 104 | 0.604277 | false |
huaxz1986/git_book | chapters/Kaggle/grid_search.py | 1 | 1955 | import scipy
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report
from data_clean import current_time
from sklearn.model_selection import train_test_split
from data_preprocess import Data_Preprocesser,Data_Cleaner
de... | gpl-3.0 | -9,070,638,557,172,177,000 | 41.177778 | 115 | 0.659989 | false |
thousandparsec-obsolete/libmng-py | mngdisplay.py | 1 | 1428 | """\
mngdisplay.py <options> <filename>
Tries to displays a mng using a different options.
-t sdl Use pygame (ctypes of C version)
-t pygame Alias of the above
-t pygameC Use the C version of pygame
-t pygameT Use the ctypes version of pygame
-t wx Use wx
"""
def main(argv):
import sys
type = None
f... | lgpl-2.1 | 7,213,422,322,001,718,000 | 16 | 54 | 0.611345 | false |
BarraQDA/nvivotools | nvpn2nvp.py | 1 | 6639 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020 Jonathan Schultz
#
# 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 lat... | gpl-3.0 | 6,203,106,739,478,604,000 | 46.76259 | 200 | 0.602802 | false |
yoon-gu/Mozart | mozart/mesh/triangle.py | 1 | 5353 | import numpy as np
def compute_n4s(n4e):
"""
Get a matrix whose each row contains end points of the corresponding side (or edge)
Paramters
- ``n4e`` (``int32 array``) : nodes for elements
Returns
- ``n4s`` (``int32 array``) : nodes for sides
Example
>>> n4e = np.array([[1, 3, 0], [3, 1, 2]])
>>> n4s = c... | mit | -4,737,356,614,649,700,000 | 28.58011 | 116 | 0.57706 | false |
googlei18n/glyphsLib | Lib/glyphsLib/builder/masters.py | 1 | 4706 | # Copyright 2015 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 a... | apache-2.0 | 2,800,870,986,591,150,000 | 36.648 | 84 | 0.694858 | false |
nschloe/quadpy | src/quadpy/tn/_stroud_1969.py | 1 | 1840 | import ndim
import numpy as np
from sympy import Rational as frac
from sympy import sqrt
from ..helpers import article, rd, untangle
from ._helpers import TnScheme
source = article(
authors=["A.H. Stroud"],
title="A Fifth Degree Integration Formula for the n-Simplex",
journal="SIAM J. Numer. Anal.",
v... | mit | 6,444,330,403,827,270,000 | 27.276923 | 87 | 0.507617 | false |
juliakreutzer/wtfrnn | transformTrees.py | 1 | 2645 | import codecs
import sys
from fromTextToFullTree import *
#transform parsed trees into full binary trees
if __name__=="__main__":
limit=15
dataDir = "trees"
trainFile = codecs.open(dataDir+"/train.txt", "r", "utf8")
testFile = codecs.open(dataDir+"/test.txt", "r", "utf8")
devFile = codecs.open(d... | mit | -6,286,931,452,027,079,000 | 31.654321 | 84 | 0.487335 | false |
kamidox/weixin_producthunt | manage.py | 1 | 2537 | """
productporter.manage
~~~~~~~~~~~~~~~~~~~~
This script provides some easy to use commands for
creating the database with or without some sample content.
You can also run the development server with it.
Just type `python manage.py` to see the full list of commands.
:copyright: (c) 2014 b... | bsd-2-clause | -6,277,587,297,717,733,000 | 27.829545 | 84 | 0.715018 | false |
tchaly-bethmaure/Emotes | models/emotesV8-1/config_related_save/csv_to_png/csv_to_png.py | 1 | 3825 |
import png
import os
def string_rgbhex_to_lst_rgbdec(strRGBHEX):
# strRGB ex : FFFFFF
if len(strRGBHEX) == 6:
return [give_dec_code(strRGBHEX[0] + strRGBHEX[1]),
give_dec_code(strRGBHEX[2] + strRGBHEX[3]),
give_dec_code(strRGBHEX[4] + strRGBHEX[5])]
else:
... | gpl-2.0 | -876,502,132,345,458,700 | 35.788462 | 94 | 0.463791 | false |
vivsh/django-ginger | ginger/views/mixins.py | 1 | 1640 |
from ginger.exceptions import LoginRequired, PermissionRequired
from django.core.exceptions import PermissionDenied
__all__ = ['PermissionRequiredMixin', 'PrivilegeRequiredMixin', 'LoginRequiredMixin',
'StaffRequiredMixin', 'SuperUserRequiredMixin', 'OwnerRequiredMixin']
class PermissionRequiredMixin(ob... | mit | 8,859,729,103,791,103,000 | 25.031746 | 85 | 0.688415 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.