repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aksareen/balrog | auslib/test/web/api/test_rules.py | 1 | 3007 | import json
from auslib.test.web.api.base import CommonTestBase
class TestPublicRulesAPI(CommonTestBase):
def test_get_rules(self):
ret = self.public_client.get("/api/v1/rules")
got = json.loads(ret.data)
self.assertEquals(got["count"], 3)
rules = [(rule["mapping"], rule["product"]... | mpl-2.0 | 1,780,376,548,930,070,300 | 45.984375 | 99 | 0.607582 | false | 3.472286 | true | false | false |
dimtion/jml | inputFiles/ourIA/borderline/obfusc.py | 1 | 3638 | import codecs
# 32 : espace de base
# 128
# 148 : Annulation du caractède précédant
# 160 : espace insécable
# 173 : trait d'union conditionnel
####### CONFIGURATION START #############
CODE_TO_HIDE_PATH = "le_mechant_truc.py"
SAFE_CODE_PATH = "../packagev3.py"
OUTPUT_CODE_PATH = "../team_up.py"
# TOTAL_OBFS_KEYS =... | mit | -6,929,409,790,773,367,000 | 43.876543 | 157 | 0.664007 | false | 2.642909 | false | false | false |
arielvega/uremix-app-developer-helper | src/setup.py | 1 | 1452 | #
#
# Copyright 2011,2013 Luis Ariel Vega Soliz, Uremix (http://www.uremix.org) and contributors.
#
#
# This file is part of UADH (Uremix App Developer Helper).
#
# UADH 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 Sof... | gpl-3.0 | 5,431,256,504,120,061,000 | 32.767442 | 124 | 0.703168 | false | 3.315068 | false | false | false |
henrysher/imagefactory | tests/testApplicationConfiguration.py | 4 | 1963 | #!/usr/bin/env python
# encoding: utf-8
# Copyright 2011 Red Hat, 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
#
# Unle... | apache-2.0 | 6,994,018,887,396,819,000 | 36.037736 | 177 | 0.695874 | false | 4.194444 | true | false | false |
piluke/BasicEventEngineFrontend | resources/mesh.py | 1 | 3246 | # Copyright (c) 2017-18 Luke Montalvo <lukemontalvo@gmail.com>
#
# This file is part of BEEF.
# BEEF is free software and comes with ABSOLUTELY NO WARANTY.
# See LICENSE for more details.
try:
import wx
except ImportError:
raise ImportError("The wxPython module is required to run this program")
import copy
import o... | mit | 8,952,775,302,184,721,000 | 26.982759 | 91 | 0.667899 | false | 2.872566 | false | false | false |
hazelcast/hazelcast-python-client | hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py | 1 | 1677 | from hazelcast.serialization.bits import *
from hazelcast.protocol.builtin import FixSizedTypesCodec
from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE
from hazelcast.protocol.builtin import StringCodec
# hex: 0x000900
_REQ... | apache-2.0 | -8,147,689,228,900,924,000 | 42 | 146 | 0.761479 | false | 3.360721 | false | false | false |
valer0ck/google-analytics | google_analytics/settings.py | 1 | 3707 | """
Django settings for google_analytics project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
impor... | mit | -866,886,943,563,874,400 | 25.478571 | 97 | 0.681144 | false | 3.49717 | false | false | false |
DailyActie/Surrogate-Model | 01-codes/OpenMDAO-Framework-dev/openmdao.gui/src/openmdao/gui/test/functional/pageobjects/grid.py | 1 | 7718 | import logging
import time
from selenium.common.exceptions import StaleElementReferenceException
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from basepageobject import rg... | mit | -7,204,415,002,107,469,000 | 29.505929 | 117 | 0.581627 | false | 4.122863 | false | false | false |
jdmonin/JSettlers2 | src/main/bin/sql/template/test_token_consistency.py | 1 | 11000 | #!/usr/bin/env python
# test_token_consistency.py: Check that DDL SQL token names are consistent among DB types,
# token values are consistent between render.py and java SOCDBHelper.upgradeSchema.
# Lives in same place as render.py, for easier import.
# Called from build.gradle with 1 arg: SOCDBHelper.java with full... | gpl-3.0 | -8,803,394,127,900,553,000 | 39.441176 | 115 | 0.591364 | false | 3.567953 | true | false | false |
NSLS-II/metadataclient | metadataclient/tests/test_mds.py | 1 | 1116 | import time as ttime
import uuid
import pytest
from metadataclient.mds import NoEventDescriptors, NoRunStart
from metadatastore.test.test_mds import (
test_bad_bulk_insert_event_data,
test_bad_bulk_insert_event_timestamp,
test_bad_event_desc,
test_bulk_insert,
test_bulk_table,
# test_cache_clear_... | gpl-2.0 | 8,703,293,091,621,758,000 | 27.615385 | 65 | 0.683692 | false | 3.016216 | true | false | false |
GrognardsFromHell/TemplePlus | tpdatasrc/co8infra/scr/Spell486 - Sunbeam.py | 1 | 2566 | from toee import *
from utilities import *
def OnBeginSpellCast( spell ):
print "Sunbeam OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
def OnSpellEffect( spell ):
print "Sunbeam OnSpellEffect"
if spell.caster_level >= 1... | mit | -992,787,025,546,243,100 | 32.337662 | 179 | 0.715511 | false | 2.558325 | false | false | false |
tindice/neosfinder | ui/Handler.py | 1 | 15730 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from PIL import Image , ImageDraw, ImageChops
from astrotools import *
from gi.repository import Gtk, Gdk, GdkPixbuf, GObject
from math import log1p, exp
import threading, tempfile
_,tmpfolder = tempfile.mkstemp()
# ======= Functions Section =======... | gpl-3.0 | 13,358,155,509,887,938 | 34.183445 | 110 | 0.577923 | false | 3.089784 | false | false | false |
Hrabal/TemPy | tempy/css.py | 1 | 6891 | # -*- coding: utf-8 -*-
# @author: Federico Cerchiari <federicocerchiari@gmail.com>
"""Classes for css management"""
import inspect
try:
from collections import Iterable
except ImportError:
from collections.abc import Iterable
from collections import ChainMap
from .elements import Tag
from .tempy import DOMEle... | apache-2.0 | -6,860,946,759,753,581,000 | 33.628141 | 119 | 0.529676 | false | 4.111575 | false | false | false |
liangtianyou/ST | stserver/datasocket.py | 1 | 2048 | #-*- coding: utf-8 -*-
import os
import sys
import time
import socket
from libcommon import commonlib
from libcommon.logger import stsdebug
#-----------------------------------
# 接收HTTP和网络指令
#-----------------------------------
class HttpSocket():
def __init__(self):
try:
self.c... | gpl-3.0 | 4,181,461,293,078,387,700 | 29.15625 | 79 | 0.479438 | false | 3.769376 | false | false | false |
apel/apel | apel/parsers/htcondor.py | 3 | 2940 | '''
Copyright 2014 The Science and Technology Facilities Council
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | apache-2.0 | 5,816,362,017,694,227,000 | 38.2 | 340 | 0.571088 | false | 3.833116 | false | false | false |
zabertooth/grdbms | grdbms.py | 1 | 3872 | ###############################################################################
# Module: grdbms
#
# Description: Allows consumers to make a database query using one of several
# supported packages. Thus, users are free to install any supported DBMS
# package. Returns results in a uniform structure
#
# Author: ... | mit | -7,748,350,445,915,069,000 | 27.470588 | 126 | 0.666839 | false | 3.396491 | false | false | false |
ntdragon/python-LitMusicSug | Design/web.d/page5.d/html_try.py | 1 | 1240 | #!/usr/bin/python3
from jinja2 import Environment, FileSystemLoader
# page input
page = dict(action="single", user="Edward Birdsall")
# tab and header
hd = {"loc": "Add Suggestion"}
hdr = dict(page="Add Suggestion to database", today="Wednesday March 06, 2019")
#block1 dicts
cevt = dict(parish="St Roch Catholic ... | gpl-3.0 | -4,281,886,686,122,566,000 | 30.025 | 133 | 0.660484 | false | 2.767857 | false | true | false |
Lispython/adrest | adrest/mixin/transformer.py | 1 | 2833 | """ ADRest transformation support. """
from ..utils.transformers import SmartTransformer, BaseTransformer
from ..utils.meta import MixinBaseMeta
from ..utils.tools import as_tuple
__all__ = 'TransformerMixin',
class Meta:
""" Transformer options. Setup parameters for resource's transformation.
::
... | lgpl-3.0 | -2,269,159,335,439,651,000 | 25.231481 | 79 | 0.616661 | false | 4.884483 | false | false | false |
thompsonjila/thompsonlib | common/wave.py | 1 | 6959 | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import numbers
from thompsonlib.common.colors import randomColor
def removeByIndex(pts, listOfIndices):
return np.delete(pts, listOfIndices)
class Wave:
def __init__(self, pts, errbars=[], name='', x0=0, deltax=1, clist=[]):
if isin... | mit | -2,931,633,250,424,446,000 | 34.146465 | 142 | 0.602242 | false | 3.12764 | false | false | false |
gradel/mezzanine-blocks | mezzanine_blocks/migrations/0001_initial.py | 2 | 5426 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import mezzanine.core.fields
import mezzanine.utils.models
class Migration(migrations.Migration):
dependencies = [
('sites', '0001_initial'),
]
operations = [
migrations.CreateModel(... | bsd-2-clause | -6,054,017,261,016,749,000 | 56.723404 | 175 | 0.590306 | false | 4.282557 | false | false | false |
alchu6636/nonogram | src/test_nonogram.py | 1 | 7156 | '''
Created on 2014/09/14
@author: alchu
'''
import unittest
from nonogram import Nonogram, _read_profile
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_create(self):
f = Nonogram()
self.assertNotEqual(f, False)
def... | bsd-2-clause | -2,404,838,017,774,096,400 | 29.844828 | 92 | 0.501258 | false | 3.255687 | true | false | false |
a0155077/slack_bot_TM | plugins/Pokemon.py | 1 | 16509 | import slackbot.bot
import random
Pokemonindex = 1
Mname1 = "Minion"
Mlv1 = 5
Mhp1 = Mlv1*5
Matk1 = Mlv1
Magi1 = Mlv1
Mexp1 = 0
Mshape1="""\
───────────▄▄▄█▄▄█▄▄█▄▄▄
────────▄▀▀═════════════▀▀▄
───────█═══════════════════█
──────█═════════════════════█
─────█═══▄▄▄▄▄▄▄═══▄▄▄▄▄▄▄═══█
────█═══█████████═███... | gpl-2.0 | -3,041,067,580,076,163,000 | 29.590686 | 218 | 0.462022 | false | 2.010764 | false | false | false |
henrist/aqmt | aqmt/plot/flow_components.py | 1 | 10180 | from collections import OrderedDict
from .common import add_plot, add_scale
def utilization_queues(y_logarithmic=False, total=True, ecn=True, flows=True):
"""
Plot utilization per queue
"""
def plot(testfolder, plotdef):
label_y_pos = -0.06 * (1/plotdef.y_scale)
gpi = """
... | mit | -4,343,570,288,252,044,000 | 41.066116 | 249 | 0.487328 | false | 3.35752 | true | false | false |
b0tchsec/CTF-Fanny-Pack | solutions/sctf_2016_q1/verticode/solver.py | 1 | 1305 | import sys
import Image
RED = (255, 0, 0)
PURPLE = (128, 0, 128)
BLUE = (0, 0, 255)
GREEN = (0, 128, 0)
YELLOW = (255, 255, 0)
ORANGE = (255, 165, 0)
BLACK = (0, 0, 0)
WHITE = (255,255,255)
def main():
im = Image.open('code1.png')
result = ''
pos = 0
for x in range(1075):
# GET COLOR
box = (0, pos*12... | gpl-3.0 | 7,143,265,755,652,042,000 | 15.3125 | 40 | 0.542529 | false | 2.178631 | false | false | false |
Architektor/PySnip | venv/lib/python2.7/site-packages/twisted/python/test/test_runtime.py | 8 | 7933 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.python.runtime}.
"""
from __future__ import division, absolute_import
import sys
from twisted.python.reflect import namedModule
from twisted.trial.util import suppress as SUPRESS
from twisted.trial.unittest import Synchr... | gpl-3.0 | 3,478,081,883,475,423,700 | 32.614407 | 85 | 0.650195 | false | 3.78122 | true | false | false |
gennadykr/python_training | test/remove_contact_from_group.py | 1 | 1268 | # Найти группу, если нет, то создать
# Найти контакт, если нет, то создать
# Проверить, что контакт в групппе, если нет, то добавить
# Удалить контакт из группы, проверить, что его в группе нет (а других изменений в группе нет)
from model.contact import Contact
from model.group import Group
import random
def test_re... | apache-2.0 | 7,852,541,012,105,782,000 | 38.178571 | 94 | 0.702555 | false | 2.312236 | false | false | false |
SLCoding/fusion | backend/logger/logger.py | 1 | 3593 | #-*- coding: utf-8 -*-
"""
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 the hope that it will... | gpl-3.0 | -5,103,834,625,054,499,000 | 37.234043 | 123 | 0.599777 | false | 4.548101 | true | false | false |
andrewtremblay/platform-mechanics | src/configs/player.py | 1 | 1121 | """
Configs package.
A container holding constants that other packages share.
"""
from .world import WORLD
class PlayerConfig:
"""Player constants."""
# TODO: have the jump decay be different from base gravity
JUMP_DECAY = WORLD.GRAVITY
# the delay (in ticks) between pressing jump and activating
... | gpl-2.0 | 3,801,486,018,886,367,000 | 28.5 | 76 | 0.661017 | false | 3.604502 | false | false | false |
gizela/gizela | bin/tran_vec.py | 1 | 1575 | #!/usr/bin/python
'''
Script for transformation of vectors to local system
'''
# $Id: tran_vec.py 76 2010-10-22 21:19:21Z tomaskubin $
import sys
#from gizela.stat.CompareObs import CompareObs
# nacteni vstupnich parametru
from optparse import OptionParser
usage = "usage: %prog [options] < file1"
version = "%prog ... | gpl-3.0 | 5,162,620,758,385,972,000 | 25.694915 | 91 | 0.699048 | false | 3.005725 | false | false | false |
xmedius/xmedius-mailrelayserver | xmediusmailrelayserver/servicehelpers.py | 1 | 2485 | import win32serviceutil
import win32service
import win32event
import servicemanager
import socket
import logging
from logging import handlers
import threading
from xmediusmailrelayserver import server
from xmediusmailrelayserver.server import start_server
from os.path import dirname, join
from os import mkdir, stat
imp... | mit | 4,624,816,102,751,144,000 | 31.272727 | 105 | 0.672032 | false | 4.027553 | false | false | false |
mfcloud/python-zvm-sdk | zvmconnector/connector.py | 1 | 4009 | # Copyright 2017 IBM Corp.
#
# 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 t... | apache-2.0 | 3,867,127,640,954,581,500 | 40.760417 | 79 | 0.57795 | false | 4.237844 | false | false | false |
haveal/googleads-bidmanager-examples | python/upload_line_items.py | 1 | 3154 | #!/usr/bin/python
#
# 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 b... | apache-2.0 | -4,322,527,855,967,912,400 | 36.547619 | 78 | 0.653456 | false | 4.320548 | false | false | false |
butozerca/fireplace | tests/test_mechanics.py | 1 | 13132 | from utils import *
from fireplace.cards.utils import Give, JOUST
def test_armor():
game = prepare_game(WARRIOR, WARRIOR)
assert game.current_player.hero.armor == 0
assert not game.current_player.hero.power.exhausted
assert game.current_player.hero.power.is_usable()
game.current_player.hero.power.use()
assert g... | agpl-3.0 | 4,014,846,279,394,177,500 | 27.24086 | 77 | 0.735912 | false | 2.574902 | true | false | false |
Cal-CS-61A-Staff/ok-client | client/sources/ok_test/scheme.py | 1 | 3524 | """Console for interpreting Scheme. In particular, this is meant to integrate
with UC Berkeley CS 61A's Scheme project. SchemeConsole expects the an
importable module called "scheme" with the following interface:
scheme.create_global_frame()
scheme.read_eval_print_loop(next_line_fn, frame, interactive)
sch... | apache-2.0 | -1,547,660,175,567,754,500 | 34.959184 | 79 | 0.612089 | false | 4.297561 | false | false | false |
CloudBoltSoftware/cloudbolt-forge | blueprints/aws_redshift/create.py | 1 | 4710 | from infrastructure.models import Environment
from infrastructure.models import CustomField
import boto3
def create_custom_fields_as_needed():
CustomField.objects.get_or_create(
name='aws_rh_id', defaults={
'label': 'AWS RH ID', 'type': 'STR',
'description': 'Used by the AWS bluep... | apache-2.0 | -8,144,199,489,647,846,000 | 33.379562 | 121 | 0.601486 | false | 4.001699 | false | false | false |
opencivicdata/scrapers-ca | ca_qc_saguenay/people.py | 1 | 1631 | from utils import CanadianScraper, CanadianPerson as Person
COUNCIL_PAGE = 'https://ville.saguenay.ca/la-ville-et-vie-democratique/conseils-municipaux-et-darrondissement/membres-des-conseils'
MAYOR_PAGE = 'https://ville.saguenay.ca'
CONTACT_PAGE = 'https://ville.saguenay.ca/la-ville-et-vie-democratique/cabinet'
clas... | mit | -8,970,016,601,690,421,000 | 48.393939 | 131 | 0.643558 | false | 2.84965 | false | false | false |
psychopy/versions | psychopy/web.py | 1 | 10742 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Library for working with internet connections"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from __future__ import absolute_impor... | gpl-3.0 | -6,533,756,533,170,892,000 | 34.335526 | 79 | 0.624185 | false | 4.1047 | true | false | false |
jonhadfield/fval | fval/discover.py | 1 | 6179 | # -*- coding: utf-8 -*-
import os
from collections import OrderedDict
from os.path import splitext, isfile
def walk_path(path, depth=None):
""" Yield the specified path with the dirs and files it contains.
Args:
path: The path to start walking from
depth: Number of levels down to recurse
... | mit | 1,296,955,164,098,812,000 | 42.822695 | 105 | 0.521444 | false | 4.642374 | true | false | false |
3D-e-Chem/snooker-alignment | scripts/alignment.py | 1 | 37086 | #!/usr/bin/env python
import copy
import itertools
import math
import os
import socket
import string
import sys
import snooker
# THE TEXT HEADER
def txt_header():
print ""
print "**********************************************************"
print "* *"... | apache-2.0 | -973,411,264,473,557,900 | 38.286017 | 157 | 0.509087 | false | 3.822511 | false | false | false |
zhreshold/mxnet | example/neural_collaborative_filtering/ci.py | 2 | 3460 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,346,909,717,329,611,300 | 56.666667 | 132 | 0.527457 | false | 4.163658 | false | false | false |
Suninus/NewsBlur | utils/munin/newsblur_tasks_times.py | 14 | 1384 | #!/usr/bin/env python
from utils.munin.base import MuninGraph
class NBMuninGraph(MuninGraph):
@property
def graph_config(self):
graph = {
'graph_category' : 'NewsBlur',
'graph_title' : 'NewsBlur Task Server Times',
'graph_vlabel' : 'Feed fetch time / server',
... | mit | 8,310,373,891,638,157,000 | 27.244898 | 83 | 0.476879 | false | 3.844444 | false | false | false |
jdfekete/progressivis | tests/test_03_random_table.py | 1 | 1648 | from . import ProgressiveTest
from progressivis.core import aio
from progressivis import Every
from progressivis.stats.random_table import RandomTable
def print_len(x):
if x is not None:
print(len(x))
class TestRandomTable(ProgressiveTest):
def test_random_table(self):
s = self.scheduler()
... | bsd-2-clause | 4,012,516,809,556,943,000 | 41.25641 | 80 | 0.651699 | false | 3.491525 | false | false | false |
probcomp/bayeslite | tests/test_core.py | 1 | 29091 | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2016, MIT Probabilistic Computing Project
#
# 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/LICENS... | apache-2.0 | 2,180,251,858,173,321,000 | 40.499287 | 79 | 0.613936 | false | 3.322407 | true | false | false |
buchwj/xvector | xVLib/xVLib/Maps.py | 1 | 26187 | # -*- coding: utf-8 -*-
# xVector Engine Core Library
# Copyright (c) 2011 James Buchwald
# 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)... | gpl-3.0 | -469,216,082,228,495,100 | 33.823138 | 81 | 0.582465 | false | 4.513444 | false | false | false |
ross128/stg | colony/migrations/0007_building_properties.py | 1 | 1932 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-28 16:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('colony', '0006_add_building_energy_production'),
]
o... | gpl-3.0 | -3,038,204,506,857,105,400 | 36.153846 | 132 | 0.57971 | false | 4.68932 | false | false | false |
odoo-argentina/account | l10n_ar_account/models/account_chart_template.py | 1 | 5542 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, api, fields
import log... | agpl-3.0 | -5,523,655,458,238,149,000 | 40.051852 | 79 | 0.52472 | false | 3.924929 | false | false | false |
analysiscenter/dataset | examples/utils/utils.py | 1 | 10438 | """ File with some useful functions"""
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
plt.style.use('seaborn-poster')
plt.style.use('ggplot')
def draw(first, first_label, second=None, second_label=None, type_data='loss', window=5, bound=None, axis=None)... | apache-2.0 | 1,883,766,885,119,536,400 | 30.345345 | 140 | 0.596379 | false | 3.688339 | false | false | false |
icclab/hurtle_sm | sm/admin.py | 2 | 5059 | from flask import Flask
import requests
import json
import time
import os
from pymongo import MongoClient
from sm.config import CONFIG, CONFIG_PATH
import sys
sys.stdout = sys.stderr
app = Flask('hurtle-sm')
print 'Using CONFIG_PATH %s' % CONFIG_PATH
stg_path = CONFIG.get('service_manager', 'manifest', False)
if ... | apache-2.0 | -3,977,568,409,928,258,600 | 32.95302 | 86 | 0.594979 | false | 3.642189 | true | false | false |
chiara-paci/baskerville | baskervilleweb/warehouse/models.py | 1 | 2407 | from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.functional import cached_property
# Create your models here.
class ContainerType(models.Model):
name = models.CharField(max_length=1024,unique... | gpl-3.0 | 5,763,463,467,807,005,000 | 32.901408 | 79 | 0.66639 | false | 4.018364 | false | false | false |
RyanStonebraker/FreeSpeak_NLP | freespeak/app/views.py | 1 | 1125 | # views.py
from flask import render_template
from flask import request
from flask import redirect
from app import app
import sys
import os
currDIR = os.path.dirname(os.path.realpath(__file__))
sys.path.append(currDIR + "/freespeak/")
import freespeak
import nasminterpret
@app.route("/")
def index():
return ren... | agpl-3.0 | -2,997,779,373,096,968,700 | 30.25 | 147 | 0.657778 | false | 3.526646 | false | false | false |
gsnyder206/synthetic-image-morph | auxiliary_data/create_filter_package.py | 1 | 12103 | import numpy as np
import astropy
import astropy.cosmology
import astropy.io.fits as pyfits
import astropy.units as u
import astropy.io.ascii as ascii
import os
def hdu_from_existing_filter(input_file):
return hdu
def wfirst_filters():
Z_wl_um = np.asarray([0.75,0.7559,0.7617,0.7676,0.7734,0.7793,0.7851,0... | gpl-2.0 | 6,715,199,455,082,220,000 | 42.535971 | 319 | 0.608444 | false | 2.252559 | false | false | false |
codedsk/hubcheck | hubcheck/pageobjects/po_groups_wiki_base_page.py | 1 | 1887 | from hubcheck.pageobjects.po_groups_base import GroupsBasePage
import re
class GroupsWikiBasePage(GroupsBasePage):
"""groups wiki base page"""
def __init__(self,browser,catalog,groupid,articleid):
super(GroupsWikiBasePage,self).__init__(browser,catalog,groupid)
self.update_articleid(articleid... | mit | 4,714,553,801,580,824,000 | 29.934426 | 84 | 0.669846 | false | 3.494444 | false | false | false |
AnhellO/DAS_Sistemas | Ene-Jun-2021/pena-balderas-bryan/Practica 2/decorator.py | 1 | 1780 |
class ICharacterComponent():
def equip(self):
pass
class CharacterConcreteComponent(ICharacterComponent):
def __init__(self,name):
self.name=name
self.equipamento=[]
def equip(self):
if len(self.equipamento)==0:
return f'{self.name} equipment: Empty'
e... | mit | 3,226,174,667,836,173,000 | 29.706897 | 71 | 0.682584 | false | 3.844492 | false | false | false |
godaddy/Thespian | thespian/system/actorManager.py | 1 | 20688 | "The ActorManager is the wrapper and support structure for an actual Actor instance."
import sys
import logging
import copy
import atexit
from thespian.actors import *
from thespian.system.utilis import thesplog
from thespian.system.systemCommon import systemCommonBase
from thespian.system.addressManager import Cannot... | mit | 3,210,915,973,728,201,000 | 43.110874 | 114 | 0.555733 | false | 5.007988 | false | false | false |
t--wagner/pymeasure | instruments/ametek7270_lock_in_amplifier.py | 1 | 1496 | # -*- coding: utf-8 -*-
from pymeasure.instruments.pyvisa_instrument import PyVisaInstrument
from pymeasure.case import ChannelRead, ChannelStep
class Ametek7270LockInAmplifierChannel(ChannelRead):
def __init__(self, instrument, channel):
super().__init__(self)
self._instrument = instrument
... | gpl-3.0 | -4,413,784,558,967,043,600 | 33.813953 | 94 | 0.669786 | false | 3.622276 | false | false | false |
ComputerNetworks-UFRGS/Aurora | cloud/models/monitoring.py | 1 | 10132 | import base64
import httplib
import logging
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import fromstring, tostring
from django.db import models
from cloud.models.base_singleton_model import BaseSingletonModel
from cloud.models.slice import Slice
from cloud.models.virtual_device import VirtualDevice
... | gpl-2.0 | 907,806,666,529,264,600 | 40.186992 | 99 | 0.632452 | false | 4.047942 | false | false | false |
arunchaganty/presidential-debates | django/twit/management/commands/annotate_features.py | 2 | 1154 | from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
import sys
import json
from twit.models import User, Tweet, Mention, UserMention
from javanlp.models import Sentence, Sentiment
from javanlp.util import AnnotationException, annotate_document_with_sentiment
class Com... | mit | -9,031,413,873,283,068,000 | 37.466667 | 125 | 0.644714 | false | 4.274074 | false | false | false |
mahabuber/erpnext | erpnext/accounts/doctype/payment_request/test_payment_request.py | 1 | 2825 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.accounts.doctype.payment_request.payment_re... | agpl-3.0 | -8,707,592,218,391,381,000 | 34.759494 | 101 | 0.710796 | false | 3.077342 | true | false | false |
NNBlocks/NNBlocks | nnb/utils/word_vecs.py | 1 | 3870 | # NNBlocks is a Deep Learning framework for computational linguistics.
#
# Copyright (C) 2015 Frederico Tommasi Caroli
#
# NNBlocks 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 t... | gpl-3.0 | 4,593,268,856,966,929,000 | 27.455882 | 83 | 0.540052 | false | 3.965164 | false | false | false |
F8LEFT/ART | KDE/share/ECM/find-modules/run-sip.py | 1 | 1277 | #!/usr/bin/env python
import os, sys
import fnmatch
import subprocess
sipArgs = sys.argv[1:]
idx = sipArgs.index("--module-name")
modname = sipArgs[idx + 1]
del sipArgs[idx]
del sipArgs[idx]
idx = sipArgs.index("-c")
loc = sipArgs[idx + 1]
oldFilenames = fnmatch.filter(os.listdir(loc), "sip" + modname + "*.cpp")
t... | gpl-3.0 | 9,074,505,765,479,794,000 | 22.218182 | 77 | 0.642913 | false | 2.928899 | false | false | false |
colmenero/mojo | server_tornado/message_received.py | 1 | 6095 | import os # to manage folders to save imgs...
import glob # to read files according to pattern (read without extension)
# File imports
import functions
# from calculate_matching import matching_cosine
def message_handler(message_des, db_col, img_users_folder):
if message_des[0] == "code0": # Retrieve UserDat... | gpl-3.0 | -3,895,075,362,837,368,300 | 38.577922 | 80 | 0.506809 | false | 3.867386 | false | false | false |
amicks/Speculator | speculator/models/deep_neural_network.py | 1 | 2314 | import numpy as np
import pandas as pd
from speculator import market
import tensorflow as tf
tf.logging.set_verbosity(tf.logging.ERROR)
class DeepNeuralNetwork(tf.estimator.DNNClassifier):
def __init__(self, features, targets, **kwargs):
feature_columns = [tf.feature_column.numeric_column(k) \
... | mit | -6,624,758,631,718,728,000 | 38.896552 | 67 | 0.513397 | false | 4.010399 | false | false | false |
cube2matrix/Krypton | raw_data_parser/parsers/libs/saxypy/__init__.py | 1 | 3139 | """
Defines the handler class an a convenience function for parsing XML
using the SAX libraries.
"""
import xml.sax
from .dump import struct_to_xml_stream
def dump(data, **kwargs):
"""
Convenience function to turn a Python data structure into an XML
document.
"""
return ''.join(stru... | gpl-2.0 | 1,534,057,461,816,186,000 | 28.475728 | 72 | 0.572794 | false | 4.414909 | false | false | false |
suutari-ai/shoop | shuup/core/models/_order_lines.py | 2 | 7571 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals, with_statement
from djan... | agpl-3.0 | -974,782,449,706,599,600 | 35.752427 | 112 | 0.678246 | false | 3.798796 | false | false | false |
tino/pyFirmata | tests.py | 1 | 18970 | from __future__ import division, unicode_literals
import unittest
from itertools import chain
import serial
import pyfirmata
from pyfirmata import mockup
from pyfirmata.boards import BOARDS
from pyfirmata.util import (
break_to_bytes, from_two_bytes, str_to_two_byte_iter, to_two_bytes, two_byte_iter_to_str
)
#... | mit | -5,412,229,400,344,037,000 | 35.978558 | 93 | 0.559093 | false | 3.374844 | true | false | false |
artfwo/pymonome | examples/faders.py | 1 | 1956 | #! /usr/bin/env python3
import random
import asyncio
import monome
FADERS_MAX_VALUE = 100
class Faders(monome.GridApp):
def __init__(self):
super().__init__() # TODO: prefix
def on_grid_ready(self):
self.grid.led_all(0)
self.row_values = []
row_value = 0
for i in ran... | mit | 4,750,602,674,555,085,000 | 31.6 | 109 | 0.587423 | false | 3.124601 | false | false | false |
gilshwartz/tortoisehg-caja | tortoisehg/hgqt/filelistview.py | 1 | 5264 | # Copyright (c) 2009-2010 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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, o... | gpl-2.0 | -9,057,847,053,270,783,000 | 33.860927 | 81 | 0.628419 | false | 3.94012 | false | false | false |
napalm-automation/napalm-yang | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefixes_/default_metric/state/__init__.py | 1 | 24041 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | apache-2.0 | 8,735,288,271,018,759,000 | 42.395307 | 518 | 0.583337 | false | 4.386243 | true | false | false |
brickfiestastem/brickfiesta | afol/admin.py | 1 | 4259 | import datetime
import uuid
from django.conf import settings
from django.contrib import admin
from django.contrib import messages
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.core.mail import send_mail
from django.template import loader
from django.utils.html ... | agpl-3.0 | 8,330,848,418,274,482,000 | 28.576389 | 89 | 0.654379 | false | 3.546211 | false | false | false |
h2oai/h2o-dev | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2odownload_pojo.py | 4 | 1237 | from __future__ import print_function
import sys, os
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
def h2odownload_pojo():
"""
Python API test: h2o.download_pojo(model, path=u'', get_jar=True)
Copied from glm_download_... | apache-2.0 | -1,410,232,293,713,646,000 | 40.233333 | 103 | 0.636217 | false | 3.131646 | false | false | false |
wouanagaine/SC4Mapper-2013 | SC4MapApp.py | 1 | 68746 | #!/usr/bin/python
# -*- coding: latin-1 -*-
import wx # This module uses the new wx namespace
import tools3D
try:
version = tools3D.GetVersion()
if version != "v1.0d":
raise ValueError
except:
class ErrApp( wx.App ):
def OnInit( self ):
dlg = wx.MessageDialog(None, "It seems that there is a ... | bsd-2-clause | 7,384,681,370,971,607,000 | 34.879958 | 246 | 0.647034 | false | 2.769113 | true | false | false |
DarthBubi/fallout-pnp-character-creator | character-creator/main_view.py | 1 | 28970 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\ui\main_view.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Main... | mit | 7,483,014,781,104,931,000 | 60.118143 | 134 | 0.69824 | false | 3.671271 | false | false | false |
sxjscience/tvm | python/tvm/topi/arm_cpu/cortex_m7/conv2d/direct.py | 2 | 6817 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 1,075,434,428,715,023,900 | 35.650538 | 99 | 0.627549 | false | 3.206491 | false | false | false |
google/nitroml | nitroml/automl/autodata/trainer_adapters/estimator_adapter_test.py | 1 | 3881 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -2,172,144,343,473,245,200 | 34.605505 | 79 | 0.660139 | false | 4.009298 | true | false | false |
Fenixin/yogom | scripts/textsprites.py | 1 | 6736 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of You only get one! (match).
#
# 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
#... | gpl-3.0 | -7,313,477,841,826,967,000 | 31.229665 | 126 | 0.56636 | false | 3.767338 | false | false | false |
lacion/forge | setup.py | 1 | 1407 | #!/usr/bin/python
import os
import sys
import forge
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst').read().repla... | bsd-3-clause | -4,603,910,740,188,597,000 | 25.54717 | 106 | 0.616205 | false | 3.702632 | false | true | false |
helixyte/TheLMA | thelma/repositories/rdb/mappers/suppliermoleculedesign.py | 1 | 2084 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Supplier molecule design mapper.
"""
from sqlalchemy.orm import relationship
from everest.repositories.rdb.utils import mapper
from thelma.entities.molecule... | mit | -2,713,842,728,996,766,000 | 41.530612 | 80 | 0.588772 | false | 5.275949 | false | false | false |
nbessi/oerpscenario | features/steps/tools.py | 1 | 3070 | import openerp
import csv
import os
import os.path as osp
import datetime as dt
import subprocess
from support import *
@given('I execute the Python commands')
def impl(ctx):
assert_true(ctx.text)
env = globals().copy()
env['client'] = ctx.client
exec ctx.text in env
@given('I execute the SQL command... | gpl-2.0 | -4,041,668,668,480,551,400 | 33.886364 | 84 | 0.57785 | false | 3.549133 | false | false | false |
joealcorn/berth.cc | berth/tests/user/test_views.py | 1 | 1943 | from django.core.urlresolvers import reverse_lazy
from berth.utils.test import APITestCase
from berth.user.serializers import CreateUserSerializer
class TestCreateUserView(APITestCase):
endpoint = reverse_lazy('create-user')
def test_success(self):
data = {
'email': 'joe@example.org',
... | mit | 7,291,493,229,565,097,000 | 24.906667 | 55 | 0.566135 | false | 3.95723 | true | false | false |
elkeschaper/tral | tral/sequence/sequence_io.py | 1 | 1655 | # (C) 2015 Elke Schaper
"""
:synopsis: Input/output for sequences
.. moduleauthor:: Elke Schaper <elke.schaper@sib-sib.ch>
"""
from Bio import SeqIO
import logging
LOG = logging.getLogger(__name__)
# ########## READ SEQUENCE ###################################################
def read_fasta(file, indice... | gpl-2.0 | 2,852,367,953,958,887,000 | 26.583333 | 79 | 0.566163 | false | 4.232737 | false | false | false |
sajuptpm/contrail-controller | src/opserver/test/test_analytics_stats.py | 4 | 15422 | #!/usr/bin/env python
#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
#
# analytics_stattest.py
#
# System tests for analytics
#
import os
import sys
import threading
threading._DummyThread._Thread__stop = lambda x: 42
import signal
import gevent
from gevent import monkey
monkey.patch_all()
impo... | apache-2.0 | -639,682,166,115,473,400 | 39.691293 | 91 | 0.583258 | false | 3.417239 | true | false | false |
brentpayne/celery-geolocator | celery_geolocator/helpers/decorators.py | 1 | 1646 | import datetime
from time import sleep
__author__ = 'brent'
class MaxCallsExceededException(Exception):
pass
class rate_limit(object): # known flake8 fail, not putting into camel case b/c used as decorator # noqa
"""
This is a single threaded solution and does not rate limit across threads or process... | mit | 7,428,346,973,487,328,000 | 38.190476 | 105 | 0.595383 | false | 4.084367 | false | false | false |
reidlindsay/wins | wins/digital/mqam.py | 1 | 9401 | #! /usr/bin/env python
"""
Model for quadrature amplitude modulation (QAM); contains `MQAM` class.
Revision Info
=============
* $LastChangedBy: mandke $
* $LastChangedDate: 2010-10-19 16:34:02 -0500 (Tue, 19 Oct 2010) $
* $LastChangedRevision: 4811 $
:author: Ketan Mandke <kmandke@mail.utexas.edu>
:copyright:
... | apache-2.0 | 2,164,108,479,773,806,300 | 37.060729 | 119 | 0.5793 | false | 3.68956 | false | false | false |
mike-lawrence/endo_rgb | eyelinkChild.py | 1 | 14660 | def eyelinkChildFunction(
qTo
, qFrom
, windowSize = [200,200]
, windowPosition = [0,0]
, stimDisplayRes = [1920,1080]
, stimDisplayPosition = [1920,0]
, calibrationDisplayRes = [1920,1080]
, calibrationDotSize = 10
, gazeTargetCriterion = 100
, eyelinkIp = '100.1.1.1'
, edfFileName = 'temp.edf'
, edfPath = './_Data/te... | gpl-3.0 | 7,301,973,823,069,808,000 | 35.741855 | 264 | 0.662688 | false | 2.649078 | false | false | false |
cjw85/myriad | myriad/managers.py | 1 | 2574 | import os
from multiprocessing.managers import SyncManager
from functools import partial
import multiprocessing
from Queue import Queue as _Queue
class Queue(_Queue):
"""A (more) picklable queue."""
def __getstate__(self):
# Only pickle the state we care about
return (self.maxsize, self.queu... | mit | -7,486,942,261,979,268,000 | 30.012048 | 74 | 0.678322 | false | 4.072785 | false | false | false |
scheunemann/KASPAR | kasparGUI/Web/api/modules/trigger.py | 1 | 2203 | from flask import Blueprint, jsonify, abort, redirect
from kasparGUI.legacyImporter import TriggerImporter
import kasparGUI.Model as Model
from kasparGUI.Web.api.database import db_session
models = [
{'class': Model.Trigger, 'kwargs': {'include_columns': ['id', 'name', 'type']}},
{'class': Model.Se... | mit | -3,731,816,387,179,717,000 | 37.649123 | 177 | 0.591012 | false | 3.702521 | false | false | false |
darvelo/panel | ipc_server.py | 1 | 1897 | #!/usr/bin/env python3
import time
import socket
import signal
from threading import Thread
BUFFER_LEN = 100
class Worker(Thread):
def __init__(self, server, *args, **kwargs):
Thread.__init__(self, *args, **kwargs)
self.server = server
self.conn = None
self.closed = False
def... | mit | 6,702,008,376,238,008,000 | 24.635135 | 71 | 0.54349 | false | 3.968619 | false | false | false |
openstack/training-labs | labs/stacktrain/core/functions_host.py | 1 | 2805 | #!/usr/bin/env python
# Force Python 2 to use float division even for ints
from __future__ import division
from __future__ import print_function
import importlib
import logging
import re
import os
import os.path
import subprocess
import time
import stacktrain.config.general as conf
import stacktrain.core.helpers as ... | apache-2.0 | -5,973,240,064,468,028,000 | 30.516854 | 79 | 0.583601 | false | 4.001427 | false | false | false |
J-CPelletier/WebComicToCBZ | webcomix/comic.py | 1 | 6441 | import os
from typing import List, Mapping, Dict
from urllib.parse import urlparse
from zipfile import ZipFile, BadZipFile
import click
from webcomix.scrapy.download.comic_spider import ComicSpider
from webcomix.scrapy.verification.verification_spider import VerificationSpider
from webcomix.scrapy.crawler_worker impo... | mit | -2,397,839,438,666,976,000 | 34.98324 | 148 | 0.609067 | false | 3.995658 | false | false | false |
pradyunsg/pip | src/pip/_vendor/tenacity/tornadoweb.py | 6 | 1729 | # -*- coding: utf-8 -*-
# Copyright 2017 Elisey Zanko
#
# 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... | mit | -6,275,794,719,547,547,000 | 34.285714 | 88 | 0.644303 | false | 3.974713 | false | false | false |
swistakm/pyimgui | doc/examples/integrations_glfw3.py | 1 | 2166 | # -*- coding: utf-8 -*-
import glfw
import OpenGL.GL as gl
import imgui
from imgui.integrations.glfw import GlfwRenderer
from testwindow import show_test_window
def main():
imgui.create_context()
window = impl_glfw_init()
impl = GlfwRenderer(window)
while not glfw.window_should_close(window):
... | bsd-3-clause | -4,319,366,092,759,306,000 | 24.482353 | 70 | 0.594183 | false | 3.327189 | false | false | false |
spectralDNS/spectralDNS | spectralDNS/solvers/KMM.py | 1 | 19340 | __author__ = "Mikael Mortensen <mikaem@math.uio.no>"
__date__ = "2015-10-29"
__copyright__ = "Copyright (C) 2015-2018 " + __author__
__license__ = "GNU Lesser GPL version 3 or any later version"
#pylint: disable=unbalanced-tuple-unpacking,unused-variable,function-redefined,unused-argument
from shenfun.spectralbase im... | lgpl-3.0 | 1,808,514,594,086,696,400 | 35.559546 | 100 | 0.560548 | false | 2.473146 | false | false | false |
lmtierney/watir-snake | tests/browser/user_editable_tests.py | 1 | 9594 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from nerodia.exception import UnknownObjectException, ObjectReadOnlyException, Error
pytestmark = pytest.mark.page('forms_with_input_elements.html')
class TestUserEditableAppend(object):
def test_appends_the_text_to_the_text_field(se... | mit | 2,164,470,428,977,923,800 | 48.885417 | 98 | 0.681666 | false | 3.398864 | true | false | false |
marineam/nagcat | python/nagcat/runnable.py | 1 | 6775 | # Copyright 2008-2010 ITA Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | -8,829,159,319,412,127,000 | 31.416268 | 76 | 0.597786 | false | 4.419439 | false | false | false |
dufferzafar/picard | picard/coverart/providers/__init__.py | 1 | 6542 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
# Copyright (C) 2014 Laurent Monin
#
# 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,... | gpl-2.0 | -4,222,410,756,886,584,000 | 34.928571 | 93 | 0.669827 | false | 4.205145 | false | false | false |
allisnone/pytrade | fileOperation.py | 1 | 2698 | import os
import os.path
import shutil
import time,datetime
def copyFiles(sourceDir, targetDir):
if sourceDir.find(".svn") > 0:
return
for file in os.listdir(sourceDir):
sourceFile = os.path.join(sourceDir, file)
targetFile = os.path.join(targetDir, file)
... | gpl-2.0 | -7,493,886,341,235,445,000 | 34.986301 | 144 | 0.565234 | false | 3.568783 | false | false | false |
leandrotoledo/python-telegram-bot | telegram/keyboardbuttonpolltype.py | 2 | 1837 | #!/usr/bin/env python
# pylint: disable=R0903
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2020-2021
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public L... | lgpl-3.0 | 948,309,899,538,182,400 | 39.822222 | 94 | 0.712575 | false | 3.94206 | false | false | false |
jptomo/rpython-lang-scheme | rpython/rlib/types.py | 1 | 1598 | from rpython.annotator import model
from rpython.annotator.listdef import ListDef
from rpython.annotator.dictdef import DictDef
def none():
return model.s_None
def impossible():
return model.s_ImpossibleValue
def float():
return model.SomeFloat()
def singlefloat():
return model.SomeSingleFloat()... | mit | 1,221,883,362,733,679,000 | 15.645833 | 83 | 0.717772 | false | 3.392781 | false | false | false |
MagicWishMonkey/fuze | fuze/utilities/reflection.py | 1 | 6622 | import new
import uuid
import types
import hashlib
import inspect
class Reflector:
@staticmethod
def rcurry(f, *a, **kw):
def curried(*more_a, **more_kw):
return f(*(more_a + a), **dict(kw, **more_kw))
return curried
@staticmethod
def curry(f, *a, **kw):
def cu... | mit | 1,185,721,087,761,440,800 | 26.707113 | 86 | 0.489882 | false | 3.585273 | false | false | false |
chhe/streamlink | src/streamlink/plugins/youtube.py | 1 | 11563 | import json
import logging
import re
from html import unescape
from urllib.parse import urlparse, urlunparse
from streamlink.plugin import Plugin, PluginError
from streamlink.plugin.api import useragents, validate
from streamlink.plugin.api.utils import itertags
from streamlink.stream import HLSStream, HTTPStream
from... | bsd-2-clause | -7,102,363,435,373,621,000 | 35.021807 | 125 | 0.521145 | false | 3.927649 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.