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
jind11/sentence-classification
code/util.py
1
16183
import json import os import time import cPickle import numpy as np import sys import re import operator import fnmatch from gensim.models.keyedvectors import KeyedVectors from tensorflow.contrib import learn from keras.preprocessing import sequence # construc embedding vectors based on the google word2vec and vocabul...
mit
949,150,617,451,764,600
33.213531
139
0.672496
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/app/builtins.py
1
12278
# -*- coding: utf-8 -*- """ celery.app.builtins ~~~~~~~~~~~~~~~~~~~ Built-in tasks that are always available in all app instances. E.g. chord, group and xmap. """ from __future__ import absolute_import from __future__ import with_statement from collections import deque from itertools import starmap ...
bsd-3-clause
-1,646,172,077,825,770,000
35.325444
79
0.558153
false
clarkperkins/click-shell
setup.py
1
1935
import io import os from setuptools import setup, find_packages def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) with io.open(os.path.join(here, rel_path), 'r') as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if line.start...
bsd-3-clause
2,017,556,178,663,941,400
28.769231
97
0.610853
false
xin1195/smartSearch
home/handler/webSocketHandler.py
1
1486
#!/usr/bin/env python3 # UserSocket接口,用于浏览器通信 import json import tornado.websocket from home.handler.xiaoTianHandler import xiao_tian_answer from setting import logger def send_to_one_user(user_client, message): user_client.write_message(json.dumps(message)) def send_to_many_user(user_clients, message): ...
apache-2.0
-2,113,201,457,961,597,400
25.925926
70
0.610729
false
sfelixjr/booklet
src/booklet_handler.py
1
1403
# Copyright 2014 - Samuel de Sousa (felixjr.org) # # 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
4,349,328,688,752,345,600
32.404762
74
0.743407
false
PLUS-POSTECH/study.plus.or.kr
src/problem/signals.py
1
1112
from django.db.models.signals import post_save from django.dispatch import receiver from integration.helpers import discord from .models import ProblemInstance, ProblemQuestion, ProblemAuthLog # pylint: disable=W0613 @receiver(post_save, sender=ProblemInstance) def on_register_problem_handler(sender, instance, **kwa...
apache-2.0
-2,252,245,296,482,034,700
34.870968
133
0.735612
false
avaris/aBibliophile
grouperproxy.py
1
11591
#!/usr/bin/env python # -.- coding: utf-8 -.- # Author : Deniz Turgut # Created : 09.02.2012 from collections import namedtuple from PyQt4 import QtGui, QtCore # each group item has a 'name' and a list of 'children' consisting # of each child's QPersistentModelIndex (pmi) groupItem = namedtuple('groupItem',['name', ...
gpl-3.0
-4,178,263,212,650,144,300
39.246528
100
0.588646
false
HEPData/hepdata
tests/pyyaml_test.py
1
1683
# -*- coding: utf-8 -*- # # This file is part of HEPData. # Copyright (C) 2021 CERN. # # HEPData 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...
gpl-2.0
-6,733,662,192,276,484,000
32.66
92
0.723708
false
lucperkins/heron
bazel_configure.py
1
14832
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Verifies required libraries and tools exist and are valid versions. # Is so creates scripts/compile/env_exec.sh containing environment used # by bazel when building. # # When changing this script, verify that it still works by running locally # on a mac. Then verify t...
apache-2.0
6,978,873,587,451,403,000
35.712871
116
0.526429
false
demisto/content
Tests/sdknightly/create_entities_for_nightly_sdk.py
1
5120
import argparse import json import os import shutil import subprocess from pathlib import Path from typing import Tuple def run_command(cmd: str) -> Tuple[str, str]: return subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8').communicate() def create_incident_field(pat...
mit
4,064,482,202,864,410,600
30.411043
120
0.631641
false
miniCruzer/postit-desktop
restclient.py
1
4123
import json import logging import os import requests from bs4 import BeautifulSoup from PyQt5.QtCore import QThread, pyqtSignal, QSettings from PyQt5.QtWidgets import QDialog, QMessageBox, QDialogButtonBox from ui.Ui_LoginDialog import Ui_LoginDialog def getLoginToken(address, email, password, timeout=15): """ a...
mit
4,215,635,340,765,329,400
27.047619
99
0.617512
false
Svjard/presto-admin
prestoadmin/util/constants.py
1
1424
# -*- 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
-661,595,847,563,454,200
31.363636
74
0.75
false
rthill/django-ldapdb
ldapdb/models/base.py
1
6199
# -*- coding: utf-8 -*- # # django-ldapdb # Copyright (c) 2009-2011, Bolloré telecom # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # ...
bsd-3-clause
675,032,290,876,975,000
36.786585
133
0.597386
false
facebook/redex
tools/python/symbolicator/symbol_files.py
1
2239
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import re import subprocess ###...
mit
7,663,031,275,686,946,000
33.446154
83
0.570344
false
sruizr/pysync_redmine
test/repositories/test_redmine.py
1
11220
import pytest from unittest.mock import Mock, patch from pysync_redmine.repositories.redmine import RedmineRepo from pysync_redmine.domain import ( Project, Task, Phase, Member, ...
mit
-1,539,851,799,964,469,500
31.903226
84
0.531462
false
cwurld/django-phonegap
django_phonegap/data_port/views.py
1
1032
__author__ = 'Chuck Martin' from django.views.generic.edit import CreateView from django.views.generic import ListView from rest_framework import generics from rest_framework import permissions from serializers import MessageSerializer from models import Message from forms import MessageForm class CreateMessage(Cr...
bsd-3-clause
2,202,635,197,737,025,800
24.8
71
0.722868
false
rafaels88/py2docx
py2docx/elements/image.py
1
5118
# coding: utf-8 import os from os.path import basename from PIL import Image as PILImage from py2docx.document import DOCUMENT_PATH from py2docx.util import Unit class Image(object): def __init__(self, image_path, document, align=None, width='100%', height='100%'): self.image = open(imag...
mit
-6,378,917,781,017,072,000
44.292035
145
0.388824
false
Upward-Spiral-Science/claritycontrol
code/scripts/roi_analysis.py
1
2744
#!/usr/bin/python #-*- coding:utf-8 -*- __author__ = 'david' from __builtin__ import * import gc import numpy as np from skimage.feature import greycomatrix, greycoprops import matplotlib as mpl mpl.use('TkAgg') # Solve runtime issue import matplotlib.pyplot as plt ## Fake imge and label volumes to fast test funct...
apache-2.0
-5,778,710,156,627,409,000
32.463415
129
0.672376
false
ernestyalumni/Propulsion
cantera_stuff/tut3.py
1
3166
## tut3.py ## tut3.m implemented in Python for cantera ## cf. http://www.cantera.org/docs/sphinx/html/matlab/tutorials/tut3.html ############################################################################ ## Copyleft 2016, Ernest Yeung <ernestyalumni@gmail.com> ## 20160125 ## ...
gpl-2.0
-2,860,081,278,530,264,600
41.783784
84
0.555591
false
valbertovc/django_semantic_ui
polls/admin.py
1
2085
from django.contrib import admin from django.utils.safestring import mark_safe from .models import Choice, Question from polls.forms import QuestionForm, ChoiceForm from core.utils import SemanticIcons from django.utils.translation import ugettext_lazy as _ class ChoiceAdmin(admin.ModelAdmin): model = Choice ...
mit
2,115,875,492,208,643,800
33.75
98
0.671463
false
mfcovington/djangocms-genome-browser
cms_genome_browser/models.py
1
12337
from django.db import models from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, RegexValidator from filer.fields.file import FilerFileField from filer.fields.image import FilerImageField class Browser(models.Model): class Meta: ordering = ['name'] ...
bsd-3-clause
-1,954,305,381,308,600,800
31.295812
143
0.550539
false
alephu5/Soundbyte
environment/lib/python3.3/site-packages/numpy/core/numeric.py
2
79518
from __future__ import division, absolute_import, print_function import sys import warnings import collections from . import multiarray from . import umath from .umath import * from . import numerictypes from .numerictypes import * if sys.version_info[0] >= 3: import pickle basestring = str else: import c...
gpl-3.0
-4,376,133,516,950,663,700
28.127473
90
0.571569
false
google-research/deeplab2
model/layers/axial_blocks_test.py
1
1959
# coding=utf-8 # Copyright 2021 The Deeplab2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
-500,197,564,487,542,700
35.277778
74
0.666156
false
kmiernik/Pyspectr
bin/spectrum_fitter.py
1
6663
#!/usr/bin/env python3 """ K. Miernik 2013 k.a.miernik@gmail.com GPL v3 Spectrum fitting code """ import argparse import math import numpy import os import sys import time import xml.etree.ElementTree as ET import matplotlib.pyplot as plt from lmfit import minimize, Parameters, report_errors from P...
gpl-3.0
-7,458,183,059,348,559,000
36.432584
80
0.47186
false
cchannon/WhatIsThis
ComputerVision.py
1
4492
from __future__ import print_function import time import picamera from datetime import datetime import requests import operator import numpy as np import json import urllib2 def processRequest( json, data, headers, params, lcd ): lcd.set_color(1.0, 1.0, 0.0) lcd.clear() lcd.message('Uploading...') ret...
mit
3,266,545,874,019,211,000
32.281481
116
0.586153
false
jucacrispim/toxicbuild
tests/webui/steps/build_steps.py
1
2858
# -*- coding: utf-8 -*- import time from behave import given, when, then from selenium.common.exceptions import StaleElementReferenceException from toxicbuild.ui import settings from tests.webui import take_screenshot from tests.webui.steps.base_steps import ( # noqa f811 given_logged_in_webui, then_sees_messag...
agpl-3.0
-5,854,433,497,256,047,000
23.016807
77
0.608118
false
IrregularShed/newoldtv
appleII.py
1
8885
#!/usr/bin/env python # -*- coding: utf-8 -*- # AppleII (Colour) Image Filter - Apple II plugin for The GIMP. # Copyright (C) 2008, 2010 Paulo Silva <nitrofurano@gmail.com> # Copyright (C) 2008 Daniel Carvalho # Copyright (C) 2010 Dave Jeffery <kecskebak.blog@gmail.com> # # This program is free software: ...
gpl-3.0
8,907,679,847,010,967,000
31.075812
85
0.48475
false
RicardoJohann/frappe
frappe/hooks.py
1
8537
from __future__ import unicode_literals from . import __version__ as app_version app_name = "frappe" app_title = "Frappe Framework" app_publisher = "Frappe Technologies" app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node" app_icon = "octicon octicon-circuit-board" app_color = "o...
mit
-6,504,451,987,586,173,000
36.279476
118
0.733162
false
praekelt/mc2
mc2/organizations/tests/base.py
1
2289
from django.test import TransactionTestCase from django.db.models import Q from django.test.client import RequestFactory from django.utils.text import slugify from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from mc2.organizations.models import Organization, Organ...
bsd-2-clause
-7,064,009,165,907,239,000
34.215385
76
0.591525
false
praekelt/diamondash
diamondash/widgets/histogram/tests/test_histogram.py
1
1032
from twisted.trial import unittest from diamondash import utils from diamondash.config import ConfigError from diamondash.widgets.histogram import HistogramWidgetConfig def mk_config_data(**overrides): return utils.add_dicts({ 'name': 'test-histogram', 'target': 'some.target', 'time_range...
bsd-3-clause
-7,736,860,265,764,022,000
30.272727
67
0.658915
false
beeftornado/sentry
src/sentry/migrations/0127_backfill_platformexternalissue_project_id.py
1
2415
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-11-10 00:02 from __future__ import unicode_literals from django.db import migrations import django.db.models.deletion import sentry.db.models.fields.foreignkey from sentry.models.platformexternalissue import PlatformExternalIssue from sentry.utils.query imp...
bsd-3-clause
973,593,084,817,502,600
42.125
99
0.719255
false
jeremiedecock/snippets
python/beautifulsoup/get_images_absolute_urls.py
1
2696
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) # 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 witho...
mit
2,120,359,385,086,357,000
36.416667
79
0.665924
false
xlk521/cloudguantou
oauth2/libs/multipart.py
1
1462
import codecs import mimetypes from uuid import uuid4 from io import BytesIO CRLF = '\r\n' writer = codecs.lookup('utf-8')[3] def guess_type(filename): return mimetypes.guess_type(filename)[0] or 'application/sctet-stream' def iter_fields(fields): if isinstance(fields, dict): fields = fields.iteritem...
bsd-3-clause
-2,128,613,986,496,722,200
30.106383
78
0.582079
false
lmazuel/azure-sdk-for-python
azure-mgmt-batchai/azure/mgmt/batchai/models/resource_id_py3.py
1
1054
# 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
8,363,730,131,767,143,000
29.114286
82
0.552182
false
linuxlewis/djorm-ext-pgfulltext
djorm_pgfulltext/models.py
1
13514
# -*- coding: utf-8 -*- from itertools import repeat import six from django.db import models, connections from django.db.models.query import QuerySet from django.utils.encoding import smart_text from djorm_pgfulltext.utils import adapt # Compatibility import and fixes section. try: from django.db.transaction im...
bsd-3-clause
-2,555,190,300,441,185,000
36.643454
117
0.60441
false
xjw1001001/IGCexpansion
IGCexpansion/Tree.py
1
20621
# A separate class to represent tree structure # Xiang Ji # xji3@ncsu.edu from operator import itemgetter from itertools import groupby from Bio import Phylo import networkx as nx import os, sys import numpy as np from copy import deepcopy from Common import * class Tree: def __init__(self, tree_newick, DupLosList...
gpl-3.0
-8,281,849,418,154,845,000
43.156317
168
0.593376
false
MostlyOpen/odoo_addons
myo_animal/models/address.py
1
2969
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
agpl-3.0
2,762,671,541,979,413,500
38.586667
112
0.634557
false
malramsay64/MD-Molecules-Hoomd
test/dynamics_test.py
1
8955
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Malcolm Ramsay <malramsay64@gmail.com> # # Distributed under terms of the MIT license. """Testing the dynamics module.""" import numpy as np import quaternion from hypothesis import HealthCheck, assume, given, settings from hypothesi...
mit
-6,883,469,322,326,091,000
37.102128
93
0.669868
false
gpocentek/python-gitlab
gitlab/v4/objects/jobs.py
1
7109
from gitlab import cli, utils from gitlab import exceptions as exc from gitlab.base import RESTManager, RESTObject from gitlab.mixins import RefreshMixin, RetrieveMixin __all__ = [ "ProjectJob", "ProjectJobManager", ] class ProjectJob(RefreshMixin, RESTObject): @cli.register_custom_action("ProjectJob") ...
lgpl-3.0
-6,403,611,239,332,208,000
36.415789
85
0.617949
false
jpurma/Kataja
kataja/syntax/BaseFeature.py
1
7442
# coding=utf-8 """ ConfigurableFeature aims to be general implementation for a (syntactic) Feature """ # ############################################################################ # # *** Kataja - Biolinguistic Visualization tool *** # # Copyright 2013 Jukka Purma # # This file is part of Kataja. # # Kataja is free s...
gpl-3.0
-1,221,267,077,624,129,500
35.253659
100
0.585441
false
facebookexperimental/eden
eden/integration/lib/edenclient.py
1
23827
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. import json import logging import os import pathlib import shlex import shutil import signal import subprocess import sys import ...
gpl-2.0
-8,283,212,565,230,958,000
32.990014
104
0.578713
false
Vierkantor/RSwail
rswail/ast.py
1
4421
from rswail.bytecode import Instruction from rswail.closure import Closure from rswail.cons_list import cons_list, from_list, to_list from rswail.struct import Struct, StructInstance, construct from rswail.value import Integer, String, Value statement = Struct(u"statement", { u"declaration": [u"header", u"name", u"ar...
gpl-3.0
-4,315,598,364,805,932,500
36.466102
83
0.733092
false
springload/madewithwagtail
core/snippets.py
1
4962
from django.db import models from django.utils.encoding import python_2_unicode_compatible from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel from wagtail.wagtailadmin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel from wagtail.wagtailcore.mode...
mit
5,090,397,503,307,461,000
27.033898
105
0.615881
false
42cc/p2psafety
p2psafety_django/events/tests/test_views.py
1
6230
import mock from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from tastypie.test import ResourceTestCase from .helpers.mixins import UsersMixin from .helpers.factories import EventFactory from ..models import Event, EventUpdate from .. import ja...
apache-2.0
-4,318,638,684,456,884,000
35.011561
81
0.653933
false
munin/munin
munin/mod/raw.py
1
1806
""" Loadable subclass """ # This file is part of Munin. # Munin 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. # Munin is distribut...
gpl-2.0
4,926,598,926,973,294,000
31.25
79
0.67165
false
erp12/pyshgp
pyshgp/gp/evaluation.py
1
7737
"""The :mod:`evaluation` module defines classes to evaluate program CodeBlocks.""" from abc import ABC, abstractmethod from typing import Sequence, Union, Callable from collections import defaultdict import numpy as np import pandas as pd from pyshgp.push.interpreter import PushInterpreter, Program from pyshgp.tap imp...
mit
-1,309,455,749,332,372,500
31.783898
90
0.575158
false
mypopydev/bluez
client/bt601.py
1
2013
# Using bt601 with Python import pexpect import time import socket import sys import os import syslog UNIX_SER="/tmp/ud_bluetooth_main" # function to transform hex string like "0a" into signed integer def hexStrToInt(hexstr): val = int(hexstr[0:2],16) val = (val * 6.0 - 20)/100.0 return val def sendMessa...
gpl-2.0
7,865,876,888,992,136,000
27.757143
100
0.641331
false
FrodeSolheim/fs-uae-launcher
amitools/fs/block/FileHeaderBlock.py
1
3464
import time from .Block import Block from .EntryBlock import EntryBlock from .CommentBlock import CommentBlock from ..ProtectFlags import ProtectFlags from ..TimeStamp import * from ..FSString import FSString class FileHeaderBlock(EntryBlock): def __init__(self, blkdev, blk_num, is_longname): EntryBlock.__ini...
gpl-2.0
4,448,644,119,338,782,700
28.364407
122
0.618649
false
timsavage/denim
denim/scaffold/__init__.py
1
1859
# -*- encoding:utf8 -*- try: from jinja2 import Environment, PackageLoader except ImportError: raise ImportError('Scaffolding support requires the Jinja 2 templating library to be installed.') template_environment = Environment(loader=PackageLoader('denim.scaffold')) def single(template_file, output_name, co...
bsd-2-clause
-3,425,635,520,187,386,400
26.338235
101
0.629909
false
JanTkacik/nao-puzzle-solver
nao-module.py
1
2502
import sys from naoqi import ALProxy # To get the constants relative to the video. import vision_definitions import cv2 import numpy as np import imageresolve.puzzlesolver.solver as slv import imageextractor.imageextractor as ext import imageresolve.puzzlesolver.model.puzzle as pzl import imageresolve.puzzlesolver.mod...
mit
-8,515,521,001,751,319,000
31.921053
95
0.605116
false
Ayase-252/waife-crawler
crawler/yandere/yandere.py
1
4275
""" Yandere Crawler """ from requests import ConnectTimeout, get from file_logger.file_logger import FileLogger from crawler.crawler import Crawler from crawler.selector import Selector from request.request_async import AsyncRequestScheduler from crawler.yandere.handler import QueryPageHandler from crawler.yandere.par...
mit
-1,782,669,152,618,254,800
33.756098
75
0.550175
false
Ichimonji10/robottelo
robottelo/ui/hosts.py
1
8600
"""Utilities to manipulate hosts via UI.""" from robottelo.ui.base import Base from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class Hosts(Base): """Provides the CRUD functionality for Host.""" def _configure_hosts_parameters(self, parame...
gpl-3.0
-1,339,462,011,166,588,000
42.654822
79
0.587674
false
bit0001/chumme
database_manager/util.py
1
2568
import os from sqlite3 import IntegrityError from .friend_interest_manager import FriendInterestManager from .friend_manager import FriendManager from .friend_social_network_manager import FriendSocialNetworkManager from .interest_manager import InterestManager from .profile_photo_manager import ProfilePhotoManager fr...
apache-2.0
-3,149,871,718,848,437,000
30.317073
70
0.662773
false
snbway/flask-rest-framework
rest_framework_flask/versioning.py
1
1485
# encoding: utf-8 from . import api_setting import exceptions class BaseVersioning(object): default_version = api_setting.DEFAULT_VERSION allowed_versions = api_setting.ALLOWED_VERSION version_param = api_setting.VERSION_PARAM def determine_version(self, request, *args, **kwargs): msg = '{cls...
apache-2.0
-8,468,332,575,219,012,000
34.357143
92
0.663973
false
sergiocorreia/panflute-filters
setup.py
1
4210
"""Filters for panflute See: https://github.com/sergiocorreia/panflute https://github.com/sergiocorreia/panflute-filters """ from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description f...
bsd-3-clause
6,421,271,382,656,776,000
34.386555
94
0.657007
false
ConstantinT/jAEk
crawler/crawler.py
1
58230
''' Copyright (C) 2015 Constantin Tschuertz 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 any later version. This program is distributed in the hope that it wil...
gpl-3.0
-2,113,222,505,680,327,400
59.910042
183
0.560124
false
eviljeff/olympia
src/olympia/shelves/forms.py
1
2006
import requests from rest_framework.reverse import reverse as drf_reverse from django import forms from django.conf import settings from django.urls import NoReverseMatch from olympia.shelves.models import Shelf class ShelfForm(forms.ModelForm): class Meta: model = Shelf fields = ('title', 'end...
bsd-3-clause
-3,409,508,105,795,122,700
32.433333
77
0.548355
false
bastibl/gnuradio
gr-fec/python/fec/bercurve_generator.py
1
3627
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
8,351,089,192,773,113,000
34.213592
112
0.639096
false
dvannoy/baxter
setup.py
1
1233
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # requirements = None # with open('requirements.txt', 'r') as f: # requirements = [ # ...
apache-2.0
-6,166,464,703,021,763,000
29.825
85
0.505272
false
intel-analytics/analytics-zoo
pyzoo/zoo/orca/learn/tf2/tf_runner.py
1
19091
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
589,034,591,972,608,000
38.690229
100
0.577812
false
roebel/py_find_1st
setup.py
1
6624
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from setuptools import setup #from distutils.core import setup from distutils.extension import Extension from distutils.command.build_ext import build_ext from distutils.command.sdist import sdist import hashlib import io from pkg_r...
gpl-3.0
6,156,561,315,358,962,000
36.168539
136
0.5987
false
aitormf/JdeRobot
src/tools/3DVizWeb/test/jderobot/pose3dmotors_ice.py
1
19332
# -*- coding: utf-8 -*- # ********************************************************************** # # Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************...
gpl-3.0
-2,707,966,393,643,148,300
37.50996
240
0.626371
false
basimkhajwal/RaspberryPi
utils/ReadResistance.py
1
3314
import RPi.GPIO as GPIO, time, os #Constants NUM_TESTS = 3 NUM_TESTS_PER_VALUE = 5 def readResistance(RCpin): ''' Read the resistance with the pin stated in the input, returns an integer with the number of clock cycles passed ''' #Discharge the pins and capacitor GPIO.setup(RCpin...
mit
-3,765,451,516,040,908,300
29.685185
174
0.538624
false
zinic/netbox_api
netbox_api/model/rack.py
1
3137
from netbox_api.model.common import CustomFields from enum import Enum class RackWidthConstant(Enum): WIDTH_19_INCHES = 19 WIDTH_23_INCHES = 23 class RackTypeConstant(Enum): FRAME_2_POST = 100 FRAME_4_POST = 200 CABINET_4_POST = 300 FRAME_WALL_MOUNTED = 1000 CABINET_WALL_MOUNTED = 1100 ...
mit
2,123,164,056,186,972,000
23.507813
112
0.586548
false
linuxmuster/linuxmuster-base7
share/firewall/opnsense/create-keytab.py
1
2968
#!/usr/bin/python3 # # create web proxy sso keytab # thomas@linuxmuster.net # 20200311 # import constants import getopt import os import sys from functions import datetime from functions import firewallApi from functions import getSetupValue from functions import printScript from functions import readTextfile # ch...
gpl-3.0
-4,581,221,292,962,990,000
25.738739
95
0.632075
false
taolei87/rcnn
code/rationale/rationale.py
1
24504
import os, sys, gzip import time import math import json import cPickle as pickle import numpy as np import theano import theano.tensor as T from theano.sandbox.rng_mrg import MRG_RandomStreams from nn import create_optimization_updates, get_activation_by_name, sigmoid, linear from nn import EmbeddingLayer, Layer, L...
apache-2.0
-6,567,655,606,038,944,000
35.959276
98
0.461843
false
UoK-Psychology/rmas-oe-adapter
rmas_oe_adapter/settings.py
1
2184
''' This is the main settings module for your adapter. It will be imported and available to your adapter package::: from rmas_adapter.conf import settings poll_interval = settings.POLL_INTERVAL You will need to have some code somehwere (usually in your runner.py) that sets ...
mit
-5,019,034,746,536,723,000
38.017857
127
0.712912
false
kannon92/psi4
psi4/driver/util/filesystem.py
1
1284
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2016 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
gpl-2.0
7,767,472,610,928,574,000
28.860465
73
0.720405
false
calatre/epidemics_network
treat/excel_clipper.py
1
1352
# Universidade de Aveiro - Physics Department # 2016/2017 Project - Andre Calatre, 73207 # "Simulation of an epidemic" - 28/6/2017 # Selecting Data from an excel file to another #import numpy as np import pandas as pd from openpyxl import load_workbook #r = [0, 301, 302, 303, 304, 305, 306] #desired = ['S_Avg', 'I_Av...
apache-2.0
6,151,415,062,032,155,000
39.969697
70
0.54068
false
d9pouces/StarterPyth
starterpyth/cliforms.py
1
8391
#coding=utf-8 import os import re from six import PY2 from starterpyth.log import display, RED from starterpyth.translation import ugettext as _ __author__ = 'flanker' # noinspection PyUnresolvedReferences input_ = raw_input if PY2 else input class InvalidValue(ValueError): def __init__(self, msg): ...
gpl-2.0
341,928,209,486,795,200
33.677686
116
0.563223
false
develersrl/rooms
editor/roomeditor.py
1
10771
#!/usr/bin/env python import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from structdata import g_project from structdata import Area from structdata import Event from utils import g_ptransform import os from arearesize import AreaResize class EditorButton(QToolButton): """ classe base per i...
mit
5,918,950,865,908,647,000
35.265993
85
0.593074
false
sassoftware/conary
conary/repository/shimclient.py
1
10116
# # Copyright (c) SAS Institute 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 w...
apache-2.0
-142,238,687,992,929,890
38.98419
85
0.584618
false
againer/supercda
clinics/models.py
1
3815
""" 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 distributed under the Li...
apache-2.0
896,341,156,927,606,900
32.761062
75
0.640891
false
bobbyrward/fr0st
scripts/random_flame.py
1
1374
from fr0stlib.functions import randrange2 from fr0stlib import Flame, Xform def GenRandomBatch(numrand,*a, **k): lst = [] if len(a)==0: raise ValueError, "number of xform config specs must be > 0" if 'numbasic' in k and k['numbasic']>0 and len(a)>1: print "more than one xform config ...
gpl-3.0
-4,427,127,534,052,115,000
24.444444
94
0.525473
false
ugoertz/igelgrafik
resources/pygments-patch/javascript.py
1
47743
# -*- coding: utf-8 -*- """ pygments.lexers.javascript ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for JavaScript and related languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, ...
bsd-3-clause
440,068,771,751,930,940
38.741667
93
0.450052
false
JohnGriffiths/LabNotebook
site_source/pelicanconf.py
1
3500
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os AUTHOR = u'John D. Griffiths' SITENAME = u"JDG Lab Notebook" SITEURL = 'https://johngriffiths.github.io/LabNotebook' #SITESUBTITLE = u'Open Notebook Science.' TIMEZONE = 'US/Pacific' DEFAULT_LANG = u'en' # Feed genera...
gpl-2.0
3,857,400,785,375,380,500
27.688525
101
0.675143
false
navinpai/LMTAS
server/app.py
1
9818
from werkzeug.utils import secure_filename from flask import Flask, request, render_template import cognitive_face as CF import pymysql.cursors from PIL import Image import requests import string import random import json import os import pyfcm from pyfcm import FCMNotification import kairos_face import constants app ...
mit
-6,674,061,538,280,654,000
38.119522
163
0.600733
false
wesleybowman/karsten
project/rawADCPclass.py
1
4107
from __future__ import division import numpy as np import sys sys.path.append('/home/wesley/github/UTide/') from utide import ut_solv, ut_reconstr #from shortest_element_path import shortest_element_path #import matplotlib.pyplot as plt #import matplotlib.tri as Tri #import matplotlib.ticker as ticker #import seaborn i...
mit
7,166,734,428,525,729,000
31.338583
84
0.612126
false
giometti/beaglebone_home_automation_blueprints
chapter_04/wfrog/bbb_habp.py
1
3558
## Copyright 2010 Rodolfo Giometti <giometti@hce-engineering.com> ## derived from ws23xx by Laurent Bovet ## ## This file is part of wfrog ## ## wfrog 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
4,234,070,682,089,319,000
30.210526
75
0.513491
false
openstack/rally
rally/cli/commands/task.py
1
37125
# Copyright 2013: Mirantis 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
-3,849,538,224,684,864,500
43.301909
79
0.522478
false
qbuat/rootpy
rootpy/stats/tests/test_plottable.py
1
2365
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from nose.plugins.skip import SkipTest from rootpy.utils.silence import silence_sout try: with silence_sout(): import ROOT from ROOT import (RooFit, RooRealVar, RooGaussian, RooArgusBG, ...
gpl-3.0
-3,899,456,638,177,250,000
33.779412
77
0.640169
false
rackerlabs/marconi
marconi/queues/transport/wsgi/v1_0/__init__.py
1
2932
# Copyright (c) 2013 Rackspace, 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 w...
apache-2.0
-5,074,667,331,260,138,000
35.65
79
0.620737
false
mrkurt/proxy-mixer
proxyjs/javascript.py
1
2093
import re import os import spidermonkey class Extractor: __mixer_js_lib = open(os.path.dirname(__file__) + '/../javascript/mixer.js', 'r').read() __js_block = re.compile(r"(<script.+?runat=\"proxy\".*?>)(.*?)(</script>)", re.S) __script_start = re.compile(r"<script.+?runat=\"proxy\".*?>") __script_src = re.compile...
mit
255,322,132,879,189,540
25.846154
89
0.609651
false
trosa/forca
gluon/contrib/memdb.py
1
28147
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of web2py Web Framework (Copyrighted, 2007-2009). Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu> and Robin B <robi123@gmail.com>. License: GPL v2 """ __all__ = ['MEMDB', 'Field'] import re import sys import os import types import datetime ...
gpl-2.0
-1,616,034,788,288,685,800
30.033076
594
0.5251
false
JianGoForIt/YellowFin_Pytorch
word_language_model/model.py
1
2562
import torch.nn as nn from torch.autograd import Variable class RNNModel(nn.Module): """Container module with an encoder, a recurrent module, and a decoder.""" def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False): super(RNNModel, self).__init__() self.drop ...
apache-2.0
393,465,775,236,503,040
42.423729
110
0.599922
false
couwbat/couwbatns3
ns-allinone-3.23/bake/bake/ModuleBuild.py
1
33519
############################################################################### # Copyright (c) 2013 INRIA # # This program 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; # # This program is distr...
gpl-2.0
606,902,162,483,470,800
39.142515
129
0.535965
false
talkincode/toughlib
toughlib/utils.py
1
10450
#!/usr/bin/env python #coding:utf-8 import decimal import datetime from Crypto.Cipher import AES from Crypto import Random import hashlib import binascii import hashlib import base64 import calendar import random import os import time import uuid import json import functools import logging import urlparse random_gener...
mit
374,508,963,388,416,800
25.984456
103
0.587462
false
F5Networks/f5-common-python
f5/bigip/tm/sys/ntp.py
1
2225
# coding=utf-8 # # Copyright 2016 F5 Networks 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 ...
apache-2.0
849,571,690,387,145,700
31.188406
76
0.659163
false
luboslenco/lowpolyfactory
populate.py
1
2844
import bpy import bmesh from random import seed, uniform import math import mathutils from mathutils import * from add_mesh_LowPolyFactory import LowPolyFactory from add_mesh_LowPolyFactory.createRockObject import * from add_mesh_LowPolyFactory.createTreeObject import * from add_mesh_LowPolyFactory.createBushObject imp...
gpl-2.0
7,375,870,862,560,782,000
29.913043
70
0.65225
false
maas/maas
src/maasserver/migrations/maasserver/0008_use_new_arrayfield.py
1
2693
# -*- coding: utf-8 -*- import django.contrib.postgres.fields from django.db import migrations, models import maasserver.fields class Migration(migrations.Migration): dependencies = [("maasserver", "0007_create_node_proxy_models")] operations = [ migrations.AlterField( model_name="bloc...
agpl-3.0
-2,146,013,334,715,708,400
28.593407
68
0.47642
false
benkirk/mpi_playground
mpi4py/tests/test_file.py
2
6343
from mpi4py import MPI import mpiunittest as unittest import sys, os, tempfile class BaseTestFile(object): COMM = MPI.COMM_NULL FILE = MPI.FILE_NULL prefix = 'mpi4py' def setUp(self): fd, self.fname = tempfile.mkstemp(prefix=self.prefix) os.close(fd) self.amode = MPI.MODE_RD...
gpl-3.0
-5,663,708,502,370,594,000
31.362245
73
0.575122
false
lukacu/foldersync
foldersync/storage/ssh.py
1
3894
# -*- Mode: python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- """ Friendly Python SSH2 interface. Copied from http://media.commandline.org.uk//code/ssh.txt Modified by James Yoneda to include command-line arguments. """ import getopt import os import time import paramiko import sys import tempfile f...
gpl-3.0
-3,656,374,407,454,393,300
27.423358
78
0.628403
false
bitonic/troppotardi
troppotardi/config/routing.py
1
1701
"""Routes configuration The more specific and detailed routes should be defined first so they may take precedent over the more generic routes. For more information refer to the routes manual at http://routes.groovie.org/docs/ """ from routes import Mapper def make_map(config): """Create, configure and return the ...
gpl-2.0
-996,590,310,799,494,400
42.615385
89
0.670194
false
uclouvain/OSIS-Louvain
base/migrations/0046_scoresencoding.py
1
1993
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-05-02 15:06 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0045_update_justification_values'), ] operations = [ migrations.RunSQL( ...
agpl-3.0
1,676,644,467,102,433,000
38.078431
172
0.644757
false
npp/npp-api
data/migrations/0029_auto__del_field_usaspendingassistanceraw_cfda_program__add_field_usasp.py
1
162121
# -*- 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): # Deleting field 'UsaspendingAssistanceRaw.cfda_program' db.delete_column('data_usaspendingassistanceraw', '...
mit
735,446,432,755,450,200
79.738048
158
0.548886
false
amlyj/pythonStudy
2.7/monitor/rrdtools/createrrds.py
1
3160
# -*- coding: utf-8 -*- # !/usr/bin/python import os import rrdtool import threading import time import fetchrrd import updaterrd rrd_db_base_path = os.path.dirname( os.path.dirname(os.path.dirname(__file__))) + '/render/static/rrd/' task_dick = {} ipaddr_list = [] bools = True def create_rrd(ip): if ip == ...
mit
403,738,827,919,875,300
26.241379
73
0.531329
false
jreese/seinfeld
views/main.py
1
1344
# Copyright 2014 John Reese # Licensed under the MIT license from flask import abort from jinja2.filters import do_capitalize from core import app, context, get, template from models import Quote, Passage @get('/', 'Seinfeld Quote') @template('index.html') def index(): #passage = Passage(uid=37592) passage ...
mit
-254,260,297,995,363,300
22.578947
62
0.633185
false
RyanSkraba/beam
sdks/python/apache_beam/runners/interactive/display/pipeline_graph_renderer.py
1
3987
# # 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 us...
apache-2.0
-1,365,545,391,829,221,000
26.881119
103
0.702533
false
franklingu/leetcode-solutions
questions/utf-8-validation/Solution.py
1
2536
""" A character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules: For 1-byte character, the first bit is a 0, followed by its unicode code. For n-bytes character, the first n-bits are all one's, the n+1 bit is 0, followed by n-1 bytes with most significant 2 bits being 10. This is how the UTF-...
mit
-9,106,393,001,833,455,000
31.230769
167
0.575315
false
runt18/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/colors.py
1
31702
""" A module for converting numbers or color arguments to *RGB* or *RGBA* *RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the range 0-1. This module includes functions and classes for color specification conversions, and for mapping numbers to colors in a 1-D array of colors called a colormap. Color...
agpl-3.0
257,668,737,263,501,540
35.065984
95
0.518106
false