blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
dcddc2d86047347d502cef2818fc4faec1267a90
4e2835e1810e065b282e50cb7bbcb85b1fbfad82
abeluya/AutomationScripts
/WU-13467Serv-uNavigation.py
Python
py
1,224
no_license
from tkinter import Tk from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.chrome.options import Options def exist_element(driver, selector_name, clas...
dee8c809aa3d41a64154e08281154f36a2a57253
070bfde2fdb132f50ffde89a96a06c321491c9e9
LpLegend/zenml
/zenml/datasources/postgres_datasource.py
Python
py
3,385
permissive
# Copyright (c) ZenML GmbH 2020. 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...
047b31bfe3c5a69457ed8ab221c2a9d2dca70787
0ff86f5e24f6e4450afe8a4eea4a9d1d6d580d1e
zdravkog71/SoftUni
/OOP/PolimophismAndAbstractionExercise/project_animal/dog.py
Python
py
376
no_license
from PolimophismAndAbstractionExercise.project_animal.animal import Animal class Dog(Animal): def __init__(self, name, age, gender): super().__init__(name, age, gender) def make_sound(self): return "Woof!" # def __repr__(self): # return f"This is {self.name}. {self.name} is a {sel...
12abd35f52fd99ff8584d2bedcbd255e7ecda9eb
64d4ff97f8591ca98b0d797241f0592f00309b7b
microsoft/unilm
/layoutreader/s2s_ft/s2s_loader.py
Python
py
5,615
permissive
import numpy as np from random import randint, shuffle, choice from random import random as rand import math import logging import torch import torch.utils.data logger = logging.getLogger(__name__) def get_random_word(vocab_words): i = randint(0, len(vocab_words)-1) return vocab_words[i] def batch_list_t...
78c7406fb916b4dcd6d8c046333b5860923002b2
f7eefacc8c4596dadeea71c722bfc3a3e81ff586
jtruty/hubspot-api-python
/hubspot/webhooks/models/settings_change_request.py
Python
py
5,216
permissive
# coding: utf-8 """ Webhooks API Provides a way for apps to subscribe to certain change events in HubSpot. Once configured, apps will receive event payloads containing details about the changes at a specified target URL. There can only be one target URL for receiving event notifications per app. # noqa: E501...
059c099cb24550b1ae733408c9080fe3e572bba6
88a5c9673cf1d3c6aca4ca4cc107726d1d7be9dc
korrapati-sai/data-visualization
/datavisual1.py
Python
py
483
no_license
import pandas as pd import matplotlib.pyplot as plt excel_file_path = "Financial Sample.xlsx" df = pd.read_excel(excel_file_path) #print(df) #Time series df_vtt_canada = df.loc[(df['Country'] == 'Canada') & (df['Product'] == 'VTT') & (df['Segment'] == 'Government')] df_vtt_canada = df_vtt_canada.sort_values(...
ecc2090e1ed83d0274efcdf6f18b55770f743d1d
189d5a4e3f61f56ca5cadf51956d84e9e26457ce
Pervinsr/Deep-Learning-Uygulamalari
/mnist_karakter_tanima/mnist_karakter_tanima.py
Python
py
5,488
permissive
from keras.datasets import mnist import matplotlib.pyplot as plt import numpy as np from keras.preprocessing import image ######################################### veri setini yükleyelim (train_images, train_labels), (test_images, test_labels) = mnist.load_data() ################################################## Veri...
9c7fc455bdcb8c985ba979b716be76b6e841ad6f
2135ca988ce2f260262145a2168849acd8d14874
PacktPublishing/Mastering-Mesos
/Chapter4/Aurora/src/test/python/apache/aurora/client/cli/test_supdate.py
Python
py
28,357
permissive
# # 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 ...
e495204e071283415d1440ec580060306f2886c2
e788122bbeb0b85dc406013f804e33dac16d2a21
mingweii/data_file_manipulations
/printProgressBar.py
Python
py
1,464
permissive
# Author: aubricus on github # -*- coding: utf-8 -*- import sys # Print iterations progress def printProgressBar(iteration, total, prefix='', suffix='', decimals=1, bar_length=100): """ Call in a loop to create terminal progress bar @params: iteration - Required : current iteration (Int) ...
b9b2b14b818e40ded0cb2316c665681b9a81b1f2
1af4a616db6cbcf5467ed570a66655a806f905e1
vadaszd/pyorient
/test/test_raw_messages_1.py
Python
py
10,677
permissive
import os import sys import unittest from pyorient.exceptions import PyOrientCommandException, PyOrientConnectionException, PyOrientException from pyorient import OrientSocket from pyorient.messages.connection import ConnectMessage, ShutdownMessage from pyorient.messages.database import DbExistsMessage, DbOpenMessage,...
c7667cf4c9712e7bc9dc1269e4ebe4b613a724ae
92add0b05a32b0132d8f62e2ce5583c06ffda166
BorisovDima/WebProject
/mysite/project/apps/ajax_utils/migrations/0003_ajaxloadermodel_top_field.py
Python
py
422
no_license
# Generated by Django 2.1.3 on 2019-01-09 17:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ajax_utils', '0002_auto_20190109_1659'), ] operations = [ migrations.AddField( model_name='ajaxloadermodel', name='t...
bdcc994da93fc41a8c569676c2a7680da0308a56
f88767aa93d80a90f86be3b2d0120e68c7682158
spacetelescope/nirspec_pipe_testing_tool
/nirspec_pipe_testing_tool/calwebb_spec2_pytests/L_resample/test_resample.py
Python
py
9,145
no_license
""" py.test module for unit testing the resample_spec step. """ import os import time import pytest from glob import glob from astropy.io import fits from jwst.resample import ResampleSpecStep from nirspec_pipe_testing_tool.utils import change_filter_opaque2science from . import resample_utils from nirspec_pipe_test...
0ae0e163f2482794fc1a75ffd4d61bd0663bf2e2
6915f6a60e3212d3ba4517dc3db5d769ced321a2
Leehon008/Twitter-scrape-to-json-conv-to-csv
/venv/Scripts/alembic-script.py
Python
py
425
no_license
#!e:\school\web\django\twitter-scrape\venv\scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'alembic==1.3.3','console_scripts','alembic' __requires__ = 'alembic==1.3.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys...
e224c103c67384434dd0b01d8009c53922daa0cc
3b29c2af5af968513dabbd7fdaf9dc03719b8ca8
RadioFreeAsia/collective.cover
/src/collective/cover/tests/test_cover.py
Python
py
6,689
no_license
# -*- coding: utf-8 -*- from AccessControl import Unauthorized from collective.cover.config import DEFAULT_GRID_SYSTEM from collective.cover.controlpanel import ICoverSettings from collective.cover.interfaces import ICover from collective.cover.testing import INTEGRATION_TESTING from plone import api from plone.app.dex...
14919685cb619ff2b687d908003bef0dab47adb3
00304eb2ee159c3f3560fe440ac45e0d929972f4
Sudo-Milin/Coursera_Crash_Course_on_Python
/Module_3/Graded_Assesment_Q02.py
Python
py
399
no_license
### The show_letters function should print out each letter of a word on a separate line. # Fill in the blanks to make that happen. def show_letters(word): # For loop interates each letter in the 'word' parameter that is passed during the function call. for letter in word: # For each letter encountered is print...
2e99b07d848014587ef6703e06a0e6f1339154f9
a60fcb005191a114182383201b6d843408ca0c48
jon110101/untitled1
/apps/users/migrations/0001_initial.py
Python
py
3,623
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2018-01-10 01:43 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True depende...
8e88cd85d8150a4aec946c0c41140cb30a8db177
95f95a130add104fa1861a827580c24246ce8a7f
KennthShang/HostG
/model.py
Python
py
1,945
no_license
import torch from torch import nn from torch.nn import functional as F from layer import GraphConvolution from config import args class GCN(nn.Module): def __init__(self, node_dim, input_dim, output_dim, num_features_nonzero): super(GCN, self).__init__() self.input_dim = input_dim ...
308814cee9e705133a748a00baaa44a1ad449f1e
ab30cd801bec5f2704e161de589cbb43c69d81f9
aayn/algorithm-profiling
/perf_utils.py
Python
py
650
permissive
import time from functools import wraps def timer(f): @wraps(f) def wrapper(*args, **kwargs): start = time.perf_counter() ret = f(*args, **kwargs) end = time.perf_counter() print(f"{f.__name__} took {end - start} seconds to run.") return ret return wrapper class ...
e3d85fc193a22be447c6cfa04d543099f0cf952b
cee6e76c955f3e55f6178f82193a882cf4b027ae
TIgorini/Database-labs
/Laba2/concerts/views.py
Python
py
3,948
no_license
from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from django.urls import reverse from concerts.models import Concerts, Bands, Places, Organizers from .forms import BandForm, ConcertForm, OrganizerForm, PlaceForm # Create your views here. def load(reques...
e28cd5610536dc9c8d89a2f7cdb8aae518ce827a
5bb5a003834da09b32f61d3088ee605621a0e25f
anirbanroydas/logie
/logie/apps/webapp/views.py
Python
py
5,041
permissive
""" This is the main view module which manages main tornado connections. This module provides request handlers for managing simple HTTP requests as well as Websocket requests. Although the websocket requests are actually sockJs requests which follows the sockjs protcol, thus it provide interface to sockjs connection h...
70723dee57ec34f340e6ef2aef660f363ce639f2
e86858e38384c9c3e756fa3c574a113ba47c23d1
soyaCat/-kudos-localPackage
/soccer_simu/soccer_simu_local_result_processor.py
Python
py
508
no_license
"#!/usr/bin/env python" import rospy from soccer_simu.msg import mcl2_local_result class priROS(): def __init__(self): pass def listener(self): rospy.init_node('soccer_simu_local_result_processor', anonymous = False) msg = rospy.wait_for_message("soccer_simu_local_result", mcl2_local_r...
120dc7c013bc7a554c989b7fddec4825cf4be470
337adc3c5638db48dd63dedfdc312b65880dcb19
pancake1203/ArticleCrawl
/Article_crawl/Article_crawl/spiders/jobbole.py
Python
py
4,118
no_license
# -*- coding: utf-8 -*- import scrapy from Article_crawl.items import JobboleItem from Article_crawl.utils.common import get_md5 from scrapy.http import Request from scrapy.loader import ItemLoader from urllib import parse class JobboleSpider(scrapy.Spider): name = 'jobbole' allowed_domains = ['blog.jobbole....
9091b34fc1e2bc7ea28c1a7a6940ed8b17c3027f
44a484dd340d4743221432914ff135de3a314687
MrGit1/TEMPREPO
/list-2/centered_average.py
Python
py
2,038
no_license
''' CodingBat Python Activity "centered_average" from list-2. codingbat.com ''' failures = 0 def centered_average(nums): ''' Return the "centered" average of an array of ints, which we'll say is the mean average of the values, except ignoring the largest and smallest values in the array. If there are multiple co...
96ddc5ca18a8d398f39e94cd1bd783dcd5381f8f
0f962a2ddbba501301e8490aa4726711e851fd50
shakedav/The-voice-management
/thevoice/contestdata/migrations/0033_auto_20170617_2054.py
Python
py
479
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2017-06-17 17:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contestdata', '0032_auto_20170616_1659'), ] operations = [ migrations.AlterF...
5266d4af019cb24c50f9f46b5b546e339631866f
ae82212fc5d01a0a1048cb846a2b34a40fceeba7
madclumsil33t/atat
/tests/models/test_portfolio.py
Python
py
7,992
permissive
from decimal import Decimal import pendulum import pytest from tests.factories import ( ApplicationFactory, CLINFactory, PortfolioFactory, TaskOrderFactory, random_future_date, random_past_date, ) @pytest.fixture(scope="function") def upcoming_task_order(): return dict( signed_at...
7c5a47727f069e52b38a11e5d65d19fbe05d3f19
fccbfdaad916f2fa757a95f7c0f88fb320988953
trishnaguha/paasta
/tests/test_chronos_serviceinit.py
Python
py
21,152
permissive
#!/usr/bin/env python # Copyright 2015-2016 Yelp 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 ...
2273263cf9dcaaf7d3d9360b9a40fbc49dc05cb4
0784a78b77e6a42319aee4ebff4c7a2134c652cf
gyani91/darts
/darts/utils/data/__init__.py
Python
py
335
permissive
""" TimeSeries Datasets ------------------- """ from .horizon_based_dataset import HorizonBasedDataset from .sequential_dataset import SequentialDataset from .shifted_dataset import ShiftedDataset from .simple_inference_dataset import SimpleInferenceDataset from .timeseries_dataset import TrainingDataset, TimeSeriesIn...
a77003c9549f3d5aa0f19dfcec774b3e71628541
cdd506c019463f04265e7164a0ec17723ad513fd
PatacaSis/webGaby
/inicio/migrations/0007_auto_20210114_1914.py
Python
py
597
no_license
# Generated by Django 3.0 on 2021-01-14 22:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('inicio', '0006_auto_20210114_1548'), ] operations = [ migrations.RemoveField( model_name='proyect...
157823402ed961524c588c1d1f285716d8c9bee4
2476cee5551747ce19745c97e0c00dcbeabf6c4c
gamefolk/gamefolk.org
/gamefolk/users/forms.py
Python
py
607
no_license
from flask.ext.security import RegisterForm from flask.ext.wtf import RecaptchaField, Recaptcha from wtforms import PasswordField from wtforms.validators import EqualTo, Required class ExtendedRegisterForm(RegisterForm): """Form to register an account for the shop.""" password_confirm = PasswordField('Confirm...
2659e6024f826c4618aa0aad7fb3154880cac806
b22233d488faf0045c6695ffcc9575576e92cde1
mattihautameki/check_mk
/clamav/web/wato/check_params_clamav.py
Python
py
866
no_license
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- group = "checkparams" subgroup_applications = _("Applications, Processes & Services") register_check_parameters( subgroup_applications, "clamav", _("Times for clamav database age."), Dictionary( help = _("Here you can overri...
fe1aeb79f0d105494b3158153987c6ab42d24128
bb048f1bda9cbf4d986e68f21eb44f6e381da07b
plotdevice/plotdevice
/deps/frameworks/config.py
Python
py
898
permissive
import re import sys from sysconfig import get_config_var from datetime import datetime # customize Xcode's libpython paths based on the Python.framework interpreter config = """// Generated by deps/frameworks/config.py PYTHON_FRAMEWORK = $(PROJECT_DIR)/deps/frameworks/Python.framework PYTHON = $(PYTHON_FRAMEWORK)/Ver...
5985f31624ae5f1ba922948841085ebcbbdd05c8
a0af3cc92935f8b855daf7fbe473e7652733754e
akhilpadmanabha/MobileDrawingRobots
/devel/lib/python2.7/dist-packages/stdr_msgs/msg/_SoundSensorMeasurementMsg.py
Python
py
6,526
no_license
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from stdr_msgs/SoundSensorMeasurementMsg.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg class SoundSensorMeasurementMsg(genpy.Message):...
391862cbb25382a6d7c16126ae79fe0163dc8705
5d1f1b7a309f20caa7bfd3de724d9bc41c4fffb8
maddhott/im_arm
/build/atomic_configure/_setup_util.py
Python
py
13,338
no_license
#!/usr/bin/python2 # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistri...
75ce51bce03289eebe5766f23847172828fb4cd0
7f18c8fe31d26f09717fd24186da22b4dbf2753b
boiyelove/ethanol_analytics
/ethanoladmin/views.py
Python
py
2,315
no_license
from django.shortcuts import render from django.http import Http404, JsonResponse from django.views.generic import TemplateView from django.contrib.auth.mixins import UserPassesTestMixin from core.models import UserAccessRequest, Sensor from core.views import BasicAccess from .models import get_allsensors # Create you...
dcb5eae14492d31f3e724ec09477256d5206aa34
151cc94bafb964bb0646b50044665166d4ce7183
randilu/Impact-Analysis-Module-codebase
/models/scikitl_regression.py
Python
py
1,645
permissive
import matplotlib.pyplot as plt # Data visualisation libraries import pandas as pd import seaborn as sns from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_absolute_error from sklearn.model_selection import train_test_split plt.rcParams['figure.figsize'] = (20, 10) plt.style.use('seabo...
1b04fb17655d778d3379a204980cd8daf2cd22b0
18c1a8179eb68f80a89c7c32830ebb9935e1e85b
TheAlgorithms/Python
/electronics/coulombs_law.py
Python
py
2,712
permissive
# https://en.wikipedia.org/wiki/Coulomb%27s_law from __future__ import annotations COULOMBS_CONSTANT = 8.988e9 # units = N * m^s * C^-2 def couloumbs_law( force: float, charge1: float, charge2: float, distance: float ) -> dict[str, float]: """ Apply Coulomb's Law on any three given values. These can be...
737449c11029f91f6f4c89bcd0ed24d40ba00cde
a8c8c6a8b21942333366fc0735a62d27b77958bd
briankbng/DenguePredictor
/SystemCode/src/app.py
Python
py
8,848
permissive
# Imports all the necessary 3rd parties packages # External package imports. # ============================================================================= import os import time import datetime import logging import pandas as pd from bokeh.embed import components from flask import Flask, render_template, request, j...
afeb7e4408ef8fb704efc078bd7655698a6f794a
d1d5bd44b5d402bc40b6cdc8d4faf1ba78329c59
km0420j/nitro-python
/nitro/resource/config/authorization/authorizationpolicy.py
Python
py
13,432
permissive
# # 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...
2e8f9b52ec61b52173f05784ec6064a2021e5a5e
529712d5cf39378a460053eb4e6b26b6f7831236
WenShihKen/uva
/codeforces/python/Angry Students.py
Python
py
364
no_license
''' Author: Ken Problems: 1287A ''' in1 = int(input()) for _ in range(in1): in2 = int(input()) in3 = input() ans = 0 for i in range(in2): temp = 0 if in3[i] == 'A': i += 1 while i < in2 and in3[i] == 'P': temp += 1 i += 1 ...
47175906d137d5e3a8a3b3e13b5b8e2492ae7770
ef3f64053e2ae5bcdcb060764b685d7b1c721314
TrendingTechnology/kafka-shell
/kafkashell/constants.py
Python
py
1,577
permissive
# -*- coding: utf-8 -*- # # Copyright 2019 Shawn Seymour. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in ...
b75f68d5c4f133c32f666c17630c5c19e18b9bf9
5037a134d85baa12d6ad42a1d09915c3f689dde4
rgrishigajra/Competitive-Problems
/Coding interview course/Tree Depth First Search/Path With Given Sequence (medium).py
Python
py
1,294
no_license
# Given a binary tree and a number sequence, find if the sequence is present as a root-to-leaf path in the given tree. class TreeNode: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right def recursive_helper(root, sequence, current_path): ...
5de30feed9ec65aa76a0d68387e5be48d55441f5
579b1ccf190b91f59c4400f10c31b4a31e723d76
sq9mev/merchant
/billing/integrations/world_pay_integration.py
Python
py
3,588
permissive
from billing.integration import Integration from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from django.conf.urls.defaults import patterns from billing.signals import transaction_was_successful, transaction_was_unsuccessful from django.http import HttpResponse ...
88c78adc23941a7bc9f26edaa7354ff996225375
6b16f7f7c2ac78412a69ce4cb3eae7713b6e3257
diserdyuk/api_binance_django_getdata_analyze_viewresult
/tradeonbinance/tradeonbinance/settings.py
Python
py
3,117
no_license
""" Django settings for tradeonbinance project. Generated by 'django-admin startproject' using Django 3.1.7. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from ...
f5f6425a1c9ebc049c922af1f3afcd2617e7db67
fe7c4f864b5d40f1ee14e732423b1e0804b99924
pennersr/django-allauth
/allauth/socialaccount/providers/twitch/tests.py
Python
py
3,251
permissive
from django.test.client import RequestFactory from django.urls import reverse from allauth.socialaccount.models import SocialToken from allauth.socialaccount.providers.oauth2.client import OAuth2Error from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase, mocked_re...
cd22f821f53ddbce5659e0a10f232bcb3d434450
e0d33ccc3f862dfbd9d7118e56899b25506321ae
JCz-98/Social-Networks-Twitter
/locations_to_cordinates.py
Python
py
1,137
no_license
# -*- coding: utf-8 -*- """ Created on Sun May 10 22:09:58 2020 @author: erick """ places_to_cord = { 'Ecuador' : [-1.831239, -78.183403], 'Quito, Ecuador' : [-0.180653, -78.467834], 'Guayaquil, Ecuador': [-2.203816, -79.897453], 'Quito': [-0.180653...
f91aa593b8e16ab0e3fad669572a42b95718a9ea
53e1c2dbc1507df00e3b681516d67e43ab152d68
bigbang009/swift
/swift/common/middleware/account_quotas.py
Python
py
4,991
permissive
# Copyright (c) 2013 OpenStack Foundation. # # 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...
eac5f8ec677c151c28d9256051c36e9e5250fb9c
a70f326881757bc062d96cc7da85c996ce3475f1
dipaco/mole-classification
/datasets/datasets.py
Python
py
5,197
no_license
# -*- coding: utf-8 -*- import matplotlib matplotlib.use('TkAgg') import numpy as np from glob import glob from abc import ABCMeta, abstractmethod from os.path import join, splitext, basename, abspath class MissingAttributeException(Exception): def __init__(self, attribute): super(MissingAttributeExcepti...
c69961d25475014093321ff5933f98cda9667b3f
d16f52163c610853d82be1fdbab790dec090ee1b
anz-bank/sysl-legacy
/src/sysl/util/debug.py
Python
py
1,990
permissive
"""Install exception hook for easier debugging.""" import logging import platform import sys HAS_ANSI = platform.system() != 'Windows' def ansi(code): """Conditionally return ANSI-escaped codes.""" return '\033[' + code if HAS_ANSI else code def color256(r, g, b): assert {r, g, b} <= set(range(6)) ...
b2378b0ad48ce0d94f1fba0bcf5eec3f855eb9f9
a7e72892d97cc739820c881f2b37ee26bb5bfe7d
binshengliu/leetcode
/82.remove-duplicates-from-sorted-list-ii/solution.py
Python
py
1,081
no_license
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ ans = None cursor = ...
fa346c19dfa34a5c33577240e53912f1ad7faf6f
b1cba358416bdd254eb73ab9cf27532e32a82fa2
jaimenestares1012/ProyectoCalidad
/applications/usuarios/migrations/0002_alter_usuario_celular.py
Python
py
404
no_license
# Generated by Django 3.2.8 on 2021-10-24 06:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('usuarios', '0001_initial'), ] operations = [ migrations.AlterField( model_name='usuario', name='celular', ...
c17325a0acbad76b970d2f3a16a1b356bdba7819
ee5310776426582e668b5a931f94fa127790df74
Sally27/backup_cmtuser_full
/DaVinciDev_v38r1p1/InstallArea/x86_64-slc6-gcc49-opt/python/StrippingArchive/PreStripping18/StrippingBu2K1MuMu.py
Python
py
15,928
no_license
__author__ = 'Evelina Gersabeck' __date__ = '10/01/2012' __version__ = '$Revision: 1.0 $' __all__ = ( 'StrippingBuToK1MuMuConf' ) ''' Bu->K1mumu stripping selection using LoKi::Hybrid and python Default line applies a slightly loosened offline selection ''' from Gaudi.Configuration import * from LHCbKernel.Configu...
09301b9633d1c1b20051b06fd6c205d3a9d47b79
e65a9094eabefe9f44325d43bb736bf46aaf8e08
fabiomsrs/train_management
/core/migrations/0003_grades.py
Python
py
833
no_license
# Generated by Django 2.2 on 2019-06-09 20:42 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20190526_0352'), ('core', '0002_auto_20190513_0030'), ] operations = [ migrations.C...
38a3ad18208959cf0cc3e7758016389e9e652418
c4b392813ee62a8057e6c48a56ef9d75558f1a66
FermiQ/puq
/puq/util.py
Python
py
3,576
permissive
""" Utility functions for UQ This file is part of PUQ Copyright (c) 2013-2016 PUQ Authors See LICENSE file for terms. """ from __future__ import absolute_import, division, print_function import os import h5py import numpy as np from logging import info, debug, exception, warning, critical from puq.options import opti...
9ddf19ed89cbc40f787211c068980155f4f28b38
aea5e75176da13a320b58939bb2d3cf98a116dcc
Witach/Pahisi
/client/newGamePanel.py
Python
py
17,296
no_license
import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from client.ClientAPI import * import re from enum import Enum import game.player import game.position import game.pawn import time class PositionType(Enum): START = "S" NORMAL = "N" WINNING = "W" class newGamePa...
f355dd884d418f9d8555e3c86fa3213c3bde58af
6ed0a40d423bcb8b6362c64716bd555f2eb6eb11
ChonJi/BilleniumKafar
/__init__.py
Python
py
223
no_license
from selenium import webdriver class home_page: driver = webdriver.Chrome() sign_in_button = "btn btn-sm" def sign_in(self): self.driver.find_element_by_class_name(self.sign_in_button).click()
63c01adabf657bf2345e8bbcdd21960d6343dfa2
7d4545584d7722c28e3c561129fa1d226aaa9b25
lucasbflopes/codewars-solutions
/6-kyu/fizzbuzz-backwards/python/solution.py
Python
py
551
no_license
def reverse_fizz_buzz(array): if "Fizz" in array and "Buzz" in array: return array.index("Fizz") + 1, array.index("Buzz") + 1 elif "Fizz" in array and "FizzBuzz" in array: return array.index("Fizz") + 1, array.index("FizzBuzz") + 1 elif "Buzz" in array and "FizzBuzz" in array: return...
3e25ee4d5685960702895f44f04f33d6df53f1d7
a8b36ef9e7d0a77cb47e8f27dc537737b715d759
asimmirza/stock_monitor_bot
/main.py
Python
py
1,339
no_license
from csv_operator import CsvOperation from web_scrap import WebScrap from VoiceMesssage import VoiceHandler from MakeCall import MakeCalls import time if __name__ == '__main__': cs = CsvOperation l = cs.read_csv() ws = WebScrap vh = VoiceHandler mc = MakeCalls stop_flag = True stock_updated...
77278c52df9bd4f03b3e033e72d65e75052289e3
f3cb7b217329dd6a8027450cd84dee49c15a648a
Aline1029/Hogwarts_work
/Round_game.py
Python
py
859
no_license
# _*_ coding : UTF-8 _*_ # 开发团队 : 当场发财科技 # 开发人员 : shenglan # 开发时间 : 2020-07-31 14:27 # 文件名称 : Round_game PY # 开发工具 : PyCharm """ 一个回合制游戏,每个角色都有hp 和power, hp代表血量,power代表攻击力,hp的初始值为1000, power的初始值为200。打斗多个回合 定义一个fight方法: my_hp = hp - enemy_power enemy_final_hp = enemy_hp - my_power 谁的hp先为0,那么谁就输了 """ ...
f8bdf9a5a6611f9bc47fb9fcf30b20e47dea9d90
24280b6ec47bb6e714fb57151bc084b3946e0b8a
ierdmann/Ampel_Projekt
/skript_basis.py
Python
py
1,345
no_license
# Ampel Projekt import time import pifacedigitalio import atexit pfd = pifacedigitalio.PiFaceDigital() # a = ausgabe # v = verkehrsampel a_v_gruen = pfd.output_pins[5] a_v_gelb = pfd.output_pins[6] a_v_rot = pfd.output_pins[7] # f = Fussgaenger a_f_gruen = pfd.output_pins[3] a_f_rot = pfd.output_pins[4] schalter ...
75bab4918f3748765d0caa13e377a5257f29166f
64ae0685429a5093412bcd4445ca88094bb2e02c
sango09/template_djangular
/backend/config/wsgi.py
Python
py
626
permissive
""" WSGI config for config project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os import sys from django.core.wsgi import get_wsgi_application # This allows easy placem...
c61a589a6a7f721b8cba8b55624e3699a39ad869
054b433b2ce3cf7f0820d1d9499b1bddc54566bf
vinothsm/gramex
/tests/test_capturehandler.py
Python
py
13,339
permissive
import io import os import re import json import time import logging from PIL import Image from pptx import Presentation from pptx.util import Pt from nose.tools import eq_, ok_ from pdfminer.layout import LAParams from pdfminer.pdfpage import PDFPage from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument i...
53cdd262d8964d6fc9ece4c55aa4ca22f8bf733c
f8251cbaa3602d62f53708f37e7898a3e5853c23
iandioch/solutions
/kattis/minimumscalar/solution.py
Python
py
282
no_license
numtests = int(input()) for test in range(1, numtests+1): n = int(input()) a = sorted(map(int, input().split())) b = sorted(map(int, input().split()), reverse=True) tot = 0 for i in range(n): tot += a[i]*b[i] print('Case #{}: {}'.format(test, tot))
b3518d040ecb313ee33a91bb46f173b6ce460972
209f5dc34752ac34e72cb26d3f5779f425c947a3
willfurnell/lucid-grid
/analyse.py
Python
py
7,413
no_license
from lucid_utils import xycreader, blobbing, telemetry from lucid_classifiers.analysis import classify import requests import json import datetime import ephem import sqlite3 import argparse import tensorflow as tf import os from lucid_utils.classification.lucid_algorithm_data import classify as metric_classify from c...
02e3164df3419d32c9bc8c05e25bb2e5ad5d3572
fe956f7c93bc4f168776fd5e454f6d63eaf82a27
seven320/AtCoder
/123/B.py
Python
py
346
no_license
# encoding:utf-8 import copy import numpy as np import random import bisect # import math ans = 0 menu_time = [] for i in range(5): menu_time.append(int(input())) amari = 10 for i in range(5): if menu_time[i]%10>0: amari = min(menu_time[i]%10,amari) ans += math.ceil(menu_time[i]/10)*10 ans -= 10 ...
c4d2033cf63712a4a33e6671e036770de9a11b44
57332a8f10ead5d7ab3741d0f10bfbd798fec3f4
JiaXingBinggan/RL_ad
/src/time_precess/plot_time_stastics.py
Python
py
458
no_license
import matplotlib.pyplot as plt import pandas as pd import numpy as np day_select_result = pd.read_csv('../../transform_precess/day_select_result.csv').values hour_select_result = pd.read_csv('../../transform_precess/hour_select_result.csv').values x_axis = np.arange(0,24) y_aixs_1 = hour_select_result[0] y_aixs_2 = ...
ff71d59f487fdf29e45cea369ce294890fc84932
1f25ddfa37dea02350bae6645cfa0b5b16868fa4
nopaixx/MambaML
/mlpython/mlpython/users/__init__.py
Python
py
2,769
no_license
from mlpython.app import db from flask import request from flask import jsonify from ..token import Token import sys class User(db.Model): id = db.Column(db.Integer, primary_key=True) pwd = db.Column(db.String(80)) username = db.Column(db.String(50), unique=True) firstName = db.Column(db.String(30...
b9031b3a0929517d1febf419dc4a3895a0e14d09
f363d511d0e823a18534e1ec15bf9d3182374a01
skywalkermml/Sokoban_agent
/tree.py
Python
py
2,164
no_license
#Author:Joshua Wang, date :10/24 2013 #The data structure of the tree, import sys from collections import defaultdict #Amazing tree structure. reference: https://gist.github.com/hrldcpr/2012250 def treestru(): return defaultdict(treestru) class node(object): # class of a node def __init__(self, state): self.p...
d3af88f1def075163547420cd175a87b1ed99391
97c7540923faa366fefb742a48b8d6b7a93cecf1
YojiTsukada/scrapy
/crawl/crawl.py
Python
py
2,272
no_license
import time import re import sys import requests import lxml.html from pymongo import MongoClient from redis import Redis from rq import Queue def main(): """ クローラーのメイン処理 """ q = Queue(connection=Redis()) # ローカルホストのMongoDBに接続 client = MongoClient('localhost', 27017) # scrapingデータベ...
1108ec79f1d304ecdcc89326b18a2f5f487630dc
f26f3f7e6bf1870837579159d409b5ac030fbdf5
biserIvanov/HackBulgaria
/ORM/cinemaDB_creation.py
Python
py
7,189
no_license
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String, Float, Date, Time, ForeignKey, desc, asc, func from sqlalchemy import create_engine from sqlalchemy.orm import Session import datetime # A class that maps to a table, inherits from Base Base = declarative_base() spo...
77a74ffaabe181b885aae74b7118ddb6d288b7cf
2f82adfa51daf8997e17449b4f7bc98a8cce33c8
heitormariano/python-estudos
/poo/EmployeeSM.py
Python
py
1,326
no_license
class EmployeeSM: raise_amount = 1.04 def __init__(self, firstName, lastName, pay): self.firstName = firstName self.lastName = lastName self.pay = pay self.email = firstName + '.' + lastName + '@company.com' def fullname(self): return '{} {}'.format(self.firstName, ...
4c043bef003145d754aa964925ddc31fad993ad5
262a9ec385c604cd7b27506e3a4f6ab33db3d217
inti/pymattutil
/plot.py
Python
py
1,678
no_license
from __future__ import division import numpy as np from matplotlib import pyplot as plt import itertools # TODO move pca to stats def plot_gaussian_2D(mu, lmbda, color='b', centermarker=True): ''' Plots mean and cov ellipsoid into current axes. Must be 2D. lmbda is a covariance matrix. ''' assert len(...
8a944c0059d2401e36c33ff18281f739e22cb8b4
5757e2e6e382a096590ac359f78a78121412bbf3
webiumsk/WOT-0.9.20.0
/res/packages/scripts/scripts/common/GlobalMapBase.py
Python
py
7,727
no_license
# 2017.08.29 21:52:34 Střední Evropa (letní čas) # Embedded file name: scripts/common/GlobalMapBase.py import struct import cPickle from ops_pack import OpsUnpacker, packPascalString, unpackPascalString, initOpsFormatDef from debug_utils import LOG_DEBUG_DEV, LOG_CURRENT_EXCEPTION class GM_ERROR: WAIT_OK = -1 ...
ba7ff71fa11c1f808cbfd396cfbc38ee9fb12a12
2ff7e472565eaf14fed7583bbb2881afa8f0649c
mamedc/meal_app
/ingredients/migrations/0017_auto_20190828_2340.py
Python
py
604
no_license
# Generated by Django 2.2.4 on 2019-08-29 02:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ingredients', '0016_ingredient'), ] operations = [ migrations.AlterField( model_name='ingredient', name='name', ...
a03bd8abe5f7bfb977d7b7a7d3d6cb45cf5400f1
b525aa34e5f75143b1c9bdf720de37df9fc919b8
cavalleria/Cross-Resolution-Face-Recognition
/data_processing/face_align_celeba.py
Python
py
4,207
no_license
from PIL import Image from detector import detect_faces from align_trans import get_reference_facial_points, warp_and_crop_face import numpy as np import os from tqdm import tqdm import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description = "face alignment") parser.add_argument("-s...
8171318d1c71f16a1050652a12898e01fea343af
8c3ab1d39f21433c4e0c0c00d1f551c314deaaa8
kacperkan/gesture-classifying-model
/gesture_classifying_model/GestureClassifier.py
Python
py
1,559
no_license
from . import downloader from . import custom_objectives import numpy as np import cv2 import time class GestureClassifier(object): __CONFIG_FILE_URL = 'https://github.com/kacper1095/gesture_classifying_model/releases/download/0.1/config.yml' __OUT_KEY = 'gesture' __MODEL_URL_KEY = 'MODEL_URL' __MODE...
9c1300a7b50eaacd7367dc35ed529648ccf7818c
be626ffabd94a276766e2ad6db0e8aba4388570a
pflaumenmus/gammapy
/gammapy/utils/region.py
Python
py
2,248
no_license
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Utils to work with ds9 regions""" __all__ = ['make_ds9_region', 'Circle'] class Circle(object): """Little helper to work with regions""" @staticmethod def write(x=0, y=0, radius=1, system='galactic', attrs={}): strin...
b950184c37e9b57008ef7942fc9f87607d7009cf
3be75008995787c5fa2fc0e57c214e9152c704e4
mathieuhayek/python-django
/start project/Gestionderendu/polls/views.py
Python
py
461
no_license
from django.shortcuts import render from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView def home(request): return render(request, 'home.html') class ExampleView(APIView): permission_classes = [IsAuthenticated] def ...
1b9d79b21249c3e0b2e5489d65a25ba52cb24a75
0fc8507fa80946ed35381bd8c723fdff3f11ed8a
Turtle87/Lab3
/isValidSSN.py
Python
py
705
no_license
def isValidSSN(userInput): validity = 0 number = 0 userInput2 = userInput if userInput == "Done": return userInput # Count the number of digits for lines in userInput: for ch in lines: if ch.isalpha(): return False if ch.isdigit(): ...
2db45dde6ef742028c8fcac2fe9ca3d38246730c
17e073423deadb0ca6f512c9741254c3c2f07483
SpencerSharkey/Houdini-asyncio
/houdini/handlers/play/buddy.py
Python
py
8,662
permissive
from houdini import handlers from houdini.handlers import XTPacket from houdini.handlers.play.navigation import handle_join_room from houdini.data.penguin import Penguin from houdini.data.buddy import BuddyList, BuddyRequest from houdini.constants import ClientType async def update_player_presence(p): for buddy_...
9d812dd45fa1e495cfb0ee5922acab454f123a56
f82cd2b445da8138c05e118fbb92a356d8ec1f41
utra-robosoccer/soccerbot
/soccer_common/src/soccer_common/utils_rosparam.py
Python
py
772
permissive
from os import path from unittest.mock import MagicMock import rosparam import rospy import yaml def set_rosparam_from_yaml_file(param_path: str = "", delete_params=True, convert_logs_to_prints=True): if rospy.get_node_uri() is None: rospy.init_node("test") if convert_logs_to_prints: rospy.s...
8beae50fd9e5374346929499db53e8984d33a6a3
75f1c05fcc9680e0856569a9fb0afead2a0aa432
wills201/json_test
/TerminalTellerV.py
Python
py
1,487
no_license
import TerminalTellerM import TerminalTellerC welcome_sign = print("Welcome to Terminal Teller!:\n") print("1) Create Account\t") print("2) Log in to Existing Account\t") print("3) Quit Terminal Teller\t\n") welcome_input = input("Welcome, please enter what option you would like to proceed with:") if welcome_input...
c12c15226cd07140329805895cc07923fa0c6efc
5c12539a6641000d8b20de18391991b226940c0c
cuiopen/treelite
/python/treelite/libpath.py
Python
py
2,173
permissive
# coding: utf-8 """Find the path to treelite dynamic library files.""" import os import platform import sys class TreeliteLibraryNotFound(Exception): """Error thrown by when treelite is not found""" pass def find_lib_path(runtime=False): """Find the path to treelite dynamic library files. Param...
8e443b73565e14e3dd0920542d54a7c80a25200f
495bbacb67c99334afce5320c97157154a598e5a
songhaokk/SH
/meiduo_mall1/apps/oauth/migrations/0001_initial.py
Python
py
1,272
permissive
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-10-19 04:16 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrati...
223d3e826553d1eeae5f03e6a792a33d228ee4c6
6be495166ca2c77070a124ba9906b96414efb57c
decheng-zhang/CodeChallenges
/CoinChange2.py
Python
py
477
no_license
class Solution(object): def change(self, amount, coins): """ :type amount: int :type coins: List[int] :rtype: int """ comb=[] comb.append(1) for i in range(0,amount): comb.append(0) for coin in coins: for value in range(...
a4737c984d35119c7903e17b5a890cb07e05637e
479fe458bc09ba712ce72ba461b714ae10c25a87
niedsonsantana/MeuPet
/meuPet/wsgi.py
Python
py
449
no_license
""" WSGI config for meuPet project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from dj_static import Cling, MediaCl...
82c0c13c41b5989554653bf16ba852b4d3ef7754
2fa009db6856ec3d1707a9a2f53e8569b671b661
fengjixuchui/CTF-writeup
/2016/codebreaker/gen.py
Python
py
954
no_license
EXECUTE_OWN = -0x7B967C7C OPEN_7CC4 = -0x7B7C7BCF command = [ 0xe9, 0x100 - 0x7, # get index(-7): under oob access 0x4, # dup 0x58, # push 0x8 0x8, 0x0, 0x0, 0x0, 0xf9, # swap 0xe0, # shr (8) 0x58, # push 0xff 0xff, 0x0, 0x0, 0x0, 0x72, # and # get s[1] 0x58, # push 0x18 0x18, 0x0, 0x0, 0x0, 0xf9, # swap 0x9a, # shl #...
1d0354990913d51008cea50af22096bf0dff72b4
ce91aab865d3182c8e6113972c03fae737b696e1
gandalfvn/mcts-1
/fig/pw_func.py
Python
py
880
permissive
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) import math import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d from matplotlib import cm def main(): """The main function.""" # Build data ################ x ...
5e30005c7fff711e98e4474f9146dfb6bf65a58b
df736b9ad019578ec52a7abcb0b5209e842cb0a1
zunhai/Python_prevent_spider
/venv/Scripts/gitlab-script.py
Python
py
440
no_license
#!D:\PyProject\Python_prevent_spider\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'python-gitlab==1.8.0','console_scripts','gitlab' __requires__ = 'python-gitlab==1.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$...
29b8e1f46de9489a3d9aeda4bb736ed951f0ae17
2b6366f67afe992ab906cb83c5c59590bbf2ee5b
sat0635/mmp_server_django
/mmp_backend/backend/migrations/0008_auto_20190722_0257.py
Python
py
508
no_license
# Generated by Django 2.0.13 on 2019-07-22 02:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('backend', '0007_picture'), ] operations = [ migrations.RemoveField( model_name='picture', name='created_on', ...
31ddbc827e80b8f3c6892035a4ec7bd1f8b7327e
0866ee85514ad12cd61b2302369c76bd6d617a43
ajb-odoo-mod/ajb_collection
/ajb_account/__openerp__.py
Python
py
1,410
no_license
####################################################################### # AJB Sales module modification # Copyright (C) 2015 Romeo Abulencia # # Author: romeo abulencia <romeo.abulencia@gmail.com> # Maintainer: romeo abulencia <romeo.abulencia@gmail.com> # # This program is free software: you can redistribute it and/or...
8ea68c5bf15480bf798c4ea310687f92844fb4bf
54f35b6335e7f2a8f358f1aa04255e0c4d610718
TheLabbingProject/django_mri
/django_mri/analysis/interfaces/matlab/spm/cat12/longitudinal_segmentation/transformations.py
Python
py
1,071
permissive
""" Definition of the :obj:`LONGITUDINAL_SEGMENTATION_TRANSFORMATIONS` dictionary. """ #: Transformation to apply to option values before editing the batch template. LONGITUDINAL_SEGMENTATION_TRANSFORMATIONS = { "longitudinal_model": {"small": 1, "large": 2}, "bias_strength": {"light": 0.25, "medium": 0.5, "s...
52f55594f6da6b4f60387995169d123be65110bf
eb04973af084e0a11fb357603b954baa6332fd72
dkush/IndianChief
/Deck.py
Python
py
2,976
no_license
class Deck: def __init__(self): self.vals = ["2","3","4","5","6","7","8","9","10","J","Q","K","A"] self.suits = ["s","c","d","h"] self.deck = [x+y for x in vals for y in suits] def shuffle(self): self.deck = random.shuffle(self.deck) def dea...
9e310c830b67a5e15d3b5d08a7cc54ea06b88f14
02ea52b607cb029c56390f1bc8b6ff226f1dec95
girder/girder-geo-heatmap
/tests/test_web_client.py
Python
py
462
permissive
import os import pytest from pytest_girder.web_client import runWebClientTest @pytest.mark.skip(reason='geojs packaging needs to be updated to work in the test environment') @pytest.mark.plugin('geo_heatmap') @pytest.mark.parametrize('spec', ( 'geoHeatmapSpec.js', )) def testWebClient(boundServer, fsAssetstore, d...
219109073d71b7993f7c8aa98a7ee44227cb13cb
65c32ec57a879fc3bfa9ff06397f72e3d43319c7
cfn-sphere/cfn-sphere
/src/unittest/python/template/transformer_tests.py
Python
py
38,498
permissive
import json try: from unittest import TestCase from mock import Mock except ImportError: from unittest import TestCase from mock import Mock import mock from cfn_sphere.exceptions import TemplateErrorException from cfn_sphere.template import CloudFormationTemplate from cfn_sphere.template.transformer...
b2c8ce6aa114c386a79cc867561371deb599ee36
8953d51d523c732e09637c33cca70d9f0d76abfc
mori8/sookhaproject
/forstudy/July24th/4.7.1.py
Python
py
859
no_license
from pandas import Series series1 = Series([92600, 94800, 75400, 88800, 92300]) # print(series1) # series -> 1차원, dataframe -> 2차원 # print('count', series1.count()) # print('dercribe', series1.describe()) # 인덱스 접근 # print(series1[2]) series2 = Series([92600, 94800, 75400, 88800, 92300], index=['2019-07-23', '2019-0...
a3724e34cefe9963c3b4e144bf43eab8a208a22d
d82d015b622faebfe5ea399a94ed1bc6693a8efe
nuclearboy95/Anomaly-Detection-Deep-SVDD-Tensorflow
/dsvdd/networks.py
Python
py
1,606
no_license
from tensorflow import keras __all__ = ['mnist_lenet', 'cifar_lenet'] def mnist_lenet(H=32): model = keras.models.Sequential() model.add(keras.layers.Conv2D(8, (5, 5), padding='same', use_bias=False, input_shape=(28, 28, 1))) model.add(keras.layers.LeakyReLU(1e-2)) model.add(keras.layers.BatchNorma...
38d23c00f7cb40eafee4a403896dbf3fdac9ef96
e7ca23846adb551b55380d7ed1af69ee216b7361
azalea/pyfaidx
/tests/test_feature_key_function.py
Python
py
2,314
permissive
import os from pyfaidx import * from nose.tools import raises path = os.path.dirname(__file__) os.chdir(path) ACCESSION_TO_GENE_NAME_DICT = { 'AB821309.1': 'FGFR2', 'KF435150.1': 'MDM4', 'NR_104216.1': 'BARD1', # The rest are deliberately omitted # KF435149.1, NR_104215.1, NR_104212.1, NM_00128254...
02f01c5277a987aecd6a5a98cafe5a91b840bd5e
4101c0b849a917148e50ca4da487c7f917c088b7
shebah-2017/KIRABO-SHEBA
/game.py
Python
py
6,735
no_license
# 1 - Import library import pygame from pygame.locals import * import math import random # 2 - Initialize the game pygame.init() width, height = 640, 480 screen=pygame.display.set_mode((width, height)) keys = [False, False, False, False] playerpos=[100,100] acc=[0,0] arrows=[] badtimer=100 badtimer1=0 badguys=[[640,10...
1bf85c6a8c9f9ee1e0e5f387332e488b873c09e3
70cce89d9daabe07c3533349d1db0b7588dd08cb
thatch45/salt
/tests/unit/states/test_gnomedesktop.py
Python
py
1,706
permissive
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.unit import skipIf, TestCase from tests.support.mock import ( NO_MOCK, NO_M...
5cbf535a8f91b947435a7cd012f577df35b12099
e15af7561a6d0eb94d320a0a5582e4750697ac1e
MM802FinalProject/NetworkFlowVisualization
/NetworkFlowVisualization/urls.py
Python
py
839
no_license
"""NetworkFlowVisualization URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...