code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/python # compare two csv files and print the result using zenity. import csv import subprocess with open('test1.csv', 'rb') as csvfile1: with open ("test2.csv", "rb") as csvfile2: reader1 = csv.reader(csvfile1) reader2 = csv.reader(csvfile2) rows1_col_a = [row for row in reader1] rows2 = [row for ...
codedbymex/python_scripts
csv/compare_two_csv_files.py
Python
mit
504
# Under MIT licence, see LICENCE.txt import math import numpy as np from RULEngine.Game.OurPlayer import OurPlayer from RULEngine.Util.Pose import Pose from RULEngine.Util.Position import Position from RULEngine.Util.geometry import get_angle from RULEngine.Util.constant import TeamColor from ai.states.game_state impo...
MaximeGLegault/StrategyIA
ai/STA/Action/GoBehind.py
Python
mit
6,164
import urllib from zerver.lib.test_classes import WebhookTestCase class LibratoHookTests(WebhookTestCase): STREAM_NAME = "librato" URL_TEMPLATE = "/api/v1/external/librato?api_key={api_key}&stream={stream}" WEBHOOK_DIR_NAME = "librato" IS_ATTACHMENT = False def get_body(self, fixture_name: str) ...
andersk/zulip
zerver/webhooks/librato/tests.py
Python
apache-2.0
3,874
start = ''' Mark Lutz - Learning Python 5th edition \tChapter 10, page 333 ''' doc = ''' Enter digits to power them Enter \'stop\' to stop the programm ''' print(start, doc) while True: reply = input('Enter text:') if reply == 'stop': break try: num = int(reply) except: print('\'', reply, "\' is not digit")...
SonyStone/pylib
python base/interact with try.py
Python
mit
358
import inspect import warnings from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.utils.deprecation import RemovedInDjango31Warning UserModel = get_user_model() class ModelBackend: """ Authenticates against settings.AUTH_USER_MODEL. """ def ...
sametmax/Django--an-app-at-a-time
ignore_this_directory/django/contrib/auth/backends.py
Python
mit
7,119
#from math import floor from _game_constants import * from _buildings import * GOVERMENT_FEUDAL = 0 GOVERMENT_DICTATORSHIP = 2 GOVERMENT_DEMOCRACY = 4 GOVERMENT_UNIFICATION = 6 TERRAIN_TOXIC = 0 TERRAIN_RADIATED = 1 TERRAIN_BARED = 2 TERRAIN_DESERT = 3 TERRAIN_TUNDRA = 4 TERRAIN_OCEAN = 5 TERRAIN_SWAMP = 6 ...
mimi1vx/openmoo2
oldmess/formulas.py
Python
gpl-2.0
1,783
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/cr/crvserver_crpolicy_binding.py
Python
apache-2.0
7,634
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo 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 v...
tiborsimko/zenodo
zenodo/modules/fixtures/communities.py
Python
gpl-2.0
1,710
from django.contrib import admin from parliament.core.models import * class PoliticianInfoInline(admin.TabularInline): model = PoliticianInfo class PoliticianOptions (admin.ModelAdmin): inlines = [PoliticianInfoInline] search_fields = ('name',) class RidingOptions (admin.ModelAdmin): list_displa...
twhyte/openparliament
parliament/core/admin.py
Python
agpl-3.0
2,026
"""File utilities""" # Copyright (c) 2018 Aubrey Barnard. This is free software released # under the MIT License. See `LICENSE.txt` for details. import collections import csv import io import os import pathlib import re from barnapy import parse from . import records class Fingerprint: @staticmethod d...
afbarnard/fitamord
fitamord/file.py
Python
mit
14,426
import skinsubtitlekodi as kodi from skinsubtitlesetting import Setting from skinsubtitlelanguage import LanguageHelper class Language: def __init__(self): self.languagehelper = LanguageHelper() self.__set_searchlanguages() if(self.searchlanguages.count > 0): for slang in self.s...
jurgenheine/script.skinsubtitlechecker
lib/language.py
Python
gpl-2.0
2,731
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) # # This program is free software: you can redistribute it and/or ...
syci/domsense-agilebg-addons
account_followup_choose_payment/__init__.py
Python
gpl-2.0
1,092
"""Provides device actions for lights.""" from typing import List import voluptuous as vol from homeassistant.components.device_automation import toggle_entity from homeassistant.components.light import ( ATTR_FLASH, FLASH_SHORT, SUPPORT_FLASH, VALID_BRIGHTNESS_PCT, VALID_FLASH, ) from homeassista...
tchellomello/home-assistant
homeassistant/components/light/device_action.py
Python
apache-2.0
4,952
from __future__ import division from pyomo.environ import * model = AbstractModel() #sets model.I = Set() #mercados model.J = Set() #plantas #parametros model.D = Param(model.I) model.P = Param(model.J) model.A = Param(model.J, model.I) model.f = Param() #variables model.x = Var(model.J, model.I, domain=NonNegative...
Planelles20/pyomo
LinearProgramming/USATransport/USATransport.py
Python
bsd-3-clause
743
from copy import deepcopy from .model import MassRegressionModel from .utils import toseries class MassRegressionAlgorithm: """ Base class for mass univariate algorithms """ def __init__(self): raise NotImplementedError def fit(self, X, y): """ Fit a mass univariate reg...
thunder-project/thunder-regression
regression/algorithms.py
Python
mit
3,458
from .state import State, View from .crypto import LocalParams, PublicParams
gdanezis/claimchain-core
claimchain/__init__.py
Python
mit
77
# -*- coding: utf-8 -*- from openprocurement.api.utils import raise_operation_error, error_handler from openprocurement.tender.belowthreshold.views.award_document import TenderAwardDocumentResource from openprocurement.tender.core.utils import optendersresource @optendersresource(name='aboveThresholdUA:Tender Award D...
openprocurement/openprocurement.tender.openua
openprocurement/tender/openua/views/award_document.py
Python
apache-2.0
2,070
""" # 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...
OBIGOGIT/etch
binding-python/runtime/src/main/python/etch/binding/support/__init__.py
Python
apache-2.0
2,531
"""Tests for the Spotify config flow.""" from unittest.mock import patch from spotipy import SpotifyException from homeassistant import data_entry_flow, setup from homeassistant.components.spotify.const import DOMAIN from homeassistant.config_entries import SOURCE_REAUTH, SOURCE_USER, SOURCE_ZEROCONF from homeassista...
lukas-hetzenecker/home-assistant
tests/components/spotify/test_config_flow.py
Python
apache-2.0
9,520
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry def fix(data): # There was a point in time where full Team objects # got serialized into our AuditLogEntry.data, so these # values need to be strip...
looker/sentry
src/sentry/api/serializers/models/auditlogentry.py
Python
bsd-3-clause
1,763
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-08-27 12:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Grundgeruest', '0004_auto_20170729_1524'), ] operations = [ migrations.Alte...
wmles/olymp
Grundgeruest/migrations/0005_auto_20170827_1228.py
Python
mit
547
""" .. module:: place_gid_redirect The **Place Gid Redirect** Model. PostgreSQL Definition --------------------- The :code:`place_gid_redirect` table is defined in the MusicBrainz Server as: .. code-block:: sql CREATE TABLE place_gid_redirect ( -- replicate (verbose) gid UUID NOT NULL, ...
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/place_gid_redirect.py
Python
gpl-2.0
1,058
# -*- coding: utf-8 -*- """ Created on 26 Sep 2012 @author: Éric Piel Copyright © 2012-2015 Éric Piel, Delmic This file is part of Odemis. Odemis 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. Odem...
gstiebler/odemis
src/odemis/gui/cont/streams.py
Python
gpl-2.0
99,511
# Copyright 2019 The TensorFlow 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 applica...
cxxgtxy/tensorflow
tensorflow/python/keras/saving/saved_model/layer_serialization.py
Python
apache-2.0
7,063
from sqlalchemy import create_engine, Table, Column, Integer, String, MetaData, ForeignKey, Boolean from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.orm import sessionmaker, relationship, backref, scoped_session from sqlalchemy import ...
lionicsheriff/tagi
tagi/data.py
Python
mit
6,536
# Copyright (C) 2011 Equinor ASA, Norway. # # The file 'job.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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...
Statoil/libres
python/res/job_queue/job.py
Python
gpl-3.0
2,441
# -*- coding: utf-8 -*- import logging import random import re from streamlink.plugin import Plugin, PluginArguments, PluginArgument from streamlink.plugin.api import useragents, validate from streamlink.stream import HLSStream log = logging.getLogger(__name__) class SBScokr(Plugin): api_channel = 'http://apis...
wlerin/streamlink
src/streamlink/plugins/sbscokr.py
Python
bsd-2-clause
3,690
import numpy as np import matplotlib.pyplot as plt plt.ion() lic250 = np.load('./lic250.npy') lic350 = np.load('./lic350.npy') lic500 = np.load('./lic500.npy') f, (ax1, ax2, ax3) = plt.subplots(1, 3, sharey=True, dpi = 100) ax1.imshow(lic250, cmap = "inferno", interpolation = "gaussian") ax2.imshow(lic350, cmap = "Gr...
sbg2133/miscellaneous_projects
carina/lic_comp.py
Python
gpl-3.0
438
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-29 16:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0036_auto_20171115_0608'), ] operations = [ migrations.AlterModelOptions...
UITools/saleor
saleor/product/migrations/0037_auto_20171129_1004.py
Python
bsd-3-clause
1,482
# coding: utf-8 from __future__ import unicode_literals import re import os.path from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( url_basename, remove_start, ) class DemocracynowIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?democracynow.org/(?P<id>[^\?]...
akirk/youtube-dl
youtube_dl/extractor/democracynow.py
Python
unlicense
3,247
# Copyright 2012 OpenStack Foundation # 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 requ...
vmahuli/tempest
tempest/exceptions.py
Python
apache-2.0
6,204
# # Hubblemon - Yet another general purpose system monitor # # Copyright 2015 NAVER Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
naver/hubblemon
redis_mon/redis_view.py
Python
apache-2.0
2,771
# Reserved keys used to handle ClassMethodNode in Ray DAG building. PARENT_CLASS_NODE_KEY = "parent_class_node" PREV_CLASS_METHOD_CALL_KEY = "prev_class_method_call" # Reserved key to distinguish DAGNode type and avoid collision with user dict. DAGNODE_TYPE_KEY = "__dag_node_type__"
ray-project/ray
python/ray/experimental/dag/constants.py
Python
apache-2.0
285
def red(user, args): queueEvent = { 'eventType' : 'electrical', } if len(args) == 0: queueEvent['event'] = "red toggle" queueEvent['msg'] = "Toggling the red light for %s" % user elif args[0].lower() == "on" or args[0] == "1": queueEvent['event'] = "red on" ...
Amperture/twitch-sbc-integration
twitchchatbot/lib/commands/red.py
Python
mit
692
""" Django settings for edc_sms project. Generated by 'django-admin startproject' using Django 3.0.6. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os i...
botswana-harvard/edc-sms
edc_sms/settings.py
Python
gpl-2.0
4,211
# Copyright (C)2016 D. Plaindoux. # # This program 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, or (at your option) any # later version. import unittest from fluent_rest.spec.rest ...
d-plaindoux/fluent-rest
tests/inspection_test.py
Python
lgpl-2.1
3,793
import tp def thing_init(t): return def player_init(name, short_name, tiles=[]): x = tp.Tp(name, is_player = True) x.set_short_name(short_name) x.set_is_movement_blocking(True) x.set_is_animated(True) x.set_is_movable(True) x.set_is_animated_walk_flip(True) delay = 10 for t in...
goblinhack/goblinhack2
python/things/player.py
Python
lgpl-3.0
547
from random import random from bokeh.layouts import row from bokeh.models import CustomJS, ColumnDataSource from bokeh.plotting import figure, output_file, show output_file("callback.html") x = [random() for x in range(500)] y = [random() for y in range(500)] s1 = ColumnDataSource(data=dict(x=x, y=y)) p1 = figure(p...
schoolie/bokeh
sphinx/source/docs/user_guide/examples/interaction_callbacks_for_selections.py
Python
bsd-3-clause
1,058
# Heads Up Texas Hold'em Challenge bot # Based on the Heads Up Omaha Challange - Starter Bot by Jackie <jackie@starapple.nl> # Last update: 22 May, 2014 # @author Chris Parlette <cparlette@gmail.com> # @version 1.0 # @license MIT License (http://opensource.org/licenses/MIT) class Pocket(object): ''' ...
brhoades/holdem-bot
poker/poker.py
Python
mit
2,684
import pandas as pd import numpy as np import matplotlib import matplotlib.pyplot as plt matplotlib.style.use('ggplot') # Look Pretty def drawLine(model, X_test, y_test, title): # This convenience method will take care of plotting your # test observations, comparing them to the regression line, # an...
mr3bn/DAT210x
Module5/assignment8.py
Python
mit
4,856
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import sys import time import os import urllib import ImageFile #import requests proxies = { 'http': '187.33.46.146:3128', 'http': '176.9.59.80:3128', 'http': '5.172.189.131:3128', 'http': '212.204.91.206:8080', 'http': '200.30.189.7...
paswd/MAI_Images_Saver
imgsaver.py
Python
gpl-3.0
2,717
# -*- coding: utf-8 -*- import re from typing import Dict, Iterator, NamedTuple, Type, TypeVar, Union, overload __all__ = ["countries"] StrOrInt = Union[str, int] _D = TypeVar("_D") class Country(NamedTuple): name: str alpha2: str alpha3: str numeric: str apolitical_name: str _records = [ ...
deactivated/python-iso3166
iso3166/__init__.py
Python
mit
19,437
# -*- coding: utf-8 -*- # # 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 #...
r39132/airflow
airflow/contrib/utils/gcp_field_validator.py
Python
apache-2.0
22,823
#! /usr/bin/python # # Copyright (c) 2015 Advanced Micro Devices, Inc. # All rights reserved. # # For use for simulation and test purposes only # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributio...
vineodd/PIMSim
GEM5Simulation/gem5/src/arch/hsail/gen.py
Python
gpl-3.0
27,246
''' Created on Dec 24, 2014 @author: Alan Tai ''' from google.appengine.ext import ndb class WebLink(ndb.Model): link = ndb.StringProperty() title = ndb.StringProperty(required = False) create_datetime = ndb.DateTimeProperty(auto_now_add = True) update_datetime = ndb.DateTimeProperty(auto_now = T...
Gogistics/prjGogistics
prjGogisticsWINEVER/src/models/models_wine_info.py
Python
mit
495
# -*- coding: utf-8 -*- """ Created on Mon Sep 26 13:54:24 2016 These functions set up the Hamiltonians for various ways of dealing with Cr7Mn dimers, including the full Spin-1 treatment, the truncated Spin-1/2 treatment, and the Spin-1/2 rotating frame treatment. @author: ccollett """ import qutip as qt ...
chiralhat/mnm-python
cr7mnsim/dimerfuncs.py
Python
bsd-3-clause
5,390
from toontown.toonbase.ToonPythonUtil import randFloat, normalDistrib, Enum from toontown.distributed.PythonUtil import clampScalar from toontown.toonbase import TTLocalizer, ToontownGlobals import random, copy TraitDivisor = 10000 def getTraitNames(): if not hasattr(PetTraits, 'TraitNames'): traitNames = ...
silly-wacky-3-town-toon/SOURCE-COD
toontown/pets/PetTraits.py
Python
apache-2.0
9,416
# -*- coding: utf-8 -*- # # simplejson documentation build configuration file, created by # sphinx-quickstart on Fri Sep 26 18:58:30 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pick...
dbbhattacharya/kitsune
vendor/packages/simplejson/conf.py
Python
bsd-3-clause
5,681
from __future__ import unicode_literals from ._terra_former import FileTooBigError, TerraFormer __author__ = 'ama'
Kaniabi/ben10
source/python/terraformer/__init__.py
Python
lgpl-2.1
116
# -*- coding: utf-8 -*- # # spartan documentation build configuration file, created by # sphinx-quickstart on Thu May 1 12:45:03 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
xguse/spartan
doc/conf.py
Python
mit
8,811
#this file only exists to make this folder be able to be used as a package
rileymjohnson/fbla
app/__init__.py
Python
mit
74
#!/usr/bin/env python # Copyright 2011 Google Inc. # Copyright 2013 Patrick von Reth <vonreth@kde.org> # 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://ww...
fifoforlifo/ninja
platform_helper.py
Python
apache-2.0
2,695
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'valerio cosentino' from datetime import datetime import re from email.utils import parseaddr import sys from querier_bugzilla import BugzillaQuerier from util.date_util import DateUtil from bugzilla_dao import BugzillaDao from util.logging_util import Loggin...
SOM-Research/Gitana
importers/issue_tracker/bugzilla/issue2db_extract_issue.py
Python
mit
14,478
# Copyright 2017 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...
tseaver/google-cloud-python
trace/google/cloud/trace/_gapic.py
Python
apache-2.0
12,657
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
EmanueleCannizzaro/scons
test/Requires/eval-order.py
Python
mit
2,300
import matplotlib.pyplot as plt import numpy as np import torch.nn as nn def loss_plot(d_loss_hist, g_loss_hist): x = range(len(d_loss_hist)) plt.plot(x, d_loss_hist, label='D_loss') plt.plot(x, g_loss_hist, label='G_loss') plt.xlabel('Epoch') plt.ylabel('Loss') plt.legend(loc=4) plt.gri...
MegaShow/college-programming
Homework/Principles of Artificial Neural Networks/Week 9 GAN 1/utils.py
Python
mit
1,149
import argparse import random def main(): parser = argparse.ArgumentParser(description="Tesco's deal mistake, implemented in Python.") parser.add_argument('barcode', type=str, help='Original barcode') parser.add_argument('price', type=str, help='Desired price in pence') parser.add_argument('mystery', ...
adamnfish/tescohdear
tescohdear.py
Python
mit
1,016
# -*- coding: utf-8 -*- from django.urls import include, path from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.views.generic import RedirectView from django.views.i18n import JavaScriptCatalog from myaccount.views import ( sign_in, sign_o...
memodir/cv
django_project/urls.py
Python
apache-2.0
1,600
from django.forms import Form, FileField from django.forms.models import modelform_factory from viewpack.utils import lazy, delegate_to_parent from viewpack.types import DetailObject, LazyBool from viewpack.views.base import View from viewpack.views.edit import FormMixin from viewpack.views.detail import DetailView c...
wilkerwma/codeschool
vendor/github.com/fabiommendes/django-viewpack/src/viewpack/views/extra.py
Python
gpl-3.0
8,404
from __future__ import print_function from bs4 import BeautifulSoup class Parser: @staticmethod def extract_neighborhood_urls(search_page, province): urls = set() parser = BeautifulSoup(search_page, 'html.parser') for neighborhood_node in parser.findAll('a', class_='gridblock-link', href=True): neighborhood...
MarcelloLins/ServerlessCrawler-VancouverRealState
Bootstrapper/parser.py
Python
mit
533
from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from ...language import Language class HindiDefaults(Language.Defaults): stop_words = STOP_WORDS lex_attr_getters = LEX_ATTRS class Hindi(Language): lang = "hi" Defaults = HindiDefaults __all__ = ["Hindi"]
spacy-io/spaCy
spacy/lang/hi/__init__.py
Python
mit
296
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
ikoula/cloudstack
test/integration/smoke/test_resource_detail.py
Python
gpl-2.0
4,352
#!/usr/bin/env python if __name__ == "__main__": import urllib2 import json resp = urllib2.urlopen("https://api.travis-ci.org/repos/getlantern/lantern/key") dat = json.loads(resp.read()) rsakey = dat.get("key", False) print rsakey.strip()
lqch14102/lantern
bin/travis-key.py
Python
apache-2.0
272
import irc import time import csv speakfile = "speak.txt" class lastspoke: def __init__(self): speakFileFile = open("./modules/pubmsg/SPEAKFILE", 'r') self.speakFile = speakFileFile.readline() speakFileFile.close() def lastSpoke(self, channel, user, message): theTime = time.gmtim...
TheCrittaC/BigBen
modules/pubmsg/lastspoke.py
Python
gpl-2.0
2,990
def func(): input1=3600000 house=[0 for x in range(1, input1*10)] flag=0 for i in range(1, input1+1): # print i for j in range(i, input1+1, i): house[j] += i*10 # print j for i in range(input1): if house[i]>=input1*10: return i num=func()...
abdulfaizp/adventofcode
xmas20.py
Python
cc0-1.0
345
name = 'bah' version = '2.1' authors = ["joe.bloggs"] uuid = "3c027ce6593244af947e305fc48eec96" description = "bah humbug" private_build_requires = ["build_util"] variants = [ ["foo-1.0"], ["foo-1.1"]]
saddingtonbaynes/rez
src/rez/tests/data/builds/packages/bah/2.1/package.py
Python
gpl-3.0
212
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- ''' Usage: aescrypt.py encrypt <paths>... aescrypt.py decrypt <paths>... aescrypt.py (-h | --help | --version) Options: -h --help Shows the help screen. -v --version Prints the version and exits. encrypt Encryption mode. decrypt Decryption mode. ''' import os i...
markus-beuckelmann/aescrypt
aescrypt/aescrypt.py
Python
gpl-3.0
3,678
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
Xuanwo/qingcloud-sdk-python
tests/test_router_static.py
Python
apache-2.0
8,327
from tests.base_unittest import BaseUnitTest from examples.players.console_player import ConsolePlayer class ConsolePlayerTest(BaseUnitTest): def setUp(self): self.valid_actions = [\ {'action': 'fold', 'amount': 0},\ {'action': 'call', 'amount': 10},\ {'action': 'raise', 'amount': {'max'...
ishikota/PyPokerEngine
tests/examples/players/console_player_test.py
Python
mit
2,602
from template_typedef_cplx2 import * from template_typedef_import import * # # this is OK # s = Sin() s.get_base_value() s.get_value() s.get_arith_value() my_func_r(s) make_Multiplies_double_double_double_double(s, s) z = CSin() z.get_base_value() z.get_value() z.get_arith_value() my_func_c(z) make_Multiplies_compl...
DGA-MI-SSI/YaCo
deps/swig-3.0.7/Examples/test-suite/python/template_typedef_import_runme.py
Python
gpl-3.0
455
#!/usr/bin/env python3 ############################################################################### # Copyright (c) 2015 Jamis Hoo # Distributed under the MIT license # (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) # # Project: Distributed Image Search Engine # Filename:...
JamisHoo/Distributed-Image-Search-Engine
src/computing_node/computing_node.py
Python
mit
1,750
""" Django settings for css project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # ...
makennajohnstone/CSS
css/settings.py
Python
mit
4,568
""" Test for splashscreen """ from datetime import datetime import pkg_resources from PyQt4.QtGui import QPixmap from PyQt4.QtCore import Qt, QRect from ..splashscreen import SplashScreen from ..test import QAppTestCase class TestSplashScreen(QAppTestCase): def test_splashscreen(self): splash = pkg_r...
qPCR4vir/orange3
Orange/canvas/gui/tests/test_splashscreen.py
Python
bsd-2-clause
1,013
import argparse import yaml import os.path import common import datetime import pprint def generate_output_for_given_area(raw_reports_data_filepath, main_output_name_part): if not os.path.isfile(raw_reports_data_filepath): print(raw_reports_data_filepath + " is not a file, provide an existing file") ...
matkoniecz/OSM-wikipedia-tag-validator
generate_webpage_with_error_output.py
Python
gpl-3.0
13,029
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2016 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. """ Builds applications in debug mode: - Copies the module directories into their destinations. - Copies app.h...
youtube/cobalt
third_party/devtools/scripts/build/build_debug_applications.py
Python
bsd-3-clause
2,246
import os import re import string import argparse import plotly.plotly as py from auth import auth from plotly.graph_objs import * from datetime import datetime from databasehandler import CollectionDatabaseReader DATABASE_PATH = os.path.join(os.path.dirname(__file__), 'database/') class Timeline(object): def __...
dbernard/Pyckaxe
timeline.py
Python
mit
3,142
# 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 https://mozilla.org/MPL/2.0/. import pytest import requests LINK_TEMPLATE = '<link rel="canonical" href="{url}">' @pytest.mark.headless @pytest.ma...
flodolo/bedrock
tests/functional/test_link_hreflang_tags.py
Python
mpl-2.0
878
#!/usr/bin/env python3 # Copyright (c) 2018 The Navcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import NavCoinTestFramework from test_framework.cfund_util import * import...
navcoindev/navcoin-core
qa/rpc-tests/cfund-rawtx-proposal-vote.py
Python
mit
6,245
import time import socket import logging from lnst.Common.Logs import log_exc_traceback from lnst.Common.SecureSocket import SecSocketException from lnst.Controller.Machine import Machine from lnst.Controller.Host import Host class RecipeControl(object): def __init__(self, controller, recipe): self._contro...
jpirko/lnst
lnst/Controller/RecipeControl.py
Python
gpl-2.0
2,027
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "remakery.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
symroe/remakery
manage.py
Python
mit
251
#!/usr/bin/env python # # Copyright 2015 sadikovi # # 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 ...
sadikovi/octohaven
test/test_sparkmodule.py
Python
apache-2.0
2,160
import pandas as pd from pprint import pprint import json import numpy as np import dataset # ICD_list table must be re-built from, presumably, ICD_for_Enc due to some entries being # pre-18th birthday. ICD_list entries are not timestamped! table_names = ['all_encounter_data', 'demographics', 'encounters', 'family_h...
MATH497project/MATH497-DiabeticRetinopathy
data_aggregation/data_normalization_sqlite.py
Python
mit
2,204
# coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance ...
Tan0/ironic
ironic/drivers/modules/ipmitool.py
Python
apache-2.0
44,249
#!/usr/bin/env python ## # 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 # ...
gustavoanatoly/hbase
dev-support/submit-patch.py
Python
apache-2.0
14,520
import datetime import simplejson from PIL import Image from django.http import HttpResponse, JsonResponse from django.shortcuts import render from neural_network import neural_ocr # Create your views here. from django.views.decorators.csrf import csrf_exempt import re default_folder = "media" def generate_name(): ...
rbalda/neural_ocr
NeuralOCR/principal/views.py
Python
mit
1,240
#Please put the values here. # account name SCREEN_NAME = 'stophatebot' # The consumer key and secret consumer_key="zoL9lObtDmyn2zEGBsRhtw" consumer_secret="4ZkTdXkEhbTP7LYJkq5PadXPQdCl2lBKSyEatUwhY" # access token access_token="2234472457-XwSkAEKVCVu3zNzpHiIhwMPVIe75JEChVOJxvzp" access_token_secret="H2aoZbJkgGDctThNKL...
konarkmodi/hack4changestream
stophatebot/config.py
Python
mit
438
# Nix # Copyright (c) 2017 Mark Biciunas. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distrib...
mbiciunas/nix
src/utility/nix_error.py
Python
gpl-3.0
1,070
#!/usr/bin/env python # 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 logging import os import shutil import subprocess import sys import tempfile import unittest ROOT_DIR = os.path.dirname(os....
espadrine/opera
chromium/src/tools/swarm_client/tests/run_test_cases_test.py
Python
bsd-3-clause
26,143
"""Keyboard shortcuts definition. """ DEFAULT_USER_SHORTCUTS = { # editor actions 'undo': 'Ctrl+Z', 'redo': 'Ctrl+Y', # menu actions 'new_file': 'Ctrl+N', 'open_file': 'Ctrl+O', 'save_file': 'Ctrl+S', 'save_file_as': 'Ctrl+Shift+S', 'exit': 'Ctrl+Q', 'display': 'Ctrl+Shift+D',...
GeoMop/GeoMop
src/LayerEditor/helpers/keyboard_shortcuts_definition.py
Python
gpl-3.0
1,147
#!/usr/bin/python3 import logging import os.path import urllib.parse import pathlib import subprocess import webbrowser import gi gi.require_version('Gtk', '3.0') gi.require_version('WebKit2', '4.0') from gi.repository import Gtk, WebKit2 from keyman_config.get_kmp import get_download_folder, download_kmp_file from k...
tavultesoft/keymanweb
linux/keyman-config/keyman_config/downloadkeyboard.py
Python
apache-2.0
3,695
# -*- coding: utf-8 -*- # Copyright 2014 Akretion - Alexis de Lattre <alexis.delattre@akretion.com> # Copyright 2014 Tecnativa - Pedro M. Baeza # Copyright 2018 Tecnativa - Carlos Dauden # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Account Payment Partner', 'version': '10.0.1...
CompassionCH/bank-payment
account_payment_partner/__manifest__.py
Python
agpl-3.0
931
__author__ = 'krc' from agent_pool import AgentPool from sip_profiles import ReceptionistConfigs, CustomerConfigs Receptionsts = AgentPool(ReceptionistConfigs) Customers = AgentPool(CustomerConfigs) if __name__ == "__main__": for agent in Receptionsts.agents: print agent.to_string() for agent in ...
AdaHeads/Coverage_Tests
src/agent_pools.py
Python
gpl-3.0
370
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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) a...
Eigenlabs/EigenD
plg_loop/audio_player_plg.py
Python
gpl-3.0
2,562
from GraphEditor import * from EntityEditor import * from UIWidgetEditor import *
cloudteampro/juma-editor
editor/lib/juma/MainEditor/GraphEditor/__init__.py
Python
mit
81
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Product Code Unique", "summary": "Add the unique property to default_code field", "version": "9.0.1.0.0", "category": "Product", "website": "https://odoo-community.org/",...
Gebesa-Dev/Addons-gebesa
product_code_unique/__openerp__.py
Python
agpl-3.0
701
import time from billy.scrape.committees import CommitteeScraper, Committee from .util import get_client, get_url, backoff CTTIE_URL = ("http://www.house.ga.gov/COMMITTEES/en-US/committee.aspx?" "Committee={cttie}&Session={sid}") class GACommitteeScraper(CommitteeScraper): jurisdiction = 'ga' ...
cliftonmcintosh/openstates
openstates/ga/committees.py
Python
gpl-3.0
4,118
## # Copyright 2012-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
Caylo/easybuild-framework
test/framework/module_generator.py
Python
gpl-2.0
34,555
# -*- coding: utf-8 -*- # # visualization.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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, ...
mdjurfeldt/nest-simulator
pynest/nest/visualization.py
Python
gpl-2.0
3,515
import os from textgrid import TextGrid, IntervalTier from polyglotdb.exceptions import TextGridError from polyglotdb.structure import Hierarchy from .base import BaseParser, DiscourseData from ..helper import find_wav_path class TextgridParser(BaseParser): ''' Parser for Praat TextGrid files. Parame...
samihuc/PolyglotDB
polyglotdb/io/parsers/textgrid.py
Python
mit
3,079
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/apps/spark/src/spark/design.py
Python
gpl-2.0
3,641