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
aamirmajeedkhan/P4-conference-central
conference.py
1
35026
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime,time im...
apache-2.0
3,213,191,701,473,363,000
38.264574
116
0.613094
false
foursquare/fsqio
src/jvm/io/fsq/twofishes/scripts/match-flickr.py
1
2018
#!/usr/bin/python import sys import csv import urllib import urllib2 import json import geojson output = {} files = sys.argv[1:] for f in files: fdata = open(f).read() try: data = geojson.loads(fdata) except: print 'failed to parse: ' + fdata continue for feature in data['features']: woeid = s...
apache-2.0
-910,351,895,282,670,600
25.552632
106
0.564916
false
botswana-harvard/edc-lab
old/lab_clinic_api/migrations/0001_initial.py
1
31522
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-05-07 13:52 from __future__ import unicode_literals import datetime import django.core.validators from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import django_revision.revision_field import edc_base....
gpl-2.0
2,280,493,389,148,608,000
91.985251
463
0.645327
false
mmasaki/trove
trove/guestagent/module/drivers/module_driver.py
1
2114
# Copyright 2016 Tesora, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-1,046,090,816,335,590,800
29.637681
78
0.648534
false
easy-as-pie-labs/tweap
tweap/project_management/tests.py
1
11427
from django.test import TestCase from project_management.models import Project, Invitation, Tag from project_management.tools import invite_users, get_tags from django.contrib.auth.models import User import json from django.http.response import HttpResponse, HttpResponseRedirect, HttpResponseNotAllowed class ModelTest...
gpl-3.0
4,192,250,747,644,782,600
40.552727
161
0.655203
false
Wyn10/Cnchi
cnchi/ui/gtk/pages/features.py
1
13668
#!/usr/bin/env python # -*- coding: utf-8 -*- # # features.py # # Copyright © 2013-2016 Antergos # # This file is part of Cnchi. # # Cnchi 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...
gpl-3.0
-3,563,286,189,405,870,000
36.138587
94
0.585791
false
SVilgelm/CloudFerry
cloudferry/lib/os/storage/plugins/copy_mechanisms.py
1
5969
# Copyright 2016 Mirantis 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
-7,871,854,656,423,564,000
37.75974
79
0.565756
false
saullocastro/pyNastran
pyNastran/bdf/dev_vectorized/cards/elements/rod/ptube.py
1
8276
from __future__ import print_function from six.moves import zip from numpy import array, zeros, unique, searchsorted, arange, pi from pyNastran.bdf.dev_vectorized.cards.elements.property import Property #from pyNastran.bdf.field_writer_8 import set_blank_if_default from pyNastran.bdf.field_writer_8 import print_card...
lgpl-3.0
-8,218,476,148,353,684,000
33.773109
95
0.531658
false
calebbrown/calebcc
feedgenerator/feeds.py
1
8744
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u"A group Weblog by the shar...
bsd-3-clause
-3,889,700,314,081,301,500
41.653659
123
0.613564
false
mathslinux/ceilometer
ceilometer/opts.py
1
5518
# Copyright 2014 eNovance # # 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, so...
apache-2.0
-4,121,054,771,720,722,400
43.5
79
0.660747
false
google/j2cl
dev/test_all.py
1
1081
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
8,376,689,724,084,247,000
29.027778
74
0.695652
false
riklaunim/django-custom-multisite
django/contrib/auth/models.py
1
17160
import urllib from django.core.exceptions import ImproperlyConfigured from django.core.mail import send_mail from django.db import models from django.db.models.manager import EmptyManager from django.utils.crypto import get_random_string from django.utils.encoding import smart_str from django.utils.translation import ...
bsd-3-clause
6,168,093,177,801,387,000
34.824635
79
0.617599
false
Azure/azure-sdk-for-python
sdk/digitaltwins/azure-digitaltwins-core/tests/_preparer.py
1
5928
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from coll...
mit
-5,432,270,477,441,370,000
40.746479
100
0.593455
false
caktus/django-opendebates
opendebates/tests/test_flatpage_metadata_override.py
1
2796
from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase from django.utils.html import escape from opendebates.models import FlatPageMetadataOverride from opendebates import site_defaults from .factories import SiteFactory, DebateFactory class...
apache-2.0
-2,610,047,757,008,014,300
44.836066
85
0.675966
false
patrickm/chromium.src
chrome/common/extensions/docs/server2/future.py
1
1238
# 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. import sys _no_value = object() def Collect(futures): '''Creates a Future which returns a list of results from each Future in |futures|. ''' r...
bsd-3-clause
-2,560,667,322,118,759,400
26.511111
73
0.638934
false
cliali/py2
a.py
1
1578
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Simple Bot to reply to Telegram messages. This is built on the API wrapper, see # echobot2.py to see the same example built on the telegram.ext bot framework. # This program is dedicated to the public domain under the CC0 license. import logging import telegram from tel...
apache-2.0
2,133,397,267,722,731,300
28.773585
86
0.653359
false
flavoi/diventi
diventi/landing/views.py
1
3927
from itertools import chain from django.shortcuts import render, redirect, resolve_url from django.views.generic.detail import DetailView from django.views.generic import ListView, TemplateView from django.views.generic.edit import CreateView from django.utils.translation import ugettext_lazy as _ from django.c...
apache-2.0
2,472,953,982,382,659,600
30.725
77
0.675325
false
Uberi/botty-bot-bot-bot
src/plugins/timezones.py
1
5164
#!/usr/bin/env python3 import re from datetime import datetime, date import pytz from .utilities import BasePlugin from .utilities import clockify, untag_word timezone_abbreviations = { "est": pytz.timezone("Canada/Eastern"), "edt": pytz.timezone("Canada/Eastern"), "atlantic": pytz.timez...
mit
1,056,715,963,307,125,400
49.607843
212
0.610616
false
muttiopenbts/fusion
fusion_level02_4.py
1
1932
#!/usr/bin/python ''' Simple script to interact with fusion level 02 challenge network daemon, #!/usr/bin/python mkocbayi@gmail.com ''' from pwn import * import sys #Use this hexdump lib because pwntools hexdump is too slow from hexdump import * def doMode(mode): # Either E or Q print 'Sending mode call: {}'.forma...
gpl-3.0
536,043,605,942,736,000
36.153846
102
0.683747
false
xiaonanln/myleetcode-python
src/Sudoku Solver.py
1
2697
class Solution: # @param board, a 9x9 2D array # Solve the Sudoku by modifying the input board in-place. # Do not return any value. def solveSudoku(self, board): rowUsable = [set(xrange(1, 10)) for i in xrange(9)] colUsable = [set(xrange(1, 10)) for i in xrange(9)] blockUsable = ...
apache-2.0
8,919,941,869,076,930,000
31.119048
118
0.411568
false
kennethreitz/pipenv
pipenv/patched/notpip/_internal/network/download.py
1
6458
"""Download files with progress indicators. """ import cgi import logging import mimetypes import os from pipenv.patched.notpip._vendor import requests from pipenv.patched.notpip._vendor.requests.models import CONTENT_CHUNK_SIZE from pipenv.patched.notpip._internal.models.index import PyPI from pipenv.patched.notpip....
mit
-2,368,371,102,283,550,700
31.29
78
0.644162
false
stefanopanella/xapi-storage-plugins
libs/losetup.py
1
1260
import os.path from xapi.storage.common import call # Use Linux "losetup" to create block devices from files class Loop: """An active loop device""" def __init__(self, path, loop): self.path = path self.loop = loop def destroy(self, dbg): call(dbg, ["losetup", "-d", self.loop])...
lgpl-2.1
-1,819,758,216,933,129,700
26.391304
72
0.584127
false
mosarg/gestione_scuola
backend/migrations/0001_initial.py
1
2074
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Backend' db.create_table(u'backend_backend', ( ('created', self.gf('django.db.mo...
gpl-3.0
-7,381,446,622,908,163,000
48.404762
125
0.607522
false
oarriaga/spatial_transformer_networks
src/models/layers.py
1
5049
from keras import backend as K from keras.engine.topology import Layer if K.backend() == 'tensorflow': import tensorflow as tf def K_meshgrid(x, y): return tf.meshgrid(x, y) def K_linspace(start, stop, num): return tf.linspace(start, stop, num) else: raise Exception("Only 'tensorflow...
mit
-3,533,227,027,551,988,700
35.854015
79
0.575956
false
mattgemmell/DOT-MGTextEntry
mgtext.py
1
12149
#! /usr/bin/python """ MGText Text-entry plugin for Pimoroni's menu system for the Raspberry Pi Display-O-Tron. Code and info: https://github.com/mattgemmell/DOT-MGTextEntry By: Matt Gemmell http://mattgemmell.com/ http://twitter.com/mattgemmell """ from dot3k.menu import MenuOption _UP = 0 _DOWN = 1 _LEFT = 2 _...
mit
-2,095,706,729,113,539,300
30.720627
559
0.658408
false
saebyn/nwgui
nwgui/gui.py
1
2263
import pygame from nwgui.container import AbsoluteContainer class AbstractGUI(object): def __init__(self, game): raise NotImplementedError def getGameObject(self): raise NotImplementedError def get(self, widgetName): raise NotImplementedError def setName(self, name, widget...
gpl-3.0
-5,101,451,680,991,540,000
23.597826
66
0.613787
false
algorhythms/LeetCode
673 Number of Longest Increasing Subsequence.py
1
1796
#!/usr/bin/python3 """ Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input: [1,3,5,4,7] Output: 2 Explanation: The two longest increasing subsequence are [1, 3, 4, 7] and [1, 3, 5, 7]. Example 2: Input: [2,2,2,2,2] Output: 5 Explanation: The length of longest contin...
mit
3,544,294,024,520,078,000
26.630769
78
0.50167
false
pearu/sympycore
sympycore/functions/algebra.py
1
2063
""" Implementes functions ring support. """ # # Author: Pearu Peterson # Created: April, 2008 # __all__ = ['FunctionRing'] from ..core import classes, objects, init_module from ..basealgebra import Verbatim, Algebra from ..ring import CommutativeRing init_module.import_heads() class FunctionRing(CommutativeRing): ...
bsd-3-clause
7,460,060,148,131,743,000
25.792208
101
0.62191
false
NEONScience/NEON-Data-Skills
tutorials/Python/Lidar/lidar-biomass/calc-biomass_py/calc-biomass_py.py
1
20510
#!/usr/bin/env python # coding: utf-8 # --- # syncID: e6ccf19a4b454ca594388eeaa88ebe12 # title: "Calculate Vegetation Biomass from LiDAR Data in Python" # description: "Learn to calculate the biomass of standing vegetation using a canopy height model data product." # dateCreated: 2017-06-21 # authors: Tristan Goulde...
agpl-3.0
-6,897,848,424,968,655,000
35.17284
503
0.709654
false
abstractfactory/openmetadata-mk1
transaction.py
1
5900
"""Convenience module for the end-user The goal of this module is to provide as high-level utilities as possible for users who wish to have as little knowledge as possible about Open Folder. Target audience leans towards Technical Directors or fellow scripters in any DCC. """ from __future__ import absolute_import ...
mit
4,959,071,983,263,927,000
25.818182
101
0.605593
false
mchels/FolderBrowser
plotcontrols.py
1
6028
from PyQt5 import QtWidgets from PyQt5.QtWidgets import QSizePolicy class PlotControls(QtWidgets.QWidget): """ Control bar for controlling how plots are shown. Parameters ---------- cmap_names : list List of colormap names to show in the colormap dropdown menu. plot_2D_types : list ...
mit
-5,390,035,938,519,185,000
34.251462
80
0.584439
false
AlexProfi/django-cms
cms/cms_menus.py
1
16191
# -*- coding: utf-8 -*- from django.utils.translation import get_language from cms import constants from cms.apphook_pool import apphook_pool from cms.utils.permissions import load_view_restrictions, has_global_page_permission from cms.utils import get_language_from_request from cms.utils.conf import get_cms_setting f...
bsd-3-clause
7,715,891,116,846,316,000
36.992958
103
0.571517
false
hadware/lexicographer
epub-parser/src/epub_to_json/epub_to_json.py
1
5101
import sys from epub import open_epub import simplejson as json from bs4 import BeautifulSoup, Tag class SimpleChapter(object): def __init__(self, name, text): self.name = name self.text = text class Parser(object): def __init__(self, epub_path): self.epub_file = open_epub(epub_path,...
gpl-2.0
7,686,731,611,143,497,000
32.781457
115
0.554401
false
datamade/yournextmp-popit
candidates/tests/test_person_view.py
1
2933
# Smoke tests for viewing a candidate's page from datetime import date, timedelta import re from django.conf import settings from django.test.utils import override_settings from django_webtest import WebTest from .factories import ( AreaTypeFactory, ElectionFactory, CandidacyExtraFactory, ParliamentaryChambe...
agpl-3.0
2,693,899,126,005,377,500
35.6625
92
0.656325
false
antoinecarme/pyaf
setup.py
1
1126
from setuptools import setup from setuptools import find_packages with open("README.md", "r") as fh: pyaf_long_description = fh.read() setup(name='pyaf', version='3.0-RC1', description='Python Automatic Forecasting', long_description=pyaf_long_description, long_description_content_type...
bsd-3-clause
8,461,214,734,102,750,000
37.827586
239
0.64476
false
vlegoff/tsunami
src/primaires/pnj/contextes/__init__.py
1
1640
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this ...
bsd-3-clause
2,335,497,463,469,652,000
48.69697
79
0.777439
false
miguelalonso/pywws
src/doc/conf.py
1
9030
# -*- coding: utf-8 -*- # # pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-15 pywws contributors # 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...
gpl-2.0
7,874,652,060,301,545,000
31.956204
81
0.706645
false
PaddlePaddle/Paddle
python/paddle/fluid/incubate/fleet/parameter_server/ir/public.py
1
50054
# 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 appli...
apache-2.0
-7,821,824,388,392,121,000
38.75695
145
0.537979
false
animekita/selvbetjening
selvbetjening/frontend/userportal/views.py
1
7865
# coding=UTF-8 from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.contrib.auth.models import AnonymousUser from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from django.shor...
mit
2,199,686,237,095,671,600
30.464
111
0.595168
false
choderalab/ensembler
ensembler/pdb.py
1
4246
import sys if sys.version_info > (3, 0): from urllib.request import urlopen from urllib.error import URLError from io import StringIO else: from urllib2 import urlopen, URLError from StringIO import StringIO import gzip import re import six def extract_residues_by_resnum(output_file, pdb_input_file...
gpl-2.0
5,171,825,560,777,637,000
35.921739
135
0.5935
false
sdbondi/Arduino-Talk
Comet/python/ArduinoServer.py
1
6552
#!/usr/bin/python import human_curl as requests import serial import platform import sys import getopt import socket import json import time _WINDOWS = (platform.system() == 'Windows') _AJAXURL = 'http://localhost/arduino/comet-router.php?action=%(action)s' #_AJAXURL = 'http://themousepotatowebsite.co.za/experiments/...
mit
1,833,642,196,712,729,600
24.297297
103
0.573107
false
thorwhalen/ut
ml/sk/transformers.py
1
4610
__author__ = 'thor' from sklearn.base import TransformerMixin, BaseEstimator from sklearn.neighbors import KNeighborsRegressor from pandas import DataFrame import numpy as np from nltk import word_tokenize from functools import reduce class HourOfDayTransformer(TransformerMixin): def __init__(self, date_field=...
mit
1,656,264,518,869,154,300
25.964912
120
0.569848
false
LucasFerreiraDaSilva/ScrapingINMET
geraBase.py
1
3704
""" Autor: Lucas Ferreira da Silva Email: lferreira@inf.ufsm.br Descricao: Script para download dos dados referentes a cada estacao metereologica e criacao de uma pequena "base de dados" em formato JSON referente a todas as estacoes Execucao (comando): python3 geraBase.py Saida: Arquivo JSON (e...
mit
8,083,539,564,384,112,000
31.707965
108
0.606061
false
BlackHole/enigma2-1
lib/python/Components/Converter/TemplatedMultiContent.py
2
2918
from Components.Converter.StringList import StringList class TemplatedMultiContent(StringList): """Turns a python tuple list into a multi-content list which can be used in a listbox renderer.""" def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HAL...
gpl-2.0
1,706,497,243,091,871,200
40.098592
207
0.735778
false
Grumblesaur/quickgen
quickgen.py
1
3966
#!/usr/local/bin/python -tt # -*- coding: utf-8 -*- import os, sys, random #supply input as raw_input if running Python 3 or higher if sys.version_info >= (3,0): raw_input = input def parse(structure, part, phonemes): #grab a random phoneme from the relevant category and return it #structure can be O, N, or C, pas...
gpl-2.0
-7,959,536,635,195,563,000
21.793103
88
0.648512
false
donkirkby/live-py-plugin
setup.py
1
1353
import setuptools with open("space_tracer.md") as f: long_description = f.read() about = {} with open("plugin/PySrc/space_tracer/about.py") as f: exec(f.read(), about) # noinspection PyUnresolvedReferences setuptools.setup( name=about['__title__'], version=about['__version__'], author=about['__aut...
mit
5,494,482,452,774,835,000
35.567568
55
0.617886
false
suqinhuang/virt-test
virttest/cartesian_config_unittest.py
1
2937
#!/usr/bin/python import unittest, logging, os import gzip import cartesian_config mydir = os.path.dirname(__file__) testdatadir = os.path.join(mydir, 'unittest_data') class CartesianConfigTest(unittest.TestCase): def _checkDictionaries(self, parser, reference): result = list(parser.get_dicts()) #...
gpl-2.0
2,506,656,116,492,436,000
29.59375
79
0.548178
false
irblsensitivity/irblsensitivity
scripts/features/MethodFeatures.py
1
6286
#-*- coding: utf-8 -*- ''' Created on 2016. 11. 19 Updated on 2016. 01. 09 ''' from __future__ import print_function import os import re from utils import PrettyStringBuilder from utils import Progress import javalang class Resource(object): Stopwords = None EngDictionary = None @staticmethod d...
apache-2.0
4,348,889,472,794,515,500
30.081633
141
0.600223
false
aplicatii-romanesti/allinclusive-kodi-pi
.kodi/addons/plugin.video.kidsplace/brightcovePlayer.py
1
1587
import httplib from pyamf import AMF0, AMF3 from pyamf import remoting from pyamf.remoting.client import RemotingService height = 1080 def build_amf_request(const, playerID, videoPlayer, publisherID): env = remoting.Envelope(amfVersion=3) env.bodies.append( ( "/1", remotin...
apache-2.0
-1,561,841,478,157,068,000
35.068182
156
0.669187
false
iamantony/PythonNotes
src/objects/matrix.py
1
5188
__author__ = 'Antony Cherepanov' from exceptions import Exception class MatrixException(Exception): pass class Matrix(object): def __init__(self, t_rowNum=0, t_colNum=0, t_values=None): if not self.__checkDimensionType(t_rowNum) or\ not self.__checkDimensionType(t_colNum...
mit
-3,138,855,623,441,978,400
31.701299
80
0.528142
false
jhermann/kunstkopf
src/kunstkopf/__init__.py
1
1258
# -*- coding: utf-8 -*- # pylint: disable=bad-whitespace """ kunstkopf [ˈkʊnstkɔp͜f] is a set of tools that handle audio (meta-)data and control hi-fi gear. Copyright © 2015 Jürgen Hermann <jh@web.de> Licensed under the GNU General Public License, Version 3.0 """ # Copyright © 2015 Jürgen Hermann <jh@we...
gpl-3.0
-7,133,038,733,929,701,000
38.03125
99
0.68775
false
arteria/django-hijack-admin
hijack_admin/tests/test_settings.py
1
3172
"""Settings that need to be set in order to run the tests.""" import os DEBUG = True SITE_ID = 1 APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) DATABASES = { 'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } LOGIN_REDIRECT_URL = '/hello' HIJA...
mit
1,946,250,209,781,247,500
28.924528
73
0.671816
false
Freeseer/freeseer
src/freeseer/framework/config/exceptions.py
1
1601
#!/usr/bin/env python # -*- coding: utf-8 -*- # freeseer - vga/presentation capture software # # Copyright (C) 2011, 2013 Free and Open Source Software Learning Centre # http://fosslc.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
-7,931,345,560,944,593,000
28.648148
93
0.722673
false
HBNLdev/DataStore
db/sas_tools.py
1
2566
''' tools for working with .sas7bdat files ''' import os from collections import OrderedDict import pandas as pd from sas7bdat import SAS7BDAT from .knowledge.questionnaires import map_ph4, map_ph4_ssaga map_subject = {'core': {'file_pfixes': []}} parent_dir = '/processed_data/zork/zork-phase4-69/sessi...
gpl-3.0
-7,685,914,298,742,378,000
30.481013
82
0.606002
false
OpenTreeOfLife/gcmdr
run_synth_studies_mono.py
1
1437
import load_synth_extract from plants import studytreelist as plantslist from metazoa import studytreelist as metalist from fungi import studytreelist as fungilist from microbes import studytreelist as microbelist studytreelist = [] studytreelist.extend(metalist) studytreelist.extend(fungilist) studytreelist.extend(m...
bsd-2-clause
-8,043,959,451,811,851,000
33.214286
123
0.695198
false
10clouds/edx-platform
openedx/core/djangoapps/credentials/utils.py
1
3508
"""Helper functions for working with Credentials.""" from __future__ import unicode_literals import logging from openedx.core.djangoapps.credentials.models import CredentialsApiConfig from openedx.core.djangoapps.programs.utils import get_programs_for_credentials from openedx.core.lib.edx_api_utils import get_edx_api_...
agpl-3.0
8,678,225,686,083,167,000
35.936842
103
0.696693
false
naojsoft/qplan
scripts/qexec.py
1
4295
#!/usr/bin/env python # # qexec.py -- Subaru Telescope Queue Execution Tool # """ Usage: qexec.py --help qexec.py [options] """ import sys, os from ginga.misc.Bunch import Bunch from qplan import main, version defaultServiceName = 'qexecute' plugins = [ Bunch(name='slewchart', module='SlewChart', klass=...
bsd-3-clause
-8,172,853,372,845,459,000
40.298077
86
0.611176
false
n3wb13/OpenNfrGui-5.0-1
lib/python/Plugins/Extensions/MediaPortal/additions/porn/adultbay.py
1
12372
# -*- coding: utf-8 -*- ############################################################################################### # # MediaPortal for Dreambox OS # # Coded by MediaPortal Team (c) 2013-2015 # # This plugin is open source but it is NOT free software. # # This plugin may only be distributed to and executed...
gpl-2.0
2,939,069,052,170,796,000
36.374622
166
0.66637
false
kll334477/NewsScrapy
thepaper/thepaper/spiders/wshang_spider.py
1
5240
#!/usr/bin/env python # -*- coding:utf-8 -*- __author__ = 'yinzishao' """ 手机版没有cookie,更方便 但是pc版的首页是所有分类混在一起的 手机版则是新闻在各个分类,所以爬取的时候需要爬各个分类。 """ import re import scrapy from bs4 import BeautifulSoup import logging from thepaper.items import NewsItem import json logger = logging.getLogger("WshangSpider") from thepaper.set...
lgpl-3.0
526,355,286,195,562,100
34.7
129
0.503601
false
archesproject/arches
arches/management/commands/card_component.py
1
3937
""" ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Founda...
agpl-3.0
-963,692,031,037,702,900
30.496
129
0.626365
false
wroersma/volatility
volatility/plugins/overlays/windows/win10.py
1
21936
# Volatility # Copyright (c) 2008-2015 Volatility Foundation # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribu...
gpl-2.0
-771,911,055,582,781,700
30.026874
119
0.552744
false
aYukiSekiguchi/ACCESS-Chromium
chrome/test/chromeos/autotest/files/client/site_tests/network_PyAutoConnectivityTests/network_PyAutoConnectivityTests.py
1
3025
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import dbus import os import pwd import shutil import subprocess from autotest_lib.client.bin import utils from autotest_lib.client.cros import constant...
bsd-3-clause
-7,244,026,314,286,542,000
41.605634
80
0.648264
false
StefanWinterfeldt/Buildicator
messageSinks/consoleMessageSink.py
1
2127
# Copyright 2014 Stefan Winterfeldt <stefan.winterfeldt@bitz.it> # <stefan.winterfeldt@outlook.de # BITZ GmbH <info@bitz.it> # #This file is part of Buildicator. # #Buildicator is free software: you can redistribute it and/or modify #it under the terms of the GN...
gpl-3.0
237,320,716,383,971,300
38.407407
76
0.720733
false
IMIO/django-fixmystreet
django_fixmystreet/api/reports/serializers.py
1
1936
# -*- coding: utf-8 -*- from rest_framework import serializers from . import models class ReportAssignmentAcceptSerializer(serializers.Serializer): reference_id = serializers.CharField() comment = serializers.CharField(required=False) created_at = serializers.DateTimeField() def restore_object(self...
agpl-3.0
-65,268,529,041,024,920
33.571429
84
0.681302
false
nickaugust/pychatkit
clients.py
1
1973
#!/usr/bin/env python import asyncio import logging logger = logging.getLogger("chatkit:" + __name__) class WSClientManager: def __init__(self): self._clients = [] def all(self): return self._clients def add(self, client): logging.info("+ WSClient {}".format(client)) self...
mit
-1,395,320,659,051,184,000
26.788732
61
0.581855
false
likit/BioUtils
fetch_entrez_from_geneid.py
1
1631
'''Selects protein sequences from NCBI that are in a list from Geisha text file. Output is written to standard output. ''' import os import sys import time from Bio import SeqIO, Entrez def parse(infile): '''Return a set of gene IDs from an input file.''' for line in open(infile): geneid = line.spl...
bsd-2-clause
-5,944,984,507,646,516,000
24.888889
66
0.578786
false
forseti-security/forseti-security
tests/services/scanner/scanner_base_db.py
1
4263
"""Helper base class for testing scanners.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime from datetime import timedelta import os import unittest.mock as mock from sqlalchemy.orm import sessionmaker from google.cloud.fors...
apache-2.0
-3,047,828,724,957,816,300
36.394737
80
0.65658
false
vatlab/SOS
src/sos/tasks.py
1
77822
#!/usr/bin/env python3 # # Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center # Distributed under the terms of the 3-clause BSD License. import copy import os import fasteners import pickle import time import lzma import math import struct from enum import Enum from collections import namedtupl...
gpl-3.0
-1,311,812,755,292,229,400
36.3247
207
0.464547
false
bjodah/PyLaTeX
pylatex/base_classes/command.py
1
10139
# -*- coding: utf-8 -*- """ This module implements a class that implements a latex command. This can be used directly or it can be inherited to make an easier interface to it. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from .latex_object import LatexObject from .....
mit
-7,111,534,106,801,539,000
27.085873
79
0.56909
false
sapientsalamander/Pi_Packet_Project
sender_files/python_files/lcd_packet_generation.py
1
6475
"""Configures a scapy packet with user input from the lcd screen. Uses the LCD_Input_Wrapper class to interact with the user. All functions that use the screen directly require a lock object so that only one function can write to the screen at a time; otherwise garbage may result. configure_delay: gets the delay betw...
mit
-3,993,574,124,252,587,000
34.576923
79
0.613591
false
arunkgupta/gramps
gramps/gen/filters/rules/person/_ischildoffiltermatch.py
1
2492
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # # 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 you...
gpl-2.0
-4,666,658,151,900,319,000
32.226667
75
0.536116
false
cheery/spirthon
annotator.py
1
5192
# Annotator needs to find the least generic type for everything. # To do that, it needs to hold a model of our types. class Annotator(object): def __init__(self, unit): self.unit = unit self.stack = [] def update(self, func): for block in func: for op in block.ops: ...
mit
7,691,338,691,917,519,000
30.08982
82
0.589176
false
tibor95/phatch-python2.7
build/lib.linux-i686-2.7/phatch/core/pil.py
1
26512
# Phatch - Photo Batch Processor # Copyright (C) 2007-2009 www.stani.be # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
gpl-3.0
3,443,809,914,918,861,000
35.021739
79
0.55688
false
recipy/recipy
integration_test/regexps.py
1
4118
""" recipy-related regexps. """ # Copyright (c) 2016 University of Edinburgh. def get_usage(): """ Get regular expressions for usage information printed to console. :returns: regular expressions :rtype: list of str or unicode """ return [r"Usage:\n"] def get_version(): """ Get regu...
apache-2.0
-5,645,377,528,694,980,000
25.74026
71
0.554638
false
klpdotorg/dubdubdub
apps/ivrs/migrations/0026_auto_20170101_2313.py
1
1139
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): State = apps.get_model("ivrs", "State") User = apps.get_model("users", "User") states = State.objects.all() for state in states: # Trimming the starting 0....
mit
7,417,438,785,882,545,000
24.886364
60
0.604917
false
google/starthinker
dags/test_dag.py
1
4439
########################################################################### # # 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/l...
apache-2.0
-252,957,889,067,501,380
24.079096
145
0.514305
false
DongjunLee/kino-bot
kino/slack/plot.py
1
2684
from matplotlib import pyplot as plt import matplotlib.dates as dt import seaborn seaborn.set() import datetime class Plot(object): def __init__(self): pass def make_bar( x, y, f_name, title=None, legend=None, x_label=None, y_label=None, ...
mit
2,999,971,998,501,694,500
22.137931
77
0.492921
false
sylvchev/mdla
examples/example_benchmark_performance.py
1
6309
"""Benchmarking dictionary learning algorithms on random dataset""" from multiprocessing import cpu_count from time import time import matplotlib.pyplot as plt import numpy as np from numpy import array from numpy.linalg import norm from numpy.random import permutation, rand, randint, randn from mdla import MiniBatc...
gpl-3.0
-6,148,818,530,008,922,000
27.547511
84
0.592645
false
wrznr/gramophone
tests/gp/test_alignment.py
1
2132
# -*- coding: utf-8 -*- import sys, os, pytest from distutils import dir_util sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../gramophone'))) from gramophone import gp @pytest.fixture def datadir(tmpdir, request): ''' Fixture responsible for searching a folder with the same n...
lgpl-3.0
-4,167,074,787,178,573,300
25.65
93
0.652908
false
tferr/ASA
scripting-examples/3D_Analysis_ImageStack.py
1
2179
#@ImagePlus imp #@LogService log ''' This script uses an outdated API. For a modern replacement, have a look at https://github.com/morphonets/SNT/tree/master/src/main/resources/script_templates/Neuroanatomy ''' from sholl import Sholl_Analysis from sholl import Options from os.path import expanduser def spa...
gpl-3.0
-3,595,713,342,764,342,300
28.849315
98
0.693437
false
jschaul/ComplexNetworkSim
examples/getting started code/first_visualisation.py
1
1471
''' Complete code file only from ComplexNetworkSim's "getting started" documentation section, for visualising a simulation. For explanations refer to the documentation page. Current link: http://complexnetworksim.0sites.net/start.html (documentation hosting may change place - see the PyPi index page.) @author: Jo...
bsd-2-clause
2,120,398,871,978,929,200
44.03125
170
0.743712
false
jonfoster/pyxb1
pyxb/__init__.py
1
10123
"""PyXB stands for Python U{W3C XML Schema<http://www.w3.org/XML/Schema>} Bindings, and is pronounced "pixbee". It enables translation between XML instance documents and Python objects following rules specified by an XML Schema document. This is the top-level entrypoint to the PyXB system. Importing this gets you al...
apache-2.0
-4,845,504,037,243,957,000
38.236434
89
0.708683
false
Pikecillo/genna
external/4Suite-XML-1.0.2/test/Xml/XPointer/test_parser.py
1
2641
#From the spec (and a few more) pointers = [('xpointer(id("list37")/item)', 'xpointer(id("list37")/child::item)'), ('xpointer(id("list37")/item[1]/range-to(following-sibling::item[2]))', 'xpointer(id("list37")/child::item[1]/range-to(following-sibling::item[2]))'), ('...
gpl-2.0
-288,796,644,264,339,600
49.788462
115
0.525559
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/PySide/examples/widgets/analogclock.py
1
3131
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2004-2005 Trolltech AS. All rights reserved. ## ## This file is part of the example classes of the Qt Toolkit. ## ## This file may be used under the terms of the GNU General Public ## License version...
epl-1.0
-2,085,368,576,522,494,700
30
77
0.608432
false
google/clusterfuzz
src/local/butler/reproduce_tool/android.py
1
3980
# Copyright 2019 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
-1,405,921,316,545,967,000
35.851852
80
0.711809
false
lostinplace/filtered-intervaltree
setup.py
1
1509
from setuptools import setup, find_packages from codecs import open from os import path import os here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'readme.md'), encoding='utf-8') as f: long_description = f.read() with open(path.join(here, '.library-version'), encoding='utf-8') as f: exis...
mit
3,768,461,388,915,031,600
26.962963
72
0.666667
false
lstephen/construi
setup.py
1
1635
import codecs import os from setuptools import find_packages, setup def read(*parts): path = os.path.join(os.path.dirname(__file__), *parts) with codecs.open(path, encoding="utf-8") as fobj: return fobj.read() def find_version(): with open("VERSION") as f: return f.read().strip() def ...
apache-2.0
-3,990,177,488,345,775,600
27.189655
69
0.616514
false
Willyham/tchannel-python
tchannel/tornado/timeout.py
1
1748
# Copyright (c) 2015 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
mit
1,548,382,656,835,013,000
37.844444
79
0.741419
false
Kpler/scrapy-logentries-extension
scrapylogentries/extension.py
1
1989
import logging import os from scrapy import signals from scrapy.exceptions import NotConfigured from logentries import LogentriesHandler from logentriesadapter import LogentriesAdapter, ScrapingHubFilter logger = logging.getLogger(__name__) class LogentriesExtension(object): def __init__(self, token): ...
mit
7,340,216,088,831,452,000
30.078125
131
0.612871
false
cbertinato/pandas
pandas/tests/frame/test_duplicates.py
1
14578
import numpy as np import pytest from pandas import DataFrame, Series import pandas.util.testing as tm @pytest.mark.parametrize('subset', ['a', ['a'], ['a', 'B']]) def test_duplicated_with_misspelled_column_name(subset): # GH 19730 df = DataFrame({'A': [0, 0, 1], 'B': [0, 0, 1], ...
bsd-3-clause
8,847,764,871,148,110,000
30.691304
79
0.551996
false
teracyhq/flask-classy
test_classful/test_decorators.py
2
7323
from flask import Flask from .view_classes import DecoratedView from .view_classes import DecoratedBoldListView from .view_classes import DecoratedBoldItalicsListView from .view_classes import DecoratedListMemberView from .view_classes import DecoratedListFunctionAttributesView from .view_classes import DecoratedListMe...
bsd-3-clause
495,681,920,520,354,400
32.286364
79
0.654377
false
fjtc/gtest-tools
gtestgen/tests/test_core.py
1
7457
# Copyright (c) 2015, FJTC # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the follow...
bsd-3-clause
-4,354,923,069,388,113,000
34.679426
87
0.624112
false
iwm911/plaso
plaso/formatters/mcafeeav.py
1
1238
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
apache-2.0
-6,182,131,290,445,977,000
35.411765
80
0.731018
false
mollie/mollie-api-python
tests/test_client.py
1
18333
import re import sys import time from datetime import datetime import pytest import requests.adapters from mollie.api.client import Client, generate_querystring from mollie.api.error import ( DataConsistencyError, IdentifierError, NotFoundError, RequestError, RequestSetupError, ResponseError, ...
bsd-2-clause
6,219,822,788,418,959,000
39.094092
118
0.684549
false
poulpito/Flexget
flexget/plugins/daemon/irc.py
1
41096
from __future__ import unicode_literals, division, absolute_import, with_statement from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring from future.moves.urllib.parse import quote import os import re import threading import logging from xml.etree.ElementT...
mit
-8,097,727,778,710,655,000
39.448819
117
0.540515
false
jarrodmcc/OpenFermion
src/openfermion/utils/_sparse_tools_test.py
1
55877
# 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 # distribu...
apache-2.0
8,698,967,164,351,995,000
40.668158
81
0.614493
false
rchuppala/usc_agent
src/usc-agent-dev/common/source/pyang/pyang/syntax.py
1
11073
"""Description of YANG & YIN syntax.""" import re ### Regular expressions - constraints on arguments # keywords and identifiers identifier = r"[_A-Za-z][._\-A-Za-z0-9]*" prefix = identifier keyword = '((' + prefix + '):)?(' + identifier + ')' # no group version of keyword keyword_ng = '(?:(' + prefix + '):)?(?:' + ...
gpl-2.0
2,142,903,817,177,840,400
41.588462
80
0.493362
false
bocaaust/FreshLife
django_project/fresh_life/fresh_life/wsgi.py
1
1431
""" WSGI config for fresh_life project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
apache-2.0
-5,162,366,673,369,774,000
43.71875
79
0.792453
false
Azure/azure-sdk-for-python
sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_endpoint_connections_operations.py
1
20474
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
945,774,547,791,755,900
51.904393
231
0.66245
false
ngokevin/zamboni
mkt/operators/tests/test_authorization.py
1
5750
from nose.tools import ok_ from rest_framework.generics import GenericAPIView from django.contrib.auth.models import AnonymousUser from amo.tests import TestCase from mkt.access.middleware import ACLMiddleware from mkt.carriers import CARRIER_MAP as CARRIERS from mkt.feed.constants import FEED_TYPE_SHELF from mkt.fee...
bsd-3-clause
-7,164,898,191,117,203,000
39.20979
79
0.652522
false