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
6dc6ac15c7870d1eb4bc8591b353e9730e097c73
d245b2d42523b01a3760a4f03ea9642008a48c1d
markwu53/tensorflow
/mnist_lean.py
Python
py
2,872
no_license
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import math import time NUM_CLASSES = 10 IMAGE_SIZE = 28 IMAGE_PIXELS = IMAGE_SIZE * IMAGE_SIZE data_dir = "/tmp/tensorflow/mnist/input_data" batch_size = 100 hidden1 = 128 hidden2 = 32 learning_rate = .01 max_steps = 2000 def ...
566572e6ea745b171765f061d137aa018022c3ad
eb7f41e9a28ec52847c3f51bab10d50c6ef0c401
Code-Institute-Submissions/junewjc-project4
/shop/views.py
Python
py
1,127
no_license
from django.shortcuts import render from shop.models import Item from django.views.generic import ListView, DetailView, View from django.db.models import Q # Create your views here. def products(request): context = { 'items': Item.objects.all() } return render(request, "product.html", context) ...
f26396aed7cba883da39f99476be3d5c3ef2974a
d5cea717cfa0aac54400f9c1bccb002e01e09e5b
sinnettluo/ChenProject
/cagey/carbuisness/carbuisness/spiders/lianjia_fang.py
Python
py
22,015
no_license
# -*- coding: utf-8 -*- """ C2017-41-2 二手房和新房分成两个程序,这是新房 """ import scrapy from carbuisness.items import LianjiaFangItem import time from scrapy.conf import settings from scrapy.mail import MailSender import logging import json import random import re import hashlib from hashlib import md5 from carb...
4da6df31c095516ac176237c97802ddc7f7d236e
2cfcfa7746482d44811b2653846db9355521ac26
BaiLiping/DRL
/Lectures/CMU_10-703/HW2/deeprl_hw2/policy.py
Python
py
6,263
permissive
"""RL Policy classes. We have provided you with a base policy class, some example implementations and some unimplemented classes that should be useful in your code. """ import numpy as np import attr class Policy(object): """Base class representing an MDP policy. Policies are used by the agent to choose act...
b3430f2e0c27daede95c8fd330161a56ac3f964b
297525253ae419a9503fa270928329060b252348
steventhan/algo-review
/path_sum_3.py
Python
py
1,144
no_license
from node import TreeNode class Solution(object): def pathSum(self, root, target): # define global result and path self.result = 0 cache = {0:1} # recursive to get result self.dfs(root, target, 0, cache) # return result return self.result def dfs(self,...
97811133210facfcc24b1a1189fa5575a5e4ee21
94d4297d9d099ea0f49160f0b2b7e2c99abf9f4e
adeliacm/atividadeN1
/RPG.py
Python
py
551
no_license
#joguinho #arrumar os textos sala = 1 interacoes = 0 print("bla bla bla do começo\n") while sala != 9 and interacoes < 7: if sala == 6: pass #adicionar funções da sala 6 elif sala == 10: pass # adicionar funções para o Portal else: print("Você está na sala: {}".format(sala)) caminhoEsc...
aa6ec28ed04c53c9b5223ba2be71bcef66579d05
fdc6842d14597f0d12cfe94a1e726c416eecd66a
tzumainn/nova
/nova/virt/libvirt/volume/net.py
Python
py
6,811
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 # d...
aedeac236a4d499bb3a59aa1ef0ca63a404b5a2f
dc22533fd78fab3c990e29b6efb6c027b1914212
benjeffery/sims-backbone
/server/backbone_server/original_sample/get_by_attr.py
Python
py
2,420
no_license
from openapi_server.models.original_sample import OriginalSample from openapi_server.models.original_samples import OriginalSamples from backbone_server.original_sample.fetch import OriginalSampleFetch import logging class OriginalSampleGetByAttr(): def __init__(self, conn): self._logger = logging.getLo...
7f65da8033a74c830a6efa22201113b3669281fb
78f1219bc23c2f267a01d0f3e89424913669ae35
Millad/JavaZone-2019-Deep-Learning-talk
/simple_neuron.py
Python
py
271
no_license
# Millad Dagdoni # Dagdoni.com alpha = 0.1 w = 0.5 x = 4 y = 8 for step in range(10): pred = x * w error = (pred - y) ** 2 derivative_of_error = alpha * x * (pred - y) w -= derivative_of_error print("ERROR: " + str(error) + " PRED: " + str(pred))
b2d5ccd4090d7979ae63018ab18993878fe01900
2e2dc05f11f100549d600a5e639d72824eceb588
Utee9/Basic_Game
/Implement a game module.py
Python
py
759
no_license
'''Implement a game module that checks input from two sources. when the guess is right a level is incremented when the guess is wrong the level is decremented the game stops when level hits zero (0). the first level is one. if the first guess is wrong, program terminated.''' import random Level = 1 Ans = [1,2] w...
71b53f6468b7ca432547a0f85eecd13bdfb60268
9ebe6a343b4545b8bad7d3aa00b17e738e191178
jeremie-koster/galaxy-classification-yotta-project
/gzoo/app/train.py
Python
py
12,341
permissive
import logging import os import time import warnings import torch import torch.distributed as dist import torch.multiprocessing as mp import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import wandb from gzoo.domain import pipeline from gzoo.infra import utils from ...
51ddd252091e9df8fb01857f6e7fb8fe30f83cc9
c679d2ee28837bfe4c6b606f5e93f04186affc00
Dustver/my-scripts
/OTHER/use_some_libs.py
Python
py
1,054
no_license
import requests import os import sys import glob import shutil from datetime import datetime import random r = requests.get('http://ya.ru') r.status_code # -> 200, if ok r.text # -> html page sys.argv # входящие параметры для запуска исполняемого файла из терминала [0 - имя самого файла, 1 - первый параме...
2f384f900d9164d92871557cf3de64074c8a7117
26382ae666c0e7c84cb3b53cf400242781fef7f8
OhmniD/CodeClan_Week05_Full_Stack_Solo_Project
/console.py
Python
py
3,873
no_license
import pdb from models.driver import Driver import repositories.driver_repository as driver_repository from models.team import Team import repositories.team_repository as team_repository from models.driver_team import DriverTeam import repositories.driver_team_repository as driver_team_repository from models.round ...
8db2099fc939aa5716a848b36eba450e8b888a3d
e05f64d8b2860be511c475e119e8131b518abc1b
toddlers/azfuncs
/dumprequests/__init__.py
Python
py
462
no_license
import logging import json import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') return func.HttpResponse( json.dumps({ 'method': req.method, 'url': req.url, ...
6c3ac2fc91083e68c9b71b4c626dc9708192df4b
4f067377d562bb26d16844f6924d8a3bc9b81834
linchiamin/Athena-SWAN-Dashboard
/index.py
Python
py
6,404
no_license
# package imports import dash import dash_bootstrap_components as dbc import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State from dash import no_update from flask import session, copy_current_request_context # local imports from auth import authenticate...
bea881bb7b833754037bca9feaef88fcc92ed62f
aaebc7736ac745c32840e08360bf3e2d5e08a5c9
reubenjohn/creative_diversity
/models.py
Python
py
3,482
permissive
from math import pi import tensorflow as tf from tensorflow.python.ops.rnn_cell_impl import LSTMStateTuple from tflearn.layers.recurrent import BasicLSTMCell class QuadraticLSTM(BasicLSTMCell): def call(self, inputs, **kwargs): """Long short-term memory cell (LSTM). Args: inputs: `2-D` tensor with shape `[...
b1b8e6ed268d5562edd66c06fe016d5371e3d351
9ef2738e739f2ab7f6e4ca446f79cf2b6522b6c1
joshmreesjones/algorithms
/math/power_recursive.py
Python
py
399
no_license
def power(y, n): """Raise y to the power of n.""" if n == 0: if y == 0: raise Exception("0^0 is undefined.") return 1 else: temp = power(y, n // 2) # Integer division if (n % 2 == 0): return temp * temp else: return y * temp * temp ...
5f437cfbd5363671e5fb302d9c2edbb42425f878
5c0ac511c842998ce0dad8ab7805e51d095fbb14
mwarkentin/cfgov-refresh
/cfgov/core/tests/test_missing_migrations.py
Python
py
365
permissive
from six.moves import cStringIO as StringIO from django.test import TestCase from core.scripts.missing_migrations import migrations_are_missing class MissingMigrationsTestCase(TestCase): def test_check_for_missing_migrations(self): if migrations_are_missing(out=StringIO()): self.fail('missin...
80cb604c61892c13d23c44fbc0d76c6fa41a2049
3bd95fc8c59b3384dc665d83e5bca00c949e7093
KashifInayat/Bfloat16_for_TF
/scripts/matrix_addition.py
Python
py
684
no_license
# # This script performs a matrix-matrix addition for real numbers in single # precision. # # imports import tensorflow as tf import os import sys # first matrix in float32 a = tf.constant([[1, 2, 3], [4, 5, 6]], dtype=tf.float32) # casting from flot32 to int32 to bfloat16 tf.cast(a, tf.int32) tf.cast(a, tf.bfloat16...
5c187f877f01e24a6105be6e20be573b3176663a
07f3733e6a899d097c05fe7bfcf08cc81463ef17
QiaoXingLi/chainercv
/chainercv/utils/testing/constant_stub_link.py
Python
py
2,301
permissive
import numpy as np import chainer class ConstantStubLink(chainer.Link): """A chainer.Link that returns constant value(s). This is a :obj:`chainer.Link` that returns constant :obj:`chainer.Variable` (s) when :meth:`__call__` method is called. Args: outputs (~numpy.ndarray or tuple or ~numpy....
b64dec7689526582d1d87d2b848505286d369f30
6006cf18480d8a8a9867308a7c0911262d38ec2e
xingyanan/darknet2caffe
/cfg.py
Python
py
10,849
no_license
#import torch from collections import OrderedDict def parse_cfg(cfgfile): def erase_comment(line): line = line.split('#')[0] return line blocks = [] fp = open(cfgfile, 'r') block = None line = fp.readline() while line != '': line = line.rstrip() if line == '' or...
7d91d849bb7e0247f9af7e061924a5467e2cd0c4
be99737e4b89d7a8319f49ced77c5169ff46a074
litiedan/orb
/sifttest.py
Python
py
669
no_license
import cv2 import numpy as np #import pdb #pdb.set_trace()#turn on the pdb prompt #read image img01 = cv2.imread('/home/lzq/图片/01.png',cv2.IMREAD_COLOR) gray01 = cv2.cvtColor(img01,cv2.COLOR_BGR2GRAY) img02 = cv2.imread('/home/lzq/图片/02.png',cv2.IMREAD_COLOR) gray02 = cv2.cvtColor(img02,cv2.COLOR_BGR2GRAY) # cv2.im...
35e99cae99c1c45dbc483c00ae5bfbb1f3fbf9d3
d5c06f54bc3d1f690e9694bcef7edeacccb1508b
chancejiang/tiddlyweb
/test/test_web_bag.py
Python
py
12,181
permissive
""" Test that GETting a bag can list the tiddlers. """ import httplib2 import urllib import simplejson from fixtures import muchdata, reset_textstore, _teststore, initialize_app from tiddlyweb.model.bag import Bag from tiddlyweb.stores import StorageInterface policy_dict = dict( read=[u'chris',u'jeremy',u'...
7c7cba63af6899f576efe087cda39da5cea867ac
f0b58dfabd8a21a8e995b466a4d677062900af3f
rmFlynn/MMseqs2_vs_HMMER_on_VOGDB
/test_pipline.py
Python
py
1,936
no_license
"""Do a fast unittest""" import os import unittest from datetime import datetime from mmseqs_from_setup_to_sweep import download_all_vog_data, \ process_vogdb_profile, process_vogdb_target, mmseqs_search, WORKING_DIR TESTING_DIR = ("/home/projects/DRAM/hmmer_mmseqs2_testing_take_2/mmseqs/" "test_" +...
e8fd5722c08b55ac5c9caf5121f8be54027372a6
11a143d15938929c1cf365357e92b84101163856
brerickner/AirBnB_clone_v3
/tests/test_models/test_engine/test_file_storage.py
Python
py
5,651
permissive
#!/usr/bin/python3 """ Contains the TestFileStorageDocs classes """ from datetime import datetime import inspect import models from models.engine import file_storage from models.amenity import Amenity from models.base_model import BaseModel from models.city import City from models.place import Place from models.review...
ed3110c485a46316402422cfed99b16414983ccb
e1dfb524fce851f4be6483de7b2d20d57424fd36
Lucas-vdr-Horst/VIS-group-C
/simulation/run_simulation.py
Python
py
10,442
no_license
from simulation.classes.Lane import Lane from simulation.classes.World import World from simulation.classes.Car import Car from simulation.classes.Signal import Signal from simulation.classes.InductionCoil import InductionCoil from simulation.classes.Location import Location from simulation.classes.SignalManager import...
e9d020086e9a2019cc197c759b66649ce2f734be
f349220b03dd68e0fdb7412ffc115cc5227cd3a0
JimZock/CVDL_HW2
/src/utils.py
Python
py
4,477
no_license
import torch import torch.nn as nn import numpy as np class BBoxTransform(nn.Module): ''' Transform Anchors to Prediction Bounding Boxes ''' def __init__(self, mean=None, std=None): super(BBoxTransform, self).__init__() def forward(self, boxes, deltas): # get w, h, x, y of an...
729f9b2869aeb844fff6e07ebe8c4e4ba2d5d33a
ab506b710fe674343b73aee375f60b73315f4cff
ml5885/Shipworthy
/steering.py
Python
py
4,794
no_license
from imutils.video import VideoStream import numpy as np import cv2 import imutils import time from directKey import W, A, S, D from directKey import PressKey, ReleaseKey greenLower = np.array([36, 25, 25]) greenUpper = np.array([70, 255,255]) video = VideoStream(src=0).start() time.sleep(2.0) initial = True fl...
93c29e87d0926f59d2117cffba30bbcba85eed8d
43d2950b8fc5e7597d1730f0fc5cde594cd749e0
rikkimax/zimp-interface
/interface/zimp/engine/gamestate.py
Python
py
1,782
no_license
from zimp.engine.defs import Direction class GameState: current_tile = None foyer_tile = None dev_cards_used = [] dev_cards_iteration = 0 item1 = None item2 = None health = 0 has_totem = False def setup_new_game(self): """ Configures self for a new fresh game. ...
e62e56312fe11a86b2428784a5a908635885ebfb
c74534522c6cc1c5e44d3e3ece4608dc9821180d
AlwaysYunJie/Omg
/Page/sell_page.py
Python
py
4,529
no_license
# coding:utf-8 from Omg.Common.Base_Page import BasePage from selenium.webdriver.common.by import By class Sell_Page(BasePage): # 定位器 menu = (By.XPATH, "/html/body/div[1]/div/div[1]/div[1]/div/ul/li[2]/div/span") #销售中心按钮 xiansuo = (By.XPATH, "//*[text()='线索']") #线索按钮 company_name = (By.XPATH, "/ht...
7029516f8731365914489b745a1bffe73402174a
ec8e69ae82ef3b6be35e111e3e9e19ae42539da8
szymek156/project_euler
/36.py
Python
py
1,627
no_license
def isDecimalPalindrome(binPalindrome): candidateDecimal = int(binPalindrome, 2) if candidateDecimal >= 1000000: return False candidateDecimalString = "" + str(candidateDecimal) # It may be more efficient to check by %10 /10, but come on, waste of time to write this... ...
fb23fb787834929d135009b89f14a2b0bf4e6cea
cbf1e5e61369d1d9a060108fe071b24308ec7119
shane-constantine/mysite
/blog/migrations/0004_auto_20181124_1604.py
Python
py
349
no_license
# Generated by Django 2.1.3 on 2018-11-24 08:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0003_auto_20181122_2026'), ] operations = [ migrations.AlterModelOptions( name='blog', options={'ordering': ['-creat...
9d6d6e23c832c5e9969ada2b67acbaa4fdc4a6f0
da9cae1b784abd04423e550398137029ae2d5380
NanaLange/CL-HAABSA
/lcrModelAlt_hierarchical_v1.py
Python
py
13,613
no_license
#!/usr/bin/env python # encoding: utf-8 import os, sys sys.path.append(os.getcwd()) from sklearn.metrics import precision_score, recall_score, f1_score from nn_layer import softmax_layer, bi_dynamic_rnn, reduce_mean_with_len from att_layer import bilinear_attention_layer, dot_produce_attention_layer from con...
dbd5dea495da1563bc0cff5956c0de57484eb074
76c89e9d6f2cec735e0956dafe944789a3c10884
rakib06/Introduction-to-Python
/Functions/Parameters and call arguments/param_args.py
Python
py
321
no_license
def foo(x): # x is a function parameter print("x = " + str(x)) # pass 5 to foo(). Here 5 is an argument passed to function foo. foo(5) # define a function named 'square' that prints square of passed parameter def square(x): print(x ** 2) square(4) square(8) square(15) square(23) square(42)...
ee9f3d3b4378e17655635cc2c2ebeb71440ea5d9
2d54388639d1672085529f4908eb7e1e9251453c
swelanauguste/july
/apps/core/migrations/0002_auto_20210313_1140.py
Python
py
524
no_license
# Generated by Django 3.1.7 on 2021-03-13 15:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.AlterField( model_name='ticket', name='status', fiel...
cc5065def2af12974e9efc58979f541ae4678be3
6accf90dd5651fb1c42ce5008259b45a7755740b
OscarEduardo/WSQ
/WSQ10.py
Python
py
933
no_license
# WSQ #Oscar Eduardo Sanchez import math def suma(L): s= sum(L) return s def standard (L): s= suma(L) r= math.sqrt(s) return r def average(L): a= suma(L)/10.0 return a a=float(input("Dame el primer numero: ")) b=float(input("Dame el segundo numero: ")) c=float(input("Dame el tercer numero: ")) d=float(input(...
911c4b9fbe75f9c6024295f94c1ab93a1eb65b8d
9c470fdc23327c4e8cfaea75b59ae6dd75962318
NandoGHub/ciclohapp
/orders/models.py
Python
py
1,491
no_license
import uuid from django.db import models from django.utils import timezone from orders.services.dollar_trading import DollarTradingService from products.models import Product class Order(models.Model): uuid = models.UUIDField( "UUID", default=uuid.uuid4, editable=False, unique=True, primary_ke...
9264bc76b49032230906e2f59787ea657d6093dc
03c7560022543f279fa4263777722f946ecb549e
JaksonCasas19/TauraikApp
/blog/admin.py
Python
py
475
no_license
from django.contrib import admin from django.db import models #Importar el modelo categoria y post from .models import Categoria,Post # Register your models here. #Agregar las clases creada hacia el panel de administración class CategoriaAdmin(admin.ModelAdmin): readonly_fields=('created','updated') class PostAd...
65895426ae815388e3cf05ce7af95f44af54ab28
9ca02668cd5a1ed8bd9516f56c1cebda746ae7c2
skrambelled/django-models
/blog/migrations/0001_initial.py
Python
py
670
no_license
# Generated by Django 3.1.4 on 2020-12-16 01:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Post', fields=[ ...
0593fae3c27f49f81bac0deae37ce24e2b746f70
5393e331a6bf9ed9ba4bd629926563e4a197d1ed
glher/PHASED
/pgm/tests/test_inference/test_ExactInference.py
Python
py
21,437
no_license
import unittest import numpy as np import numpy.testing as np_test from pgm.inference import VariableElimination from pgm.inference import BeliefPropagation from pgm.models import BayesianModel, MarkovModel from pgm.models import JunctionTree from pgm.factors.discrete import TabularCPD from pgm.factors.discrete import...
b91b4fbffebd3aafce57e4ea164e56e4afd055ea
0a35a6361b850c627a4f24a5010f5df4d80b39ce
busyjeter/monstagram_own
/cmdb/urls.py
Python
py
411
no_license
from rest_framework.urlpatterns import format_suffix_patterns from cmdb import views from django.conf.urls import url urlpatterns =[ url(r'^user_list/', views.UserView.as_view()), url(r'^user_detail/(?P<pk>[0-9]+)/$',views.UserDetail.as_view()), url(r'^resource_list/', views.ResourceList.as_view()), url(r'^comment...
7d67175da68dbcb2c5c9aea99743a99f4c780295
b226159145b5e8e00a67bd7d4a20ab932490a5fc
rakeshadk7/Spark
/degrees-of-separation-2.py
Python
py
829
no_license
from pyspark import SparkConf, SparkContext import os startId = 5306 targetId = 14 conf = SparkConf().setMaster("local").setAppName("MinTemperatures") sc = SparkContext(conf = conf) hitCounter = sc.accumulator(0) def format(line): fields = line.split() heroId = fields[0] connections = map(int, fields[1:0...
f8d9addf13c6f0ff67476d32406f7c692200ee80
7b35bcaa90dd5ddb896b2049a9692f2c3ec0114b
hybridNeo/drift
/ipc/test.py
Python
py
1,604
no_license
import asyncio from driver import Driver from drivercontroller import DriverController, Handle from fifo import FifoListener, FifoWriter from multiprocessing import Process import time drivers = [('a',),('b',)] def start_drivers(): d = [] for i in drivers: d.append(Driver(i[0])) res = [] fo...
f3c88de0deb2354e6a48bec6e745bc7459691c06
88e31494900ea2be55de7fc62e18688f55e86739
moraorviz/python-api
/tests/test_creativework_model.py
Python
py
1,621
no_license
''' Created on Nov 24, 2018 @author: mario ''' import unittest import time from app import create_app, db from app.models import Person, CreativeWork import datetime class BookModelTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app...
19727fb0bc420697ec07880f7403197630e25647
8a73b014944960001ecb0dd92e86e20de906952a
manheim/eds
/eds/interfaces/task.py
Python
py
318
permissive
from eds.interfaces.plugin import Plugin class Task(Plugin): """eds.task interface.""" interface_name = "eds.task" schema = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "eds.task", "title": "Task", "type": "object", "properties": {} }
6303d19e8fcc3b5b63e87d07f41a5c0602a46dfb
902947b00fa0466a849dda310de2c431169aa862
piotradamczyk5/gcloud_cli
/google-cloud-sdk/lib/tests/e2e/surface/compute/backend_buckets/backend_bucket_test.py
Python
py
7,424
permissive
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
7bfaced1d4e11f1250ac9be810330faad18b1bbb
2b2ed0a49db29c1d263e2caf9b811ef94837819c
Rogerio11/merofolio
/portfolio/settings.py
Python
py
3,676
no_license
""" Django settings for portfolio project. Generated by 'django-admin startproject' using Django 3.0.2. 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 ...
eaa96bb48fa957506afe410a8105cdfe2c826933
80ff76b0f4de67535fd1aca66d4eea548aeb14fd
PauloGiovani/Unisal
/Tutorial - Finalizado/03_nave_jogador.py
Python
py
7,716
no_license
# ----------------------------------------------------------------------------- # 03_nave_jogador.py # # Insere a nave do jogador # Autor: Paulo Giovani # Data: 20/08/2018 # Atualização: 01/10/2018 # ----------------------------------------------------------------------------- import arcade import os import random # ...
903fa7971b1eec59a3608333a1afa0fea241d334
25ba7b0fcf77dc9f6ce63dbf4f4bf5d758120185
j0park/Python
/B01PitaPatPython/ch06/b01_178_01.py
Python
py
206
no_license
#ch6 page 178 # 반복문 # 5번 반복 import turtle t=turtle.Turtle() t.shape("turtle") for i in range(1,6,1): t.fd(50) t.left(144) i=1 while i < 6: t.fd(150) t.right(144) i=i+1
95774fa19f4ae21ba980747580d5fb20a4b8135f
561a3b6dc60e264a4f4f8ea6bee3c39e0c9d336c
harshp8l/deep-learning-lang-detection
/data/train/python/561a3b6dc60e264a4f4f8ea6bee3c39e0c9d336curls.py
Python
py
636
permissive
from django.conf.urls import patterns, include, url urlpatterns = patterns('cityproblems.comments.views', url(r'^getCommentHTML/$', 'getCommentHTML', name='getCommentHTML'), url(r'^rmCommentJSON/$', 'rmCommentJSON', name='rmCommentJSON'), url(r'^save...
8b829a41dc7a7086df5d2ce8e4c1a2052e3d5883
30d8f750559b7811d66760741905fa8adf80fd1f
luciali0/incubator-aurora
/src/main/python/apache/aurora/client/cli/standalone_client.py
Python
py
4,627
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 ...
fd2b737a44a65b750a238ffa2c3b3531bb1743dd
81adef8a2b2a3da45b8546e3c584d2cd4a2f1d8f
andiangeline/atom_scripts
/module7.py
Python
py
422
no_license
#module7 #okteto login #okteto namespace #okteto up #source webdash2/bin/activate #python -m pip freeze > requirements.txt (have to do this everytime when okteto up) #pip install plotly_express #plotly_express can translate graphs into html snippets #pip install ninja2 #ninja2 enables you to use python containers i...
f790bdee4992fb28049f17eba7d0b7f2544e01f9
6fbda36ea41dd4c47f309e3828311920e93fe202
khchine5/book
/docs/dev/newbies/3.py
Python
py
1,047
permissive
# class inheritance class Vehicle(object): number_of_wheels = None def get_speed(self): """Return the maximum speed.""" raise NotImplementedError class Bike(Vehicle): number_of_wheels = 2 def get_speed(self): return 20 class Car(Vehicle): brand = None ...
c42d89077594da93f84e17f56effc8c35ca3acf8
3d79357727bb75f7b10b14150205291f6b8a904c
cata-b/StudentRegister
/Test/Student.py
Python
py
795
no_license
import unittest from Domain.Student import Student from Domain.CustomErrors import InvalidParametersError class Test_Student(unittest.TestCase): def test___init__(self): s = Student(1, "foo") self.assertEqual(s.ID, 1) self.assertEqual(s.Name, "foo") with self.assertRaises(InvalidPar...
8b73b6681d019a1e28eb41bb0f0c13bccf816cc5
323f345a0c03a8afaa0476db0826fbbab0a9d0b9
Holemar/notes
/01.Python/6.杂/使用dict减少消耗.py
Python
py
1,284
no_license
# -*- coding:utf-8 -*- """示例1: 使用 dict 减少数据库消耗""" from bello_adam import ResourceDocument from bello_adam.io.fields import IntField, ListField, StringField, DateTimeField, ObjectIdField from bello_adam.models.user import User from bello_adam.models.company import Company class Account(ResourceDocument): ...
aa6b5a710ed04594e9a0d79a8df0740685e068d6
1619cdf7e5bc284846ecc803129e571b8a96774b
tlynch14/FastAPIBlog
/db_conf.py
Python
py
480
no_license
import os from dotenv import load_dotenv from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker load_dotenv(".env") SQLALCHEMY_DATABASE_URL = os.environ["DATABASE_URL"] engine = create_engine( SQLALCHEMY_DATABASE_URL, ...
50fca81725a0d0746405bbf3993cac34e87ae204
0223e4b2e5afe0b4068a2c0e9974b83888236797
fractal13/dixie-acm-problems
/y15m01d15/py_ropes.py
Python
py
702
no_license
#!/usr/bin/env python def main(): line = raw_input("") values = line.split() N = int(values[0]) while N > 0: Ps = values[1:] Ls = [ 50, 60, 70 ] s = "" total_height = 0 for P in Ps: total_height += int(P) for L in Ls: if 2*total_h...
1a25a136cfcd36fd97a7f38b29e94db83993744f
765d14f682978e9fa0e507975abfdea25aa3dc90
guhubzd/xlm-roberta-ner
/main.py
Python
py
8,703
permissive
from __future__ import absolute_import, division, print_function import argparse import csv import json import logging import os import random import sys import numpy as np import torch import torch.nn.functional as F from pytorch_transformers import AdamW, WarmupLinearSchedule from torch import nn from torch.utils.d...
c76394d07d2759ddcc8488ef19c0e01184f49866
790e85f5f27bef2db7fa0bc48bcc74b1f32b1f15
J14032016/LeetCode-Python
/leetcode/algorithms/p1299_replace_elements_with_greatest_element_on_right_side_2.py
Python
py
633
no_license
import heapq from typing import List class Node(object): def __init__(self, value: int, index: int): self.value = value self.index = index def __lt__(self, other): return self.value < other.value class Solution: def replaceElements(self, arr: List[int]) -> List[int]: len...
6ddd03e5eab1deffa1609ccdafaadf6e00238c0b
dca766c236f037ba10f4ec09d6739d7a30432902
suoliwengmemory/xinquan
/Contact/migrations/0001_initial.py
Python
py
1,186
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-08 14:48 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
20aa1c3b31664dbd5a92f66b5799f1e164bd1b78
a3b54be67c5c7f2a0842df31f7a38aab24d1f132
Rejah1/DjangoApp
/testing/testing/settings.py
Python
py
3,147
no_license
""" Django settings for testing project. Generated by 'django-admin startproject' using Django 1.11.6. 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...
46a13aad5e9a1feb9f58e73bc5af7efe3119fa6a
241d60edb5f03860026c7ea1b5a987bea8567215
shthakur/traffic_signs_recognition
/modules/EarlyStopping.py
Python
py
2,487
permissive
import numpy as np import os from .utils import utils class EarlyStopping(object): def __init__(self, model, optimizer, params=None, patience=100, minimize=True): self.minimize = minimize self.patience = patience self.model = model self.optimizer = optimizer self.params = p...
1ce7e0dbe6861a08c2c08d86ba2d5b7fb945e8b2
a1a8ab767a004abb9b41f5535a849f57d48afcbf
aathi1/Scraping-SERP
/SERP.py
Python
py
6,064
no_license
from urllib.parse import urlparse, quote import requests from bs4 import BeautifulSoup import time from pandas import read_excel import threading """ What we are doing here is searching terms, by forming the urls and extracting links and titles from the google's first page results. rest are just string manipulation ...
5dcbfee60ae2fe3154571a0a76570b761cb769dc
198e0932c6cefce6857ed7dd5c131e156c13b649
zhunyoung/dlpmln
/examples/mnist/baseline/train.py
Python
py
1,178
no_license
import sys sys.path.append("../../../") import time import torch from dataGen import dataList, obsList, test_loader from dlpmln import DeepLPMLN from network import Net ###################################### # The dlpmln program can be written in the scope of ''' Rules ''' # It can also be written in a file ########...
77f5f4a20cf7d7e66cbafa3bed4a570cac01ea60
bfe0019313009833b5966caa64422af5eec2eb85
josephsdavid/qtw_final
/py/d_scratch.py
Python
py
7,063
no_license
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import csv from typing import Dict, Any from collections import Counter from sklearn.metrics import make_scorer from sklearn.metrics import confusion_matrix def custom_loss(y_true, y_pred): cm = confusion_matrix(y_true,...
15f47117371b324452468e2cfccd9b971e5f1710
480864e279b02afba4224c165ff8c16c1e0f26bd
cprakashj01/symfem
/demo/stiffness_matrix.py
Python
py
1,196
permissive
""" This demo shows how Symfem can be used to compute a stiffness matrix. """ import symfem from symfem.vectors import vdot from symfem.calculus import grad # Define the vertived and triangles of the mesh vertices = [(0, 0), (1, 0), (0, 1), (1, 1)] triangles = [[0, 1, 2], [1, 3, 2]] # Create a matrix of zeros with t...
a6d8361eda304e597f27a38a57345cdc1bd8d719
cccf8c25c218ab22207f328547a1d3992dfd1860
kam1nskiy/PyIntro140121
/hw11.py
Python
py
1,473
no_license
import json import re # 1. Необходимо написать функцию, которая считает эти данные из файла. Параметр функции - имя файла. def read_json_file(file_path): with open(file_path, encoding="utf-8") as json_doc: content = json.load(json_doc) return content data = read_json_file(r"C:\Users\kaminskyi\Pych...
d1c7dd198c1243021727f4566b50838896035187
3d0c71fafdb23b4893753f8fb4545b50761c8335
Adminiuga/home-assistant
/homeassistant/components/upnp/sensor.py
Python
py
5,811
permissive
"""Support for UPnP/IGD Sensors.""" from __future__ import annotations from dataclasses import dataclass from homeassistant.components.sensor import ( SensorEntity, SensorEntityDescription, SensorStateClass, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import DATA_BYTES,...
71041a7d0dc783cd7ff7b1f4ab9aa1577b28683a
d39daa0d0a26c45fe7eba37089f7c0874e0d64c4
Yilia-Wish/closure-templates
/python/sanitize.py
Python
py
17,279
permissive
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
2b1c914f9dbcf3538ae801ca464881e9f99aebab
899742f2eaf85d4a6c2580552e20b53c5396382c
davidcrc/molec
/Practica_01/A/practica01A_1.py
Python
py
1,901
no_license
import sys # Practica01A_1 : Transcribir y traducir una cadena # python practica01A_1.py practica01A_1.txt # bases3 = { 'UUU':'F', 'UUC':'F', 'UUA':'L', 'UUG':'L', 'UCU':'S', 'UCC':'s', 'UCA':'S', 'UCG':'S', 'UAU':'Y', 'UAC':'Y', 'UAA':'.', 'UAG':'.', 'UGU':'C', 'UGC':'C', 'UGA':'.', 'UGG':'W', '...
8cb709ce2b52f4ed73a52bc29de3a6c8a0b20508
816233595991230e4378c4a93371cf3c624bb4fd
sornas/aoc
/20/py/d04.py
Python
py
2,483
no_license
#!/usr/bin/env python3 import aoc20 import sys def pt1(_in): valid = 0 want = {s for s in "byr iyr eyr hgt hcl ecl pid cid".split()} for line in _in: if line == "\n": if len(want) == 0 or (len(want) == 1 and "cid" in want): valid += 1 want = {s for s in "by...
9217284d33e31c44e8e6c4508723820b5dca806f
f9c14d299c6151a65175cbfead78c58fc6588710
HemantR88/angr
/angr/knowledge_plugins/comments.py
Python
py
340
permissive
from .plugin import KnowledgeBasePlugin class Comments(KnowledgeBasePlugin, dict): def __init__(self, kb): super(Comments, self).__init__() self._kb = kb def copy(self): o = Comments(self._kb) o.update({k: v for k, v in self.items()}) KnowledgeBasePlugin.register_default('c...
e25b9c07dc4fdfc244fc45fcef0176e7efe6aed9
203abc0f176b0477fe5030b16c00f14d8b8cbdc8
GerhardusM/google-ads-python
/google/ads/googleads/v10/services/types/customer_feed_service.py
Python
py
6,555
permissive
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
78bc3b771d61d846f2cd536a860ed044f434b1c6
7767f0035c012a71e622633ba0dec83eb475b7e4
praekeltfoundation/ndoh-hub
/changes/migrations/0009_add_registrant_id_index_to_changes.py
Python
py
391
permissive
# Generated by Django 2.2.2 on 2019-06-13 11:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("changes", "0008_auto_20181015_1002")] operations = [ migrations.AlterField( model_name="change", name="registrant_id", ...
0c1ffeaf8aae2328b4dbd8c8107c92b2b22c9209
d7b9855a7863383d96375911b04d5d71482dbf98
nhuntwalker/django-graph-api
/django_graph_api/graphql/types.py
Python
py
11,427
permissive
from collections import ( OrderedDict, Iterable ) from inspect import isclass import copy from django.db.models import Manager from django.utils import six from django_graph_api.graphql.utils import get_selections SCALAR = 'SCALAR' OBJECT = 'OBJECT' INTERFACE = 'INTERFACE' UNION = 'UNION' ENUM = 'ENUM' INPU...
0f463b814ab763491c4057d50edd006cee4afafd
68e78cdad6050bd91f4272861a9ddac82ba559d1
smccaffrey/plex-etl
/src/utilities/parser/parse.py
Python
py
4,809
permissive
# Credit to https://pypi.org/user/divijbindlish/ for this class import re from src.utilities.parser.patterns import patterns, types class ParseFileName(object): def _escape_regex(self, string): return re.sub('[\-\[\]{}()*+?.,\\\^$|#\s]', '\\$&', string) def __init__(self): self.torrent = No...
97e4eb1ed386e4fd5749752ddc819e356820d43f
3f5c2a704021209fdce36d1542bb6c87e060c5ff
AeroAndZero/LAD
/light_mean.py
Python
py
2,345
permissive
import cv2 import numpy as np import math img = cv2.imread("images/5.jpg") img = cv2.resize(img,(500,500)) cv2.imshow("Original",img) copyImg = np.copy(img) img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #Parameters whiteMin = 180 blackMax = 128 avgThreshold = 70 whiteAvg = [0,0] whiteCount = 0 blackAvg = [0,0] blackCoun...
f8874277ceefa134f35c93bc76da2dd9fa44efb4
a842c96bf9e67d1d9ef12e5369f6b57ee5fc7eaf
cenima-ibama/painelmma_api
/loginApp/views.py
Python
py
962
permissive
from django.shortcuts import render from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.authtoken.models import Token from rest_framework.response import Response from .models import UserPermited # Create your views here. class ObtainPass(ObtainAuthToken): def post(self, request):...
a6394a014a78e2cddc400f0ff29cc1b055ffb73d
dfbf7846f8b82c53865859b98ca2258754c51595
Danielnewheart/Daniel-s-Blog
/forms.py
Python
py
1,318
no_license
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import DataRequired, URL, Email from flask_ckeditor import CKEditorField # #WTForm class CreatePostForm(FlaskForm): title = StringField("Blog Post Title", validators=[DataRequired()]) subtitle =...
3bd933e9023f690fed0c6dd55d62b988cd771e79
ff73cd3867b70668988ad97e23125c98acc12028
andyspb/python-test
/src/test/test.py
Python
py
4,184
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- import os import datetime import sys import time class Enrichment: HELP_MSG = "Enrichment: Make enrichment for ORDER DBS.\n" \ "Usage: ./make_enrichment.py [DATE=YYYYMMDD]\n" \ "Required Environment Variables:" \ "\n\t$MAIN_DAT...
3ec101254f840510aa0c93adc11d64d56147a3c4
50d836ef36a8b75b54c093eaf6e9712e68556000
hku-systems/naspipe
/throughput/translation/fairseq/data/language_pair_dataset.py
Python
py
7,022
no_license
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # #--------------------------------...
1f40e27b77bb83aeec95e2759c533373c918822a
09de95f6d323998fe4c80e71ad33aa8489fcfabd
zephyrGit/python_excise
/django+flask/axf/AXF/AXF_/settings.py
Python
py
5,119
no_license
""" Django settings for GZAXF project. Generated by 'django-admin startproject' using Django 1.11.7. 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 f...
86de74307ffb8e56292516d737a50054f4ea0b04
823b7d5f1c27c249b65308b30bd16575d237e7f4
hemant-mehra/Django_projects
/lectures_code/Django_level_three/basicforms/basicapp/forms.py
Python
py
1,110
no_license
from django import forms #add for validators and add validaotr in bothcatcher@@ from django.core import validators # def check_for_z(value): #** # if value[0].lower()!='z': # raise forms.ValidationError("NAME NEEDS TO START WITH Z") class FormName(forms.Form): name=forms.CharField() # name=forms.C...
a555e0fbd32ff88667cff60d9f5e759c3f7e9eee
0b68774b279796091c7662a7d1357ebc1fe7520c
tommycoleman87/real_estate_project
/btre/settings.py
Python
py
3,546
no_license
""" Django settings for btre project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os from p...
fd6fc21587a27ea0a70167417c358184d8aeb4b8
3eb9c93bd79aad5c23fb66d27c61051f938a9c6b
anaruzz/holbertonschool-machine_learning
/supervised_learning/0x0D-RNNs/5-bi_forward.py
Python
py
917
no_license
#!/usr/bin/env python3 """ Script that represents a bidirectional cell of an RNN """ import numpy as np class BidirectionalCell(): """ Class that represents an bidirectional unit """ def __init__(self, i, h, o): """ class constructor """ self.Whf = np.random.normal(size...
b5d9901e676fc4e0b69b2c38a1081b70965eeb2e
a7cc467d9f548a423f86470f38fbd98595775e25
pysiakk/CaseStudies2019S
/models/openml_boston/classification_binaryClass/aad366f6d5961bc98783c2ad9fb3918d/code.py
Python
py
2,375
no_license
#:# libraries from sklearn.svm.classes import SVC from sklearn.preprocessing import Imputer, StandardScaler from sklearn.pipeline import Pipeline from sklearn.model_selection import GridSearchCV, train_test_split from sklearn.metrics import accuracy_score, precision_score, recall_score, roc_auc_score, f1_score, confus...
13e48f42b0ba57378a07997d2cc8b54de13f9333
0c3ae619d75a09205ff2c30e4a26cd741d3b4b80
mxaddict/navcoin-core
/test/rpc-tests/segwit.py
Python
py
12,234
permissive
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test the SegWit changeover logic # from test_framework.test_framework import NavcoinTestFramework from te...
ef9f8de52169396641aa23cb128934d03c6079d6
5ed04dd56f5b9903f8d53a311eb96f7a56f40a3a
rolanAkhmad/klimat7_shop
/apps/store/migrations/0011_auto_20210401_1137.py
Python
py
646
no_license
# Generated by Django 3.1.5 on 2021-04-01 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0010_auto_20210320_1446'), ] operations = [ migrations.AddField( model_name='product', name='in_stock', ...
c33b510e2a2095ce4a60caafd91430442f98024c
08abb96c80a4b93f1822775b67ab17414b221190
LordGolias/Brytenwalda
/source/mission_template_triggers/fall_backwards.py
Python
py
3,740
no_license
from source.header_operations import * from source.header_triggers import key_left_shift, gk_move_backward from source.header_troops import tf_male, tf_female ## Beaver - Mission Template for tripping when walking backwards - SP ONLY common_andar_cae = (1, 0, 5, [ #Check every second, if conditions pass, only re-run ...
3b2a9790d8f9f8f2702f0f0ae76c97a0d6338c79
15a8574649d401c8ce07fa31416916ac4bdec100
jlucchese/python-boleto
/pyboleto/data.py
Python
py
17,339
permissive
# -*- coding: utf-8 -*- """ pyboleto.data ~~~~~~~~~~~~~ Base para criação dos módulos dos bancos. Comtém funções genéricas relacionadas a geração dos dados necessários para o boleto bancário. :copyright: © 2011 - 2012 by Eduardo Cereto Carvalho :license: BSD, see LICENSE for more details. """...
cc3ec728b8b436df922bfc2160d0f66f223b7bc4
fd7a47a13273244463dea751213651dd20c4cfce
caydenallen/Homework-5
/cayden_allen_hw5.py
Python
py
1,754
no_license
#!/usr/bin/env python3 import sys # task: Verify users PIN. Block and exit program after 3 attempts def verify(pin): """ Verifies user input against users pin and returns true or false Usage: (####) numbers only """ if pin == '1234': return True else: return False def...
666f6994460244409d97a201c63849f65968dc02
454ec9ac6bc57fef98e20ba19f8f099627d3c58c
twardoch/fonttools-py27
/Lib/fontTools/misc/encodingTools.py
Python
py
1,802
permissive
"""fontTools.misc.encodingTools.py -- tools for working with OpenType encodings. """ from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * import fontTools.encodings.codecs # Map keyed by platformID, then platEncID, then possibly langID _encodingMap = { 0: { # Unicode 0...
0e2fb70f2ae3858ab77402fb58d36d7f73fee976
bdd87c8671f3af795d8b7d900aa207348dfebe7b
Sami311002/Mycap_project
/Range.py
Python
py
210
no_license
list1 = [12, -7, 5, 64, -14] list2 = [12, 14, -95, 3] for num1 in list1: if num1 >= 0: print(num1, end = " ") print("\n") for num2 in list2: if num2 >= 0: print(num2, end = " ")
5b50ad07ba5e6d398f483ee1577a61a15af1bfb2
8174213b9200080212332e1d756484385ec71ebd
nsetzer/daedalus
/tests/vm_test.py
Python
py
44,020
permissive
#! cd .. && python3 -m tests.vm_test #! cd .. && python3 -m tests.vm_test VmLogicTestCase.test_switch_1 """ warn when stack is not empty after function clal """ import time import unittest import math import io from tests.util import edit_distance from daedalus.lexer import Lexer from daedalus.parser i...
10279539f3e411383ad3bb5691fba5b4da3329dc
e50507d94a2e1de588f132f008b38140768b9edb
n0emis/cm
/ansible/roles/relay/files/fanout/hls.py
Python
py
4,156
permissive
#!/usr/bin/env python3 import os import time import itertools import contextlib import fanout_utils def fanout_hls(context): context += { "starttime": int(time.time()), } cleanup(context) context += calculate_map_and_varmap(context) generate_master_playlists(context) fanout(context) print("Cleaning up")...
198edf5f6abc853180fa8aa680d2103e72f16d49
9828cf9a673d7e0bd25e5e12a1a0acbb7a31d8e2
FrancoCirillo/unsafe_webpage
/app.py
Python
py
4,440
no_license
import os import json from flask import Flask, render_template, request, redirect, url_for, send_file from flask_sqlalchemy import SQLAlchemy from flask_security import Security, SQLAlchemyUserDatastore, login_required, \ UserMixin, RoleMixin, roles_required from flask_security.utils import hash_password, logout_u...
c3aeb3075f7f90d84a6e342ccb372305fe66bba3
ad5821b2a695d0bfb207ea904a8979b173c42539
TrashMessiah/DjangoWordCounter
/Introduction to Django/WordCounter_project/WordCounter/wsgi.py
Python
py
415
no_license
""" WSGI config for WordCounter project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefa...
83fea53ab85a3af2b52dc03f4e93316ffa3a2173
69413d570ac66d2f9f264e37c09992fd2d839766
jpur3846/dfe-contractors
/contractors/events/migrations/0015_event_event_complete.py
Python
py
393
no_license
# Generated by Django 3.0.8 on 2020-07-13 04:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0014_auto_20200713_0342'), ] operations = [ migrations.AddField( model_name='event', name='event_complete'...
bfcefba16f48ec16e1da8f15169a4e4a7acd374e
004e459d19aac07041f03ece055f8c56f5c8bf1c
7dongyuxiaotang/python_code
/study_7_20.py
Python
py
1,290
no_license
# 先定义类 驼峰体 class Student: # 1、变量的定义 stu_school = 'PUBG' def __init__(self, name, age, gender, course): self.stu_name = name self.stu_age = age self.stu_gender = gender self.sut_course = course # 2、 功能的定义 def tell_stu_info(self): pass def set_info(self)...
cef946fc44cc1032ef9385b81060fbd7aae70083
7c9b8d1e6784cb8ee673efcf5e32e705a17ec0b6
Arunnithyanand/luminarpython
/Flowcontrols/for loop/demo7.py
Python
py
369
no_license
# check wheather a number is prime or not with in range num1=int(input("enter the lower limit")) num2=int(input("enter the upper limit")) sum=0 for a in range(num1,num2): if a > 1: for i in range(2,a): if(a%i)==0: break else: print(a) sum+=a print(...