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
42f032c0c277e7d4ca84dd8c1c31641b5fab12f6
d95816c056cf566cf91634006064df329c615c52
zyzhang1130/CZ4046-Intelligent-Agent
/assignment/assignment_1.py
Python
py
9,377
no_license
# -*- coding: utf-8 -*- """ Created on Mon Mar 9 21:31:14 2020 @author: Lenovo """ import numpy as np import random def Next_state(state,action): next_state=[] flag=0 if action == 'up': if state[0]>0 and reward[state[0]-1,state[1]]!=9: temp=state[:] temp[0]-...
b939141dc446cd55bf5a4eb92ee8cc779e0c8a9d
e159d2774069b75b7b0dc6c7c3e5c73943640180
quora/asynq
/asynq/tests/test_yield_result.py
Python
py
1,607
permissive
# Copyright 2016 Quora, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
8c08cb61b26af770f34fecc4638690d48f8f97a9
92172bbf1047d5a68661c29311d32723a58f8810
duckheada/tensorflow
/tensorflow/contrib/learn/python/learn/estimators/estimator.py
Python
py
30,247
permissive
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
e5228176ccc57b6d1fd1efa39d2e9a61fc2e135a
dfd82ed380dbb6f34f50fb6da09e4dd303ac0e59
94929/cracking-the-coding-interview
/ch-01-arrays-and-strings/01-is-unique.py
Python
py
340
no_license
""" Determine whether or not a given string contains no duplicate characters. """ import sys def is_unique(s): """ TIME: O(N) SPACE: O(1) """ charset = {} for c in s: if c in charset: return False charset[c] = True return True if __name__ == '__main__': print(is_uni...
594fcb409c043d7d7dab04f57db92c8e21d025f2
45f29d1463689a7afe710798fa642f981e5761b6
kuiqejw/50.037-Blockchain-SUTD
/exe1_w01_3.py
Python
py
432
no_license
import hashlib from hashlib import sha1 from binascii import hexlify from itertools import product from sys import argv from random import getrandbits, randint from os import urandom # #Q3 import ecdsa # SECP256k1 is the Bitcoin elliptic curve sk = ecdsa.SigningKey.generate(curve=ecdsa.NIST192p) vk = sk...
8d1eb0c275d9a0c756fdfc2b1b7420bcf3efcbfa
46abdc31cb5aa421cb4e8550ba444b2d33c26a3e
dragomir-parvanov/VUTP-Python-Exercises
/07/access_logs_regex.py
Python
py
2,203
no_license
# 1. Create a python program that reads apache log file - access_log and from that log file using regular expressions extracts and group following information: # - IP address # - accessed page path # And based on that information: # - show top 5 IP addresses based on the count of connections # - show top 5 most...
dec1470ac1b1d7bb85e7e77bb6e54cfe800d1851
60df65c0e5534b97721129f36773fb02615949c2
oldsniffs/masterpiece-studio
/src/harmony.py
Python
py
1,525
no_license
from pitches import * from custom_logging import * SCALES = { "major":[2, 2, 1, 2, 2, 2, 1]*4, "minor":[2, 1, 2, 2, 1, 2, 2]*4 } CHORDS = { "major": (4, 3), "minor": (3, 4), "dominant_seventh": (3, 4, 3), } # style needs to update its key map every time key is changed # returns list of pitch in...
9005d795378663dd17282abb6d3d79a0520935d8
d703b4d510ca0183a9a4214081696012e1b5656e
minseok1109/instaclone
/post/urls.py
Python
py
654
no_license
from django.urls import path from .views import * app_name = 'post' urlpatterns = [ path('', post_list, name='post_list'), path('new', post_new, name='post_new'), path('edit/<int:pk>/', post_edit, name='post_edit'), path('delete/<int:pk>/', post_delete, name='post_delete'), path('like', post_...
857e6f6b4b06e6dd7701067cbf74b50fed6a2b45
c9605a31ca13be23f565cb808d3fafbf58138f42
xiaozhu9904/openDiagram
/physchem/ipynb/plot_label.py
Python
py
4,536
permissive
#!/usr/bin/env python # coding: utf-8 # In[3]: get_ipython().run_line_magic('matplotlib', 'inline') import os HOME = os.path.expanduser("~") JUPYTER = os.path.join(HOME, "workspace", "jupyter") IMAGES = os.path.join(JUPYTER, "physchem", "images") PHYSCHEM_LIION = os.path.join(JUPYTER, "physchem", "liion") # In[5]...
d9564aad8ff541cc9f35c1b0ce9d869bcba53b9c
e72244aa5058eb5dee40bb18834bd4495dc8cf56
pabi2/pb2_addons
/account_bank_receipt/models/res_company.py
Python
py
266
no_license
# -*- coding: utf-8 -*- from openerp import fields, models class ResCompany(models.Model): _inherit = 'res.company' auto_bank_receipt = fields.Boolean( string='Auto create Bank Receipt for Customer Payment Intransit', default=False, )
ee58a9a2507bf75ce5c56e0d8e46db915402832c
b8cdbfa434c645a5337431e184502b1a1d683fd6
luojijiaren/Introduction-to-statistical-leaning-
/R code/wordcloud.py
Python
py
938
no_license
# coding: utf-8 # In[14]: #!/usr/bin/env python """ Minimal Example =============== Generating a square wordcloud from the US constitution using default arguments. """ from os import path from wordcloud import WordCloud import pandas as pd df = pd.read_csv(r'C:\Users\Huayi\Desktop\Slide\DS502\project\clea...
2e8cce94a0e4cd7fa0708398ddfc0b1208c19478
3f2125b2e9932aca0abd490ef5cf1ecb5a808b6c
gohils/zemr_notebook
/Design-Patterns-Python/builder/interface_house_builder.py
Python
py
677
no_license
"The Builder Interface" from abc import ABCMeta, abstractmethod class IHouseBuilder(metaclass=ABCMeta): "The House Builder Interface" @staticmethod @abstractmethod def set_building_type(building_type): "Build type" @staticmethod @abstractmethod def set_wall_material...
87b3d1b0736a2d36642ac45e649a6e1adfea24c2
ac94c434646b5ac29504f8135df21058533e4d90
patrikmaric/COVID19-search-engine
/dataset/preprocessing/tokenizers.py
Python
py
560
permissive
from nltk import WordNetLemmatizer, word_tokenize, PorterStemmer # https://stackoverflow.com/questions/47423854/sklearn-adding-lemmatizer-to-countvectorizer class LemmaTokenizer(object): def __init__(self): self.wnl = WordNetLemmatizer() def __call__(self, articles): return [self.wnl.lemmatiz...
166f506fc95484e88df5b4ed019ecef7397d60c0
9d6f159b7293286975e3df7d988798920e6ea262
vveckaln/spy_analysis
/python/GeneratorLevelUtilities_cff.py
Python
py
833
no_license
import FWCore.ParameterSet.Config as cms def addGeneratorLevelSequence(process) : # Produce PDF weights (maximum is 3) process.pdfWeights = cms.EDProducer("PdfWeightProducer", # Fix POWHEG if buggy (this PDF set will also appear on output, ...
892ca5732840e01e7e0017dda5e53d8526b1ac97
80379df03dba530fe22701ba4b502fca560d2bec
icann/lgr-django
/src/lgr_advanced/lgr_editor/views/create.py
Python
py
9,818
permissive
#! /bin/env python # -*- coding: utf-8 -*- """ create - """ import logging import os import re from io import BytesIO from pathlib import Path from django.conf import settings from django.contrib import messages from django.core.exceptions import SuspiciousOperation from django.core.files import File from django.db i...
133065e1f8e45cd267699a8d910a4d2d61f06101
d2db55495b6c02e48e9de8e7d1cfeb33cd9885ba
rk110047/crm-mater
/authentication/migrations/0003_auto_20210130_1242.py
Python
py
441
no_license
# Generated by Django 3.0.3 on 2021-01-30 12:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('authentication', '0002_auto_20210130_1002'), ] operations = [ migrations.AlterField( model_name='employeeprofile', n...
9a841bb778777baf9fbae33adf6215e7244edb1d
8dc8afc1030e5e0484143b984d6061f25008c1ff
Brow71189/examples
/setup.py
Python
py
712
no_license
# -*- coding: utf-8 -*- """ To upload to PyPI, PyPI test, or a local server: python setup.py bdist_wheel upload -r <server_identifier> """ import setuptools setuptools.setup( name="swift-examples", version="0.0.1", author="Andreas Mittelberger", author_email="Brow7118@gmail.com", description="Exa...
d0f9537beb6820f993902cd4e75531963fd53eba
a9ef7564b9ed3ccb13f2b7e11fd71463d30aff35
worldyne/module_4_project
/exec -l /bin/bash/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/container/flags.py
Python
py
80,903
permissive
# -*- coding: utf-8 -*- # # Copyright 2016 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...
f52c93a84ad5718a4b54fe8766f3e4564a2a8bc0
550cb420bcc50464c6e72f56adc05f96e29866e6
ErickRosete/algorithms-python
/divide_and_conquer/Inversions/count-inversions.py
Python
py
1,205
no_license
def sortCountInv(arr): n = len(arr) if(n <= 1): return arr, 0 nby2 = n // 2 sortedLeftArr, leftCount = sortCountInv(arr[:nby2]) sortedRightArr, rightCount = sortCountInv(arr[nby2:]) splitCount = 0 leftInd = 0 rightInd = 0 sortedArray = [] for i in range(n): ...
63e5c9e217d45f9a8539d9da4b3bcf3b227cca95
15d9f90a39058fd2bf68b026c96e3e59996a7ef5
JustinsHub/flaskfeedback
/app.py
Python
py
5,060
no_license
from flask import Flask, render_template, redirect, flash, session from models import db, connect_db, User, Feedback from secrets import KEY from forms import RegisterUser, LoginUser, FeedbackForm app = Flask(__name__) app.config['SECRET_KEY'] = KEY app.config['SQLALCHEMY_DATABASE_URI'] = 'postgres:///FlaskFeedback' ...
c869876a05313002084f63bfae2fa0f987d1fe17
f89a24ce95d444c4f9c857ab452d417cc07ebaef
aleks-kozyrev/stx-horizon
/openstack_dashboard/dashboards/admin/inventory/memorys/forms.py
Python
py
12,801
permissive
# # Copyright (c) 2013-2014 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 import logging from cgtsclient import exc from django.core.urlresolvers import reverse # noqa from django import shortcuts from django.utils.translation import ugettext_lazy as ...
9243cc203b8278e88d4a3e05617ea1757502ae42
e28f1b5553294c2918471647a7b7c6665c3b916f
yh496/Allswap-cornell
/products/api/serializers.py
Python
py
429
no_license
from rest_framework import serializers from products.models import Product from django.contrib.auth.models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username','email') class ProductSerializer(serializers.ModelSerializer): user = UserSer...
d7feb087e15fcc51f92f137e1dd24093c38f2647
e6771e99b4851201864f686064a7857d130b248d
MackenzieBot/Website_Bridge
/app.py
Python
py
2,264
no_license
import numpy as np from flask import Flask, render_template, request from backend_files.cleaning_text import load_dict, clean_text from backend_files.vectorizing_text import bag_of_words_category, bag_of_words_response from backend_files.building_models import get_model # Backend Team (Lines 9-19) CATEGORIES = ['pass...
ebbfc08e4325e61d6a6bb767ad50774a3cdd4675
0cb46e711e411fc72eed6cc7bfcf37c4d4b1ae3a
SaeedTaghavi/learning_nest
/CNS2019_NEST_Tutorial/part3_synthesis/scripts/calculateStatistics.py
Python
py
1,133
no_license
"""Calculate average rate and CV per population. Usage: calculateStatistics.py <spikes_file> <simconfig_file> <statistics_file> """ if __name__ == '__main__': import yaml from docopt import docopt import numpy as np # parse command line parameters args = docopt(__doc__) # load spikes f...
0874ee6be514645c78f35d654ca8dfb889a36c97
e2877e9ca242ade07338730a7f457874296bf75d
testmana2/geo2tag
/src/open_data_import/open_data_object_to_point_translator.py
Python
py
779
no_license
class OpenDataToPointTranslator(object): def __init__( self, importDataDict, objectRepresentation, version, importSource, channelId): self.objectRepresentation = objectRepresentation self.version = version self.importSource = impor...
a70391d1daf89e62a8f2c47cfa88cd04425ca3ba
5d97803e4601cc63e5ab58390bd6f0c381acca7b
Calvin98/Iowa_PythonProjects
/Flower 2.py
Python
py
390
no_license
import turtle wn = turtle.Screen() alex = turtle.Turtle() # number of sides n = 10 # length of each side size = 30 interior_angle = 180 * (n - 2) / n turn_angle = 180 - interior_angle for count in range(n): alex.forward() interior_angle = 180 * (n - 2) / n turn_angle = 180 - interior_angle for count in range(n...
40e7931bc7ce2e15742800f1c08bd1947c76dd5d
940d756941f3f1f23b3fd16bc7e017a87f304368
matt-fournier/polls
/polls/views.py
Python
py
818
no_license
from django.shortcuts import render from django.http import HttpResponse from django.template import RequestContext, loader from polls.models import Question def index(request): latest_question_list = Question.objects.order_by('-pub_date')[:5] template = loader.get_template('polls/index.html') context = ...
ca3b4ca6624cd5d0d32a1f79a7ce7cdd3cf433cf
d82081f89bff6277b0071781bf6e9c8a274a604d
Ryuretic/RAP
/mininet-wifi/Ryuretic/NatAP2Cn2.py
Python
py
3,115
permissive
#!/usr/bin/python """ This example shows how to work with both wireless and wired medium """ from mininet.net import Mininet from mininet.node import Controller, OVSKernelSwitch, RemoteController from mininet.node import OVSSwitch, UserSwitch from mininet.cli import CLI from mininet.log import setLogLevel from minin...
53fb4a1310a613f0276b0228059e8c21379aeb46
90f37431eefbb74c1a7e1fad349c45473c743db1
chikuBanda/qgis-newraptorplugin
/newRaptor_dialog.py
Python
py
2,021
no_license
# -*- coding: utf-8 -*- """ /*************************************************************************** NewRaptorDialog A QGIS plugin Creates new raptors Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ ------------------- ...
ad0c95f4f98364c09ea789f8d1ce6839b87aa739
98cdba7147075aff4edce54bcd0e33a802de0e0f
timeanddoctor/slicelets
/StylusBasedUSProbeCalibration/FiducialsList.py
Python
py
19,402
no_license
''' Created on 28/03/2013 @author: Usuario ''' import os from __main__ import vtk, qt, ctk, slicer class FiducialsList(): ''' classdocs ''' def __init__(self): ''' Constructor ''' """ path=slicer.modules.usguidedprocedure.path modulePath=os.path.dirna...
900c75db336b9dd50c45268f11f416b8bde883dd
56ffea3d28132eeb788cbf8d7c7e531476086322
AniketShahane/GitHub_Portal
/github/wsgi.py
Python
py
483
no_license
""" WSGI config for github 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.1/howto/deployment/wsgi/ """ import os # from whitenoise.django import DjangoWhiteNoise from django.core.wsgi import get_wsgi_a...
9ee8b10fe9cdc5bc2091d1c7101adcf5491a46c0
09d3052bdaa04eecc17828014b0aa40e555034ae
OSSSP/insightconnect-plugins
/microsoft_teams/icon_microsoft_teams/actions/remove_channel_from_team/action.py
Python
py
1,105
permissive
import komand from .schema import RemoveChannelFromTeamInput, RemoveChannelFromTeamOutput, Input, Output, Component # Custom imports below from icon_microsoft_teams.util.teams_utils import get_teams_from_microsoft, get_channels_from_microsoft, delete_channel class RemoveChannelFromTeam(komand.Action): def __init...
2be7827d5e667f07e11df818938f86cbae5b1235
77a353a210c7225b8f548bb858b2059ee50ac477
RyvynYoung/nlp_harry_potter
/prepare.py
Python
py
5,383
no_license
import unicodedata import re import json import nltk from nltk.tokenize.toktok import ToktokTokenizer from nltk.corpus import stopwords import pandas as pd import acquire def basic_clean(text): ''' Initial basic cleaning/normalization of text string ''' # change to all lowercase low_case = tex...
f5791ac25fcea86bd5664df85ec71f0ac061a0dc
14377932d1ebe3868e86fec685bf9d859b269553
ByrdOfAFeather/DFGN-pytorch
/DFGN/model/layers.py
Python
py
24,592
permissive
import torch import numpy as np from torch import nn import torch.nn.functional as F from torch.nn.utils import rnn from torch.autograd import Variable from utils import get_weights, get_act from pytorch_pretrained_bert.modeling import BertLayer def tok_to_ent(tok2ent): if tok2ent == 'mean': return MeanPo...
36695332bf0e26a123445242ccc77e9b291ed798
43b2c16769b3f896566d8739a631746cbd06e63d
napplebee/culog
/app/common/constants.py
Python
py
242
no_license
class Constants: RU_LANG = "ru" EN_LANG = "en" ALL_LANG = "all" SUPPORTED_LANGS = ("ru", "en",) AMOUNT_TYPES = ("gr", "ml", "item", "tsp", "tbsp", "cup", "kg", "liter") ITEM_PER_PAGE = 12 COLUMNS_ON_LANDING = 3
72285a1ebfb30adc0a435375f4da28218a9725a1
c2e8e67951028f33f9bd3a7bd7cafee6f3d929fc
shahil1993/pyweb
/app.py
Python
py
1,473
no_license
from __future__ import print_function from future.standard_library import install_aliases install_aliases() from flask import Flask from flask import Flask, render_template from flask import request from flask import make_response import json import os app = Flask(__name__) @app.route("/") def main(): return ren...
3ec23cb139354cb2b994f5b26a87b9d3b24a0a1e
91615329f3dbce48549f0a833b70148029525df9
jayplus4/Blog
/blog/admin.py
Python
py
636
no_license
from django.contrib import admin from .models import Post, Comment @admin.register(Post) class PostAdmin(admin.ModelAdmin): list_display = ['title', 'slug', 'author', 'publish', 'status'] list_filter = ['status', 'created', 'publish', 'author'] search_fields = ('title', 'body') prepopulated_fields = {'slug': ('tit...
53bfc28afce5c0398b3e9c1796eb61442a1d44be
7c91722d74b1ea5d1ad80528f76fa7e404878586
mmrraju/django-for-user-history
/A_project/wsgi.py
Python
py
395
no_license
""" WSGI config for A_project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SET...
cdb25ace1928e34c3a03522be4cf3eeef217f960
8cca4e536dbc2f962adfcb9e8caf35a7bd804df4
LuiisClaudio/sampleManager
/libSearch.py
Python
py
552
no_license
"""call this module to setup your python packages via pip""" from pip._internal import main as pip pip_install_argument = "install" # packages to install packages_to_install = [ "pygame", # "scipy", # ] def install(packages): """installes given packages via pip Args: ...
16ca1369d59ed1e7555d8ae8bf9305348b273a2b
64e2a0a7ed4eb12169ce6ac16f43e5a354350212
nerikhman/legion
/tools/collate_messages.py
Python
py
15,657
permissive
#!/usr/bin/env python # Copyright 2020 Stanford University, NVIDIA Corporation # # 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 r...
8b115c59bf87dc0866048e6a962e851d492e8cdf
6621f23c2e37c8a53b472714a9786368c6853a2a
phj95304/loaf_django
/loaf/projects/migrations/0001_initial.py
Python
py
4,079
permissive
# Generated by Django 2.0.8 on 2018-09-01 08:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import taggit.managers class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
26f095a7affb89597617b567c0e3aa00422899fe
7ceaba5df47e4e9fdb7e42b4714379cae5303f17
Troy-The-Killer/Haku
/Haku.py
Python
py
1,703
no_license
#!/usr/bin/env python3 #-*- coding: UTF-8 -*- import Secreto import discord import asyncio client = discord.Client() token = Secreto.Token() magenta = 0xFF00FF @client.event async def on_ready(): print('--------------- Haku ---------------') print(' ID: {}'.format(client.user.id)) print(' Nome: {}'.fo...
b515cd5ab1eb69bc91476d0ee896b8d72374c6d6
e29d649813a35d1c634f63fd4e8a84bd142bd70c
CarlLfr/app-ui-auto
/common/base_screenshots.py
Python
py
1,179
no_license
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Time : 2020/04/15 # @Author : lfr import os import time from config.path_config import SCREENSHOTS_PATH from common.base_tools import p class Screenshots: ''' 封装截图并保存方法 ''' def __init__(self, driver, screenshotsName): self.driver = driver ...
e61271d8f1715fe4b7917f244b5f1c48a6cd531a
2ddae2e3a4532508dbed619dd24dfa06f79f9483
mritu301/NeMo
/docs/docs_zh/sources/source/conf.py
Python
py
7,318
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # nemo documentation build configuration file, created by # sphinx-quickstart on Sat Nov 17 15:55:54 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autog...
1da0908a86889825571986314ac21dafcf35309d
e36d755a5cb2859e3341467ffefc43fd2ff0bac0
brunofonsousa/python
/pythonbrasil/exercicios/decisao/DE resp 19.py
Python
py
1,867
permissive
''' Faça um Programa que leia um número inteiro menor que 1000 e imprima a quantidade de centenas, dezenas e unidades do mesmo. Observando os termos no plural a colocação do "e", da vírgula entre outros. Exemplo: 326 = 3 centenas, 2 dezenas e 6 unidades 12 = 1 dezena e 2 unidades Testar com: 326, 300, 100, 320, 310,305...
70d67897d2d9cd9a4a3d52eceb17c07a2fb7f028
de4cc1863e8d101424cf4bf74b58c08264f09fe8
christinabranson/hackerrank-python
/InterviewPrep/Sorting/MarkAndToys/MarkAndToys.py
Python
py
626
no_license
#!/bin/python3 import math import os import random import re import sys # Complete the maximumToys function below. def maximumToys(prices, k): prices.sort() sum = 0 for index, price in enumerate(prices): if sum + price >= k: return index sum += price return len(prices) if ...
fec9187e011bfd8ac728798795cf8c5d7d17b513
f4b75ce0a958345c29e8f28a2c9c374422ac7f33
dhamotharang/previous_projects
/Intuglo Logistics/backend/Supplier/SupplierConfirmPayments.py
Python
py
3,725
no_license
''' Name : SupplierConfirmPayments Description : This API is used to change the payment status to confirm payment amount. It uses the ship_orders table for the availability of desired booking status. ''' import traceback import sys import falcon import json from memcacheResource import MemcacheFunctio...
3a2316a00f3d00d544d93b61d5f1e81695c7a63c
597527a5b29b8786cca03f66ab299f92b1d7ebab
tamam001/ALWAFI_P1
/sale/__manifest__.py
Python
py
1,535
no_license
# -*- coding: utf-8 -*- # Part of ALWAFI. See LICENSE file for full copyright and licensing details. { 'name': 'Sales', 'version': '1.1', 'category': 'Sales', 'summary': 'Sales internal machinery', 'description': """ This module contains all the common features of Sales Management and eCommerce. ...
c08e907ca77dd3a8ec38f5cc8c79ae2f59642804
b4ca3f1750ae1ed0b28a29022fc0ea8ed2ab4219
craastad/numpy-contractor-utils
/utils.py
Python
py
11,094
no_license
#@+leo-ver=4-thin #@+node:gcross.20100923134429.1858:@thin utils.py #@@language Python #@<< Import needed modules >> #@+node:gcross.20100923134429.1899:<< Import needed modules >> import __builtin__ from numpy import tensordot, multiply from numpy.random import rand #@-node:gcross.20100923134429.1899:<< Import needed ...
6cb465f97f08080c8f3c46b140272b69b1cd27a2
0ce49ea873446b29c3588025328c5c567077abb8
whigg/captoolkit
/captoolkit/reftrack.py
Python
py
6,851
permissive
#!/usr/bin/env python """ Identifies repeat tracks and calculate the reference ground tracks. """ import sys import h5py import math import pyproj import tables as tb # to read EArray file import numpy as np import statsmodels.api as sm import statsmodels.api as sm import matplotlib.pyplot as plt from datetime impor...
2cb318e792f23ee8e83b8ae63394a42446d0eb16
adf0aca6f5b58dab2627437fc633c78b5d1d340f
payshares-testing/django-polaris
/polaris/polaris/utils.py
Python
py
19,308
permissive
"""This module defines helpers for various endpoints.""" import json import codecs import datetime import uuid from decimal import Decimal from typing import Optional, Tuple, Union from logging import getLogger as get_logger, LoggerAdapter from django.utils.translation import gettext from rest_framework import status ...
d9769124c4ad57604419c7384224e69018f6bcc8
163493a5f0765c02b40152a54b067d2f462de83e
Radgus/python-challenge
/radgus/ronda1/taks_yugi_2.py
Python
py
652
no_license
''' Write a function that given two strings determines if one is a permutation of the other ''' def permutation(string1, string2 ): result = True if len(string1) != len(string2): result = False return result for caracter in string1: if caracter not in string2: re...
d958a585260ac14c7e9831f093f317a3581dcb1d
64b2e1669730bed3432b4e7e5cef0dc4a02c3789
mercadolibre/senlin
/senlin/tests/tempest/api/receivers/test_receiver_create_negative.py
Python
py
3,991
permissive
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
f2492409ad4288eb8b5b72cf68389baf0f0d547e
81a736a1a087965d2e0535048fd98a84fafd4f29
tetrew88/projet5
/classes/store.py
Python
py
1,495
no_license
import database_function class Store: """class designed store by: -his localisation -his name""" def __init__(self,localisation, name, identifiant = 0): """constructor of the classe store""" self.id_number = identifiant self.localisation = localisation self.name...
ac469c5d4af2857d4fa0a2388b9e413b04b15d35
a8955182b6ee4ac7e3eee4ec372fbbb60bc948d8
qingchen1984/SocksTunnel
/test/testRemote.py
Python
py
2,539
no_license
#coding=utf-8 import socket; import struct; import time; import select; s = socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.connect(("localhost", 9001)); """ auth: total rndLen rndChar type userLen user pwd pwdLen addrType addrLen addr port """ rndChar = "111111...
308d79ad983c28feccc6b4f19e5857b77e71984b
9bfc7ff962316cd7e452c65c8c58f32457ecba9c
reirocco/rasp-python
/lib/bt_rssi.py
Python
py
2,534
no_license
# original: https://github.com/FrederikBolding/bluetooth-proximity import bluetooth import bluetooth._bluetooth as bt import struct import array import fcntl class BluetoothRSSI(object): """Object class for getting the RSSI value of a Bluetooth address.""" def __init__(self, addr): self.addr = addr ...
4f83e75d5110aacbd7a8ab696f0e8cd56325b170
9b0f79786e37c162d64ce39d987c41a3b72683fe
laughterGod/PythonTools
/Tools/testdidiyouhua.py
Python
py
1,034
no_license
#!/usr/bin/env python3 # coding=utf-8 import math def sushu(n): for i in range(2, int(math.sqrt(n))+1): if n % i == 0: return False return True def testsushu(start, end): a = [] if not (isinstance(start, int) and isinstance(end, int)): return "参数错误!" if start > end: ...
8ed907aa6248213ca9ec3a7e78fa6b4b2d9aff3a
40b2a44e18a8bd53de590f4561d84356adfb1eeb
NikolaPavlov/Hack_Bulgaria_Django
/week4_1/week4_1/wsgi.py
Python
py
392
no_license
""" WSGI config for week4_1 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/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
12cb1a9e33b50d2d277cce54046ad85f51d80502
ed552fa550b5de2c3ba11a9e6fdc98d93f5f4cf8
Loevik737/CheckPoint
/CheckPoint/apps/assignment/views.py
Python
py
11,590
no_license
from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from CheckPoint.apps.subject.models import Subject from CheckPoint.apps.assignment.forms import (CreateAssignment, CreateMultipleChoiseQuestion, ...
528787482bdb8459c9a11be0b488a9e0a6709512
d980f37c3cbcac47aba23cae1361276bc1b932da
jha-hitesh/pysql
/pysql/constants/core/columns.py
Python
py
421
permissive
class CoreColumnConstants: core_column_slots = ( "table", "column_name", "select", "where", "join", "NOT_NULL", "DEFAULT", "column_definition" ) core_properties_default_values = { "table": None, "column_name": None, "column_definition": "", "select": True, ...
0340de92a1c2a1aadf1ef9df3bda452640ed0999
b38300f91a54013f9ab7d64cfb0f43ead7749fe0
VelichkoDM/DjangoSocialNetwork
/bookmarks/images/views.py
Python
py
2,076
no_license
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib import messages from .forms import ImageCreateForm from django.http import JsonResponse from django.views.decorators.http import require_POST from .models import Image from acti...
4fb6124b724d6850fc3f2ebaca2d95219e7477b3
c07a411c87b2ce4929e45c6c1518a9db048614a2
NguyenQuangTuan/phan_tan_20191
/phan_tan/apps/apis/kpi_results/views/kpi_results.py
Python
py
4,003
no_license
import datetime import pytz from database_new import session_scope from phan_tan import db from phan_tan.common.helpers.dict_ultility import to_dict, clean_dict from phan_tan.common.api import UResource from phan_tan.database.models import KPIType from phan_tan.database.repositories import KPIResultRepository from phan...
339f8d9786d2b8cb847627b1967a18f6a615bfa2
356ef87f709f8d839f76e95d040c08d51166f551
kdpan/atom3d
/atom3d/util/rosetta.py
Python
py
2,973
permissive
import io import os from pathlib import Path import subprocess import numpy as np import pandas as pd import tqdm import atom3d.util.file as fi class Scores(object): """ Class for tracking and looking up Rosetta score files. :param file_list: List of paths to Rosetta silent files. :type file_list: ...
a4a35727d9126f740e18065dc3ff5b534d443c0e
3592a6ee2cafb6c9ddd38a2696f7b4a88b840a18
ZMZ147/project
/blog/blog_article/migrations/0002_auto_20181015_0740.py
Python
py
573
no_license
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-15 07:40 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('blog_article', '0001_initial'), ]...
0dc83cef43659c0507832d4454db6494aabb3f94
abfc80de0102f868cf6c5ab6d19d4f004e0b8d55
victorbucar/Image-Classifier
/ImageClassifier/get_input_args.py
Python
py
2,533
no_license
import argparse def get_input_args(): """ Retrieves and parse the command line arguments provided by the user when they run the program from a terminal window. This function uses argparse module to create and define these arguments. If the user fails to provide the arguments, default values will ...
80e09a7fb3b535520ee53c5b7f44694cfa3829ac
03f3bf03800e0070fb3de7f3ec7177249e893a2b
sbrocks/image_search_engine
/search.py
Python
py
1,237
no_license
# import the necessary packages from pyimagesearch.colordescriptor import ColorDescriptor from pyimagesearch.searcher import Searcher import argparse import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--index", required = True, help = "Path to whe...
21cdfec34c0f2829d190e2bc40d99e9db095b265
2318556de9df078efa008caea7ecec81623d4782
McMelloy/Random-Python
/GuessGameGUI/venv/Scripts/easy_install-3.7-script.py
Python
py
446
no_license
#!C:\Uni\Python\GuessGameGUI\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7' __requires__ = 'setuptools==39.1.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$',...
2939037edb49d367021e37e9f38ae361deba79c9
2994e6b87fd92f3d4f76c5a4722bb8290a39cf9a
kawangwong/feedback-app
/app.py
Python
py
760
no_license
from flask import Flask, render_template, request from flask_alchemy import SQLAlchemy app = Flask(__name__, template_folder="templates-ui") @app.route('/') def index(): return render_template("index.html") @app.route('/submit', methods = ['POST']) def submit(): if request.method == "POST": customer ...
a85182201559a3ab00012fbce66f7f3406b70b08
407cc0ba2db263d71432afbaa1557634649bfb09
hongjie94/Django
/Network/network/admin.py
Python
py
225
no_license
from django.contrib import admin from .models import * # Register your models here. admin.site.register(User) admin.site.register(Post) # admin.site.register(Comment) admin.site.register(Like) admin.site.register(Follow)
4a52cd9c4dd666cc27382f3c4c61f7201e2955c9
d6e53be154d53184a87c363d22b797c48a38cbbb
PropovedNik007/train
/process_classes/Sort.py
Python
py
11,009
no_license
""" SORT: A Simple, Online and Realtime Tracker Copyright (C) 2016-2020 Alex Bewley alex@bewley.ai 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, ...
83814db0883b0a082c114c2cdc66f712d8713a51
b05987628096fc4dbc77b88d2bef049f1ca70725
mpelchat04/geo-deep-learning
/dataset/aoi.py
Python
py
32,131
permissive
import functools import json from collections import OrderedDict from pathlib import Path from typing import Union, Sequence, Dict, Tuple, List, Optional import geopandas as gpd import numpy as np import pyproj import pystac import rasterio from hydra.utils import to_absolute_path from pandas.io.common import is_url f...
12d24d8f7ca7309df52f89f1678d4c14694992a4
ed3de3610bf08a425021307caed714b00160511c
ZZZZone/project_euler
/pe45.py
Python
py
292
no_license
i = 1; j = 1; k = 1 a = 1; b = 1; c = 1 cnt = 2 while cnt > 0: i += 1 a = i * (i + 1) // 2 while b < a: j += 1 b = j * (3 * j - 1) // 2 while c < a: k += 1 c = k * (2 * k - 1) if a == b and a == c: print(a, b, c) cnt -= 1
ab078500dbaf337a0fba7078fffcef68a5281876
813e96111b5b2f9b86022ea2eb83eaec39df68b1
iForme174/135
/14.py
Python
py
691
no_license
# Можно ли в квадратном зале площадью S поместить круглую сцену радиусом R так, чтобы от стены до сцены был проход не менее K? import math S = int(input("Укажите площадь зала ")) R = int(input("Укажите радиус сцены ")) K = int(input("Укажите необходимую ширину прохода ")) A = math.sqrt(S) print (A, " Длинна стены...
52b51cbe3ba18cd4556cb96dcf7108ca1c6c217a
499164e34667e7e5403ce4b80a8411e00fdc844d
Prefest2018/Prefest
/benchmark/wikipedia/testcase/interestallcases/testcase1_026_1.py
Python
py
8,553
no_license
#coding=utf-8 import os import subprocess import time import traceback from appium import webdriver from appium.webdriver.common.touch_action import TouchAction from selenium.common.exceptions import NoSuchElementException, WebDriverException desired_caps = { 'platformName' : 'Android', 'deviceName' : 'Android Emulat...
b682cbca34807428d20aac775d728f9bb977c738
b7273cf6612399cf6dadbce7ccf4fcc9fb56ef91
AndreDiler/ePlant
/webapp/uno.py
Python
py
994
permissive
import constants as const import gpio as gpio import time from readSerial import read from _thread import start_new_thread def start(): start_new_thread(anepasrefairechezvous,()) def handle_signals(): start_new_thread(check_water,()) start_new_thread(check_temperature,()) def check_water(): f = open("wa...
f320453908b084acc3f660da0fda24858106af49
8ce4dd04f9653329485ac2900974d1552ba79f4d
RRoundTable/Data_Structure_Study
/7week/prefixSum/MinAvgTwoSlice.py
Python
py
1,298
no_license
import time import math import numpy as np # moving average def solution(a): l = len(a) total_min = min(a) examples = [2, 3] # 2, 3개의 인자만 구하면 된다. 4부터는 2, 3의 집합의 평균이다 result = [] for e in examples: queue = [] for i, x in enumerate(a): queue.append(x) if len(q...
ec914d4edf03b2c0745998c01e90634c166b137b
2c675ffc82516885048a73a8462440ced1fc60e8
silenttemplar/python_ML_lecturce
/source/ch7/p3/ch7_3_1.py
Python
py
2,425
no_license
import numpy as np import matplotlib.pyplot as plt from source.ch7.p1.ch7_1_3 import FFNN from source.ch7.p2.ch7_2_3 import dCE_FFNN_num np.random.seed(1) # 해석적 미분 def dCE_FFNN(wv, M, K, x, t): N, D = x.shape # wv을 w와 v로 되돌림 w = wv[:M * (D + 1)] w = w.reshape(M, (D + 1)) v = wv[M * (D + 1):] ...
532cf273957395232acd2c5dfc5469bc33758350
98fba7a7a0375ba78e93691c276784868c374d71
fagan2888/pyDataCube
/cut_fits_fk5.py
Python
py
3,106
no_license
#!/usr/bin/env python #filename=cut_fits_fk5 #---------------------------------------by Gao John #a new version #import sometings from __future__ import division from numpy import * from sys import argv import pyfits import os #input filename to cut fname = argv[1] ind = fname.index('.',-5) fname_s = fname[:ind]+'_s...
e296238c6a456e8b0e2aaaa257235253f1fbd400
5c3c6ae7bb33f8ef18e7ab5156ea06c6fdba2eb1
Vizionnation/chromenohistory
/third_party/blink/renderer/devtools/PRESUBMIT.py
Python
py
11,658
permissive
# Copyright (C) 2014 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
da06329cd9948cd039079785718713180fe9fde2
c83783ac4062a18f6b265046f5e7b65bab91c07e
jaminGH/huaweicloud-sdk-python-v3
/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/tag_v5_dto.py
Python
py
4,087
permissive
# coding: utf-8 import re import six class TagV5DTO: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definitio...
c1710971b617e46fd0bf24436147b1f8f519a989
d1e8352bf19f38391392eb429e1af85b04e5230a
der-freddy/fromwmtostego
/doku.py
Python
py
1,635
no_license
import glob, os, matplotlib.pyplot as plt, numpy as np, math from bitarray import bitarray from message import Message from keyGen import Keygen from audio import Audio rand_n = np.random.rand(32) rand_n[np.where(rand_n < 0.5)] = 0 rand_n[np.where(rand_n >= 0.5)] = 1 print(str(rand_n)) test = str('') for i in rand...
86e5768e6c3813853d79c23baa01063bbd3e79af
eecc02714493cdad49d428a961d0adaf91990ec3
land-pack/landport
/example/zeromq/pub_sub_server.py
Python
py
442
no_license
import zmq import time context = zmq.Context() subscriber = context.socket(zmq.SUB) subscriber.connect("tcp://127.0.0.1:5556") subscriber.connect("tcp://127.0.0.1:5557") subscriber.setsockopt(zmq.SUBSCRIBE, "") publisher = context.socket(zmq.PUB) # publisher.bind("ipc://nasdaq-feed") publisher.bind("tcp://127.0.0.1...
2280470a932c4cff50c9095603ab431fc570f11e
77d52d45ad5766ada545cc248de84cdff4bda394
alansun17904/complexnetworks
/spreading_models/tests/test_deterministic.py
Python
py
790
no_license
from .context import models import pytest @pytest.fixture(scope='module') def adj_matrix1(): m = [[0, 1, 0], [1, 0, 1], [0, 1, 0]] return m def test_deterministic_1(adj_matrix1): d = models.DeterministicGraph(0.4, [1], adj_matrix1) time_table = d.spread() assert len(time_table)...
a7b91d19cab9b68f2f378feb2e81329e329f5e68
9c8909c22957e5f55fcb160f17993639ffbcee70
rlaecio/segur
/processar.py
Python
py
1,480
no_license
# coding: utf-8 import sys import urllib.request, urllib.error, urllib.parse import hashlib def calcularSha1DasLinhas(ficheiroOut, listaLinhas, umaUrl): print("Processando", len(listaLinhas), "linhas e colocando no ficheiro") for numeroLinha in range(len(listaLinhas)): aLinha = listaLinhas[numeroLinha] ...
e6badfd55ea0272b295a74ce14bc240f729b3638
949d0f66c4a131e36f50517a841262260ccc284b
Valuebai/awesome-python-io
/auto_haowool/airtest_haowool/utils/device_utils.py
Python
py
3,342
permissive
#!/usr/bin/env python # -*- coding: UTF-8 -*- '''================================================= @IDE :PyCharm @Author :LuckyHuibo @Date :2019/10/22 11:27 @Desc : ==================================================''' import os import json import cv2 import time import re import subprocess from utils.cmd_utils...
04d256eed359c7af82a15e5d09bbf77025546c92
3d5f10bff8bb0c3512e7f3889872ce0444128484
woodies11/CU-ICE-ThaiOCR_CNN
/experiments/densenet19.py
Python
py
1,390
no_license
from .experiment import Experiment from .dnet import densenet import glob, os import numpy import keras from keras.utils import np_utils from keras import backend as K K.set_image_dim_ordering('th') from keras.models import model_from_json class DENSENET19(Experiment): EXPERIMENT_NAME = "DENSENET19" EXPERIME...
2304009f5679e8ae99de31ce98d85bdc28bbd69b
1ffb352328db4a1eaa14e66fa3bdbab200aa6244
mikedotexe/audius-protocol
/discovery-provider/alembic/versions/a8de2cf03768_playlist_description.py
Python
py
674
permissive
"""Playlist description Revision ID: a8de2cf03768 Revises: e0d1fdc90378 Create Date: 2019-03-06 14:37:12.811239 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a8de2cf03768' down_revision = 'e0d1fdc90378' branch_labels = None depends_on = None def upgrade():...
e2e4776df2745cfeb86eea3a5a22b1d38000814a
2841224acfc97b98da3e0b2e5703395b2a2ab8f9
HarinarayananP/Air-polution-monitoring
/POLMO Sofware/Fast API - Backend/services/db/deta/userDB.py
Python
py
1,859
permissive
from typing import Optional, List from deta import Deta from config import settings from models.user import User, UserInDB, UserActionsHistory deta = Deta(settings.DETA_BASE_KEY) # configure your Deta project users_db = deta.Base('users') user_history_db = deta.Base('UserHistory') async def get_user_from_id(key: ...
4eac47330bc323d7a6f0e2c869450cf75ac16776
97c83e8708436fbc6f29998e750e7ce089d84021
christinazavou/Medical_Information_Extraction
/src/ctcue/predict.py
Python
py
4,809
no_license
# -*- coding: utf-8 -*- """ Tests the classifier on a given file. Usage: predict.py <model> <file> [-e] predict.py <model> <file> <output_file> [-e] predict.py snippet <model> [-t <term>] [-f <snippet>] Options: -h,--help Shows usage instructions. """ from features import extract_features import...
ded45b4d06d2493d1e13e679b4103a15d08beb98
9e8251b674861d3e6fcfb19e2c42df9fc51e3a79
injones/mycroft_ros
/scripts/mycroft/skills/common_query_skill.py
Python
py
6,467
permissive
# Copyright 2018 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
5cc61aca801aca559ac70dbf975675b3c33cafe1
c0499b705ce554c4097e496a9a15f6ecb035e814
thalida/grindless
/grindless/__init__.py
Python
py
448
no_license
""" .. _getting-started: Getting Started ======================= Setup -------------------- python pyenv pipenv cd docs_src && make build && cd - dev setup and installing Testing in Minecraft ------------------------- quick guide and undestanding Optional ----------------------- where th...
db1c3feacd14c1b12c91c839e7485795493a235f
d5504a8aa0a028d30538b900c73a5b8ab28ba6d2
jegansriragavan/open-tamil
/webapp/opentamilapp/classifier.py
Python
py
1,450
permissive
# -*- coding: utf-8 -*- # (C) 2017 Muthiah Annamalai # This file is part of open-tamil examples # This code is released under public domain # Ref API help from : https://scikit-learn.org import numpy as np import random import string import time, os import joblib # project modules from .classifier_eng_vs_ta import j...
81338ef32f3b3be8579bbe0e310cfb9318c5e4dd
84c2d6e686f09d4c76052f1769b495dde0c3e14b
narin111/COVID19-MAP
/cmapsite/corona/urls.py
Python
py
264
no_license
from django.urls import path from . import views from django.conf.urls import url urlpatterns = [ path("", views.index, name="index"), path("chart/", views.chart, name="chart"), path("hospital_chart/", views.hospital_chart, name="hospital_chart"), ]
960bc11a2cbaac12af7d64274424925898ba76c5
89361f3a205560f04b39e1fa0eb2e956561b91a9
pastrans/TPI115-Proyecto
/apps/personal/views.py
Python
py
3,087
no_license
from django.shortcuts import render, redirect from apps.personal.models import Personal from apps.usuario.models import Usuario from apps.permiso.models import Permiso from django.contrib.auth.decorators import login_required # Create your views here. @login_required def resumenPersonal(request): if not request.se...
2364ecee639e9c1a4328da2b5c028772465ee8f3
43913fa8b3f710fa797cd80ae3ede1d199752c30
mazharul-miraz/butterfield
/setup.py
Python
py
897
permissive
#!/usr/bin/env python # Copyright (c) Sunlight Labs, 2012 under the terms and conditions # of the LICENSE file. # from butterfield import __appname__, __version__ from setuptools import setup long_description = open('README.md').read() setup( # name = __appname__, # version = __version__, name ...
1a27f1eb4cd946f3537c2fd87691fc4331d45900
0a51b75839469de792180a5968a64a20f029eb79
uralmax89/CRUD-SQLAlchemy-SQLite
/crud.py
Python
py
3,158
permissive
#!/usr/bin/env python2 """This python program performed all of CRUD operations with SQLAlchemy on an SQLite database.""" from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, Restaurant, MenuItem engine = create_engine('sqlite:///restaurantmenu.db') Base.metad...
04e5b022e69427085bbb40857d0aebdfbdd2d8bf
74ef299ab21378f07768241fd87330ae4f82c559
kenjones21/kenWeaver
/backend/covid/migrations/0003_auto_20201111_2000.py
Python
py
562
no_license
# Generated by Django 3.1.3 on 2020-11-11 20:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('covid', '0002_auto_20201111_1955'), ] operations = [ migrations.AlterField( model_name='county', name='name', ...
52cbfe5879a55707a0f89bead5c243255f3d6e2f
c946e3428ca48da86325bdf97a0b7d73bf37d778
isnide23/cs271
/nand2tetris/projects/06/pythonAssemblerRectL.py
Python
py
3,499
no_license
#Author: Ian Snyder import re #array to hold lines for processing unprocessed_array = [] #creates the hack file create_hack_file = open('RectL.hack', 'w') #opens and reads the Add.asm add_file = open('rect/RectL.asm', 'r') #puts each line as a single element into an array #skips empty lines for x in add_file: ...
725e315283692b1abda5f9490e9a9e3437353518
5cde544a6b2e8f111abeb2b403869a4ad84a7c27
zlatankr/Coding-Challenges
/ProjectEuler/Project Euler 10.py
Python
py
722
no_license
# -*- coding: utf-8 -*- """ Created on Thu Sep 24 20:00:38 2015 @author: zlatan.kremonic """ # 10 import timeit """ The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. """ def Prime(n): for i in range(2,int(n**0.5)+1): if n%i==0: return F...
e780e95b2b5a6fb16499bf49a212bc487181ccac
f02a5ed44d032e98db4723eb6e52ee5256298542
mandrabi1234/PASS-
/Flask App/app.py
Python
py
93,723
no_license
# Example: setting up Python server using Flask import os from flask import Flask, jsonify, request, abort, render_template, Markup import pygsheets import pandas as pd app = Flask(__name__) gc = pygsheets.authorize(service_file= 'andrabi-analytics.json') gsheet = gc.open("xG Stats").sheet1 # Access...