blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
effb4906bbdf4ed2d48a93d422f44fd6257fee86 | 295ab2ded867a80ff2ab42ba21b55f7e05cce19e | /Decoder.py | d2c52f45a21406119c1b3e8b48c6d37785083d66 | [] | no_license | paolotron/HKMovies | 1d052b23da51af8561a8c5b7faea80ff5e4795b4 | ac3a911ec9aa46808c8d241b5b0f061c451613e9 | refs/heads/master | 2023-01-22T18:02:40.030443 | 2020-11-29T14:46:32 | 2020-11-29T14:46:32 | 316,805,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,633 | py | Decoder.py | import pandas as pd
import os
"""
This is the module for converting files to the correct json format
the functions here must take two path, input file and output file
the output will always be json and must be in the format:
Submission Date: YYYY-MM-DD HH:MM:SS
Email: String
Preference: String ... |
2f36819288c31350f4fc6d47fa95df99017d7082 | b729ce8ce8b5db61e7aa56e0a0e6d0a76bf8b55f | /blog/models.py | 6aa603f10d30f5903e5b77d337f217c0398152be | [] | no_license | JPHarrisCF/jpharriscf.github.io | 5eee84415356b8dcede0d930a3ccb1d55f2e0944 | a89870ad3f5f1fa030540b7791cd69eb44e74dc3 | refs/heads/main | 2023-03-12T22:57:59.744615 | 2021-03-01T13:00:30 | 2021-03-01T13:00:30 | 343,416,817 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,272 | py | models.py | from datetime import datetime
from blog import db
from blog import login_manager
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
class Post(db.Model):
id = db.Column(db.Integer, primary_key=True)
author_id = db.Column(db.Integer, db.ForeignKey('user.i... |
aa7ba0517859cd6f78759ed0889886c1d5659e7e | 33dc58b721567b6acd3b5776435861209b19ab6f | /test_data.py | 51f43d7b5f6174b6b629e54f9ae190fdf8793782 | [] | no_license | qasemut/EvermosWebsiteAutomation | affc329fdc4555199aba0af2d3247e953fc87d66 | 814eaf6f9417c808a691b18e2ba0313e0df12a3e | refs/heads/master | 2023-01-03T11:46:57.283570 | 2020-11-02T20:56:51 | 2020-11-02T20:56:51 | 309,490,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 341 | py | test_data.py | class TestData():
# ---Driver Path ---
CHROME = r"D:\Assestment\Evermos\Driver\chromedriver.exe"
# --- URL & Credentials ---
BASE_URL = "https://evermos.com/"
# --- Login Credentials ---
PHONE_NUMBER = "621223334444"
PASSWORD = "password"
WRONG_PHONE_NUMBER = "62122333"
WRONG_PASSW... |
5420488c154ab40121d04a916ecb2d95dfd53fc5 | 41f86e14f91944d62acbb4a5dd2ae3322eaef11d | /Legacy/Formulier/dirdict.py | c056e7da6d184bfc0cad7ee0846dad6ddbce9757 | [] | no_license | cheezbuggah/ChineseAI | 0d847fd1e35ca3be7bd16a432f13c47282503741 | 2ad44ebe87ac34e309bf81ce81f3b72be0809110 | refs/heads/master | 2020-04-19T10:20:12.293174 | 2019-06-12T19:43:44 | 2019-06-12T19:43:44 | 167,173,033 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,710 | py | dirdict.py | # Dictionary om de plaatjes uit template.py in de goede map te stoppen.
# { x(column) : { y(pixel) : 'dirname'}}
DirDict = {0: {74: 'U+4E00',
152: 'U+4E0A',
230: 'U+4E0B',
307: 'U+4E2D',
383: 'U+4E4B',
461: 'U+4E5F',
539: 'U+4E8B'... |
2be582e1fee3d86fa5caa4eb83de10d9fe76f360 | 75446036852d4458d11b3e320a3b5cdd046bcc99 | /phonemeTest.py | ad2a25302e65f218c48130cadd3763014794f734 | [] | no_license | dariiboi/Rap-Bot-v1 | 39cc53b9e618fb46cdebd12c7b6d3ea8f30c0a65 | 821d7d6a8b3f217afce107264447b5beac87a4e6 | refs/heads/master | 2021-05-11T19:11:06.930529 | 2018-05-15T01:54:32 | 2018-05-15T01:54:32 | 117,854,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | phonemeTest.py | import sys,codecs,os,subprocess
import pprint
import re
# -*- coding: <utf-8> -*-
def espeak2ipa(token):
CMD='speak -q --ipa '+token
#print CMD
try:
phoneme = subprocess.check_output(CMD.split()).strip()
return phoneme
except OSError:
return None
rawBytes=espeak2ipa('boy')
uniCode=rawBytes.decode('utf-8')
u... |
520ce6a1d4082fa7c82899128fa2f01aea3815dd | 2e777b0462e8ccfbfef88b02f8075f2af2497993 | /HAND.py | 9ae5ad3eda0833de3d67f11751465aeb7de1e411 | [] | no_license | joeyscl/BlackJack-Monte-Carlo-Sim | 07176d4560570014999f2cb979a9491233e070a9 | de4c4d69ab756de83a6049d8a983454084b096b6 | refs/heads/master | 2020-12-24T19:17:31.096550 | 2016-04-21T01:56:05 | 2016-04-21T01:56:05 | 33,024,665 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,893 | py | HAND.py | __author__ = 'Joey'
from CARD import CARD
class HAND(object):
def __init__(self,cards): #cards is a list of CARD
self.cards = cards #list of CARD
self.__cardnames = self.getNames() #list of card names (strings)
self.__cardvals = self.getVals() #list of card v... |
c822e20dca57a82259d5631cab87846a6385ab5b | 23652304566b1869ca65b95b116ee43d16e134f3 | /h/schemas/forms/accounts/util.py | b1eb81e5dec3349aa328140d79015e4154195073 | [
"BSD-2-Clause",
"BSD-3-Clause",
"BSD-2-Clause-Views"
] | permissive | hypothesis/h | 29399a26990856c336b05022e827541dd8aeedab | 232446d776fdb906d2fb253cf0a409c6813a08d6 | refs/heads/main | 2023-08-30T16:21:33.754658 | 2023-08-30T09:26:50 | 2023-08-30T09:40:48 | 3,910,945 | 2,558 | 452 | BSD-2-Clause | 2023-09-14T11:25:06 | 2012-04-02T19:56:59 | Python | UTF-8 | Python | false | false | 426 | py | util.py | import colander
import deform
from h.schemas import validators
PASSWORD_MIN_LENGTH = 2 # FIXME: this is ridiculous
def new_password_node(**kwargs):
"""Return a Colander schema node for a new user password."""
kwargs.setdefault("widget", deform.widget.PasswordWidget())
return colander.SchemaNode(
... |
8816c150c5ce9d9212e848231085ac0191630958 | ca0b226a9d483b77959eb29aec5308e803181fe0 | /iou/admin.py | dbbc1c09f669b478fffe37e5901ba530687c1a1e | [] | no_license | TK-IT/kasse | 2f07f6a58ee8628c76a90c3f64c93c3e3304f221 | c3889250adc3df0cbbc3d4ae8fa2577e3923606a | refs/heads/master | 2023-02-25T02:49:33.824463 | 2023-02-23T16:18:33 | 2023-02-23T16:18:33 | 41,453,360 | 0 | 1 | null | 2023-02-23T16:18:35 | 2015-08-26T22:33:59 | Python | UTF-8 | Python | false | false | 433 | py | admin.py | from __future__ import absolute_import, unicode_literals, division
from django.contrib import admin
from iou.models import ExpenceProfile, Expence
class ExpenceAdmin(admin.ModelAdmin):
list_display = ('payer', 'amount', 'comment')
list_select_related = ('payer',)
class ExpenceProfileAdmin(admin.ModelAdmin)... |
363d7087e0c48b549d2eb1e32557d4652d20d1e4 | be2880b807dbe8a269b28f2b27d71054bcad8cb0 | /insertNodeInSLL.py | 534c301a097af2fa7a20d978ba17202d8611a324 | [] | no_license | sharonlu-git/hackerRankFun | 4c309ab2214388fb7ad9c8b7e835844c0d54c8d3 | 1f85407ca7053c09ee365d2f6cc2caa9b6283dc4 | refs/heads/master | 2023-07-17T08:43:02.636708 | 2021-08-28T01:00:48 | 2021-08-28T01:00:48 | 396,809,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 651 | py | insertNodeInSLL.py | def insertNodeAtPosition(llist, data, position):
# Write your code here
retList = SinglyLinkedList()
retList.head = llist
iterationNode = retList.head
newNode = SinglyLinkedListNode(data)
loc = 0
if llist is None:
retList.head = newNode
elif position == 0:
newNode.next = ... |
9d75132b23c641a4c49bdaeeeaa8b88379d1f108 | 78f25b200b3e4f439700cd26786d0cc61fbca5d8 | /app.py | a58850e6d3a86057a65f0f6484f627a33463744a | [] | no_license | meenukrish/Mission-to-Mars-using-WebScraping-and-MongoDB | 6fcdcb24c45420055632a555953a2b6e7971349a | a200fe1e1461f598e15ae0feba3162cc65bb3d80 | refs/heads/master | 2020-05-19T17:50:56.774568 | 2019-05-06T16:00:17 | 2019-05-06T16:00:17 | 185,144,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,209 | py | app.py | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
# Create an instance of Flask
app = Flask(__name__)
# Use PyMongo to establish Mongo connection
mongo = PyMongo(app, uri="mongodb://localhost:27017/mars_app")
# Route to render index.html template usin... |
83e4359dd73fa29ecd2e1989740e9c17c8261b69 | 3d36b502b339c7b1099e44badb79107b5e37b6fe | /parsers/date_parser_initializer.py | e0ad9b2267cb44032573bfb296237acf6043c4eb | [] | no_license | VardaanBajaj/AutomatedShortStrangle | f8a5249d5ea16efc7acfe90d5b37346de3f8e36d | f42a70ac99236e56e5cc7a9bac1dae54f9467653 | refs/heads/master | 2023-08-25T03:01:53.498824 | 2021-09-20T18:18:31 | 2021-09-20T18:18:31 | 408,129,823 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,640 | py | date_parser_initializer.py | from model.mapping import Mapping
class DateParserInitializer:
def __init__(self):
self.month = Mapping()
self.week = Mapping()
self.adj_week = Mapping()
self.month_util = Mapping()
self.week_util = Mapping()
self.adj_week_util = Mapping()
self.initialize()... |
59b2b1c35f219b3e876da1743eb36340ff771445 | 32bcae955234cb38c8566006c96063ed73948e62 | /cdk/cdk/kinesis_firehose_stack.py | 8e60f8589e7174868f645c0e7d90b1146fc56cb6 | [] | no_license | DavidChristiansen/mm-cdk-python-complete | a1cb5a98f8c784a201379dbacc9b3edbe7f3cfa1 | f4e16ca405380f7101980f11d2d4aa097c50579b | refs/heads/master | 2020-07-07T18:08:41.552546 | 2019-11-26T16:49:23 | 2019-11-26T16:49:23 | 203,433,447 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,911 | py | kinesis_firehose_stack.py | from aws_cdk import (
aws_apigateway,
aws_codecommit,
aws_dynamodb,
aws_iam,
aws_kinesisfirehose,
aws_lambda,
aws_s3,
core,
)
class KinesisFirehoseStackProps(core.StackProps):
table: aws_dynamodb.Table = None
api_gateway: aws_apigateway.CfnRestApi = None
class KinesisFirehose... |
d71651fc7f204df2f974544e3dc99dee457692d6 | b35db111c90554383aba3f8fe1458c3854a86945 | /PythonPrograms/workspace/BasicsPython/BasicTestPackage/referenceTest.py | c231c8daf93c8880ec40377dd9d301f3808ecd3b | [] | no_license | Naveen-Krishnamurthy/PythonProgramming | 79c4f5cc2c72f1578f9a59edcdf7b530ef6c7fe1 | 16aa66f700cbe8cd17342bc06efd48c0d0775d9e | refs/heads/master | 2021-01-19T16:59:24.761566 | 2017-05-19T18:52:24 | 2017-05-19T18:52:24 | 88,296,970 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | referenceTest.py | '''
Created on 10-May-2017
@author: ubuser
'''
spam=42
print(spam)
chees=spam
chees=100
print(spam)
print(chees)
# Reference to list
testList=[1,2,3,6]
print(testList)
newList=testList
newList[1]=56
print(newList)
print(testList)
def testList(passByRefer):
passByRefer.append("Pass by reference Test")
... |
17128ebc4d638ef572cb0d84f7f21729508b14e4 | d70b6253c6c676b9d9b88da96cb3e384aaa3288d | /Python/karat.py | beac08293c63fccf46a26696be55256a2b0c8718 | [] | no_license | YashSaxena75/Projects-final | 0c729bbfdbd2709d29915c8e35cc672afe0c8881 | f52f0ed980a1c21a1987d7508edd100c458bc456 | refs/heads/master | 2023-04-08T17:18:18.507289 | 2021-04-20T04:24:09 | 2021-04-20T04:24:09 | 192,554,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 745 | py | karat.py | from termcolor import colored
i=0
text=colored("==================================Karatsuba Multiplication=======================================",'red')
text1=colored("--------------------------------->Processing---------------------------------------------------->",'blue')
print(text)
def karat(x,y):
if len(str(x... |
3b6eef24f96f78c94389dc847e7d3a234a339a43 | 43f4e8f766d21d8c555d6b41c65cfd05b1077a70 | /DataProcessing/cut_graph.py | 695115ebd58a67740c509cb7d16b83626d9ecafb | [
"MIT"
] | permissive | MengXu-u/Knowledge-Distillation | 792d66518f06b4c25caafbb7d200a1242eb70255 | 67e52a54d5ef420af7c7351466f2e86be1ebefaa | refs/heads/main | 2022-12-27T16:39:10.826290 | 2020-10-13T07:59:02 | 2020-10-13T07:59:02 | 303,606,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,024 | py | cut_graph.py | #coding:utf-8
import tensorflow as tf
import json
import collections
from datetime import datetime
def model_show(path_name):
checkpoint_path = 'prune_model/' + path_name + '/model.ckpt-0'
log_path = 'prune_model/' + path_name + '/' + path_name + '_log.txt'
out_file = open(log_path, 'w')
ckpt_reader = t... |
6e2c7797f3a493861111e186d5398b02040c1adb | 62fa826ef624bb45990ea0c5b5ad8e9b87ea462b | /Улитка_.py | 879a35186ef1544b8ea716d057ae72231ce00471 | [] | no_license | savva-kotov/coursera-python-basics | d1d0959ebdc9bc7bc94d6a93c853d9f5964c1d43 | ea0f25eb3f67b1f0f23dd80548e91ef05b4f6934 | refs/heads/master | 2021-03-14T18:28:31.480597 | 2020-03-12T09:09:17 | 2020-03-12T09:09:17 | 246,784,232 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 811 | py | Улитка_.py | """
Улитка ползет по вертикальному шесту высотой H метров, поднимаясь за день на A метров, а за ночь спускаясь на B метров. На какой день улитка доползет до вершины шеста?
Формат ввода
Программа получает на вход целые H, A, B. Гарантируется, что A > B ≥ 0.
Формат вывода
Программа должна вывести одно натуральное число... |
d5a7920949bfb6b71ee8a43eb5b488990279628a | e0b33ac23f1d6ba5a05cf454fb3524eb449404bb | /PageRank/method1/PageRank.py | 250c2717b480506f083fc02121ae3a00a9110e0c | [] | no_license | LittleSaltFish/Parallel-Computing-Sample | 0db38785aeaf87a8a41814ef4db8f2a6445d097c | 53592e9e68934cc797969b76c287479b18c8af6c | refs/heads/master | 2023-04-12T16:27:26.929030 | 2021-05-22T20:31:30 | 2021-05-22T20:31:30 | 363,593,912 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,844 | py | PageRank.py | import numpy as np
from mpi4py import MPI
import sys
def readM():
M=np.loadtxt("./Power-iterations-M.csv",delimiter=",",dtype="float64")
print("read\n",M)
return M
def initV(node_n):
V=np.array([1/node_n for _ in range(node_n)])
print("init\n",V)
return V
comm = MPI.COMM_WORLD
rank = comm.Get... |
d06d81b7ba980c44fdb1ff17fdb9473886479003 | a81f6dd9fed6dbcb8f421f9bb14b9ce8b74b2fdc | /wish_swap/rates/models.py | 045f8895204b1db57230224c7e7be5b582a7bfb7 | [] | no_license | krypt0x/wish_swap_backend | 037393b4143fb3cd967a3f80c6fb8d35ab0e777c | 644676b098d2b5d89329c3a83b6e64ca491fff7f | refs/heads/master | 2023-03-03T05:28:26.432472 | 2021-02-13T09:43:29 | 2021-02-13T09:43:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,032 | py | models.py | from django.db import models
from wish_swap.settings import COINMARKETCAP_API_URL, COINMARKETCAP_API_KEY
import json
import requests
class WishCommission(models.Model):
amount = models.DecimalField(max_digits=100, decimal_places=0, default=0)
class UsdRate(models.Model):
ETH = models.FloatField()
BNB = ... |
7ebc705b6bbf10c0d14d8cdaa4f9ab0fb88884f1 | 02611b637a6547768b227ef5f09958a510e456ae | /otpauth/views.py | dde6d01d017b756c357e95dbb6ffda67859590fd | [] | no_license | farahmand-m/django-rest-api-with-otp | 66a35be6f113c8362b2aa1df596767ecef91379e | 5ef3df8e81258b7d2aec24873294a2c024216ca9 | refs/heads/master | 2022-11-24T16:01:28.495082 | 2020-02-12T05:05:30 | 2020-02-12T05:05:30 | 232,520,897 | 0 | 1 | null | 2022-11-22T05:14:02 | 2020-01-08T08:56:40 | Python | UTF-8 | Python | false | false | 833 | py | views.py | import pyotp
from django.http import HttpResponse, JsonResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework import viewsets
from otpauth import models, serializers
@csrf_exempt
def request_otp(request):
if not request.POST:
return HttpResponse(status=200)
phone_number = r... |
fa17ffc0574cfa9454b0e3fa3bec6b65cab9fbd5 | 661cc615b287a54afb556c761ccd7c9fb84dfe75 | /code/model.py | f83291d8d5d1e5948a827d3604b3ac9623896ed6 | [] | no_license | wyannn/NTSDCN | 82c84533e77dec8f7ca16e3ab65f8c6445e957e3 | 6a65cd20623f590171b25a04952281c93905878b | refs/heads/main | 2023-03-12T06:41:33.327291 | 2021-02-27T01:23:57 | 2021-02-27T01:23:57 | 305,035,892 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,530 | py | model.py | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 7 14:54:09 2018
@author: student
"""
from utils import read_data, laplacian_loss
import time
import os
import tensorflow as tf
import numpy as np
class NTSDCN(object):
def __init__(self, sess, image_size = 64, label_size = 64, batch_size = 64,
c_di... |
e056a1600b620519e729c597dcec57793284019a | 87915901260dbcd806e60b79ecf0a555612ce80c | /flaskberry/views/system.py | 177d3ccad8d798a704e481ef15511c9b036ca47d | [
"MIT",
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | permissive | alexcthomas/flaskberry | 95cb0f2cb0b6ae46398f92e3a099a6210e700fc4 | c6f618212456f4d24a49e1db732e71e5398e96f6 | refs/heads/master | 2020-12-25T02:10:28.133490 | 2013-03-17T12:09:42 | 2013-03-17T12:09:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 833 | py | system.py | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, redirect, url_for, flash
import subprocess
def check_output(*args):
return subprocess.Popen(*args, stdout=subprocess.PIPE).communicate()[0]
mod = Blueprint('system', __name__)
@mod.route('/')
def index():
uptime = check_output(["uptime"])
... |
4d30f4294a9f3aab8cae20dca9d280c53b37ed25 | 47217cbb913f404201a427a9b7be2635baf104e2 | /校招-2017/meituan.py | 4b8bae536e8c2960e1f0fd041a5d16f340141c20 | [] | no_license | wuchaoml/on-campus-recruitment | 8faa62935363238a483f3280f6907769959a7816 | 935285862b651d6286def1b3451832fcb1be249e | refs/heads/master | 2021-07-12T01:12:12.046187 | 2017-10-16T07:52:22 | 2017-10-16T07:52:22 | 107,095,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 587 | py | meituan.py | num = int(input())
bull_str = input().split(' ')
bull_list = []
for i in range(len(bull_list)):
bull_list.append(int(bull_str[i]))
flag = 0
while True:
flag += 1
for i in range(len(bull_list)):
if bull_list[i] == 1:
for j in range(bull_list.index(bull_list[i]), len(bull_list)):
... |
d4d47f7abc5c8224188430546a65bfb8f358802f | 3135a3cc72a12aad808871af8af8619dd9913ca4 | /bridgelabz/data_structure/Palindrome.py | a19af68ee1afa0ffd455d10beadfb2ad5d832277 | [] | no_license | kalereshma96/Python_Functional_Program | ec11185bb724bcf41191a1a1de62c5bc506e6ddb | aaf23a5355e4ef0c3fb569882900e4d185f78f96 | refs/heads/master | 2020-04-07T11:52:23.527532 | 2018-12-13T13:33:06 | 2018-12-13T13:33:06 | 158,344,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | py | Palindrome.py | """
purpose :Take an string as input and construct an algorithm
to input a string of characters and check whether
it is a palindrome.
@Author : Reshma Y. Kale
"""
from com.bridgelabz.utility.Data_structure_utility import *
if __name__=="__main__":
dq = Deque()
dq.palindrom() |
ae1aab7563443db3a31fe98b5b26b32944d57c9d | 18a1cf42e60c93610609a19dc6f4708c0f784a38 | /venv/lib/python3.6/site-packages/tests/test_testhelper.py | 840bf90d3100d707514eb95a1f3bc11452ca4b46 | [] | no_license | chaitubheri/Trillium | 695f185e615a4eaed337a8d0585f4a295a393c5f | 6696450a0db174a470d2e2ed0c793cfa251e1e7f | refs/heads/master | 2020-04-06T12:33:12.000509 | 2018-11-13T23:52:00 | 2018-11-13T23:52:00 | 157,460,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 724 | py | test_testhelper.py | from unittest import TestCase
from tests import AuthHelperTestCase
class TestTestHelper(TestCase):
"""
Test our helper functions
"""
def test_assertAnyIn_fails(self):
"""
Make sure assertInAny fails correctly
:return:
"""
test_case = AuthHelperTestCase('asse... |
f9a255a464b5f48a1a8be2e2887db721a92e7f4e | e4b7fcf72ec88c2aca9118d91cd0acf39000dfd5 | /pytools/tests/test_nested_dict.py | baa2ead5b33b61dcd0f224f24de1613c41e17d5b | [] | no_license | EverydayQA/prima | 9a104ee000d2010411f5ab945aa6a981987a0441 | 109bc75bdd6a2d471eb335222d65f0d687ee9ba3 | refs/heads/master | 2022-07-22T01:26:20.478665 | 2020-11-09T01:17:29 | 2020-11-09T01:17:29 | 45,794,402 | 0 | 1 | null | 2022-07-06T20:51:22 | 2015-11-08T19:02:46 | C | UTF-8 | Python | false | false | 7,294 | py | test_nested_dict.py | import unittest
import json
import os
import copy
from nested.nested_dict import NestedDict
from pprint import pprint
class TestNestedDict(unittest.TestCase):
@classmethod
def setUpClass(cls):
path = os.path.dirname(__file__)
cls.afile = os.path.join(path, '../nested/data/food_nested_dict.jso... |
021efe01c21db4d3bd936ba4eb75dc03dde91cc6 | 19f0c801a81eaf65f07d5d3c4ede1557863fab06 | /applienv/src/pytest/python/fz_home_page_test.py | a2520ee2e2d5212160f574ea8fd80875d5e4b591 | [] | no_license | sibuthomas/ai_automation_ui | 3215df10637cf927a12ce2e0d34ab308b619d921 | 9dcfc7e0ec92d9c8d80f28e609bd9b452b1787e9 | refs/heads/master | 2023-01-09T23:41:36.996131 | 2020-11-05T05:45:27 | 2020-11-05T05:45:27 | 310,201,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,385 | py | fz_home_page_test.py | from applitools.selenium import Target, eyes
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
def test_verify_home_page(eyes, driver):
eyes.open(driver, "FlyDubai IBE", "Verify Home Page")
eye... |
22aa6042b77c3cfd1f102a0ea22a43223e366d2f | 1688ace333bb9e0b18356dd36eca40c0fff55372 | /zaba renamer.py | 5432259a81fe874d6e98dccf5506dd41a28b13f5 | [] | no_license | novedevo/misc_python | c6756597af90023c283710e68b692fac948af1f2 | 5e33bcc249732d12afc3e98470d8ade1fbc75d36 | refs/heads/master | 2021-04-15T19:21:15.340831 | 2020-04-23T20:39:08 | 2020-04-23T20:39:08 | 249,292,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 985 | py | zaba renamer.py | import re, glob, os
lst = []
def rename(dir, pattern, titlePattern):
for pathAndFilename in glob.iglob(os.path.join(dir, pattern)):
title, ext = os.path.splitext(os.path.basename(pathAndFilename))
#title = title[22:]
#hexa = []
#hexb = []
hexa = title[:2]
hexb = title... |
e4b6304be10ee5a741c8a193dcf65950299ef11a | b14b450c73f4fa9ef3bb855bf151a98e6015f3b3 | /src/memory_game.py | 307a37234544962b48def981ebf01251434cc262 | [] | no_license | tjovanovic/stacshack2017 | 73a6a61c3c404a840f08c6cf3d2d9948064ffe6b | c07c028c313d11e86efcc123d875e83e611cddf5 | refs/heads/master | 2021-01-20T07:22:52.180071 | 2017-03-05T14:21:29 | 2017-03-05T14:21:29 | 83,886,534 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,396 | py | memory_game.py | import logging
from random import randint
import pygame
from flask import Flask, render_template
from flask_ask import Ask, statement, question, session
from playsound import playsound
app = Flask(__name__)
ask = Ask(app, "/")
logging.getLogger("flask_ask").setLevel(logging.DEBUG)
@ask.launch
def new_game():
p... |
5ac489a2d30155bb92767184ad546247817e28ea | 6d8444904699dc41a6b5b72d5c3ec8ab9ee3926d | /day8/exercise.py | 269c8f8ff22d28c5168ac0fc0d6daf3001d0bcfc | [] | no_license | Hedgehuug/python_30 | 71dac5b3a0f6baee21cc1f2ce8395a8353a3bca8 | b243441ae3a30cb2d5931afbe2462687afc240c2 | refs/heads/master | 2023-04-14T11:12:24.099688 | 2021-04-28T12:49:18 | 2021-04-28T12:49:18 | 351,077,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | exercise.py | """
Create a list of words and with it, create a new dictionary
in which the key is the word and the value is the same word
reversed.
"""
word_list = ['Tree','Apple','Snake','flowers']
word_dict = {word:word[::-1] for word in word_list}
print(word_dict)
#Output: {'Tree': 'eerT', 'Apple': 'elppA', 'Snake': 'ekanS', 'fl... |
a5a7cd112faad1096ce4c6f04b2179fbdf732702 | f4afe9acdb57cdab44871ca0426f7c6a44fa19a5 | /src/setup.py | a64d2f531a2637d9d3666437b98fa1ca775c8036 | [] | no_license | salimfadhley/mith1 | 83ac9fe449410e29bcce4fed0d024cd7f88cfab6 | f61cb038e732a531db0f69caeb904302b37b3152 | refs/heads/master | 2021-01-02T09:33:49.579860 | 2015-05-09T20:56:29 | 2015-05-09T20:56:29 | 35,344,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | setup.py | from setuptools import setup, find_packages
setup(
packages=find_packages(),
setup_requires=["flask"],
name="mith1",
) |
438fcda152574ebcaf129a4de69b00dffc271779 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03626/s941184614.py | cd1476745d95481abaeae2d2d792ae8c9287a3ef | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | s941184614.py | n = int(input())
s = input()+"?"
i = 0
ref = []
mod = 10**9+7
while i<n:
if s[i]==s[i+1]:
ref += [1]
i += 2
else:
ref += [0]
i += 1
ans = 6 if ref[0] else 3
for i,j in zip(ref,ref[1:]):
if (1-i)&(1-j):
ans *= 2
elif i&(1-j):
ans *= 1
elif (1-i)&j:
ans *= 2
else:
ans *= 3
ans %= mod
print(ans) |
a733731497f5459d936733f317811745acae1650 | 63f6da88388be56ffb371ad1a04ef8f6571dc1ea | /evaluation/1stevaluation_impossibledream.py | dffab105a77f6c7fa832e9bd04f81109e163ef41 | [] | no_license | cosetteke/Programming-Algorithm | 993dfc21ac5b74647f5a4ee73bcce2836c950875 | ffd9bc78e2a50da9b504bd5ce4e464c0128c1da3 | refs/heads/master | 2023-02-23T11:39:26.423623 | 2021-01-29T11:59:51 | 2021-01-29T11:59:51 | 273,453,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 533 | py | 1stevaluation_impossibledream.py | # input
word = input().lower() # only consists of letters and put to lower case
reverse = word[::-1]
n = int(input()) # number of lines
# process the following lines
for _ in range(n):
line = input().lower() # read the line and convert to lower case
# check if the line contains the word
if word in line or... |
d1ac1c1315cced6ac582cd1a768895371afef9ee | bc74cba6a1aef4f7813ae037aee4800e14dafcbc | /nd/model/lstm_state.py | 34d857c315ab055ef77a44c6fd080520f6cc4027 | [] | no_license | sfu-natlang/NeuroDecipher | fb60a4c57dd01d2c0b73b887090ccbeceb1ba81b | 480bad2487820e3737fecfdd108214efa769e34b | refs/heads/master | 2023-08-18T16:48:17.607751 | 2021-09-20T21:13:49 | 2021-09-20T21:14:17 | 526,705,924 | 0 | 0 | null | 2022-08-19T18:01:49 | 2022-08-19T18:01:48 | null | UTF-8 | Python | false | false | 4,093 | py | lstm_state.py | import torch
from dev_misc import get_zeros
'''
Just a wrapper of LSTM states: a list of (h, c) tuples
'''
class LSTMState(object):
def __init__(self, states):
self.states = states
@classmethod
def from_pytorch(cls, states):
hs, cs = states
_, bs, d = hs.shape
hs = hs.v... |
e4907c827ddbd28cb6e55f1edab3c5ad8310280b | 6f8f57103527d8fe73015f89cd941d1963181905 | /config/DatabaseConfig.py | 9e3f236ba63f4ca13f043cbcb44d0a2a35dc6613 | [
"MIT"
] | permissive | hyukstory/hyukstory_AI | 0d8178c26fc3df58e3fe303387838f439f46c296 | 7c7e08cdbb72a349d97124d260dc992bdeeaacf6 | refs/heads/main | 2023-03-02T10:16:18.158116 | 2021-02-04T03:48:00 | 2021-02-04T03:48:00 | 333,001,447 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | DatabaseConfig.py | # DB 접속 정보 따로 저장
DB_HOST = "127.0.0.1"
DB_USER = "root"
DB_PASSWORD = "hyukstory"
DB_NAME = "chatbot_nlp"
def DatabaseConfig():
global DB_HOST, DB_USER, DB_PASSWORD, DB_NAME
|
8a9af27807d5d7ca2431f74f9ece7da1a1b7dd62 | aea42d533cc6849069ecb47e60d19fde46bee782 | /page3.py | aa092337cdb9880843d138807aaca5a8efb33506 | [] | no_license | Amar-Sakr/Bosch-company-GUI | e752bdc48c97e880aa3c12f4f77e7faf00ad98c3 | 33beda1b1007a2d6958150add74073d16362f78d | refs/heads/main | 2023-06-13T02:06:15.912744 | 2021-07-04T17:19:09 | 2021-07-04T17:19:09 | 379,923,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,465 | py | page3.py | import tkinter as tk
from tkinter import *
from page import *
from tkinter import Entry, font, filedialog
from tkinter.constants import X, Y
import pandas as pd
from algorithm import *
class Page3(Page):
def __init__(self, *args, **kwargs):
Page.__init__(self, *args, **kwargs)
lb... |
12ffcbeadfc5faf97362a81e8b42cc15cb735953 | 193004b1bf7b46b72ccdbf0b3f2a4c1cab43c314 | /process_data/test_group_tx_add_order_id.py | 87db1b6136a4c55afc4c962ea93fa17db1251041 | [] | no_license | hoangphand/UU691-Project | dda92991cd8a995d4bb4dceb51defe1ee3f9ad58 | 5c57b85d8e12294e6902b32a262ab59d12658a9d | refs/heads/master | 2021-09-11T00:11:28.541141 | 2018-04-04T18:23:10 | 2018-04-04T18:23:10 | 124,599,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,343 | py | test_group_tx_add_order_id.py | import sys
import pyspark.sql.functions as F
from pyspark.ml.evaluation import RegressionEvaluator
from pyspark.sql import Row
from pyspark.sql import SparkSession
from pyspark.sql.functions import udf
from pyspark.sql.functions import desc
spark = SparkSession.builder.appName("demo-cluster").getOrCreate()
test = spar... |
1499b215ea257e6ee1b77593adcae14bfcf49648 | ee3b76750c1530dbffbbf97416fc5861c1118253 | /api/users/management/commands/create_sample_users.py | f5dd5fb2038f5caf5d0aea566718ba82540ae3f0 | [
"MIT"
] | permissive | Alexeino/oauth-microservice | ef6cd34b2009bf059432c25d835255a674a900eb | a87796bff41bed745878bafab3ccf06e346c43e9 | refs/heads/master | 2023-05-27T12:50:26.178761 | 2018-11-01T19:33:20 | 2018-11-01T19:33:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,948 | py | create_sample_users.py | import os
from django.core.management import base
from django.utils import timezone
from django.contrib.auth.models import Group, User
from django.contrib.auth.hashers import make_password
from oauth_microservice.utils import load_sample_users
DEFAULT_SAMPLE_USERS_PATH = os.environ.get('SAMPLE_USERS_PATH', 'sample_... |
fdbd7dae004e59a2c1bc7bc9cea73f726bb764f8 | 1bd6c8ac944fe2c9a2c80e10d060ceaa6d938852 | /ReadTXT.py | 6ac3a82dcd85b37e8de925dd81d93f3c69b33d7f | [] | no_license | HavaKaracam/Academic-Research-Text-Mining | fda5b0dccc020aa600b579980df2e7eb27913156 | aad2e8186f0faa2214809f2dc3bb1154909800bf | refs/heads/master | 2020-04-12T09:59:44.664060 | 2018-12-20T21:19:35 | 2018-12-20T21:19:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | ReadTXT.py | class ReadTXT:
@staticmethod
def readTxt(txtName):
txtFile = open(str(txtName), "r")
return txtFile
|
db8b1f3d3b3f28a9ac1c7d2abe3a3a6a59111786 | 8e607cc94cd492a73cae67cfec1d023efa3bdd9a | /src/us_cleaned_data.py | b67071111ae0c6aabb3c577cc8374b64bd1f7d3d | [] | no_license | gverploeg/US_Traffic_Accidents | 8343f4a9826fc4d01ba82996be0e66900ad31113 | 9284cedcd86854a275b30f6fd4f762175ffd6795 | refs/heads/master | 2023-04-19T04:39:45.739122 | 2021-04-27T15:48:34 | 2021-04-27T15:48:34 | 328,027,445 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,665 | py | us_cleaned_data.py | import pandas as pd
import numpy as np
def show_missing_data(df):
'''
Shows percent of missing data for each column
ARGS:
df - dataframe
RETURNS:
dataframe with missing column percentages
'''
missing_data = pd.DataFrame(df.isnull().sum()).reset_index()
missing_data.colu... |
ae103b02dfe989dca197c9f3825791ccfad09292 | eaab68119937894af6c06816cd9c7140222c5c3a | /4kyu/square_into_squares/python_sol.py | c8274345557c1025b7cc424f4dadf26ce5665b8f | [] | no_license | lynth29/codewars | 82629f897b68b7f61a504f4691a87fb221a58d9b | 4c9e5f84c6215da8161fc39dd3ace97023b951ad | refs/heads/main | 2023-07-13T12:20:31.923234 | 2021-08-10T21:50:00 | 2021-08-10T21:50:00 | 380,181,358 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 742 | py | python_sol.py | def decompose(n):
total = 0
# Adding n to answer list
answer = [n]
while answer:
temp = answer.pop()
# Removing n from list and adding it to total
total += temp ** 2
# Run a for loop from the least number below total to 1
for i in range(temp - 1, 0, -1):
... |
9148d8433d8fbfbdba654fcba53bf626e7978edb | bfbb5ca44dccf68de9e1665c2236e11f9691f6ff | /sound_lab_core/Segmentation/OneDimensional/ThresholdDetectors/SingleThresholdDetector.py | dab4c26d4bb1c2f6aa50673f1e69cfe519233ef4 | [] | no_license | ECMora/SoundLab | d379a4c9b3ddd90e9d8969c5bc07af8351553720 | 13ec0a591636ec42e771b40e42ac5d7c98243a94 | refs/heads/master | 2020-04-09T21:43:27.949570 | 2017-02-10T17:57:40 | 2017-02-10T17:57:40 | 160,610,907 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,839 | py | SingleThresholdDetector.py | from PyQt4 import QtGui
from sound_lab_core.Segmentation.OneDimensional.DetectionEnvelopes.IntervalMaxEnvelope import IntervalMaxEnvelope
from sound_lab_core.Segmentation.OneDimensional.OneDimensionalElementsDetector import OneDimensionalElementsDetector
from matplotlib import mlab as mlab
import pyqtgraph as pg
import... |
ecb4d3d70173b49df29084108930f60aa762ee81 | 5d4d0b84a0949a2c3400c3a920c28736e9bef3f9 | /tp1/Borrador.py | ca04b68766a0c58095daacbbd066a38b5f4ffc64 | [] | no_license | AriVergara/datos-2c2020 | 2724e9b9bb14fa0c57c89d5e7b126276d9f9f7a1 | 77ed6b3cd1328474a66bc334e270d94ec9222807 | refs/heads/master | 2023-03-16T05:02:32.355671 | 2021-03-07T19:59:53 | 2021-03-07T19:59:53 | 301,902,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,394 | py | Borrador.py | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.6.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# --... |
a4e18903651ee867d7a0e583c2de0c55710c99b9 | 6d275bc9dd2cb4f87ab8d67323b0b9eba22ed963 | /python基础/day17oop01/Student_glxt/main.py | 87fe69f6118f5ff8b36c26189ffca3dbdc112f4f | [] | no_license | heronghua008/heronghuanotebook | e179f1348228958d25174f508bf1eba46f3bbc9a | 3d94a1c011b9f762b43202159b518fce48472744 | refs/heads/master | 2020-03-23T05:32:12.071223 | 2018-08-06T00:50:04 | 2018-08-06T00:50:04 | 141,149,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,051 | py | main.py | from xs_cd import zhucaidan
from student_info import *
def xueshenglxt():#
while True:
zhucaidan()
n = input("请输入您要查询的选项按q可以退出程序:")
if n == "1":
input_student()
elif n =="2":
output_student(L)
elif n == "3":
shanchuxingxi()
elif n... |
2e659f08ec9436a07bc423cf29f0fbe99d990cb8 | 9a60a4e2709e43051f0432808c0a37d1e38cb5f0 | /笔试题 记录/春招/腾讯 春招正式批/NO_1.py | c0694ba4f2c9eac5a4113886ccae74b86febf694 | [] | no_license | wuyaqiang/Algorithm_Learn | 82eede27e3e4a5f04e49d58dba3484f86d62808c | 0c938ebaef19b7d5ed911fe46681a372c1df64cd | refs/heads/master | 2020-05-02T14:25:24.019395 | 2019-09-23T03:27:13 | 2019-09-23T03:27:13 | 178,010,385 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 809 | py | NO_1.py | #coding=utf-8
import sys
def func(n, k, nums):
for i in range(k):
min_num = min([i for i in nums if i != 0])
print(min_num)
temp_nums = []
count_0 = 0
for x in nums:
if x is 0:
temp_nums.append(x)
count_0 += 1
else:
... |
c0d27d074054b56dc38eec4f081534f6624303a2 | b28676aa0e8eca0b0e3a925e53572ee798f6f826 | /social_app/urls.py | 322acc532606025c7660884320da657263bed52c | [] | no_license | gauravsc/django_app | 6be097f5a1558c3657a0b89d97fec12359da2e1a | d0d0836cfc3933644201c091ae07100186041c39 | refs/heads/master | 2022-10-23T14:13:11.295856 | 2020-06-19T09:59:24 | 2020-06-19T09:59:24 | 273,228,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 212 | py | urls.py | from django.urls import path
from .views import list_view, logout_view, post_submission
urlpatterns = [
path('stories', list_view),
path('logout', logout_view),
path('post_submission', post_submission)
]
|
b7932765187d2f23f2f8a9993522eabf07667a4f | a2d729d5f10fd8e6ad3271e2e26560b5f8a04300 | /api_mock.py | b75a0e02e3456e1d00f1910614104106191153e6 | [] | no_license | mathurapriya/api-mock | b1b91b30e51635abe619ad5867b60ba9a0b698dc | 5f957f39110e5a415b9882b38a8d95a8b7a94504 | refs/heads/master | 2020-04-13T18:22:30.103109 | 2018-12-28T05:57:04 | 2018-12-28T05:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,382 | py | api_mock.py | import json
from mockserver import MockServer, MockWrapper
import time
class ApiMock(MockServer):
def __init__(self, host = "127.0.0.1", port = 5432):
super().__init__(host = host, port = port)
self.initialise()
@MockWrapper
def onMobileModelInfo(self, **kwargs):
"""
call... |
324a4ef379f44890354662c3aa957472aab91bc5 | 5d2579b301d4026122c62df49f32d8a5fce7a645 | /Geocoding and Mapping-IRMS CompTIA-DATASCIENCE/geoload.py | b48a7b23274fc6f2e8d5aca11f0d5de6ec4765eb | [] | no_license | Hariharan1701/Data-Science-IRMS | 8bd0cd7c615c4140b667d06c19ec142c2826cd3a | 90bf7261e26a9b96e31b6788084feaaa60d988d8 | refs/heads/main | 2023-09-03T22:31:43.068796 | 2021-11-03T06:11:18 | 2021-11-03T06:11:18 | 416,189,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | geoload.py | import urllib.request
import urllib.parse
import sqlite3
import json
import time
import requests
API_KEY = 'QIjeaW1BRRsZMsZ8LFrEu7TMtmZlQGrC'
base_url = 'http://www.mapquestapi.com/geocoding/v1/address?'
db=sqlite3.connect('geocode_data')
cur = db.cursor()
cur.execute('''CREATE TABLE IF NOT EXISTS Locatio... |
ddcb51217a3182bb39182c7ff9c252912950c5a3 | fe5ed05d95448664190bdcad0a16dcd8347ef717 | /local/share/snakerule/testdir/Snakefile | 93ddc486fe044c35ceab2a42511a0f43b30038d1 | [] | no_license | vodkatad/snakegatk | 3d0623940325958504004256aeec0b42a67100e0 | 07fbdd197db953ea7e573b1e82723d319a7a374b | refs/heads/master | 2023-07-25T14:16:21.493067 | 2023-07-24T13:01:49 | 2023-07-24T13:04:52 | 223,965,483 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | Snakefile | A="one"
include: "Snakefile_one"
A="two"
include: "Snakefile_two"
| |
41ab4c05e7facef7487af11463dad1d58060a808 | 2d2df71db4d131908724a1d91f9608978157fbcd | /app/models/history.py | 874108f994a2b80967eb5cd67c85de6b54538482 | [] | no_license | SugarChl/my_flask_api | 990180774d43e2a788d99c41fafb0710f452e007 | 0ebcab49c29a81efb6188aade9d6b45a7527a881 | refs/heads/master | 2020-04-07T02:05:54.296565 | 2018-11-17T08:16:59 | 2018-11-17T08:16:59 | 157,963,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,581 | py | history.py | from app import db
from flask import jsonify
from app.auth import current_user
import time
from app.common import falseReturn
class History(db.Model):
__tablename__ = "history"
time = db.Column(db.String(20), primary_key=True)
title = db.Column(db.String(50))
student_number = db.Column(db.String(20))
... |
cf5a726c208ba1ebe70f2f86952181239b2dd114 | 3051050dc3dee97dc60ef78d31ff500b6e93d0fb | /testing/buildbot/query_optimal_shard_counts.py | ac16ea7f5bae8189fba2af1f5fe0c82322b64f06 | [
"BSD-3-Clause"
] | permissive | weblifeio/chromium | cd249e1c9418dcf0792bd68bbdcd2a6e56af0e2e | 74ac962b3a95c88614f734066ab2cc48b572359c | refs/heads/main | 2023-06-09T19:45:03.535378 | 2023-05-26T19:16:31 | 2023-05-26T19:16:31 | 177,631,387 | 0 | 0 | null | 2019-03-25T17:15:48 | 2019-03-25T17:15:47 | null | UTF-8 | Python | false | false | 14,348 | py | query_optimal_shard_counts.py | #!/usr/bin/env vpython3
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Script to query optimal shards for swarmed test suites.
This script queries bigquery for recent test suite runtimes. For suites running
over the desired... |
674916734e10543eef4b81ac5b79f48626d150eb | 321108a6c2efc4402fb5c9e7068ddaddcf046052 | /website/migrations/0010_profile_groupe.py | 00ea47c526e1bdf41f78951263905369c4f9fd7c | [] | no_license | yannickaboh/hemsproapp | 78f5561ac32f93d75badb5b1772c35a4817aa3c5 | 22b24c6953604aa1b74498bdfdf7c503e0d961ea | refs/heads/master | 2023-03-01T06:09:33.283134 | 2021-02-14T21:15:49 | 2021-02-14T21:15:49 | 338,873,424 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | 0010_profile_groupe.py | # Generated by Django 3.0.6 on 2021-01-12 01:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
('website', '0009_remove_profile_groupe'),
]
operations = [
... |
db69f595224ff02d52dd3d01ab7989e1866b5d6c | 1d1c1de4cbaecb647a723221344f47e7704c9b6f | /upload/tests.py | e2bb2e6d1bedb96a006cd3346689f463d484f2fd | [] | no_license | vprusso/waveproject | 2a1228b9f11d8b656c07519a2e874a1601601369 | b72d8915553929fe0e3eecd517a7f65d0d622746 | refs/heads/master | 2021-06-15T11:06:20.157860 | 2016-12-05T22:42:01 | 2016-12-05T22:42:01 | 73,842,382 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,056 | py | tests.py | from django.test import TestCase, Client
from .forms import UploadFileForm
from django.core.files.uploadedfile import SimpleUploadedFile
from .utils import SanitizeInput, CurrencyHelper
import os
import csv
import unittest
class TestCurrency(unittest.TestCase):
def setUp(self):
self.sanitize = Sanitiz... |
6e6bfc7c67a427bfee7e1b45b60d81245cf5db45 | 8ae7adaa9402155278a7cea09435ab9c7fc96700 | /projet/ft_is_prime.py | 8e971494e3123881c835b1ca786e4c1840665993 | [] | no_license | FirelightFlagboy/OPC-python | cafc69d2b74d9c8187ad7fa51d599a99e7914460 | 0fb074ba5421870ebb36a2b6f5eb9107fd02f296 | refs/heads/master | 2020-03-19T04:27:34.905183 | 2018-06-02T15:48:29 | 2018-06-02T15:48:29 | 135,830,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | ft_is_prime.py | # -*-coding:utf-8 -
import os
import math
import sys
def main():
error = 1
while error == 1:
error = 0
inp = input("saisissez un chiffre:\n>>>")
try:
nb = int(inp)
except (TypeError, ValueError, AssertionError) as e:
error = 1
print("Error :", e)
continue
for i in range(2, math.ceil(math.sqrt(n... |
1583063755536f3e9de55402e84762d50769106a | 19bcaa4c6cc4e3cf81c650c1c33926262c3ec5d2 | /benches/bench.py | 4f104e8c0004612481e99aa39576077bb8805a3d | [] | no_license | birkenfeld/tango-rs | f22fa3cabf8c35d74328030ba69252af8a30f04f | 96391e11a0554c42dee792268f581b45384cfe9d | refs/heads/master | 2021-11-16T11:05:42.699507 | 2021-08-02T06:55:04 | 2021-08-02T06:55:04 | 75,533,152 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | bench.py | import time
import PyTango
dev = PyTango.DeviceProxy('tango://localhost:10000/sys/tg_test/1')
s = "This is a minimal Tango test client."
t1 = time.time()
for i in range(10000):
assert dev.DevString(s) == s
t2 = time.time()
print 'per call: %d ns' % ((t2 - t1) * 1e5)
|
3b25f7d23b75b168580c43f0dd14b7ba5e6dcbad | d8b93e08fdf884ebed89a38831e26e3753efea72 | /Teacher/__init__.py | 5a59ce496cb587b1c5a00635e36cd21ca214b773 | [] | no_license | wolfbolin/Everyclass-Occam | 68398ece9f5812aa1a0a31946e98181d559cc7ec | de347014c4237c88e99207fa05cb7fecb5325d1d | refs/heads/master | 2022-12-14T08:25:30.484056 | 2020-04-27T07:30:26 | 2020-04-27T07:30:26 | 156,236,558 | 2 | 1 | null | 2022-12-08T03:37:45 | 2018-11-05T15:08:01 | Python | UTF-8 | Python | false | false | 48 | py | __init__.py | # coding=utf-8
from .teacher_main import update
|
33de70e91d22c7e59ff00350da149b4be2e21534 | dd1b22563aff2ca865706c13c8de095147120f08 | /gis_programming/Homeworks/HW03/HW03_plswork.py | 2e1652dd03c7e15fcab87ae5a31b8a687ca2750f | [] | no_license | SapirLastimoza-Dooley/webgis | f36798f5bae6fa0a6120ed5140b579d101618b7d | 32b4458ee4402e639f356ef43ca39245dbe40c10 | refs/heads/master | 2023-01-16T07:09:13.827065 | 2020-11-24T18:55:04 | 2020-11-24T18:55:04 | 315,725,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | HW03_plswork.py | import math
import matplotlib.pyplot as plt
import numpy
import csv
import re
shapelist = []
with open('shapes.txt') as csvfile:
shapes = csv.reader(csvfile)
for i in shapes:
shapelist.append(i)
print(shapelist)
reclist = []
for x in shapelist:
if 'Rectangle' in x:
y = x
reclist.... |
11503b5660a1d25a0870ec2a94de73f8778504eb | 365fce2a661923307a28ea8e8a9f29476e19720f | /TakingInputs.py | ab75ea10318861669dc702eba138c625e1b4cb9e | [] | no_license | JKIMUCC/Year9DesignCS-PythonHJK | 22f2a7e4cc42798822ac7c8b212334bff4eb715f | e6b884127f20b100530a998d0af8568b43786c67 | refs/heads/master | 2021-08-16T03:07:47.705725 | 2018-12-15T04:47:34 | 2018-12-15T04:47:34 | 148,173,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 137 | py | TakingInputs.py | #Input
print("Hello")
name = input("What is your name: ")
#Process
#Output
print("Hello "+name+", we are the FBI")
print("PROGRAM END")
|
70ec5fb655baae088b2a77f3753d627cde392820 | e7795082c0131682803a09e929a86b2deddeab74 | /app/__init__.py | 3a441bcc896e1cc76acb9a05cddefd980b6e485a | [
"MIT"
] | permissive | liwanlei/FXTest | 01de3ad55849b16c49d93b58d1aae21fd0fdafa0 | aeda58d01c14194290ca149d411c3a8596cca82d | refs/heads/master | 2023-04-01T15:45:26.668688 | 2023-03-19T05:19:54 | 2023-03-19T05:19:54 | 97,098,845 | 807 | 419 | MIT | 2022-04-23T06:52:16 | 2017-07-13T08:27:48 | Python | UTF-8 | Python | false | false | 1,243 | py | __init__.py | # encoding: utf-8
"""
@author: lileilei
@site:
@file: __init__.py
@time: 2017/7/13 16:38
"""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from flask_login import LoginManager
from config import lod
from apscheduler.schedulers.background import BackgroundSchedule... |
acb0669e11ade5abe88cefad46aee7c6186cf4c6 | 02ed9e5f0faac40afa409a722a3f8699466faadb | /src/oop_ext/foundation/cached_method.py | ece0d3be75f4e70c45c7de73211c46909ad4a38b | [
"MIT"
] | permissive | ESSS/oop-ext | 2dee9a353aba003ed217935c87d68a43c147d8e5 | 6e536f6948ac3107ed56b9bbaaa4c1b08e2d2004 | refs/heads/master | 2023-08-24T09:22:59.673172 | 2023-07-18T10:24:13 | 2023-07-18T10:24:13 | 174,530,574 | 15 | 1 | MIT | 2023-09-11T17:37:02 | 2019-03-08T12:02:00 | Python | UTF-8 | Python | false | false | 6,164 | py | cached_method.py | # mypy: disallow-untyped-defs
from abc import abstractmethod
from typing import Callable
from typing import cast
from typing import Dict
from typing import Generic
from typing import Hashable
from typing import Optional
from typing import Sequence
from typing import TypeVar
from typing import Union
from .immutable imp... |
99cf1007407f2b8b8158e39118d8c0c0dedbebb7 | df4ee73cde8494cc02cdd64b1f0a477192ecd35e | /newslynx_core/twitter/parse_search.py | 80f430dbb56565c226570d58fa5ac350daa01871 | [] | no_license | mashcode/newslynx-core | 59f01bab7a236eb5dfe5bb46d87b635600d555ac | e79edd2a9622e0303ff4466ad1a1a84d13cf9ee1 | refs/heads/master | 2021-01-25T07:18:32.908014 | 2014-05-30T17:43:58 | 2014-05-30T17:43:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,319 | py | parse_search.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from newslynx_core.source import Source
from newslynx_core.twitter.api import connect
from newslynx_core.twitter.parse_tweet import TweetParser
from pprint import pprint
class TwitterSearchParserInitError(Exception):
pass
class TwitterSearchParser(Source):
def __in... |
7e52e5b7bb5feeea03327559620031c4b97201b1 | f00090ca922152a19e5ee137eb58a8718098a039 | /core/urls.py | a299226d7b88055f0cc9b5b6feb602c8f9e7fbae | [] | no_license | Ljbosman/gitFace | 9be80ce08f7dd83841d4421324ae58b9ca10796a | 11d91d6b60beb53b1fc8c962e5a04f212c5bfd9d | refs/heads/master | 2020-12-17T21:22:21.599837 | 2020-02-07T14:22:24 | 2020-02-07T14:22:24 | 235,296,463 | 0 | 1 | null | 2020-02-07T14:22:25 | 2020-01-21T09:01:58 | Python | UTF-8 | Python | false | false | 805 | py | urls.py | from django.urls import path
from .views import (
MergeRequestListView,
MergeRequestDeleteView,
MergeRequestDetailView,
MergeRequestCreateView,
merge_request_merge,
load_repos,
load_branches)
urlpatterns = [
path('', MergeRequestCreateView.as_view(), name='core-home'),
path('request... |
ccaf025bf32dc4d1a6d427203fce727d5c5e27db | b808b33a6a79e39bad7137c8da82b1864b419a2d | /tf_base/src/robust_trainer.py | 22c5c5f3d16b56c70cb5160942d59892dfafbac4 | [
"MIT"
] | permissive | YuCheng12345/active_learning_coreset | 8d45aede642ac94e6d8c1d9d6d5cc7f6b5b620b1 | 76921f7f07e78cdf1dba8073cfc4b996cdea8d06 | refs/heads/master | 2020-04-01T10:12:27.249633 | 2018-09-19T18:35:41 | 2018-09-19T18:35:41 | 153,107,378 | 1 | 0 | MIT | 2018-10-15T12:16:46 | 2018-10-15T12:16:46 | null | UTF-8 | Python | false | false | 10,876 | py | robust_trainer.py | import tensorflow as tf
import numpy
from network.vgg_robust import VGG16Adversery, VGG16Robust
class RobustTrainer(object):
"""
Train a network using robust objective
"""
def __init__(self, learning_rate_net, learning_rate_adv, device_name):
"""
Simple diagram:
Images -> | Fea... |
95c7eee6a0909da0f98fbb84894916cc08237049 | a01ca21abcbbd6117aebde59c745adb5dcf70a81 | /main.py | daf5753afb15084ff56757f7c7593a34de4d1c90 | [] | no_license | yolandatian/women-in-movies | 0bd5a8158ea4c4adf6a3e2b486fba45524f0b119 | ef900cc973b5c07b30abeb89639d03f2a28916c0 | refs/heads/master | 2022-06-17T15:47:02.206691 | 2020-05-10T16:51:06 | 2020-05-10T16:51:06 | 262,825,407 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,228 | py | main.py | import pymysql
import json
import requests
conn = pymysql.connect("127.0.0.1", "root", "", "film_data")
APIKEY = "e74f50eae5ea7218bc252b1d22a7722c"
# Get movie detail by TMDB(themoviedb.org) API
def get_detail_by_imdbid(imdb_id: str):
# get tmdbID by imdbID
r = requests.get(
"https://api.themoviedb.... |
1790283d244ae6d08a5f477e4a8243367d79478a | 7e5c007f4094d0556c066e1b0159fe976724214a | /test/test_01_02.py | 7875203d98187a47884eaef78de9aded182246a0 | [] | no_license | mukhaw/epam_python | 3e2d5f6b10e5ee18eaa38245726e557621f3a8a4 | b12119a37ccfd597eff4ae676e53865fab4df5d4 | refs/heads/master | 2023-04-17T07:35:17.896497 | 2021-05-06T08:26:05 | 2021-05-06T08:26:05 | 344,224,997 | 1 | 0 | null | 2021-05-06T08:26:06 | 2021-03-03T18:26:33 | Python | UTF-8 | Python | false | false | 714 | py | test_01_02.py | from typing import Sequence
import pytest
from hm_1.tasks.task_01_02 import check_fibonacci
@pytest.mark.parametrize(
"value",
[
[0],
[0, 1],
[0, 1, 1],
[0, 1, 1, 2],
[0, 1, 1, 2, 3, 5, 8],
[0, 1, 1, 2, 3, 5, 8, 13],
],
)
def test_sequence_is_fibonacci_seq... |
f82e98d824584c0dcd3fecb1012b464596dc8ceb | 9a81ea3e529137b3e96defac047dbfe043522708 | /timelapse_stats.py | 9db266bfc637791521d32f717c0444622f154e54 | [] | no_license | adriandelisle/photo-utils | 781576543fb80be3474de97ede27896af193acda | c70b4084971a1064440df7b53e39ad97fea08518 | refs/heads/main | 2023-03-03T08:27:55.424750 | 2021-02-21T05:47:56 | 2021-02-21T05:47:56 | 340,781,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,833 | py | timelapse_stats.py | import os
import time
from multiprocessing import Pool
from datetime import datetime, timedelta
import photoUtils
def process_directory(root, photoDir):
fullDir = os.path.join(root, photoDir)
print ("Processing: " + fullDir)
dirStats = {'numberOfFiles': 0, 'duration': timedelta(0), 'size': 0... |
9ec81be12a2a07e93ba425a98bcc6532c10c53d9 | f7fdbd277f992682df78fc3f74e95b171e51ff10 | /ex3.py | fe082bf3b4c890a0ac4fc803176b8aaf11d08bc0 | [] | no_license | clayrichardson/learnpythonthehardway | 75868a1b7fa0cf20bdc28d5e20eeb08539caa11f | b1e608f01a6a4049b3b08c5a030e875365e73556 | refs/heads/master | 2016-09-06T20:14:11.218290 | 2012-01-04T23:12:55 | 2012-01-04T23:12:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | ex3.py | # extra credit stuff mixed in, yum.
print "I will now count my chickens:"
# order of operations, cool beans.
# divide 30 by 6 to get 5, then add 25 and 5 to get 30
print "Hens", 25 + 30 / 6
# multiply 25 and 3 to get 75, then 75 modulus 4 to get 3, subtract 3 from 100 to get 97
print "Roosters", 100 - 25 * 3 % 4
pr... |
56f7cbee91cd36a933fe5b9190305e3eda3fd179 | f411e9a90678c5e93fe0e293f5672be7a35c7291 | /tests/_processors/test_feed.py | 1389ecdc343070b2de13c1928c133a6da489d55d | [
"BSD-3-Clause"
] | permissive | ikalnytskyi/holocron | 9f88960092187c8311fd1b889bcbe6f05722ebdf | 1d13f7baa4e187985677b9d7203ee1c3423078ee | refs/heads/master | 2022-09-26T00:02:12.650152 | 2022-09-18T21:58:34 | 2022-09-18T21:58:34 | 19,894,683 | 7 | 2 | BSD-3-Clause | 2022-09-18T19:31:19 | 2014-05-17T19:40:22 | Python | UTF-8 | Python | false | false | 27,431 | py | test_feed.py | """Feed processor test suite."""
import collections.abc
import datetime
import itertools
import pathlib
import unittest.mock
import pkg_resources
import pytest
import untangle
import holocron
from holocron._processors import feed
_HOLOCRON_VERSION = pkg_resources.get_distribution("holocron").version
@pytest.fixtu... |
ebec69ec6bba608ee30b6c4ea07225b0e02b481e | a96e828c382e5104ec745a1b7f89e23416f31b55 | /junk/prompt_styles.py | 6c3a76eb7cad38492a57939f48b39295c471bb80 | [] | no_license | Owiredu/python-chat | c3e28ce95b3430c31a6e63eb6ce58c4c147d0ebf | 97e7a3e11e7391c503f33c775a4dfc21d5d2124c | refs/heads/main | 2023-02-11T02:21:58.883814 | 2021-01-09T20:11:24 | 2021-01-09T20:11:24 | 323,777,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,844 | py | prompt_styles.py | from prompt_toolkit.shortcuts import prompt
from prompt_toolkit import print_formatted_text
from prompt_toolkit.formatted_text import FormattedText
from prompt_toolkit.styles import Style
# from constants import *
class SenderPrompt:
def __init__(self, email, username, menu):
self.style = Style.from_dict... |
0f09202dbed547c48d4f6329e4d45b88b1e50c9b | c66074d8815887a1faf6e67d35ff041af3fffb0e | /LivingMachines2013_16/actorPopulationClass.py | d0acec5d5e4acb42547dcd631e128839e1306e51 | [] | no_license | rheiland/DarwinianNeurodynamics | b1eda114df838ccfbc2cd80f7832b594f70e1da4 | 602cdffaeef808b1e8029afcf7e7c9b0f71e8b0c | refs/heads/master | 2021-01-18T10:53:27.372958 | 2013-04-22T15:01:08 | 2013-04-22T15:01:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,667 | py | actorPopulationClass.py | import matplotlib.pyplot as plt
from naoqi import *
import math
import almath
import random
from actorClass import actorClass
#from gamePopulationClass import gamePopulationClass
##global actors
import copy
import pickle
import itertools
import time
# create python module
class actorPopulationClass(ALModule):
"""Cre... |
882fa641a7997aa3cda9c44f81ba2655dacba775 | 2c2a1a8b78339c408dd2b551a96c69417d5ea0fa | /Collagen/2D/visual_pygame_2D.py | cbaf4c0fde7a0af65a33426d5c735f61d2abe316 | [] | no_license | franklongford/Pygame | f488ea2452aaa59e16cf9539eb30a57c14ff6f2d | 801b8a4198baad915be40441eea4d795537807d5 | refs/heads/master | 2023-02-27T17:46:48.593667 | 2021-01-15T01:13:26 | 2021-01-15T01:13:26 | 133,421,428 | 0 | 0 | null | 2021-02-04T11:20:23 | 2018-05-14T21:05:50 | Python | UTF-8 | Python | false | false | 1,866 | py | visual_pygame_2D.py | import numpy as np
import scipy.integrate as spin
import scipy.optimize as spop
import pygame
class Bead(object):
def __init__(self, fibril, (xy), n, pixel, size, world):
self.fibril = fibril
self.pixel = pixel
self.radius = int(self.pixel * size)
self.pos = [int(xy[1] * self.pixel), int(xy[0] * self.pixel)... |
c8e04d26d58a5d3a8c6d07053cb92c025fd7ae5c | c1e6460e9542c936513379a5746b3a211622111e | /pingpong(pygame).py | deceaaa88c4aabf3a348196aa8874b4c75bc35d1 | [] | no_license | sarthak2302/ping-pong | edb81438db6a4968d670e5e4b96a45c8249f4f5a | ae79303fd7f25d5ad20f07e1cd5595b50ae9ce32 | refs/heads/master | 2023-01-22T05:33:09.600514 | 2020-11-24T16:59:44 | 2020-11-24T16:59:44 | 296,660,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,078 | py | pingpong(pygame).py | import pygame
import time
pygame.init()
clock=pygame.time.Clock()
win=pygame.display.set_mode((700,500))
pygame.display.set_caption('ping.pong.pygame')
class slider():
def __init__(self,x,y,width,height):
self.x=x
self.y=y
self.width=width
self.height=height
... |
6f8b4aaaf444baeb9a08acef8aa9301d67790f1c | a6d9710e312caf4ae96b43f0290f9135bffdf8e0 | /Unit 33/judge_closure.py | 5e93dec2e3528a68236e0e315c958e8d09e9c5db | [] | no_license | gilbutITbook/006936 | 5b245cf1c6d4580eb07344bdaa254e4615109697 | b5cd6a57cdb5bb3c2ad5e3c9471a79b3fa82bc5d | refs/heads/master | 2023-01-29T07:35:46.360283 | 2023-01-18T06:20:49 | 2023-01-18T06:20:49 | 154,229,702 | 19 | 19 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | judge_closure.py | def countdown(n):
#
#
#
#
#
#
n = int(input())
c = countdown(n)
for i in range(n):
print(c(), end=' ')
|
70e438ef06edb01ed7466c2618dd1a399fc2dbdf | 5b6de61111707c0c4be1c38a6e2d17389e223801 | /python/src/ngraph/impl/op/__init__.py | d118eae692ddbde8a23686d17d7a4b752f16ee90 | [
"Apache-2.0"
] | permissive | ravirajpinnamaraju/ngraph | 9890982927538f85793bbc3ea755bae603b04ee6 | b6b0da1323fc95ca31b738fa8ab7618a04dac9db | refs/heads/master | 2022-07-18T12:53:59.192862 | 2020-05-14T18:03:40 | 2020-05-14T18:03:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,955 | py | __init__.py | # ******************************************************************************
# Copyright 2017-2020 Intel 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.apa... |
35eaba905ed518b2bfd89642b013e61f3cd5b512 | 2b3bd05bedd867a871f7ce3ea3405705411d1485 | /pimp/parser.py | 48436af3f5431beb39bb78b06ab83715709e3271 | [
"Apache-2.0"
] | permissive | furester/pimp-my-videolibrary | 102591d62b359fdb33ff0f0e8308eb89cbbb3ae4 | ccaafe9f9587fea4e163e86340c71d08f5fe7b13 | refs/heads/master | 2021-04-09T14:07:50.257658 | 2020-02-02T23:22:48 | 2020-02-02T23:22:48 | 125,751,785 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,401 | py | parser.py | # -*- coding: utf-8 -*-
from collections import defaultdict
import numpy as np
import re
from hachoir_parser import createParser
from hachoir_metadata import extractMetadata
from os.path import basename
from sys import stderr
class Parser:
_file_path = None
_file_data = {}
_parser = None
_data_compar... |
c83847ec61441cd860530094ef41d3026c2d6f19 | da4e5d95cc545d199f062c659b7fe9187d269f85 | /bandits.py | 80a50f5749175f18746c54b341dc237fe6c2d6a7 | [] | no_license | chieni/treatment_decisions | 66e49dbe8fb552adfcaca4c2c182c758c70dac94 | af11bbb82886f6face477b4c6f8e0a17fc00b091 | refs/heads/master | 2023-03-31T02:18:47.755975 | 2021-04-06T20:31:31 | 2021-04-06T20:31:31 | 321,741,508 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,244 | py | bandits.py | '''
Used as reference:
https://github.com/lilianweng/multi-armed-bandit
https://www.kaggle.com/phamvanvung/cb-linucb/comments
http://snap.stanford.edu/class/cs246-2015/slides/18-bandits.pdf
'''
import numpy as np
from utils import NormalDist
class BernoulliBandit():
def __init__(self, num_arms, reward_probs=None... |
32363d823d4dec3a791ac5afcd7a1830562d51e5 | 74ee0d20ce56f0ec6880f93e55e8f55e6ce799a9 | /src/python/nimbusml/tests/feature_extraction/categorical/test_onehotvectorizer.py | 280bdfd436273a4e586de97d7b7c87df68adb35a | [
"MIT"
] | permissive | zyw400/NimbusML-1 | 100d8ac6ce98b3d79d93fc842e1980735d356a27 | b5f1c2e3422fadc81e21337bcddb7372682dd455 | refs/heads/master | 2020-04-08T10:58:44.427194 | 2019-01-04T22:10:21 | 2019-01-04T22:10:21 | 159,289,107 | 3 | 0 | NOASSERTION | 2019-01-04T22:10:22 | 2018-11-27T06:47:48 | Python | UTF-8 | Python | false | false | 1,213 | py | test_onehotvectorizer.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
import unittest
from nimbusml impo... |
60a1308831c5c5158a84b6a6069cc51615867249 | 02c2a20c82b31f4f1553a44bac93f2627e0b7b64 | /player/printmedianelement.py | c27a6f07244d700fa940b7cb8e8826e107c9cdb5 | [] | no_license | Thuvajarohana/Python-programming | 3f45ce7745a433f0ba90431a59bc9079bd4a4fe3 | 6923186356055f9c2fb32074cdd9db2a0de33b82 | refs/heads/master | 2021-04-05T23:44:31.469679 | 2018-06-02T19:10:15 | 2018-06-02T19:10:15 | 125,213,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py | printmedianelement.py | N=int(raw_input())
l=[]
if(1<= N <= 1000):
for i in range(0,N):
k=int(raw_input())
l.append(k)
for i in range(0,N):
for j in range(i+1,N):
if(l[i]>l[j]):
temp=l[i]
l[i]=l[j]
l[j]=temp
print l
k=(len(l)/2)
print l[k]
else:
print("invalid")
|
c90a0fbb13fcdd337847a7dc080b0f7770d2b2a4 | 86401d68808e56f6f8229b29a09092439bb3566c | /insights_integration/templates/views.pyt | fee164259989a8305f23f4c8bb672968a46d74a6 | [
"Apache-2.0"
] | permissive | benthomasson/insights_ansible_runner_poc | 3b1a17d4d477dd01eed64c84d637df7d520a8466 | 1392521f115ec36e626e1daf5187a1d57bfd50b3 | refs/heads/master | 2020-04-08T16:15:14.175876 | 2019-03-28T19:40:55 | 2019-03-28T19:40:55 | 159,510,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | pyt | views.pyt | from rest_framework import viewsets
from django_filters.rest_framework import DjangoFilterBackend
{%for model in models%}
from {{app}}.models import {{model.name}}
{%-endfor%}
{%for model in models%}
from {{app}}.serializers import {{model.name}}Serializer
{%-endfor%}
{%for model in models%}
class {{model.name}}ViewS... |
fd5c7f854f9901bde04a8cb5e4d22a8a37fcf39c | 6bdd266a08a4d33c0809bd1ec8ee3c9b440a8ac6 | /tests/periodicitytest_test.py | b9f23d12714b23aee75af1e2e8d4f52037bd1c58 | [
"BSD-2-Clause"
] | permissive | neurophysik/periodicitytest | 49de68b895a78786665edcbbfc2d91fe760e0250 | 5731c27e66515173363a441dad06a3696c4a983a | refs/heads/master | 2021-01-22T11:21:23.117361 | 2017-02-24T21:54:07 | 2017-02-24T21:54:07 | 36,018,806 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,691 | py | periodicitytest_test.py | #! /usr/bin/env python
# Tests the Python module.
from __future__ import print_function, division
from math import *
import numpy as np
from periodicitytest import periodicitytest
import random
def pertest_noise_wrapper(T, max_tau):
noisy_T = T + np.random.uniform(0.0, nu, len(T))
return periodicitytest(noisy_T, ma... |
b62ce7dd554c0d63c9f14617307371769a295926 | 4f008064c2bb5c0056e3d9a0f01db0412b582c33 | /turtle-crossing-start/player.py | f914c8d93fd7dcb986a006153a4a7495072140c5 | [] | no_license | christinaheadley/Angela-Yu | 5b2c2ce607d79d8c6727bd9d6dadcd3c83c3136d | 13e6796d6b78f1fa789d2f61622f6c33ac923913 | refs/heads/main | 2023-06-06T15:01:50.356074 | 2021-07-02T21:54:21 | 2021-07-02T21:54:21 | 371,133,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,101 | py | player.py | from turtle import Turtle
STARTING_POSITION = (0, -280)
MOVE_DISTANCE = 10
FINISH_LINE_Y = 280
class Player(Turtle):
def __init__(self):
super().__init__()
self.pu()
self.goto(STARTING_POSITION)
self.seth(90)
self.color("black")
self.shape("turtle")
self.mov... |
594479c22cada665dcdc76737085ce342d7d5faf | aa4411f4800bf572e95f9c0aaca606668eb32304 | /evp001/an2_colour.py | b9029dc3825bfe7a7683823039d12844dd5651df | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | EVP000/wk10_package | 48d8745165c8f1a00c47a48f90acaaf328b366d9 | 8c4f7c8a911702ef530b94a12d9e2fa6f81d1598 | refs/heads/master | 2020-09-16T11:25:49.055506 | 2019-11-25T00:09:18 | 2019-11-25T00:09:18 | 223,755,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,015 | py | an2_colour.py | # program name: an2_colour.py
# no optional arguments: Uses Wine data to display information about the relationship of
# various attributes with colour and hue
print('========================================================================================')
print('===================================================... |
b2cfd397e48213a540608fc232db2eab282935bb | a3a89b54af31deb583ea039657cc6a8c79a91bff | /PG/pg_agent.py | 092a2a3870c65afec2148e9001a0c406d1c36031 | [] | no_license | bunengzhucefeng/rl_algorithm_reimplementation | 1c4348a4914f090943e04aa8b5b8a2b6a105f35a | 5ef53154ea68de9f3cb84e829944646476148f9b | refs/heads/main | 2023-06-08T18:20:19.827511 | 2021-07-02T12:28:24 | 2021-07-02T12:28:24 | 382,340,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,967 | py | pg_agent.py | # 总管buffer和policy
from os import path
import torch
import torch.nn as nn
import torch.optim as optim
import torch.distributions as distributions
import numpy as np
from torch.serialization import load
import global_var as gv
torch.set_default_dtype(gv.torch_default_type)
class PG_Agent(object):
def __init__(
... |
f644ff322d1268092dbdcbfc1a3c76006424184b | 72f8f66f286d021462954d42997307f7be74ef00 | /game_of_life/board_tests.py | 2896388d63cb79ccb0a6f552dd0378d76f9ff8a7 | [] | no_license | umatbro/moto-d1 | 6711fa0279ffc1036c370c7714e8eec5e5d882a3 | cfc7267c87570d9f0edacf8db73109687f1cd3ab | refs/heads/master | 2021-04-29T00:53:13.654334 | 2018-02-17T16:08:42 | 2018-02-17T16:08:42 | 121,840,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,882 | py | board_tests.py | import unittest
from game_of_life.board import Board
from game_of_life.cell import Cell, ALIVE, DEAD
def create_test_board(size):
board = Board(size)
board[0, 0].state = ALIVE
board[0, 1].state = ALIVE
board[2, 1].state = ALIVE
return board
class BoardTests(unittest.TestCase):
def test_get_n... |
3461e9dceb2c0bfc49002809154f8be4cd8c66e2 | 83d33e40a92d81ced024f05d41edc14ec8c6171b | /databaseBuilder.py | 62a6776afc6aaaa732b1da1103a6afbcaf67594c | [] | no_license | alaye/music-visualizer | 03161600386aa3fd4b9c1bcba2530aafe7ffe5a8 | 65723778d489f7ab17b46ca3bcf871ca5914a221 | refs/heads/master | 2021-01-11T15:04:31.212897 | 2017-01-30T00:29:21 | 2017-01-30T00:29:21 | 80,292,770 | 0 | 2 | null | 2017-01-30T00:29:21 | 2017-01-28T15:45:01 | Python | UTF-8 | Python | false | false | 2,407 | py | databaseBuilder.py | import dataset
import json
import gc
import os
jsonDir = "/home/jr/share/python/music-visualizer/merged"
db = dataset.connect('sqlite:///test.db')
table = db['Songs']
for root, subFolders, files in os.walk(jsonDir):
for f in files:
print("file:{}".format(f))
gc.collect()
tmpJson = json.lo... |
af02cd0778e19df7b11145c4863776a1afd1cca6 | 5ee596d220b225ccd8baf4cf1df5c3f617b66fb6 | /bcfw_diffrac.py | 6a3bc7f0ac4f1351573df77a18272d0ec41a7ed0 | [
"MIT"
] | permissive | Riiick2011/weakactionloc | 3d283e674a9d21c2cf3666a2b4030b02199dfc8c | 53a50fa6128bd873190ad783482a884dfe8a453f | refs/heads/master | 2021-10-09T12:57:47.559165 | 2018-12-28T09:19:52 | 2018-12-28T09:19:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,578 | py | bcfw_diffrac.py | """ Implements BCFW for DIFFRAC objectives. """
import numpy as np
import os
from tqdm import tqdm
from numpy.linalg import norm as matrix_norm
import time
def get_feat_block(feats, block_idx, memory_mode, bias_value=-1.0):
"""Get feature for a given block."""
if memory_mode == 'RAM':
feat = feats[bl... |
ca93f49fbdc1d64e0616bca035a6043b3cc80ddc | a44d255801ce9f4b9db28498ef876a548e899f56 | /inception_2d_fields.py | 3655db50715f08cf1221bd75e2e698e5a4ef595b | [] | no_license | ajex1988/liver_classification | 3f8798841b06941a07edf6d3412a2e731e78b75b | fbc00ca354a93b20f1980c893fb86f91cab512bb | refs/heads/master | 2020-12-03T19:28:02.459206 | 2020-01-02T20:36:16 | 2020-01-02T20:36:16 | 231,452,349 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,131 | py | inception_2d_fields.py | import tensorflow as tf
from tensorflow.contrib import layers
from tensorflow.contrib.framework.python.ops import arg_scope
from tensorflow.contrib.layers.python.layers import initializers
from tensorflow.contrib.layers.python.layers import layers as layers_lib
from tensorflow.contrib.layers.python.layers import regula... |
5c174dd514d0a7d9aa932fcb436f22d9a44d2327 | a69921d3192440b869281bd6c9dd8937e88d5dd0 | /raiz.py | bed58cee7fb56eff6c813c7404b6d2a293d428f2 | [] | no_license | AiramL/Python-Exercicios | 1d6a7ca5dc38117bd87b8aaba629e3bf89f41ad0 | 2c0ebbe7a086a2c7c1c7977710cc44b31a9f38d8 | refs/heads/master | 2021-09-09T18:39:50.439096 | 2018-03-18T23:13:25 | 2018-03-18T23:13:25 | 125,773,846 | 0 | 0 | null | null | null | null | ISO-8859-1 | Python | false | false | 2,983 | py | raiz.py | '''
Aluno: Lucas Airam Castro de Souza
Resumo: Programa para calcular a raiz com a precisão n de casas decimais
def raiz(numero, casas_decimais=0):
if ((numero == 0) or (numero == 1)):
return "O resultado eh: " + str(numero)
elif (numero<0):
return "A raiz nao existe no conjunto rea... |
dbc3e51fed63fe0fadea67d05c4b4efc693938a3 | 48a66c99114450506a6ad6c1813e8ef10975b208 | /CHFDORA.py | fe408395fed836c2e9c301dd0c601bf6c4160fdd | [] | no_license | Grandolf49/CodeChef-Solutions | bec92058e4aa64d999c732f1575b45702955541a | ed963f684580a7d650e270a0d073a63274c79ea9 | refs/heads/master | 2020-08-01T12:37:29.477689 | 2020-06-23T19:23:36 | 2020-06-23T19:23:36 | 210,999,024 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 656 | py | CHFDORA.py | test_case = int(input())
while test_case != 0:
test_case -= 1
(n, m) = map(int, input().split())
ans = n * m
A = []
for i in range(n):
t = list(map(int, input().split()))
A.append(t)
for i in range(1, n - 1):
for j in range(1, m - 1):
k = 1
while ... |
c9f3e956d4016846c8efe0382b79882559d6ce64 | 1c390cd4fd3605046914767485b49a929198b470 | /atcoder/abc233_a.py | 09dcd17906ecc7bb3b0e0f5699a8deec080a0156 | [] | no_license | wwwwodddd/Zukunft | f87fe736b53506f69ab18db674311dd60de04a43 | 03ffffee9a76e99f6e00bba6dbae91abc6994a34 | refs/heads/master | 2023-01-24T06:14:35.691292 | 2023-01-21T15:42:32 | 2023-01-21T15:42:32 | 163,685,977 | 7 | 8 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | abc233_a.py | x, y = map(int, input().split())
print(max((y - x + 9) // 10, 0)) |
ba54b3a148a34ced74a337665ddd5f2d9084553b | 1a0b67b5983d343dac9fa3396f64d9d6e50de399 | /Data/find_wrd_freq.py | d68e1cfad5d7092435cdc0347cbc6a1f33ebcc20 | [] | no_license | hbcbh1999/yelpReviewQualityPredictor | 639c721280edabaf72523514805edacbbacf4311 | 0c8cbf0ff2bd0067d96eaf4acf3b18fb94bf3de9 | refs/heads/master | 2020-04-07T13:02:57.650491 | 2018-03-23T06:09:45 | 2018-03-23T06:09:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,442 | py | find_wrd_freq.py | """
This file goes through the data to find the frequencies of words in the corpus
"""
import csv
import time, datetime
import calendar
from collections import defaultdict
import chardet
import re
REVIEW_ID_COL = 0;
USER_ID_COL = 1
BUSINESS_ID_COL = 2
STARS_COL = 3
DATE_COL = 4
TEXT_COL = 5
USEFUL_CO... |
c33ce05579358fa84c4eb2859ed6acf9013e8a54 | 2d7aaf66ca8385f769a37c00502e84aa6b1b2062 | /0x0A-python-inheritance/2-is_same_class.py | a37600a9aef2539692808d6c6f6d885becf86cf3 | [] | no_license | NoDanCoder/holbertonschool-higher_level_programming | 1cb1a501a1b4c54e5c7728644cb05698ef32c205 | 132f1876bf13cab35a4246bfc0f9a63e7af50a07 | refs/heads/master | 2022-12-29T23:42:30.392209 | 2020-10-14T23:13:13 | 2020-10-14T23:13:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | 2-is_same_class.py | #!/usr/bin/python3
def is_same_class(obj, a_class):
""" chacks if the object is exactly an instance of the specified class """
return type(obj) is a_class
|
b5270fa2b11bf4ed2f26d3ea6ff5596947093b9d | 1cc85e876a5e02bf5dd86e1e88afe0203574dca4 | /sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/__init__.py | 652f08e501f6a01d0230bff168d4e9930084c35d | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | rajivnandivada/azure-sdk-for-python | 8f7ae6154acb1957f1182ddf7a54ea5a85c9c707 | 36d9cb7b59cb8d53fffd7c41b03c45ab23b49d80 | refs/heads/master | 2020-06-14T21:43:37.119604 | 2019-07-03T21:44:55 | 2019-07-03T21:44:55 | 177,673,417 | 0 | 0 | MIT | 2019-03-25T22:21:16 | 2019-03-25T22:21:15 | null | UTF-8 | Python | false | false | 275 | py | __init__.py | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from ._client import SecretClient
from .._models import Secret, SecretAttributes, DeletedSecret
__all__ = ["SecretClient"]
|
ab073d9df7a90e57035b0d507b64e4f5685b6afc | 36260802251f648cdbb79bf4111e3131ff8c83cc | /data_processing.py | 63c6c0d6ac58091207c536297ce2352e2b96e012 | [] | no_license | keshavs0305/Sales-Forecasting | 2b2652df0b398ac11189816a7981f9ea107da20e | 3c291ac9e3691ad00334127639fb5d500361a4bf | refs/heads/master | 2023-08-28T01:14:58.883111 | 2021-10-23T16:49:05 | 2021-10-23T16:49:05 | 407,438,779 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,258 | py | data_processing.py | import pandas as pd
import numpy as np
from sklearn.preprocessing import OneHotEncoder
folder_path = "..\Sales-Forecasting\csv_files"
df = pd.read_csv(folder_path + "\df.csv")
def time_series_bin(right, col):
ret = pd.DataFrame(pd.date_range(df['Order date'].min(), df['Order date'].max(), freq='d'), columns=['Da... |
2faf4f68ff228662a3cfccaa4a92820c48e8824b | 1411cc3555a870a904bef894369df349e1e17117 | /test_file_postgres.py | c33acc8d969029f54f7695f52e2cf898b3110125 | [] | no_license | decadevs/using-sqlalchemy-Kingsconsult | 84c42f0e42de0da82b2dc8eec2578ad56b41c831 | 4e0351a8d754aca1d6936f4b3714595a799ee6a5 | refs/heads/master | 2020-12-15T11:59:34.344801 | 2020-01-24T15:35:39 | 2020-01-24T15:35:39 | 235,094,567 | 0 | 0 | null | 2020-01-24T15:35:40 | 2020-01-20T12:17:36 | Python | UTF-8 | Python | false | false | 1,387 | py | test_file_postgres.py | import unittest
from sql_memory import PostgresStorage
class PostgresStorageTest(unittest.TestCase):
def test_create(self):
books = PostgresStorage()
# books.create(id=7123, book_id='2', title='Sql class', author='kings')
self.assertEqual(books.fetch(id=73), {'author': 'kings', 'book_id':... |
19b420d499fb606d40dd218354aa6aa6de6e54f1 | 3db7b5409f2f9c57ab3f98bda50f8b548d98063d | /samples/snippets/nested_repeated_schema.py | 5d55860ccec3ca0003b532b9665aebe018695c13 | [
"Apache-2.0"
] | permissive | googleapis/python-bigquery | 66db156b52e97565f6211b2fab5aac4e519fa798 | 3645e32aeebefe9d5a4bc71a6513942741f0f196 | refs/heads/main | 2023-09-01T07:41:24.893598 | 2023-08-23T19:04:13 | 2023-08-23T19:04:13 | 226,992,475 | 622 | 287 | Apache-2.0 | 2023-09-12T04:31:26 | 2019-12-10T00:09:04 | Python | UTF-8 | Python | false | false | 2,153 | py | nested_repeated_schema.py | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
4bb1e0958fa27ed848cf055fa31cac3e34a7dbea | ebcfd6e84e19f3457dc13d7099745cf498c5214e | /EulerProblem11.py | 4e458507cbd6b839e032923ece6783a62798e916 | [] | no_license | taylerzy/ProjectEulerSolutions | 2f1f2b30716c2b631d438afc94602e30cb52c857 | e836a339d9cadf63464bb3b2387fd2692cb284c7 | refs/heads/master | 2020-04-13T21:15:25.144955 | 2018-12-28T21:39:21 | 2018-12-28T21:39:21 | 163,451,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,743 | py | EulerProblem11.py | class GridTraversal:
maxProduct = 0
grid = []
last4Nums = []
def __init__(self, grid):
self.grid = grid
def traverseAll(self):
self.traverseHorizontals()
self.traverseVerticals()
self.traverseDiagonalsNortheast()
self.traverseDiagonalsSoutheast()... |
482273a7d5b085b48aa94e75074697b6f1de44e9 | a18044757522654e8f0db24291ef5dc52e63aaac | /problems/models.py | 26b1481245562987a22d75304bce0c797d2b3b94 | [] | no_license | ahmedakef/AKOJ | a9a0b9e6e265e04fbbbf9cc2ade093355eea1f16 | 5c32235f42c73c7f9925cee4fbe3a786e2ded739 | refs/heads/master | 2020-05-19T20:08:25.509598 | 2019-05-06T12:21:17 | 2019-05-06T12:21:17 | 185,196,540 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,535 | py | models.py | from django.db import models
# Create your models here.
Languages = (
('py', 'Python'),
('cpp', 'C++'),
('c', 'C Language'),
('java', 'Java'),
)
Verdicts = (
('ACC', 'Accepted'),
('TLE', 'Time Limit Exceeded'),
('WA', 'Wrong Answer'),
('MLE', 'Memory Limit Exceeded'),
)
class Proble... |
b9c71cf53dfde087e510a2b66d2b6b0523df43e9 | f2b91692a434ee79ff5d68ed3111d60d90315f00 | /build_scripts/homebrew/formula-generate.py | 5080943b83d991988e5247d32c9ce32b2fc05833 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cal5barton/azure-cli | f883bc7d481b163d4c4af1fa154a990182e5de80 | 6ebc6f810f32b8fce30a360633a70fcfdea15e7b | refs/heads/dev | 2023-05-24T18:12:36.151238 | 2018-07-12T16:16:29 | 2018-07-12T16:16:29 | 140,749,210 | 0 | 0 | MIT | 2023-05-15T18:58:31 | 2018-07-12T18:13:18 | Python | UTF-8 | Python | false | false | 4,245 | py | formula-generate.py | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ----------------------------------------------... |
cf75f950b36a369e0ddefc6dfc15aa9797503a11 | 542a23dc4826289ec1c0d654f60623e8846f54c6 | /tests/constants.py | de125c9c119e94ef1c869354a5167c74ada4fa1b | [
"MIT"
] | permissive | bio2bel/rgd | d2d91c58edf62e9bd6c3691bada8851a70be8594 | 8dc4bab8d28ac5f83696050c48c4226ec4de30d8 | refs/heads/master | 2021-04-30T04:40:12.196931 | 2019-09-22T19:47:50 | 2019-09-22T19:47:50 | 121,540,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | constants.py | # -*- coding: utf-8 -*-
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
resources_path = os.path.join(dir_path, 'resources')
TEST_ORTHOLOGS_URL = os.path.join(resources_path, 'RGD_ORTHOLOGS.txt')
TEST_GENES_URL = os.path.join(resources_path, 'test.GENES_RAT.txt')
|
eb02ebc09395718ef90bd891afbba84a52a33ca9 | f1922f1d7cbe2b08dafe85ccd250f7953e930f61 | /gameScript.2.py | 5661a7b33a4de7a4a9557537cd09521e6337ed18 | [] | no_license | Nahomtes/D-D-G-ServerSide | 23f6fe3b5a4fcc8de1055dc20b4db4b681be2783 | 46b291587457b266f5bbf47e9a81a7a94d65556d | refs/heads/master | 2020-04-16T06:31:05.324927 | 2019-01-12T06:05:27 | 2019-01-12T06:05:27 | 165,350,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,670 | py | gameScript.2.py | #!/usr/bin/env python
import csv
import MySQLdb
import cgi, json, os, sys,string
from optparse import OptionParser
import json
import random
__version__="1.0"
__status__ = "Dev"
#*********** SAVING QUESTION TO DATABASES START HERE *************#
##################################################
def save_Quest... |