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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21cb97540b3dfbdfcf2bae9fd0a8e8847e5692c4 | 78bdb461b09f0dbccad474f069fe7dec829c70e3 | /venv/Lib/site-packages/rest/models/workflow.py | 612faab96d7065d6fa48de2f4b7553bea324dee7 | [] | no_license | OdaNilseng/FLSworkflow | 92d7a9b9d63398517f927fd2a0514eaef787e110 | 780a998741991f17ce14d5b642b228495681e415 | refs/heads/master | 2022-12-03T13:04:36.542191 | 2020-08-21T08:55:53 | 2020-08-21T08:55:53 | 289,224,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,401 | py | workflow.py | from typing import List, Optional
from pydantic import BaseModel
from pydantic import Field
from tailor.internal.domain.workflow import WorkflowModel
class WorkflowSummary(BaseModel):
id: str = Field(None, title="unique ID of the workflow")
name: str = Field(None, title="non-unique name of the workflow")
... |
48c5a5517502d577792eccb7da3119f0c8f455ac | 97757bae2569a6225b6a684be5728fdd60a2bdb8 | /src/wheelchair_pkg/src/odo.py | 3c2ca3fb50d5540204287edff4b84205e9cc038e | [] | no_license | Praj390/ROS_Arduino_interface | 2495863104abbed402f3b67a1e0545872b5215c0 | f12be27d1333784b9eb66e4c74c2bc6c9765aa98 | refs/heads/main | 2023-04-09T15:18:04.221692 | 2021-04-14T23:54:11 | 2021-04-14T23:54:11 | 357,990,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,394 | py | odo.py | #!/usr/bin/env python
import rospy
import math
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Twist
class Odometrymod:
def __init__(self):
self.sub = rospy.Subscriber('rtabmap/odom',Odometry,self.Odomdata)
self.pub = rospy.Publisher('/cmd_vel', Twist, queue_size=10)
self.total_distance =... |
74cc463a21088ba424b5cb64a50014e6e9976b6c | 98385b4b44fbae153e1643b62a259a6acb247dda | /part-1/prac1.py | 0906dbd829bdb6d64588cecfc162d25ee0a94423 | [] | no_license | shahuji/hello-world | 2cbd9c6cbe7e54fe2ef63b5bd6b8f5cd3f193580 | 6ab9cda0f84f03d3a6f6577b5f9c2556728cb435 | refs/heads/main | 2023-03-05T05:17:54.728668 | 2021-02-14T16:25:50 | 2021-02-14T16:25:50 | 328,083,768 | 0 | 0 | null | 2021-02-14T16:20:33 | 2021-01-09T05:41:06 | Python | UTF-8 | Python | false | false | 358 | py | prac1.py | # >>> a = 12
# >>> b = 13
# >>> a+b
# 25
# >>> a-b
# -1
# >>> a*b
# 156
# >>> a/b
# 0.9230769230769231
# >>> b/a
# 1.0833333333333333
# >>> b%a
# 1
# >>> b//a
# 1
# >>> x = 25
# >>> y =5
# >>> x//y
# 5
# >>> x/y
# 5.0
# >>> x%y
# 0
# >>> x/=3
# >>> x
# 8.333333333333334
# >>> x=25
# >>> q=25... |
e7f731814bb21bf8328957a0db9c73aa97b38914 | d2c3c695fe0d259e4c4656238f8caf0422272ed5 | /src/embeddings/taxa_abundance_shapiro.py | 6e10aeaa448084998126e03baf4d16bde702ec8a | [] | no_license | kbaseIncubator/KE_KG | 2cef4f5544bc7db0949dafe624e4f83566d523e9 | fbd4fda0fd175708e8c5f1017721fe93eefad02e | refs/heads/main | 2023-08-23T19:29:47.847655 | 2021-10-19T23:25:45 | 2021-10-19T23:25:45 | 315,470,221 | 2 | 5 | null | 2021-01-27T23:46:21 | 2020-11-23T23:56:20 | Jupyter Notebook | UTF-8 | Python | false | false | 1,176 | py | taxa_abundance_shapiro.py | import pandas as pd
import numpy as np
from scipy.stats import shapiro
import time
import os
df_taxa_orig = pd.read_csv("./MGnify/taxonomy_aggregated_full_removed_duplicates_col100.tsv", sep="\t")
print("read input")
#exclude categorical
cols = [col for col in df_taxa_orig.columns if col not in ['id', 'study_id', '... |
b4edd2d1ddb2556cbffdaf5275a2d6b60984ae30 | 5bae34dd6f75dfd5bcb88bc646a9127df0d7cbd8 | /server/galeria/images/views.py | d99a0e8e0d3af636aa6d7845f6269cba120445bd | [] | no_license | danjac/galeria | d6e7daf93f902c6817c8bb904236f03bd8d37891 | a64b5aed772538b034d8d85c2ea5c5ab20a12cfb | refs/heads/master | 2020-04-01T19:31:56.978276 | 2016-08-14T12:37:30 | 2016-08-14T12:37:30 | 65,665,672 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,221 | py | views.py | from rest_framework import viewsets, permissions, status
from rest_framework.decorators import list_route
from rest_framework.response import Response
from .serializers import ImageSerializer
from .permissions import IsOwnerOrReadOnly
from .models import Image
class ImageViewSet(viewsets.ModelViewSet):
queryse... |
e4714bbcde9408c4fcfc9fbdd00823335e95d5d2 | 591514ae36fd08a135aa04a340c4a4dcbd572bf7 | /Archive.org Broken Link Automapper/archive-org-broken-link-mapper.py | de228d6a5776778e4bf6a0791221feee8f0d3ba9 | [] | no_license | zawadif/search-solved-public-seo | ca92779ff722748e49ecc6c3394af2e1b11dde33 | 7c6cd4183179b3609a779408a7d8774fcb0ecb69 | refs/heads/main | 2023-02-26T18:20:08.554323 | 2022-07-25T15:21:46 | 2022-07-25T15:21:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,309 | py | archive-org-broken-link-mapper.py | import concurrent.futures
import logging
import os
import sys
import time
from io import StringIO
from urllib.parse import urlparse
from urllib.request import urlopen
import pandas as pd
import requests as req
import waybackpy
from bs4 import BeautifulSoup
from polyfuzz import PolyFuzz
from requests.adapters import HT... |
477e94b749f7166b0b171f028bed94b936bdff77 | 298207f80ab6571eec2e3c2c577e3b58121f8a16 | /core/migrations/0006_auto_20191118_1237.py | 88753b72ddbcb8ac888e93bb6463cf2ab6671f6e | [] | no_license | NguyenLamMS/Face-recognition | c7a7c22d400d63db8dd328b6f79ef4edb861cece | 9867ebb28bc27642cc486a558d67fc9618c17fc5 | refs/heads/master | 2020-09-27T23:58:04.558005 | 2019-12-19T03:02:31 | 2019-12-19T03:02:31 | 226,640,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 568 | py | 0006_auto_20191118_1237.py | # Generated by Django 2.2.5 on 2019-11-18 05:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20191118_1235'),
]
operations = [
migrations.AlterField(
model_name='student',
name='id_class',
... |
3750ca8c2d8688da98a69a7d0a92e21b9856a59e | 64bf39b96a014b5d3f69b3311430185c64a7ff0e | /intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/cloudscale_ch/cloud/plugins/modules/network.py | c592c6712c02767931e7116a16a34322cef5d86b | [
"MIT",
"GPL-1.0-or-later",
"GPL-3.0-only"
] | permissive | SimonFangCisco/dne-dna-code | 7072eba7da0389e37507b7a2aa5f7d0c0735a220 | 2ea7d4f00212f502bc684ac257371ada73da1ca9 | refs/heads/master | 2023-03-10T23:10:31.392558 | 2021-02-25T15:04:36 | 2021-02-25T15:04:36 | 342,274,373 | 0 | 0 | MIT | 2021-02-25T14:39:22 | 2021-02-25T14:39:22 | null | UTF-8 | Python | false | false | 4,798 | py | network.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: network
... |
18d9d7da0931bf082e7541367c23b35bf21b389d | 75543028ffc1bce24affed0b0c70d284229d4575 | /main.py | 1514a1f88f8e61580485d56debb7da18e1995877 | [
"MIT"
] | permissive | MineJockey/python-basics | bf8184a5fbab075b70ef74c3ab5d55bc3b57dd9d | bd0370413362c69e55fc81366d8c995875f9308a | refs/heads/master | 2020-05-29T08:40:12.948903 | 2019-05-28T14:22:38 | 2019-05-28T14:22:38 | 189,042,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,113 | py | main.py | # Notes:
# - Python is a dynamic language so you don't need to
# define a variable's type
# - Parentheses are often optional
# - Comments start with # and anything in a comment,
# won't be run by the computer
# - Counting starts at 0 not 1
# import will load external modules allowing you to use
# the functions with... |
1975a766263d7268a08ebd44dc5a4b9fda8cd8c9 | c921bda46cdcde0427c9d2afb213160be56d5b25 | /Labs & homeworks & Others/Other materials/tbench_pickdir.py | 61494a69a9f87169a105935de3ef5ab6cecc2183 | [] | no_license | rubberdinghy/auto_nav | 49adffdef65d87e64fae9e8322deaf257d6b97ef | 5f1c8cee8e9e5da1a7a363d8fdba1a48083fe262 | refs/heads/master | 2020-12-18T10:37:01.162191 | 2020-04-23T14:40:57 | 2020-04-23T14:40:57 | 235,349,311 | 0 | 2 | null | 2020-01-21T13:29:56 | 2020-01-21T13:29:55 | null | UTF-8 | Python | false | false | 4,773 | py | tbench_pickdir.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 1 18:45:56 2020
@author: ivanderjmw
"""
import sys
import cmath
import math
import numpy as np
import time
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from PIL import Image
# create global variables
rotated_size = 384
clear... |
b60506dd6a3fa3498cb025b390affcc362b4b20d | 321e58ab3e6b2385bb3549aaaefd56a58c2a51e7 | /python/atpic/prunt.py | df254cced2dd2606226e19ff2fd7f1d6b5eb6e93 | [] | no_license | alexmadon/atpic_photosharing | 7829118d032344bd9a67818cd50e2c27a228d028 | 9fdddeb78548dadf946b1951aea0d0632e979156 | refs/heads/master | 2020-06-02T15:00:29.282979 | 2017-06-12T17:09:52 | 2017-06-12T17:09:52 | 94,095,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | prunt.py | #!/usr/bin/python3
# in py3k, print signature is: def print(*args, sep=' ', end='\n', file=None)
# http://stackoverflow.com/questions/812422/why-does-python-logging-package-not-support-printing-variable-length-args
import io
import os
import threading
def prunt(*args, sep=' ', end='', level='DEBUG'):
output = io.S... |
a536a7e9dd02e3bfc1fe4e4f7fb295f1d3fb66c4 | 33f4fe2be4971b131db02f44d1c0a17807b121f2 | /sudoku_solver.py | 6a18109ac340b7e2d9a2e0d2b662cb97da8e63f7 | [] | no_license | KevinFarthing/sudoku_app | 19c0251083024f07cec25e0da9e26818eb940154 | 678153d9bf0804cf662d63f798a7a1126b8036c6 | refs/heads/master | 2020-03-27T01:52:56.845707 | 2018-08-24T20:00:16 | 2018-08-24T20:00:16 | 145,750,464 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,406 | py | sudoku_solver.py | from copy import deepcopy
import numpy as np
easy_base = [[5,3,0,0,7,0,0,0,0],
[6,0,0,1,9,5,0,0,0],
[0,9,8,0,0,0,0,6,0],
[8,0,0,0,6,0,0,0,3],
[4,0,0,8,0,3,0,0,1],
[7,0,0,0,2,0,0,0,6],
[0,6,0,0,0,0,2,8,0],
[0,0,0,4,1,9,0,0,... |
7014ea5fbb470bab7fffd71b012c54a59c3eef99 | d02ebdcb0dbc9b2f85dcd4064ab93c647e976b03 | /rca/programmes/migrations/0008_add_apply_fields.py | ce0962a01a11cf296d72cd31181ce6d50f21a953 | [] | no_license | torchbox/rca-wagtail-2019 | 5deb298815478d0be98057bdd7d5c082aaaa1cb0 | d73ea183031bb1bc72f3c6890a02814f32926082 | refs/heads/master | 2023-09-04T03:14:30.369016 | 2023-08-22T07:15:02 | 2023-08-22T07:15:02 | 200,079,441 | 9 | 3 | null | 2023-08-22T08:07:16 | 2019-08-01T15:52:38 | Python | UTF-8 | Python | false | false | 3,204 | py | 0008_add_apply_fields.py | # Generated by Django 2.2.4 on 2019-08-22 09:32
import django.db.models.deletion
import wagtail.blocks
import wagtail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("images", "0002_customimage_file_hash"),
("programmes", "0007_add_fees_se... |
1ce3d0d29945bb0e6b7b6547daffe159eababafd | 21f3fee6b2f0ebd8f437a1b61301e4cca6f203b6 | /map_lambda_fibnocci.py | 46b55b659bc21eac63615709b8403e74fdaab16c | [] | no_license | vijaykumar1356/hacker-rank-practice | 6551fc11a70ffe191de34b6db32efe94517b7274 | ca92730b2bd6519ce3d9adec2a4e4978bd1ec8fe | refs/heads/master | 2022-12-30T08:12:30.284595 | 2020-10-21T11:26:53 | 2020-10-21T11:26:53 | 287,171,699 | 0 | 0 | null | 2020-08-13T03:41:52 | 2020-08-13T03:27:35 | null | UTF-8 | Python | false | false | 402 | py | map_lambda_fibnocci.py | cube = lambda x: x*x*x# complete the lambda function
def fibonacci(i):
# return a list of fibonacci numbers
l = [int]*i
for j in range(i):
if j == 0:
l[j] = 0
elif j == 1:
l[j] = 1
else:
l[j] = l[j-1] + l[j-2]
return l
if __nam... |
2bb8fae13285ea094ae984e6dd646dbfdc43b68e | b46f6e8651ae2cb3ea8c552e6a3b344ecf910029 | /apps/faceattr/dataset.py | bb7bd9e21bc279832b92f25e2417d43601c78ab4 | [] | no_license | Munya07/work | d416cd7e1ebbb92700b09fa5e98dd165a14bc3c4 | 351f8ec72aca91efba301de1d9f63f83c375f3dd | refs/heads/master | 2020-07-28T15:34:59.003090 | 2019-05-24T02:48:47 | 2019-05-24T02:48:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,296 | py | dataset.py | import tensorflow as tf
import numpy as np
import os
from config import *
AUTOTUNE = tf.data.experimental.AUTOTUNE
def load_labels(labels_path):
f = open(labels_path)
# line 1: number of images
num_imgs = int(f.readline())
# line 2: attribute names, 40 in total
attr_names = f.readline().split()
... |
890e1c44d5ffdc835dbe0a7b29c898064475ad4e | ade7dbf5e3bbc499bbef601ac9b2cca6eb8a1ad8 | /Day03/solution.py | e89784d5a75140274e676337e952c35d32ff1650 | [] | no_license | EvilGamerX/Advent2020 | faf56c5f63a9354b38870ecff9b7224b32abe976 | 2b123aeddeae7a04036a7ce88a98373b18419e16 | refs/heads/main | 2023-01-27T22:42:11.462274 | 2020-12-04T14:32:31 | 2020-12-04T14:32:31 | 317,658,953 | 0 | 0 | null | 2020-12-04T14:32:32 | 2020-12-01T20:25:06 | Python | UTF-8 | Python | false | false | 1,225 | py | solution.py | import math
def day03():
with open('./Day03/input.txt') as f:
content = [i.strip() for i in f.readlines()]
trees = 0
rightPos = 0
loopMod = len(content[0])
for row in content:
if row[rightPos] == '#':
trees += 1
rightPos = (rightPos + 3) % loopMod
... |
87ed00566986186a3aa119fb7d2a3d1cf4f15703 | 6510b7186b14b52a32d83108f871c5f8cdd04d29 | /fastAPI/crud.py | 5fa556e060c1a0217ba470fb8bdbcf75e116ef31 | [] | no_license | AndreiRosa/ayty | 4ab1b19c408872369f784a172215e60cd7033dc8 | d696afeb28d84aee882a4e0cc67dd704070baef8 | refs/heads/master | 2021-01-01T22:30:22.079305 | 2020-02-09T20:43:47 | 2020-02-09T20:43:47 | 239,371,042 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,331 | py | crud.py | from sqlalchemy.orm import Session
import models, schemas
from datetime import datetime
def create_call(db: Session, call: schemas.CallCreate, id_extension = int):
db_call = models.Call(extension=call.extension, nu_ddd=call.nu_ddd, nu_phone=call.nu_phone, dt_start=call.dt_start, dt_answer=call.dt_answer, dt_f... |
29f1dc27d9f600275584cde7f537f78335eeb52a | ad5d81fd8a952a5719f750714308bd438aa8ddd4 | /stack.py | 1c662332a36802403697083ac0393b2c24941544 | [] | no_license | HuipengXu/data-structure-algorithm | d721255e620ab0e25733fa1e91a05393f1857eab | aec39f127c496262118f50f44ccfa460a77b681c | refs/heads/master | 2022-02-01T07:33:44.998301 | 2019-06-24T09:39:28 | 2019-06-24T09:39:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,685 | py | stack.py | from single_linked_list import SingleLinkedList, Node
# 基于 list 实现固定容量的栈
class ListStack:
def __init__(self, capacity):
self.val = []
self.capacity = capacity
# 入栈
def push(self, data):
if len(self.val) >= self.capacity:
return False
self.val.append(data)
... |
40ccce49ebdbe8188bbd2ad30fb548d3290f4482 | 6728dc41073d1271e1617ca29974eca8affa9def | /cleanup.py | 5ad4b370d956f7018e973ed29e01c9bff4b0db9e | [] | no_license | microchips-n-dip/opengl-basics | 607bd864944a489e0408bfd8d9238fb281927c6a | b35601d781558ebe68d133537f440bff0cb9ea04 | refs/heads/master | 2020-07-15T04:00:44.495755 | 2019-08-31T00:27:36 | 2019-08-31T00:27:36 | 205,474,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | cleanup.py | import os
import subprocess
# Simple cleanup routine
project_path = os.getcwd()
build_path = os.path.join(project_path, "build")
objects = os.listdir(build_path)
for object in objects:
os.remove(os.path.join(build_path, object))
if os.path.exists(os.path.join(project_path, "vsc")):
os.remove(os.path.join(projec... |
782b6fd2c8835761d9a49ee7ea5f8c3a9af2b79b | 793f13d79155c2513fd22537d6d2fab31ef824fc | /复习/00.py | 169b73aaa7ffb8c10dd647250c75215335620191 | [] | no_license | TheoryDance/python_careful | d80cbcce50b0622ce4ee7f7ff8c4102b22f8ee49 | a53aebf8e9d7785a65dc12b3365fc1c7311e6807 | refs/heads/master | 2020-04-15T15:35:05.090303 | 2019-01-26T18:03:29 | 2019-01-26T18:03:29 | 164,799,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | 00.py | #!/usr/bin/python3
import sys
import keyword
a = 60
sys.getsizeof(a)
x = "runoob";sys.stdout.write(x + '\n')
print(keyword.kwlist)
# 等待用户输入
# name = input("\n\n按下enter键退出.")
# print(name, type(name), int(name))
tinydict = {'name': 'runoob','code':1, 'site': 'www.runoob.com'}
print(tinydict)
print(tinydict.keys())
pri... |
58bb5d15984d527b667c2ea41f290cae8ac00a64 | 9d7179929de108458fdbfff0f7f185d6bc9dd269 | /covid_correlates_protection.py | b68e073e2303b6d64f900b5d0a6a94242b6c2074 | [] | no_license | jonessarae/streamlit_covid_nlp | 142c113ae3d55ff53aa8491adfa01c0aa6bcd82c | 655261f9e5fe2baba5bf39be69a7924a1f4c0c4c | refs/heads/master | 2023-02-21T01:59:26.367831 | 2021-01-29T16:02:52 | 2021-01-29T16:02:52 | 334,175,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,818 | py | covid_correlates_protection.py |
import streamlit as st
import scispacy
from spacy import displacy
import pandas as pd
import numpy as np
import spacy
HTML_WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem">{}</div>"""
@st.cache
def load_data(file):
# read in excel file of abstracts
... |
e90d8d5b114410f505f2fe6d4d0fe3cda6ecb7df | b30b50759a8b6bfd05beff161fd6528e19932612 | /Exercise - RESTFramework Assignment/pollsmodelauto/pollmodels/views.py | 10c2d39d85fd1e81d6b8572be1ad27928e9adbe8 | [] | no_license | amanjaiswalofficial/Assignments | 61efee10a1669e625c164f8f3a79dceab2472978 | 255a89844007f37beed83afc9a36e286d3f5d685 | refs/heads/master | 2020-04-21T03:43:01.220283 | 2019-04-13T18:17:10 | 2019-04-13T18:17:10 | 169,291,907 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,008 | py | views.py | from django.shortcuts import render
from .permissions import IsOwnerOrReadOnly, DidOwnerCreateQuestion
from .serializers import QuestionSerializer, ChoiceSerializer
from rest_framework import viewsets, permissions
from rest_framework.authentication import SessionAuthentication, BasicAuthentication
from .models import Q... |
e2347525551bee513bbf87067d8c80a8e4687b37 | ea84be09afdd0c57872f1e53bc44b3d4e6b3c74e | /cSpinner.py | 41006908205ccb159b71512261839dc3f3e80889 | [] | no_license | kxtells/vague-places | b8aee008d00f7fa45a84d00761692dbe9c235ba7 | 5e9f7827a921e13e27551515333e599126874dbe | refs/heads/master | 2021-06-19T01:46:05.015539 | 2016-12-24T13:29:40 | 2016-12-24T13:29:40 | 4,713,403 | 10 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,412 | py | cSpinner.py | import sys
import threading
import time
class cSpinner(threading.Thread):
"""
Print information in the same line, giving feedback to the user
\details Prints a spinning text on the screen. Additional text may be attached as extra information. Extends the Thread class
"""
chars = ["\\","|","... |
25818f7dab606e804b4f557bead8eba475cfb46c | d69a75f75e3938e150632fe0b0a78d8bca7e607e | /.scripts/jiggle.py | 290cbb0efe81e884c8ecdd797d6013c6d4a63933 | [] | no_license | AndrewOlsen/dotfiles | 793e3690232d0839250b48614630144541cb44b0 | 050a089e660676932326515d4559f84d6dbb7294 | refs/heads/master | 2021-01-19T22:13:31.784936 | 2019-07-28T18:47:50 | 2019-07-28T18:47:50 | 88,771,425 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | jiggle.py | #!/usr/bin/env python
from subprocess import call
from pymouse import PyMouse
from time import sleep
colors = ["CC0033", "FF6633", "FFFF00", "00CC00",
"3399FF", "0000CC", "6600FF"]
m = PyMouse()
call('tput civis', shell=True)
while(True):
for c in colors:
print("\033]11;#{0}\007".format(c))
... |
6b7d861274909c03f3936fb59b036e4d94b0f450 | 9a329df241d1ed7257c068606b03b48113c69d7f | /001基础/019面向对象_继承/12静态方法.py | 763bc907d16388c458930fa68c0335a4d499506f | [] | no_license | gitHirsi/PythonNotes | c3910979c34c82574f74ecbebd6de439f959f4b5 | 0901974e4904b0ac65983377fd4d081b06dfd029 | refs/heads/master | 2022-11-09T06:22:03.608188 | 2020-06-15T09:31:46 | 2020-06-15T09:31:46 | 266,547,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | 12静态方法.py | """
@Author:Hirsi
@Time:2020/6/12
"""
"""
使用场景
1.当方法中既不需要使用实例对象(如实例对象、实例属性),也不需要使用类对象(如类属性、类方法、创建实例等)时,定义静态方法
2.取消不需要的参数传递,有利于减少不必要的内存占用和性能消耗
"""
class Dog(object):
@staticmethod
def info_print():
print('这是一个静态方法')
ww=Dog()
ww.info_print()
Dog.info_print() |
8ab1edb2538a42d648a941c4c748eb675a5a3761 | 78c4a0b029ef1af4ac9ef90305eef85ef866ad35 | /gfx/processing/bresenham/bresenham.pyde | 8a899712315e147dc3d2a28dc23bf64a333e9908 | [
"MIT"
] | permissive | qeedquan/misc_utilities | 7727e33e01a9f45275e3efdd165c90053d8ba10a | e8319e6572dd92efceebb5a2d52a00cb993492b2 | refs/heads/master | 2023-08-08T13:24:18.213741 | 2023-08-07T00:26:03 | 2023-08-07T00:26:03 | 46,625,839 | 10 | 3 | null | null | null | null | UTF-8 | Python | false | false | 8,792 | pyde | bresenham.pyde | # http://members.chello.at/~easyfilter/bresenham.html
from math import *
class Grid:
def __init__(self):
self.size = 32
self.x0, self.y0 = -1, -1
self.x1, self.y1 = -1, -1
def pix2cell(self, x, y):
return x/self.size, y/self.size
def point(self, x, y, err = No... |
8681d3fecb02e739bbb180de8b83245ac09ec05f | 7a496b60fda855864e0b8b4abd0fd165a38a7be8 | /empresas/tests.py | a1ed5e5206c45b44ed242c3f63ac059b1b55ae0d | [] | no_license | manuelalonsobraojos/AppEmpresa | 4dea867ca509da7e13af577193e26f879d7e8ba6 | b16c92edc6a93a2f75860b2ed3e2ae6b2f35343d | refs/heads/master | 2021-01-11T05:38:41.410421 | 2016-10-23T09:29:38 | 2016-10-23T09:29:38 | 71,628,030 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 551 | py | tests.py | from django.test import TestCase
from empresas.models import Empresas
from empresas.views import *
class EmpresasMethodTests(TestCase):
def test_crea_empresa(self):
emp = Empresas(nombre='nPrueba',correo='cPrueba')
emp.save()
self.assertEqual(emp.nombre, 'nPrueba')
self.assertEqual(emp.correo, 'cPrueba')
... |
017b2e46209677cd9d3d6c575a344aec3733612d | 2a763d2b85dc3450b816a967f13202b15a752b7e | /Tv_Back/views/update.py | bc1358425aaaff8887f741d1b3ab24c6d9597225 | [] | no_license | phayusa/TV_Project | a46abcee6da3e2a8d208801a0c0bd13833adc5ae | 04cbd7ffdd2972fa476abfd94f31e5a52cd0e1a3 | refs/heads/master | 2021-08-16T07:04:49.490655 | 2017-09-05T12:42:00 | 2017-09-05T12:42:00 | 101,152,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,719 | py | update.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import io
import os
from django import http
from Tv_Back.models.category import Category
from Tv_Back.models.stream import Stream
from Tv_Back.models.type import Type
from Tv_Back.models.tag import Tag
def populate_db(request):
# if not request.us... |
f6faf746bda0d82d5981768e6779148b4d59d175 | 977b07190b6ee776eb091e0550e6594412467cac | /areas.py | 0e645d91d4eea98a49d736b0e16456c53aa5e853 | [] | no_license | DiegoAbrego/edai_practica9 | 041086b96159e86b7162439192a9cbdd063fc453 | dbb9a31aa836d20c96a05a4d29c42eca9b48f1c6 | refs/heads/master | 2022-04-23T20:29:50.907830 | 2020-04-27T05:47:18 | 2020-04-27T05:47:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,447 | py | areas.py | op=0
PI=3.1416
def menu ():
print("\nCalculadora de areas!!")
print("\nSeleccione la figura\n")
print("1.Triangulo\n2.Circulo\n3.Rectangulo\n4.Trapecio isoceles\n5.Salir")
def triangulo():
b=int(input("Ingresa la base del triangulo: "))
h=int(input("Ingresa la altura del triangulo: "))
... |
12dd2cd8294fd0953a055e835d948eaf44a84f73 | 75e664cd729e75b24fd9c39d97c1cdc8f73f1f6e | /Practica16_YorguinLayton/client.py | 348ded52e8e49ec4eab2e1f8386585fc5d0949e5 | [] | no_license | YorguinL/Processos_YorguinLayton | edc4c2cbd9bf6048744d2cf5d120d6cec9bd3bb4 | 3549c45690222bb59d1d899099e1c3fd990911b9 | refs/heads/master | 2020-08-04T13:00:34.162419 | 2020-04-22T17:11:22 | 2020-04-22T17:11:22 | 212,144,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | client.py |
import socket
from threading import Thread
import missatge
HOST = 'localhost' # The remote host
PORT = 50007 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
t_env = Thread(target=missatge.enviar_missatge, args=(s,))
t_reb = ... |
3c35de88549ef00b109b97a46eb8cf50c9d968c0 | 70e2999a6d7224b40d50ad599a71f9deaa209c39 | /spectra/Settings.py | 36e0fff6acf81e41959ffe9ada67b0c7e07fcf04 | [] | no_license | Gothwaite/Spectra | f14214b599a3d41c8ea902602742d01aaceeecc3 | 4eab7f6774650fc25ea79f8436a77332c5e5184a | refs/heads/master | 2020-06-18T23:48:10.521035 | 2016-11-28T03:23:18 | 2016-11-28T03:23:18 | 74,932,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,517 | py | Settings.py |
import pygame, sys, os
from pygame.locals import *
class Settings:
def __init__(self):
pathWork = os.getcwd()
pathImg = os.path.join(pathWork, os.path.join("images", "Settings.png"))
self.background = self.background = pygame.image.load(pathImg)
self.font = pygame.fo... |
371a5f78ba858da912ea5206841c8d7a9b20073d | 8a39451390742892d408dae8380e083c19f9f5b7 | /deepmark_chainer/utils/cache.py | 143415f40e7acb4acbaa9bcec2ed66ac328ebf74 | [
"MIT"
] | permissive | mingxiaoh/chainer-deepmark | c28803a5e2727d2dd2afa0221ce7892a87207f3c | 4da0a22e2974d40ae2e2d46fc620b9a6b14b42d3 | refs/heads/master | 2021-04-18T21:48:20.269736 | 2018-06-06T08:10:16 | 2018-06-06T08:10:16 | 126,441,187 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | cache.py | import os
import shutil
from chainer import cuda
def clear_cache(cache_level):
if cache_level == 'none':
cache_dir = cuda.cupy.cuda.compiler.get_cache_dir()
if os.path.exists(cache_dir):
shutil.rmtree(cache_dir)
if cache_level == 'none' or cache_level == 'disk':
cuda.cupy.... |
5cda9a5a2b435567e3d11e824ab10828591a9cde | d9026ea68fd227768b6329bfa88e3a7a167ff6b8 | /Model 1/END-TO-END Training.py | 1cf4bb9c2031ee4f7efa2edcf28147b686be2b7a | [] | no_license | seohyunchoi123/Fall-Down_Detection | 85a35227b4b5db9d014a5e31ae183bc35b134416 | 4cbfeb414cda780656041b06870eb4a83570a6a3 | refs/heads/master | 2020-03-26T15:49:36.138400 | 2018-12-31T01:54:50 | 2018-12-31T01:54:50 | 145,066,640 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,322 | py | END-TO-END Training.py | import cv2
from os import chdir
import os
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import imshow
from V2I import video2image
import datetime
from moviepy.editor import *
import pandas as pd
import datetime
import pickle
height = 128
width = 128
seq_len = 30
ms =... |
f383c9a6dbdfcb3ffdb7eb05573689da10b3daea | 4b1ae41ebf0c4b5dc7ad98230a8573b681c941aa | /ask_question/views.py | 531663e17a293e5484cadd74567f64a40c010187 | [] | no_license | talibhq/TakeRightRoad | f2f0947d33f7f6d7fbf9d5736382fb2de049d19c | 6c37fc1d63a8d2bcb3ec872ae2858329951f138b | refs/heads/master | 2022-12-10T13:22:27.272859 | 2020-08-22T13:27:24 | 2020-08-22T13:27:24 | 287,691,030 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,792 | py | views.py | from django.shortcuts import render, redirect, get_object_or_404
from django.views import View
from django.views.generic import ListView, DetailView
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Question, Answer
from .forms import QuestionForm
from django.utils.text import slugify
from d... |
d50dce35855fe502ddd10256798748303d2eccb7 | d1626536c867604efdb1b9b1d8305729f28233df | /tests/test_helpers.py | e2b628e13d8387f39cffece571907b8bbb95324d | [
"MIT"
] | permissive | Rafiot/followthemoney | 3fb056604ab672de1d9eea3330cd890af794c01e | 18dd0ec410e598f8766f300b1f820e484034920f | refs/heads/master | 2022-09-15T10:02:18.145766 | 2020-05-05T08:37:05 | 2020-05-05T08:37:05 | 259,663,871 | 1 | 0 | MIT | 2020-05-04T22:25:09 | 2020-04-28T14:41:07 | null | UTF-8 | Python | false | false | 3,113 | py | test_helpers.py | from unittest import TestCase
from followthemoney import model
from followthemoney.helpers import remove_checksums
from followthemoney.helpers import simplify_provenance
from followthemoney.helpers import entity_filename
from followthemoney.helpers import name_entity
class HelpersTestCase(TestCase):
def test_re... |
fb7f8442d2e7fa934e9769bdb2ab34655345ce0a | 844056469c33a0bbfd48c7a616cd36f787debf8a | /05 linux系统编程/7 Process的子类.py | fe54137264d285d4bed4b1d35c6f470206bed100 | [] | no_license | cwang-armani/learn-python | 4367c72c1dfc197c081e0834eeba754542458341 | 01282ce48ddb014999ffd10284bb9a44cd0fd1e2 | refs/heads/master | 2020-03-09T06:47:26.571163 | 2018-04-09T00:55:12 | 2018-04-09T00:55:12 | 128,648,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | 7 Process的子类.py | from multiprocessing import Process
import time
import random
class My_new_process(Process):
def __init__(self):
super(My_new_process, self).__init__()
def run(self):
print("---1---")
time.sleep(2)
def main():
i=1
while i<=5:
p = My_new_process()
# start方法在My_new_procee的父类Proces... |
862e52543e70ff7553597c02470df246c6eb262c | 075db4a3e14074d84a34ec5aa3337450c425033b | /apps/admin_panel/forms/account.py | 880927e68abd51bbbd42c6528a45e5860cd47aa5 | [] | no_license | ArtemMint/MyHome24 | 81390adb786018cbc4b7a0dbd7d99ec28523f66c | 8bae913a1aebeb42e5b699f769869ee805eea1e5 | refs/heads/main | 2023-06-12T07:31:52.833235 | 2021-07-09T08:14:29 | 2021-07-09T08:14:29 | 347,409,970 | 0 | 0 | null | 2021-07-09T08:14:30 | 2021-03-13T15:42:27 | CSS | UTF-8 | Python | false | false | 3,358 | py | account.py | from django import forms
import django_filters
from admin_panel import models
from register import models as register_models
class AccountForm(forms.ModelForm):
prefix = 'account'
flat = forms.ModelChoiceField(
widget=forms.Select(
attrs={
'class': 'form-control',
... |
3cca55209e56a69d3a4bf3c5ba567b438934c20e | 034820328576a1e22304f96660b5f7bfc4d0cca4 | /final_code.py | e90442aa0596c05cda9504c48fde2065303c5289 | [] | no_license | hee98/Twitter | 58410d71d0033d28804d87adae521cd464d0f5d2 | 12b94b827da947f28f57ba926df0676ad4962f9f | refs/heads/master | 2020-05-29T15:18:39.760007 | 2015-06-15T10:12:19 | 2015-06-15T10:12:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,946 | py | final_code.py | import twitter
import json
import pandas as pd
import numpy as np
import csv
import re
import scipy
import math
import matplotlib
#matplotlib.use("qt4agg")
from matplotlib import pylab
from pylab import *
from matplotlib import pyplot as plt
import os
os.environ['NLTK_DATA']='C:\Users\Indraneel\AppData\Roaming'
from nl... |
60efd85fb44613d7a4ef7a0b5c53b3f810595efc | 54e7faaae4024716c10e6b71b1d9880e3f535aa7 | /Piazza/FindDuplicates.py | b219c91e3da07db0ae524fd7791e83040b5e5057 | [] | no_license | arnoldvaz27/PythonAssignments | e19a9dd98cedad1a185f636a2058dcacdb7a3ff9 | e2fcf5c45393301bba42b1bcbf28e2e3c978842f | refs/heads/master | 2023-08-27T02:08:29.149641 | 2021-10-24T08:39:15 | 2021-10-24T08:39:15 | 402,826,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | FindDuplicates.py | """
Question -
Find the duplicates in a List.
Example:
Input: [1,2,2,5,5,6]
Output: 2 5
"""
# Code -
givenList = [1, 2, 2, 5, 5, 6]
|
a9cffa704265819d630bcfb9356ca2c3d3f3ac96 | 1eef6887714889b345faef9a558b0ddb2d0ae0cd | /templateEnumMessageApp/const.py | d20e97bb8102e003c6f4a634d73c14cdbb6edafc | [] | no_license | rick-liyue-huang/Django-First-App | 798bf5e65d23899f5e8017833292df870a02a8c3 | 3cb3252be984f10462c5c932c7c4d5eb2248fea7 | refs/heads/master | 2022-10-16T00:50:16.516652 | 2020-06-05T06:10:20 | 2020-06-05T06:10:20 | 264,623,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | const.py |
#coding: utf-8
# 定义枚举类型
from enum import Enum
class MessageType(Enum):
info = 'info'
warning = 'warning'
error = 'error'
danger = 'danger'
MessageType.info.label = 'normal information'
MessageType.warning.label = 'warning information'
MessageType.error.label = 'error information'
MessageType.danger.label = ... |
92412367193300bebacf32a9d221d6b02ca735db | 12352b11a306b7c08dd1bc709e723bed3e73cd03 | /backend/connectiondb.py | 3426219242f38f864858a25dc4cfafa17a1533fe | [] | no_license | NicolasRuiz99/tp10-nsql | f060755618b77d5f2392c97e1766927081f22dda | f8c1a901d01c21f5aba83774977664011975d453 | refs/heads/master | 2023-02-14T04:41:18.665517 | 2020-06-18T16:02:39 | 2020-06-18T16:02:39 | 270,910,084 | 0 | 0 | null | 2021-01-06T04:25:16 | 2020-06-09T05:21:14 | JavaScript | UTF-8 | Python | false | false | 8,970 | py | connectiondb.py | from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair,CryptoKeypair
import json
bdb = BigchainDB('https://test.ipdb.io')
def crear_usuarios():
users = []
users.append (generate_keypair())
users.append (generate_keypair())
users.append (generate_keypair())
u... |
5a05adb9267a6a5bbe3118cecfee1a3fad43d6e4 | 029aec7d38fdfc2ab00ef19820d8b071e28fba4a | /Lesson 1 task 1.py | 9b3c9c02bc30564061b38827e85ab21c1e1499fc | [] | no_license | Dary85/InternetDataCollecting | 545e7106565c5023c5ec437538cab8c5d713b8a6 | 596d1c27badea00e9022568d98e6cf3bc47f0d44 | refs/heads/master | 2023-01-10T12:05:30.149235 | 2020-11-11T18:25:10 | 2020-11-11T18:25:10 | 291,506,623 | 0 | 0 | null | 2020-11-11T18:25:11 | 2020-08-30T16:19:30 | Python | UTF-8 | Python | false | false | 455 | py | Lesson 1 task 1.py | import requests
import json
username = input('Enter username: ')
params = {'type': 'all'}
url = 'https://api.github.com/users/' + username + '/repos'
responce = requests.get(url, params)
if responce.ok:
j_data = responce.json()
with open('json_github.txt', 'w') as f:
json.dump(j_data, f, ensure_as... |
a30899f3cb92872db67ad68d76b4d7d7f3b28e89 | 4a4789868e7a7cf62cf857513ea6db12a5e79bd9 | /deeprl/envs/CustomEnv.py | 14be5f5ade251951b7e5e1e41f7da6a85a314434 | [] | no_license | lephamtuyen/bicycle | f9f2a08b2d809a6e19aca29acff433582823d0b3 | 1a0b7becc6f3383a629e471d29987bc1a207a7b0 | refs/heads/master | 2020-04-11T20:03:33.826213 | 2018-12-17T05:16:11 | 2018-12-17T05:16:11 | 162,058,067 | 2 | 1 | null | 2018-12-31T07:10:17 | 2018-12-17T01:25:14 | Python | UTF-8 | Python | false | false | 229 | py | CustomEnv.py | class CustomEnv(object):
def __init__(self):
self.goal = 0
def reset(self):
raise NotImplementedError("Not implemented")
def step(self, action):
raise NotImplementedError("Not implemented")
|
421fff10a87f7dfeca0cdf6a74dd6a834280aea9 | 9b5fe9ec46b6715e118a003da92989688e0429f3 | /MIT Python/p1-3/set1_2.py | 688ba0ac7f987b85ead34d210a2ad1cab45daa9b | [] | no_license | dreedgibson/Projects | a8057828594b93e8ff8ad39d5363bf331096ae07 | 07b932b8b5ca4d5b3f3fbfddb63bedb523ce59f8 | refs/heads/master | 2021-01-11T22:00:33.854325 | 2017-03-27T22:24:51 | 2017-03-27T22:24:51 | 78,891,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py | set1_2.py | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 4 19:13:42 2016
@author: Dennis
"""
print("Please enter a string: ");
s = input()
count = 0
for i in range(0 , len(s)):
if i + 2 > len(s):
break;
if (s[i] == 'b' and s[i+1] == 'o' and s[i+2] == 'b'):
count += 1;
print ('Number of times bob oc... |
ac84f58a7a55fb8fa625c7de19f55d5ac6c3d211 | b4fdd022b45751cfaf2a8770152bf7ca6aeb2b9a | /putcall/formulas/interest_rate_options/replication_optionpricing.py | 787a5df69ee653d19feebfa01134f58f1dd68a6b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fagan2888/putcall | 7547727b48e52f8a5ef325f02952778a93d8acb4 | a5984b52cb7bae33cfd48490439acea4844af0f9 | refs/heads/master | 2021-03-16T21:22:16.024168 | 2019-09-18T13:03:41 | 2019-09-18T13:03:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,150 | py | replication_optionpricing.py | # -*- coding: utf-8 -*-
# putcall
# -------
# Collection of classical option pricing formulas.
#
# Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk]
# Version: 0.2, copyright Wednesday, 18 September 2019
# Website: https://github.com/sonntagsgesicht/putcall
# License: Apache License 2.0 (see... |
fd250b1c63c7e3199fa5edb10e69535000681e04 | c018f17d6df50bb8bc7c2c50f5727ccee3d8b956 | /KMeans.py | c721b2f5c8d4fc201c372b9bdf9901b2ef59e4cf | [] | no_license | meghnasinghal/Recommendation_System | b24c57eb5900498bf7b182ea7ec45c8eb1f01082 | 82a95237f9c558d0561b3349d5fc205bb9690186 | refs/heads/main | 2023-02-03T13:37:29.905966 | 2020-12-23T07:01:13 | 2020-12-23T07:01:13 | 314,930,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,718 | py | KMeans.py | import pandas as pd
import numpy as np
from pyspark.sql import SparkSession
from pyspark.sql.functions import col
from pyspark.sql.types import StructType, StructField, NumericType
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.evaluation import ClusteringEvaluator
from pyspark.ml.clustering import KMe... |
960485d7be878dbb4ec68816703c6d5e10c28673 | a1b350000ed120314cff2bfd1606f468c735733a | /models/SASRec/DataInput_SASRec.py | 89e5b906b7461e29540fa2d2e84de743f8569a70 | [] | no_license | yujing-chen/Sequential_Recommendation_Tensorflow | ecaf73287d1a624c74c9821920bc082e3368688a | f06053cd7a0bfb101872cf9f91885edea1fe50df | refs/heads/master | 2023-05-06T11:33:51.226401 | 2021-05-29T03:56:08 | 2021-05-29T03:56:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,667 | py | DataInput_SASRec.py | import pandas as pd
import random
import pickle
from tqdm import tqdm
from make_datasets import make_datasets
# trainIterator = DataIterator('train',d_train, batch_size, neg_sample,
# all_items, items_usr_clicked, shuffle=True)
class DataIterator:
def __init__(self,
... |
c0242594510e6381f1a1b6a91af000bab043ea69 | 94a3aceaaa8b3887e638fa3979de6b511a311a1b | /web_data/BTCPRICE.py | e07e0a278a35ae4fe407732813fdd01c4a850ea6 | [] | no_license | PSG1995/psg_1 | ace8e4084f06709df4a7896dfac68f63ea0d32d8 | 03775763e8641a8a3296824c31093e74919de633 | refs/heads/main | 2023-08-01T07:01:21.702099 | 2021-09-23T05:47:59 | 2021-09-23T05:47:59 | 402,606,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | py | BTCPRICE.py | from urllib.request import Request, urlopen
from bs4 import BeautifulSoup
url = "https://upbit.com/exchange?code=CRIX.UPBIT.KRW-BTC"
req = Request('url', headers={'User-Agent':'Mozilla/5.0'})
webpage = urlopen(req).read()
print(url) |
7a85f818d959cf1f0971fc11b115859c5338b2a7 | 5c47ef229de9666d617f2eb4b8cc5867f056a4aa | /preprocessing.py | 3a7550a78f64e6eceb150c4b44e0e13fb2764892 | [] | no_license | codewithzichao/Multimodal-Transformers | 69d7ecf0e67090a321d96439707e04b24c7214ea | e57a1851c75f2a208a87155f00333cb71d392ba5 | refs/heads/main | 2023-02-25T08:17:54.261742 | 2021-01-30T15:59:08 | 2021-01-30T15:59:08 | 331,902,082 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,842 | py | preprocessing.py | import os
import numpy as np
import pandas as pd
import codecs
from PIL import Image
import json
import re
from collections import defaultdict
from torchvision.transforms import transforms
# 去除emoji
def demoji(text):
emoji_pattern = re.compile("["
u"\U0001F600-\U0001F64F" # emoticon... |
873fe8f5471058bdca69a838b3781e0727c52b2f | ef7eabdd5f9573050ef11d8c68055ab6cdb5da44 | /topCoder/srms/500s/srm540/div2/random_color_div_2.py | f20ff200495510ceb199e87c33b13b8c1dbc5dfe | [
"WTFPL"
] | permissive | gauravsingh58/algo | cdbf68e28019ba7c3e4832e373d32c71902c9c0d | 397859a53429e7a585e5f6964ad24146c6261326 | refs/heads/master | 2022-12-28T01:08:32.333111 | 2020-09-30T19:37:53 | 2020-09-30T19:37:53 | 300,037,652 | 1 | 1 | WTFPL | 2020-10-15T09:26:32 | 2020-09-30T19:29:29 | Java | UTF-8 | Python | false | false | 324 | py | random_color_div_2.py | class RandomColoringDiv2:
def getCount(self, maxR, maxG, maxB, startR, startG, startB, d1, d2):
c = 0
for r in xrange(maxR):
for g in xrange(maxG):
for b in xrange(maxB):
c += (d1 <= max(abs(r-startR), abs(g-startG), abs(b-startB)) <= d2)
retur... |
d8d246ae8a1b7a0391ff8ca81b9c078517622e43 | c45eeefe4b686d70a3bd57e1d4ad1af473654418 | /main3.py | b9d66c3c90045448da86745cb3019c56a94f8038 | [] | no_license | davidkah/checkpiont | ee636a1163c202cf6bad50b07440dd4b91dea372 | d604abd89cb530b3f44ed2b16e9c15104b9450e5 | refs/heads/master | 2023-07-28T04:49:26.003404 | 2021-09-11T10:37:02 | 2021-09-11T10:37:02 | 402,992,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | main3.py | nbre= int(input("entre un nombre: "))
nbre1=1
for i in range(nbre+1):
nbre1=i*i
i+=1
dict={(i-1):nbre1}
print(dict)
|
cc5f84359206b8b38f95f0c979cae0489b91b5c6 | 08ecb423d76e6cb4ead41d8650b22935afdeb844 | /bikeshare.py | 5b49f16e3a48b8d3ffaefa289d5e703160f2be44 | [] | no_license | sitongli78/pdsnd_github | 890c0a9413ac9cab22401d941dfe8142038162e6 | 029088199d4ee4eab43d264d84e5f83cb2e18332 | refs/heads/master | 2020-05-07T21:22:55.162373 | 2019-04-12T02:15:08 | 2019-04-12T02:15:08 | 180,902,321 | 0 | 0 | null | 2019-04-12T00:55:52 | 2019-04-12T00:55:52 | null | UTF-8 | Python | false | false | 7,287 | py | bikeshare.py | import time
import pandas as pd
import numpy as np
CITY_DATA = { 'chicago': 'chicago.csv',
'new york city': 'new_york_city.csv',
'washington': 'washington.csv' }
def get_filters():
"""
Asks user to specify a city, month, and day to analyze.
Returns:
(str) city - name o... |
04b729acb58c6e2fdb698757f47221c89413e228 | c72e3e22c45de641952f3ec5bb25ce12446c1ff6 | /mkstr/param_jit_call.py | 201a315c1833f0860017e30f289b295f7b57c7b4 | [] | no_license | mason-/cmpimpl | 2fb1c788479c16f1ce46e77a78132b683f3e4518 | 42607f70af5bc51d3f99f5b4fa530de1cd391fa9 | refs/heads/master | 2021-01-25T08:49:15.835629 | 2012-11-17T10:02:12 | 2012-11-17T10:02:12 | 3,890,424 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 343 | py | param_jit_call.py | from jit import *
codes = [
0x6a, 0x41, # push 65
0xff, 0x54, 0x24, 0x08, # call [esp+8]
0x83, 0xc4, 0x04, # add esp, 4
0xc3, # ret
]
p = VirtualAlloc(0, len(codes), MEM_COMMIT, PAGE_EXECUTE_READWRITE)
p[:] = codes
CFUNCTYPE(c_void_p)(getaddr(p))(putchar)
VirtualF... |
488c675c7ba9f0183aa5455b72509991740e732e | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2968/60765/289223.py | befccdf08a2531ad17a2d3a094d748f10d285fca | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | 289223.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import math
import sys
import re
import collections
def solve():
def reverse(s):
l=list(s)
l.reverse()
return ''.join(l)
# =list(map(int,input().split()))
# =int(input())
# n =input()[2:-2].split('],[')
# target=int(input())
... |
e39288f2a17afa5e9ce9079603b67c8eb4c65717 | 66fb86b051f8bf84eebd3a36c88844af5478f828 | /Extras/content_based_collaborative_filtering.py | 15ee70c2f71541e140ec9f6ea4fa43a01e9b4af2 | [] | no_license | annusingh100995/Data_Analysis | e4dc57660d721b065baab3b63ede95fc25155807 | b9f479c912df43526a1efba1b5c308cfd84b74e8 | refs/heads/master | 2021-07-11T22:31:42.455015 | 2020-09-15T07:41:15 | 2020-09-15T07:41:15 | 198,300,103 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,136 | py | content_based_collaborative_filtering.py | # https://blog.cambridgespark.com/tutorial-practical-introduction-to-recommender-systems-dbe22848392b
# https://www.analyticsvidhya.com/blog/2018/06/comprehensive-guide-recommendation-engine-python/
""" Implementing a simple recommender system. This analysis is only to find the movies which are similarto certain other... |
2848b2e302568e511115add0abd243a3730dac13 | 9cbaffe7fe37a0f911c657f5e9dac8dc0ac0c1d1 | /백준 단계별로 풀어보기/01. 입출력과 사칙연산/BOJ_2588.py | 5ebd3eb54447f29ce4c52054a4059dfd2f3d7fe8 | [] | no_license | yookyungkho/Algorithm_Baekjoon | 841aeba9f59230ab7a4696ce1004fd84fc662775 | 5fbd4b4190c14b72b626c2705cb6ece77512cdae | refs/heads/master | 2023-03-03T06:05:38.217387 | 2021-02-03T21:29:53 | 2021-02-03T21:29:53 | 290,250,922 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | BOJ_2588.py | A = input()
B = input()
def multiple(a, b):
an_3 = int(a) * int(b[2])
print(an_3)
an_4 = int(a) * int(b[1])
print(an_4)
an_5 = int(a) * int(b[0])
print(an_5)
print(an_3+an_4*10+an_5*100)
multiple(A, B)
|
4edbbeb8380c904f43303a192078cdd4738a74cb | eb3fb1997a8e5028f35dabce69ca4f7664bd1629 | /section15-RW-JSON/main.py | af53bbf74a04d0224d03c04c2d4a0b1e19d7b54a | [] | no_license | bit-git/docker_devcor | ccefcd2d25dd17cfdee97f8cdf4167db726f2592 | b98c825001da97abb0b7eed00f20dab692a1688d | refs/heads/main | 2023-01-29T04:46:32.586649 | 2020-12-11T22:58:01 | 2020-12-11T22:58:01 | 320,686,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,408 | py | main.py | from util import read_devices_info
from util import print_device_info
from util import write_devices_info
#====================================================================
# Main program: connect to device, show interface, display
devices_list = read_devices_info('json-devices') # read JSON info for all devices
... |
eb1ff2f42d0db8a1adfacc2fc72680939b729140 | 4b90b875bc8c6ed33b8257886e74e0a77eca59a0 | /src/simul/util/queue.py | 5aa6973b75d7a942b0b46a8dc6a831c1696b423d | [] | no_license | mfkiwl/hpcgra | 4cdca7abdee27dcb16d51a57024ce81eeedd543e | 41d4cc5b6dccdc02136d5d39dd367333d81e85e5 | refs/heads/master | 2023-04-13T20:23:03.303205 | 2021-03-28T02:34:41 | 2021-03-28T02:34:41 | 352,275,673 | 0 | 1 | null | 2021-03-28T08:16:05 | 2021-03-28T08:16:05 | null | UTF-8 | Python | false | false | 755 | py | queue.py | # TODO DESCRIPTION AND COMMENTS
# TODO TO_STRING
class Queue:
def __init__(self):
self.__queue_content = []
def clear(self):
self.__queue_content = []
def get_peek(self):
if self.get_size() > 0:
return self.__queue_content[0]
else:
raise Exception("... |
4de0e128393e582c822689ae00d82ce053fa09e0 | c24dba016f8d559b6d4b2532c5e92a215d81e5ed | /CCF_code/astrometry_dataframe.py | 835a08abb8a09065f79f838c0ab7428771632d3a | [] | no_license | digirak/PhD | 3b07dc386eb974e670012fd18ae1249162cac216 | 4a4c7fe696237bd8b2042bb8fdcbcfd293213a7f | refs/heads/master | 2022-05-06T09:56:18.461720 | 2022-04-02T08:37:55 | 2022-04-02T08:37:55 | 215,135,978 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,432 | py | astrometry_dataframe.py | from matplotlib import pyplot as plt
from CCFcore._utils import find_nearest
import numpy as np
import glob
from vip_hci.fits import open_fits, write_fits
from scipy.signal import convolve2d
import pandas as pd
from astropy.table import Table
import glob
from vip_hci.fits import open_fits, write_fits
from vip_hci.var.s... |
6e9d8f079a7dfe18af9c2829f303683613b3415d | 01baaf39db42475425622bbb5c2999481521aabe | /Compile-Server/usr/local/bin/DeleteService.py | 6c138f5e39a7b2e224948080fc3212c81229cf18 | [] | no_license | sahil-rao/deployment-sahil | f7524dc6c377b670961ee604f8fd869e6a8cffd0 | 0d590f173dd0caf4a5fe19be1b0cd0f94b56e8a7 | refs/heads/master | 2022-05-03T03:50:35.471419 | 2017-07-05T22:55:24 | 2017-07-05T22:55:24 | 96,364,012 | 1 | 0 | null | 2021-09-23T23:23:10 | 2017-07-05T21:49:29 | Python | UTF-8 | Python | false | false | 7,168 | py | DeleteService.py | #!/usr/bin/python
"""
Parse the Hadoop logs from the given path and populate flightpath
Usage : FPProcessing.py <tenant> <log Directory>
"""
#from flightpath.parsing.hadoop.HadoopConnector import *
from flightpath import cluster_config
from flightpath.services.RabbitMQConnectionManager import *
from flightpath.service... |
e818ec395dcfb7de208708be35a6066e4e412998 | f0c37a0af943ba19ad98c3292959de5a4d128fd4 | /BasicCode/mouse2.py | c11667df68d973ba75f789d242b572bb3b794a5c | [] | no_license | CoderLeechou/PyOpenCV | 23c445ebd8dbc41a5dff2f758c784ce2de894bdf | 1bc751be18fbbeb34457f60131cd3dc0b509ac8b | refs/heads/master | 2021-01-02T22:19:36.373760 | 2017-08-06T00:16:07 | 2017-08-06T00:16:07 | 99,317,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,572 | py | mouse2.py | #-*- coding:UTF-8 -*-
import numpy as np
import cv2
#当鼠标按下时变为true
drawing=False
#如果mode为true绘制矩形。按下'm'变成绘制曲线
mode=True
ix,iy=-1,-1
#创建回调函数
def draw_circle(event,x,y,flags,param):
global ix,iy,mode,drawing
#当按下左键时返回起始坐标位置
if event==cv2.EVENT_LBUTTONDBLCLK:
drawing=True
ix,iy... |
c89af1865a0a520f51a7f101fd5fff611ed86614 | c384c1f8062f01a6a343e4aad7fcd231a906dbf5 | /Circular 2.py | a0735bd883bff0a519dc6964387f3c02f7e8389e | [] | no_license | RawitSHIE/Algorithms-Training-Python | b9bf95ccc7b3974de78f290492d646679d05ae4b | 02ba71f88d18e48b35046564fe6f61911db31ac4 | refs/heads/master | 2021-03-24T12:34:02.101117 | 2017-12-10T14:15:40 | 2017-12-10T14:15:40 | 109,127,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 434 | py | Circular 2.py | """
pair programming : Circular2
name : Rawit & Pair
Date : 1 / 9 / 2560
"""
def main():
"""radius"""
per_x = float(input())
per_y = float(input())
per_r = float(input())
mos_x = float(input())
mos_y = float(input())
mos_r = float(input())
dis = ((per_x-mos_x)**2+(per_y-mos_y... |
06cfbddd33fcf679fb9cee8ae213df2fbc66c551 | 0fb0592230d71d695e7f4cae00e0e3366b2057b3 | /Baekjoon/5th_week/1152.py | 6a820e7057d6008776b3b7f4c09224178d56dcb0 | [] | no_license | ririro93/algorithm_probs | 715efc88be354dcfc7576289716f937f3aeb8afd | 47a63e68e1a4a126d0de1831fcbff600223d8055 | refs/heads/master | 2023-06-20T03:52:01.582443 | 2021-07-21T14:43:24 | 2021-07-21T14:43:24 | 237,443,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | 1152.py | from sys import stdin
# stdin = open('input.txt', 'r')
input = stdin.readline
S = input().strip()
cnt = S.count(' ')
if cnt:
print(cnt+1)
else:
for s in S:
if s != ' ':
print(1)
break
else:
print(0) |
47d7d71ab9225cdbfcbfb027d500b7fd3000e7f4 | 4e310adb6a013c9e825703c0f3080ee6f4dc3325 | /examples/boss/cutout_ex.py | 450e1f0fd6932fc5d2b33b334bd15e29708992b6 | [
"Apache-2.0"
] | permissive | jhuapl-boss/intern | 69fef34a4eb08c52772c584e5eb9b7de89d8c6fa | b90e209c531b76573175e373c3d92d723729bf10 | refs/heads/master | 2023-07-06T15:13:29.887680 | 2023-06-23T14:59:52 | 2023-06-23T14:59:52 | 72,216,526 | 18 | 23 | Apache-2.0 | 2023-06-23T14:59:54 | 2016-10-28T14:53:58 | Python | UTF-8 | Python | false | false | 3,858 | py | cutout_ex.py | # Copyright 2016 The Johns Hopkins University Applied Physics Laboratory
#
# 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... |
08f0e547c552ebdf54e70178d01076aecddfbf1d | 7ac3a4b005ae29b6a118a2852fc3356535929b8b | /Predictor/utils.py | acc1c2e06ea05a1715b254d4e26a3cfec09e3f22 | [] | no_license | rnaimehaom/De-Novo-Drug-Design | 2f68632af7abc6ec6f7c8bb387ca538c1ae52f4f | acd4305c5dfc91a918ff00239c4fd6b1392d1828 | refs/heads/main | 2023-04-09T06:41:14.658956 | 2021-04-22T13:01:08 | 2021-04-22T13:01:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,362 | py | utils.py | # -*- coding: utf-8 -*-
import csv
import numpy as np
import math
import random
import json
from sklearn.model_selection import KFold
import matplotlib.pyplot as plt
from bunch import Bunch
import time
import os
from rdkit import Chem
from rdkit.Chem.Scaffolds import MurckoScaffold
from rdkit.Chem import A... |
0b713c0a63f036411b1b446d09a4d19b6ce3fead | dbe8b98483ee1f9dca64ccd1a2ed9c95fc92ddb1 | /Detalle de Clases.py | 6dd9800adf6f5a41b0fa19b3712d24d0b069f350 | [] | no_license | ggroces/curso_pythonDataDeveloper_misEjercicios | d7402545019199a61c23239b41a57ff1f706f07b | 5720d053dac2f4859f46c4980aaf23d99f67e536 | refs/heads/main | 2023-08-04T09:32:39.317887 | 2021-09-25T17:56:21 | 2021-09-25T17:56:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,347 | py | Detalle de Clases.py | #Detalle de Clases
#-------------
#-- Clase 1:
#-------------
#Manejo de archivos
#FOR
#STRIP
#SPLIT (separa el texto por el carácter pasado por parámetro)
#Encoding
#print
#Leer archivo, generar otro de salida, alterando los campos
#-------------
#-- Clase 2:
#-------------
#Normalización de datos
#modulo datetime ... |
26b6d57a33bceca19ed8c38906378366547b0d8e | 8f5642b80596b5783b878ac08900f5df3ba26a84 | /src/main/python/GeoCount3.py | 1a423372fbf7d4d862e0b356ef4120257a92c8d0 | [
"Apache-2.0"
] | permissive | ahmadsaleh009/hdfs-geohex | d0fc1ad7a7f410a0bb3a02b89994736e103ee5fe | 3394e1b5e46315055308040e9f407430022ea865 | refs/heads/master | 2020-07-27T05:00:20.275100 | 2016-02-09T11:40:13 | 2016-02-09T11:40:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 915 | py | GeoCount3.py | #
# Spark job to bin data in WebMercator Spatial Reference
# The bin is a hexagon with a width of 100 meters
#
from pyspark import SparkContext
from hexgrid import HexGrid
from mercator import Mercator
def line_to_row_col(line, hg):
splits = line.split(',')
try:
lon = float(splits[10])
lat = ... |
5e8310ccfe5073ffb68e3e5f16209624e0dbced2 | 4b14d4a0d3269bf27ec5222adf691a8877fba884 | /setpro.py | 2b21c0f33a2d553e798bd99d4eec234835224661 | [] | no_license | Subheiksha/first-repository | 0a4e08c94e99583ecb9c11a8e627c9592286125e | a9dde4b77a4bd92f7855723c9b5ae797923369ac | refs/heads/master | 2020-05-17T23:47:42.737355 | 2019-08-13T14:30:39 | 2019-08-13T14:30:39 | 184,042,838 | 0 | 4 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | setpro.py | import sys,string,math
h,i,j=input().split()
h,i,j=int(h),int(i),int(j)
if h==224:
print('YES')
sys.exit()
if h%(i+j)==0:
print("YES")
else:
print("NO")
|
3d22c4b8504c33927a07c276b956d14ed7b32195 | 68f7207feb8cb211015e7e2a76e41b2253298c4d | /retweet/views.py | c37a4c322e4e5c6c3e55041406462b49f6b5c4ad | [] | no_license | mrtorres25/twitter25 | eb3ae65dd005488e3defd343739bf2fd66d13458 | 93f8a8b41686c089af9499493acb4b96ed8f329d | refs/heads/master | 2021-01-11T22:47:22.524584 | 2020-07-17T07:20:35 | 2020-07-17T07:20:35 | 79,034,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,427 | py | views.py | from django.shortcuts import render
from django.conf import settings
from django.contrib.auth.decorators import login_required
from tweepy import API
from tweepy import OAuthHandler
import requests as r
import json
@login_required(login_url='/login/')
def tweet_list(request):
print("AQUI")
return render(reques... |
ce00a63e53ce72ea94ecf7e7f31918c309feff41 | da7149f3182d2421e046828d30fc1c91c14d496d | /chapter14/accu_test.py | 22166f10d89795987b123d032fcc51ea0051877c | [] | no_license | tangkaiyang/fluent_python | 6db2825cfadccb70a886cb822026d69be4b03cc9 | 5f07072d8db5ddf43bfe913b3262b325a8f1ad35 | refs/heads/master | 2020-05-02T20:21:00.404872 | 2019-04-18T02:35:55 | 2019-04-18T02:35:55 | 178,188,495 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,076 | py | accu_test.py | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2019/4/11 16:13
# @Author : tangky
# @Site :
# @File : accu_test.py
# @Software : PyCharm
# 示例14-15 演示了itertools.accumulate生成器函数
# sample = [5, 4, 2, 8, 7, 6, 3, 0, 9, 1]
# import itertools
#
# print(list(itertools.accumulate(sample)))
# print(li... |
01f2f9e654c0268d8186aae6ddf5735d6c0a9236 | d68136288c07bb326b59ea6c77deaff05f0f3843 | /strings&casting.py | 4e12a36fe0c7b4fc90f8bacab59f46bfb0184f62 | [] | no_license | isobelfc/eng84_python_data_types_operators | 3f6b3be028ea7f9aeb1b8dc01d3f61b44cc5691c | b804938b8caa119d75802f7f11a1f2062eedcb82 | refs/heads/main | 2023-03-26T10:53:42.355046 | 2021-03-23T11:23:04 | 2021-03-23T11:23:04 | 350,666,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,440 | py | strings&casting.py | # Strings and Casting
# Let's have a look at some industry practices
# Single and double quotes examples
# single_quotes = 'single quotes \'Wow\''
# double_quotes = "double quotes 'Wow'"
# print(single_quotes)
# print(double_quotes)
# String slicing
greetings = "Hello world!" # string
# indexing in Python starts f... |
21c56ba0b5d965b8662ae00e9f999a4c314926f1 | dd4622390bb7122db37a889e647f28004a265ccd | /1806101049马原涛/deepLearn/NeuralNetworkAndFullConnection/page_2_1.py | 596554dd796eaa6cabc9d8bc8221cb0c511f982e | [] | no_license | gschen/where2go-python-test | c8adaa095aa8a095401f98c7b3f8f17c72d0532d | eb9e6011b8d33fa45a6b1ef853affd01a296db21 | refs/heads/master | 2022-12-13T19:45:09.874691 | 2020-10-15T13:12:52 | 2020-10-15T13:12:52 | 211,591,156 | 4 | 1 | null | 2022-12-05T07:46:12 | 2019-09-29T02:35:00 | Python | UTF-8 | Python | false | false | 559 | py | page_2_1.py | #test
import tensorflow as tf
x=tf.random.normal([4,784])
model=tf.keras.Sequential([
tf.keras.layers.Dense(512,activation='relu'),
tf.keras.layers.Dense(256,activation='relu'),
tf.keras.layers.Dense(128,activation='relu'),
tf.keras.layers.Dense(10),
])
model.build(input_shape=[None,784])#输入的shape
m... |
39b8b13f6e265eff23c57b404c39df99392804a9 | bc7c3d817723abf39585d71e5770e6d118ef883e | /c4_divide_conquer/strassen.py | 6ca52bd96ab46704c8a391603af10e6ed1b528a4 | [] | no_license | YQ-7/IntroductionToAlgorithms | b38dd1c965197de09b522452a4582771f2d13ff6 | b665f8f5fdb933a7472955f26111d445329a0821 | refs/heads/master | 2020-04-05T17:14:09.289534 | 2020-03-26T05:49:08 | 2020-03-26T05:50:01 | 157,050,625 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,899 | py | strassen.py | # -*- coding: utf-8 -*-
"""
strassen算法求解两矩阵乘积
时间复制度:Θ(n^lg7)
"""
import unittest
def matrix_add(a, b):
return [[a[i][j] + b[i][j]
for j in range(len(a[i]))]
for i in range(len(a))]
def matrix_minus(a, b):
return [[a[i][j] - b[i][j]
for j in range(len(a[i]))]
... |
4781b70b5e658b982f86c4f3fefeb0a502fe2ab6 | 60a8aefbe8a0cba98bb72ca3d3b51e55a1b71e37 | /graph_traversal.py | 295a175fdfeb5d68cc92af0bc16e6b1ad430fa76 | [] | no_license | hardeek100/Python-Scripts | a929a0b8bea065e46f19c1ae712c9313d67e74ed | 3b7d8c7a48e542e5e2e4324e18e5e8865737f60e | refs/heads/master | 2023-01-23T12:21:58.548877 | 2020-11-22T18:42:04 | 2020-11-22T18:42:04 | 270,713,545 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | graph_traversal.py | # Graph traversal
def view_adjacencyMatrix(mat):
print("Adjacency Matrix: ")
for i in mat:
print(i)
def graph(mat):
vertices = []
edges = []
weights = {}
for i in range(len(mat)):
vertices.append(mat[0][i])
for j in range(i, len(mat)):
if type(mat[j][i])... |
776f560fb9baa5de3f4783e15210dfb0bb0b2a25 | 70670a7fecbc053c323f4368d8cda8383bf4cae7 | /backup/DG_rotation_trainer.py | ade7135945d3bfcb0a42c0c60de02f1d95256b35 | [] | no_license | YujunLiao/CV202009 | a23d9cb973869eee062ccc0b3551521e5a4a543e | a4b5cc20aa9790e58810e89125547ccbeebbc8ec | refs/heads/master | 2023-01-20T12:05:06.210596 | 2020-11-27T02:31:51 | 2020-11-27T02:31:51 | 298,990,825 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,979 | py | DG_rotation_trainer.py |
# Complex input should be an entity of class.
# Name of method in a class should contain an obvious verbal, like get_something().
# set attribute within __init__(self) function.
# 每天学一点,每天改一点
import sys
import os
import torch
from torch import nn
from torch.nn import functional as F
from time import time, strftime, ... |
21bc6ecaca89a962b6c47a14a1809fc53cb6ae5e | ed90fcbfd1112545fa742e07131159bb3a68246a | /smry/server-auth/ls/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/firewall_rules/list.py | 8d62e0bafc6eecf56466830a10565be1b2193749 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | wemanuel/smry | 2588f2a2a7b7639ebb6f60b9dc2833f1b4dee563 | b7f676ab7bd494d71dbb5bda1d6a9094dfaedc0a | refs/heads/master | 2021-01-10T21:56:55.226753 | 2015-08-01T13:37:06 | 2015-08-01T13:37:06 | 40,047,329 | 0 | 1 | Apache-2.0 | 2020-07-24T18:32:40 | 2015-08-01T13:26:17 | Python | UTF-8 | Python | false | false | 441 | py | list.py | # Copyright 2014 Google Inc. All Rights Reserved.
"""Command for listing firewall rules."""
from googlecloudsdk.compute.lib import base_classes
class List(base_classes.GlobalLister):
"""List Google Compute Engine firewall rules."""
@property
def service(self):
return self.compute.firewalls
@property
d... |
71a380c7cf829bc0d7ef3f0a5d2a500cf4c1727b | 86f1ed7fd487ade96be98b5c25b64fe076051af9 | /lib/solutions/SUM/sum_solution.py | b892c48a1a3813deb65b23f13a66c320e6f20a44 | [
"Apache-2.0"
] | permissive | DPNT-Sourcecode/CHK-lzmk01 | 5a6caa274d4b56225dc194b945ee13d0ff9fd87c | 010951ccf79ecd8e199fc23590f5e69c5c204915 | refs/heads/master | 2023-08-07T23:57:35.088562 | 2021-09-20T17:33:53 | 2021-09-21T19:32:12 | 407,831,424 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | sum_solution.py | # noinspection PyShadowingBuiltins,PyUnusedLocal
def compute(x, y):
sum = x + y
return sum
|
de7a6b965902f8f6f32cb308e02ac57e2ef28d66 | 7803a3144ba643a31f6b7f875026b2c3a58f31f1 | /Projectapp/views.py | 5423dd4af3a5f66d51ded50773680d94d657e2e5 | [] | no_license | vipingo/Feedback-Management-System | 8b71c7193e602ed7fde5bca03bf14d8168aa4060 | 1ddbca9c1aa04c50b8d3d2a05d258a36695511bc | refs/heads/master | 2020-08-30T20:03:31.320549 | 2019-10-30T08:30:52 | 2019-10-30T08:30:52 | 218,475,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,821 | py | views.py | from django.shortcuts import render, redirect
from django.http import *
from django.urls import reverse
from django.contrib.auth import authenticate, login, logout
from .forms import UserForm, UserProfileInfoForm, FeedbackForm
from django.contrib.auth.decorators import login_required
from Projectapp.models import UserP... |
0d6b05a7e557577f73f330cb800ba06c0cd7b9ee | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_9/vttkes001/question2.py | cd3767b16dfe902b50e45f048c7042cfd6532bd8 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,623 | py | question2.py | """Format textfile to number of words set by user
Keshin Vittee
14 May 2014"""
iname = input("Enter the input filename:\n")
oname = input("Enter the output filename:\n")
width = eval(input("Enter the line width:\n"))
f = open(iname, "r")
line = f.read()
f.close()
lines = []
line = line.replace("\n\n",... |
5a229ff91cec55cc276b892af8337b391fd0286a | a9d422bd631a332177b6378119f26721655c7007 | /Python/bankapplication/bankapp/models/BankAccount.py | c8afb67f23fbc7fe71a764fb1a3a7292020318ff | [] | no_license | kthure01/DevOps20 | 99a6f70d8c16d96a9b1ce1445ff24c6db3f1d429 | 1b7478a067d4b9f9f11c89b64f33388726421850 | refs/heads/master | 2023-04-16T05:07:44.673793 | 2021-04-26T06:24:58 | 2021-04-26T06:24:58 | 294,900,763 | 1 | 0 | null | 2020-09-28T14:17:16 | 2020-09-12T08:15:42 | Java | UTF-8 | Python | false | false | 179 | py | BankAccount.py | from mongoengine import *
DEFAULT_ACCOUNT_NAME = 'Primary'
class BankAccount(Document):
name = StringField(default=DEFAULT_ACCOUNT_NAME)
holding = IntField(default=0)
|
ccdffc937f202389c05f82183f5c268dd314622d | 693c8c948b295834a98da045807581cfc27d7bc3 | /scripts/extract_citation_counts.py | 695e02183793bb453636131147ca6667b7f44930 | [
"MIT"
] | permissive | paperquest/paperquest.github.io | 7d222b8a9c152a462d7ee7ed336871d7872b9297 | cbbaf5ee454d1b39122eb4d85422e03974271b6a | refs/heads/master | 2020-05-20T19:23:58.395220 | 2018-06-02T03:44:42 | 2018-06-02T03:44:42 | 56,979,307 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,146 | py | extract_citation_counts.py | ################################################################################
#
# Extracts citation counts from Google Search results, looking for
# specific patterns within the results. The scripts assumes it
# receives as input a file with a JSON array containing all the
# results, such as those returned by Kimono... |
1ab35905dd452d30c9ea8d57d1a28ddaab31eaeb | fedf22474579cfaa1f98c6c20176b98f776465b4 | /computational/lab1/gauss.py | af03e9aa4c834775198dc20196cde4fb4f00fdba | [] | no_license | ddaletski/labs | 755c30b1e95d18b2cda724187acf096578e83a37 | 5b71384e6148be59373db12c4d441800495666a9 | refs/heads/master | 2021-03-27T17:00:16.172850 | 2019-04-28T19:20:37 | 2019-04-28T19:20:37 | 118,371,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,191 | py | gauss.py | import numpy as np
def find_pivot(A, start_idx=0):
argmax = (start_idx, start_idx)
for row_idx in range(start_idx, A.shape[0]):
for col_idx in range(start_idx, A.shape[1]):
if np.abs(A[row_idx, col_idx]) > np.abs(A[argmax]):
argmax = (row_idx, col_idx)
return argmax
... |
8a239137d219ca87a48b5f852ae0ed23c5fdf4ad | 6c96a93cf02eceb02ba6a3608691e26bbff89155 | /cases/ha/test_ha.py | bb800526b78ccbc0c64a1a4e1790135562ede68e | [
"MIT"
] | permissive | txu2k8/pyrobot | 3a4b97902cf44070c969f889d2017ee12e0fa69e | 829c6f1334c11d5fd9381bbab62a7093f2803792 | refs/heads/main | 2023-01-27T11:50:24.351574 | 2020-12-07T07:33:19 | 2020-12-07T07:33:19 | 318,099,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 739 | py | test_ha.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@file : test_ha.py
@Time : 2020/12/4 9:53
@Author: Tao.Xu
@Email : tao.xu2008@outlook.com
"""
import random
from pyrobot.case import RFTestCase
def fun():
pass
class HA(RFTestCase):
"""HA test cases"""
default_tags = ['P1']
force_tags = ['smoke_test']... |
d7755aae418d27cb0b231e1f1f3f2bc3dd30e814 | 9902f6bbff1c88d96e66660a6073f6745b6abd7c | /tests/test_concourse-ci.py | 2bf598822763c56499c7ef1203a3352f3f11b44a | [
"Apache-2.0"
] | permissive | MoneyAndCo/concourse-ci-formula | 75d4705632edeb0ef18717e268cf7e8445536c6f | 45e702eaf889206aac3906607a2396a8d9a07bb1 | refs/heads/master | 2020-03-31T05:06:37.807130 | 2017-04-19T23:09:18 | 2017-04-19T23:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 479 | py | test_concourse-ci.py | """Use testinfra and py.test to verify formula works properly"""
def test_concourse_server_running_and_enabled(Service, Salt):
concourse = Service(Salt("pillar.get", "concourse-ci:server:service:name"))
assert concourse.is_running
assert concourse.is_enabled
def test_concourse_worker_running_and_enabled(S... |
248f5994eac5ebf4263331f3fbad61730f14623e | 0e113220523d389d45f7b968d00b4bf242f63881 | /polls/admin.py | debb4d73e7ba06eaad5c0a6638d32167c1a7c099 | [] | no_license | smileboyi/Django-Site | 551b95fd28271be42eb388a622e145f6ce6667d4 | 171c8867cb1069e59f56b648f8e28f9733010d9c | refs/heads/master | 2021-09-09T05:57:14.231720 | 2018-03-14T03:43:26 | 2018-03-14T03:43:26 | 117,223,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,059 | py | admin.py | from django.contrib import admin
# 引入应用的models
# 决定哪些模型需要在admin内进行管理,在admin.py文件中注册它们。
from .models import Choice, Question
# Register your models here.
"""
用python manage.py createsuperuser命令创建管理员账户。
"""
## 1.将models注册到站点进行管理(然后站点将提供Question管理的服务页面)
# admin.site.register(Question)
# admin下有不同模型定制类
class Choice... |
4d2cfde3359290edd86df132372ddc8faf89d7ce | b097561bde57cf0feed32bf1378fe8c625fe8874 | /Functional programming/pig_Latin/pig_Latin2.py | b066f6703d84dd09f8499f35d5989f07f07523d2 | [] | no_license | raveena17/csforall | e6d5cd3d2b5411d3897b2bb90d8cdc2213ef95fa | fda7097dfa358a2e02d67a20de7faa4bdc3c0fb0 | refs/heads/master | 2021-04-04T06:55:21.006946 | 2018-03-08T14:55:47 | 2018-03-08T14:55:47 | 124,406,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | pig_Latin2.py | # One way to use recursion to assist in this is to write a function
# def initial_consonants( s ):
# that returns a string of all of the initial consonants in the input string s.
# Thus, if s starts with a vowel, the empty string '' will be returned.
def initial_consonants( s ):
vowel_char=['a','e','i','o','u']
... |
3db9245c6d6548b4eba5d7b1c282c0c25d01fed2 | 042bfe15aef5e3faa1053a61327f8025b93e230a | /HW6/code/HW6/application.py | d92c28f05fc8af2ea2fe1d690dd3549e9c158043 | [] | no_license | xiaoshq/CSCI571---Web-Technologies | 7a52d81d722ae7bf3ab95e44a9fbb3e2b6d6d4e0 | aaa2a21861520c6707644588a61eae303d3abba5 | refs/heads/master | 2022-06-21T02:20:37.457149 | 2020-05-14T06:59:42 | 2020-05-14T06:59:42 | 263,833,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,640 | py | application.py | from flask import Flask, request, jsonify
from newsapi import NewsApiClient
application = Flask(__name__)
newsapi = NewsApiClient(api_key='893d0898e20d4d88a711358fd5b8b0a7')
@application.route('/', methods=['GET'])
def homepage():
return application.send_static_file("index.html")
@application.route('/init', met... |
07dc5ad9a0ae8595e86053de3372a6b3213a5ca4 | 6836b7918d01fb79e502ae9cd8ca371cc452cacd | /InvaderFormation.py | d0623f60767bdf646a7421ad6780ed1e4390982f | [] | no_license | stdarg/invaders | a1e6e46daf7920ae8339dac2c97d485b4888a613 | 22b4d6058ef8e23b8e42ef9678a98b096f6c2f32 | refs/heads/master | 2021-01-22T03:01:29.526104 | 2013-02-18T21:04:28 | 2013-02-18T21:04:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | InvaderFormation.py | #import basic pygame modules
import pygame
from pygame.locals import *
from Global_Constants import *
from GameGlobalObjMgr import import *
#class InvaderFormation
|
17c3542e9f1ed8498dd3a192748dd26d049c8f65 | 9e65f8ce748e5d1a8e0b989f0bf371c0232afed3 | /rework_main.py | b212a9076672b4b3af33c0d75ed1c48b6a1c51d7 | [] | no_license | Dezzy227/DPWG | f8af0112c530c50db0795b887f48d2aa7f59f23d | 093b0ab791a1c546499c362765b746828da6f5e2 | refs/heads/main | 2023-07-28T20:34:54.877997 | 2021-09-29T08:25:58 | 2021-09-29T08:25:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,916 | py | rework_main.py | # Erstellen von grafischen Objekten zur einfacheren Nutzung und für mehr Übersichtlichkeit
spacer_8 = '<*><*><*><*><*><*><*><*>'
spacer_16 = '<*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*>'
greeting = '<*><*> Willkommen beim Passwortgenerator! <*><*>'
# Erstellung von "Grafiken" als Class zur Übersichtlichkei... |
e2c2929c9da635519728edcd882b083ea1fb0221 | 31f0df939d60c4aa9476a5fe7a0ac1a10d298bc6 | /python3/itertools.product().py | 6b55f1a4d5e80ba2a0e5b971876e8f0b77679664 | [] | no_license | kucukbahadir/my_hackerrank_solutions | b66b900ebf7eb529e6133cca892e9010b1a96c7a | ee6c29c543c9f24a40948401c8ba4795af280e7f | refs/heads/master | 2021-02-28T21:27:59.303489 | 2020-11-29T19:48:32 | 2020-11-29T19:48:32 | 245,733,920 | 0 | 0 | null | 2020-03-19T15:35:52 | 2020-03-08T01:38:19 | Python | UTF-8 | Python | false | false | 283 | py | itertools.product().py | ############################ my code ############################
from itertools import product
A = list(map(int,input().split()))
B = list(map(int,input().split()))
for i in product(A,B):
print(i, end=" ")
######################## end of my code ######################### |
69592a548508fc037d2a7bf8efe6aa9478a004f7 | 9fbe2296cb547354b0a64a954fb320d612aa1982 | /src/genome/lighting/lighting_gene_property.py | d5c0cac259472dd1c4fca88d6d98383ab19fcab5 | [
"MIT"
] | permissive | stu-smith/blender-evolution | c4d14c5e5356ab0894806846e0df21d158b38325 | 644b92d4dc30e82708b2e78da4f274c9ab142704 | refs/heads/master | 2020-04-23T16:14:16.381800 | 2019-04-26T12:55:57 | 2019-04-26T12:55:57 | 171,291,613 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | lighting_gene_property.py | import random
from ..gene_property import GeneProperty
from .circle_white_point_lights import CircleWhitePointLightsGene
class LightingGeneProperty(GeneProperty):
def __init__(self):
self._gene = random.choice(self.available_types())()
def mutate(self, configuration):
self._gene.mutate(conf... |
2115505ab85c6887767ba606536840f6abc18e49 | e6632ad8bc81557239ab4b4dd26e781f2dfe318b | /testCases/conftest.py | 18815b0b23b917dd1e1c66b5f63365e959205bc2 | [] | no_license | rajsooraj30/nopCommerceApplication | 39b4bce8c7cc4c6c4e4d43d23e92bb82051d29b0 | 933a9a258b0ac900c59776b3dc135780054da453 | refs/heads/master | 2023-01-29T09:49:34.787458 | 2020-12-13T05:12:28 | 2020-12-13T05:12:28 | 320,977,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,555 | py | conftest.py | from selenium import webdriver
import pytest
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
@pytest.fixture()
def setup(browser):
if browser=='edge':
print("-------------------Launching edge browser-------------------")
driver = webdriver.Edge("C:\\Drivers\\msedgedri... |
dcb52287697460bb284781a5fb490577372ae28d | eb82022c0cfc7c8747661cff9624ad2099fa1c3f | /accounting_report_xls/report/bill_summary_xls.py | f8fbf020acd2d69bd803f9284f106cf28401211e | [] | no_license | dadysuarsa/Odoo | 8d026a066c390cc8f72805d2672212e61260c1cb | c9becd0c192fa239520ad3e1a11d81f70832eddf | refs/heads/master | 2023-03-11T06:02:06.011575 | 2021-02-26T02:17:37 | 2021-02-26T02:17:37 | 276,346,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,662 | py | bill_summary_xls.py | import re
import time
import xlwt, operator
from openerp.report import report_sxw
from report_engine_xls import report_xls
from openerp.tools.translate import _
from datetime import datetime
import pytz
class ReportStatus(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context=None):
super(Repo... |
ac46c5982576ef4046e8fd340e09e032a0ef66fb | bdc2483b62735baaf0ec24724f6d9135169adb62 | /SchoolTracker/__init__.py | 5a8d0b3ed73748ba7eb20dc07648f5310190f262 | [
"MIT"
] | permissive | nint8835/SchoolTracker | de9667ad4e3db2815762b324129dbb1bee8bac6b | b4dc79c8a4bf472e75517cf586c773982fa2b4ba | refs/heads/master | 2021-01-19T08:10:43.210364 | 2017-06-03T18:00:39 | 2017-06-03T18:00:39 | 82,070,671 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41 | py | __init__.py | from .SchoolTracker import SchoolTracker
|
11a2fdf6b164da6eb67f973d909e95d366f94e74 | 6c3416806f313fa546b37c8b235af41ebb22ffd5 | /plot_nap_EPSP_amplification.py | d8d4da16b2bccfd62e5035f9b297900545b58e5c | [] | no_license | neurosutras/nap | 1f2be36e711ac212205d2e820121b41ea094021b | 35d9f283bc83375037b27e23f9456b9e6a69f55a | refs/heads/master | 2021-04-03T06:25:35.112146 | 2018-06-15T20:09:19 | 2018-06-15T20:09:19 | 124,595,485 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,144 | py | plot_nap_EPSP_amplification.py | from plot_results import *
from matplotlib import cm
output_file_paths = dict()
if len(sys.argv) > 1:
output_file_paths['soma'] = str(sys.argv[1])
if not os.path.isfile(output_file_paths['soma']):
raise IOError('file containing data for nap_EPSP_amplification_DC_soma_stim_trunk not found at provided ... |
e5474de06d14fb172974d866f4ca746ee8a7b397 | 62355c19470d195b0a959eb4c967ded454c397c9 | /first_project/app_one/urls.py | 9d6a18c2b07e743661b96c49a4ab99ec41e1fa50 | [] | no_license | Ktlim83/Django_Sample | b07c3cf726923e702fc67ad2de9e0b802fd7309b | 25da50d5f599f30f8b5be5ba327eea901dee2ec1 | refs/heads/master | 2022-10-10T23:17:29.994580 | 2020-06-14T00:09:02 | 2020-06-14T00:09:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index),
path('new', views.new),
path('create', views.create),
path('<int:number>', views.show),
path('<int:number>/edit',views.edit),
path('<int:number>/delete',views.destroy),
# path('<str:name>', views.hello_... |
5ac30e6bf144effbc5426962f78c011dd26b2a07 | b036583a7e1c496d557f893612b74956373c604e | /capstone-api/controllers/loan_controller.py | 818752da39d255e6974f1fb8386299229bf8a83a | [] | no_license | Beronos/flask-bookstore-api | 3bb317123d0c6c8655ea81e2623417c0d5f78d02 | 57cb6b21fa10764a735c4447092b848ce10344a2 | refs/heads/main | 2023-05-30T13:10:48.207636 | 2021-06-15T01:26:35 | 2021-06-15T01:26:35 | 376,995,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | loan_controller.py | from models import Loan
from extensions import db
def get_loans():
return Loan.query.all() |
274a294dde99498d69d114011dcdcebc1d31e08f | 5510dc99d2868bf52624cdc238dcb8f785a393af | /partners/migrations/0001_initial.py | 783b365a44256d0cce30c6d5a1b83e8985e23137 | [] | no_license | nik-nep/litsei | d1ac881f9abc587825b74e44ee154f5f33a31546 | 14d1f1456d35dd05a6a3b9cdf57566d3be986098 | refs/heads/master | 2022-05-10T21:23:48.167299 | 2022-05-06T08:20:43 | 2022-05-06T08:20:43 | 226,986,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,280 | py | 0001_initial.py | # Generated by Django 3.0 on 2020-02-29 20:12
from django.db import migrations, models
import partners.utilites
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='PartnersLogo',
fields=[
... |
daa68aa22339d7be3c85f386e5b69e4be4860332 | 36b69039a9ca8c436e2c80820b5d134a5f8ee1b7 | /viterbi.py | 2c6020d69b9cf641c9d7a529224e845cd59ca439 | [] | no_license | wanghaodawn/Hidden-Markov-Models | b4d788d5188aaecc278b4bb5c05665eab040b7eb | 2dce7083c28d75e01434e456941c6eb4b3b8241a | refs/heads/master | 2021-01-11T03:44:44.338173 | 2016-10-18T22:31:40 | 2016-10-18T22:31:40 | 71,295,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,244 | py | viterbi.py | #
# This file finished the Viterbi Algorithm of Hidden Markov Models
# By Hao Wang - haow2
# 04/08/2016
#
import math
from math import *
import sys
from sys import argv
# Global Variables
global list_prior, list_trans, list_emit
list_prior = []
list_trans = []
list_emit = []
# Main Function
def main():
# Declare... |
337724e5170527fd6240757c6f3142e3b434140e | ff3464ebb4c26047a2b12ffba2b370a775a76bbd | /MotorTest.py | 2ca43f95b6c63a53de65ee28fbc0ba26f77e9e59 | [] | no_license | Naaro/Drone | 868cccd82ef013a84deb49f282decaaa0d2ded66 | 3e71ffe7da091008cac34e49c88afc8e190fa9a1 | refs/heads/master | 2020-03-19T04:34:47.084573 | 2018-07-06T04:02:06 | 2018-07-06T04:02:06 | 135,843,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,985 | py | MotorTest.py | import gyro as GYRO
import RPi.GPIO as GPIO
import time
import os
import MotorControl as MC
print('Running MC.Setup')
#raw_input('Press Enter To Continue...')
MC.Setup(38,29,35,26)
print('Running MC.Start to Configure the Motors')
#raw_input('Press Enter To Continue...')
#MC.Calibrate()
MC.Arm()
Stren... |