repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
wackrat/structer
structer/named.py
1
6439
""" Assign attribute names to tuple indices """ import struct from operator import itemgetter from . import CacheAttr, NameSpace, NameList, Meta class TupleDict(dict): """ MetaTuple namespace """ def __init__(self, **kwargs): super().__init__(**kwargs) self.__names__ = () def __m...
mit
3,598,232,183,105,975,000
30.563725
97
0.571517
false
rbuffat/pyidf
tests/test_photovoltaicperformancesimple.py
1
2209
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.electric_load_center import PhotovoltaicPerformanceSimple log = logging.getLogger(__name__) class TestPhotovoltaicPerformanceSimple(unittest.TestCase): def setUp(self): ...
apache-2.0
-5,194,418,483,505,201,000
39.925926
173
0.708918
false
mansenfranzen/ultimate
django/app_tutorial/models.py
1
3329
"""This module contains the data models""" from django.db import models from django.contrib.auth.models import User class Nationality(models.Model): abbreviation = models.CharField(max_length=5) name = models.CharField(max_length=75) class Division(models.Model): name = models.CharField(max_length=50) ...
gpl-3.0
6,992,107,112,340,045,000
32.969388
78
0.692701
false
AlekSi/loggerglue
loggerglue/tests/test_parse_timestamp.py
1
1797
import unittest import datetime from loggerglue.util.parse_timestamp import parse_timestamp class TestParseTimestamp(unittest.TestCase): pairs = { '2003-10-11T12:14:15.003000Z': datetime.datetime(2003, 10, 11, 12, 14, 15, 3000), '2003-10-11T12:14:15.003Z': datetime.datetime(2003, 10,...
mit
6,187,913,781,780,865,000
46.289474
94
0.588203
false
wuxue/altanalyze
sampleIndexSelection.py
1
8608
import sys,string import os def makeTestFile(): all_data = [['name','harold','bob','frank','sally','kim','jim'], ['a','0','0','1','2','0','5'],['b','0','0','1','2','0','5'], ['c','0','0','1','2','0','5'],['d','0','0','1','2','0','5']] input_file = 'test.txt' export_object = open(input_...
apache-2.0
7,157,787,810,996,888,000
38.668203
228
0.564823
false
nyusngroup/pyMCZ
pyMCZ/metallicity.py
1
9229
############################################################################## ## Calculates oxygen abundance (here called metalicity) based on strong emission lines, ## based on code originally written in IDL by Lisa Kewley (Kewley & Ellison 2008). Outputs ## oxygen abundance in many different diagnostics (see Bianc...
mit
-3,687,344,618,905,903,000
34.910506
131
0.57406
false
dww100/sct
python/bin/calculate_rfactor.py
1
4887
#!/usr/bin/env python # -*- coding: utf-8 -*- """Compares pre-calculated theorerical scattering curves to experimental x-ray and neutron scattering curves. """ # Copyright 2014 University College London # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance ...
apache-2.0
824,015,373,454,346,000
30.941176
116
0.5752
false
FinalsClub/karmaworld
karmaworld/apps/notes/management/commands/import_ocw_json.py
1
10560
#!/usr/bin/env python # -*- coding:utf8 -*- # Copyright (C) 2012 FinalsClub Foundation import json import os.path import requests from karmaworld.apps.notes.models import Note from karmaworld.apps.notes.models import NoteMarkdown as NoteContent from karmaworld.apps.notes.models import Document from karmaworld.apps.n...
agpl-3.0
7,579,826,730,142,562,000
48.345794
210
0.471307
false
EeOneDown/spbu4u
tg_bot/handlers/editor/hide.py
1
5891
from flask import g import telebot_login from app import db, new_functions as nf from app.constants import ( hide_answer, hide_lesson_answer, selected_lesson_answer, selected_lesson_info_answer, ask_to_select_types_answer, how_to_hide_answer ) from app.models import Lesson from tg_bot import bot from tg_bot.ke...
apache-2.0
5,429,025,399,065,419,000
27.268293
79
0.650906
false
Rolfchen/json-map
python/jsonMap.py
1
9998
#### Json Map ### # beta # @author Rolf Chen # This module will "transform" one JSON object to another through the use of JSON Mapper Schema # @license # # MIT License # # Copyright (c) 2016 Rolf Chen # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated docume...
mit
8,639,559,935,151,903,000
33.12628
462
0.685037
false
lichong012245/cornerstone
prop_management/actions.py
1
1402
import csv from unidecode import unidecode from django.http import HttpResponse def export_as_csv_action(description="Export selected objects as CSV file", fields=None, exclude=None, header=True): """ This function returns an export csv action 'fields' and 'exclude' work like in ...
unlicense
-1,529,148,384,365,938,700
35.921053
105
0.633381
false
openstack/cloudkitty
cloudkitty/cli/status.py
1
1683
# Copyright 2018 Objectif Libre # # 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 agr...
apache-2.0
6,150,540,138,014,820,000
29.053571
78
0.674391
false
yrobla/nova
nova/tests/test_imagebackend.py
1
20672
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Grid Dynamics # 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/l...
apache-2.0
-967,521,819,351,410,200
37.78424
78
0.611552
false
xblia/Upgrade-service-for-java-application
py_custom_common_libs/pyversion/ClearTempFiles.py
1
1320
#coding=utf-8 '''/* * Copyright 2015 lixiaobo * * VersionUpgrade project licenses this file to you 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 ...
apache-2.0
-173,714,863,027,328,500
27.717391
78
0.649242
false
Spoken-tutorial/spoken-website
cron/old/upload_videos.py
1
4480
from builtins import str import MySQLdb import time import sys #sys.path.insert(0, '../spoken') #sys.path.insert(0, '../../spoken') from youtube_upload import * from config import * def convert_video(path): file_name, file_extension = os.path.splitext(path) try: """ffmpeg -i Hardware-requirement-to-in...
gpl-3.0
-5,743,534,340,822,348,000
40.481481
192
0.59442
false
kubeflow/pipelines
samples/core/ai_platform/training/trainer/model.py
1
2478
# Copyright 2019 The Kubeflow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
4,932,397,980,201,385,000
31.181818
80
0.706618
false
OpenNumismat/open-numismat
OpenNumismat/Collection/Password.py
1
3941
import hashlib from PyQt5.QtCore import Qt from PyQt5.QtWidgets import * def cryptPassword(password=''): return hashlib.md5(password.encode('utf-8')).hexdigest() def checkPassword(crypted_password, password): if crypted_password != cryptPassword(password): return False return Tru...
gpl-3.0
6,384,421,995,999,796,000
34.155963
76
0.612789
false
softside/peewee
peewee.py
1
157476
# coding: utf-8 # May you do good and not evil # May you find forgiveness for yourself and forgive others # May you share freely, never taking more than you give. -- SQLite source code # # As we enjoy great advantages from the inventions of others, we should be glad # of an opportunity to serve others by an invention...
mit
-1,994,060,355,427,966,200
32.801678
119
0.564113
false
uholzer/sempipe
sempipe-plan.py
1
1449
#!/usr/bin/python import argparse from rdflib import URIRef from rdflib.collection import Collection from rdflib.graph import QuotedGraph from sys import stdin import logging logging.getLogger().setLevel(logging.INFO) parser = argparse.ArgumentParser(description='SemPipe Planner: Construct commands to build resource...
mit
6,325,521,333,301,947,000
36.153846
146
0.708765
false
yakinaround/myadventure-api
app/views/delorme.py
1
5381
""" Initialize adventure delorme controller """ import logging import urllib2 import datetime from pykml import parser from flask import Blueprint, abort, request, jsonify from werkzeug.exceptions import BadRequest from app.decorators import crossdomain from app.views.auth import OAUTH from app.models.adventure impor...
apache-2.0
-1,576,119,242,009,634,300
33.056962
91
0.549712
false
Falkonry/falkonry-python-client
falkonryclient/helper/models/EntityMeta.py
1
1138
""" Falkonry Client Client to access Condition Prediction APIs :copyright: (c) 2016-2018 by Falkonry Inc. :license: MIT, see LICENSE for more details. """ import json class EntityMeta: """EntityMeta schema class""" def __init__(self, **kwargs): self.raw = kwargs.get('entityMeta') if 'entityMeta' i...
mit
-3,019,956,476,006,297,600
23.212766
77
0.623902
false
childsish/lhc-python
lhc/binf/sequence/tools/view.py
1
1311
import argparse from textwrap import TextWrapper from typing import Iterable, Iterator from lhc.io import open_file from lhc.io.fasta.iterator import iter_fasta, FastaEntry def view(sequences: Iterable[FastaEntry]) -> Iterator[FastaEntry]: for sequence in sequences: yield FastaEntry(sequence.key, sequenc...
gpl-2.0
6,720,135,429,607,178,000
30.214286
97
0.667429
false
ScreamingUdder/mantid
Framework/PythonInterface/test/python/mantid/kernel/ConfigPropertyObserverTest.py
1
1625
import unittest import sys from mantid.kernel import ConfigService, ConfigPropertyObserver if sys.version_info.major == 2: import mock else: from unittest import mock class ConfigObserverTest(unittest.TestCase): def setUp(self): self.config = ConfigService.Instance() self._search_director...
gpl-3.0
-8,097,669,992,963,872,000
38.634146
94
0.705231
false
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/astroid/astroid/arguments.py
1
12669
# Copyright (c) 2015-2016, 2018-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2015-2016 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com> # Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com> # Copyright (c) 2018 Anthony Sottile <asottile@umich.edu> # Copyrig...
mit
-8,454,015,631,666,800,000
41.23
98
0.563896
false
lmaurits/phyltr
src/phyltr/commands/stat.py
1
2074
from phyltr.commands.base import PhyltrCommand from phyltr.plumbing.sinks import NullSink from phyltr.utils.topouniq import are_same_topology class Stat(PhyltrCommand): """ Print basic properties of a tree stream, such as the number of trees and taxa. """ sink = NullSink def __init__(self, **kw):...
gpl-3.0
-7,865,451,034,940,362,000
36.709091
82
0.593539
false
anjesh/pdf-processor
tests/AbbyyPdfTextExtractorNetworkTest.py
1
1552
#!/usr/local/bin/python import unittest import sys import os.path import glob import ConfigParser from pdftools.PdfSeparate import * from abbyy.AbbyyPdfTextExtractor import * from urllib2 import HTTPError class AbbyyPdfTextExtractorNetworkTest(unittest.TestCase): def setUp(self): self.outdir = "tests/out/...
mit
732,123,192,711,488,400
34.272727
129
0.659794
false
oasis-open/cti-python-stix2
stix2/equivalence/pattern/compare/observation.py
1
4026
""" Comparison utilities for STIX pattern observation expressions. """ from stix2.equivalence.pattern.compare import generic_cmp, iter_lex_cmp from stix2.equivalence.pattern.compare.comparison import ( comparison_expression_cmp, generic_constant_cmp, ) from stix2.patterns import ( AndObservationExpression, Foll...
bsd-3-clause
-242,542,296,575,925,300
30.952381
80
0.676105
false
tipsybear/ormbad
tests/__init__.py
1
1481
# tests # Testing for the ormbad module # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Thu Aug 13 12:34:07 2015 -0400 # # Copyright (C) 2015 Tipsy Bear Studios # For license information, see LICENSE.txt # # ID: __init__.py [] benjamin@bengfort.com $ """ Testing for the ormbad module """ #########...
apache-2.0
480,960,868,157,756,600
26.425926
74
0.42944
false
carthagecollege/django-djsani
djsani/wsgi_default.py
1
1133
""" WSGI config for djproj project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ import os, sys # python sys.path.append('/usr/lib/python2.7/') sys.path.append('/usr/lib/python2.7...
bsd-3-clause
4,434,000,773,288,951,300
33.333333
141
0.733451
false
fastflo/emma
emmalib/providers/sqlite/SQLiteDb.py
1
1989
# -*- coding: utf-8 -*- # emma # # Copyright (C) 2006 Florian Schmidt (flo@fastflo.de) # 2014 Nickolay Karnaukhov (mr.electronick@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 F...
gpl-2.0
523,820,491,419,384,800
36.528302
95
0.644042
false
polyaxon/polyaxon
sdks/python/http_client/v1/polyaxon_sdk/models/v1_auth_type.py
1
4495
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
apache-2.0
-5,344,663,403,793,920,000
26.576687
94
0.577976
false
misakwa/thriftpy
thriftpy/transport/socket.py
1
5179
# -*- coding: utf-8 -*- from __future__ import absolute_import import errno import os import socket import sys from . import TTransportBase, TTransportException class TSocketBase(TTransportBase): def _resolveAddr(self): if self._unix_socket is not None: return [(socket.AF_UNIX, socket.SOCK_...
mit
2,614,252,231,078,470,700
31.987261
79
0.533501
false
PaddlePaddle/Paddle
python/paddle/text/datasets/imdb.py
1
4903
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
-5,576,723,212,398,419,000
33.286713
93
0.581277
false
googleapis/sphinx-docfx-yaml
docfx_yaml/utils.py
1
1729
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
9,017,048,866,687,380,000
29.875
88
0.710237
false
LeastAuthority/txkube
src/txkube/_network.py
1
16636
# Copyright Least Authority Enterprises. # See LICENSE for details. """ A Kubernetes client which uses Twisted to interact with Kubernetes via HTTP. """ from os import pathsep from os.path import expanduser from json import loads from zope.interface import implementer import attr from attr import validators from p...
mit
1,615,858,735,612,449,800
28.601423
118
0.618779
false
seeschloss/grammalecte
pythonpath/grammalecte/fr/cregex.py
1
5484
# -*- encoding: UTF-8 -*- # Grammalecte - Compiled regular expressions import re #### Lemme Lemma = re.compile("^>(\w[\w-]+)") #### Analyses Gender = re.compile(":[mfe]") Number = re.compile(":[spi]") #### Nom et adjectif NA = re.compile(":[NA]") ## nombre NAs = re.compile(":[NA].*:s") NAp = re.compile(":[NA].*:p"...
gpl-3.0
-850,004,207,733,125,000
23.145374
85
0.572158
false
ratchetmdt/simple_web_api_access
SimpleWebApiAccess/WeatherClientPrinter.py
1
2517
#!/bin/env python # -*- coding: utf-8 -*- # vim: set fileencoding-utf8 : from WeatherClient import WeatherClient class WeatherClientPrinter(object): def printAlmanacXml(self,almanacResponse): """ Imprimeix les dades de almanac resultants del recurs en xml. :param almanacResponse: ...
gpl-3.0
5,546,963,730,478,645,000
30.08642
74
0.579261
false
AJHMvR/django-spotnet
spotnet/downloadserver/watchfolder.py
1
2431
from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy, ugettext import os from ..downloading import DownloadServer, FsError class WatchfolderDownloadServer(DownloadServer): def __init__(self, dirpath, **kwargs): if not os.path.isdir(dirpath): ...
gpl-3.0
7,906,408,022,219,077,000
35.833333
79
0.497738
false
dmnfarrell/peat
pKa/MD_elec.py
1
7882
#!/usr/bin/env python # # pKa - various programs and scripts for pKa value analysis, calculation and redesign # Copyright (C) 2010 Jens Erik Nielsen # # 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 Foundat...
mit
2,291,590,608,648,311,300
29.432432
98
0.49188
false
jmnybl/SD-2nd-layer-prediction
train.py
1
3088
import argparse import os import codecs import sys import StringIO import second_layer from tree import read_conll import tree from features import convert_toNumbers import json import time def train(args): """ main() to launch everything """ if not args.no_ccprop: if not os.path.exists(os.pa...
gpl-2.0
985,428,177,355,106,300
39.103896
183
0.650259
false
googleapis/python-runtimeconfig
tests/unit/test__http.py
1
3945
# Copyright 2016 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
-7,618,088,391,003,589,000
36.571429
86
0.623574
false
pcu4dros/pandora-core
api/tests/auth_tests/test_user_status.py
1
2659
import unittest import json from flask_api import status from api import db from database.models.users import User from database.managers.user_manager import add_user from core.messages import error_messages as error from api.tests.base import BaseTestCase from api.tests.auth_tests.base_auth import user_registration,...
mit
8,285,803,323,994,757,000
40.546875
78
0.548326
false
JarbasAI/jarbas-core
mycroft/jarbas-skills/skill_near_earth_object_tracker/__init__.py
1
6165
from adapt.intent import IntentBuilder from mycroft.skills.core import MycroftSkill from mycroft.util.log import getLogger import unirest import os import time import webbrowser __author__ = 'jarbas' LOGGER = getLogger(__name__) class NEOSkill(MycroftSkill): def __init__(self): super(NEOSkill, self)._...
gpl-3.0
-6,935,500,169,262,557,000
35.696429
107
0.526358
false
anchore/anchore-engine
tests/integration/services/policy_engine/engine/policy/gates/test_packages.py
1
16988
import pytest from tests.integration.services.policy_engine.engine.policy.gates import ( GateUnitTest, cls_no_feeds_test_env, ) from anchore_engine.db import Image, ImagePackageManifestEntry from anchore_engine.services.policy_engine.engine.policy.gates.packages import ( PackagesCheckGate, RequiredPacka...
apache-2.0
7,444,365,720,097,862,000
37.963303
153
0.585943
false
sridevikoushik31/openstack
nova/tests/scheduler/test_scheduler.py
1
40005
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
8,616,767,067,970,938,000
43.400666
79
0.568404
false
fermat618/pida
pida/ui/besttextview/base.py
1
1031
class BaseTextView(object): """ Api is as in gtk.TextView, additional here """ has_syntax_highlighting = False _doctype = None def get_doctype(self): """ Returns the pida.core.doctype.DocType object assigned to this view """ return self._doctype ...
gpl-2.0
6,531,987,887,031,167,000
21.933333
69
0.551891
false
andrewalexander/cloud-custodian
c7n/resources/elasticsearch.py
1
1845
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-3,997,595,062,102,250,500
33.166667
74
0.697561
false
IvanaXu/Test_Class_GOF
tPatterns/Behavioral_Patterns/test_Command_Pattern.py
1
1456
# -*-coding:utf-8-*- # @auth ivan # @time 2016-10-20 20:53:16 # @goal test for Command Pattern class Order: def __init__(self): return def execute(self): return class Stock: def __init__(self): self.name = 'ABC' self.quantity = 10 def buy(self): print("Stock...
gpl-3.0
-3,171,332,023,686,319,600
18.413333
95
0.574176
false
dandanvidi/catalytic-rates
scripts/get_data_cache_pFVA_results.py
1
3859
from rcat import RCAT import pandas as pd import numpy as np from cobra.core import Metabolite, Reaction from cobra.io.sbml import create_cobra_model_from_sbml_file from cobra.manipulation.modify import convert_to_irreversible from copy import deepcopy from cobra.flux_analysis.variability import flux_variability_analys...
mit
4,472,997,404,974,120,400
36.843137
108
0.576833
false
AurelienNioche/MonkeyProject
graphics/pause.py
1
1968
from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from graphics.generic import Colors class Pause(QWidget): def __init__(self): super().__init__() self.background_color = "white" self.create_background() def create_background(self): pal = Q...
gpl-3.0
5,052,131,524,243,271,000
21.375
81
0.5
false
stianrh/askbot-nordic
askbot/mail/__init__.py
1
16973
"""functions that send email in askbot these automatically catch email-related exceptions """ from django.conf import settings as django_settings DEBUG_EMAIL = getattr(django_settings, 'ASKBOT_DEBUG_INCOMING_EMAIL', False) import logging import os import re import smtplib import sys from askbot import exceptions from ...
gpl-3.0
6,603,444,764,741,411,000
34.883721
89
0.580628
false
google/eclipse2017
src/solar_eclipse_analysis/extract_image_dimensions.py
1
2062
"""Read images""" import os import logging import argparse import pickle from exif import _extract_exif_metadata, _extract_image_metadata from PIL import Image from rawkit.raw import Raw from multiprocessing import Pool from functools import partial import libraw TMPDIR=os.getenv("TMPDIR") def get_arguments(): p...
apache-2.0
3,300,903,939,787,287
28.457143
92
0.611542
false
maniteja123/numdifftools
numdifftools/multicomplex.py
1
10058
""" Created on 22. apr. 2015 @author: pab References ---------- A METHODOLOGY FOR ROBUST OPTIMIZATION OF LOW-THRUST TRAJECTORIES IN MULTI-BODY ENVIRONMENTS Gregory Lantoine (2010) Phd thesis, Georgia Institute of Technology USING MULTICOMPLEX VARIABLES FOR AUTOMATIC COMPUTATION OF HIGH-ORDER DERIVATIVES Gregory Lant...
bsd-3-clause
2,633,827,981,872,848,000
26.110512
87
0.544939
false
Nekrofage/MinecraftPython
mcpi/minecraftturtle.py
1
17154
#Minecraft Graphics Turtle #Martin O'Hanlon #www.stuffaboutcode.com import minecraft import block import time import math #MinecraftDrawing class. Useful functions for drawing objects. class MinecraftDrawing: def __init__(self, mc): self.mc = mc # draw point def drawPoint3d(self, x, y, z, blockT...
mit
3,385,390,198,852,387,000
34.589212
194
0.542847
false
gutooliveira/progScript
tekton/backend/appengine/routes/amigos/rest.py
1
1065
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaebusiness.business import CommandExecutionException from tekton.gae.middleware.json_middleware import JsonResponse from amigo_app import facade def index(): cmd = facade.list_amigos_cmd() amigo_list = cmd() short_form=...
mit
-157,783,163,359,563,070
27.783784
69
0.710798
false
RazerM/yourls-python
shovel/docs.py
1
1442
# coding: utf-8 from __future__ import absolute_import, division, print_function import os from shutil import rmtree from plumbum import FG from plumbum.cmd import pandoc, sphinx_build from shovel import task from watchdog.observers import Observer from watchdog.tricks import ShellCommandTrick from watchdog.watchmedo...
mit
1,826,620,503,886,873,600
28.428571
87
0.656727
false
matt-gardner/deep_qa
tests/data/datasets/dataset_test.py
1
1569
# pylint: disable=no-self-use,invalid-name from deep_qa.data.datasets.dataset import Dataset, TextDataset from deep_qa.data.instances.text_classification.text_classification_instance import TextClassificationInstance from tests.common.test_case import DeepQaTestCase class TestDataset: def test_merge(self): ...
apache-2.0
-1,553,252,872,171,497,500
40.289474
110
0.67304
false
motikadosh/project
meshNet/visualize.py
1
24338
from __future__ import print_function from __future__ import division import os import time import numpy as np import numpy.ma as ma from scipy.misc import imsave from mpl_toolkits.axes_grid1 import make_axes_locatable import matplotlib # Force matplotlib to not use any Xwindows backend. # See- https://stackoverflow...
mit
5,972,630,252,666,030,000
33.968391
118
0.595776
false
Splawik/pytigon
pytigon/static_src/pytigon_js/component.py
1
6483
# from pytigon_js.tools import load_css, load_many_js def set_state(component, state): spec = ("!", "?", "*", "0", "+", "-", "%") if component.options.hasOwnProperty("state_actions"): state_actions = component.options["state_actions"] else: state_actions = [] for key in Object.keys(sta...
lgpl-3.0
3,156,407,132,820,454,400
35.835227
87
0.420022
false
skibblenybbles/django-commando
commando/contrib/south/management/datamigration.py
1
1330
from commando import management BaseDataMigrationCommand = management.get_command_class( "datamigration", exclude_packages=("commando",)) if BaseDataMigrationCommand is not None: base = BaseDataMigrationCommand() class DataMigrationCommandOptions(management.CommandOptions): """ ...
mit
-6,139,418,895,942,126,000
29.930233
88
0.621053
false
peterhgombos/tdt4136
exercise3/sa.py
1
1931
# here be imports import math # for math.exp import random # for random.randoj # the main abstract search node class class SearchNode: # super init method, takes a state and stores it, # to be called by subclass' init method def __init__(self, state): self.state = state # the state of the node ...
bsd-3-clause
3,661,242,892,329,662,500
34.109091
92
0.580528
false
PackeTsar/checkmyip
checkmyip.py
1
11330
#!/usr/bin/python ##### CheckMyIP Server ##### ##### Written by John W Kerns ##### ##### http://blog.packetsar.com ##### ##### https://github.com/packetsar/checkmyip ##### ##### Inform version here ##### version = "v1.3.0" ##### Import python2 native modules #####...
gpl-3.0
3,367,088,984,333,559,300
36.892977
87
0.691968
false
cr0hn/ktcal2
ktcal2/lib/ssh_brute.py
1
6101
# -*- coding: utf-8 -*- """ ktcal2: This file contains function for SSH brute forcer. """ import asyncio import asyncssh import itertools from .data import FoundCredential __license__ = '''Copyright (c) cr0hn - cr0hn<-at->cr0hn.com (@ggdaniel) All rights reserved. Redistribution and use in source and binary forms...
bsd-3-clause
-6,533,807,394,892,013,000
35.975758
107
0.561875
false
klahnakoski/SpotManager
vendor/mo_logs/convert.py
1
2502
# encoding: 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
mpl-2.0
-4,565,640,456,867,415,600
27.758621
110
0.58753
false
itensionanders/distcc
include_server/statistics.py
1
5220
#! /usr/bin/env python3 # # Copyright 2007 Google Inc. # # 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. # # This progra...
gpl-2.0
3,612,777,638,136,934,000
41.786885
77
0.652299
false
snower/TorMySQL
tormysql/client.py
1
3956
# -*- coding: utf-8 -*- # 14-8-8 # create by: snower ''' MySQL asynchronous client. ''' from . import platform from .util import async_call_method from .connections import Connection from .cursor import Cursor from .util import py3 class Client(object): def __init__(self, *args, **kwargs): self._args = ...
mit
6,857,926,019,505,459,000
29.430769
111
0.624874
false
xkong/xlinkwot
xlink/models.py
1
3602
# coding: utf-8 # # xiaoyu <xiaokong1937@gmail.com> # # 2014/10/14 # """ Models for xlink. """ from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from model_utils import TimeStampedModel SENSOR_CHOICES = ( ('switch', _('Switch')), ...
bsd-3-clause
2,646,337,800,656,851,500
29.268908
79
0.591616
false
drnextgis/QGIS
python/plugins/processing/modeler/ModelerGraphicItem.py
1
17163
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerGraphicItem.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ********************...
gpl-2.0
4,428,795,267,376,200,700
42.015038
108
0.560275
false
vfulco/Flask-WeRoBot
flask_werobot.py
1
3504
#coding=utf-8 """ Flask-WeRoBot --------------- Adds WeRoBot support to Flask. :copyright: (c) 2013 by whtsky. :license: BSD, see LICENSE for more details. Links ````` * `documentation <https://flask-werobot.readthedocs.org/>`_ """ __version__ = '0.1.2' from werobot.robot import BaseRoBot from flask import Flask ...
bsd-3-clause
9,168,002,998,156,984,000
29.194175
81
0.562058
false
franckinux/my-own-little-business
molb/views/auth/profile.py
1
5890
from aiohttp.web import HTTPFound from aiohttp.web import HTTPMethodNotAllowed from aiohttp_babel.middlewares import _ import aiohttp_jinja2 from aiohttp_security import authorized_userid from aiohttp_security import forget from asyncpg.exceptions import UniqueViolationError from passlib.hash import sha256_crypt from w...
agpl-3.0
2,568,852,236,197,720,000
37.592105
91
0.578759
false
a-nai/django-wiki
wiki/models/__init__.py
1
3580
from __future__ import absolute_import from __future__ import unicode_literals # -*- coding: utf-8 -*- from django import VERSION from django.conf import settings as django_settings from django.core.exceptions import ImproperlyConfigured import warnings from six import string_types # TODO: Don't use wildcards from .a...
gpl-3.0
-6,644,550,487,168,386,000
35.907216
113
0.705307
false
sschuberth/dosocs2
dosocs2/scanresult.py
1
3069
# Copyright (C) 2015 University of Nebraska at Omaha # Copyright (C) 2015 Thomas T. Gurney # # This file is part of dosocs2. # # dosocs2 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 ...
gpl-2.0
7,592,582,733,630,382,000
33.483146
108
0.64288
false
conwetlab/ckanext-privatedatasets
ckanext/privatedatasets/tests/test_fiware_parser.py
1
5394
# -*- coding: utf-8 -*- # Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of CKAN Private Dataset Extension. # CKAN Private Dataset Extension is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License as published by # t...
agpl-3.0
-1,399,594,369,950,432,000
37.798561
112
0.593918
false
thruflo/weblayer
src/weblayer/base.py
1
1408
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :py:mod:`weblayer.base` provides default :py:class:`~weblayer.interfaces.IRequest` and :py:class:`~weblayer.interfaces.IResponse` implementations, based purely on `webob.Request`_ and `webob.Response`_. The two implementations, :py:class:`Request` and :py:...
unlicense
4,338,815,535,181,852,000
26.607843
77
0.68892
false
sgordon007/jcvi_062915
formats/fasta.py
1
69572
""" Wrapper for biopython Fasta, add option to parse sequence headers """ import re import sys import os import os.path as op import shutil import logging import string from itertools import groupby, izip_longest from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqUtils.Chec...
bsd-2-clause
2,400,704,709,899,030,000
30.366997
92
0.56964
false
tillrohrmann/flink
flink-python/pyflink/table/table_environment.py
1
89049
################################################################################ # 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...
apache-2.0
-6,453,092,547,031,303,000
44.340631
100
0.604207
false
aipescience/django-daiquiri
daiquiri/query/migrations/0004_table_name.py
1
1149
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-11-01 13:34 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('daiquiri_query', '0003_query_language_and_actual_query'), ] operations = [ mig...
apache-2.0
-8,114,461,899,424,736,000
31.828571
172
0.571802
false
leiferikb/bitpop
build/scripts/slave/chromium_commands.py
1
23897
# Copyright (c) 2012 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. """A subclass of commands.SVN that allows more flexible error recovery. This code is only used on the slave but it is living in common/ because it is di...
gpl-3.0
-104,956,444,141,040,200
35.483969
80
0.653346
false
arozumenko/locust
example/simple_commands.py
1
1661
# Copyright (c) 2014 Artem Rozumenko (artyom.rozumenko@gmail.com) # # 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
6,573,600,938,098,467,000
36.75
75
0.640578
false
wcthompson/theia
modules/lights/rpi_ws281x/python/examples/lit.py
1
3691
# Based on NeoPixel library and strandtest example by Tony DiCola (tony@tonydicola.com) # To be used with a 12x1 NeoPixel LED stripe. # Place the LEDs in a circle an watch the time go by ... # red = hours # blue = minutes 1-5 # green = seconds # (To run the program permanently and with autostart use systemd.) import t...
mit
-1,638,711,738,548,016,000
35.186275
87
0.607965
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/pets/PetConstants.py
1
1756
from panda3d.core import * from panda3d.direct import * from toontown.toonbase.ToonPythonUtil import Enum, invertDictLossless import math from toontown.toonbase import ToontownGlobals OurPetsMoodChangedKey = 'OurPetsMoodChanged' ThinkPeriod = 1.5 MoodDriftPeriod = 300.0 MovePeriod = 1.0 / 4 PosBroadcastPeriod = 1.0 / 5...
apache-2.0
-2,013,100,399,786,460,400
27.322581
69
0.761959
false
brain-research/wip-lambada-lm
lambada_lm/configs.py
1
1903
# Copyright 2016 Google 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, ...
apache-2.0
8,457,949,790,418,944,000
26.985294
80
0.647924
false
zack3241/incubator-airflow
tests/contrib/sensors/test_hdfs_sensors.py
1
8852
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-5,978,718,483,553,526,000
34.693548
82
0.499435
false
kernsuite-debian/lofar
CEP/GSM/bremen/src/unifiedConnection.py
1
5949
#!/usr/bin/env python3 import time import monetdb.sql as monetdb import psycopg2 import logging from src.gsmlogger import get_gsm_logger from src.utils import raise_with_message try: from monetdb.exceptions import OperationalError except ImportError: # Older version from monetdb.monetdb_exceptions import Op...
gpl-3.0
1,199,391,448,778,934,800
29.19797
77
0.524122
false
Septima/qgis-qlrbrowser
src/QlrBrowser/mysettings/qgissettingmanager/setting_dialog.py
1
3791
# ----------------------------------------------------------- # # QGIS setting manager is a python module to easily manage read/write # settings and set/get corresponding widgets. # # Copyright : (C) 2013 Denis Rouzaud # Email : denis.rouzaud@gmail.com # # -----------------------------------------------------...
gpl-2.0
-4,152,729,007,021,710,300
34.101852
106
0.582432
false
maxamillion/anitya
anitya/api.py
1
13400
# -*- coding: utf-8 -*- import flask import anitya import anitya.lib.plugins import anitya.lib.model from anitya.app import APP, SESSION from anitya.doc_utils import load_doc @APP.template_filter('InsertDiv') def insert_div(content): """ Template filter inserting an opening <div> and closing </div> after t...
gpl-2.0
2,827,843,532,739,190,300
23.452555
80
0.548209
false
Yorimor/zurok_bot
yorimor/bot_stats.py
1
1516
import json import os stats_json_file = os.getcwd() + "/stats/command_stats.json" def get_stats_file(): try: with open(stats_json_file, "r", encoding="utf-8", errors="replace") as f: json_file = json.load(f) except FileNotFoundError: json_file = {"global": {}, "servers": {}, "user...
mit
4,984,897,427,109,594,000
27.074074
81
0.594327
false
DTUWindEnergy/Python4WindEnergy
lesson 6/results/cpav/MyUI/MyWidgetUI.py
1
2191
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MyUI\MyWidgetUI.ui' # # Created: Tue Apr 01 09:40:20 2014 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
apache-2.0
-9,146,089,206,193,657,000
40.339623
116
0.713829
false
hycis/Pynet
scripts/nii/mgc2spec_thru_decoder.py
1
5476
import glob import cPickle import os import argparse import numpy as np import pynet.datasets.preprocessor as procs def generate_specs(ext, spec_dir, specnames, datafiles, dtype, feature_size, output_dir, preprocessor, output_dtype, model): assert dtype in ['f4', 'f8'] print 'opening model...
apache-2.0
3,726,965,375,396,391,400
37.56338
133
0.599708
false
artoonie/transcroobie
hitrequest/models.py
1
1379
from __future__ import unicode_literals from django.db import models from django.contrib.postgres.fields import ArrayField from django.contrib.postgres.fields import JSONField class AudioSnippet(models.Model): audio = models.FileField(upload_to='audioparts/%Y-%m-%d') # Predictions: each item in the list is a...
gpl-3.0
-8,674,387,297,139,720,000
34.358974
81
0.701233
false
WoLpH/Trolly
trolly/label.py
1
1268
from . import trelloobject class Label(trelloobject.TrelloObject): ''' Class representing a Trello Label ''' def __init__(self, trello_client, label_id, name=''): super(Label, self).__init__(trello_client) self.id = label_id self.name = name self.base_uri = '/labels...
mit
3,001,780,312,544,061,400
25.416667
75
0.559148
false
scheunemann/KASPAR
kasparGUI/Web/api/modules/interaction.py
1
4362
from flask import Blueprint, jsonify, abort, request from kasparGUI.Web.api.database import db_session from kasparGUI.Web.api.interactionManager import InteractionManager import kasparGUI.Model as Model __interactionLog = Blueprint('interaction.log', __name__) blueprints = [ __interactionLog, ...
mit
9,048,157,935,545,950,000
38.297297
158
0.619441
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/available_providers_list_country.py
1
1381
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
4,282,631,485,875,707,000
36.324324
77
0.604634
false
chromium/chromium
chrome/installer/mac/signing/signing.py
6
4706
# Copyright 2019 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. """ The signing module defines the various binary pieces of the Chrome application bundle that need to be signed, as well as providing utilities to sign them....
bsd-3-clause
-5,977,744,646,191,301,000
36.648
80
0.645134
false
MichaelMcAleer/fuel-vmax-v9
deployment_scripts/puppet/modules/vmax_plugin/files/emc_vmax_common.py
1
200521
# Copyright (c) 2012 - 2015 EMC Corporation. # 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 # # Unle...
apache-2.0
4,988,588,380,280,150,000
43.128741
79
0.577436
false
gciteam6/xgboost
src/features/dataset.py
1
3745
# Built-in modules from glob import glob import re # Third-party modules import numpy as np import pandas as pd # Hand-made modules from .base import DataFrameHandlerBase, BloscpackMixin REGEX_FLAG_NAME_PREFIX = "f_" class DatasetHandler(DataFrameHandlerBase, BloscpackMixin): def __init__(self, columns_y): ...
mit
8,701,407,029,034,433,000
32.141593
83
0.580507
false
trungdtbk/faucet
tests/integration/mininet_multidp_tests.py
1
90086
#!/usr/bin/env python3 """Mininet multi-switch integration tests for Faucet""" import json import os import networkx from mininet.log import error from clib.mininet_test_base import IPV4_ETH, IPV6_ETH from clib.mininet_test_base_topo import FaucetTopoTestBase class FaucetMultiDPTest(FaucetTopoTestBase): """Co...
apache-2.0
6,794,186,926,606,968,000
38.015158
103
0.535022
false
arthurdejong/python-stdnum
stdnum/iso9362.py
1
1124
# iso9362.py - compatibility module for stdnum.bic # # Copyright (C) 2017 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your...
lgpl-2.1
3,861,262,533,408,240,000
33.060606
74
0.758007
false
portnov/sverchok
utils/testing.py
1
15960
import bpy from os.path import dirname, basename, join import unittest import json from io import StringIO import logging from contextlib import contextmanager import sverchok from sverchok.utils.logging import debug, info from sverchok.utils.context_managers import sv_preferences from sverchok.utils.sv_IO_panel_tool...
gpl-3.0
1,359,827,527,010,713,000
33.545455
157
0.605263
false
weechat/qweechat
qweechat/config.py
1
4889
# -*- coding: utf-8 -*- # # config.py - configuration for QWeeChat (~/.qweechat/qweechat.conf) # # Copyright (C) 2011-2021 Sébastien Helleu <flashcode@flashtux.org> # # This file is part of QWeeChat, a Qt remote GUI for WeeChat. # # QWeeChat is free software; you can redistribute it and/or modify # it under the terms o...
gpl-3.0
-5,549,570,575,422,810,000
35.75188
75
0.579378
false