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
706b293274dcff4e3401592608560813d1be7e7d
2c0a76e9fb04cab1d20f0aae4d040c0566a98cb9
iamvigneshwars/Pet-Classification---CNN
/cnn.py
Python
py
3,647
no_license
# -*- coding: utf-8 -*- """ Created on Sat Jul 20 15:28:52 2019 @author: Vishal """ #importing the libraries from keras.models import Sequential from keras.layers import Conv2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense from keras.callbacks import Callback ...
73b400f647ea279aa4052a111ee0e68ec09a7f33
15d8ee6a012a5e4da067669ce2847ab9f279d6e5
ricardochaves/chat-wars-database
/chat_wars_database/app/guild_helper_bot/admin.py
Python
py
2,611
permissive
from django.contrib import admin # # from chat_wars_database.app.guild_helper_bot.models import Castle # from chat_wars_database.app.guild_helper_bot.models import Guild # from chat_wars_database.app.guild_helper_bot.models import GuildMembers # # from chat_wars_database.app.guild_helper_bot.models import Alliance fro...
03e0894d62ec27473ddffdd57a309f506615de76
10cfc7d7db3e560db00d361c0c85f3604b9200bb
tonymontaro/flask-starter-kit
/app/models.py
Python
py
2,148
permissive
"""Application models.""" from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from app import db, login_manager class DBHelper(object): """Perform common SQLAlchemy tasks.""" @staticmethod def add(item): """Add item to database.""" ...
16b5fd9f8e686a808844a722c1f4b682cc25b7cb
69fe3f467ec052f7a485d4c2a3d35f2fc8faf92f
danyfang/SourceCode
/py/leetcode/CircularLoop.py
Python
py
2,414
permissive
''' Leetcode problem No 457 Circular Array Loop Solution written by Xuqiang Fang on 12 July, 2018 ''' class Solution(object): def circularArrayLoop(self, nums): """ :type nums: List[int] :rtype: bool """ N = len(nums) visited = set() for i in range(N): ...
7e7e09a0c52371a6acc09b0c722fafe6fe445078
a5df73c701e6d6d66b250ea13c2029533ecaf091
AyrtonDev/Curso-de-Python
/Exercicios/ex056.py
Python
py
830
no_license
somaIdade = 0 mediaIdade = 0 maiorIdadeHomem = 0 nomeVelho = '' totMulher20 = 0 for p in range(1, 5): print('----- {}ª PESSOA -----'.format(p)) nome = str(input('Nome: ')).strip() idade = int(input('Idade: ')) sexo = str(input('Sexo [M/F]: ')).strip() somaIdade += idade if p == 1 and ...
602bdb75f45fdd572b90a19b4cd8794528899661
b44a7b6096e0b867a850602af891792b0c2a43f1
zyshin/Ception
/ception/feeds/models.py
Python
py
2,143
permissive
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from ception.activities.models import Activity from django.utils.html import escape import bleach class Feed(models.Model): user = models.ForeignKey(User) date = models.DateTimeFiel...
5d47152a68c8de0074878c4a75dae8cbd9b65294
e8b9f1207d66520ba3bdadd0f11f285af62c045d
sente-archives/RTC-python-library
/RTC_helpers.py
Python
py
2,475
no_license
""" Simple file to hold help and __doc__ string text related to the RTC python library. """ BILL_HELPER = """ Example http query: bills.json...bill_id=hr-3-112&sections=passage_votes.voted_at fields ===> bill_id, bill_type, number, session, chamber, short_title, official_title, popular_title, tit...
3c82efc9924eecef030208346457d19226f4bc0c
c0e0f7e92304e116d86595c93d92eccc1239acc4
Karthik827/DJANGO-WEB-FRAMEWORK
/crudCBVproject/crudapp/views.py
Python
py
616
no_license
from django.shortcuts import render from crudapp.models import Company from django.views.generic import ListView,DetailView,UpdateView,DeleteView,CreateView from django.urls import reverse_lazy # Create your views here. class CompanyListView(ListView): model = Company class CompanyDetailView(DetailView): mod...
acb2af6c0198097c88ba87cea50ab8f854afd107
0477241d0806b32dcfc7ec234da14a8c59cbddef
siqi77feng/QuizMe-NewMaster
/quizServer/test/test_questions.py
Python
py
2,237
no_license
from unittest import TestCase from QuestionGenerator.QuestionGenerator import Questions from unittest.mock import MagicMock import json import os from os.path import dirname class TestQuestions(TestCase): def setUp(self): self.test_file = ["test/test.txt"] self.maxDiff = None def test_load_te...
f73c78f83fcf80f2e2188c280d05fdfba20392f6
0da5c186a2eaaa9d04ac2ba094bf6e8f25d8b031
JangYeHoon/python_workshop
/todo/todoMgrSystem/dao/todo_file.py
Python
py
871
no_license
import os from entity.todo import Todo # 프로그램 종료시 list students "students.dat" 파일 저장 def file_write(todos): save_file = open("todos.dat", "w") for index, todo in enumerate(todos): save_file.write("{}번째 | {}, {}\n".format(index, todo.todoNum, todo.title)) save_file.close() # 프로그램 시작시 "students.dat"...
57680eca54f184d16162fb4c8a5baa7e2d0f02b7
3d001bf3bc279b8ebb5804aad19e192e1b7db0d1
liuzemeeting/spidertest
/test/sss.py
Python
py
216
no_license
import requests import re def linkurl(): url="http://7766.gq/"; response=requests.get(url); response.encoding='utf8' result=response.text; # result.encoding='utf8'; print(result); linkurl()
54a1f8860c8b5804beb7d76574f95b597cbf9ae7
33449bc7a1ab032902ab13e63d2d737aa2fed56e
paulkimmm/chat_bot
/dantest/bot.py
Python
py
2,225
no_license
# bot.py def chat(sock, msg): """ Send a chat message to the server. Keyword arguments: sock -- the socket over which to send the message msg -- the message to be sent """ sock.send("PRIVMSG {} :{}\r\n".format(cfg.CHAN, msg)) def ban(sock, user): """ Ban a user from the current cha...
905d2fd6064fa60d1f7ebe359a19940ff7003876
8d066b952afc54b022fc7c836bdf89700b495e6b
ahmedasadmin/generating-melodies-with-rnn-lstm
/8 - Generating Melodies with LSTM/preprocess.py
Python
py
7,909
permissive
import os import json import music21 as m21 import numpy as np import tensorflow.keras as keras KERN_DATASET_PATH = "deutschl" SAVE_DIR = "dataset" SINGLE_FILE_DATASET = "file_dataset" MAPPING_PATH = "mapping.json" SEQUENCE_LENGTH = 64 # durations are expressed in quarter length ACCEPTABLE_DURATIONS = [ 0.25, # 1...
c974fdbaec4adae25f66ea1c2b480d3012a93082
b534e94aed4f59c46ace2d62cbc1a57bf1de0826
thuy4tbn99/TranTruongThuy_17021178_Nhom4_Crawler
/baomoicrawl/venv/Lib/site-packages/twisted/application/strports.py
Python
py
2,303
permissive
# -*- test-case-name: twisted.test.test_strports -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Construct listening port services from a simple string description. @see: L{twisted.internet.endpoints.serverFromString} @see: L{twisted.internet.endpoints.clientFromString} """ ...
74b5a0dee649b68a3c367d93c18bc3e7d97a23fc
75121749692a9f50da6101fe59ac652a96d198e8
dkv009/django-site-
/news/models.py
Python
py
250
no_license
from django.db import models # Create your models here. class Articles(models.Model): title = models.CharField(max_length = 120) post = models.TextField() date = models.DateTimeField() def __str__(self): return self.title
74d07d7b6fea48ae3a476fb75897052636ba06c0
5cae71029f4df90928ed759677e87cfacc981314
IoTDATALab/Adacomp
/Code for Appendix/Evolutionary Experiment/GA_fashionmnist/main.py
Python
py
3,274
permissive
import logging from optimizer import Optimizer import numpy as np #from tqdm import tqdm # Setup logging. logging.basicConfig( format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.DEBUG, filename='log_fashionmnist.txt' ) def train_networks(networks, dataset...
4b4635372c9ad80dc8c406daad7b722bf5e1b386
576e1fba51d5a22162cedc022318af2d4545b637
Patil2099/opentelemetry-operations-python
/opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector/version.py
Python
py
617
permissive
# Copyright 2021 The OpenTelemetry 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 applicable law or agreed t...
aba0e51f56b45315481588244a6d37b020adf672
f7e7e6768b6a9fef5b8c143705a682bf26971803
bryan-lima/python-cursoemvideo
/mundo-02/ex050.py
Python
py
504
permissive
# Desenvolva um programa que leia seis números inteiros e mostre a soma apenas daqueles que forem pares # Se o valor digitado for ímpar, desconsidere-o counter = 0 sum = 0 for i in range(1, 7): n = int(input('Digite o {}º valor: ' .format(i))) if n % 2 == 0: counter += 1 sum += n if counter <...
2ab267b5646d7426e899b233eb4dd05f9a0bfb0e
2d2dcd7637c6bd65b4cffdd98d78ba13610ebbf6
marco-c/gecko-dev-wordified
/testing/web-platform/tests/tools/third_party/pytest-asyncio/tests/trio/test_fixtures.py
Python
py
644
permissive
from textwrap import dedent def test_strict_mode_ignores_trio_fixtures ( testdir ) : testdir . makepyfile ( dedent ( " " " \ import pytest import pytest_asyncio import pytest_trio pytest_plugins = [ " pytest_asyncio " " pytest_trio " ] pytest_trio ...
1346271c5449f62216a65f6a3d5b603fa09476c1
22fe81a1cfd699e5e4cda680f6ae7ccc9adc5873
johnmgregoire/2013JCAPDataProcess
/fomfunctionversions/fomfunctions_firstversion.py
Python
py
10,895
permissive
# written by John Gregoire # edited by Allison Schubauer and Daisy Hernandez # 6/26/2013 # first version of figure of merit functions for automated # data processing from intermediatefunctions_firstversion import numpy import intermediatefunctions_firstversion as inter # this dictionary is required to know which fi...
b006ede93a1ef8f1e065202bfc5a53e050490b34
ee513e20bcc2bcfa10d226fc6c901707581ed689
MYMSSENDOG/leetcodes
/programmers test level 4 2.py
Python
py
441
no_license
def solution(n): m = {(1,1) : 1} def dfs(l, r): if (l,r) in m: return m[(l,r)] if not l: m[(l,r)] = 1 return m[(l,r)] ret = 0 if l == r: ret = dfs(l-1, r) m[(l, r )] = ret return ret ret += dfs(l-1, ...
500489a8c3e6022ba15730110ac03e9e62261dad
aeae3be5739cdb93c36acd31b48159899caaa081
FelineEntity/Outline-Helper
/OutlineHelper/__init__.py
Python
py
1,283
permissive
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but ...
9f543ceb97c2d902bde4323c76c6fe3b945b3bf4
c05559fa5e28d212fd87f8bc89cf9b6bf5a22795
shafferm/micrometab_kb
/populate_genome_db.py
Python
py
4,389
no_license
import argparse import json import multiprocessing import os from datetime import datetime import requests from py2cytoscape import util as cy from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, Genome from micrometab_analysis import metabolic_network_analysis...
7112cb13caa041c99a51faef3bd2a0c530516423
20b5cb7891df29520a129317e57fdbb178217222
WumpusOverlord/trivia_solve
/solve_trivia.py
Python
py
7,210
no_license
import keyboard import screen_scrape.screen_grab as screen_grab import os import google_api.vision_lookup as gvl import google_api.custom_search as gcs import inflect import analyse_results.analyse_results as ar from analyse_results import google_natural_language as gnl from analyse_results import wiki_lookup as wl imp...
960fa6da34bcce2197c2060c8e56ee870bd2f85c
815b92ae3e952b3adeff743ed202dfd891fd3597
nonprofittechy/docassemble-Lycium
/setup.py
Python
py
2,473
permissive
import os import sys from setuptools import setup, find_packages from fnmatch import fnmatchcase from distutils.util import convert_path standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*') standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info') def find_package_dat...
e1a257b379f022353c57625caaf69c80a9ab62bb
3ec75f2a52ad232bcbbee9add02e753e6f17c069
lilizhiwei/MyScript
/script/run_pc.py
Python
py
414
no_license
from HTMLTestRunner import HTMLTestRunner import unittest,time if __name__ == '__main__': now = time.strftime("%Y-%m-%d %H-%M-%S") filename = './html/' + now + 'result.html' fp = open(filename,'wb') runner = HTMLTestRunner(stream=fp,title='测试报告',description='用例执行情况') discover = unittest.defaultTestLoader.discov...
31afe78fc31fb461486453424e0864556fe5bd3b
0795e17d5f723b232bfd95cbc95aafdd643e4197
prototypefund/Digital_Bargeld-android-node-v8
/configure.py
Python
py
61,696
permissive
from __future__ import print_function import json import sys import errno import optparse import os import pipes import pprint import re import shlex import subprocess import shutil import bz2 import io from distutils.spawn import find_executable as which from distutils.version import StrictVersion # If not run from...
3124cf7458bb444606489476a450607a8c9d6c38
ac1bc6b6d015cd9ec8aaf94b5082863836e0a69f
petruf/marshmallow-pyspark
/marshmallow_pyspark/converters.py
Python
py
4,142
permissive
""" Marshmallow fields to pyspark sql type converter """ from abc import ABCMeta, abstractmethod from typing import Mapping, Type from marshmallow import fields as ma_fields from pyspark.sql.types import (DataType, StringType, BooleanType, TimestampType, DateType, IntegerType, ...
2650bf13a700563fad47f032cd7b3abb332c56b7
ea9a91b06cad5e6049abe9aa35635219e83021f4
anfelo/algos_python
/fizzbuzz/fizzbuzz.py
Python
py
647
no_license
def fizzbuzz(num): """Returns a list containing the fizzbuzz sequence. But for multiples of three print “fizz” instead of the number and for the multiples of five print “buzz”. For numbers which are multiples of both three and five print “fizzbuzz”.""" fizzbuzz_list = [] for i in range(1, nu...
975b37be88f1570458c7d6ad1c8e124423fff43c
06c773ec6256928eb59281b52abece9e4c941e20
Audric-Dune/mondon-client
/commun/lib/base_de_donnee.py
Python
py
21,193
no_license
# !/usr/bin/env python # -*- coding: utf-8 -*- import sqlite3 from time import sleep from commun.constants.param import DATABASE_LOCATION from commun.lib.logger import logger from commun.constants.param import DEBUT_PROD_MATIN,\ FIN_PROD_MATIN_VENDREDI,\ FIN_PROD_MATIN,\ FIN_PROD_SOIR,\ FIN_PROD_SOIR_...
10a35c979e5196aed743f06cec844361bc6295f6
2ce3497d044abb4eec3e114d1d1593d613c36470
huangxiaofeng10047/fun_acm
/leetcode/Remove Nth Node From End of List.py
Python
py
891
no_license
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @return a ListNode def removeNthFromEnd(self, head, n): myhead = ListNode(0) myhead.next = head now_head = myhead l...
7469bed9f705eb967608d1b3d54890e4df031563
b4e180e5c3fb64e9547a62e864b75e5ff5ca18f8
kitbag/spark_kernel
/spark_kernel/install.py
Python
py
1,273
no_license
import json import os import sys import getopt from jupyter_client.kernelspec import KernelSpecManager from IPython.utils.tempdir import TemporaryDirectory kernel_json = {"argv":[sys.executable,"-m","spark_kernel", "-f","{connection_file}"], "display_name":"Spark (spark-shell)", "languag...
a47f828367476ef48c0e330f65bea69f916f1e7f
4cf21a0819ed8881b8dd20dcdfb35a9cf9ef03be
gavztheouch/opensprayer
/python loop and class.py
Python
py
1,444
no_license
import time from fastai.vision import * from PIL import Image, ImageChops import serial doc = Image.open('learn/test/doc.jpg') #creates a new empty image, RGB mode, and size 400 by 400. new_im = Image.new('RGB', (2048,1536)) doc_array = [] Arduino_Serial = serial.Serial('/dev/cu.wchusbserial14330', 9600) # Create Se...
0b95d73a3db6848edd6794e7220100f5c3293f8d
602618f8bbae0286b4a8ae4a50b060c74f119528
vsdaking92/CollegeProgs
/NMSM_process_one.py
Python
py
2,359
no_license
# -*- coding: utf-8 -*- """ Created on Fri Sep 04 21:04:49 2015 @author: aditya """ # Set folder path to the directory where the files are located folder_path = '*Your Path Here*' # Start Processing for one article # Open the JSON data file data = open(os.path.join(folder_path, "Article_99.json"), "r") # Load in ...
8699e31679bf488b98240ac2b93395b8a52c19f1
d301cd90cbcb88c6cba6933c0cd0cc893aa919ab
jmurga/iMKTData
/src/deprecatedScripts/dafResamplingDEPRECATED.py
Python
py
5,391
no_license
import pandas as pd import numpy as np def dafWithResampling(id,data,resamplingValue,type): columns = ['id','POS','rawDerivedAllele','div','type'] output = pd.DataFrame(columns=columns) if(data.shape[1] < resamplingValue): if(type == '4fold'): dafDiv = pd.DataFrame({'id':id,'POS':0,'rawDerivedAllele':0,'di...
03696b28901ca4114c7c29f9fd06968ab7a7ebaf
9409e08ee8b87631b75a31a2466dd98997f7984c
cash2one/xai
/xai/brain/wordbase/nouns/_whitewashed.py
Python
py
261
permissive
from xai.brain.wordbase.nouns._whitewash import _WHITEWASH #calss header class _WHITEWASHED(_WHITEWASH, ): def __init__(self,): _WHITEWASH.__init__(self) self.name = "WHITEWASHED" self.specie = 'nouns' self.basic = "whitewash" self.jsondata = {}
0c77b166d14e7491a9959e79f05d12feb082292a
4cbb455b51602e7f2dbac1b24f757f00389234d7
scoolyang/Image-Similarity-Test-new-version
/img_similarity_method.py
Python
py
30,674
no_license
""" Created on Mon Aug 12 15:37:14 2019 @author: cheng """ import cv2 as cv import numpy as np import os import matplotlib.pyplot as plt import csv # This function is used to find out corresbounding imgae data given camera index and image number from all data txt file # Three Inputs: 1. input YOLO output ...
6790dc1448f427b857c3f53f75abe7bf28cb83b9
7197748378e1917817d27e144d039f53a1c3b77b
isabella232/allura
/Allura/allura/lib/decorators.py
Python
py
8,097
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 (t...
3dc8ffb4dca42b218ff6df9347f889829d188c5d
9f511b0b6aa9b09cf02206ef50bd090338a463cc
byungheon/stylegan2-pytorch
/prepare_data.py
Python
py
3,202
permissive
import argparse from io import BytesIO import multiprocessing from functools import partial from PIL import Image import lmdb from tqdm import tqdm from torchvision import datasets from torchvision.transforms import functional as trans_fn def resize_and_convert(img, size, resample, quality=100): img = trans_fn.r...
a5e0827227e153e4c73edf3021577e8227fafad1
17eefd5cc4a8cb4419aef90debb6af848db7f854
nmvbxcz/remote_ikernel
/remote_ikernel/manage.py
Python
py
15,127
permissive
""" manage.py Manage the kernels available to remote_ikernel. Run ``remote_ikernel manage`` to see a list of commands. """ from __future__ import print_function from __future__ import unicode_literals import argparse import getpass import json import os import re import shlex import sys from os import path from sub...
f0add4067c6fb21d2b202f0c1cc3972f3f9afa34
6b1b407384b617dfeccfa2bf34caffadf64e6bc8
krsdimagi/commcare-hq
/corehq/form_processor/tests/utils.py
Python
py
8,485
no_license
import functools import logging from datetime import datetime from uuid import uuid4 from couchdbkit import ResourceNotFound from django.conf import settings from nose.tools import nottest from casexml.apps.case.models import CommCareCase from casexml.apps.phone.models import SyncLog from corehq.form_processor.backen...
9643da99d7dc801aa0d69c4a83636b7fd33b7823
ba642d2999be45ffd8abe1a0fe3b1676d5a93df2
evanmassaro/rucio
/lib/rucio/tests/test_auditor_srmdumps.py
Python
py
4,309
permissive
# Copyright 2015-2018 CERN for the benefit of the ATLAS collaboration. # # 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...
aea1cd5abf157f4d1887e34d42243d80d8453feb
15f3fe207204bf219cdd3a9dcdc4632113c06de4
uudecode/PSP_patapon3_effects
/editor.py
Python
py
7,165
no_license
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'editor.ui' # # Created by: PyQt5 UI code generator 5.14.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWin...
628610996783713b936f4730c997e34a85e7f95d
9535a4d052e5f3af795e3c0585374f5c346ad138
laxminarayansystech/rl-algorithms
/reinforce.py
Python
py
3,111
no_license
''' Solve CartPole with REINFORCE Notes: - CartPole instead of MountainCar because it has a shorter episode - Policy: softmax over state representation features (`observation`) ''' import random import gym import numpy as np import tensorflow as tf from sklearn.preprocessing import OneHotEncoder tf.enable_e...
e048cdd29170c69cc42a936eb21da9ddb9eae09a
d44eb0e5a31da225b5f265f915ed1c686014ea84
chenjiejijiji/python
/butten/1.py
Python
py
310
no_license
#-*- codinf: utf-8 -*- from selenium import webdriver from time import sleep import os if 'HTTP_PROXY' in os.environ: del os.environ['HTTP_PROXY'] dr = webdriver.Chrome() url = 'http://www.baidu.com' dr.get(url) print "title of current page is %s"%(dr.title) print "%s"%(dr.current_url) sleep(1) dr.quit()
a05629e393cef18cb44a43f8ddfe2f9a2dfe6507
9d0ef50e8492ede226bd7364821be912647bae74
gm-r/ewb-python-tutorials
/hangman.py
Python
py
1,433
no_license
import random def choose_word(difficulty): number = random.randint(0,2); easy = ["cat", "dog", "fish"] medium = ["firetruck", "library", "elephant"] hard = ["xylophone", "exoskeleton", "quantify"] if(difficulty == "hard"): return hard[number] if(difficulty == "medium"): return medium[number] else: return e...
2912c4ce250670a8012d89f4493afe3796f345ed
80324b7461ac9077de089288b79d1f4789470310
Dgo-list/django-gcm-android-ios
/example/example/urls.py
Python
py
829
permissive
"""example 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-bas...
f30442567b8686be497e4ce4635cf23b69a54b95
16862fb0b7d08b4715fb34f20ac88bb7bd96df7d
IterZebra/tricircle
/tricircle/api/controllers/region.py
Python
py
5,026
permissive
# Copyright (c) 2015 Huawei Tech. Co., Ltd. # 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 # # Unles...
ac42c54de2704c3259bb2cab8ed6222b076ff838
8610bfec3f6e21021f186bc6a53f9b792d88837f
cse442-yams/yamsports
/backend/users/admin.py
Python
py
415
no_license
from django.contrib import admin # Register your models here. from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin from .forms import CustomUserCreationForm, CustomUserChangeForm class CustomUserAdmin(UserAdmin): add_form = CustomUserCreationForm form = CustomUserCh...
b24a492bb6036909b0c89a687a151b7658bb7ac6
9c1eb5791ebb2d064104ecaedfc5c8bd791f0bbb
gunter1994/templating
/hog.py
Python
py
1,767
no_license
import cv2 import numpy as np import sys import os import argparse from sklearn.externals import joblib from skimage.feature import hog from skimage.io import imread parser = argparse.ArgumentParser(description='Given set of test images, allows user to select correct angle, and correct phone') parser.add_argument('p1...
80795c25c8c9c6488207e1a0a2f993a1133e2255
40b4168a92a807af6ae95de911d253f6d41126d8
scottwedge/ray
/python/ray/tests/test_global_state.py
Python
py
6,632
permissive
import pytest try: import pytest_timeout except ImportError: pytest_timeout = None import time import ray import ray.ray_constants import ray.test_utils # TODO(rliaw): The proper way to do this is to have the pytest config setup. @pytest.mark.skipif( pytest_timeout is None, reason="Timeout package no...
fe48508d864e668afe68459044ed8c02ce6e93f6
3f433ca83b29ca4b53d905aab5ce24af6b131c2b
dsegroup22/A22CERES
/A22DSE/Models/Prop/Current/Prop_Exec_engineselection_nengthrust.py
Python
py
7,074
no_license
import numpy as np class Engine: def __init__(self,name, thrust, weight, SFC, cost, bpr, LPC, HPC, length, diameter,SFCc): self.name = name #The engine name self.thrust = thrust #The engine thrust self.weight = weight #The engine weight self.SFC = SFC #The engine SFC self....
2ca972d572de35ae1ed928e13fec5aaf7946dcb6
3860dcedf6b9762f2e58d4db2c29d855c453c716
Wang-Yann/LeetCodeMe
/python/_1001_1500/1047_remove-all-adjacent-duplicates-in-string.py
Python
py
2,250
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : Rock Wayne # @Created : 2020-06-30 08:00:00 # @Last Modified : 2020-06-30 08:00:00 # @Mail : lostlorder@gmail.com # @Version : alpha-1.0 """ # 给出由小写字母组成的字符串 S,重复项删除操作会选择两个相邻且相同的字母,并删除它们。 # # 在 S 上反复执行重复项删除操作,直到无法继续删除。 # # 在完成所...
f1d4e2cff7258c0ffd848ab32f5afbfb7c3b413c
036549b7d7298bd0077da2a29ae06df9af32f685
EdLeafe/leafecom-site
/leafecom/controllers/dls.py
Python
py
3,919
no_license
import datetime import decimal import logging import os import shutil import smtplib import stat import time from sqlalchemy import desc from pylons import request, response, session, tmpl_context as c from pylons.controllers.util import abort, redirect from pylons.decorators.rest import restrict import six from leaf...
42da14d309cf920b65efe709232d01b20c87cf85
515d8f6fb0e3287b6f715da47a3bd2f22d873e30
sky-dream/LeetCodeProblemsStudy
/[0037][Hard][Sudoku_Solver]/Sudoku_Solver_2.py
Python
py
4,357
no_license
# solution 1, back tracking. # leetcode time cost : 48 ms, faster than 99.51% # leetcode memory cost : 13.2 MB # Time Complexity: O(1) # Space Complexity: O(1) ''' Algorithm: backtracking (dfs) in an optimal order 1. Keep track of candidates of each cell. 2. Find the cell with fewest candidates. Fill the cell ...
2f35589564c54784dac2df382098832ca8b23ad8
cc886c9a5def2b43f52f51378e4bfcbffcf2c0ba
Sagar5885/PythonRef
/MLUdacity/GaussianNB/ClassifyNB.py
Python
py
866
no_license
from sklearn.naive_bayes import GaussianNB from sklearn.metrics import accuracy_score def NBAccuracy(features_train, labels_train, features_test, labels_test): """ compute the accuracy of your Naive Bayes classifier """ ### import the sklearn module for GaussianNB from sklearn.naive_bayes import GaussianNB...
a1faf3ea7876afa04cbeb034c644fb871467785f
9b69ad5f02ed1c7b84b64a7cb00dee6b25f096c7
nkukarl/lintcode
/Q178.py
Python
py
621
no_license
class Solution: def validTree(self, n, edges): summary = [i for i in range(n)] for edge in edges: a, b = edge if a > b: a, b = b, a if summary[a] == summary[b]: return False tmp = [] for i in range(len(summary)): if summary[i] == summary[a] or summary[i] == summary[b]: tmp.append(i)...
42ecfab267878e702aebaeab8bc6a0b21a7e7cd1
1dc912d6d36bcf103c036daf23dc2ec7bc33e6c1
siyuanligit/technical_interview
/questions.py
Python
py
6,288
no_license
# Code solution to Question 1 def question1(s,t): # make the elements in both s and t lowercase. s = s.lower() t = t.lower() # if the substring is empty, return True if t == '': return True l = len(t) for i in range(len(s)): if sorted(s[i:(i+l)]) == sorted(t): ...
879dea510a888fe5a83012e2ebec9b2126cfc592
6bbc0a226ac49c91a4cfb637568c3cee0222b9ff
Danyelss/Pitech-Plus-tech-support-training-
/day05/ex01/name/main.py
Python
py
574
no_license
from flask import Flask, render_template import os from subprocess import Popen, call template_dir = os.path.abspath('app/templates') static_dir = os.path.abspath('app/static') app = Flask(__name__,template_folder=template_dir, static_folder=static_dir) @app.route('/hello_to_training/<name>') def main(name): path...
dff7dd32d196fb06406eb8e50bb1b7a99a003cbf
df5ec0098e1491081f624dbf7c15c5b3a1fa9a98
inas/ppw-lab
/lab_10/omdb_api.py
Python
py
1,641
no_license
import requests API_KEY = "d3564def" #TODO Implement, fill your OMDB API Key Here def search_movie(judul, tahun): print ("METHOD SEARCH MOVIE") get_tahun = "" if not tahun == "-": get_tahun = "&y="+tahun url = "http://www.omdbapi.com/?s=" + judul + get_tahun + "&apikey=" + API_KEY ; req = r...
f0b1ff19137da38ece9925e322e67a3742724054
f9cc0b58589cb3a43ca6e6888973d1ff8eca6d0a
moncybabu/DOCKERS
/detection5.py
Python
py
6,026
no_license
# -*- coding: utf-8 -*- """ Created on Thu Sep 30 16:23:49 2021 @author: ACER """ import pickle import streamlit as st # loading the trained model pickle_in = open('fraud4.pkl', 'rb') classifier = pickle.load(pickle_in) @st.cache # de...
50c071e58d7e47b49cec03b7e3bcbff20d902a74
e2965b03fa2feff526158df81338a62db4238ffc
hell0x/Python
/samples/debug/mydict.py
Python
py
329
no_license
class Dict(dict): def __init__(self, **kw): super().__init__(**kw) def __getattr__(self, item): try: return self[item] except KeyError: raise AttributeError(r"'Dict' object has no attribute '%s'" % item) def __setattr__(self, key, value): self[key] ...
3f44e741a06a82540785188489d6490a6985b6d8
a85f9cd90e5d6fcaf9550e5b6d1167fd5353ba25
UKPLab/inlg2019-revisiting-binlin
/binlin/utils/combinatorics.py
Python
py
3,056
permissive
import unittest from itertools import chain, combinations, permutations def get_permutations(group_head, group): return permutations([group_head, *group]) def get_combinations(iterable, num): return combinations(iterable, num) def flatten_nested_lists(ll): return list(chain.from_iterable([l for l in ll...
9b83bdf8bd2c64c81bf83691ce56d4df369e1f90
30c35084d847a28e55bfcd2520f61221f623e309
RCOSDP/RDM-osf.io
/addons/s3compat/routes.py
Python
py
2,350
permissive
from framework.routing import Rule, json_renderer from addons.s3compat import views api_routes = { 'rules': [ Rule( [ '/settings/s3compat/accounts/', ], 'post', views.s3compat_add_user_account, json_renderer, ), R...
7143163b7419347b343b7b111749b164c09f338d
d4b29ce3fb65f2741c2cbb668af39d00b5783be0
geokrety/geokrety-api-models
/tests/utilities/test_move_tasks.py
Python
py
9,369
permissive
from geokrety_api_models import Geokret, Move, MoveComment, User from geokrety_api_models.utilities.const import (GEOKRET_TYPE_TRADITIONAL, MOVE_COMMENT_TYPE_COMMENT, MOVE_COMMENT_TYPE_MISSING, ...
72c09a9f0f164b9f8d66272dbd34b3bbd2d1cbb7
f0fea90a2f9a5e85b07c94f28a3e18c8ad9de61a
czxxjtu/wxPython-1
/tags/wxPy-2.9.0.1/wxPython/setup.py
Python
py
38,013
no_license
#!/usr/bin/env python #---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils script for building wxPython # # Author: Robin Dunn # # Created: 12-Oct-2000 # RCS-ID: $Id$ # Copyright: (c) 2000 by Total Control Software # Licence: wxWind...
3cad15910fefcf98473e2170f719f9c5f77dc0d1
f3372cee4db1d7d3ce4a12161a28908bd3d975ba
anirudh-11/code
/Big Data/Lab2/q2_stem_and_leaf.py
Python
py
659
no_license
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from statistics import mode def main(): data = [22, 21, 24, 19, 27, 28, 24, 25, 29, 28, 26, 31, 28, 27, 22, 39, 20, 10, 26, 24, 27, 28, 26, 28, 18, 32, 29, 25, 31, 27] data.sort() stem = 0 stem_leaf = dict() ...
b755afc44f450af94f339bf3cc8d169a7b3ff8c8
9472a5cebc68156324ebc4b96468bf54d7d165e0
Tanc009/jdcloud-sdk-python
/jdcloud_sdk/services/ipanti/apis/ModifyJsPageOfWebRuleRequest.py
Python
py
1,786
permissive
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
3c168d74b1e5fb25bd3bcbe4e37d2feefb7f879a
7f7b31c4f49543119a5a250061db24b0b439a7a9
deeperor/leetcode
/Python/Algorithms/BackTrack/切割问题/131 M_分割回文串.py
Python
py
929
no_license
# -*- coding: utf-8 -*- # @Author : ruiwu # @Email : ryanwoo@zju.edu.cn # @Title : 131 分割回文串 # @Content : 给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。 # 返回 s 所有可能的分割方案。 class Solution: def partition(self, s: str): # 回溯算法 res = [] def backtrack(start, track): if start >= le...
7fbc1c66fdb5cbc117349530669a155e615edfd6
7d425cf745bc70cffc0018742a60dd6cf14e36f6
SergioCC14/udoo-talker
/python/udoo-talker-lib.py
Python
py
274
no_license
def read_file(path): file = open(path) data = file.read() file.close() return data def split_data(data, name): dr = data.replace("\n", "").split(',') return data_formatted : { (name + '-x'): dr[0] (name + '-y'): dr[1] (name + '-z'): dr[2] }
32103f5f2c43f25a8d3bb8ec3de90adfc57c7de2
1dbdadc9847f4e4c98ba1ae7cee788b5e2673714
DL2021Spring/CourseProject
/data_files/411 Minimum Unique Word Abbreviation.py
Python
py
1,598
no_license
__author__ = 'Daniel' class Solution(object): def minAbbreviation(self, target, dictionary): ret = (target, len(target)) for abbr, abbr_l in self.dfs(target): if self.validate(dictionary, abbr) and ret[1] > abbr_l: ret = (abbr, abbr_l) return ret[0] ...
76c0f03a4c1a4b2842e68e962bc59cf708989541
5b668efaeb4211e8196ace5dca38cdc8dddc7800
fairseq/Megatron-LM
/configure_data.py
Python
py
9,079
permissive
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. 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 re...
cde914f6fef75c05228e7185cf441cb4b29d7149
dbb4da4bd5d628c3d344c606bcf264bc58290f90
zuzhi/flask-by-example
/app.py
Python
py
2,762
no_license
import os import requests import operator import re import nltk import json from flask import Flask, render_template, request from flask import jsonify from flask.ext.sqlalchemy import SQLAlchemy from stop_words import stops from collections import Counter from bs4 import BeautifulSoup from rq import Queue from rq.job ...
3a157ef25de21974fd793082948d7223735945fd
ea7ef494b943d60c33679d02695d47dd1d843626
levi-sr93/projeto-escola-django-rest-framework
/escola/settings.py
Python
py
3,526
no_license
""" Django settings for escola project. Generated by 'django-admin startproject' using Django 3.1.6. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib ...
a0f2254197a1f2c1a7d0f84a10ec8675e426782d
e9f483d072acbe10e08d1d202b31fb8279f72e12
JiaquanYe/LeetCodeSolution
/Stack/sword_twoStack2Queue.py
Python
py
1,007
no_license
""" 用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。 """ class CQueue(): def __init__(self,elems = None): if not elems: self.stack1 = [] else: self.stack1 = elems self.stack2 = [] def enqueue(self, elem): self.stack1.append(elem) def dequeue(self): ...
3297c035fdbf91e4beae1a6f4b802216993ec292
f8a07b070477f1be0070dae5b23974e8337a9404
interarticle/docx-mailmerge
/mailmerge.py
Python
py
9,671
permissive
from copy import deepcopy import re # Why lxml? XPath! Plus the more rational and simple xmlns preservation # Not to mention that lxml and xml are mostly compatible. # Oh, and faster from lxml import etree from lxml.etree import ElementTree from lxml.etree import Element from zipfile import ZipFile, ZIP_DEFLATED impor...
4286b2c3c4cc4f0a44b4389e7ad5b9457d5ef5b4
a49ac99c7e86aaa1c8896f8146a624ced26af835
BitMatt10111/Sistemi_20-21
/Python/StanzaRobot/esStanzaGraph.py
Python
py
5,325
no_license
#Author: Matteo Lamberti #Target: make a program that find the fastest way to go from a to b # stanza rettangolare con piastrelle e ostacoli # (matrice 0 per piatrelle vuote - 1 per piastrelle occupate) # il robot (verde) vuole andare in un punto (viola) # calcolare il percorso più breve # caricare un dizionari...
e0efdd2e5131609510cfae71157cb40cdf14f732
dc1963fa31b686e4ba10a640440207727d8071ad
craigderington/flaskdock
/app.py
Python
py
3,659
permissive
from flask import Flask, request, render_template, g, url_for, jsonify, flash, redirect import requests from requests.auth import HTTPBasicAuth from datetime import datetime, timedelta app = Flask(__name__) auth = ("admin", "admin") @app.route("/", methods=["GET"]) def homepage(): """ redirect to index """ re...
454ce056bf95f94017243cf9aaddf6b5c07597b9
696f5edac1fff523fdaecc4b9ef9ab8aef74962a
Airtonmartins/docker-django-vscode-remote-debugging
/composeexample/settings.py
Python
py
3,161
no_license
""" Django settings for composeexample project. Generated by 'django-admin startproject' using Django 2.2.4. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
6169243a89533d816424ff5c0aa2de4b7af0b38a
e08ff2f43239a035af87c737a0092be760fd9c86
irajanshrestha/djangoRESTfinal
/ourproject/myapp/serializers.py
Python
py
319
no_license
from .models import Data, Product from rest_framework import serializers class ProductViewSet(serializers.Modelserializer): class Meta: model = Product fields = '__all__' class ProductViewSet(serializers.Modelserializer): class Meta: model = Product fields = '__all__'
0890567a6a1487836230b7c4f273a77acedfb772
17da7a5112a772b2273d61c7b42869f3cc58a1b0
ahsnag/SimpleCV
/SimpleCV/examples/machine-learning/machine-learning_nuts-vs-bolts.py
Python
py
2,829
permissive
''' This Example uses scikits-learn to do a binary classfication of images of nuts vs. bolts. Only the area, height, and width are used to classify the actual images but data is extracted from the images using blobs. This is a very crude example and could easily be built upon, but is just meant to give an introductor...
cc69cfc6f21f5efcb7a6b5821b472ef2404e9502
b147e039fa1710bce4b53a152c54428aa71bf8ae
brianoppenheim/attentive_splice
/data_code/processing-scripts/train_val_test_split.py
Python
py
1,780
no_license
#3k test #3k val #rest training #Making test and validation so big because we probably cant train on all the genes anyway import numpy as np import pandas as pd import sys import os from sklearn.utils import shuffle np.random.seed(420) TEST_SPLIT = 0.2 VAL_SPLIT = 0.2 TRAIN_SPLIT = 1- TEST_SPLIT-VAL_SPLIT def parse_in...
af1e4fb12e7695bb2139751652e08dcf5d069a4c
995d34990c55a9b93af0e553001c72fed60edfd1
adam2392/mne-python
/mne/io/ctf/info.py
Python
py
19,651
permissive
"""Populate measurement info.""" # Author: Eric Larson <larson.eric.d<gmail.com> # # License: BSD-3-Clause from time import strptime from calendar import timegm import os.path as op import numpy as np from ...utils import logger, warn, _clean_names from ...transforms import (apply_trans, _coord_frame_name, invert_t...
dfc28d9fa827b52ddf98e85ee6feca4cba26726b
28b2986ca17f6f28490a6760a3172dbbe716d45f
asheverdin/multilingual-interference
/metalearning/allennlp/allennlp/modules/span_extractors/bidirectional_endpoint_span_extractor.py
Python
py
11,585
permissive
import torch from torch.nn.parameter import Parameter from allennlp.common.checks import ConfigurationError from allennlp.modules.span_extractors.span_extractor import SpanExtractor from allennlp.modules.span_extractors.span_extractor_with_span_width_embedding import ( SpanExtractorWithSpanWidthEmbedding, )...
29e2c350b1f96d5f5e9ec4b9459aa8ebaa1c7087
950128538d2a667a1009e0bc48678d739813fbee
biczysko/Benchmark
/helix_1us0/run_analyze_OPT.py
Python
py
3,774
no_license
from __future__ import division import math from libtbx import easy_run import os import iotbx.pdb from mmtbx import model #from mmtbx import model_statistics from scitbx.array_family import flex from libtbx import group_args from mmtbx import monomer_library import mmtbx.monomer_library.server import mmtbx.monomer_lib...
33f3fc7d4645fb05daeecab96473ca91cd2d7dec
74d8bad43826166de5ef4ce7cbc30af309a62933
Gladarfin/Practice-Python
/robot-tasks-master/task_18.py
Python
py
642
no_license
#!/usr/bin/python3 from pyrob.api import * @task def task_8_28(): while True: if not wall_is_above(): move_up() break while not wall_is_on_the_right(): if not wall_is_above(): move_up() break move_right() else...
a805ea8f6c846164c63ff2e873b0ebe7194c3a25
2716add35877de1f06908e6f5991fc88318cf78a
andreas-grafberger/Spatio-temporal-MS-Lesion-Segmentation
/data_loader/Dataloader.py
Python
py
845
permissive
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler from torch.utils.data.dataloader import default_collate class Dataloader(DataLoader): """ Data loading """ def __init__(self, dataset, batch_size, shuffle=True, num_workers=1): self.dataset = dataset self.shuff...
b0c1eb93bbfd2bc702108e9cc172dddeab8ffe41
f417ae4dcd6f7540c7a96696b0a48245c4f7c4d4
hicode/pythonFinance
/DataContainerAndDecorator/StockDataContainer.py
Python
py
1,764
no_license
from DataContainerAndDecorator.Abstract_StockDataContainer import Abstract_DataContainer class StockDataContainer(Abstract_DataContainer): def __init__(self, stock_name, stock_ticker, stock_exchange, historical_stock_data=[], stock_current_prize=0): Abstract_DataContainer.__init__(self, stock_name, stock_...
0ce11d5e4991f6db4bc69dbe2612483c295719ba
c862eca3a30158b9fb8bda3b628fcc65cb6f2aea
Morgaroth/casbah
/src/sphinx/conf.py
Python
py
9,658
permissive
# -*- coding: utf-8 -*- # # Casbah (MongoDB Scala Toolkit) Tutorial documentation build configuration file, created by # sphinx-quickstart on Thu Dec 9 12.0.19:28 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in ...
b637d93e68c177594f6bfa0d8b2489d79c8b06c1
e827cfe90d65054742e5ea2941e53e542dddcba5
rrosatti/expenses-control
/backend/api/views.py
Python
py
3,481
no_license
from django.contrib.auth import get_user_model from rest_framework import generics, status, viewsets from django.shortcuts import get_object_or_404 from rest_framework.permissions import AllowAny, IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.a...
ac73def28e90fefe895cb495f40424889b4762e1
b1a90c93a315c5583908fa8e282d3a800b1c6b8f
alexander2i/msbuild_projects_dependencies_visualizer
/examples/traverse_for_solutions.py
Python
py
825
permissive
import sys import os import logging import pdv def traverse_for_solutions(root_dir): num = 0 for root, dirs, files in os.walk(root_dir): for file in files: if file.lower().endswith('.sln'): num += 1 params_list = ['--sln', os.path.join(root, file), ...
771937d2922f64f3c0b8b94d6544aaa8c475e3a8
590feb7a6b33b93d0e08eae2719df497a477cf13
MStenke/VirtualBootcamp
/conf.py
Python
py
2,866
permissive
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
2f7d0adc5d107dc78e83d836f9abc7f7912148ff
9b461c819cbc80667ddbd5d9b909cb54c0449597
yogi2578/web-scraper
/nearestneighbor.py
Python
py
1,926
no_license
import numpy as np import re from nltk.tokenize import RegexpTokenizer import pandas as pd from sklearn.neighbors import KNeighborsClassifier from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer from nltk.tokenize import word_tokenize from sklea...
c6381505a7c41c9e262d81abd7e23ebfe9632d53
fe4884761c2a062fd09b8659e99ed8827f55efbe
rushioda/PIXELVALID_athena
/athena/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py
Python
py
12,999
no_license
#============================================================== # # # This job option runs the G4 simulation # of the ATLAS detector and the GeantFollower in ID (and MS) # It can be run using athena.py # #============================================================== #--- Algorithm sequence -----------------------...
29bdde8388371823355a611b34953fc07426df92
5171fc288c4c6e7201639f0ff6436ec93e1e70f3
lssdeveloper/gestao_clientes
/gestao_clientes/clientes/migrations/0006_auto_20180529_1040.py
Python
py
778
no_license
# Generated by Django 2.0.5 on 2018-05-29 10:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clientes', '0005_venda'), ] operations = [ migrations.CreateModel( name='Produto', fields=[ ('id', m...
b5db12312a075540b932c461fa6da32813143835
c9524befb3a692961a6710fec777b961b5e9f4da
xjinGitty/bugzilla-report
/testopia-to-mongo.py
Python
py
2,866
no_license
import argparse from util import mongo_tt, proxy #since I don't have enough authority to get product related information #I have add plans here manually plans = ['4902', '4903', '4910', '4911', '4912', '4937', '4920', '4925', '4937', '4954'] def update_runs(): for plan in plans: runs=proxy.Test...
bcafc4294c1e31164c22fe695b8b6cd796438955
a734cccb1be16c4fa623be4608304a1509bb7734
PNBenfica/Tipsters
/src/backend/sports/betValidator.py
Python
py
478
permissive
''' Validates the choices of each bet and updates its status in the datastore ''' from sportsRetriever import getBet # @desc updates the bet choices (stored in a json in the datastore) # @param results - [[choiceId, status], [choiceId, status]] def updateBet(sportId, eventId, matchId, betId, results): ...
5e02379c5bbefe690394d54e3916f6fb410f61d8
4d713797e188005ce357f98eaacd1ecfea977834
ajay1130/Mentor
/Mentor/HOME/migrations/0039_auto_20201101_1159.py
Python
py
1,700
no_license
# Generated by Django 3.1 on 2020-11-01 06:29 import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('HOME', '00...
0f70aff4bbd70c23c932714c2aa0d2f9a4c83e42
a2c5ad95c91db181e00515524ba6f2d92c8f35f3
Chiayiau/DPL5211Tri2110
/lab 5.4.py
Python
py
468
no_license
# Student ID : 1201200302 # # Student Name : Liang Chia Yiau width = int(input("Enter width : ")) length = int(input("Enter length : ")) def rectangle(width,length): area = width*length return area def triangle(width,length): area = width*length/2 return area area_rec = rectangle(widt...
4363e6afed53abfe3cf9918fa30ecaf19a8857d9
44c38a7e9956797fb77e336484485b5e313d278d
fox-yo/DJ
/mainsite/migrations/0001_initial.py
Python
py
786
no_license
# Generated by Django 2.1 on 2018-08-20 12:46 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Post', fields=[ ...