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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a916ee6ab07884e7b61d233fb81c7aaaeb6379db | dcb9b7d0d11ec3595ba842887d023ab63b3cd24b | /POM/FooterNav.py | bb6575d93a0a21c81c8dcf83b6f6ee6066ef8859 | [] | no_license | sweetyvagrawal/Travolook_test | 7ad7a4975447886bcff2d6eeb77ded1b18cf11c2 | 83ebe19f1825ec0fcf975b8bbf0bdebdbae7a908 | refs/heads/main | 2023-01-23T22:57:31.155401 | 2020-11-19T17:28:26 | 2020-11-19T17:28:26 | 310,079,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,874 | py | FooterNav.py | from selenium import webdriver
class FooterNav:
def __init__(self, driver: webdriver):
self.driver = driver
def home_link(self):
return self.driver.find_element_by_xpath("//ul[@class='footermenu']/li[1]/a")
def about_us_link(self):
return self.driver.find_element_by_xpath("//ul[@... |
f931f0554b5f278d502ef7abfb8561e049dc60cc | 7d02813987b49c2a69d92b9b2fdf5148af37274f | /case/About_locust/press.py | 1fd6a35fa72700b1a937ea3df45565ada01a86e0 | [] | no_license | xgh321324/api_test | 29e01cbe5f0b7c2df25fb7e781cedf8031140c72 | 2575495baac3ab90adab7a7a85904c38a78dd4b7 | refs/heads/master | 2022-07-23T19:54:39.320828 | 2022-07-02T09:13:35 | 2022-07-02T09:13:35 | 129,185,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,170 | py | press.py | #coding:utf-8
import threading
import requests
import time
from datetime import datetime
from common.login_lanting import auto_login_by_UID
from common.Hash import get_digit,get_sign
#这是自己写的一个进入课程主页的接口的压力测试
#利用多线程
#
class Stress():
def __init__(self):
self.url = 'http://api.lesson.sunnycare.cc/v1/lesson'
... |
84f3d9919a09f887a7ee50c273b5e0e0d1df7d71 | 4ad7618e4b08d0c48f7b8c9ff074564d5e157b08 | /6075.py | d41da42e7b87d416799a2c1a90e9d870c23e35ca | [] | no_license | KRLEESEUNGJAE/codeup | 2038fb02b938bfa9a85a6b12827954f6db0fec02 | 14299d00725446adc3bd5384a05152547b4d51fc | refs/heads/main | 2023-06-26T23:45:06.138404 | 2021-07-30T19:31:26 | 2021-07-30T19:31:26 | 381,404,750 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 86 | py | 6075.py | input = int(input())
start = 0
while start <= input:
print(start)
start += 1
|
ac18b883bd066c2630f340183c486478329e74b9 | c27f94e58f3b2cc6e3ae313d9860d24bebd55515 | /src/archive/kfp_components/kfp_components.py | 4549d998e72eb352c417afe14dfba95daed22bee | [
"Apache-2.0"
] | permissive | mengdong/merlin-on-vertex | 5cea099db676c932d776c0ca61b8bcbb1dbfbc66 | 0d8ac410f6afb01ff1b2ec70b51cb5caa28a66ad | refs/heads/main | 2023-08-19T13:27:03.053988 | 2021-10-09T05:01:16 | 2021-10-09T05:01:16 | 415,205,910 | 0 | 0 | Apache-2.0 | 2021-10-09T04:55:34 | 2021-10-09T04:55:33 | null | UTF-8 | Python | false | false | 24,732 | py | kfp_components.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
4269cc2317688a9cce58ec314bcd40e4eef68353 | d6f8e0ef975adec60baa6c70c7589a9afc2a785e | /PYTHON/day_2/day_2.py | 9d975dd84994c54e5ffe6f5fb5da72de89bc4a79 | [] | no_license | surajkawadkar/vita | 0d60512552f1fccc84f2df9839f927342b04aa42 | 946ad3146b11b50e26749b28593342cdbac8e428 | refs/heads/master | 2023-07-08T18:24:58.725336 | 2021-08-05T12:52:22 | 2021-08-05T12:52:22 | 370,897,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,379 | py | day_2.py | # minmum number
# num1=int(input())
# num2=int(input())
# num3=int(input())
# if(num1<num2 and num2<num3):
# print(num1)
# elif (num2<num3 and num2<num1):
# print(num2)
# else:
# print(num3)
# grades of a student
# perc=float(input())
# if perc>60:
# print("first class")
# elif perc>=50:
# print("... |
e54f1c1c4fb217b22e7cabb14d66daab3ee84e2c | adc2e26b99c4bbcddf3d5063c7109c224105fddf | /py_test/test_basci2.py | 6af59e17469962d367fc94fd37aad64dd157733d | [] | no_license | alexbleep/algo | 929a039940cb8a0c8cd047c862120e1780eecaff | 9e694e296c99ed925ab994a6634c2c581b0f9ccf | refs/heads/master | 2020-04-23T13:41:07.152705 | 2019-04-14T23:48:13 | 2019-04-14T23:48:13 | 171,205,424 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | test_basci2.py | # content of test_sample.py
def funcPlusTwo(x):
return x + 2
def test_funcPlusTwo():
assert funcPlusTwo(3) == 5
def test_funcPlusTwo2():
assert funcPlusTwo(9) == 11 |
56d600cb51e1b210c1601e840e66babd4b2323a6 | 19b06e7da5a035deb70f998c85ff73cc72edf5fc | /Search-based Planning/Search_3D/plot_util3D.py | 3bf0e8a09c1510cd79c7496f591401a34d7e74a4 | [] | no_license | Daiyx0610/path-planning-algorithms | c46c3094b1d1f7256e19905b8913ab8628bfbfe0 | a7dda7594494252d31d4475ede783a14c968b07f | refs/heads/master | 2022-11-14T13:24:15.032591 | 2020-07-09T18:32:11 | 2020-07-09T18:32:11 | 278,559,491 | 1 | 0 | null | 2020-07-10T06:43:52 | 2020-07-10T06:43:52 | null | UTF-8 | Python | false | false | 5,427 | py | plot_util3D.py | # plotting
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import mpl_toolkits.mplot3d as plt3d
from mpl_toolkits.mplot3d import proj3d
import numpy as np
def CreateSphere(center,r):
u = np.linspace(0,2* np.pi,30)
v = np.... |
59834408686f00487083921b6292b200d2e5617e | 90118883a81fc83d9e174b33aa45e6db6ddbccd2 | /python/example16_2.py | dec2632a11f3c44442779bc597b072d28bfb829b | [] | no_license | kuan-pin/EDA | 1aca9e52d673f6d30fc0c5226e5f9483264bfcc3 | d2fccc9cc23e096e971d302e7ff05c95eddc1137 | refs/heads/master | 2022-12-18T13:31:46.173426 | 2020-09-27T19:11:00 | 2020-09-27T19:11:00 | 299,095,274 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,868 | py | example16_2.py | # Example 16.2 One-Way Panel Data Analysis, Deviation Approach
# Production of Airline Services: C = f(Q,PF,LF)
# Panel data: 6 airline companies, 15 years (1970-1984)
# Fixed effects and random effects models
import numpy as np
import pandas as pd
from scipy import stats
# set up panel data
pdata = pd.read_csv("http:... |
ed3ee908c883cc8c2669e43aa22f8c4ff78dbfd1 | cb70f9d26b1a7e6bc25d042ccfda160a16527bc7 | /project_conf/settings/heroku.py | b0b14f0ac0448de624a4f73c3521a02d4d26947c | [] | no_license | tekfyl/rcvr | ec831aa6ff003cee6b83cc6504f46d71d9d99933 | bcd8fc7ff33150520457f2d356e8cf8f8300886c | refs/heads/master | 2021-01-18T06:56:09.700255 | 2016-06-21T21:57:49 | 2016-06-21T21:57:49 | 61,778,292 | 1 | 0 | null | 2016-06-23T05:59:27 | 2016-06-23T05:59:27 | null | UTF-8 | Python | false | false | 898 | py | heroku.py | from __future__ import print_function
import os
from os.path import dirname, abspath
CONF_DIR = dirname(dirname(abspath(__file__)))
BASE_DIR = dirname(CONF_DIR)
CONF_DIR_NAME = os.path.relpath(BASE_DIR, CONF_DIR)
DEBUG = True
ALLOWED_HOSTS = ['*']
SECRET_KEY = os.environ["SECRET_KEY"]
SECURE_PROXY_SSL_HEADER = ('HT... |
0f81d21d6038a8d3975deceef8c427e049bd788f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03544/s219224627.py | 6979b4c8e25ae2c92947ccce78adf9c820eda8ac | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | s219224627.py | def main():
n = int(input())
lucas_list = [2, 1]
for i in range(2, n + 1):
lucas_list.append(lucas_list[i - 1] + lucas_list[i - 2])
print(lucas_list[-1])
if __name__ == "__main__":
main()
|
bc0a2c68ff72c48c8e9f7dd828ed4dff428364c8 | f9d19bdc14034ef2bf8a5f67062651e95d13f79b | /2022/01.py | af848f98495f380a351194aad9a3759c3b205fa0 | [] | no_license | fnuttplus/advent | 04b3b6ac4ae0e7797be590eec2d149e340fe59a1 | 6b8c2b5fd2fd9b9015a5f153773204ae5ab543dc | refs/heads/master | 2023-01-11T16:15:43.610051 | 2022-12-25T06:15:50 | 2022-12-25T06:15:50 | 47,458,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 212 | py | 01.py | from sys import stdin
from aocd import get_data, submit
a = []
for elf in get_data(day=1).split('\n\n'):
s = sum(list(map(int, elf.split('\n'))))
a.append(s)
print(sum(sorted(a,reverse=True)[:3])) |
b9e376b30b7c5a507dd39f8a42058e104d5eaa26 | e3f599aafe118f6a12c9db5ed20644eea608295c | /ass1/myExamples/answer0.py | 0b56761c13abdbb7b23ccc2b67a6ec4798330191 | [] | no_license | ichbinchicken/COMP2041 | c12f52fbef76b14fbea11024d6aaf3a69b7afa86 | 910c01a91aab39b15377c1c823af4556b9f95133 | refs/heads/master | 2022-12-10T06:43:05.548061 | 2017-10-17T22:44:28 | 2017-10-17T22:44:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 78 | py | answer0.py | #!/usr/local/bin/python3.5 -u
answer = 42
print(answer)
print("hello world")
|
9a013e52ab66ef4641f60ca81c0b1990105a365a | 79219d3f789510535d1d5e3642e32f5bdd8a0f1c | /tests/test_start_workflow_workflow_method_parameters.py | 97317e1b692c911bb8c120ae5987d6c7a25e39cb | [
"MIT"
] | permissive | dandavison/temporalio-3rd-party-python-sdk | e7d05db3ba975dcd4c257ebe31dac28011af4c2a | 61215e9623de8eb6588ea901a8b2289752f18315 | refs/heads/master | 2023-07-22T15:30:31.674861 | 2021-07-21T22:42:22 | 2021-07-21T22:42:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,106 | py | test_start_workflow_workflow_method_parameters.py | from datetime import timedelta, datetime
import pytest
from temporal.api.common.v1 import WorkflowExecution
from temporal.api.enums.v1 import WorkflowIdReusePolicy
from temporal.api.workflowservice.v1 import GetWorkflowExecutionHistoryRequest
from temporal.workflow import workflow_method, WorkflowClient, WorkflowOpti... |
b93b0d687039400f4802ab9cae592094b1eb0f0c | e8581313350dd4c48d21045bf7ab846a7eba7cf2 | /train.py | 3c1c94bd75b81e43a9112466efa9cf82bf2050c0 | [] | no_license | ReneeYe/VariationalTemplateMachine | f6fda19fa83d8050b57d5337acf248bfaf972654 | 3731eb85413c4176d64dbc7f6fc18beb5648a772 | refs/heads/master | 2022-11-21T03:32:14.051192 | 2020-07-17T03:42:41 | 2020-07-17T03:42:41 | 258,981,624 | 30 | 9 | null | null | null | null | UTF-8 | Python | false | false | 26,309 | py | train.py | import sys
import argparse
from collections import defaultdict
import numpy as np
import torch
import torch.optim as optim
from torch.autograd import Variable
from data_utils import label_wiki, label_spnlg
from models.variational_template_machine import VariationalTemplateMachine
import random
def set_optimizer(net):
... |
6e70c22f3695160c0487c7e61a78d978b8682dee | 98a359465e6e0620accede5b87b819aed663179d | /schol_library/migrations/0036_auto_20190813_1557.py | 9dc0e02d2ccde41a963362aacc655c898e226171 | [] | no_license | mustavfaa/back-end | 88f8674bd6c2f8d0c4984a2a3d34f2aece3ec8d1 | 6635e8f504c7a7ba9709121b4dd8d5ccecdf05ca | refs/heads/main | 2023-08-15T10:48:03.461138 | 2021-09-27T15:26:03 | 2021-09-27T15:26:03 | 410,938,832 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | 0036_auto_20190813_1557.py | # Generated by Django 2.2 on 2019-08-13 09:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schol_library', '0035_merge_20190813_1556'),
]
operations = [
migrations.AddField(
model_name='invoice',
name='number_... |
f13116857f6f929eedc613de04ec09b0a4ec0f0f | f909bc1f18ec8d0a6963fba31ca6e7b09f4366be | /testdb.py | d718f3d82381f4982f045f23e9011ab8bf33e096 | [] | no_license | guoyu07/analyse_website_dns | da8fef3a522ace02f806455c161b89cf7b0b93e6 | bc7330ff198cb577c7972b3da61fd2a6992a1ec6 | refs/heads/master | 2021-01-24T21:19:23.412167 | 2016-08-19T07:17:03 | 2016-08-19T07:17:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,181 | py | testdb.py | # encoding:utf-8
"""
数据库操作
"""
from pymongo import MongoClient
import pymongo
from datetime import datetime,timedelta,date
import tldextract
def get_db():
"""
获取数据库
:return
其他:可以完善
"""
client = MongoClient()
db = client.websites_dns
return db
def extract_domain_of_url(url=None):
... |
49df8577361f942b0d69a701b5b51a1d44e8b286 | 7bcf6eba46a4e59681175c7e7b1ee8ea562f56a9 | /Version-3-0/combine_video_kinematics_fr_grf_emg.py | 88bf7799a3d375477708035a839bdccae2d5f541 | [] | no_license | AndreaDiRusso/Proprio-Prosthetics-Model | f007001306bbafeea2682e873734fb740fde33ce | 17b4f06658d98462f8213b4f599c7dbeda2d5817 | refs/heads/master | 2021-09-05T02:59:06.821370 | 2018-01-23T20:02:37 | 2018-01-23T20:02:37 | 106,744,437 | 0 | 0 | null | 2017-11-17T20:16:52 | 2017-10-12T20:55:50 | C++ | UTF-8 | Python | false | false | 6,625 | py | combine_video_kinematics_fr_grf_emg.py | import cv2, scipy.misc, pdb
import numpy as np
filePath = 'W:/ENG_Neuromotion_Shared/group/MI locomotion data/Biomechanical Model/Compressed_q19d20131124tkCORRdsNORMt004/'
animalVideoName = 'footage-cropped.avi'
animalVideoPath = filePath + animalVideoName
animalVideoPathOut = filePath + 'out_' + animalVideoName
muj... |
aef5709d545c963f9b36425faa726a4f47bda358 | bccf309cf99c7b6703d7f36f91b9be6347fbfb6b | /Indian Flag/indiaflag.py | 61b118ac88d9d2dd7d0b5372fceaeaccee6aea8c | [] | no_license | HarshCasper/Pythoneer | bc19fa4195f0e6e2d0caa02dbc1ebd6c196b5b8f | f2cfba7814233e94fbc9c1ae19470de6c24f6be4 | refs/heads/master | 2022-12-12T16:28:28.892602 | 2021-08-31T17:37:00 | 2021-08-31T17:37:00 | 204,469,156 | 6 | 8 | null | 2020-10-01T16:22:48 | 2019-08-26T12:18:41 | Python | UTF-8 | Python | false | false | 1,470 | py | indiaflag.py | import turtle,time
wn=turtle.Screen()
############################################################
turtle.up()
turtle.goto(-190,0)
turtle.down()
time.sleep(6)
for i in range(2):
turtle.color("green")
turtle.begin_fill()
turtle.forward(420)
turtle.left(90)
turtle.forward(80)
turtle.left(90)
turtle.end_fill()
turt... |
58e60930b0c4cee4b5d4f5a42f684e6878af616d | a959af98f57e4fc68a79d6467e8bdf496a02a73f | /examples/analytic.py | b00d295f826e614162af509a38b5103307239462 | [] | no_license | DanielTakeshi/gym-cloth | b3c46404420333b59da3b2f687364b5227ca9f80 | 442a71a973c4b7e4cbd8bcf41f1f7b68d0959860 | refs/heads/master | 2023-03-31T07:30:23.592104 | 2023-03-24T21:40:51 | 2023-03-24T21:40:51 | 212,229,898 | 28 | 11 | null | 2023-03-24T21:40:29 | 2019-10-02T01:07:48 | C++ | UTF-8 | Python | false | false | 40,387 | py | analytic.py | """Use this for our analysis scripts (so it uses `demo_baselines.yaml`).
Use `demo_spaces.py` for other debugging.
"""
import subprocess
import pkg_resources
import numpy as np
import argparse
import os
from os.path import join
import sys
import time
import yaml
import logging
import pickle
import datetime
import cv2
... |
8a35996af47b58bd173ac987f70615d2364c956f | 3801e19a07988f3945eec847dc293ea8f5706921 | /function_implement_a/test_palindrome.py | df5e5f4111bf1f12e5cfb5a577e4f86fbad3da45 | [] | no_license | cj-lin/backend-before-interview-test | 2fda91c5e3f6b3b698843bf17f7f64d13620a209 | aa21f9241dabc020fe2d3f560e236e815fd7fd90 | refs/heads/main | 2023-07-14T08:49:11.914756 | 2021-08-23T05:57:35 | 2021-08-23T05:57:35 | 398,889,869 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | test_palindrome.py | import unittest
from palindrome import isPalindrome
class TestPalindromes(unittest.TestCase):
def test_ex1(self):
self.assertTrue(isPalindrome('A man, a plan, a canal: Panama'))
def test_ex2(self):
self.assertFalse(isPalindrome('race a car'))
if __name__ == '__main__':
unittest.main()... |
70b2f9805794504298139eba61ac35f08b650a3b | 348a7cf8d1895a1d465cabf88c6db74ae190c1a0 | /KuveytturkService.py | cdcb7d1f6c80feb425eaae13b730ff4a196889d3 | [] | no_license | ahmetahacelik/Kuveytturk-Customer-Service | 5b3544f71fcd65018b0093abf9577e33344f5e5c | 926e749a61f59e553ac2b880e9674003fc703571 | refs/heads/master | 2020-05-17T18:38:22.890483 | 2019-04-28T09:39:47 | 2019-04-28T09:39:47 | 183,887,723 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,279 | py | KuveytturkService.py | import mysql.connector
from datetime import datetime
from matplotlib import pyplot as plt
import pandas as pd
from pylab import title, figure, xlabel, ylabel, xticks, bar, legend, axis, savefig
from fpdf import FPDF
import numpy as np
from sklearn.cluster import KMeans
class KuveytturkCustomerService:
de... |
76002ae982ccef7d5263bae2d2fcee95f8bc7fef | 3dbc74df3a97ce8254935a08608e8a7966a1bba6 | /supervised_learning/0x10-nlp_metrics/0-uni_bleu.py | dd1d660eedd3791d23a9fc6e73a26c56e8a9c992 | [] | no_license | s0m35h1t/holbertonschool-machine_learning | 9c0475da64eea87565dd90d70eeb23016ef17600 | 2eb7965900fd018f4092d2fb1e2055d35ba4899e | refs/heads/master | 2023-02-28T21:57:50.558030 | 2021-02-07T20:44:01 | 2021-02-07T20:44:01 | 279,866,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 882 | py | 0-uni_bleu.py | #!/usr/bin/env python3
"""Unigram BLEU scoree"""
import numpy as np
def uni_bleu(references, sentence):
"""calculates the unigram BLEU score for a sentence
Args:
references is a list of reference translations
each reference translation is a list of
the words in the translatio... |
dcb99c75323eda49c0a70300f06c2535a03c20b4 | 6e162232fca5088bdd8325472fcebac2392f1829 | /idm/callback_signals/print_bookmark.py | 74ff45ddbf62dcbadd7f9f17e4eb60234fedf999 | [
"MIT"
] | permissive | Yazawasempai/IrCA-Duty | 9f1e94c85e0000fa1557eb2cc4167e2afc1286c1 | 128fddea9824ea00cc0f61e79e9e77797fdce04f | refs/heads/master-beta | 2022-12-14T08:45:26.479895 | 2020-09-19T15:06:34 | 2020-09-19T15:06:34 | 297,421,221 | 0 | 1 | NOASSERTION | 2020-09-21T18:04:36 | 2020-09-21T18:04:36 | null | UTF-8 | Python | false | false | 445 | py | print_bookmark.py | from idm.objects import dp, Event
from idm.api_utils import get_msg_id
@dp.event_register('printBookmark')
def print_bookmark(event: Event) -> str:
event.api.msg_op(1, event.chat.peer_id, event.obj['description'],
reply_to=get_msg_id(
event.api,
... |
c233139bbae5b8f6cecffba527f88af347a1cc74 | d08f40d37552fe882bf9b296030785dcb61fd248 | /cifar10/main.py | 1266e8b7ea632897fbba94bb4d911b302eeca99f | [
"MIT"
] | permissive | nhjkjh0608/FAT_Quantization | 49c55ada75f93b2894b16e140ab5b82c9e53e7dc | a816720298dd5eeb3aac37bf1c2aea6792169d61 | refs/heads/main | 2023-04-18T20:50:32.315323 | 2021-05-02T08:17:47 | 2021-05-02T08:17:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,497 | py | main.py | import os
import numpy as np
import time, datetime
import argparse
import copy
import logging
# from thop import profile
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.utils
import torch.backends.cudnn as cudnn
import torch.utils.data.distributed
from models.vgg import vgg_7_bn, v... |
a4a1aad1563cf46ed3c84d46758f4ddf73509ec9 | 7191a628afb60743bceea40c183fce288a50b050 | /ConvertData.py | c23ac32882503a1ff7da081c1bd1d8ac448dc36b | [] | no_license | Alogenesis/Basic-Python-BorntoDev | e0be9af7d533c2156e2fcb28ef47badade451780 | 5872758cf3790eed479330874a1a31a1fcb2f419 | refs/heads/main | 2023-07-30T04:29:33.497197 | 2021-09-23T01:45:58 | 2021-09-23T01:45:58 | 409,411,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 48 | py | ConvertData.py | a = "10"
b = 5
print(float(a)+b)
print(int(a)+b) |
1c7a6b328155337f890cb1df2a2e95c3594be21b | 73b9e34f0e0c327dc7475da5e3d666b6c294f40f | /flutter_server/app_server/models.py | cc602218f21512ead2be5b15d32bac3f61e316d1 | [] | no_license | teal94/flutter_post_server | cc190eb48bb144f99adaa877407a86ae7c282a9e | 7b26dc0a04698d049c6300fda607b955eb3da6c2 | refs/heads/master | 2020-06-15T07:46:45.506214 | 2019-07-04T12:50:43 | 2019-07-04T12:50:43 | 195,240,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | models.py | # -*- coding: utf-8 -*-
from django.db import models
class Post(models.Model):
user_id = models.CharField(max_length=144)
title = models.CharField(max_length=144)
content = models.TextField()
created_at = models.CharField(max_length=144)
image = models.ImageField(blank=True, upload_to='%Y... |
a698cfe190f0a23564a0771eabc29a84a5004d76 | 5f8c10f90aa0f46d0e6c7fc881d7dccc6435f4b0 | /blog/migrations/0006_auto_20200509_1100.py | 2ba0b907f2661a04cac8d615650c8e2283ea0206 | [] | no_license | tubndgit/django-blog | 3689924b50944cd243ea9729356e1be5f85f561a | 2c50a889cf404e07a354b8b7399bf47a01926473 | refs/heads/master | 2023-07-19T23:00:05.612332 | 2020-07-27T03:32:23 | 2020-07-27T03:32:23 | 282,782,332 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,016 | py | 0006_auto_20200509_1100.py | # Generated by Django 2.2 on 2020-05-09 04:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0005_post_view_count'),
]
operations = [
migrations.CreateModel(
name='Tag',
fields=[
('id', m... |
7407a8f8905fc1bda13716cd3df6ffda919e4a87 | dabfdd08fac4e1cda9455df91c94275e84c267ed | /cryptoenv/cryptoenv/__init__.py | 9ee3add67d1839165d53deff84501ddfdb8299a9 | [] | no_license | StefB4/DRLCrypto | 0bf283c3fcf8c808b483765656d4db9c80416b18 | cdab24937553238ac34fbcad16977a7870ac7784 | refs/heads/main | 2023-04-12T13:26:33.682998 | 2021-05-13T18:54:57 | 2021-05-13T18:54:57 | 360,293,185 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | __init__.py | from gym.envs.registration import register
from cryptoenv.envs.CryptoEnv import CryptoEnv
register(
id='cryptoenv-v0',
entry_point='cryptoenv.envs:CryptoEnv',
) |
9150d439ab0ba065c32680934e27eaf0b27f0027 | 6a171e51da9c223f889fe2ef9d243a624ddf1623 | /Examples/TreatmentPlanning/extractSolnVector.py | b37e525a16544cfaddc749f9ce42ccf7aaa38b62 | [] | no_license | ImageGuidedTherapyLab/ImageGuidedSolvers | 9a8eb0d779699163e0ac9ba3ef4a734e451420e6 | 0789bd78a09b1e607743aef0fdfee45e5e5f0099 | refs/heads/master | 2020-04-22T23:25:43.323472 | 2013-05-10T23:41:04 | 2013-05-10T23:41:04 | 6,768,767 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,487 | py | extractSolnVector.py | #import vtk module
import vtk
import vtk.util.numpy_support as vtkNumPy
# echo vtk version info
print "using vtk version", vtk.vtkVersion.GetVTKVersion()
# load FEM data
vtkExodusIIReader = vtk.vtkExodusIIReader()
vtkExodusIIReader.SetFileName("fem_data.e")
vtkExodusIIReader.SetPointResultArrayStatus("u0",1)
vtkExodus... |
e25b3a460c7acddddd3b20c978cee8d70f629a86 | 3053e1cbc471c6353408ec36319baee0a5c76233 | /manual/old_ideas/python/ability_tree.py | 6633e87f3287e6d203d4fafedd5dc3ed670be23e | [] | no_license | ebrahimebrahim/peupfudge | ccd3e9a3b0eee36c147f8206fce77ad4e430efa7 | 243a8d6029133afb63b396f855d77318d2a30eb1 | refs/heads/master | 2023-02-23T20:42:25.095780 | 2023-02-12T01:33:45 | 2023-02-12T01:33:45 | 162,126,852 | 2 | 1 | null | 2020-05-27T10:53:29 | 2018-12-17T12:24:33 | Python | UTF-8 | Python | false | false | 12,501 | py | ability_tree.py | #!/usr/bin/env python
import random
import re
import gen_numbers as xptable
class Node(object):
"""Ability tree node class. AKA, ability tree, for the root node object.
Attributes:
name (str): name of the ability
level (int): current level of ability
weight (int): weight of ability under ... |
ef5945f188a69bc8fd4e99dd001e4cafe7c11aa9 | 84a9e7d630babd3f39e3f7dfad2aa310399d4c3d | /paddlepaddle/util/Dataset.py | 7ca5d32d189813386eafbe73ef27d2d857bc4420 | [] | no_license | Dean0731/Segmentation | df78d72f09f379967478cac57b2c57a96c5e82ca | 43484d04718168cb3b8ce16b3bc0e13cce0abe63 | refs/heads/master | 2023-03-29T16:05:15.293432 | 2020-10-09T03:10:26 | 2020-10-09T03:10:26 | 280,854,813 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,045 | py | Dataset.py | # @Time : 2020/9/27 11:22
# @File : util
# @Email : dean0731@qq.com
# @Software : PyCharm
# @Desc :
# @History :
# 2020/9/27 Dean First Release
import os
from paddle.io import Dataset
import util
class Dataset(Dataset):
"""
数据集定义
"""
def __init__(self, data_txt_path,transform,seed=7):
... |
964f863230fd351f4679efeb32af330cc4d2cdd5 | c16edf1a6c9c6de6b6d60247a4e6ad25433c623f | /blogs/migrations/0003_auto_20190530_1853.py | a3b951c640779f7a4dfd3be9cb2ae62439766d6b | [] | no_license | basirpayenda/website | 5405ac2cff73624a8c5ad03dc192dedf5d6e5b16 | 49bc2f92aaf5c87d3efdb56e0952b04148f4fef1 | refs/heads/master | 2020-05-31T15:25:54.751565 | 2019-06-16T04:07:08 | 2019-06-16T04:07:08 | 190,356,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 781 | py | 0003_auto_20190530_1853.py | # Generated by Django 2.2.1 on 2019-05-30 13:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blogs', '0002_auto_20190530_1815'),
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... |
8e30e71ebaceeceb8b91fa58f39c470d450deb7f | 7740c9da26c73bf8359fcbc2dc9388f886260584 | /main/migrations/0005_student_dept.py | 90de9bf500eb3e1e389112bd34e7af71b71fb597 | [] | no_license | jayaaditya/cs315_project | 092d91a26842357123b18b829dc8716fc34de029 | b42844ae69497b20c393b8d0eded38b03b5c8259 | refs/heads/master | 2022-12-16T03:31:36.553637 | 2018-04-24T13:30:44 | 2018-04-24T13:30:44 | 130,498,589 | 0 | 0 | null | 2022-12-08T00:59:40 | 2018-04-21T17:52:54 | HTML | UTF-8 | Python | false | false | 558 | py | 0005_student_dept.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-14 06:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0004_auto_20180413_1555'),
]
operations =... |
558d6185ecf7eee4725d48d70829ca37612b0ec6 | bb6d18bb6f69f62eb7c12e36dc393ad5ae162e70 | /my_lelong_webscraper_2020.py | b171852b5b83f387dbd1709198f296845c552e13 | [] | no_license | ruhailam/WebscrapingWithBeautifulSoup4 | a25b1615953352c0666aede2a7df01b0c4da11e4 | f0029eceda0c5b912a66d00dfc269141494fe24f | refs/heads/master | 2022-06-30T10:59:55.746211 | 2020-05-12T04:46:44 | 2020-05-12T04:46:44 | 263,234,717 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 811 | py | my_lelong_webscraper_2020.py | #Written by Ruhaila Maskat (PhD)
#Disclaimer: This code serves only as a teaching material for ITS480/ISP610 Business Data Analytics @ FSKM, UiTM Shah Alam on the topic of Webscraping.
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
my_url = 'https://www.lelong.com.my/'
uCl... |
2b014ce9dc217e3f7aa2d42af7862f881314650e | 09fbeed610a8d85f226ed93cc3acf7433e26a2fa | /python/부분수열의 합2(중간에서 만나기).py | 1961c8f0d45e578675b7b2d55a7996a257402788 | [] | no_license | Daboni/PS | 819744ccb1dc1e832a034f5ecf65c0241c3ee4e5 | 6c81cdc0569981db0bce6c540fecf1fb0c5c2805 | refs/heads/master | 2023-08-23T13:42:40.084793 | 2021-10-08T08:29:53 | 2021-10-08T08:29:53 | 290,971,583 | 0 | 0 | null | 2020-12-16T02:37:18 | 2020-08-28T06:42:53 | null | UTF-8 | Python | false | false | 941 | py | 부분수열의 합2(중간에서 만나기).py | import sys
n,s = map(int,sys.stdin.readline().strip('\n').split())
a = list(map(int,sys.stdin.readline().strip('\n').split()))
m = n//2
n = n-m
up = [0]*(1<<n)
down = [0]*(1<<m)
for i in range(1<<n):
for k in range(n):
if (i&(1<<k)) > 0:
up[i] += a[k]
for i in range(1<... |
d4a614b67e63d1ed8a0bcdf044ae30c8e44d364a | 2e39d61a2c463fece8d2afbc7321be6bf3860620 | /vacc.py | e18078da0c8d2a254e5f686e4687b48a41855440 | [] | no_license | voolu/vcli | 5e4c64225ca876e5d664a8a0346038e57834d2a3 | 19c78ddfa7ef50b2aff5f84b1dcb7d4966d4951d | refs/heads/master | 2023-04-09T15:55:31.053055 | 2021-04-11T19:05:54 | 2021-04-11T19:05:54 | 356,665,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,609 | py | vacc.py | import asyncio
import os
import click
import inquirer
from modules.auth import AuthService
import modules.exceptions as ex
@click.group()
@click.option('--debug/--no-debug', default=False)
def cli(debug):
if debug:
click.echo('Debug mode is on')
async def do_login():
async with AuthService() as aut... |
be4be5431bc9edde04ab2ccf6fb06daacca76013 | 22a4e5ec99dd810709b6eae293a814bdfbf510ce | /First Semester/project.py | b2e97fa3a4cec35f1c13fb0de5173f8359973018 | [] | no_license | KangEunseo/2019-python-class | 4aef32c80f5da19f36bd38455f1e4f45a00b2f76 | d7dba4ac944654e663f1590f59b8bee7c911edbf | refs/heads/master | 2020-07-07T06:57:42.177389 | 2019-12-06T06:03:24 | 2019-12-06T06:03:24 | 203,284,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | project.py | #화면 지우기
import os
import time
n=0
while(True):
os.system('cls')
print(" "*n+"o")
n+=1
#input()
time.sleep(0.1) #1초 자자 |
45f249238d3f7b7088cef15cbb050a1ea6b1faa6 | 7c49c39e4128a60985fa1f12f2914c59e2ba6716 | /apps/goods/search_indexes.py | f65aa33cdf658cc26a32ab55ad226f02804872b9 | [] | no_license | tglmm9377/hasong | 05b96da4807ed8f130d03a084f84bb64d417b79b | 3202d69dd9c31e7b72c155627d7c4ae870501cbd | refs/heads/master | 2021-07-14T04:26:17.872354 | 2020-05-28T03:21:56 | 2020-05-28T03:21:56 | 155,034,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | search_indexes.py | #定义一个索引类
from haystack import indexes
from goods.models import GoodsSKU
#指定为某个类某些数据建立索引
class GoodsSKUIndex(indexes.SearchIndex,indexes.Indexable):
text = indexes.CharField(document=True,use_template=True)
def get_model(self):
return GoodsSKU
#这个方法返回的内容将内容作为索引
def index_queryset(sel... |
ac3cbc7c27b661090cbbc62731cbf111ed10b7b0 | 61d08e23fbb62e16f7bd9d43673b1cf4e0558c37 | /miraPipeline/maya/sim_reference_in/sim_reference_in_ui.py | 42a12db083399d2aa04dcd806527dc928df6695d | [] | no_license | jonntd/mira | 1a4b1f17a71cfefd20c96e0384af2d1fdff813e8 | 270f55ef5d4fecca7368887f489310f5e5094a92 | refs/heads/master | 2021-08-31T12:08:14.795480 | 2017-12-21T08:02:06 | 2017-12-21T08:02:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,817 | py | sim_reference_in_ui.py | # -*- coding: utf-8 -*-
from Qt.QtWidgets import *
from Qt.QtCore import *
from Qt.QtGui import *
class SimReferenceInUI(QDialog):
def __init__(self, parent=None):
super(SimReferenceInUI, self).__init__(parent)
self.setWindowFlags(Qt.Window)
self.setWindowTitle("Sim & Vfx Get Cache")
... |
974dc01c00a2b5960e208d8ff1d21d015caee094 | 4b72fb4089027bce78732a62e1d32a9afa051ee9 | /weather_bot.py | dc8540de38c13e3aba5aa4f71888973df7d5c66c | [] | no_license | markmester/weather_bot | 75de0d73d40e37044d403187d2c666e035953a2f | 5479a45b3c672b5e042d9b4bfc75a2180be70077 | refs/heads/master | 2020-07-03T17:52:05.226516 | 2020-02-25T04:14:02 | 2020-02-25T04:14:02 | 67,826,503 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,820 | py | weather_bot.py | from __future__ import print_function
import forecastio
import datetime
import requests
import json
print('Loading function')
# Data Params
KEY = '6e0ca338ea407af7e5961fe599eb6b09' # weather.io api key
COORDS = (38.777140, -77.176861)
SUNNY_IMG = 'http://www.clipartbest.com/cliparts/LiK/bqA/LiKbqAzia.png'
RAINY_IMG ... |
b98529bdee5e192f8707c88eed0d633f33bb4727 | e447673c53c5cb9300bc0663e61ee057be0912a8 | /setup.py | 8739dd3497d67dc4f4cffa1d7722a9ccc09c3e2d | [
"BSD-3-Clause",
"CC0-1.0"
] | permissive | ZeusbasePython/unflattener | 0ec2d1a65d6af88303448e1ca7fd63b146248e60 | 3f6c45c1818ef6308afa2b0e3daa3974b6ed0632 | refs/heads/master | 2021-01-01T17:07:27.381907 | 2017-03-27T10:49:10 | 2017-03-27T10:49:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,158 | py | setup.py | from __future__ import print_function
from setuptools import setup
from unflattener import __version__ as VERSION
PIL_DEP = 'pil >= 1.1.7'
PILLOW_DEP = 'pillow >= 2.2.1'
REQUIRES = [
'numpy',
]
try:
import PIL
# Use the original PIL if is it installed. Since v1.1.7 is the first
# version compatible... |
68d6cfe6d8ee1106287be51c60ec011badde90c6 | c3e3b43f32c5f0c8397b59b2342883c198fbc9de | /vector.py | 83c75632e5e0e06c2c05b1d16d4563aecaa4f806 | [
"Unlicense"
] | permissive | lalaso2000/NITGifu-E-SuchikeisanTemplate-python | 560abf46e6e4c38a4f71cc40d0e61da184d6e176 | a894ed598167032cfc6b2207b4f35d3fccf0bae9 | refs/heads/master | 2021-08-11T22:06:07.385112 | 2017-11-14T05:27:04 | 2017-11-14T05:27:04 | 110,644,748 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,212 | py | vector.py | # -*- coding: utf-8 -*-
import csv
class Vector:
'''ベクトルを使いやすくするクラス'''
@staticmethod
def input():
'''キーボードからベクトルを取得 -> 1次元配列を返します'''
print 'ベクトルを入力します。'
dim = input('次数を入力 >>> ')
vec = []
for i in range(0, dim):
s = '[' + str(i) + ']成分を入力 >>> '
... |
3dbfda6864b72141d8b28a970be104500fd5ec41 | f195cff13766f95abf6b4d22f30b5f5ccf527522 | /03/dp_1.py | 669f36438634f1cbd1012166ace1fd2d751da949 | [] | no_license | lkapinova/Pyladies | 3125471d7e4f8c69beb10d9a4ebbeaedeecc14af | 7543bfd71ce0e335e0952f8be306fa7969bdc82e | refs/heads/master | 2022-11-21T23:11:46.975677 | 2019-09-19T13:20:29 | 2019-09-19T13:20:29 | 173,374,562 | 0 | 2 | null | 2022-10-30T08:54:26 | 2019-03-01T22:09:15 | Python | UTF-8 | Python | false | false | 224 | py | dp_1.py | from turtle import forward, left, right, exitonclick
for n in range (5,9):
length = 200/n
angle = 180-(180*(1-2/n))
for i in range(n):
forward(length)
left(angle)
forward(100)
exitonclick()
|
17115422761e7c25b94745bbc07285c8a3ccb480 | 14ced773ca3c5ffc2a2b6fb5fee58033ee108ff2 | /src/architectures.py | 0149fd2c1001991e523ac4c3158fa768a7efbc2a | [
"MIT"
] | permissive | gmum/geo-gcn | 161641e7917b70da9b12bb88daf5318fba97f91a | 34091c63986d9f30ba0a19f6c5a3e6d437776c70 | refs/heads/master | 2022-03-02T22:20:00.215497 | 2022-02-04T19:18:13 | 2022-02-04T19:18:13 | 207,406,050 | 60 | 19 | MIT | 2022-02-04T19:18:14 | 2019-09-09T21:15:02 | Python | UTF-8 | Python | false | false | 1,932 | py | architectures.py | import torch
import torch.nn.functional as F
import torch_geometric.transforms as T
from torch_geometric.nn import graclus, max_pool, global_mean_pool
from graph_conv import SpatialGraphConv
from normalized_cut_2d import normalized_cut_2d
class SGCN(torch.nn.Module):
def __init__(self, dim_coor, out_dim, input_f... |
8246efe6ddb42c30701a91ad471f1b65e83196ef | 96dbb975463acc7aac1a648fb8666a39bf85ef25 | /habitat.py | 8fd1af03cafc63e3715f09f85917b7c3480c84e1 | [] | no_license | rcelebi/legueformation | 9e24de7942c9a3a2d9ed5fef3c512190a019c741 | 519e0528addb8cb57675c9aa2a81afb56c6359fb | refs/heads/master | 2021-01-10T05:01:07.768535 | 2010-07-27T07:21:01 | 2010-07-27T07:21:01 | 45,066,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,223 | py | habitat.py | #!/usr/bin/env python
import topology
import simulation
import math
import random
nextid = 0
class Agent:
def __init__(self, strgy, sco=0, outdeg = 0):
global nextid
self.id = nextid
self.strategy = strgy
self.score = sco
self.outdegree = outdeg
nextid+=1
def play(self):
return self.strategy
c... |
16119795c11733f766ee9d2bce86b3e6573f1290 | e8be5a57d50211cef2f11475beaab2415054010b | /PyFiles/addTwoNumbers.py | 68f66dcce5883da7433af58be9782e09a9483c68 | [] | no_license | stevengonzalezdev/LearnPython | 0ee38eff15b8e676f05b8d9b3f4be389626a9958 | 7e6e55d28ce61831b97e1354b5f49dedb458454f | refs/heads/master | 2021-07-24T07:00:53.777370 | 2017-11-01T15:56:09 | 2017-11-01T15:56:09 | 108,754,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | addTwoNumbers.py | #create a function that adds two number
def addTwoNumbers(x, y):
z = x + y
return z
#Test the function
print("3 + 4 is", addTwoNumbers(3,4))
|
b8ebfc2a4be50f776a71f55be7495779c2ad3860 | b12671ebd3b340cb6a6f3bb3baa284bb82f6b5ff | /src/src_three/scss_expand.py | 9c79a1b143a253692ed4f55846962ae53dc3cec8 | [] | no_license | garetht/sublime-scss-expander | 41162166dff4b750de2fd91a2763e6e7547fdfe4 | 7ee6aa8d96060e0b8a9330c74ef3caa9416c3ae3 | refs/heads/master | 2016-09-03T06:55:31.005041 | 2014-09-28T16:54:54 | 2014-09-28T16:54:54 | 19,441,195 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,251 | py | scss_expand.py | import re
from functools import reduce
class SCSSExpand():
def __init__(self, startpos, get_char_fn, separator = ' '):
self.selectors = []
self.comment_blocks = [] #array of tuples /*123*/ - will give (0, 6) - inclusive!
self.separator = separator
self.get_char_fn = get_char_fn
self.startpos = st... |
8035923587c23bbb38d9c083c740817381b359f5 | ff3a450a396f38099381b749f4293526b908f346 | /excel.py | 6eb8a3473e1f9fe5abf56f92bb2eebfdff982719 | [] | no_license | wt3639/Elimination-Scattering- | a3692dc935d349e2f077363eb7ee805323bf1381 | eaa22868c8cdb054c990cefb91b7a73fa79fa43c | refs/heads/master | 2021-04-15T18:47:02.986836 | 2018-03-23T02:09:28 | 2018-03-23T02:09:28 | 126,159,687 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,950 | py | excel.py | import xlrd
import xlwt
import sys
import random
from xlutils.copy import copy
for t in range(1,len(sys.argv)):
#output = open(r'C:\Users\wutao\Desktop\point', 'w+')
print(sys.argv[t]+' start processing...')
xlsfile = sys.argv[t] # 打开指定路径中的xls文件
book = xlrd.open_workbook(xlsfile)#得到Excel文件的book对象,实例化对象... |
71a0040ea560f84d3cc87befb7968e6bbac85fc5 | bce73f7f24aa06d14f39d2fe6fdf17477ceef204 | /Uke_05/1.2.2 final vr.py | 7b2f486b3a62b4a181cb270bc8d6d19a1a5a0466 | [] | no_license | chrifl13/IS-105-2016-Gruppe09 | fe81dfba8f31c390e77958d68924209e46766e2c | 63276f889926ffd5450db1cf36caacd01abdb2d2 | refs/heads/master | 2021-01-21T14:09:24.701266 | 2016-06-02T20:12:14 | 2016-06-02T20:12:14 | 50,038,871 | 0 | 0 | null | 2016-03-01T17:29:33 | 2016-01-20T15:24:16 | Python | UTF-8 | Python | false | false | 3,151 | py | 1.2.2 final vr.py | # sources/veiledning:
# http://www.openbookproject.net/thinkcs/python/english2e/
# https://github.com/kyledinh/toolkit/blob/master/python/poker.py
import collections
import itertools
import random
TYPE_LISTE = ("Hjerter", "Spar", "Ruter", "Kloever")
VERDIER_LISTE = ("2", "3", "4", "5", "6", "7", "8", "9", "10", "Knek... |
ec2d31ec675366978e3b2d34d27827ab2d3f8ed4 | 99ed3ee2a09419d5522bc4f7e4b1ad186b903a3e | /day15/input.py | 7cdbdd93f31e9c5027b7ec39588e3353eb85ec97 | [] | no_license | Chickenpowerrr/AdventOfCode2019 | 2eb834482d02215f1ede969ba7a7cf7a5c20d899 | b54d9432059d10f9c6317b1cf02123673d02ad8f | refs/heads/master | 2020-09-26T16:43:56.770362 | 2019-12-25T07:07:57 | 2019-12-25T07:07:57 | 226,294,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,217 | py | input.py | INSTRUCTIONS = [3, 1033, 1008, 1033, 1, 1032, 1005, 1032, 31, 1008, 1033, 2, 1032, 1005, 1032, 58,
1008, 1033, 3, 1032, 1005, 1032, 81, 1008, 1033, 4, 1032, 1005, 1032, 104, 99, 1002,
1034, 1, 1039, 102, 1, 1036, 1041, 1001, 1035, -1, 1040, 1008, 1038, 0, 1043, 102,
-1, 1... |
1e2c85fb148540f4e8e25da9ca87c171c0c37450 | 02cd46f190f7ca9e6d3663cb16e70986c5a315bc | /In_Situ_Data/Merge_Network_scripts/Merge_Hourly_Network_data.py | c6e5c581ca19a85afc3100229684562602e0b298 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Chrismarsh/SnowCast | 453fefcde08be89282646f8398c6a8d4c5631383 | 594dddc8b60771abe61f3e19a5d4aab2961ef161 | refs/heads/master | 2023-03-16T12:08:51.437811 | 2018-02-07T17:33:07 | 2018-02-07T17:33:07 | 215,410,715 | 0 | 0 | null | 2019-10-15T22:52:41 | 2019-10-15T22:52:41 | null | UTF-8 | Python | false | false | 5,736 | py | Merge_Hourly_Network_data.py | import numpy as np
import xarray as xr
import sys
import os
import imp
# Load in config file
####### load user configurable paramters here #######
# Check user defined configuraiton file
if len(sys.argv) == 1:
raise ValueError('Requires one argument [configuration file]')
# Get name of configuration file/modu... |
5bea513216b111921140ed824925d1949584f835 | 6ccdeeb5c3d6751803cf22e4da19d07467231876 | /hw3_API_testing/test_dog_api.py | 31c7c7a16fc8dce8ca4799095af0d38dbc3eec26 | [] | no_license | Maria2208/qa_otus | dcc3f5647d81e9488b3817a14073e38ea9aaeb1d | 8d9b5b34696213e05f11cf308bb2acf449ca0b5c | refs/heads/master | 2023-04-16T20:04:10.911562 | 2021-04-30T06:19:30 | 2021-04-30T06:19:30 | 353,099,091 | 0 | 0 | null | 2021-04-30T06:19:31 | 2021-03-30T18:15:28 | Python | UTF-8 | Python | false | false | 2,317 | py | test_dog_api.py | import pytest
import requests
import cerberus
@pytest.fixture(scope="session")
def base_url():
url = "https://dog.ceo/api"
return url
def test_api_json_schema(base_url):
"""Проверка структуры ответа за запрос /breeds/image/random"""
res = requests.get(base_url + "/breeds/image/random")
schema =... |
0a104e22135ad8687ffe4dcfa0d9f8ac99573927 | 804fa48b8f403025f7f08f582f036863d1b37659 | /pe45.py | 7939701d6a8adc3c2fba36557438417ec806d135 | [] | no_license | pushpithaDilhan/ProjectEulerPython | 78b15115a2bce059014c67c561ca17b124d598dd | bc14519f37d1496b683fb2339d0534ff33c22b9d | refs/heads/master | 2021-01-10T04:49:24.491855 | 2017-04-12T06:03:11 | 2017-04-12T06:03:11 | 52,206,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | pe45.py | import time
s=time.time()
a=[i*(i+1)/2 for i in range(286,100000)]
b={i*(3*i-1)/2:i for i in range(165,100000)}
c={i*(2*i-1):i for i in range(143,100000)}
for i in a:
if b.has_key(i) and c.has_key(i):
print i
break
e=time.time()-s
print "Elapsed time is %f seconds"%e
|
bd6171c03f71e44c1481c0881fe668e496727cf6 | 1c751c001357d23fe10e7a42490e3b76434dfa18 | /config/workflow/sql_query_file.py | 9b5bc7a845f2ae44da1f64c56f901d51ef16ecc8 | [] | no_license | pie-crust/etl | 995925199a71b299544bfac1ed8f504f16fbadc2 | 14b19b542eaa69b8679ce7df4d9a5d2720b3c5c7 | refs/heads/master | 2022-12-12T18:40:31.866907 | 2019-10-14T15:46:16 | 2019-10-14T15:46:16 | 215,082,544 | 0 | 0 | null | 2022-12-08T05:22:54 | 2019-10-14T15:43:04 | Python | UTF-8 | Python | false | false | 1,351 | py | sql_query_file.py | """
time python cli.py -nopp 3 -dcf config/db_config.DEV.json \
-pcf config/proc/sync/iq_mem_sql/delta_load.json --proc_params \
CIGActgH.HydraPNLEntries "WHERE LastModifiedTime>'2016-06-19'" Accounting.CIGActgH.HydraPNLEntries \
2>&1| tee delta_load.log
"""
import sys
from pprint import pprint as pp
from inclu... |
354dec38348b22d6358fbf35aa5eab50697fffb2 | 19a3177f0018b6a4c28be339860223133e26b892 | /commands/old/wear.py | 4d066dd079a502eaff7502c880fd37d66debbd0b | [] | no_license | jddaly2011/adventure | 994474675ffa6c3d5782ae4739c0b917d5681a6a | d9462a9896271dc0553d4fe4eae22b7ea29a3d1c | refs/heads/master | 2021-01-10T08:59:55.133437 | 2016-01-03T03:04:30 | 2016-01-03T03:04:30 | 46,602,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,097 | py | wear.py | #1/usr/bin/python
import tiles, world
def wear(commands, available_actions, player, room):
if len(commands) < 2:
print "\tUsage: wear [item]"
return
else:
if player.inventory is None and room.inventory is None:
print "\tThere is nothing to wear!"
return
wit... |
1836383a981bd045025693b27da35a33c439a0e9 | 9b0995c1375a3a253195c50459d476ecfe820f7d | /test/SimpleTree/test_simple_tree.py | 885a92f1df1a4dbb7833dd30b6f05113f56caad6 | [
"Apache-2.0"
] | permissive | shapovalovdev/AlgorythmsAndDataStructures | 3dc90e90472df223466b5ce87e81fe003973e355 | 34d5f38c089e0ba902813607f08847fbdc7361ab | refs/heads/main | 2023-01-20T15:51:52.426896 | 2020-12-05T21:28:51 | 2020-12-05T21:28:51 | 315,001,192 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,275 | py | test_simple_tree.py | import pytest
from AlgorithmsAndDataStructuresLearning.src.SimpleTree.simple_tree import SimpleTree, SimpleTreeNode
class TestSimpleTree():
@pytest.fixture(scope='session')
def tree(self):
root=SimpleTreeNode('i am root!', None)
tree=SimpleTree(root)
leaf1 = SimpleTreeNode('i am leafe1... |
122bf36773cb3df8962bd8201d0291a65c451f98 | c008ba1adae27cf931b71e9eb100d925f43700d0 | /DBSLoading.py | e8dd1057cb89c61501c77b131b313293e932fa01 | [] | no_license | doubsman/DBAlbums | dd28a3060619abc60891d5ad04b59641bec818a6 | b8d5cbc2a7a323824a21b5155d2466fb3e3cbe54 | refs/heads/master | 2022-12-30T18:11:35.776940 | 2020-10-10T15:49:23 | 2020-10-10T15:49:23 | 111,127,909 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,105 | py | DBSLoading.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from os import path
from PyQt5.QtGui import QFont, QMovie, QIcon
from PyQt5.QtCore import Qt, pyqtSlot, QDateTime, QVariant
from PyQt5.QtSql import QSqlQueryModel
from PyQt5.QtWidgets import QWidget
from Ui_DBLOADING import Ui_LoadingWindow
class AlignmentQSqlQueryModel(Q... |
ad2cdd91a231832c78e78903cd01d199adda402d | 33914e648b059916bf1d61072709637b47ae930c | /csv_to_sql.py | 4a7810df2360538b7758e07c3788bb91cd878a2a | [] | no_license | anantosan/Converting-Data | 075cd094e4cba87677299f0cfe32b24176cff550 | 2743a6b2a6d409231101a84af3720dcd947f479b | refs/heads/master | 2020-07-04T01:53:02.755488 | 2019-08-13T15:35:03 | 2019-08-13T15:35:03 | 202,114,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | csv_to_sql.py | import csv
import mysql.connector
dbku=mysql.connector.connect(
host= 'localhost',
port= 3306,
user= 'root',
password= '#####',
database='doraemon',
auth_plugin='mysql_native_password'
)
data=[]
with open('file_test.csv','r') as x:
reader=csv.DictReader(x)
for i in reade... |
f7da7318daeee8f6a8b2d8dc2cd57604e45f8d08 | a1d08d51007580d54580659e542463278cbb84a5 | /praatio/praatio_scripts.py | 39305949479ceee21b2c4e2bd4fefbc2b239b1e7 | [
"MIT"
] | permissive | shirlizz/praatIO | 0062c8dab3feff97eb41c6ddff675ffdb1210db7 | fd26ec19278a1dfcf50a2a8607f2ffbf7d333109 | refs/heads/master | 2023-06-15T18:45:58.409295 | 2021-07-05T05:09:46 | 2021-07-05T05:09:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,911 | py | praatio_scripts.py | """
Common/generic scripts or utilities that extend the functionality of praatio
see **examples/correct_misaligned_tiers.py**, **examples/delete_vowels.py**,
**examples/extract_subwavs.py**, **examples/splice_example.py**.
"""
import os
from os.path import join
import math
import copy
from praatio import tgio
from p... |
7366d94e425ea4777af06c718c2c6c3cec0c5ca8 | 7e094795062ef039a72a4145f192cc3ed4012516 | /grafana_api/api/datasource.py | a96549af79f684b330e75b7e67fb223f05465218 | [
"MIT"
] | permissive | m0nhawk/grafana_api | 643c2f6445fd82ff76bb9d3f47855583cbf2745b | 85751f553bea5c273faf84d860d53f84842c72dc | refs/heads/main | 2022-08-13T02:06:03.018555 | 2022-07-22T06:29:35 | 2022-07-22T06:29:35 | 113,315,571 | 114 | 83 | MIT | 2022-03-16T20:46:39 | 2017-12-06T12:49:10 | Python | UTF-8 | Python | false | false | 2,439 | py | datasource.py | from .base import Base
class Datasource(Base):
def __init__(self, api):
super(Datasource, self).__init__(api)
self.api = api
def find_datasource(self, datasource_name):
"""
:param datasource_name:
:return:
"""
get_datasource_path = "/datasources/name/%... |
0f99e349b37a3cc6683bd9a2daa80a45dd52f356 | 69716492072c0a8b204473dcd34d23286806973b | /ingredients/schema.py | f5197a36371f04a103c2055b94bf21dba2575545 | [] | no_license | mkanand33/Graphene-Vue-js | 63b3f159a8becb026f799febed8a11697e3f128d | a39fb0a2b4d979a28690e8677093854c8a387d50 | refs/heads/master | 2020-04-17T16:58:43.303811 | 2019-01-21T07:12:16 | 2019-01-21T07:12:16 | 166,764,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,083 | py | schema.py | # cookbook/ingredients/schema.py
import graphene
from graphene_django.types import DjangoObjectType
from graphql_jwt.shortcuts import get_token
from ingredients.models import Category, Ingredient, Product, Family, Location, Link, Blog, Name, Signup, Login, \
Comment, Rating, Like, Reply
from django.contrib.auth i... |
98dd67634a680f84f302b6a751b619c024b94b96 | f7c99e34762d4f7c3b0ef199ff815e82c3cbb1bd | /xcp/xcp_prep.py | 7291e382ce2a465c63cfea41395f9fd9179d6af9 | [] | no_license | mcmahonmc/adm_mri | 402a743db3370b083ca4e3c99156cde8f64888ff | 41f684614412ff48eaf855c1dbc62a526121790f | refs/heads/master | 2023-07-31T17:33:38.874770 | 2021-09-17T19:29:10 | 2021-09-17T19:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,259 | py | xcp_prep.py | import os
import numpy as np
import pandas as pd
import glob
from shutil import copyfile
# ------------------------------------ setup -----------------------------------
fmriprep_dir = '/scratch/06089/mcm5324/fmriprep'
xcp_dir = '/scratch/06089/mcm5324/xcp'
os.path.exists(fmriprep_dir)
os.path.exists(xcp_dir)
# ----... |
785cdc03b30bba0017a784c465fbdcca66e66292 | 8a30d3e98461d6311070b5047154bd1767ba8e76 | /example.py | f9ee105b432b6ec9e39741e5f60308fa4a396e83 | [] | no_license | BSU-CAST/KidSpell | 9549b1caf135ff77790977285c7083dc279aa2e4 | 08fee4a24b36037a8426aa7925c8ad8aca9a4412 | refs/heads/master | 2020-09-12T20:31:40.510929 | 2020-04-21T03:38:55 | 2020-04-21T03:38:55 | 222,545,517 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | example.py | import KidSpell
print(KidSpell.suggestions('skul', 10))
#['school', 'scale', 'cycle', 'skill', 'skull', 'sickle', 'scull', 'scowl', 'suckle', 'skulk']
print(KidSpell.isInVocab('skul'))
#False
print(KidSpell.getErrors('the skul bus goes relly fast'))
#['skul',relly']
print(KidSpell.getSuggestionsForSentence('the sku... |
18f40b79687724477f1d3ff3798dfcb7f4c258b6 | 4052bcf287d1b4c194ba417e2d0c09e6732ab6c7 | /Task02/FileWriter.py | 0b46cb98a24bf6ebd09e4423a0d8147f5617476e | [] | no_license | szymonwrobel/PythonTask | 2d939a3a1f1726c729c7ccc16035ecbb51e202cc | b16d3fa8f0fec350bf80362a7d6302ea251f0027 | refs/heads/main | 2023-04-02T06:05:12.472642 | 2021-04-15T19:49:50 | 2021-04-15T19:49:50 | 306,467,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,673 | py | FileWriter.py | import json
import csv
import os
import logging
def write_to_csv(round_number, alive_sheeps, directory, log_level):
write_to_log(f"The function write_to_csv(round_number, alive_sheeps, directory, log_level) invoked with argument round_number={round_number}, alive_sheeps={alive_sheeps}, directory={directory}, log_l... |
606488d544956c1dda1486acdb382da1eae85932 | c2bd49c1a90a927b878f793a037a0f69378b143c | /tests/test_receiver.py | 9cfec053bdb41b0e73a257409121e8dc9316840f | [
"BSD-3-Clause"
] | permissive | zrong/pyzog | 85df6129efda92f6a4a1bf45973e62b5b001cf30 | 52becead7035fb4b5572107c60a7278ebbfda393 | refs/heads/master | 2020-12-22T04:53:35.487196 | 2020-08-16T05:54:57 | 2020-08-16T05:54:57 | 236,674,934 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | test_receiver.py | import pytest
def test_receiverstart(receiver):
assert True |
88a0d54101228a52a33fb18eabf94ce760809f8d | a8ed4b1cb9a03c6c975cf4dea3839221accfe0b0 | /pages/views.py | 8cc561bc48bc1868d3281a3fd2182f810405d7ae | [] | no_license | ayangzy/poll-system-in-django | 976b8cf1babfd1da0a360a473975a496f5dfa8f3 | 0bd1fb5fb2c26d6b5dbf6b0d5912d6e645f69315 | refs/heads/master | 2021-03-20T03:04:03.075691 | 2020-03-15T17:29:03 | 2020-03-15T17:29:03 | 247,169,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | views.py | from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.contrib import auth
from django.contrib import messages
from .models import Contestant
# Create your views here.
def index(request):
return render(request, 'pages/index.html')
... |
fed383c5da7642b4480d802b17faf4650cc23e39 | 350fb94a3e0bb2c8d51d4bded089488e75b89cfb | /matplotlib_example2.py | aed868f149395ebc75ebb282e01ee30966935064 | [] | no_license | PrincetonPy/Interactive-With-PyGame | 0ad0a5d1d673ea042cf8422adbfabc00ab69d897 | 9a79b4e27e07043a20f7607e3e5f9de4f28c9aff | refs/heads/master | 2021-01-20T15:36:12.068621 | 2015-03-12T16:04:56 | 2015-03-12T16:04:56 | 32,086,568 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,518 | py | matplotlib_example2.py | from matplotlib_example import *
from scipy.fftpack import fft
#Record a sound and plots the amplitude and spectrogram
SOUND=None
def play_audio(**kwargs):
if SOUND:
SOUND.play()
return
def record_audio(view1,view2,*args,**kwargs):
global SOUND
snd_array=record_array(2.)
SOUND=pg.sn... |
da85446ad755ef6d5b1748bb55c85dc95d91a414 | 3c22b591a82b94adac6fe95b8726be5e7c3a8d81 | /1012.py | 1e71430ceeffa37d4199705171697fd855465197 | [] | no_license | StaySharp0/algorithm | 5b202b77af61989ed4a32836938bb9392b8e522f | 35a4642289b2d64bab22f54553b4f7fe73600b9d | refs/heads/main | 2023-03-15T03:40:37.837736 | 2023-01-16T10:27:20 | 2023-01-16T10:27:20 | 182,639,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | 1012.py | # https://www.acmicpc.net/problem/1012
M=[-1,0,1,0,0,1,0,-1]
def R(I,i,j):
if I[i][j]==0:return 0
V=[(i,j)]
while len(V):
i,j=V.pop();I[i][j]=0
for _ in range(4):
a,b=M[_::4];y=i+a;x=j+b
if x<0 or y<0 or x>X or y>Y:continue
if I[y][x]:V.append((y,x))
... |
eece14e63c92564d3301a4381047d9c097a73e9b | b5af3998457b6bb538343bdf5344f5ee4c99aa3e | /main.py | 0fda31c1f23361e3b7af57a9c291bc1254cab115 | [] | no_license | Fan806/Nao | b7c9ed4b8d0a4b9692f383da03f466d34ccf92fb | a11c86ae33d6060661018c66a980b1ada3360ada | refs/heads/master | 2020-05-02T20:23:48.112195 | 2019-03-28T11:32:00 | 2019-03-28T11:32:00 | 178,189,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,432 | py | main.py | import vrep
import numpy as np
import random
import time
from environment import vrep_env
from reinforcement import reinforcement
ip = '127.0.0.1'
port = 19997
time_step = 0.01
motor_names = ['LeftMotor', 'RightMotor']
object_names = ['Bola']
robot_names = ['DifferentialDriveRobot']
goal_pos = [0.73, 0, 0.0725]
goal_l... |
5399525ece76ccaf23cec7bd53ebceaebb15f63b | 1028a34995c7e3cb9425350200a42a8af2fc9627 | /Exercise/Ex37_01.py | f7b2b0a1203b26a0065191a8d12b6bfe7165cf7e | [] | no_license | yeonsu100/DeliciousPie | 39f3fcbb31f6c0b9a02066fe2d4268535e664e50 | f584069aef22d30b68bea2dbba18d7bad1d82165 | refs/heads/master | 2022-12-27T23:40:20.593534 | 2020-10-11T14:07:14 | 2020-10-11T14:07:14 | 269,583,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | Ex37_01.py | import collections
def count(listOfTuple):
flag = False
val = collections.Counter(listOfTuple)
uniqueList = list(set(listOfTuple))
for i in uniqueList:
if val[i] >= 2:
flag = True
print(i, "-", val[i])
if flag == False:
print("Duplicate doesn't exist")
... |
357c61e27a19ab96493ba313c0caaf5ca48fdec5 | c1de068c1188de0d012dcd1204317b360edaff60 | /P309.py | 31594b1b0db543e34f2d93008f2e9023ddee40ce | [] | no_license | roveryi/LeetCode-Practice | 7a890d4a9e565b4c39da53cada0e9e4bce4c7f1b | 5b3de7dd6627102aa52dde4fc5bb4cf05f9bca67 | refs/heads/master | 2021-06-24T07:37:06.393204 | 2020-08-14T05:56:25 | 2020-08-14T05:56:25 | 159,262,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,672 | py | P309.py | '''
309. Best Time to Buy and Sell Stock with Cooldown
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times) with the fo... |
d86e33c38e7c33e5f0d9431da05322ed66452ff2 | 52305e2543af2c9243bc04e9c29c1c5e3c954c47 | /blaseball_mike/__init__.py | b28ea9a1083dfc89d044c5023a34c83c7b5535cd | [
"MIT"
] | permissive | neomelonas/blaseball-mike | 1e365a67883393e7299a4458747187d09e023db7 | 6d790c8efbe660ed65ac65bbd48bf2641c27268a | refs/heads/master | 2023-03-15T06:31:07.979018 | 2021-03-10T21:42:37 | 2021-03-10T21:42:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | __init__.py | """
`blaseball-mike` is a python library for accessing Blaseball API data,
over the main public API and various fan-created archives and databases.
This includes player/team/game fetches, as well as deserialization of
the live event stream.
>>> from blaseball_mike.models import Team
>>> fridays = Team.load_by_name('fr... |
1f14270400aa6a3558b1f5d29e848a107667a6de | 2eb019eb1b7b1ccfc913cd758d341c96fcc5de7f | /model_big.py | dc71367682e2ccb93e44b14b2def6db79465fe5a | [] | no_license | kxiao1/pytorch-vqa | 7053a1fdb3e3d6e404793f6fbf7ac4f32a1a690d | 13f184880744317cd67137323f6035a60c5a5115 | refs/heads/master | 2023-02-19T13:27:35.024927 | 2021-01-09T04:18:39 | 2021-01-09T04:18:39 | 328,067,762 | 0 | 0 | null | 2021-01-09T03:41:53 | 2021-01-09T03:41:53 | null | UTF-8 | Python | false | false | 5,578 | py | model_big.py | import sys
import os.path
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from torch.nn.utils.rnn import pack_padded_sequence
import torch.optim as optim
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import config
from model_baseline import C... |
229dc4b46fcae1fc062a5296880d01a750354d95 | 1f0d3cb1d770e53b3f80682b3013ce3aad85f961 | /hadiths/filters.py | 74c0d628027d565e0d908830ca783172510c8508 | [
"MIT"
] | permissive | hadithhouse/HadithHouseApi | 49c22d7dd6faa45e4b893ec160a752cfb1fbe2c1 | 3b59c42356262ee2a848e1e2251d5c51b4a669d1 | refs/heads/master | 2022-07-25T12:24:02.031098 | 2019-12-05T23:14:51 | 2019-12-05T23:14:51 | 33,794,960 | 1 | 0 | MIT | 2022-06-02T19:49:17 | 2015-04-11T22:30:19 | Python | UTF-8 | Python | false | false | 1,225 | py | filters.py | """
Contains filters that can be used in Django REST Framework views to filter
by IDs or tags.
"""
from rest_framework.filters import BaseFilterBackend
class IdsFilter(BaseFilterBackend):
"""
Filter that only allows users to see their own objects.
"""
def filter_queryset(self, request, queryset, vie... |
e1a273e18ab867effda15d974b360c3133f06126 | db528e1c1a5dbbfc4d4a2563a3606300db1386fd | /central.py | ee14d45f5d6bec7d6809254dd439e1a480c79a32 | [
"MIT"
] | permissive | juan-ee/FTP_P2P | 52238550d1000550a84c1f412bdbf8c846944143 | f5f4cda14a5a17dc81fb817372f3a62afe906a41 | refs/heads/master | 2021-06-06T12:48:35.471551 | 2016-12-14T15:55:00 | 2016-12-14T15:55:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,189 | py | central.py | import socket
import pickle
import os
#import sys
import commands
from hilo import Hilo
def verificar_usuario(us,nodos,client):
while 1:
if us[0] in nodos:
client.send('fail')
else:
client.send('accepted')
break
#aqui puede haber un error por el tamano... |
dc3041d37392b08a36016c9e382527e3dbca249f | a2b9109dd5a97cc94bdc9d4bd5d00119231f35b0 | /page/home_page.py | b4f0fedf874e6e944c6933e74953f074f638499c | [] | no_license | dengmars/crm2 | 8a26a9192e71085b86a8495ea781c779251cdec6 | 0716e0bf225a92d4d917ff7ded28adcc7f50fffc | refs/heads/master | 2023-02-09T13:50:30.747238 | 2020-12-31T08:35:08 | 2020-12-31T08:35:08 | 324,942,216 | 0 | 3 | null | 2020-12-31T08:35:09 | 2020-12-28T07:26:55 | Python | UTF-8 | Python | false | false | 13,771 | py | home_page.py | # -*- coding: utf-8 -*-
# @Time : 2020/12/12 17:11
# @Author : fcj11
# @Email : yangfit@126.com
# @File : home_page.py
# @Project : crm自动化测试
from selenium.webdriver.common.by import By
from page.base_page import BasePage
from selenium.webdriver.support.select import Select
from time import sleep
class HomePage(BasePag... |
2ff4828d37833f61d36d2afe568f3d8dd218b567 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowIpRouteDistributor/cli/equal/golden_output1_expected.py | dd0853e2ff78e96dd649ad4dceba36e6686aa8dc | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 16,844 | py | golden_output1_expected.py | expected_output = {
"vrf": {
"default": {
"address_family": {
"ipv4": {
"routes": {
"10.23.120.0/24": {
"route": "10.23.120.0/24",
"active": True,
"rout... |
079fff4ca95becc70981a8bca4f31829869c1605 | 38d6b53e225e7308a6e3406405a44b7cee6ddd15 | /1333.py | ff1b93a71cf7912e3d19ca3d3a0a37b64d1330b4 | [] | no_license | sys123-data/py_scalper | dbfa083f3a5400ea2a9b01db7b398efcdeb52178 | 6241ae3d62f7d058ecaa7ec52d7d8f7078f15cff | refs/heads/main | 2023-02-18T17:11:32.223109 | 2021-01-10T21:46:53 | 2021-01-10T21:46:53 | 327,862,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,140 | py | 1333.py | import urllib.parse
from pygame import mixer
import urllib.request
import time
url001= "https://1337x.to/search/mandalorian+s02e05+2160p/1/"
user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11'
values = {
'Accept': 'text/html,application/xhtml+x... |
0f4ca43e59c885f0cd6921e23df905fa1818b30b | 0b47cb85ef8c8cc50f0f3d2575abafd1b8f32dd4 | /test.py | baae7d1ded371cbdf7ad9f35195fc51573f8186a | [] | no_license | Kopamed/JSON-Filter | 261dc3970fd192f7d4a6efbc7534484d4e8b4ec5 | f1cf6269ad87abd535fc3e4eedb54d84d337ec1d | refs/heads/master | 2022-11-26T06:42:55.743759 | 2020-08-08T07:47:00 | 2020-08-08T07:47:00 | 281,195,853 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,257 | py | test.py | import pandas as pd
import json
from beeprint import pp
import demjson as dj
df = pd.read_csv (r'TripTile_objects.csv')
a = "{" + df[df.columns[2]].iloc[0] + "}"
pp(dj.decode(a))
#hubs
'''
import pandas as pd
import demjson as dj
import json
df = pd.read_csv (r'TripTile_objects.csv')
j = json.loads(df.to_j... |
cc52f0ca200ca57de2dcd58efcadeaa7934e09db | 81a4bc05e315710e19a7eb716bbbc7284ab0f438 | /profit/utils/data_utils/tokenizers.py | a5cc8f8ff7405696d7d1fe7adbc44e1438661e53 | [
"MIT"
] | permissive | ayushkarnawat/profit | bd754ddd49948b6154c485f19543232c8fbb137b | f3c4d601078b52513af6832c3faf75ddafc59ac5 | refs/heads/master | 2022-11-22T05:39:35.759433 | 2020-07-17T18:22:40 | 2020-07-17T18:22:40 | 206,871,504 | 0 | 0 | MIT | 2020-07-17T18:22:42 | 2019-09-06T20:47:21 | Python | UTF-8 | Python | false | false | 4,421 | py | tokenizers.py | """Tokenizers, encoders, and decoders.
TODO: Should there be a special tokenizer for BERT sequences? It would
allow us to represent different encoding/decodings for BERT-like tasks.
"""
from abc import ABC, abstractmethod
from typing import List, Union
import numpy as np
from profit.utils.data_utils.vocabs import V... |
d5d502f358755718ef9544e0babc3f167af3a8c8 | f7da9c0bdf4611c0ae0fe0bd68b97d6bbaa487d5 | /Answers for Last Year Finals/Final_2014_Q1.py | c2736d5d5dd03f1752754a240558f03bf10d9f20 | [] | no_license | jelsaoverlandfrost/frozen-digital-world-code | 2b68bceb37c2db04354c684e7060117c0016ea69 | 1d85a7e00f204596f0e7739558c8eebd903952cc | refs/heads/master | 2021-07-11T20:48:17.488619 | 2017-10-14T14:49:47 | 2017-10-14T14:49:47 | 106,932,746 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,003 | py | Final_2014_Q1.py | import math
class Point2D:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return 'Point2D(' + str(self.x) + ',' + str(self.y) + ')'
def add(self, vector):
x = self.x + vector.dx
y = self.y + vector.dy
return Point2D(x, y)
class Vector... |
057971826f430ce4484fbc1780ddd72a18838989 | 795caca6c497891e2fcd2b0253a209500744c56d | /src/scripts_multilabel_classification/script_corpus_bigramprob.py | 74f2f84fe6f9931f822ae61ba486c22a75dd2f6f | [] | no_license | RitaRamo/remote-sensing-images-caption | 29c0e0a6b5352b9b3d62c7315cd4d7ac6b0b7076 | 426d97b5d3688f6c52c51ef6e33872554d55751a | refs/heads/master | 2021-11-24T03:02:00.238003 | 2021-11-04T09:23:20 | 2021-11-04T09:23:20 | 244,619,672 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,120 | py | script_corpus_bigramprob.py | import sys
sys.path.append('src/')
from data_preprocessing.create_data_files import get_vocab_info, get_dataset, PATH_DATASETS_RSICD
from collections import defaultdict
import spacy
from spacy.tokens import Doc
from data_preprocessing.preprocess_tokens import WhitespaceTokenizer
import inflect
from collections import ... |
ed0ac79ba487c0c850257b7b54d9150c23335d6b | 1f64f98b2d978f205a1ec55390c9185d125cc62c | /setup.py | 9029c7286d1d546869312f0ac905a2df455af231 | [] | no_license | Yaco-Sistemas/met | b2325af33f698360b3fd6af4700b12c2d55d2f67 | 9f1ef3f3aed7f073855620027ec58740c490d5f9 | refs/heads/master | 2016-09-06T21:39:50.287237 | 2012-12-19T12:17:20 | 2012-12-19T12:17:20 | 5,837,777 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,708 | py | setup.py | # Copyright 2012 Terena. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the foll... |
9ad0c4a11c39034676d47ddab18688a9b6746c6c | 1f9a3b02e07bcae18d44a3941260523ab0609450 | /flaskapp.py | 7ca4b5fa0ae9ed30f045a55a72644a0af534b414 | [
"MIT"
] | permissive | qsblublu/a-blog-webapp-based-on-flask | 69304cfe08efa283f21f888532aeb119798e7ebb | c350da300d3e139d26ab7fca73ae9f1a71606040 | refs/heads/master | 2020-04-13T23:57:39.157540 | 2019-01-05T00:41:54 | 2019-01-05T00:41:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | flaskapp.py | import logging; logging.basicConfig(level=logging.INFO)
import os
from app import create_app, db
app = create_app('default')
if __name__ == '__main__':
app.run(debug=True)
|
0259b6cae08758eb5ff2476c1de974a378d196c6 | f117d31ece12b25afe7182e0546f63f49a1a88d2 | /66 Oh Soldier Prettify My Folder/main.py | 419c23da6d751f48fc30967cac8e4740a89e8bbb | [
"MIT"
] | permissive | codewithsandy/Python-Basic-Exp | 3b5c5cbce3e52bdfaf9795ffa0f868ee646d77d0 | 4c70ada4a042923a94301453c7bd76e704cd2989 | refs/heads/master | 2023-05-12T11:14:24.952570 | 2021-06-02T09:11:18 | 2021-06-02T09:11:18 | 359,138,912 | 3 | 0 | null | 2021-05-13T17:38:35 | 2021-04-18T12:38:10 | Python | UTF-8 | Python | false | false | 607 | py | main.py |
# Oh soldier Prettify my Folder
# path, dictionary file, format
# def soldier("C://", "harry.txt", "jpg")
import os
def soldier(path, file, format):
os.chdir(path)
i = 1
files = os.listdir(path)
with open(file) as f:
filelist = f.read().split("\n")
for file in files:
if file not... |
3c10e057f8431812d10ce1845fd836096865e824 | bbd074f99be369c5a32be4b1252f0b57068d121c | /voice_assistant/db/populate_db/train/train.py | 2a0a732479a054d7ef229650444232832def0f34 | [] | no_license | aana5i/python_library | c4e47db3e91679901acb7512506e269904226922 | 729f63a13682e8fc55e1caf32ac726e58768063b | refs/heads/master | 2023-02-06T01:30:57.034146 | 2020-12-24T14:20:42 | 2020-12-24T14:20:42 | 286,930,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,969 | py | train.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from pprint import pprint
class SqlOrder:
def __init__(self, json):
self.json = json
def insert_all_train_infos(self):
"""
:return: json
"""
lines = self.json
result = {}
for counter, line in enumerate(lines)... |
7533be6be2826389a99a1a5072525778b9bcbbaa | 8c161132ea613f6be983e3cd800f235224e12806 | /lib/util/tokenutil.py | e80717a50ddf138baf3d4ce338c3a86bd8dfb139 | [] | no_license | asdiyanarisha/bot-risha | 52fe2d8af633328c4ffe370688050bbb8931d357 | aa00ed55f32a92632350a78d6d98e4994353b9c5 | refs/heads/main | 2023-01-30T05:10:47.696790 | 2020-12-09T22:40:43 | 2020-12-09T22:40:43 | 320,097,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 862 | py | tokenutil.py | from lib.util import log
from lib.util import dateutil
logger = log.get_logger("token.core")
def get_token(db, vers):
list_token = db.token.aggregate([{'$match': {'type': vers}}, {'$sample': {'size': 1}}])
token = [key for key in list_token]
if token:
token = token[0]
else:
logger.info... |
c65a500d50cfded8581a1f0d26909c6ab49b42e3 | 8580fe5006313a49079e6d28b9c26d94fa03e269 | /String Warmups/strings4.py | fd8c150295c7d801c717f1df45a66324d0d1163e | [] | no_license | kjeelani/YCWCodeFiles | 89e1959217a636efafa7fe96ba9856303c0f19d7 | 5a154d2e47271623930655b96e710bcea98f2e13 | refs/heads/main | 2022-10-04T16:26:28.360335 | 2020-06-07T00:00:44 | 2020-06-07T00:00:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | strings4.py | '''Warm Up 4 tests your knowledge on the .format() method as well as your creativity'''
#fill in the format method with variables of your choice. Make sure that you have the correct number of variables or else you will run into an error
noun1, noun2, noun3 = "Samarth", "Walrus", "wizard"
noun4, noun5, noun6 = "program... |
04fdd480c1e5ba266a412b730d455ac60fc0b35c | 38218d836199490b93469ba21f830c60b1169962 | /curio/time.py | 4d06ede309e1cd23b2a933c04bc8b2b9f20ecdc9 | [] | no_license | idfumg/curio | 87b84133e70854420ec55e5044c452d5f35721d7 | 9859afe0e8f0e4bccd4682fb94edb0da89a4793d | refs/heads/master | 2020-08-27T11:52:23.744025 | 2019-10-15T18:01:44 | 2019-10-15T18:01:44 | 217,358,004 | 1 | 0 | null | 2019-10-24T17:41:01 | 2019-10-24T17:41:00 | null | UTF-8 | Python | false | false | 8,315 | py | time.py | # curio/time.py
#
# Functionality related to time handling including timeouts and sleeping
__all__ = [
'clock', 'sleep', 'wake_at', 'timeout_after', 'ignore_after',
'timeout_at', 'ignore_at'
]
# -- Standard library
import logging
log = logging.getLogger(__name__)
# --- Curio
from .task import current_t... |
1e68ccbf07550c948c9cca3bdbabfc55ff8403bb | df2e6b871467e161172c19f275677c100de906ae | /src/main.py | 1843aaca568512680d6b65f47f0bd8388e374dd2 | [] | no_license | acezcyz/CGSS-ScoreSim | be757fdb1550feb33fad47366da76f46b82b3f35 | a94f2af499c983b03690d93b7e747fb6b5a1fd65 | refs/heads/master | 2020-12-03T06:41:53.866214 | 2016-05-14T14:42:20 | 2016-05-14T14:42:20 | 58,812,571 | 0 | 0 | null | 2016-05-14T14:36:34 | 2016-05-14T14:36:34 | null | UTF-8 | Python | false | false | 314 | py | main.py | import sim,skill,unit
low=1
med=2
high=3
cb=0
sb=1
s1=skill.skill(cb,6,3,12,10,med)
s2=skill.skill(sb,9,5,15,10,med)
s3=skill.skill(cb,11,5,15,10,high)
s4=skill.skill(sb,13,6,17,10,high)
s5=skill.skill(sb,7,4,15,10,med)
u=unit.unit(288017,[s1,s2,s3,s4,s5])
#u=unit.unit(290174,[s1,s2,s3,s4])
sim.simlivetest(u,200) |
07320fc53b04b03c425f6e620166ad624bcb5d77 | 8591dfcbff3bfc72d52c10159f8fe66a7a195ce1 | /hackerrank/interview_prep_kit/minimum-swaps-2.py | 20af0f1e0c5ac12f79fa89f566f129b6f0ddb098 | [] | no_license | morita657/Algorithms | 5f8fec78762ee98ca4e97de17ecf7cb184b8ebcb | 4272d2e9fa36c89952767bd9752f3ca9f1a48e0c | refs/heads/master | 2021-07-14T21:04:03.395411 | 2020-06-03T12:47:17 | 2020-06-03T12:47:17 | 142,182,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | minimum-swaps-2.py | #!/bin/python
import math
import os
import random
import re
import sys
# Complete the minimumSwaps function below.
def minimumSwaps(arr):
swap = 0
i = 0
while i < len(arr):
# Bug in input data which violates problem constraints
if arr[i] == (i + 1):
i += 1
continu... |
b1d2dc25ab78bd2e133f2575ca442c512554c12a | 0e4c5c818d02bc08dbac2bcde04bca7443f977e4 | /server/server/view.py | 1945dbe58e476c21d6cfce36a9491e396fa5757c | [] | no_license | numeny/happy-inn | ea7d47700df41c41d7853eac0fd5e87594fa4eac | 71ac3aab011ae9a506419970b980ca3ed023fa5e | refs/heads/master | 2021-04-03T05:21:42.659554 | 2019-07-17T03:44:54 | 2019-07-17T03:44:54 | 124,604,123 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,983 | py | view.py | # -*- coding: utf-8 -*-
import sys
import time
import json
from django.db.models import Q
from django.http import HttpResponse
from django.shortcuts import render
from rh.models import rh
from rh.models import city
from json_response import JsonResponse
sys.path.append("../")
sys.path.append("../../")
curr_index... |
a8e27b77c132262e18dc379af550b366fb85978a | 1bc89eee17802edfedb0b8b727c9b494df51ecfa | /Invetario.py | 08bda14174b21e3cd62c7bb6daf9c67d4237cf69 | [] | no_license | renarfreitas/Inventario | 0aabd783334bdb8d8040f8f08d8cea52edb3027e | a70fef6731e40b35fc299efd211b8ed34801d161 | refs/heads/master | 2021-06-14T03:24:23.976505 | 2021-02-14T03:51:37 | 2021-02-14T03:51:37 | 136,254,089 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,110 | py | Invetario.py | import platform
import ctypes
import subprocess
import cpuinfo
import os, sys
import glob
import re
import time
import multiprocessing
import pickle
import base64
import uuid
import xlrd
import xlwt
from tkinter import*
from tkinter import ttk
"""Variáveis"""
patrimonioh = str
patrimoniom = str
local = str
matricula =... |
7eb25d24781e9192d8eda5ac8651aa0ad94967b9 | 94cbbf62557d1eb128fa6e18791364ab6748f8fb | /src/backend/slot.py | 39f999489f18542e48dcb911456ec6b2f1092a12 | [] | no_license | danassa/shift-scheduler | 75f3a18f8c1cab1fa7c1f09fb3f39d033a451e76 | afc730695c14a0acc5d48de98556d31c9f7b1557 | refs/heads/master | 2022-12-21T12:38:23.754435 | 2020-09-22T17:22:47 | 2020-09-22T17:22:47 | 265,033,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,694 | py | slot.py | from math import floor
from src.utils.constants import PLT
class Slot:
def __init__(self, date, time, role, person, day):
self.date = date
self.time = time
self.person = person
self.assignment = []
self.options = []
self.role = role
self.week = self.calcula... |
ad32a4f80cef6d6256befaeefdeda17c53720cbb | dc3f65a7628577deba908b0a5dbe6d583e1e71e8 | /PycharmProjects/untitled4/1.py | e90e31eec02462dbd7e6941d1a6e42760f7102aa | [] | no_license | genghaiyang626/w | 7fcce85974b1938d95165ec3cdb1b5fb4db3eac3 | 11e42e7af42511a4c806991b6d2edc9b803f4d82 | refs/heads/master | 2022-03-05T02:51:07.182658 | 2019-11-11T15:31:22 | 2019-11-11T15:31:22 | 219,787,981 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 276 | py | 1.py | from random import randint as zhouzexing
red_balls=[]
while len(red_balls)<7:
red_ball=zhouzexing(1,33)
if red_ball not in red_balls:
red_balls.append(red_ball)
blue_ball=zhouzexing(1,16)
red_balls.sort()
print("红球:",red_balls)
print("篮球:",blue_ball)
|
8ce38551603b5782f89d6bb8f851f25d6b314f80 | 84ce5fd48de24f4415fa1db31d67bd97214de6b5 | /python/8-4.py | c54fc5a3444d0e9f09b844a656d6b0651dee9fef | [] | no_license | pqGC/Core_python_programming | 435d7e4ad46b04eda882216d5b5d6dba118a21b6 | 1fdd2eb302b9959dc7d71afbf84151b015f60d39 | refs/heads/master | 2020-04-01T08:46:27.989137 | 2016-07-07T15:47:26 | 2016-07-07T15:47:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | 8-4.py | #! /usr/bin/env python
# encoding:utf-8
import math
def isprime(number):
num = int(math.sqrt(number))
while num > 1:
if number % num == 0:
return False
num -= 1
else:
return True
print zip(range(1,12),(isprime(x)for x in range(1,12)))
|
6cdb4949fef0651b49cfbe824461513667354351 | 02cc63b0c9ac3b7e6fffb409a6a49e708a0bb648 | /varibles.py | 31b35d010f796ff5a555f0ade746f285008ed899 | [] | no_license | ShivaLuckily/pythonBasicProgramming | dd62a942f09f3d58f75d8ac7c3d4e75b092acc33 | 7adac2a4efba3df23851040ef000d6946da5edf4 | refs/heads/master | 2020-07-22T15:34:43.964828 | 2019-09-09T07:16:24 | 2019-09-09T07:16:24 | 207,247,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | varibles.py | class var:
a=10
b=20
def dis(self):
print(self.a+self.b)
t=var()
t.dis()
###############
class ObjectLocation:
def display(self):
pass
ob1=ObjectLocation()
ob2=ObjectLocation()
ob3=ob1
print(id(ob1))
print(id(ob2))
print(id(ob3))
print(id(ob1)==id(ob3))#True |
0c2622f7065e4d8e83cf0bce7b4842fc62ec3ebb | d7244f5e881e6fb470d478fe832d52c9feef9de3 | /train_ppo.py | 976502e8fad500195b81b549c633df9bba662e0e | [] | no_license | flamz3d/q-trader | d66d0fd7912700e975f38a5096d60c0277e660ef | b7fbbdc9aa040d509d55bf26c4887913aa0a300e | refs/heads/master | 2020-06-15T09:59:59.027817 | 2019-07-21T14:13:17 | 2019-07-21T14:13:17 | 195,267,322 | 0 | 0 | null | 2019-07-04T15:42:00 | 2019-07-04T15:41:59 | null | UTF-8 | Python | false | false | 1,184 | py | train_ppo.py | from agent.ppo import PPOAgent
from stock_market_environment import StockPredict
import sys
import os
from tensorboard_extensions import *
if len(sys.argv) < 4:
print ("Usage: python train.py [stock] [window] [episodes]")
exit()
stock_name, window_size, episode_count = sys.argv[1], int(sys.argv[2]), int(sys.argv[3]... |
b8fe646f52088f0ee17742567b07458410eb7df0 | f72d402968b5e6eba24c47f369f14e6e6cf521a6 | /2017/day 10/day_10.py | 40b48ca4e9e867e49b874051997433c9bb22db6b | [] | no_license | pkitslaar/AdventOfCode | 72638de1fe6584727286f1df99c8c002395d5b27 | dc3c29bb8bf664fb0588bb5d145a70c839eeeff3 | refs/heads/master | 2023-01-07T12:01:34.950724 | 2023-01-04T19:04:08 | 2023-01-04T19:04:08 | 237,312,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,192 | py | day_10.py | """
Advent of Code 2017 - Day 10
Pieter Kitslaar
"""
from pathlib import Path
THIS_DIR = Path(__file__).parent
def data():
with open(THIS_DIR / 'input.txt') as f:
return f.read().strip()
from collections import deque
def knot_hash(lengths, N=256):
values = deque(range(N))
state = dict(
s... |
93d4af69593ef954dba6c58080aad3053e220b69 | c5339971cd8b527e101b2cd36e0a4b7fc1682eef | /gltflib/models/buffer.py | 3170be234b2ed856b88fc6733ea0eda6bfa18f82 | [
"MIT"
] | permissive | pacovicoarjona/gltflib | 3ac6467f32429d62151322b7e274293c2c3821ed | 09adb42c4b597d0aae5bb54e212b5263c463976b | refs/heads/master | 2022-06-09T17:25:52.323242 | 2020-05-08T07:38:17 | 2020-05-08T07:38:17 | 262,255,560 | 0 | 0 | MIT | 2020-05-08T07:25:32 | 2020-05-08T07:25:31 | null | UTF-8 | Python | false | false | 704 | py | buffer.py | from dataclasses import dataclass
from dataclasses_json import dataclass_json
from typing import Optional
from .named_base_model import NamedBaseModel
@dataclass_json
@dataclass
class Buffer(NamedBaseModel):
"""
A buffer points to binary geometry, animation, or skins.
Properties:
uri (string): The ur... |