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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ac89deac647bae155bcf2ed873033697ddec86cc | 72bc5c9891738ead35165af79f768ed645346015 | /03_Longest_Substring_Without_Repeating_Characters.py | 72ee370e492eff6d777f1f0dcf9f0739bdef91c0 | [] | no_license | becomeuseless/WeUseless | 2d5019b70dab7022922b9e9134a0a478d8b47683 | eaccc82e3068e92b17d76d42666829ccd28e7661 | refs/heads/master | 2020-05-30T19:48:54.219429 | 2019-08-06T06:20:51 | 2019-08-06T06:20:51 | 189,933,109 | 1 | 1 | null | 2019-08-06T06:20:52 | 2019-06-03T04:14:26 | Python | UTF-8 | Python | false | false | 2,442 | py | 03_Longest_Substring_Without_Repeating_Characters.py | """
Each iteration find a length of non repeating characters, move scan zone to next unrepeatable characters
Example 1:
Input: "abcabcbb" Output 3
Input: "bbbbb" Output 1
Input: "pwwkew" Output 3
Space O(1) - distinct characters
Time O(n) - scan once
"""
class Solution:
de... |
070a64c70ad1b28fd2dd149646153c61aa98700e | 4579fc7e3bdaa8098d45039dfd476f820025b4cd | /dataset/fin_qa/util_scripts/get_tokens.py | 67fcf45d30f13fa9c8c14e8f044dd5b84d2fe3c8 | [
"Apache-2.0"
] | permissive | dream-catcher/biseq2seq | 2f2fe0a826f2045b1f40ea4fd204333d77a47ded | 0b3bcde1742bb51c8212990b950660e4bc6083cb | refs/heads/master | 2021-04-25T21:09:44.848505 | 2017-11-02T06:32:00 | 2017-11-02T07:02:57 | 109,224,419 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | get_tokens.py | #!/usr/bin/env python3
import os
import re
FILE_LIST = ["q_2017-08-17.txt", "a_2017-08-17.txt"]
pattern = u"\$\{(.*?)\}"
def find_tokens(file_list, fout):
for f in file_list:
with open(f) as fi, open(fout, "w") as fo:
for l in fi:
result = re.findall(pattern, l)
if result:
for ... |
9e5b660d1c19c7a21d725ac892b700238eefa2a8 | cde307025a2f2cc7ffcd1d43ea4f75b23876450d | /tools/calibration/calibrator_factory.py | 5d16cc3a6607df0b598f17ede8aa1a4f18383f35 | [
"Apache-2.0"
] | permissive | ni/dldt | 1767885f6bf26d9d13ce10d2de63c1ae38275066 | ed372319eca66a534e1dd6a521613b0caf187b26 | refs/heads/2018 | 2020-04-14T19:29:31.549152 | 2019-07-03T16:22:59 | 2019-07-03T16:22:59 | 164,059,518 | 1 | 2 | Apache-2.0 | 2019-07-03T16:50:11 | 2019-01-04T04:53:33 | C++ | UTF-8 | Python | false | false | 1,100 | py | calibrator_factory.py | """
Copyright (C) 2018-2019 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.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
206b0a76a558c0385a8456d60ac9ecf4ac15f051 | d6643f23f1ff604cde97aa8eb23c704809b375d9 | /HK.py | 7379facdaca46e058a8ed8fa8eeb325eb16bb933 | [] | no_license | yenhungyu/109021009-20210409-HK | e440c5aaf21413ca0bc5acc40b948804d3d6fc73 | c3f508bfa3ab76ff6da3ba5d36cb39895a49d36e | refs/heads/main | 2023-04-02T07:07:49.439015 | 2021-04-15T03:25:44 | 2021-04-15T03:25:44 | 357,891,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,272 | py | HK.py | import requests
import time
import csv
from bs4 import BeautifulSoup
from requests import urllib3
def generate_urls(start_page, end_page):
urls = []
domain = "https://csie.asia.edu.tw{0}"
urllib3.disable_warnings()
# 取得該網址回應參數
r = requests.get(domain.format("/project"), verify = False)
if r.st... |
4cdc9b772a1ea667205241a326bb1640df92ac10 | 2b5b76f4a98fdba78d89c3b286b107ba51550f10 | /leetcode/Integer_to_Roman.py | 70a124fb44267b97ff6a86a1296e3c637bf03c30 | [] | no_license | Darkseidddddd/project | 7e2f3adc6f47188f062a9e1235016752860086dc | 9376fd84c0438e5c4dc3d5a8d3cf02b492d5d7ae | refs/heads/master | 2020-05-30T10:49:21.209581 | 2020-02-17T09:49:33 | 2020-02-17T09:49:33 | 189,682,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,440 | py | Integer_to_Roman.py | def intToRoman(num):
dic = {0: '', 1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M'}
index = [1,4,5,9]
res = ''
s = str(num)
for i in range(len(s)):
j = len(s) - int(i) - 1
m = 0
for k in index:
... |
1c0f64abfc5de147b89f575ccedd6f1ab696378e | ffda4a7d93f088ddd8f08f1ef4efea98a85eae82 | /shelfapi/models/__init__.py | b405cb12c854c8fd1b6513b8ed00521497b1f2d3 | [] | no_license | powellmad/shelf | f27bf9c58c5a0f333a55431bb07e857b7f60e638 | 1bdf5edb52d8f064bb726f4aac77e9884ce79979 | refs/heads/main | 2023-07-15T18:55:39.395956 | 2021-07-03T22:42:48 | 2021-07-03T22:42:48 | 376,942,669 | 3 | 0 | null | 2021-07-03T22:42:49 | 2021-06-14T20:04:40 | Python | UTF-8 | Python | false | false | 243 | py | __init__.py | from .category import Category
from .subcategory import Subcategory
from .shop import Shop
from .product import Product
from .payment import Payment
from .shipping import Shipping
from .order import Order
from .orderproduct import OrderProduct |
90157f54d83e602821a317506aaab455b47761e2 | 3b69a93cccdd3116744e074ef9821df34cbc1dd1 | /tempUtilities.py | fd140eea9ad86789fcb6eafa095ebc16b0d9ad3a | [] | no_license | muirt/bbqbadass_server | 46feceeb83abc8941c2d3e450d32bfdaad700715 | 2de69ce30bd267c1e94fd6db19fcbe0d51ada367 | refs/heads/master | 2021-01-10T06:52:17.828220 | 2016-03-17T23:45:53 | 2016-03-17T23:45:53 | 52,071,255 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | tempUtilities.py | def CtoF(val):
result = val * 9 / 5 + 32
return result
def FtoC(val):
result = (val - 32) * 5 / 9
return result |
e98665a067f2f6baa73e8fe5829df6123b59aad2 | 4a78bdb6eb9fcb0523eaa5575d5ed549326fa2d9 | /UnitTest/RunAllTests.py | 021c3c2097d2e83186d614317f19cebe349af04c | [] | no_license | vaibhavjain01/LyreBirdTest | 253e4eec62691b1fe317bb70fa5972e72f6dd101 | 944e0af93885a916386b15110ace492ca9628254 | refs/heads/master | 2020-04-03T15:38:19.778928 | 2018-11-04T08:51:46 | 2018-11-04T08:51:46 | 155,370,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52 | py | RunAllTests.py | '''
Created on Nov 1, 2018
@author: vaibh
'''
|
096444c21685b96c578c5431b43a250ca6149e11 | 5aa49fac76696fd59a4ac14a39e49b6fcf172f19 | /contact/migrations/0001_initial.py | a8624ecfb4b6a6e27dc7db1bb03d78328bba0445 | [] | no_license | samshultz/posyhub | 091543f0d71b021b98e0c585097d232d0021bea6 | c2d29d552916745a70ff390655cb750edf54a60f | refs/heads/master | 2022-12-12T06:26:52.946588 | 2018-12-18T12:28:37 | 2018-12-18T12:28:37 | 162,282,796 | 0 | 1 | null | 2022-12-08T01:20:34 | 2018-12-18T12:09:53 | JavaScript | UTF-8 | Python | false | false | 854 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-02 03:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Compa... |
a1f99c781d28b074cce873aa208af5809502633f | 5b5a720c1e471afb9f2378482e18f7dd5332ec71 | /service/repository/sku_order_repo.py | 6347f55c970ad7a437316afe8e6b03a086ce6d28 | [] | no_license | Isaac315/sfm | adf2266daa7f98eb1810fbae97d801889b140f05 | 6ab0bec740e149b4008008765faf83fcd376d189 | refs/heads/master | 2023-03-25T19:04:00.920734 | 2017-01-08T13:27:48 | 2017-01-08T13:27:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,091 | py | sku_order_repo.py | #!/usr/bin/env python
# encoding: utf-8
"""
@version: v1.0
@author: suyuan
@license:
@contact: suyuan@gmail.com
@site: https://github.com/su6838354/sfm
@software: PyCharm
@file: sku_order_repo.py
@time: 16/11/3 下午2:36
"""
from service.repository.base_repo import BaseRepo
from tornado.concurrent import run_on_executo... |
09f2144e4ab72e8748f98528f5d73ab7b3a0db58 | 3b93874efe0381ac2497a1d11248c4114d4dd198 | /problems/primitive/power_x_y.py | b77aee6fa177ccb4e9694fc8271ba599cd0b9716 | [] | no_license | yerhu01/python-epi | a526ce101395cc4fc68c07c0d275e7df5673adf9 | 0aa904790d4aa40312ef5f33a8ba5d3fc29b2977 | refs/heads/master | 2023-02-19T09:17:50.577557 | 2021-01-02T01:49:17 | 2021-01-02T01:49:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 655 | py | power_x_y.py | from test_framework import generic_test
# Explaination: For each bit, must multiply itself by that bit's place value
# ex. 0b1 = x1 0b10 = x2, 0b100 = x4 0b1000 = x8
# so 0b1011 = (x)*(x*x)*(x*x*x*x*x*x*x*x)
# Time: O(n) where n is # of bits
# Implement without ** operator
def power(x: float, y: int) -> float:
... |
adcfc5da8ac8b17f9a0526045a9e7dff297d1284 | 785ef6efe4c1c7d141bd09bef52f3758b515d3d7 | /ecalendar/core/migrations/0026_auto_20180125_2054.py | 2e734b6d0b57f362655c87962f283bc603763484 | [] | no_license | VictorAguiarGuedes/Calendario-proexc | cdc6c8c89d0fe8ff93adb85ee628b55be5c502d5 | 28c6d86d42ad5924a6f8da408e7e5adad703ac58 | refs/heads/master | 2021-04-24T20:31:45.365849 | 2018-01-26T00:57:53 | 2018-01-26T00:57:53 | 117,131,163 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 622 | py | 0026_auto_20180125_2054.py | # Generated by Django 2.0 on 2018-01-25 23:54
import django.core.validators
from django.db import migrations, models
import re
class Migration(migrations.Migration):
dependencies = [
('core', '0025_auto_20180125_2037'),
]
operations = [
migrations.AlterField(
model_name='eve... |
4d25f84e60a811c59be908c03960eebf104b8deb | 00b710e8e76fefab12c4966b001759a7373d0964 | /crawling/article.py | f2cce14d99f27eeff4aaa3fbdeb7cff642606d07 | [] | no_license | ksj3421/CS410_QuestionAnswering | 54c140c7e87f7199998a621cb137790ef59ad0f2 | 66efab616a19b4814945f54b0883c8454431e196 | refs/heads/main | 2023-08-23T17:24:57.789420 | 2021-10-23T02:27:55 | 2021-10-23T02:27:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,624 | py | article.py |
import hashlib
HASH_NAME = "md5"
class Article():
def __init__(self,id, category, userName,userType, content, title, inLinkId ="", replyList = [], likeCount = 0, commentCount = 0, viewCount = 0, uniqueViewCount=0):
self.id = id
self.category = category
self.userName = userName
self.... |
fa9dbad5b9b138c2200d3632ac23e270a2020d22 | f1b1dba11b4a0d765bfd61e23729ccd57de23b4e | /Documents/compiladores/Drawme/ho.py | 0847e91c1a570c0cc83b9c2573b2bd3dcd4c5af2 | [
"MIT"
] | permissive | monicalzn/DrawMe | e938ac983ab61a614596642195b37f34317f5421 | 16df1cdf006f3028cf8929a35d044bfff22d34f6 | refs/heads/master | 2016-09-05T21:36:03.504023 | 2015-05-06T07:44:31 | 2015-05-06T07:44:31 | 31,486,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | ho.py | from Tkinter import *
root = Tk()
w = Canvas(root, width=600, height=480)
w.pack()
w.create_line(0, 0, 200, 100)
w.create_rectangle(0, 0, 88, 30)
w.create_polygon([(20,30), (1,200), (100,100)], fill="", outline="black")
mainloop()
|
777c3e89c77e622dbdd389424974af83590b6b41 | 14bef84bef01fa84b0c97a411a52ddfa71a355f4 | /polls/models.py | 665f207d4b380e7e6ee0302aa43a689db1a48b66 | [] | no_license | nuttapol-kor/ku-polls | e8d5950e7a1f4475ee07487c0e5ad8a6007546e6 | 46ae578eee799ea71c9bb00895a4d6d2c09b5b67 | refs/heads/master | 2023-01-03T18:54:21.851276 | 2020-10-30T13:36:29 | 2020-10-30T13:36:29 | 290,254,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,957 | py | models.py | """Models for automatically-generated database-access API."""
import datetime
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
class Question(models.Model):
"""A Question class has a question, publication date and end date."""
question_text = models.... |
96d196331ac75f209835936b2d1666f797bd1ea0 | c26cd98ca6cd4415a88e8c9f2fc2bfe8c041b41a | /skrmt/ensemble/tests/test_tracy_widom_approx.py | 93c0648d420c7889a6235e0093ce3ffd6fe68479 | [
"BSD-3-Clause"
] | permissive | AlejandroSantorum/scikit-rmt | db3bf9ed7b115b11c506879977bd9e87f3e960da | 376625361d9c383380124bb99ce4fcd50614acc5 | refs/heads/main | 2023-08-09T12:04:33.512099 | 2023-08-06T08:17:54 | 2023-08-06T08:17:54 | 353,028,145 | 22 | 8 | BSD-3-Clause | 2023-09-14T21:01:08 | 2021-03-30T14:21:25 | Python | UTF-8 | Python | false | false | 1,611 | py | test_tracy_widom_approx.py | '''Tracy-Widom distribution approximator Test module
Testing module that checks Tracy-Widom distribution approximator.
'''
from numpy.testing import assert_almost_equal
from skrmt.ensemble.tracy_widom_approximator import TW_Approximator
def test_cdf_approximation():
"""Testing the approximation of the CDF.
... |
8c3c752ceb5f15e073248a6d0dc03aae90e0e50b | 8ff63182788c2d8cdcecd9c6e78882714034801c | /tests/unit/contracts/test_forbidden.py | 58efb419997c86b807763530e45c3325e09ce62e | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | seddonym/import-linter | a40afac865de8f28953ad5960fd7caa841db8c33 | cb53dce575f6493c5e304176f3f2c6bb7ce1e34b | refs/heads/master | 2023-08-30T11:18:25.567221 | 2023-08-29T16:12:42 | 2023-08-29T16:12:42 | 167,795,381 | 448 | 37 | BSD-2-Clause | 2023-08-29T16:12:44 | 2019-01-27T10:18:22 | Python | UTF-8 | Python | false | false | 21,108 | py | test_forbidden.py | import pytest
from grimp.adaptors.graph import ImportGraph
from importlinter.configuration import settings
from importlinter.contracts.forbidden import ForbiddenContract
from importlinter.domain.contract import ContractCheck
from tests.adapters.printing import FakePrinter
from tests.adapters.timing import FakeTimer
... |
2d6d224697947eadbc6fb22d9ba57f66dbcbd659 | c472ec7f7edf89f17cb37e12fd59ebe7b21b3e4b | /Working_Python3/motor.py | a34f3723e03331bc0dd47572c61d50858a01d06f | [] | no_license | snrathod1/555wheelchair | c9ad6021fcccc64016773389608a318f1fa22603 | 549ed611874d8426820363fdcaa50e1153a48e28 | refs/heads/master | 2020-03-10T09:11:02.446315 | 2018-04-26T21:04:57 | 2018-04-26T21:04:57 | 129,302,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,456 | py | motor.py | # initialize_RPi.GPIO()
import RPi.GPIO as GPIO
import time
#import main
import flag
GPIO.setwarnings(False)
def my_callback(self):
time.sleep(.1)
if(GPIO.input(switch_Pin)):
flag.flag = True
print("Enabling Joystick Mode")
else:
flag.flag = False
print("Enabling Self... |
9180befa53f8b355dcf2aa8c4fdddd8c4866b6ea | 43bd891b63319ef97c82a1d16e2160d2f479e30a | /database.py | 156fa0f83e165f4c1503e6c564474322370caedf | [] | no_license | rk280392/study | bdc63529b594d3408280c94d4058f4ee67f38bdf | a5c541f81de33b7f73b62ee6de3cce4ae6ecb71b | refs/heads/master | 2020-07-22T00:34:51.354913 | 2019-12-31T11:00:04 | 2019-12-31T11:00:04 | 207,016,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | database.py | import sqlite3
db = sqlite3.connect('servers.db')
db.row_factory = sqlite3.Row
cursor = db.cursor()
cursor.execute('''SELECT * from serverinfo''')
for row in cursor:
row['name'], row['ipaddr'], row['username'], row['password']
print('{0} : {1}, {2}, {3}'.format(row['name'], row['ipaddr'], row['username'], row[... |
2ba48e559f271c962379c572f46c680ca428ba6d | 902b3fc3abdb8433dafa1aca12b2f56cc3bc4129 | /Astar_city_summary/astarcity.py | 7b8a6821c00fe6d1e851695d7a6eaf8944c127a2 | [] | no_license | rongrong1314/path_planning_algorithm_train | ec12382c774bd7f357a31a845459adc3389a3f81 | 84ff5be16d1869715b983bb8a965df45cdc58147 | refs/heads/master | 2022-04-25T04:55:51.433047 | 2020-04-24T05:10:51 | 2020-04-24T05:10:51 | 256,954,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,312 | py | astarcity.py | #you will find a path use A* in city
import numpy as np
import matplotlib.pyplot as plt
from grid import create_grid
from planning import a_star
#extend C-space and show grid
plt.rcParams['figure.figsize'] = 12,12
filename = 'colliders.csv'
data = np.loadtxt(filename,delimiter=',',dtype='Float64',skiprows = 2)
print(d... |
d93eb6f8edaeea7ff8392ae215eeaccbcaf29e27 | 5c1416c9ff73a175ae9b39ecb7f203241436fc0a | /djAidESILV/account/forms.py | 657c9b5a3f68305723dda8cef66f6642d5fec7af | [
"MIT"
] | permissive | Pierrot795/aidESILV | 763d8837abf94e2bd163568a2cc0a755c1b0d7a9 | 04dad828048edffdd3662b24c415edce22fd3ea3 | refs/heads/master | 2022-08-02T09:21:29.968210 | 2020-05-24T01:12:23 | 2020-05-24T01:12:23 | 259,655,061 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | forms.py | from django import forms
from .models import UserProfile
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class RegistrationForm(UserCreationForm):
class Meta:
model = UserProfile
fields = (
'username',
'email',
'... |
5279920c06f221d81b6d9b74c0e39eae1880796f | ee9ac445bb4b5dbbaf243bc2be8751749bc75838 | /Exercices/3. Ex 5.py | 10a947b75c63857ab710f7fb1c4002542ae301cc | [] | no_license | SimonStoyanov/python-test | a849c823752cd2f035b47836df6dab5aa184a327 | 579f3af181c3be4212d6723576f318ac20b9b9db | refs/heads/master | 2021-04-29T12:50:17.604498 | 2018-03-09T11:45:55 | 2018-03-09T11:45:55 | 121,736,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,255 | py | 3. Ex 5.py | import cv2
import numpy as np
img = cv2.imread('Ex_Images/ricalin.png', 1)
cv2.imshow('Go To Gulag', img)
# Ex 5. Linear Filters
kernel = np.array(3*[3*[1.0/9.0]])
print kernel
print img
def GetMaxElementMatrix(matrix):
val = matrix[0,0]
for array in matrix:
for element in array:
if val<e... |
c2f8350d47ece61b725d63f332fbcf0bb5658b13 | a5d09683723b113b261ab64183d40950199c47ea | /pandas-tutorial/lesson1-pandas.py | f0f94641f23d546cc9b5d7c183a175cfff4506fb | [] | no_license | GuilhermeUtech/data-science-python | da189ee48d3f859b8b5b59a810dec210023d54c6 | a224ecd45dc8ab1789785171fb40756e3b58e2e5 | refs/heads/main | 2023-04-10T01:05:05.886512 | 2021-04-14T13:45:28 | 2021-04-14T13:45:28 | 357,922,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,191 | py | lesson1-pandas.py | # Import all libraries needed for the tutorial
# General syntax to import specific functions in a library:
##from (library) import (specific library function)
from pandas import DataFrame, read_csv
# General syntax to import a library but no functions:
##import (library) as (give the library a nickname/alias)
imp... |
4b94a7db91f769c730ffc6c4b550ee6aa6fcc3e2 | fb62ae578f78ec62bd38e8ae9952358ca4c347d9 | /reservations/migrations/0001_initial.py | f37c6c0b537024230bac2c12061ae24f46d62823 | [] | no_license | rheehot/movieProject_with_drf | 5c1592611424b4c3b93421a6c85b2e24756195f0 | 324543bc36fdb62e24a89ce0619b1b74073c3de1 | refs/heads/master | 2023-06-17T14:23:51.967559 | 2021-07-16T05:38:14 | 2021-07-16T05:38:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,249 | py | 0001_initial.py | # Generated by Django 3.1.7 on 2021-06-08 07:11
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('theaters', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='... |
0e6ef1bc49df6e02032947c3f2add4f4ef9af07c | ed290550517c71867bff652aa50d2d3500730cbe | /pgdrive/utils/scene_utils.py | dc245132c200f27e090894434d36d5e7a9f56a18 | [
"Apache-2.0"
] | permissive | 9578577/pgdrive | 8ef7ca387ee32eb5bc4564ef80d872aa8140f5a5 | 2ba6cac2e83fb06947a00f92baa2cda948c05d50 | refs/heads/main | 2023-09-02T20:04:54.551376 | 2021-11-21T09:07:25 | 2021-11-21T09:07:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,153 | py | scene_utils.py | import math
from pgdrive.constants import CollisionGroup
from pgdrive.engine.physics_node import BaseRigidBodyNode
from typing import List, TYPE_CHECKING, Tuple, Union
import numpy as np
from panda3d.bullet import BulletBoxShape, BulletCylinderShape, ZUp
from panda3d.core import TransformState, NodePath
from panda3d.c... |
5d6e189cbccdec609a780abf07efef89d45cb207 | fd8ef75bb06383538cdb21ed2a0ef88e570179b7 | /src/openfermion/linalg/erpa_test.py | c2624920df5aec42a8e576f76789df73b873f705 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | quantumlib/OpenFermion | d1147383f99573d19005bd0f3e0120e9e9bed04c | 788481753c798a72c5cb3aa9f2aa9da3ce3190b0 | refs/heads/master | 2023-09-04T11:00:32.124157 | 2023-08-24T21:54:30 | 2023-08-24T21:54:30 | 104,403,768 | 1,481 | 406 | Apache-2.0 | 2023-08-24T21:54:31 | 2017-09-21T22:10:28 | Python | UTF-8 | Python | false | false | 4,973 | py | erpa_test.py | from itertools import product
import os
import numpy as np
from openfermion.config import DATA_DIRECTORY
from openfermion.chem import MolecularData, make_reduced_hamiltonian
from openfermion.linalg import wedge
from openfermion.linalg.erpa import singlet_erpa, erpa_eom_hamiltonian
from openfermion.transforms.opconversi... |
9988aa7614c94fbb18452f720eba15f2040b9631 | 06dd6927be080ca30065c3dde01ec3c56f43871b | /api/permissions.py | a21c477a0a33e97128530c1664d4f7040bbee9de | [] | no_license | ikasymov/mobitva | 8f90469c90c8589431fb269fba0df129b3865488 | 3414f84cfee56fea9f5c4372678ad26170b8b964 | refs/heads/master | 2021-01-24T02:16:29.158628 | 2018-06-08T06:52:52 | 2018-06-08T06:58:26 | 122,841,026 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | permissions.py | from rest_framework.permissions import BasePermission
class IsAdminOrSelf(BasePermission):
message = 'Not permission'
def has_object_permission(self, request, view, obj):
return obj == request.user or request.user.is_staff or request.user.is_superuser or request.user.is_superuser |
dd1afc883fef84a89520f8dfb6866fa89c159f5f | ae91b394784b3b034526cc54504d89238714d344 | /settings.py | e68883d11545a386d949cbbd29b76fcbc7a3ff14 | [
"MIT"
] | permissive | jimconner/digital_sky | 940febedbfc2e2a1a0b79c63f6a3f06d22ef6754 | 9427cd19dbd9fb1c82ca12fa8f962532d700c67f | refs/heads/master | 2020-04-26T14:17:04.034346 | 2019-12-24T17:32:43 | 2019-12-24T17:32:43 | 173,607,948 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,951 | py | settings.py | from twisted.logger import (
LogLevel, LogLevelFilterPredicate)
# Settings file for digital_sky
LED_COUNT=469 # Total number of addressable pixels (including virtual pixels with strips attached)
LAMP_LENGTH=67 # The lenth of each lamp module
STRIP_LEDS=3 # The number of virtual pixels (with strips atta... |
0e78034b7d53f3f550e792e6e181bf0d06ec93a9 | 69b5d58fcff92e89d2236a1edc9f294c5731f81e | /Analysis/figure_heatmaps_area_x_category.py | f9de977fcf532b33cba7e8cc6a2e1500e81b8b5e | [] | no_license | kuz/Spectral-signatures-of-perceptual-categorization-in-human-cortex | 986163d27b55349f8bd5f639ce3e1b1303b81996 | fa29d1ec1ed3ee4c47edda45071cdc2a9af55b83 | refs/heads/master | 2021-03-19T18:37:38.435887 | 2020-01-15T04:25:25 | 2020-01-15T04:25:25 | 72,940,031 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,105 | py | figure_heatmaps_area_x_category.py | import os
import numpy as np
import matplotlib
matplotlib.use('Agg')
from matplotlib import pylab as plt
import matplotlib.cm as cm
from matplotlib.colors import LogNorm
# parameters
INDIR = '../../Outcome/Single Probe Classification/FT/Importances'
OUTDIR = '../../Outcome/Figures'
# functions
def heatmap(data, count... |
8f756a1da0a0b4cd1ff061bdc03f1117d72ff621 | 2d055d8d62c8fdc33cda8c0b154e2b1e81814c46 | /python/demo_everyday/JCP005.py | 65afb4f4b0f92658ee5703d854d43dd3882ff39d | [
"MIT"
] | permissive | harkhuang/harkcode | d9ff7d61c3f55ceeeac4124a2a6ba8a006cff8c9 | faab86571ad0fea04c873569a806d2d7bada2e61 | refs/heads/master | 2022-05-15T07:49:23.875775 | 2022-05-13T17:21:42 | 2022-05-13T17:21:53 | 20,355,721 | 3 | 2 | MIT | 2019-05-22T10:09:50 | 2014-05-31T12:56:19 | C | GB18030 | Python | false | false | 469 | py | JCP005.py | '''
【程序5】
题目:输入三个整数x,y,z,请把这三个数由小到大输出。
1.程序分析:我们想办法把最小的数放到x上,先将x与y进行比较,如果x>y则将x与y的值进行交换,
然后再用x与z进行比较,如果x>z则将x与z的值进行交换,这样能使x最小。
2.程序源代码:
'''
l = []
for i in range(3):
x = int(raw_input('integer:\n'))
l.append(x)
l.sort()
print l
|
da4d40a53f98da3665405fe7dc42e334550eca81 | 03be5fe1bbd5af08f32a39ad24c91809033152c3 | /updatePdf.py | 79c1a9e6ce754929431073c706019ccc67fe9c4a | [
"MIT"
] | permissive | sabar183ahuja/Pdf-Edit-and-Merge | ffe5edcfd82c880df5cf57ce9cdb260471f05420 | 27a182ff03880b5bb32810b5b99417b57a7a25fc | refs/heads/master | 2020-06-24T15:13:59.951117 | 2019-08-23T06:13:08 | 2019-08-23T06:13:08 | 198,997,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,073 | py | updatePdf.py | """
Author: Sabar Singh Ahuja
"""
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from os.path import expanduser
import PyPDF2
import Helper
class UpdatePdfWindow(QMainWindow):
def __init__(self):
super().__init__()
self.title = "Pdf Update page"
self.pdfToUpdat... |
228f832ab77d0eba00fb18322fb20ddc8185dcc8 | f2c475ab574cc61c9b8e701bca4c29509e8f3b3a | /fit_bias_and_output_all_rms.py | 5e23fc3d74cecb42667d5e36c425144abc2fedc3 | [] | no_license | AgusTor92/Fisher_Euclid_numeric_derivative | 90b3e0ca6af28a7f5a2850a506813eda2655dfcb | 342e0154196b2fe558c6f4b84ed76d6b4ccadbd3 | refs/heads/master | 2023-03-19T06:27:14.862909 | 2014-10-23T13:33:12 | 2014-10-23T13:33:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,873 | py | fit_bias_and_output_all_rms.py | import numpy as np
import scipy.optimize as opt
from scipy import *
import matplotlib.pyplot as plt
from fit_Euclid import find_parameters_bias, V_sur, find_parameters_rms, dvdz,background_evolution_splines
#================= Functions ======================
def func(p,x):
w=p[0]*np.exp(p[1]*x)
print w.size
... |
be661d95f1dc3300616d584f31999bc95ceb5eb5 | 68cf7c25bb614883c50d21e5051fbea8dbf18ccb | /ecommercejockey/sema/clients.py | 400236080e6d7e6c3058a4d9e6a8b51d71517d5a | [
"MIT"
] | permissive | anniethiessen/ecommerce-jockey | 63bf5af6212a46742dee98d816d0bc2cdb411708 | 9268b72553845a4650cdfe7c88b398db3cf92258 | refs/heads/master | 2022-12-14T02:29:25.140796 | 2021-05-15T01:20:30 | 2021-05-15T01:20:30 | 211,400,595 | 1 | 1 | MIT | 2022-12-08T06:45:40 | 2019-09-27T20:57:19 | Python | UTF-8 | Python | false | false | 39,878 | py | clients.py | """
This module defines any API clients used by the SEMA app.
"""
import requests
import json
from retry import retry
from django.conf import settings
from core.exceptions import (
ApiInvalidContentToken,
ApiInvalidToken,
ApiRateLimitExceeded
)
class SemaApiClient(object):
"""
This class defi... |
6e82e329c04b15af6ca5bcdedaedab58965859dc | f6b0a839d3c80879b27be23593239f16e9843899 | /app/__init__.py | 0d4b30b36b8b2c576a39fa5192559809a1c0bc82 | [] | no_license | psfinger/flask_sqlalchemy | 64c9ee5478e1eb5554b66771505bdd3d29c17d0c | c5e4d720425ea5e14f7dada59d0c122493725dbd | refs/heads/master | 2020-12-31T22:49:25.546109 | 2020-02-14T13:06:37 | 2020-02-14T13:06:37 | 239,060,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | __init__.py | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from config import Config
db = SQLAlchemy()
bootstrap = Bootstrap()
def create_app(config_class=Config):
app = Flask(__name__)
app.config.from_object(config_class)
db.init_app(app)
bootstrap.init_... |
2852e4b042ba2550f3128aedc1dfc5c19cd357fe | 2dac2390f43d5a8d0cfaa5cc3c578ce335caae1f | /GIt/Main.py | e855e1570e78c16ec0dad691b6ebd6c66d92f24f | [] | no_license | IkonenkoDanil/cs102 | 4acbdc0bc0bc6efedaf48fb42033b649d720f695 | 097617bda3d2c2015624b4c1ad1458cef2013e81 | refs/heads/master | 2020-08-11T07:44:49.137257 | 2020-06-22T19:01:53 | 2020-06-22T19:01:53 | 214,519,998 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,188 | py | Main.py | import os
import zlib
import hashlib
GIT_OBJECTS_PATH = '.git/objects'
with open('.gitignore') as f:
GIT_IGNORE = f.readlines()
def git_init() -> None:
try:
os.mkdir('.git')
os.mkdir('.git/objects')
os.mkdir('.git/refs')
with open('.git/HEAD', 'w') as head_file... |
f24fa5304fe132af7ab7aecf72d544f914ce89ff | 43061d4ad70eaedad4bb987eed6d5689c1b2965d | /imports/pigTalk.py | 340d9de2e9c3d36720c4c7ebf895390602a2249c | [] | no_license | Chopflox/Sample | 7cdac82b887d1559fffc6e4421453a9bcd218ede | 7f434a04d53ba506746d3c6dead4dab8acaaace1 | refs/heads/main | 2023-07-17T01:48:05.100395 | 2021-08-31T10:35:02 | 2021-08-31T10:35:02 | 399,066,302 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | pigTalk.py | import pigSay
newPig = pigSay.main()
def pigConversation(newPig):
for newPig in range(0,3):
x = input('Skriv hva grisen skal si')
pigSay.main(x) |
5a2f4c51a805da87fa3b99e9ff2af85264a9ba4d | 6b081c62e6ff2f6e5b535244c3c76d4db7b4a5ab | /PythonTheHardWay/projects/lexicon_project/setup.py | a9656a1284576b7d76685edfe6f0bd76c908e2af | [] | no_license | githubfun/LPTHW | 0104eb2dea10112c6160027b2c609530e8bf3013 | a6423b3e134bee272ed1dc9e1091ddce68f3faf4 | refs/heads/master | 2018-02-07T07:56:34.333869 | 2013-10-31T22:12:18 | 2013-10-31T22:12:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Learning Python the Hard Way, Exercises 48 and 49',
'author': 'Jay R. Newlin',
'url': 'Jays-MacBook-Pro:~/PythonTheHardWay/projects/lexicon_project/',
'download_url': '',
'author_email': 'jay@dmgctr... |
c62847e98fe8c596040092a31be133d6e7d9de8b | 25abd618ec8500c9f4b5868cfcf5a7c0323589f3 | /tests/id3.py | f15cb17a6db26b917715eba24f80a8391a8f2e9b | [] | no_license | hufman/medialinkfs | 7011cfb22064ee798d6959ec3c2f9b480071df38 | 8a34f819a5c423abde98f6e85031d46fc1eb57c2 | refs/heads/master | 2021-01-20T22:31:31.742288 | 2015-11-01T23:59:46 | 2015-11-01T23:59:46 | 12,123,354 | 8 | 1 | null | 2015-08-31T01:34:57 | 2013-08-15T01:12:43 | Python | UTF-8 | Python | false | false | 1,781 | py | id3.py | # -*- coding: UTF-8 -*-
import os
import tempfile
import shutil
import unittest
import logging
logging.basicConfig(level=logging.DEBUG, filename='tests.log')
import medialinkfs.parsers.id3 as id3
base = os.path.dirname(__file__)
class TestID3(unittest.TestCase):
def setUp(self):
logging.debug("Initializing unitt... |
52c818a95c7ea2dcd266ac139bbf116d8fba9278 | 137e7bbf069015670fab6f8d4a92627bc3889f04 | /NHL_games_history.py | b203a2ded147fded2351406ae90547e0f04095b1 | [] | no_license | wilkyconsultants/nhl-simulator-macos | e206fa9d77da8deb39a4620b2d1ca5f7ff827638 | 42671cff06da0c6aad6cc76856af5f888e76911a | refs/heads/main | 2023-01-24T10:01:57.052860 | 2020-12-12T02:30:47 | 2020-12-12T02:30:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,156 | py | NHL_games_history.py | #!/usr/bin/env /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
print("Content-type: text/html\n\r\n")
import mysql.connector
import cgi, cgitb
import re
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Get data from fields
t = form.getvalue('t')
sort_field = form.getvalue('sort_field')
i... |
a8f7779130750eef323cfee4cb71c493d5fa4436 | c712783c713a00bf4c7b5ccb156df0edddc7bdb9 | /LeafInterrogator/leafi/save_all_worker.py | e1d5fe6857fdf687ed67bb14ead23879c8abf25f | [] | no_license | AMCAS2020/mechanics | 0afb13a61ebc9d4e4bc8df4d9cc541b33d560eec | 656521453db402cbf7b1daf780b65246c4ca6b26 | refs/heads/master | 2023-06-17T20:48:30.934254 | 2020-06-03T08:02:44 | 2020-06-03T08:02:44 | 384,954,676 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | save_all_worker.py | from PyQt5.QtCore import (pyqtSignal, QThread)
from .helper import Helper
class SaveAllWorkerThread(QThread):
sig_done = pyqtSignal(int, str)
def __init__(self, _data_directory, _temp_directory, _destination_folder,
_image_base_name, _image_prefix, _image_suffix,
_selected_... |
a513dfd84b5d9267b7e96fedc88e5b6dabeea19e | a9a2f0994e6e7f2e8b502aef3ff6f0d9ae803714 | /tests/test_utils.py | fc09020941525a6c63e3f746677809046c851f2f | [
"MIT"
] | permissive | xjtang/yatsm | 9ef45587475b95bd80ba03fe42dff468e807900a | 66ecba5b2fe5510f5c43700ec3a5da5fe480def0 | refs/heads/master | 2020-06-16T08:34:03.452253 | 2017-06-12T15:29:08 | 2017-06-12T15:29:08 | 75,121,746 | 0 | 0 | null | 2016-11-29T21:02:35 | 2016-11-29T21:02:34 | null | UTF-8 | Python | false | false | 1,801 | py | test_utils.py | """ Tests for `yatsm.utils`
"""
import numpy as np
import pytest
from yatsm import utils
@pytest.mark.parametrize('nrow,njob', [(793, 13), (700, 1), (700, 700)])
def test_distribute_jobs_interlaced(nrow, njob):
assigned = []
for i in range(njob):
assigned.extend(utils.distribute_jobs(i, njob, nrow, i... |
6a5a6bdb0740d51426aa8b36dd3cc317103412b1 | edb1d932fa629daef44a388229e0e0747a4d3fa4 | /accounts/views.py | ac17cf704466e151a0cd1fa9a9f84be49d48b231 | [] | no_license | madhurMongia/blog-API | 5e33096854047ce64501673440f573aedf3a6e7a | 87ad2ae2f3795c228cd10aba64ea623458b4212a | refs/heads/master | 2023-06-22T10:47:58.332640 | 2021-07-18T13:58:05 | 2021-07-18T13:58:05 | 387,188,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,066 | py | views.py | from rest_framework.views import APIView
from django.shortcuts import get_object_or_404
from rest_framework.response import Response
from django.contrib.auth import logout
from rest_framework import status
from rest_framework.authtoken.models import Token
from .serilizer import UserSerializer
class RegistrationView(AP... |
04aacf9461ade2e229076ffdf85aca913037edad | 27e2b4b14d8217fcad3b57ef8918cb857931d89f | /train_transformer_navigation.py | 85ef173f8f515e339b7d58bffcf3573dc2433f07 | [
"BSD-2-Clause"
] | permissive | jhu-lcsr/good_robot | 205b31e9a2399032488ffa094d9f1e0d07592aa4 | 61217d65f040d536e54804150ce8abcf97343410 | refs/heads/master | 2022-03-31T23:49:04.958796 | 2022-03-25T18:14:14 | 2022-03-25T18:14:14 | 198,902,668 | 95 | 24 | BSD-2-Clause | 2022-02-18T20:45:13 | 2019-07-25T21:21:41 | Jupyter Notebook | UTF-8 | Python | false | false | 21,244 | py | train_transformer_navigation.py | import json
from jsonargparse import ArgumentParser, ActionConfigFile
import yaml
from typing import List, Dict
import glob
import os
import pathlib
import pdb
import subprocess
import copy
from io import StringIO
from collections import defaultdict
import torch
from spacy.tokenizer import Tokenizer
from spacy.... |
104c49941a79948749b27217a0c728f19435f77a | f052929a548ec311b45518f72c07df21f00be37d | /Hw4/p3.py | d990ec78d28678f8bff19345a2d6cfc4fb436a10 | [] | no_license | CameronA2018/Homework-Spring-2018 | 5f738f2730ef86648f4cebcbe6d823d4c81036a8 | 8dae7d8d154941fd0849534222adc6415e26d682 | refs/heads/master | 2021-05-03T22:15:40.682295 | 2018-05-08T02:55:01 | 2018-05-08T02:55:01 | 120,389,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | p3.py | import random
x = int(raw_input('Please supply a number: '))
y = int(raw_input('Please supply a second number: '))
z = random.randint(x,y)
print (z)
|
3605f46da25eb98767ca8d7248beaa07572d3171 | ad37a4f3c58d2c18766334105ab36a9909a70b23 | /9.py | 28d515e755df8adef60d34036b2a9511bbf6f60d | [] | no_license | luiscarlin/advent-of-code-2016 | 1f5831e9056c97343ba75ef1c64bc87f4a964bfd | d28f9b57b729ebdb0e6c99447ce35558761975a0 | refs/heads/master | 2022-12-13T03:02:24.734560 | 2019-01-24T11:11:35 | 2019-01-24T11:11:35 | 163,634,946 | 0 | 0 | null | 2022-12-08T01:30:39 | 2018-12-31T03:11:47 | Python | UTF-8 | Python | false | false | 488 | py | 9.py | processed_lines = []
for line in open('9.in'):
if line:
processing_pattern = False
new_line = ''
for idx, char in enumerate(line):
pattern_found = False
if line[idx] == '(' and line[idx+1].isnumeric() and line[idx+2] == 'x' and line[idx+3].isnumeric() and line[idx + 4] == ')':
patter... |
e7db3390d30f86e19eee930c48e5f848f41cc579 | c23c0fbe68068e294de929a508898ee8a2427a00 | /collatz_hypothesis.py | fa507dd00a13e89f2a9b7cd50cabd48971094bbe | [] | no_license | praveenpy273/pcap_netcad | 1bb804d9b2de558fee65aab6991096d78571667c | 86aa68eed3a50b6874c776b9737685d98294332f | refs/heads/main | 2023-08-28T06:29:07.245074 | 2021-11-03T18:52:04 | 2021-11-03T18:52:04 | 414,334,650 | 0 | 0 | null | 2021-11-03T18:31:38 | 2021-10-06T18:52:46 | Python | UTF-8 | Python | false | false | 1,237 | py | collatz_hypothesis.py | # take any non-negative and non-zero integer number and name it c0;if it's even, evaluate a new c0 as c0 ÷ 2;
# otherwise, if it's odd, evaluate a new c0 as 3 × c0 + 1;
# if c0 ≠ 1, skip to point 2.
# The hypothesis says that regardless of the initial value of c0,it will always go to 1.
# Write a program which reads on... |
c455de70a79f70f5f0e21391511f5035f1b4feb9 | b7b21b24849e2ad5bf91dbd1256a6802696beb83 | /test/base.py | 102e7a9fab20acccd345a8edd378af6c1cdba8a4 | [
"MIT"
] | permissive | pekrau/webapp-flask-sqlite3-template | d6106144142b5ddfbd5deb92462764d28657645f | c1839e8450de8af905742d7e28e677d7064da2ca | refs/heads/master | 2023-08-10T10:33:38.996337 | 2023-08-07T08:12:09 | 2023-08-07T08:12:09 | 221,880,582 | 2 | 1 | MIT | 2023-08-07T08:12:11 | 2019-11-15T08:37:10 | Python | UTF-8 | Python | false | false | 3,296 | py | base.py | "Base class for tests."
import argparse
import http.client
import json
import os
import re
import sys
import unittest
import jsonschema
import requests
SCHEMA_LINK_RX = re.compile(r'<([^>])+>; rel="([^"]+)')
JSON_MIMETYPE = 'application/json'
DEFAULT_SETTINGS = {
'ROOT_URL': 'http://127.0.0.1:5002/api',
'U... |
630480e9458491a26ea9060bd36541a0d5805a11 | 59d4c1d382c2360a6be4c76d1e3bea0a6db6a64b | /25_rest/util/parse_API.py | 79dbb7c829fdf74b2cf4f7c7ca85f8b716f87548 | [] | no_license | ryan-aday/RyanA-Soft-Dev | 81998ce4536927b275c09c54060bae03e9855e9e | ffb72be1a2c11b7ca81af81c4dabfeb52fbc5a18 | refs/heads/master | 2020-03-28T14:43:06.393021 | 2018-12-21T18:19:25 | 2018-12-21T18:19:25 | 148,514,851 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | parse_API.py | import urllib.request
import json
def kind():
data={}
with open("dataset.json", "r") as read_file:
data = json.load(read_file)
return data["kind"]
def items():
data={}
with open("dataset.json", "r") as read_file:
data = json.load(read_file)
return data["items"]
#Can add a bunc... |
016b64a2eb4af3034d54272c878fb917506d330c | d65927132ab9f76f9097f7deed6cff867e2b3318 | /AppSoftResources/admin.py | 38c837036062a9c44ac5527303fe399f42811650 | [] | no_license | xiaomeijun/hzkjs | 4fd20afb74393cb543ae1007cb383fdce2632002 | 01bea7df25ad93bd29858d1eb462549196b51b94 | refs/heads/master | 2023-01-28T12:24:20.219378 | 2019-09-24T14:35:28 | 2019-09-24T14:35:28 | 210,624,747 | 1 | 0 | null | 2023-01-11T19:52:45 | 2019-09-24T14:34:54 | HTML | UTF-8 | Python | false | false | 1,034 | py | admin.py | from import_export.admin import ImportExportMixin
from django.contrib import admin
from import_export import resources, widgets, fields
from .models import Addgroup,Addsystemname,Zhuanzhebushi,Yewuzerenbumen,czyylx,Zhuanze,Data
from import_export import fields, resources
from import_export.widgets import ForeignKeyWidg... |
cddb16a305f74eb1a3f2854208f8508c4a7a8953 | d3f47c4f648f9d1b1d488ed7ee0bc67b6bbf2aab | /webapp/app/forms/flows/unlock_code_request_flow.py | 92ad18205b97e5ccc7bc4c0f1c11af0d5b19e46b | [
"MIT"
] | permissive | ramboldio/steuerlotse | f1ee7df4c13337d60e66876e28b07ff11deff5bb | eeebb91be6c13435d621d105ffdb19e972c8f649 | refs/heads/main | 2023-06-16T20:32:06.712669 | 2021-07-02T12:28:14 | 2021-07-02T12:28:14 | 382,943,447 | 0 | 0 | MIT | 2021-07-04T20:34:12 | 2021-07-04T20:34:12 | null | UTF-8 | Python | false | false | 4,638 | py | unlock_code_request_flow.py | import datetime
from flask import request
from flask_babel import _
from markupsafe import escape
from app import app
from app.data_access.audit_log_controller import create_audit_log_confirmation_entry
from app.data_access.user_controller import user_exists, create_user
from app.data_access.user_controller_errors im... |
e597f1c8d7a811a6e0259bc5ce1470748361dc22 | 990ba8bb18c75f7c0afa5583bb9b5384e52186b4 | /VizXpress/gsea.py | 1c64712cee4edd61cfb7728e5f3cc33b07c28f47 | [] | no_license | ColtonGarelli/vizxpress | 9e49d18ee26d9878eeede510167563fb95ba887b | df4c8f3a9a9350ec4ecf9c70ddb86992064741dd | refs/heads/master | 2023-01-02T13:33:15.182048 | 2020-10-30T21:18:04 | 2020-10-30T21:18:04 | 308,735,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,422 | py | gsea.py | import os
import gseapy
databases = ('huMAP',
'Tissue_Protein_Expression_from_Human_Proteome_Map',
'Tissue_Protein_Expression_from_ProteomicsDB',
'Transcription_Factor_PPIs',
'Rare_Diseases_AutoRIF_Gene_Lists',
'Rare_Diseases_GeneRIF_Gene_Lists',
... |
742acce9aacc15dd4d7584b5ae750d6d6a0415af | 76e2b8ac9a9266018b11f5e456968a59e6dc1a61 | /utils.py | 73dd52837ad0a4be2c44ad49e290f22524423eb8 | [] | no_license | LucianoPereiraValenzuela/HEEM | 3ad6cc3402b58568e962f0f961a0934f77dd6636 | 2b9e314e1ee620c5ae44d7b5ba5992d8f26b3883 | refs/heads/main | 2023-05-12T03:09:52.140309 | 2023-05-10T12:41:23 | 2023-05-10T12:41:23 | 360,313,020 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 13,359 | py | utils.py | from typing import List, Tuple, Union, Optional
import numpy as np
import networkx as nx
import copy
import joblib
import contextlib
from tqdm.auto import tqdm
import time
from qiskit import execute
from qiskit.circuit import QuantumCircuit
from qiskit.providers import JobStatus
from qiskit.providers.ibmq.job import I... |
40b5577edadd0f3a4218059649eb2b67063f9ad5 | e972fcebf93e2c5dea85fb6a1dd8231df2e84f96 | /documentbot.py | 427d1d04e3a25686d30379c80f74c5b6618b8b92 | [] | no_license | Tenzzskiy/documentbot | b6043a876df82cfeb8935f3007e4186b53d9c72e | 2e29e91fa4cb2d77275dac038e09366f55156680 | refs/heads/master | 2023-04-26T05:06:17.931156 | 2021-06-09T17:32:33 | 2021-06-09T17:32:33 | 369,808,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,718 | py | documentbot.py | from telegram import Bot;
from telegram import Update;
from telegram.ext import Updater;
from telegram.ext import CommandHandler;
from telegram.ext import MessageHandler;
from telegram.ext import Filters;
import telebot
from telebot import types
from docxtpl import DocxTemplate
TG_TOKEN = ("1701456576:AAH7KdkRVig3tM6e... |
f41b995d9d1c1121c9acd0854d7d29b4c5d613ce | 2c4cd3541593f24db8251d2813e235297cbbe73d | /drivers/experiment1.py | c330a8d989e9bf272bf5fd9e9953f3547d6c19ef | [
"MIT"
] | permissive | vicramr/fashion-mnist | c020e7104c3245d5cbf3a593d8c90c229458a100 | de31b45a341e1890e96f250106f0679c342b4925 | refs/heads/master | 2020-07-28T06:45:43.219473 | 2019-09-25T03:44:30 | 2019-09-25T03:44:30 | 209,341,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | experiment1.py | """
This is the driver script for an initial experiment.
"""
if __name__ == "__main__":
import initialize
initialize.initialize()
import neptune
from src import utils
from src import constants
neptune.init(constants.neptune_project_qualified_name)
# Docs for create_experiment: https://ne... |
149cff4df76ed0064194274fe9eb9a30ad9ed584 | 1ba8ccd23270227b2347e676fbb124d2a33692b6 | /forum/views.py | 732cd2c9f2d1c866df06e7e700a8f7b560138043 | [] | no_license | ihorkoo/test123 | b3840988b9b616bbc00215ce5e8f98b65f9b5943 | b07e4da544fc050cfde8212e5493c75138fe05f9 | refs/heads/master | 2022-11-05T07:42:25.531297 | 2020-06-27T05:44:18 | 2020-06-27T05:44:18 | 275,307,895 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | views.py | from django.shortcuts import render
from . import forms
# Create your views here.
def add_post(request):
if request.method == "POST":
form = forms.AddPost(request.POST)
if form.is_valid():
form.save()
return
else:
form = forms.AddPost()
return render(reques... |
459242afaed20a7fb6afe8e68a26714c1b2b1cae | 9e7d546290f78fa663dd78ec9923b6b3b24eca08 | /blog/views.py | 7f9e6ba21555879b6d55ff93a3b677bb36d2214b | [] | no_license | HonkWu/Django_Blog | 9a05a2c60c7ff1d37159cd9813b4fb3388cb341e | bfabb4d477e2e554ab8b086507635b71de900b11 | refs/heads/master | 2021-01-20T01:04:42.930749 | 2017-04-24T08:32:10 | 2017-04-24T08:32:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,234 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render,get_object_or_404
from django.http import HttpResponse
from .models import *
import markdown
def index(request,page=''):
if not page:
p = 0
else:
p = int(page)
post_list = Post.objects.al... |
63dcdd022a40a570941e98f736f551735ea679cf | 56afef87e593f4a09da95ebeceb3b04940d7069f | /utils.py | a828480ee9dbd268c6120701bfd3c51a2cf32ac0 | [] | no_license | lucacopa/WmAgentScripts | 8bf3d3377a84be6172eb2b13214d8e7b2596d130 | c6884f005574506c27b4a09099d987e70734c7e5 | refs/heads/master | 2021-01-18T07:21:55.940980 | 2015-07-13T19:16:48 | 2015-07-13T19:16:48 | 12,436,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 47,071 | py | utils.py | import sys
import urllib, urllib2
import logging
from dbs.apis.dbsClient import DbsApi
#import reqMgrClient
import httplib
import os
import json
from collections import defaultdict
import random
from xml.dom.minidom import getDOMImplementation
import copy
import pickle
import itertools
import time
FO... |
61fb61379af3f23f6e053eaf8d7c1e5904a72afa | 2e8643fa9f4e2c93469569ad700544cf518d1c79 | /moldesign/simulate/qcfractal.py | 909b14772197e28914adb3897cfcce7c4f75626e | [] | no_license | exalearn/electrolyte-design | f8cdef032c24ab77495f3019854d4be946e45f27 | ef9e586e89053d1f6bea541717db8be43dbce0a4 | refs/heads/master | 2022-11-05T17:18:33.485938 | 2022-10-31T13:07:22 | 2022-10-31T13:07:22 | 212,376,159 | 4 | 1 | null | 2022-01-17T17:33:28 | 2019-10-02T15:27:28 | Jupyter Notebook | UTF-8 | Python | false | false | 29,582 | py | qcfractal.py | """Modules and functions for computing molecular properties with QCFractal"""
import os
import logging
from typing import Optional, Dict, Type, ClassVar, List, Union
import numpy as np
import pandas as pd
from qcelemental.models import Molecule
from rdkit import Chem
from qcfractal.interface import FractalClient
fro... |
63249393ad96271b4247ff30526e318add006a8e | 66e88676f6864d460668a240abc4aaf46f1c16a5 | /data_import.py | 45ac9477269e2b65bba2273c53700a8c62bac855 | [] | no_license | multiangle/MovieLens | 2f5dffd349b71cb917684c1b9f62b946ded13b1d | 97ca7ff1df08c3411a379e41602903bd83136292 | refs/heads/master | 2021-08-14T15:28:21.001596 | 2017-11-16T04:15:28 | 2017-11-16T04:15:28 | 110,913,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,418 | py | data_import.py |
import pymysql
import csv
import re
# 读取
# genome-score.csv
# genonme-tags.csv
# links.csv
# movies.csv
# ratings.csv
# tags.csv
def import_movies(path):
conn = pymysql.connect(host="127.0.0.1", port=3306, user='root', passwd='admin', db='MovieLens')
cur = conn.cursor()
cmd_pattern = "insert into {} valu... |
7ef2170323fb809f2c5f4dffe33af252198d64df | cf632fcb59d7e6990fcdbd2aac8b040275efe515 | /app.py | bbfa0d0a9acece2922b038f45cd9b02e6c39107f | [] | no_license | xosteve26/X-Pense | afa71aed356685456f2059523b61dacecabe182b | 46bc84087c11c2ddff9975364bdd61902698a13f | refs/heads/master | 2023-07-15T05:09:56.802975 | 2021-08-24T08:15:21 | 2021-08-24T08:15:21 | 361,632,102 | 0 | 0 | null | 2021-07-01T06:52:51 | 2021-04-26T05:48:20 | CSS | UTF-8 | Python | false | false | 24,122 | py | app.py | from flask import Flask, render_template, request, redirect, sessions, url_for, session,flash, Response,json
import psycopg2,psycopg2.extras
import csv
import bcrypt
import base64
import io
import pandas as pd
from dotenv import load_dotenv
load_dotenv()
import os
from sendgrid import SendGridAPIClient
from sendgrid.he... |
067336774ed2f12eb90e1946c622c82b0b898768 | e1861e54d5b28477853cc144ecf78a1ba5a021ac | /series_pagadas/serializers.py | 32361ea7b6bb79bd41a9e3b72ba311033567c0a6 | [] | no_license | luis-rios/back-end-clonvideo | 089f5d6e301449ef7a05136877787408be9c9605 | 09434a29182e657ed635bf80f020d6c8161862ed | refs/heads/master | 2023-03-21T02:03:47.639379 | 2021-03-20T08:22:59 | 2021-03-20T08:22:59 | 348,911,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | serializers.py | from rest_framework import serializers
from series_pagadas.models import Serie_pagada
class Serie_pagadaSerializer(serializers.ModelSerializer):
class Meta:
model = Serie_pagada
fields = '__all__'
|
70c869c6ed23e1ccbc5364d0bcaf9f4f5cac8f3b | b99bbc50ab1d039948ccf853963ae044a97498fb | /src/workers/calculation/formula/base/warrant_monthly_con_up.py | 53d12b242cc31be2a54a6734a750e036bb2fb41d | [] | no_license | fan1018wen/Alpha | 26899cc0eb6761bf6bd8089e7d12716c9e7ae01e | c50def8cde58fd4663032b860eb058302cbac6da | refs/heads/master | 2021-05-12T12:54:15.747220 | 2017-10-11T10:58:51 | 2017-10-11T10:58:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | warrant_monthly_con_up.py | con1 = REF(e, CON_CONTRACT_1)
warrant_list = REF(e, WARRANT, 30, start_date=begin_month())
month_rate = REF(e, WARRANT_MONTH_RATE, 30, start_date=begin_month())
gt_days = COUNTGT(month_rate)
e_variety = e.ch_variety
alert = gt_days >= 3
logger.info("当月%s数据为:%s,环比为:%s, 连续上涨天数%s,预警最小上涨天数:3天",
e_variety, w... |
57da6c473702e7cea072bfb12924ae8819312ed5 | f5c03c7c3fa8db462000591962e0b38349562899 | /main.py | 41429f9da2abbf24802a75dcf33793d6a6d03f7d | [] | no_license | deffeddef/data_fraud | 3a1a1451d4543114aae0f31450c31489a079a94d | 1e62dcc073f55c01926b864a063d2b3ec471b820 | refs/heads/main | 2023-04-30T21:43:29.787670 | 2021-04-26T12:43:12 | 2021-04-26T12:43:12 | 361,104,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | main.py | import sys
import pandas as pd
from merger import merger
from predictor import predictor
from transformer import loo_mms
from renamer import df_renamer
if __name__ == '__main__':
in_file, out_file = sys.argv[1:]
df = pd.read_csv(in_file)
df, ci = df_renamer(df)
df = loo_mms(df)
prediction = predi... |
44b1ec9190994fe53bfabcc9f93d0c8e2b78c724 | e129fe88e07243f86c4b37be36dde00d52bbf98c | /pangrams.py | e9dadd870e2500a837393904be99cdfb4734d511 | [] | no_license | kevinmandich/Bengal | 5d6af4bc0f7068e395899f8988185c15e894e4c3 | 2ada8695993f95f75ef8dea5c1e5c283b865092f | refs/heads/master | 2020-12-24T15:13:32.702288 | 2015-04-21T19:20:51 | 2015-04-21T19:20:51 | 30,218,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | pangrams.py | ## pangrams.py
## Challenge # 37
import os
import sys, string
with open(os.getcwd()+'\\pangrams_example.txt', 'r') as lines:
#with open(sys.argv[1], 'r') as lines:
testCases = lines.read().splitlines()
alphabet = set(string.lowercase)
for rec in testCases:
letters = set(''.join(rec.split()).lower())
dif... |
b8feb026bc330aa42f31d87e94cf9e6c71878836 | 3b35dd25bcd0afdf1c6275a52d83252c77376b73 | /Python/Assignments/9192017/dayAssign_project/apps/dayAssign_app/views.py | 8b851fbb11b61945238a36f0e35b67ba83455ea4 | [] | no_license | james-soohyun/CodingDojoAssignments | 913baa483f0635ce03fe3ae5310251fd50140903 | 3311acb8b3b1ac6fcd8815048742c605d7f97d3d | refs/heads/master | 2021-01-21T12:15:40.387886 | 2017-10-07T00:05:33 | 2017-10-07T00:05:33 | 101,955,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 544 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render, HttpResponse, redirect
# Create your views here.
def index(request):
if "name" not in request.session:
request.session["name"] = ""
context = {
"name": request.session["name"]
}
return render(request, "dayAssi... |
a731c8906bb2cfa082068562146c5cb91be5d346 | dcc67a53dac3dd476cac3a7aa65fb3552ffb27da | /assets/set_mask.py | fe3e326463e2c284f8bc670a6aabaf7e92ba2159 | [
"MIT"
] | permissive | tt1248163264/2d_car | 3064a567ad9c5d073305eb7471fbf22321581d93 | 0251584dad3322a69de070374245ca3be0d2ab6c | refs/heads/master | 2022-01-16T17:34:53.052464 | 2019-08-29T15:08:08 | 2019-08-29T15:08:08 | 204,912,800 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,863 | py | set_mask.py | import numpy as np
from PIL import Image
model_index = 2
size = 30
model_name = ['car','obs','goal']
if model_index == 0:
car_array = np.empty((size,size,4),dtype=np.uint8)
mask_array = np.empty((size, size, 4), dtype=np.uint8)
offset = size / 2 - 0.5
th = size / 2
for i in range(size):
fo... |
538fd5810b2bec6c935581f274cbb22664f57748 | e3d17d8063c44f3c0b458d3f6b7072591c8ae664 | /command_line_arguments/fun_conv.py | 762176ba492ac2258385d54f431adfed0406ddd1 | [] | no_license | Athira-Vijayan/Python | bf3999ab1ab12bf6715bc6435fb52e0582bc4f23 | 5e4c430a183426d0d965326f5fd166fa3c6326b5 | refs/heads/main | 2022-12-29T05:26:20.025345 | 2020-10-18T12:01:53 | 2020-10-18T12:01:53 | 305,091,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 101 | py | fun_conv.py | a=10
b=bin(a) #bin function
print(b)
b=oct(a) #oct function
print(b)
b=hex(a) #hex function
print(b)
|
8d108402f50f8e20a5895eaba29cd076ab744e5b | fcaf6d887f2fdd049eeefdabb42553a30e773790 | /app/urls.py | 703ba3fc1169bf99bf02671b20f3d323ce31efd3 | [] | no_license | ElegantCoders/calligtaphy | 912062331ae9ef959bacbf42e820d072907a2fe7 | fc90adf5849809d6f41527824b6f7768ff33828f | refs/heads/master | 2021-04-13T09:56:52.239466 | 2020-04-06T07:20:11 | 2020-04-06T07:20:11 | 249,153,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | urls.py | from django.conf.urls import url
from app import views
urlpatterns = [
url(r'^index/$', views.index, name='index'),
url(r'^article_detail/(?P<pid>\d+)/$', views.article_detail, name='article_detail'),
url(r'^search/$', views.search, name='search'),
]
|
c2d730592d9d69517c830f711bdf9de29c2a64e7 | 613bde9551e4b96c1b9bc327569fbe34fb0c518f | /create_jiayuan_urls/create_jiayuan_urls/RandomProxy.py | bec79533db77ee7e345a1bbff0e86f6f81ce42f5 | [] | no_license | lnytx/jiayuan | c6dba3dad0f4aa9b66b575d7e2494b2047c856dc | 1da0aace7e948066f069e9e60249b6f51081f81d | refs/heads/master | 2020-03-10T05:38:54.247582 | 2018-04-21T16:19:27 | 2018-04-21T16:19:27 | 129,222,416 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 8,233 | py | RandomProxy.py | # -*- coding: utf-8 -*-
'''
Created on 2018年3月1日
@author: ning.lin
设置代理IP
'''
#定义几个全局变量
'''
从http://www.xicidaili.com/获取代理IP,并验证是否能访问爬虫目标网站
如果不能访问,则删除,
'''
#定义几个全局变量
'''
获取网上的代理IP
'''
import datetime
from distutils.command.check import check
from multiprocessing import Pool
import multiprocessing
... |
ad8bff38c37f8964a32c80747af8233ab7a3874d | 0f5371d44c9700550b49eae4bfa5e92441f4ce92 | /examples/processes/helloWorld/main.py | 1c17e27e94efccd57b4d5268f042d9780a009d15 | [] | no_license | drasko/weio | 9d230db565589c2232fe164f6c0365ce191ebb8d | a2be5b842ddf8c01fb55b3026acc81c6545f5c7a | refs/heads/master | 2016-09-05T12:53:59.396764 | 2015-05-12T21:08:40 | 2015-05-12T21:08:40 | 2,676,111 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | main.py | #######################################
# #
# HELLO WORLD ON WEIO #
# #
#######################################
# Description: Print "Hello World" message to the console
# WeIO functions: none
from weioLib.weio import *
def setup... |
cfd8d2a230b50663efcd382e442cc20695746d00 | ad2925c2324a357f35944be0e72a936b5c52f516 | /6.4.py | 39f3f35246adbf3a0ce154197e60beab84d34969 | [] | no_license | teoluna/thinkcspy | 69774df4c39c9247ea911a9cca716a772ff44203 | 027b3859921f14671501e1de652cc345b7d29f81 | refs/heads/master | 2023-01-14T14:13:00.773554 | 2020-11-18T16:54:52 | 2020-11-18T16:54:52 | 277,871,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | 6.4.py | import turtle
def drawSquare(t, sz):
"""Make turtle t draw a square with side sz."""
for i in range(4):
t.forward(sz)
t.left(90)
wn = turtle.Screen() # set up the window and its attributes
wn.bgcolor("lightyellow")
alex = turtle.Turtle() # create alex
alex.color('darkolivegreen')
al... |
0e97b40c4c9d406dd8648796e7b58a9349e2d110 | c522b0332ee42d01f1ee5bdd3cdd3d72eb9af24b | /venv/lib/python3.8/site-packages/edc_offstudy/admin.py | f0e626729b6bda1a21deda6225d4bb4a13037ab5 | [] | no_license | Jeffkent01coder/trackphone | e5aad6f99efb0f0c11f260d1f2a0b232d5453dfe | 3570375938c7e947eb272d2cec1589202351141c | refs/heads/master | 2023-05-10T22:27:40.255686 | 2021-06-02T10:23:17 | 2021-06-02T10:23:17 | 373,125,235 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 276 | py | admin.py | from django.contrib import admin
from django.contrib.admin.decorators import register
from .admin_site import edc_offstudy_admin
from .models import SubjectOffstudy
@register(SubjectOffstudy, site=edc_offstudy_admin)
class SubjectOffstudyAdmin(admin.ModelAdmin):
pass
|
9ca1533fd9b9ae96033b462d09c9baa0110b9579 | 40bf0d903b71151435ff06d45abf82f4ce74dbb6 | /SPOJ/ADDREV2.py | ed0210592e4a6e9dc84abe55166d87e7e4c50180 | [] | no_license | ccusrz/hakuna-matata | 845b1eeb3df1a28383efc59205a892da7b2c6f32 | 39d5e0f267d1b4ac4dcab307118bcf812e205218 | refs/heads/master | 2023-04-10T19:28:58.322067 | 2021-04-22T00:19:07 | 2021-04-22T00:19:07 | 271,941,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 212 | py | ADDREV2.py | #Second approach for https://www.spoj.com/problems/ADDREV/
#author: ccusrz
#2020-09-01|23:53:56
for _ in range(int(input())):
y = input().split()
print(int(str(int(y[0][::-1]) + int(y[1][::-1]))[::-1]))
|
79308bfa6b0c2de1c68a83264ec73f55248c4e7d | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/straggl.py | 8636a3d151a20375c07013ed4be594ee85795f6a | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 878 | py | straggl.py | ii = [('GodwWSL2.py', 1), ('FerrSDO3.py', 1), ('RennJIT.py', 1), ('LeakWTI2.py', 1), ('KembFJ1.py', 1), ('AubePRP.py', 2), ('FitzRNS3.py', 5), ('WilbRLW2.py', 1), ('RoscTTI3.py', 1), ('AinsWRR3.py', 2), ('CoolWHM.py', 1), ('ClarGE.py', 3), ('IrviWVD.py', 4), ('GilmCRS.py', 2), ('DaltJMA.py', 1), ('WestJIT2.py', 1), ('D... |
848b9465f27210740a8cde813b044426a864f2ef | a6ab4e75acd49c83b15b2487990331f767e270ba | /scr/py10_Loop.py | 5d9f8925b7be44d531807b915fcf8177e713c941 | [] | no_license | usedvscode0/01_W3Cschool_python | c8567ee52682a9f53beaff2ae00e54be440241f5 | 9020d156b5b8c2f924a3daceedc2b4466b1ba113 | refs/heads/master | 2022-12-25T05:29:44.562532 | 2020-09-27T06:53:04 | 2020-09-27T06:53:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,354 | py | py10_Loop.py | # coding=utf-8
'''
Python 循环
本章节将为大家介绍Python循环语句的使用。
Python中的循环语句有 for 和 while。
Python循环语句的控制结构图如下所示:
'''
# while 循环
# Python中while语句的一般形式:
# while 判断条件:
# statements
# 同样需要注意冒号和缩进。另外,在Python中没有do..while循环。
# 以下实例使用了 while 来计算 1 到 100 的总和:
n = 100
sum = 0
counter = 1
while counter <= n:
sum = sum + counter
... |
696482c55d931b79120e6c18a3e9cde5c84774dd | 5f016d5f8893cba77cff59a3c8c2ac374dc83d70 | /python/tests/flow/test_offload_schedule.py | c6365bbe184abdb7c26e6dcd2865fde8823b2e2b | [] | no_license | wuyangzhang/elf | ef767f47973e871fe30014b876ba3e989910cff0 | d7ba4544dba028c32ecc6aeb71a7fbe5f9a56654 | refs/heads/master | 2021-12-09T05:54:21.106302 | 2021-12-08T03:21:40 | 2021-12-08T03:21:40 | 319,168,106 | 56 | 20 | null | null | null | null | UTF-8 | Python | false | false | 1,248 | py | test_offload_schedule.py | import unittest
from flow.offload_schedule import *
class TestOffloadSchedule(unittest.TestCase):
def test_prioritize_larger_rp(self) -> None:
ordered_rp_boxes = prioritize_larger_rp(
[
np.random.rand(100, 100, 3),
np.random.rand(50, 50, 3),
np.... |
8bad2234362158242aab577d486285957cfe6266 | baa2c6f22ff563d417e34692bf3345077eb8fa5f | /IPython/utils/colorable.py | 1e3caef62b4a8efa897724591dfd36334ccbdd47 | [
"BSD-3-Clause"
] | permissive | ipython/ipython | c42ea223b6e391bb7dd39888cb959d4d5d6b21a1 | e5103f971233fd66b558585cce7a4f52a716cd56 | refs/heads/main | 2023-08-30T18:27:18.436521 | 2023-08-29T12:16:00 | 2023-08-29T12:16:00 | 658,518 | 13,673 | 4,729 | BSD-3-Clause | 2023-09-12T20:22:09 | 2010-05-10T04:46:06 | Python | UTF-8 | Python | false | false | 786 | py | colorable.py | #*****************************************************************************
# Copyright (C) 2016 The IPython Team <ipython-dev@scipy.org>
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#********************************************... |
1898949a3730741f3b4ebb2e09084d7a07e50a34 | 3493b3a3bdf082680b6f6257d107eddf6cb59dc1 | /examples/inference.py | 4dd5eef64c51c50dd2f4535e7fed5c627457843c | [
"MIT"
] | permissive | marcociccone/pydensecrf | 6613b3b7c82079a5225be915b7c0a2bb36d353a9 | ef57b7a4d4f5578c477082f8749d4d4c4cbdbcbe | refs/heads/master | 2021-01-22T18:10:42.635495 | 2017-03-15T11:37:03 | 2017-03-15T11:40:13 | 85,065,433 | 0 | 0 | null | 2017-03-15T11:40:26 | 2017-03-15T11:40:26 | null | UTF-8 | Python | false | false | 4,868 | py | inference.py | """
Adapted from the inference.py to demonstate the usage of the util functions.
"""
import sys
import numpy as np
import pydensecrf.densecrf as dcrf
from dataset_loaders.images.cityscapes import CityscapesDataset as Dataset
from skimage.color import label2rgb
from pydensecrf.utils import (unary_from_labels,
... |
9620727c03a5b9cc102102062b0d0f2e6fce5435 | bc61976de5effc91cd6a9f74faee6110c2f78bc9 | /teachers/views.py | d0233a778ff37856d66e2c5fee003e76e58d07ae | [] | no_license | Satqeleyt/my-first-blog | 580847ec12e3326420842cf6bda92f545c0b61c8 | 3541eb57add9e97c4294845865a5216d9e064646 | refs/heads/master | 2022-12-28T21:38:04.959333 | 2020-10-12T20:13:20 | 2020-10-12T20:13:20 | 303,502,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | views.py | from django.shortcuts import render
# Create your views here.
def index(request):
return render(request,'teachers/list.html')
def detail(request):
return render(request,'teachers/detail.html')
def search(request):
return render(request,'teachers/search.html')
|
d92ba446a1bf03e6c6831602f040101f7861ec2c | be5246fd9a88c027510daafa81846af7ea28d349 | /EnumSubDomain.py | 6cf0eb6dc3ace54799b875af01fd1d56dfd24db4 | [] | no_license | whojeff/DomainRecon | 1747fb76f79b38eb53b5f68b5e5ef6b7a30d346f | c8e3727be2b2422e66dfaad8b7c9ce6c8bc6bb17 | refs/heads/master | 2020-04-23T22:33:40.111150 | 2018-12-06T05:22:27 | 2018-12-06T05:22:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,861 | py | EnumSubDomain.py | #!/usr/bin/python
#Files used to get subdomains using recon-ng and sublist3r
import sys
import datetime
import os
from Sublist3r import sublist3r
import csv
import string
import glob
import socket
import argparse
from GlobalVariables import *
import subprocess
import dns.resolver
import logging
import coloredlogs
seB... |
ed1377cb519d9e5a900ecb4a7cf6840e6211bd5d | 670a2667bdb87882373c0e05199426bdbda68f56 | /utils/vtk_utils.py | 1492464a44ae4ffa77342cd757a931feb1adc061 | [] | no_license | OSUPCVLab/antoinette | 7378f8967c3e8420edb9c051e72dac4242af812b | 7122966d0c77e9858b6edc1a8857ffbdeefb8357 | refs/heads/master | 2022-01-16T09:28:13.227431 | 2019-07-11T19:45:40 | 2019-07-11T19:45:40 | 110,562,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,517 | py | vtk_utils.py |
import vtk
import vtk.util.numpy_support as nps
class MyInteractorStyle(vtk.vtkInteractorStyleTrackballCamera):
def __init__(self,parent=None):
self.parent = vtk.vtkRenderWindowInteractor()
if(parent is not None):
self.parent = parent
self.AddObserver("KeyPressEvent",self.... |
4e3dc7ab608438a0a486fa49f6bec491565ae1fd | e73b91ff80ad6b5daa42a2ce3b11443c41762a72 | /CRUISE/cruiseWeb/views.py | 085124e760c744fed47cd8e392a5e8c662d4dd85 | [] | no_license | cylim91/cruiseweb | e21829e776bd58a04c57962cd801172619d4eaa7 | 62d3873192a9d0d6b20a8c03945fb61a80513f64 | refs/heads/master | 2021-06-21T16:04:40.591272 | 2017-08-15T03:48:19 | 2017-08-15T03:48:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,209 | py | views.py | from django.shortcuts import render
from cruiseWeb import forms
from cruiseWeb.models import Tweet, ObtainedDataNER
from django.forms.formsets import formset_factory
from django.db.models import Avg, Min, Max
# Create your views here.
def index(request):
return render(request, 'cruiseWeb/index.html')
def aboutUs(r... |
18f13cc67af240546bdd53e2862113016e023d84 | 2be1a2f8b0ff3711b265edf36683bf654d309a06 | /viento/urls.py | df8016bb98126d8d1b7dc87c9cac26112d3aae60 | [] | no_license | liaz98/viento | 672afaede36e621e75441218fa90166d745f7d24 | d12f398f926584be3551c5984d5894b2ee270ab0 | refs/heads/master | 2023-04-01T18:33:08.473471 | 2021-03-18T13:54:22 | 2021-03-18T13:54:22 | 317,941,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | urls.py | from django.contrib import admin
from django.urls import path,include
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
#svoy
path('', include('apps.home.urls')),
path('service/', include('apps.service.urls')),
path('portfo... |
980fa9c519eaa18a9b5e9bbecf563752eaaa9087 | 4aa2c50dfed10946fb674274d27021cd0a0c9af9 | /tests/archives/apsw_tests.py | 42689ea79152f3b27884738a87cbe9087129ece9 | [
"MIT"
] | permissive | fuzeman/stash.py | 1c6e9ee127aca0d76117257ae51c2df9473ecd59 | fde5190a596a09f47e7ea2acdd6bd1f089cefe03 | refs/heads/master | 2020-04-12T18:18:54.859180 | 2015-09-12T08:38:13 | 2015-09-12T08:38:13 | 32,427,239 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,622 | py | apsw_tests.py | from stash import Stash, ApswArchive
from stash.lib.six.moves import xrange
from stash.lib import six
import pytest
def fetch(cursor, query):
result = cursor.execute(query)
return dict(list(result))
def test_construct():
st = Stash(ApswArchive(':memory:', 'one'))
assert type(st.archive) is ApswArc... |
5f696a9cfbb295a234b93e6dae88eaa56fd4c2e5 | 78bc825cbab69718c6e491e583852ea18aec784d | /utils/fingerprints.py | 6178d9e830fe2f48aaef62e86a94be712ff0cb46 | [] | no_license | avsilva/sparse-nlp | 227023066763ba324126823521b39d2f020a6d77 | cff66ba34aaea37bfb28328a6801a35267544692 | refs/heads/master | 2021-08-02T23:11:20.745913 | 2021-07-25T17:58:07 | 2021-07-25T17:58:07 | 114,757,397 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,733 | py | fingerprints.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
from PIL import Image
from PIL import ImageOps
import numpy as np
import operator
from functools import reduce
from sparse_som import *
import utils.corpora as corp
import utils.database as db
import concurrent.futures
import math
try:
import conf.conn a... |
f74d860a85ac05a3381b039fcfe369d6506db305 | 1a73e4c662f7f7f0aaf660f6e6b7de5c6c0b94b6 | /orig/network/io.py | 1e1a5fb5c958ecdde8ede1fa58bd342c831227db | [] | no_license | ecohealthalliance/eha_grit | 99fbfdb94a18e8240c7ee1df46072e1adaa585c3 | d9109b3fa60756e79f6f5954542710e0b39d1ed1 | refs/heads/master | 2021-01-18T01:45:15.883157 | 2013-03-04T17:40:03 | 2013-03-04T17:40:03 | 8,560,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,825 | py | io.py | import csv
import networkx as nx
from networkx.readwrite import json_graph
Y = 100
MINOR = 25
def read_table (path):
nodes = []
#buffer = open (path, 'r').read ()
#buffer = buffer.replace ('\r', '')
#rows = buffer.split ('\n')
rows = csv.reader (open (path, 'r'))
contrib = []
for elem in ... |
69d5aaea961d522841a04a5484f44e80163f90f2 | 442c8aa0a95a8b3a74f5cfa8b67601bb0075bb14 | /analysis/_nbdev.py | a3e7e5a65e3d7faf638c22c0464e1d7ec946ac31 | [
"Apache-2.0"
] | permissive | t-kl/analysis | 0e5bb537c23db2643e0a371dae8ddec252d6a74c | 3a7d27f27bf38b3ee19364e04bfc8b0ab96990d5 | refs/heads/master | 2023-06-08T02:10:18.306328 | 2021-06-26T21:17:19 | 2021-06-26T21:17:19 | 368,447,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | _nbdev.py | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {}
modules = []
doc_url = "https://t-kl.github.io/analysis/"
git_url = "https://github.com/t-kl/analysis/tree/master/"
def custom_doc_links(name): return None
|
b9867e90d7d2a470468d302f8e0e9d0e720e6ba7 | c00c30948156ab39d2253f238d218a2ced3f6aff | /udatestys/hw2_2.py | 7b00fcfbcadfad6fc60cb783ea5f7dc83e85b29f | [] | no_license | hadtien/cs253webdev | c6f22bb554389748e3c9edcc8b5f413a3b4fd6e0 | d3aebf320d3bb50cca215eecfb87e6910f6b0089 | refs/heads/master | 2021-01-01T17:05:56.511636 | 2013-12-19T10:02:02 | 2013-12-19T10:02:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,347 | py | hw2_2.py | import webapp2
import cgi
import re
def escape_html(s):
return cgi.escape(s, quote = True)
form = """
<h2>Signup</h2>
<form method="post">
<table>
<tr>
<td class="label">
Username
</td>
<td>
<input type="text" name="username" value="%(uname)s... |
495f08acc75c68bb48c42bfa91f2c8c4f7c18365 | 17cd14f7351296d326b41a03f1420650824cd255 | /utils.py | 7bc33a81ced29b209b111ab6bb98b6e57025689e | [] | no_license | master8/vacancies_analyzer | 75a29312c39d2b80a2e0c5318f2dc00340fdbaa1 | 5d1d8a46ee90e80aa6bb3746eb5156838951e755 | refs/heads/master | 2021-07-14T14:41:25.596192 | 2020-05-06T17:25:50 | 2020-05-06T17:25:50 | 160,858,741 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | utils.py | from datetime import datetime
def get_date(date: str) -> datetime:
return datetime.strptime(date, "%Y-%m-%d")
|
3a4c4875f8042964f14413729e033410e98c2549 | 1175a18aa75918f5dcb47916e44e3a76a5f5f20e | /exercise-7/hello_s3.py | b19587004f06d1aea84eef008e85ba823266c5cb | [] | no_license | JohnPetersen/nd063-c3-design-for-security-project-starter | c268743a49d3a9c144a00a24f184a3bdeb0069cc | 48dd580e137da5d3d1e0215f5abd1f4c3df826d6 | refs/heads/master | 2023-06-15T20:32:07.316502 | 2021-07-12T05:13:18 | 2021-07-12T05:13:18 | 383,266,846 | 0 | 0 | null | 2021-07-05T21:19:28 | 2021-07-05T21:19:28 | null | UTF-8 | Python | false | false | 229 | py | hello_s3.py | import boto3
# From https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html
# Let's use Amazon S3
s3 = boto3.resource("s3")
# Print out bucket names
for bucket in s3.buckets.all():
print(bucket.name)
|
bc7df5702c34cc856f7ffd61d30878bfa462bca5 | 88befc86d48ec5f94834a48545765850c47008e9 | /aardvark/test/test_diff.py | 484a48dca9f6d4df3fe07bccb40f4bef5abe6631 | [] | no_license | chuck1/aardvark | 6d7f88f53532f01593ce43c446980994a0169fc5 | 2a6cf83d3557e76ada4ae0c6dc24ed1a27350c04 | refs/heads/master | 2021-01-25T12:49:04.668874 | 2019-01-16T19:43:11 | 2019-01-16T19:43:11 | 123,512,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,542 | py | test_diff.py | import json
import aardvark
import pytest
def _test_serialize(diffs):
diffs1 = [d.to_array() for d in diffs]
json.dumps(diffs1)
diffs2 = [aardvark.from_array(d, aardvark.FUNCTIONS) for d in diffs1]
return diffs2
def _test(a, b):
diffs = list(aardvark.diff(a, b))
print('diffs:')
for d i... |
b4d00525b64b034234a25472f36503bb632119ad | 39ac10a3c5bf702280bffef2c4164bf207fe9405 | /dragonRealm.py | 7a057d9ca094ce01fd890701cd903b3ff51448dd | [] | no_license | Sweept/p_game | 008aa135dbd04d3b2361995c005a6447a08aa6d4 | 38cbbbdbd00f74cb6d08d9bfa030ad0341a3f84a | refs/heads/master | 2022-11-29T22:44:41.611285 | 2020-08-10T21:10:15 | 2020-08-10T21:10:15 | 274,228,021 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,252 | py | dragonRealm.py | import time
import random
def displayIntro():
print("You are in a land full of dragons. In front of you, you see two caves. In one cave, the dragon is friendly and will share his treasure with you. The other dragon is greedy and hungry, and will eat you on sight. \n")
def chooseCave():
cave = ''
while c... |
83159881c2002e6a0d531323de91ac4fc878857f | c7db9fef24ed5224f90cc8ff27d170f81b9b881b | /programmers/programmers_네트워크.py | 6d338eca9fc63316bbc6f67040387aee394c5430 | [] | no_license | jwsong0617/problem_solving | 77e644bea4adc0c40bc1fa7329ca9816dc90fd78 | a6d8ce1f1158313ecf6b6dfe3790b7b5b4a7d47e | refs/heads/master | 2021-11-22T12:27:18.482611 | 2021-09-26T11:27:24 | 2021-09-26T11:27:24 | 245,603,489 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | programmers_네트워크.py | def dfs(computers, visited, root):
stack = [root]
while(stack):
j=stack.pop()
if(visited[j]==0):
visited[j]=1
for i in range(len(computers)):
if(computers[j][i] == 1 and visited[i]==0):
stack.append(i)
def solution(n, computers):
answer=0
... |
2c2f263030689e11daea8ae1e7a08e4232615c8a | fecb38ba9a5ad8a3173eaf0424309b97f5473898 | /get_texts.py | 93285a013f17d82a333953760e348a374b3f400a | [] | no_license | SamuelSebastianMartin/plagcheck | b39d43cc835bf4cc5863a4362c047c7b52c2b457 | 2bcaf990ee52c09b40341fe48fc66fffa505599a | refs/heads/master | 2023-02-05T23:08:33.546440 | 2023-01-30T09:45:51 | 2023-01-30T09:45:51 | 141,917,874 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,142 | py | get_texts.py | #! /usr/bin/env python3
'''A module to use with 'plagcheck.py'''
import docx
def filepicker():
import tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
file_path = filedialog.askopenfilename()
return file_path
def open_text(file_path):
doc_object = docx.Doc... |
1d71316ca0a815886f6a8041d9c67be97a82c1eb | d38c81ce2a08e5020c6ba5ccf3af1d6081d2d9b8 | /app/admin.py | 3d21351cd207100e9201dd6fa522a66c6ca3bb13 | [] | no_license | belaidimohamed/Back-Book | 0b7b7c7d502228fc7cf8062afb2accd3d87370c9 | aeed2152d132bfd222bc88d6d6bfc0c70a841ed7 | refs/heads/master | 2023-08-30T20:52:24.545744 | 2021-10-09T20:14:45 | 2021-10-09T20:14:45 | 268,225,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | admin.py | from django.contrib import admin
from .models import UserProfile , Friends , Messages , Forum , Groupp
# Register your models here.
admin.site.register(UserProfile)
admin.site.register(Friends)
admin.site.register(Messages)
admin.site.register(Forum)
admin.site.register(Groupp) |
9a5b036228ec9c559c6171857377b33446cca862 | 7ff74a4c212340d5a198a365e3a03db731ad77a2 | /validador.py | cafd93d87f524cc1ff4edf141ecd0bb64de5207a | [] | no_license | jovemsabio/CPF-Calc | 704ee62466605e1ce9fdb9662d809f522cbfab7c | 56c3aadc6755872059343985f61755f42b0adae2 | refs/heads/master | 2023-04-23T10:05:33.655148 | 2021-05-02T05:05:47 | 2021-05-02T05:05:47 | 363,565,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | validador.py | def validaCPF(CPF):
"""
Valida o cpf informado
Função para validar o número de CPF informado
:param CPF: Número do CPF como string
:return: True, quando o CPF for válido e False, caso contrário
"""
CPF = CPF.replace('.', '').replace('-', '')
cpf = list(CPF)
# print(cpf)
try:
... |
97fbe3940bbd2f4c49224253a54f7a187e89d44e | db20f40a92ac3f5e2b8435fe45cd491e39e8854d | /apps/app.py | f1b8170a1e1bff3c5972f3dc52cebd312a7f4005 | [] | no_license | yebisu14/passiveIncome | b838b033f08c3d9f5142890c54ccdadc58ccdb81 | 0a12c30a35f9685dc1352abc46e20ed13f60ff27 | refs/heads/master | 2020-03-28T00:58:39.900499 | 2018-09-28T09:07:55 | 2018-09-28T09:07:55 | 147,466,312 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,131 | py | app.py | # -*- coding: utf-8 -*-
from flask import Flask, render_template, request
import sqlite3
from pathlib import Path
from web3 import Web3, HTTPProvider
import configparser
import json
"""
定数
"""
DB_NAME = "./data.db"
"""
コントラクト設定
"""
config = configparser.ConfigParser()
config.read('./config.ini')
contractAddress = co... |
134630b283fb730eae7ac0e8a6f6a377c20226d5 | d06eac41b0920d1c50cacd8e99513a4b233ebc68 | /cap3/79_Greatest_Common_Divisor.py | 15282dbfe60cac3cd776ba012484df4c889aa15b | [] | no_license | RobRoger97/test_tomorrowdevs | 81cff72e4e7aafafa32a3de8b84868add3946d58 | 2691174740fe7c647396c536c472db608605b727 | refs/heads/main | 2023-01-13T23:44:40.964483 | 2020-11-15T20:05:34 | 2020-11-15T20:05:34 | 304,426,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | 79_Greatest_Common_Divisor.py | # Read two positive integers from the user
n = int(input("Enter a positive integer: "))
m = int(input("Enter a positive integer: "))
#Initialize d to the smaller of m and n.
#While d does not evenly divide m or d does not evenly divide n do
#Decrease the value of d by 1
#Report d as the greatest common divisor of n an... |
ae2f459e5263f76982ecea2136ff661aadef2e06 | bf1eed001e0086451c9a2fa0c26cbaffb1fe2b91 | /old_crap/RInvoke_blondel_perm.py | 754f33ea3654df9011e0a668a057e1aafe858097 | [] | no_license | michaelandric/pandit | 832003c89f945acebef0f54ca105cdf1c1705e04 | 1b14cf2bea27bc4187e35e53cd88ca21ff922007 | refs/heads/master | 2020-08-08T20:33:10.320039 | 2015-09-17T16:51:45 | 2015-09-17T16:51:45 | 12,726,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,351 | py | RInvoke_blondel_perm.py | #!/usr/bin/python
import os
import sys
from subprocess import call
from subprocess import Popen
import shutil
"""
This takes batch starts and finishes.
"""
R_SCRIPT_PREFIX = sys.argv[1]
#group = sys.argv[2] # this is either 'A' or 'B' for a permutation
start = sys.argv[2] # the permutation number
finish = sys.ar... |
78f6733f5f9265e7239ff5713f64d062e9b275b9 | b2b8e93923aaf9a49a46f37ea881e68c3289101d | /AI/day04/Antique_Maze/submit/antique_maze.py | 7d00a320565e2f532fa113c88e1db77e56b14ff5 | [
"MIT"
] | permissive | Aelerinya/Pool2021 | ba8d1e900cfb547a81abca137d48e86fd08d6f6b | cc64658039dee04127a3a641f891781c53647244 | refs/heads/master | 2023-07-22T10:09:29.661756 | 2021-03-07T13:52:41 | 2021-03-07T13:52:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,174 | py | antique_maze.py | import random
from collections import namedtuple
from Envi import Env
Transition = # Define namedtuple
BATCH_SIZE = #Define batch size
GAMMA = # Define gamma
LEARNING_RATE = 0.001
class Memory(object):
def __init__(self, capacity: int):
# Need some code
def clear(self):
self.memory: list... |