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
cd78a35954457d20e2ecaf21ef5b63cd891e656b
38781db80edbf4ef76994c9c7d4d505f1cf081c2
Shadow6363/airflow
/backport_packages/setup_backport_packages.py
Python
py
11,920
permissive
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
90694b52e69eb1c8cba1b8b4dc7986f7626e8804
f2ffa09932deb618578a22fe9b20116fc5578d7b
ianthomas23/matplotlib
/lib/matplotlib/transforms.py
Python
py
99,322
no_license
""" Matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of `TransformNode` objects whose actual value depends on their children. When the contents of children change, their parents are...
c1214cb1711baaa20cc383df6a77b49f4e48432c
bcde00a2b55b7a5def9b72e1c1b5bb434be453bf
Corvus278/Configurator-PC
/ConfiguratorPC/configuratorPCapp/urls.py
Python
py
463
no_license
# posts/urls.py from django.urls import path from .partClass import PartClass from .views import * urlpatterns = [ path('', homePage), path('home', homePage, name='home'), path('part_list/<str:partType>', part_list, name='part_list'), path('part_list/', part_list, name='part_list'), path('basket', ...
78a83a61bde83fdf6651b85720c8c8c8b5a256f8
e19dda81675351a6b3db25c89243db04d9127add
cocobaco/project_euler
/prob60.py
Python
py
7,937
no_license
# -*- coding: utf-8 -*- """ Created on Thu Jan 21 18:28:04 2021 @author: rop """ # project euler: https://projecteuler.net # problem 60: prime pair sets from time import time from itertools import combinations from prob3 import is_prime def sieve(n): """Sieve of Erotosthenes: generate prime...
718ae18e80dfd1c58da25c9e261bd80b4a9cc063
44270ce91161bc980fec3a72c0d4ef9a465645e9
Sportsfan77777/vortex
/code_dust_fargo3d/compareRossbyWaves.py
Python
py
17,803
no_license
""" plot azimuthally averaged density then, makes movies Usage: python plotAveragedDensity.py frame_number <== plot one frame python plotAveragedDensity.py -m <== make a movie instead of plots (plots already exist) python plotAveragedDensity.py -1 <<<===== Plots a sample python plotAveragedDensity.py <== plot all fram...
14b0efd6cda8abe2f7ffe4e3e980fcd93c00b5bc
fb1d2475167d6b243f369a0c8101fab8450f77e3
LiuFang816/SALSTM_py_data
/python/cuemacro_chartpy/chartpy-master/chartpy/style.py
Python
py
19,055
no_license
__author__ = 'saeedamen' # Saeed Amen # # Copyright 2016 Cuemacro # # 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...
7defb3c035c3fe2facfdf136739059e649817082
539b893174570cec77cbafbdd4bfdc012857f471
shach934/leetcode
/leet110.py
Python
py
1,073
no_license
110. Balanced Binary Tree Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. # Definition for a binary tree node. # class TreeNode(object): # ...
3c171322c8e2f18445437c653ce5ca0d1b0d1e4e
8a341167b39a90539243f402419b182a4659006c
Anon0nyx/python
/trading-bot/Binance/SourceCode/Pump&Dump.py
Python
py
5,983
no_license
from binance.client import Client from binance.exceptions import BinanceAPIException, BinanceRequestException, BinanceWithdrawException import requests import time import winsound # Replace your_api_key, your_api_secret with your api_key, api_secret client = Client('your_api_key', 'your_api_secret') #The api for pri...
143376db9865a7de2101c23ecb2f930ab7ab8f34
e56b71d20df0e55b764a08309d55987cd1b2ed39
PravinaPriya18/one
/p2d.py
Python
py
294
no_license
v_8,d_8=map(int,input().split()) h3=list(map(int,input().split())) v_8=[] h3.insert(0,0) for a in range(d_8): t_4=[] summup=0 w_9,v_5=map(int,input().split()) for b in range(w_9,v_5+1): summup^=h3[b] v_8.append(summup) for c in v_8: print(c)
d6eaf32f402ab04d4a5fa135cec95e76e767288d
1368db09fe1eebece7cd063ec84a302154284cd6
Belphanior/ci_test
/ci/ci/urls.py
Python
py
752
no_license
"""ci URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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='home') Class-based vi...
a27c4f1e059303f73f0ef1e6896c9059184ea595
8f5af8d8e9a9c0469ab8ad4dbd3f228d2d26c144
sumitkk12/mcqquizapp
/quiz/migrations/0008_auto_20201228_2207.py
Python
py
322
no_license
# Generated by Django 2.2.7 on 2020-12-28 16:37 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('quiz', '0007_auto_20201228_2204'), ] operations = [ migrations.AlterModelOptions( name='result', options={}, ), ...
9f89f558f9c4e3aef425d069e717a4e3997975e7
ad67a41d83ccab1b674350561c46c1fbc8017e88
CONP-PCNO/datalad-crawler
/datalad_crawler/pipelines/openfmri.py
Python
py
14,125
permissive
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
0ed09add25558fe0dcfbd190a10537f035bab162
ac0db80f5be4813adbd28876e0a8db024f38950d
veeresh577/restRCI
/RestRCI.py
Python
py
2,660
no_license
""" rest api automation: this automation code is for fx9600 series readers author : vs6993 """ import requests import time import os #import jsonschema import json import logging from configparser import ConfigParser import pytest character = "-" # character to be used as spliter to seperate commands config = Con...
fa9a2048583041c6ada5466ac9b901e399bdbf6e
247b4ad8595118da27b6502e1f357c1bdead874e
sysu-leo/fog_detection
/test/test_vgg.py
Python
py
4,667
no_license
from model.AlexNet import AlexNet from model.VGG16 import Vgg16 from my_model.EnvNet1 import EnvNet1 from my_model.sliceNet1 import testsliceNet1 from my_model.rgbdNet1 import testrgbdNet1 from my_model.sliceNet2 import testsliceNet2 from my_model.rgbdNet2 import testrgbdNet2 from Dataset.myDataSet3 import MyDataSet fr...
6ae62479ad168072feded7adc3edbaccc2ca41da
d6584ede4983d994aed84e0cd204d081b40c087f
777shipra/instagram_clone
/dashboard/migrations/0002_auto_20171215_1833.py
Python
py
972
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-15 13:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0001_initial'), ] operations = [ migrations.CreateModel( ...
719f8fa2c150092a547e135c9d572579276cfe90
7316e386eb9105dd446b9ee74894982413c14c78
jfangwpi/Interactive_planning_and_sensing
/src/lcmtypes/python/distribution_data/sample.py
Python
py
1,781
permissive
"""LCM type definitions This file automatically generated by lcm. DO NOT MODIFY BY HAND!!!! """ try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct class sample(object): __slots__ = ["cost", "p"] __typenames__ = ["double", "double"] __dimensions__ =...
6e3a3249103d9991e40bd86bf649a6b728d54dec
82327fffcdd27a74c5ce8dff59952f2e1a67017f
ray-project/maze-raylit
/python/ray/tune/integration/wandb.py
Python
py
18,616
permissive
import os import pickle from multiprocessing import Process, Queue from numbers import Number from typing import Any, Callable, Dict, List, Optional, Tuple import numpy as np from ray import logger from ray.tune import Trainable from ray.tune.function_runner import FunctionRunner from ray.tune.logger import LoggerCall...
2930257a5c84b82173ec83946158828e7213e982
6516b9b524e28d402b580a08e34325e9cc2f7a0b
nicholastaylor0000/CPS410-F20-Team04
/game/serializers.py
Python
py
2,459
no_license
from rest_framework import serializers from .models import GameResult from user.models import UserProfile from museum.models import Simulator from django.shortcuts import get_object_or_404 from badges.models import Badge class GameResultSerializer(serializers.Serializer): pilot = serializers.SlugRelatedField(slug_...
98d908cbaa7b20f4edef7568db1ff48a3856ee12
da7726a92305d0a369892917ded1f09b8c7bc4b3
Sagarved/lora_gateway_status
/gateway_status.py
Python
py
2,222
permissive
import requests import json import pytest import datetime @pytest.mark.office def test_gateway_api_status_200(): response = requests.get("https://omrest.charter.orbiwise.com/omc/gateways/geo", auth=('charter_admin', 'Charter123@')) global response_body response_body = response.json() assert r...
e6791f07915a0a207f8b962ff136167ef97ce07f
d270c14c9fabc28ac40c64ad768172881c31c601
matua34/python
/read komutu dosya okuma satır okuma.py
Python
py
417
permissive
# -*- coding: utf-8 -*- """ Created on Fri Apr 3 17:32:15 2020 @author: metea """ """class linecounter(): def __init__(self,filename): self.file =open(filename, 'r') self.lines=[] def read(self): self.lines = [line for line in self.file] def count(self): return l...
c140ecb9d79f6f211421df422d3b612bdad0bd2d
d7d9f91e0d9e0ab474c7ec8a0ff15418289c0ddb
antoine-g/phabricator-tools
/py/abd/abdt_fs.py
Python
py
15,224
permissive
"""Arcyd-specific interactions with the filesystem.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # abdt_fs # # Public Classes: # Error # Layout # .phabricator_config # .repohost_con...
5fad374a32fe271e6442ba29e5499b11719a542a
2ed5d3984612fa1e14f2cd7c1405551bf34d9ec0
pzzhang/HTE
/first_order/exp2.py
Python
py
1,794
no_license
from Chambolle import Chambolle import numpy as np import matplotlib.pyplot as plt # generate data nn = [20, 5, 4] D = len(nn) # clean signal u0_exact = 0.0 u1_exact = [np.zeros(nn[d]) for d in range(D)] u1_exact[1] = np.array([0.015,0,0,0,0]) u0_exact += np.mean(u1_exact[1]) u1_exact[1] -= np.mean(u1_exact[1]) # add...
cab8b7be1450c8f0b6c8d91a7a037e64f0a1ebd7
7fedc7911b3c1967c488e476482be4e16ad0eee2
Kikallazz/runnergame
/runnergame9-11/stephangamudesu.py
Python
py
3,711
no_license
# IMPORTATION import pygame import time import random # INITIALIZATION pygame.init() # VARIABLES display_width = 800 display_height = 600 fps = 120 dodge = 0 # COLOURS black = (0,0,0) white = (255,255,255) red = (255,0,0) green = (0,255,0) blue = (0,0,255) # DISPLAY INIT display_resolution...
652104e6e12fd1b544d0ad20a589c1204c6156c9
a172908bb67574d2ef4698289f71ed256a927767
bopopescu/devops
/cloudops/devops/opscenter/serializers.py
Python
py
3,849
no_license
# -*- coding: utf-8 -*- """ @ time : 2018/5/30 @ author : Xieyz @ software: PyCharm """ from rest_framework import serializers from django.contrib.auth.models import User, ContentType from .models import Certificate, Protocol, Server, Support, ServerGroup, AnsibleTask, script, script_log, cron, \ Re...
a5fe41574d80557a86b20bd0940a7f2eae4a5f34
0b80216b9a606f0a3eb276b473bf842776fa818f
asaadeldin11/graph-stats-book
/network_machine_learning_in_python/_build/jupyter_execute/representations/ch6/multigraph-representation-learning.py
Python
py
56,169
permissive
#!/usr/bin/env python # coding: utf-8 # # Multiple-Network Representation Learning # ## Aliens and Humans # Say you're a brain researcher, and you have a bunch of scans of brains - some are scans of people, and some are scans of aliens. You have some code that estimates networks from your scans, so you turn all your...
2151f05cfcce17bdbf668a9c264d827562537f95
f6600d7ff894f4bbc7f868cf0422fc98414ddfff
anyi333/Information_29
/info/modules/news/views.py
Python
py
10,984
no_license
# 新闻详情:收藏,评论,点赞 from . import news_blue from flask import render_template,session,current_app,abort,g,jsonify,request from info.models import User,News, Comment, CommentLike from info import constants,db,response_code from info.utils.comment import user_login_data @news_blue.route('/followed_user',methods=['POST']) @...
2ffbcfe907b875b1b4eaecfdb81a8de16ef7023e
695bf2f80831e523f267fc421dfb5f1d8e42bc3f
anushadatta/Artificial-Intelligence
/Lab 3/Subway Telegram Bot/main.py
Python
py
11,603
permissive
import os import random import sys import asyncio import telepot from telepot.aio.loop import MessageLoop from telepot.aio.delegate import pave_event_space, per_chat_id, create_open from telepot.namedtuple import ReplyKeyboardMarkup, KeyboardButton, ReplyKeyboardRemove from pyswip import Prolog from telegram_api_key i...
9ccca8817412e7fc5d9b3e3833da9bc1493fc521
b10b77892c2c64a9ce5667e74fd1305baabd6cdb
pwochnowski/644719T2
/shell.py
Python
py
959
no_license
#This is almost complete, except for the fact that I'm overwriting ebx which contains the GOT offset, this can be fixed by doing some rop chains to load it back into ebx but I'm out of time unfortunateldy #!/usr/bin/env python # UNSW COMP9447 18s2 # Exam Q1 - Pwnable from pwn import * import struct # Exploit Variable...
fd5df6d98b1cfb9e372e1d4a920dc8da07c6d269
ce801a803bf0bbbf22407bb7074f202da3c80854
KaiHangYang/ordinal_pose
/utils/postprocess_utils/skeleton17/skeleton_opt.py
Python
py
8,109
no_license
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
3fc03349fe3d9eff7248982d2a1bd1c17265cc2a
5c4b85adc1ddda1e4628f8a84854b3379c683126
ZJU-BMI/end_point_event_pred
/src/baseline.py
Python
py
11,023
no_license
# encoding=utf-8 import os import file_generate import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import roc_auc_score, accuracy_score, precision_score, recall_score, f1_score from sklearn import linear_model from sklearn import neighbors from sklearn.neural_network import MLPC...
c6bf2a12c410b0658cbdc6fbaa54f2c043a6cbbf
1b974cd73e8bf6d217f25562fc78f1a67957f4db
nareshganesan/cv_practice
/dart_board.py
Python
py
998
no_license
import sys import numpy as np import cv2 from itertools import cycle try: # draw circle at the center of the canvas circle_canvas = np.zeros( (330, 330, 3), dtype="uint8" ) (centerX, centerY) = (circle_canvas.shape[1]/2, circle_canvas.shape[0]/2) red = (0, 0, 255) white = (255, 255, 255) blac...
7b62975b8dba1282fb20699f5a73827e615228b2
1deab12e58bfe32802097c7bb2c6bfe16374a290
eanyanwu/mirthful-rcis
/mirthful_rcis/lib/libroom.py
Python
py
529
no_license
from mirthful_rcis.dal import datastore def get_building_manifest(): """ Return a summary of the building layout. """ result = datastore.query('select * from rooms'); manifest = {} for room in result: building_name = room['building_name'] manifest.setdefault(building_name,...
dce78c3fc343142626928d11c0ae66cac2c4ed73
98577fc782b0e7ee9bd4a65f41fc7ccf83f89a7b
djmorton42/code-advent-2016
/puzzle8/puzzle8.py
Python
py
964
no_license
import re from screen import Screen ROTATE_ROW_PATTERN = re.compile('rotate row y=([0-9]+) by ([0-9]+)') ROTATE_COL_PATTERN = re.compile('rotate column x=([0-9]+) by ([0-9]+)') SET_RECT_PATTERN = re.compile('rect ([0-9]+)x([0-9]+)') screen = Screen(6, 50) with open('input.txt') as file_handle: for line in file_h...
b9d48bfd4fa949b9b6a0176c7234542ac4ac8c37
675498a5234b3acaeabb982476dead3cfe91a637
JonasAraujoP/Python
/desafios/desafio104.py
Python
py
386
permissive
def leiaint(msg): ok = False valor = 0 while True: n = str(input(msg)) if n.isnumeric(): valor = int(n) ok = True else: print('\033[31mErro! Digite um número inteiro.\033[m ') if ok: break return valor n = leiaint('Digite ...
f029200815664bb2259ef68d653ea52830308f06
6a102473fa111903c6f0b89217d5628650538b08
poloplanejamento/odmatrix-joinville
/2020-07-27_modo_horario_cp_onda1_10d/script_modo_horario_2019-11-19_fchk_1015.py
Python
py
2,339
no_license
#!/usr/bin/env python3 # Bibliotecas from http.client import HTTPSConnection from base64 import b64encode import json import csv import pandas as pd # Variáveis projectID = "40" # ID do projeto, conforme mostrado no frontend Web c = HTTPSConnection("api.odmatrix.app") userAndPass = b64encode(b"fe6b53f0280443d5bd4...
debf08946fbe6364f668b2954de446c22ada24a7
15ab7667c0e6fa5038f905dc57abfe5ec39b040d
jieqian2/My_Leetcode_Solutions
/744. Find Smallest Letter Greater Than Target.py
Python
py
456
no_license
class Solution: def nextGreatestLetter(self, letters: List[str], target: str) -> str: #二分查找 n = len(letters) l = 0 h = n-1 while (l <= h): m = int(l + (h-l)/2) if( letters[m] <= target ): l = m+1 else: ...
b61d84f10954a5e01a5d5ea5a39b18aa3d8aae03
5ee34cee797722fa5435074945bae4df470dbd35
edit4ever/script.module.sd4tvh
/editor.py
Python
py
11,385
permissive
# -*- coding: utf-8 -*- import hashlib import sys import source as src import xbmcgui from sdAPI import SdAPI from utilssd import * SKIN = get_setting('skin') PATH = ADDON.getAddonInfo('path') ACTION_PARENT_DIR = 9 KEY_NAV_BACK = 92 database = None def login_popup(message=None): dialog = xbmcgui.Dialog() ...
89647b93aa1b5914c75375aca8cd7df66071ec2f
c60edf2cd0f2d5e5ffc92f3a15c768c829fd9b8d
Jimmy-INL/google-research
/gfsa/training/train_var_misuse_lib_test.py
Python
py
3,791
permissive
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
98f7a6a9728e7c14b3c555032f5f4d2de64b8285
18464d0a3c544784acd00309d0226adc081b0477
okaayfine/security-tools
/nodestructor/nodestructor.py
Python
py
13,225
permissive
#!/usr/bin/env python3 # # nodestructor # Node.js application static code analysis tool # # bl4de | bloorq@gmail.com | Twitter: @_bl4de # pylint: disable=W1401 # pylint: disable=C """ nodestructor.py - static code analysis for Node.js applications by bl4de GitHub: bl4de | Twitter: @_bl4de | hackerone.com/bl4de bloorq@...
02be39058a25c0dc616d5d953d21644d8dcb6875
7eb1160db13409eee29f2d77ec85bc45149f95f7
aatish70468/Python-Programs
/23_multiple_matrices.py
Python
py
925
no_license
no_row_1 = int(input("Enter the no. of row of 1st matrix: ")) no_column_1 = int(input("Enter the no. of column of 1st matrix: ")) m1 = [] print("Enter the entries rowwise: ") for i in range(no_row_1): a = [] for j in range(no_column_1): a.append(int(input())) m1.append(a) print(m1) no_row_2 = int(i...
e2cf39c00a63b966fed67fd9543c59de8523a83b
885383eceef89c40194d23752a5975c61a03a595
99Kies/allura
/Allura/allura/controllers/root.py
Python
py
5,267
permissive
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
7292a47e6dc35d1c61228a7f48d31333c1a1786f
3316ad1368e0e66932702fbbddc0c5e551d246cd
fuzzamos/grammarinator
/grammarinator/runtime/grammarinator.py
Python
py
4,215
permissive
# Copyright (c) 2017-2018 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import random import string from itertools import chain from .tr...
ed2cafd7f3e9d1430b9e23b9b51463a63b359500
87bcb324fa17deb41d9ba4da8794bd21e35decdf
PrakruthiSomashekar/LeetCode
/Group Anagrams.py
Python
py
763
no_license
import ast # Given an array of strings, group anagrams together. class Solution(object): def groupAnagrams(self, strs): anagramMap = {} anagramList = [] for i in strs: anagram = "".join(sorted(i)) if anagram not in anagramMap.keys(): anagramMap[ana...
437408d86225db9732c921619aa8c605a8680901
b487112591cc432d14b9dced8cb6816409e43552
hvnsweeting/tinyscripts
/vlcplaylist.py
Python
py
1,410
no_license
#!/usr/bin/env python """ Generate .xspf playlist file given base NGINX index URL for using with VLC. xspf: XML Shareable Playlist Format """ import argparse import bs4 import requests argp = argparse.ArgumentParser() argp.add_argument("baseurl", help="HTTP(S) URL to directory index") args = argp.parse_args() baseur...
3526748fc3b8b1edcc1cdce81e36aa602dbc97d5
e7cadfcb8f2978e0fb0c636de00b34078ff120cc
alicebarbe/England-Flood-Warnings-and-Visualizations
/Task1E.py
Python
py
520
permissive
# -*- coding: utf-8 -*- """ Created on Sun Jan 18 21:26:52 2020 @author: Daniel """ import floodsystem.geo as geo import floodsystem.stationdata as stationdata def run(): """Requirements for Task 1E""" station_list = stationdata.build_station_list() N = 9 rivers = geo.rivers_by_station_number(stati...
7187cfa43cf15922d942243b294f6b69b66b03bc
05929c502e7948cde79af7859a8d5a52453d6e51
KeyviDev/keyvi
/python/examples/completion/multiword_completion_tester.py
Python
py
509
permissive
from keyvi.dictionary import Dictionary from keyvi.completion import MultiWordCompletion MULTIWORD_QUERY_SEPARATOR = '\x1b' query = "" d=Dictionary("mw-completion.kv") c=MultiWordCompletion(d) def get_lookup_key(query): l = query.split(" ") l_bow = " ".join(sorted(l[:-1]) + l[-1:]) return l_bow while...
9dec698f731aa70817286b01917725e9211114f4
5368f5c3f1561a17992c9700e15d172382f27fd9
bigbrobro/Mythic
/mythic-docker/app/api/file_browser_api.py
Python
py
24,692
permissive
from app import mythic import app from sanic.response import json from sanic_jwt.decorators import scoped, inject_user import app.database_models.model as db_model from sanic.exceptions import abort from pathlib import PureWindowsPath, PurePosixPath import sys import ujson as js from peewee import fn from math import c...
ff555a45f659095ee0815c9bcfe952837dd26f46
ad6705f8aba9bd2824fa5a6eb50e712a08113cd9
Slayo2008/New2
/appengine/components/components/datastore_utils/properties_test.py
Python
py
1,120
permissive
#!/usr/bin/env python # Copyright 2014 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import sys import unittest from test_support import test_env test_env.setup_test_env() from google.appengine.ext import nd...
9e1ef002cf086c61e193a98090abd142b75a272d
c214b331645bbedfa09fd83bcb9c8baf81920c14
rishittripathi-therocking/Data-Structures-And-Algorithm
/Algorithmic ToolBox/knapsack.py
Python
py
555
no_license
# Uses python3 import sys def optimal_weight(W, w, n): values = [[0 for i in range(W + 1)] for j in range(n + 1)] for j in range(1, n+1): for i in range(1, W + 1): values[j][i] = values[j-1][i] if w[j-1] <= i: val = values[j-1][i-w[j-1]] + w[j-1] ...
3a90872dbb79359f52231b00a2392a75e3c6f054
199e5b51682dae9267777670e2360be7268594d2
rahulsaini/Machine-Learning-with-Python
/util.py
Python
py
657
no_license
#!/usr/bin/env python # coding: utf-8 # In[ ]: from numpy import random import numpy as np def num_users(): return 1000000 def dimension(): return 50 def min_rating(): return 4 def learning_rate(): return 1 def get_lambda(): return 0.1 def random_vector(): dim = dimension() cov_mtx ...
803a81cbe90f5406fa2b0542b3212bf175785040
6cbafab0bdbe79717eb6f2805dedac50c8d0994e
qkpqkp/PlagCheck
/build/idea-sandbox/system/python_stubs/cache/d94ed9b2fa7c04926831a69a79c70220dbc38d0e71991385b24c163fd8ea8af6/py/path.py
Python
py
25,549
no_license
# encoding: utf-8 # module py.path # from C:\Users\Doly\Anaconda3\lib\site-packages\sklearn\preprocessing\_csr_polynomial_expansion.cp37-win_amd64.pyd # by generator 1.147 """ unified file system api """ # imports import py._path.common as __py__path_common import py._path.svnwc as __py__path_svnwc # Variables with ...
fe5818813c361b8a12ee831c2367525b7f89c200
86ef3a7f134d08e2475e4ddfe2c372b52525d9fe
lorenzolaino/intelligent_systems
/rps_cnn_evaluation.py
Python
py
2,558
no_license
import itertools import matplotlib.pyplot as plt import numpy as np from sklearn.metrics import confusion_matrix from tensorflow import keras from rps_process_data import RPSProcessData RPS_process_data = RPSProcessData() img_train, label_train, img_test, label_test = RPS_process_data.train_test_split() label_names =...
7ad82c77289426f02f1ab42504b354448e4e7f2d
375072573437644a7b8d72b9d55487a888f6fc44
byronlara5/django_limpieza_tracker
/reclamaciones/migrations/0005_auto_20170106_0110.py
Python
py
704
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-01-06 01:10 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tracker', '__first__'), ('reclamaciones', '0004_rec...
6c0b6d2d756a9206753c9569e4dfba63653cfe93
c12d842cd6dc02e92a75ecdbc5737257711b6f98
kivy/kivy
/examples/canvas/texture.py
Python
py
4,187
permissive
''' Texture Wrapping and Coordinates Example ======================================== This example changes texture properties and the properties of its containing rectangle. You should see some a multicolored texture with sliders to the left and below and buttons at the bottom of the screen. The image texture_example_...
182071993147c7cb518203002c75189f2d2b5d87
b149a30cf06488a31f66e90af952faf5c02fd5b3
VTBajaTesting/CVT-dyno
/Test7.py
Python
py
1,657
no_license
import tkinter as tk import matplotlib from tkinter.ttk import * matplotlib.use("TkAgg") from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg root = tk.Tk() def myCLick(): root.configure(background = 'grey') def clearFrame(): for widget in root.winfo_children():...
f8e8b74b6077d2d32bfe9c3de11464899245a337
f64cfbb6de87795a18e05129983117af31d8da8c
santhoshtr/fontbakery
/tests/profiles/name_test.py
Python
py
23,302
permissive
import os from fontTools.ttLib import TTFont from fontbakery.constants import (NameID, PlatformID, WindowsEncodingID, WindowsLanguageID, MacintoshEncodingID, ...
0862a1eb7a358476cebb5a404715383a6a37d222
806a48dfeea98dfc3af7f093ba315d54b2adc548
vnarayan13/grayscale-segmenter
/utils/slicerRegisterAndSubtractLabels.py
Python
py
9,615
permissive
#execfile('C:\\Users\\Vivek Narayan\\Desktop\\RadiomicsToolbox\\radiomics-toolbox\\PythonScripts\\subtractLabels.py') #Slicer.exe --no-splash --no-main-window --show-python-interactor --python-script "C:/Users/Vivek Narayan/Desktop/RadiomicsToolbox/radiomics-toolbox/PythonScripts/subtractLabels.py" """ >>> n = getNode(...
63f2b20cf8a409298a3678818b6d69a5e200ad7f
2bec96c1ade4fdfabfda2531b165b8fe86c5625f
johnnybravo202020/Horsing-Around
/horsing_around/tests/local/scrapper.py
Python
py
4,798
no_license
from django.test import TestCase from bs4 import BeautifulSoup from ..models import FixtureTestData, ResultTestData, RaceDayTestData from ... import PageType, City from ...scrappers import ResultScrapper, FixtureScrapper, HorseScrapper, PageDoesNotExist from ...scrappers.row import ResultRowScrapper, FixtureRowScrapper...
35a5edb186cdc488a12631e07011751c6ced7b91
5298c7ded6e5ac585615c84157149da74e43f292
nickolasgough/genome_browser
/toolkit/WebAbstraction/rtcWeb/migrations/0005_auto_20160622_1524.py
Python
py
610
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-22 21:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rtcWeb', '0004_auto_20160622_1513'), ] operations = [ migrations.AddField( ...
60f6537d18f7034a8b24bbfb6fa321545ba7e8cb
712064b7242afaae5ff91a4f9d039414d6a74f36
tom6311tom6311/dlcv2018final
/task1/fmnist_train.py
Python
py
3,122
no_license
import os import sys import numpy as np from keras.models import Model from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.layers import Input, Conv2D, MaxPooling2D, Flatten from keras.optimizers import SGD, Adam from keras.utils import np_utils from keras.callbacks i...
72c59edf1e6b9df1f182566ac78edd28446e7fce
7b22132d2dca8ed9589f68005015097a02e27503
Bogomil94/pythonProject
/Exercise2.5.py
Python
py
323
no_license
p= float(input("Principal = ")) r= float(input( "interest rate = ")) n= float(input( "annual compounding periods = " )) t= float(input( "number of years = ")) a= p*((1+r/n)**(n*t)) a2= round(a,2) print( "final amount = ", a2) percent= ((a-p)/p)*100 percent2= round(percent,2) print( "percent increase = ", percent2, "%")...
2523b983b5c322649df900140cb85b2e46d10ee8
ddf1b760ca713364e79cdb096457064998b0fc43
martin308/dbt
/dbt/compilation.py
Python
py
13,314
permissive
import itertools import os from collections import OrderedDict, defaultdict import sqlparse import dbt.project import dbt.utils import dbt.include import dbt.wrapper import dbt.tracking from dbt.utils import This, Var, get_materialization, is_type from dbt.node_types import NodeType from dbt.linker import Linker im...
65d640bd9ce79fcd2d7202628d17a45e151a2202
3206acf91472c99a30a5123b669f47381e2adfab
lpizarro2391/Repaso-Phyton
/condicionales/condicionales/criptomonedassaldo.py
Python
py
632
no_license
criptos = ("BTC","BBC","LTC","ETH","ETC","XRP") i= 0 total=0 while(i<3): cripto=input("Ingrese el nombre de la monedas") if cripto in criptos: i= i+1 cant="" while not cant.replace('.',',',1).isdigit(): cant= input("Indique la cantidad de +"+cripto+".") else: ...
107404cc19d0a0e08e6f45970ace0f28d97e6b42
8c351950bcc4e91be82dcf5b2444c65842942db2
meenal456/Library-Book-Management
/changepwd.py
Python
py
2,316
no_license
from tkinter import * import pymysql import pymysql.cursors from tkinter import messagebox def change(): user=username.get() ol=password.get() np=nwp.get() cn=cnp.get() try: if(np==cn): conn=pymysql.connect(host='localhost',user='root',password='',db="lib") ...
889ac14cbe2dd984e53fe6881db63711f73fdc1f
c09cb1fe7b4163173573d07cda6af56b04974ef0
athynyan/hiyorin
/modules/reactions/queue.py
Python
py
4,292
no_license
import os from utils.mongo import get_document from modules.queue.v2 import queue_field reaction_list = ['1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣'] async def add_reaction(payload, user, guild): queue = get_document('server_id', guild.id, os.getenv('MONGO_DB_QUEUE')) if not queue: return if queue['new_s...
84c8a45ad40fe3f8c71e81bbe35c808e654a7638
8aae7bc10296ab175ce9fa9399b8343794a6f1f0
Zhaozhao-0224/hello-world
/resnet50_train.py
Python
py
3,478
no_license
import math import os import pandas as pd import keras from keras.callbacks import EarlyStopping, ModelCheckpoint from keras.layers import Dense from keras.models import Model from keras.optimizers import Adam from keras.preprocessing import image import matplotlib.pyplot as plt os.environ['TF_CPP_MIN_LOG_LEVEL'] = '...
8b6d6209934f2e9184757b40e38e83c074a494af
f81b16ce2d21d669cef5e2fbbe9b056f96d7b935
SuhasKMurthy/GJ-Arabesque
/CFLMatch/convert_dg.py
Python
py
746
no_license
import os import glob folder = './graphs' for filepath in glob.glob(folder + '/*'): data_graph = os.path.basename(filepath) print(data_graph) v_str = [] e_str = [] with open(filepath, "r") as file: for line in file: elem = line.split() v_str.append('v {} {}'.format(e...
695c205d76f1367d00c1964c6ea3db600172e42b
30ed3c46d5d189bf727bc90d6f9f82ab4155ba4e
MatthewGrimshaw/PurviewPoC
/AzureFunctions/getEntities/__init__.py
Python
py
4,643
permissive
import logging import azure.functions as func import sys import importlib from docopt import docopt from purviewcli import __version__ from purviewcli.cli import cli as pv import io import re import os from contextlib import redirect_stdout import json from datacatalogtordf import Catalog, Dataset def entitySearch(sea...
d785afd298b86b160ae6f56f67106fc6cd93064e
c3344c84d3f63e570462c7f0f6f823d457147698
Shaila96/Data-Migration-Python-Script
/@Script-SubjectBookDataCleaning/@Backup-Script/DataCleaningScript-2.py
Python
py
11,530
no_license
import pandas as pd import math import os from os import listdir from fnmatch import fnmatch data_dir = "Data" input_dir = "InputOutput" input_data_path = os.path.join(data_dir, input_dir) temp_file_dest = None ###################################################################################################### ####...
c0fa4d474c8f3682a794b306c0a23579a6a67cf6
cb341b15e76f458f78d6dc84ff104e557167341b
MaseraTiGo/Maserati_Go
/codes/crm-be/tuoen/model/migrations/0010_auto_20180614_1729.py
Python
py
482
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2018-06-14 17:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('model', '0009_auto_20180614_1654'), ] operations = [ migrations.AlterField( ...
dc307b2bf8f90a102dd52d6082221c01f3948d91
ffc4db13f6026a5a18c114a763bbe865cacab931
csyanbin/MAML-Pytorch-Multi-GPUs
/MiniImagenet.py
Python
py
4,879
no_license
import os import torch from torch.utils.data import Dataset from torchvision.transforms import transforms import numpy as np import collections from PIL import Image import csv import random import pandas as pd class MiniImagenet(Dataset): """ put mini-imagenet files as : root : |- i...
f11a3ec40e072ade94210c2b3b544c9a8fe0cacb
fa7acad3b350ae388a559dcef556363be59dd1d8
d-DP/geometryy
/codes/triangle/2.tri_constr.py
Python
py
1,287
no_license
#Code by P.Durga Prasad #December 27, 2019 import numpy as np import matplotlib.pyplot as plt from coeffs import * #if using termux #import subprocess #import shlex #end if k=3.5 #Sides a = 8 d=45 AngleB=(np.pi/180)*(d) b = (-(2*a*k*np.cos(AngleB))+(a)**2+(k)**2)/(-(2*k)+(2*a*(np.cos(AngleB)))) print(b) c=k+b print(...
296e8a06f86038b45bf60388a1c39ae2147d4908
1dc1e917e2326863dc7c527c0ba49b7da1aff48e
graalvm/graalvm-demos
/graalpy-notebook-example/test1.py
Python
py
3,391
permissive
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this soft...
7776089373e767dd7e1e8a81e938c9a7b0554263
158dcd99625d7c541163ebd51e7bc88ee19f7740
yola/yolapi
/yolapi/pypi/migrations/0001_initial.py
Python
py
2,345
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-12 08:23 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import pypi.fields import pypi.models class Migration(migrations.Migration): initial = True ...
7e1c4a01c10cd67144533f660e50ed5f3eee3f7a
1706a222a03c81fbf18c9ced8878c159a975e356
yusokk/algorithm
/week1/9663-N-Queen.py
Python
py
559
no_license
N = int(input()) record = [0]*N flag_a = [False]*N flag_b = [False]*(2*N-1) flag_c = [False]*(2*N-1) count = 0 def set(i): global count for j in range(N): if(not flag_a[j] and not flag_b[i+j] and not flag_c[i-j+N-1]): record[i] = j if i == N-1: count += 1 ...
ea928a12a0b80bdb34474b4525883e10c3201a14
f37f6d388b7ab4c2da25caa0b3b08060ba4d774c
moni310/List_questions
/average_kitna_hai.py
Python
py
431
no_license
a=[33,56,34,2,3,5,4] i=0 even_count=0 even_sum=0 odd_count=0 odd_sum=0 even_average=0 odd_average=0 while i<len(a): if a[i]%2==0: even_count=even_count+1 even_sum=even_sum+a[i] even_average=even_sum//even_count else: odd_count=odd_count+1 odd_sum=odd_sum+a[i] odd_...
2998dc4703723458e587be48b928b1c28ff7e05f
1b5525fca65768db878e18163afd62c9861110e9
MisinformedDNA/pulumi-azure-native
/sdk/python/pulumi_azure_native/netapp/v20190701/get_volume.py
Python
py
9,951
permissive
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
c380424a33c1a347a917fe6c74473306c4942f39
3e6e665fe715d626a017ad877f63f2514d668cc2
rhty/atcoder
/webtest/20210314/temp/app/app.py
Python
py
424
no_license
from datetime import datetime from app.repository import RepositoryAbs class App: def __init__(self, db: RepositoryAbs) -> None: self.db = db def setup(self, value: str): pass def execute_query(self, time: datetime, query: str, *args): self.db.set_time(time) if query ==...
5ff2554265c039774d1422de3cfb7d6a0b946923
b3204fe88311d2cf3c8dafd12b66bc26e11fc5a9
Rhys-Maxwell/Mega-Movie-Fundraiser
/00_MMF_Base_v3.py
Python
py
10,170
no_license
# import statements import re import pandas # functions go here # number checker def num_check(question): valid = False while not valid: try: response = int(input(question)) if response <= 0: print("error") else: return response ...
a578bf689520243cc2a40cd307b4df76c173cce8
b6aff5f7a753f73bae6fb8bc9a0d2fd27c2fda75
ShiinaOrez/web_crawler
/urllib3_test.py
Python
py
2,135
no_license
from urllib import request #import json import certifi import urllib3 http=urllib3.PoolManager(cert_reqs="CERT_REQUIRED",timeout=10.0,ca_certs=certifi.where()) #实例化PoolManager ''' #ProxyManager proxy=urllib3.ProxyManager("http://localhost:3128") proxy.request("GET","http:/google.com/") ''' ''' proxy=request.ProxyH...
523d90e52242d7a0ca6fde1127cea615416d3b38
f1f99eb31b526d4548b5ca1b6e4e945e6d5eb0a1
fanswm/code
/python/小程序/delDuplications.py
Python
py
6,653
no_license
#!/bin/python3 # coding: utf-8 ''' project 目录结构: miniprogram |-component | |-me | |-components |-pages | |-index | |-components | | |-home | | |-mine | |details | |... |-delDuplications.py ------------------------------------- delDuplications.py 必须在这个位置; 无论是 component 还是 page 页面,定义的原则是:文件夹...
fe7d1981b5783fddfe00078b1cc29e36027bc22b
6351991949faece34b0a46874699f8e0aa832750
tuian/Hybrid-Darknet-Concept
/python/daily_summary.py
Python
py
35,773
permissive
# DNS reports from es # Zane Witherspoon # and Terrence Gareau # 25 December 2015 """ Things you have to change when moving from dev to prod IP of ES GEOloc directoty feeds directory """ scanCount = 10 _ESSERVERS = ['0.0.0.0', '0.0.0.0'] _FEEDPATH = '/root/feeds/' _GEOLOCDIR = "/opt/local/share/GeoIP/GeoLiteASNum.da...
1aa577902773cd6a86c586c59ed553ee7b31aac1
cb416420b3867992edd190c5bf1bf830e92be29e
xialuxi/LSNet
/code/mmdet/models/dense_heads/dense_reppoints_v2_head.py
Python
py
62,896
permissive
import numpy as np import cv2 import torch import torch.nn as nn import torch.nn.functional as F import mmcv from mmcv.cnn import ConvModule, bias_init_with_prob, normal_init from mmdet.core import (PointGenerator, build_assigner, build_sampler, images_to_levels, multi_apply, multiclass_nms_pt...
65ded29a1ef6922e99e7eb0c5e8dcef502e72f6a
15558e1c30e8e7b93bc7dea6702b61a5da820df4
DSNR/snippets
/Python/Flask_Blog/07-User-Account-Profile-Pic/flaskblog/routes.py
Python
py
3,668
permissive
import os import secrets from PIL import Image from flask import render_template, url_for, flash, redirect, request from flaskblog import app, db, bcrypt from flaskblog.forms import RegistrationForm, LoginForm, UpdateAccountForm from flaskblog.models import User, Post from flask_login import login_user, current_...
22ce010bf376ffca852c8a20e39b8e2f5526ae86
4005d666794bed80b3f1a557beb303e4025ed694
Azure/azure-sdk-for-python
/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_intent_operations.py
Python
py
28,400
permissive
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
c559db1614e0cc6d0fd74f8760ab4bfb7a27dcc9
40f1eb3e71b29e6aa742d9baa20aff192072da1e
aceglia/pyomeca
/pyomeca/markers.py
Python
py
4,901
permissive
import numpy as np from pyomeca import FrameDependentNpArray class Markers3d(FrameDependentNpArray): def __new__(cls, data=np.ndarray((3, 0, 0)), names=list(), *args, **kwargs): """ Parameters ---------- data : np.ndarray 3xNxF matrix of marker positions names ...
22b03b8022a00a4aedf77fb04a7cb3daff66bb17
2742e7a227c8c623a47fc8d7d569054cd1012e81
openstack/openstacksdk
/openstack/identity/version.py
Python
py
1,208
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 t...
ea44d766a7f48414dee59162a2e677d6960e53b1
9f133a53204cb886eec616fb63801548bc2dcd55
aliicee3/LOGML2021-Learning-Latent-Geometries
/ConvVAE/train.py
Python
py
2,676
no_license
import random import numpy as np import pandas as pd import glob import os import imageio from PIL import Image from sklearn.model_selection import train_test_split import torch from pytorch_model_summary import summary from model import VariationalAutoencoder from train_aux import train_vae def fetch_dataset(dx=50...
68aa9271ce9c8c9e4c6a62997b3fbfaa23894de8
705e92e5e3c7ce99ba81d7444621a34654731012
HarirajRajkumar/iVision-Data-Collector-API-1
/ui/icons_rc.py
Python
py
127,493
no_license
# Resource object code (Python 3) # Created by: object code # Created by: The Resource Compiler for Qt version 5.14.2 # WARNING! All changes made in this file will be lost! from PySide2 import QtCore qt_resource_data = b"\ \x00\x00T#\ \x89\ PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ \x00\x01\x90\x00\x00\x01\x90\x08...
8215b3c09b8d339c1f6686c6dda0e7381cbac5bf
2e653204f315d39f134ec77d64da8b02c2e9a52c
blacng/Python-Test-Driven-Dev
/lists/migrations/0001_initial.py
Python
py
490
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-12-24 21:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Item'...
c1e14cb2d6b088bb6b3c17370889a1a684c5d2e8
bfc7323d51d65012e0d10c688b7ab25cd2e949c9
haydentwestbrook/CalculatorApp
/calculator/operators.py
Python
py
482
no_license
def add(a, b): return a + b def subtract(a, b): return a - b def multiply(a, b): return a * b def divide(a, b): return a / b def integer_divide(a, b): return a // b def root(base, root): return base ** (1/root) def power(base, power): return base ** power def absolute_value(n):...
b14a15bcbd6f42376a2d51d2ff7b3615a27f9a21
dcdf10e4e9453f555f7a3cefc0040e47877e8b5b
itafeng/Python
/Locust/locust_example02.py
Python
py
764
no_license
from locust import HttpLocust, TaskSet, task, between class UserBehavior(TaskSet): def on_start(self): """ on_start is called when a Locust start before any task is scheduled """ self.login() def on_stop(self): """ on_stop is called when the TaskSet is stopping """ self.logout(...
c5cc21e46d7ccae831d7edf0f81c0aa6f4b2d99d
812e70e9c58c8ee76ba4a9ad0ed2ddf84a43a01f
Aroy231/InfyTQ_Problem_Solved
/Python_Fundamentals/Day_2/PROBLEM_8.py
Python
py
963
no_license
''' A teacher in a school wants to find and display the grade of a student based on his/her percentage score. The criterion for grades is as given below: Score (both inclusive) Grade Between 80 and 100 A Between 73 and 79 B Bet...
5f92fae9c7f809b82f4c44c8f96203fb4a1b798a
a90d27c7c5b23053bd228128498f8e34e1ee84fe
ambitioninc/django-localized-recurrence
/localized_recurrence/migrations/0004_auto_20161108_2151.py
Python
py
558
permissive
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2016-11-08 21:51 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localized_recurrence', '0003_offset_data_migration'), ] operations = [ migrations.RemoveField( ...
ad91f0ba7f075cba3e3cec8c65f8e2640843714e
b54094fd3c766bdc4d057eca93533a0dbc3b22d1
stephenfrechette/WNTR-test
/wntr/pyepanet/tests/test_epanet2.py
Python
py
734
permissive
from nose.tools import * import wntr from os.path import abspath, dirname, join testdir = dirname(abspath(__file__)) datadir = join(testdir,'..','..','..','examples','networks') def test_isOpen(): enData = wntr.pyepanet.ENepanet() enData.inpfile = join(datadir,'Net1.inp') assert_equal(0, enData.isOpen())...
3fb227a2db03d416f476aaa3815ec7f7642120b3
bb29e1771dcc829aec9c037418555b97513eb937
amanturzh/parser
/project/cart/migrations/0001_initial.py
Python
py
2,617
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-26 07:13 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depend...
daa2c55d8cfc37e8e201c4d2efd6ef03bbbf560b
eb414043c04ea4146d92fbb45731eb3b115c4157
zorkhax/django-usersettings2
/runtests.py
Python
py
3,300
permissive
import sys try: import django from django.conf import settings, global_settings as default_settings if django.VERSION >= (1, 10): template_settings = dict( TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', ...
5ad6d6ec91b6cb6edd83db88d93d8fc5972f92a6
11270599e21465ff4cce6f8954f13ea8c946adb9
Ivanlovening/tornado-study
/methods/readdb.py
Python
py
515
no_license
#encoding=utf-8 #version:python3.6.0 #Tools:PyCharm 2017.3.2 #Author:yinfei #Email:1073477805@qq.com """ 数据库读操作 """ from methods.db import * def select_table(table,column,condition,value): sql = "select "+column+" from "+table+" where "+condition+"='"+value+"'" mycursor.execute(sql) lines = mycursor.fetcha...
d8458540b21c0eb68dfcffb4eae8e8aa90c91678
0a659e51e3cf8d818afb77177d6f261abed1186c
gaspar44/Docker-Server
/Socket.py
Python
py
1,901
no_license
# Importando módulos necesarios import socketserver # Para tener del lado del servidor corriendo import os # Para trabajar con variables de entorno def borrar_espacios(x): # Funcion que carga una lista en un arreglo y quita el "\n" # Se carga un archivo de texto que contenga la información de la IP with open(x,'r...
c9bbb567fee30cec48c65a3fa00ffb5386785d21
11c85947b204ea03e8637e1e49f60c83e7706b55
daniel-reich/turbo-robot
/YDgtdP69Mn9pC73xN_2.py
Python
py
1,923
no_license
""" This challenge is based on the game Minesweeper. Create a function that takes a grid of `#` and `-`, where each hash (#) represents a mine and each dash (-) represents a mine-free spot. Return a list where each dash is replaced by a digit indicating the number of mines immediately adjacent to the spot (horizont...