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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
729f8d1abe6f44747caad59fafbe1b24587facab | b9eb3aa9a16c4f931db0faefaec909577201fb95 | /Euler15/Matrix.py | 0822d561150d904906d032ab2dcc276fcd4bacba | [] | no_license | icasarino/ProjectEuler | 8ddeac69521db6c0ccf7a68d767291b997445ccf | 39083bcef218560a6b130c339574adf00cee8fbf | refs/heads/master | 2022-04-27T11:03:15.786146 | 2022-04-05T17:07:39 | 2022-04-05T17:07:39 | 254,862,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 785 | py | Matrix.py | class Posicion:
def __init__(self,i,j):
self.i = i
self.j = j
def createMatrix(matrix,size):
for i in range(size):
line = []
line.append(0)
for j in range(size - 1):
line.append(0)
matrix.append(line)
def printMatrix(matrix):
for row in matrix:
print(row)
def updateMatrix(matrix,... |
3e3a924ed111de243c7777152b5ba509f3163604 | be8166736f28449e2c44589470ee04d2eb9a5f6f | /sudoku2.py | ab959dcab6168baf7e61a59330c1f9d0845a62bc | [] | no_license | isega24/sudoku | cbd8407b7efd749f4aa2a7b360c7beb95efd77b9 | 6c1647357c2b8b6297c212f9afff0219ffac1bb2 | refs/heads/master | 2021-01-21T17:46:24.446973 | 2015-02-19T18:38:01 | 2015-02-19T18:38:01 | 29,773,776 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,414 | py | sudoku2.py | #!/usr/bin/python
'''
Este programa queda inacabado por que el lenguage python no hace copias por valor,
sino por referencia de las listas, pero en este algoritmo necesito que se pase una copia,
para que no modifique la copia inicial
'''
def imprime(sudoku):
print "_ _ _ _ _ _ _ _ _ _ _ _ _"
for i in range(9):... |
8aafc1df74e200ad3296f54f22c452a7da2863b2 | 290a1ca19cd27a7d467173cde68f20ea4679e075 | /src/sim/dmtcp.py | edbba39369cae81e0fda6e041713ce93b1019870 | [] | no_license | PSC-PublicHealth/pyrhea | 73404425b5ddb896c9bc1ce8b10ad8d54bb1248c | 372adb502135edd68b6f0d473d2e001258eae5a8 | refs/heads/master | 2022-07-10T23:34:04.040984 | 2019-09-05T05:29:17 | 2019-09-05T05:29:17 | 97,740,757 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,627 | py | dmtcp.py | #!/usr/bin/python
# This script comes from the dmtcp repo which is licensed with the
# GNU Lesser GPL v3.
#
# The contents of this file are inspired from the python script dmtcp_ctypes.py
# originally supplied by Neal Becker.
import os
import glob
import subprocess
from ctypes import *
import subprocess
ckptRetVal =... |
8ddd2e20b8c7d523f0a86d4dbe107e2fd2260c59 | 6f7a45843dc4b989152a9fef3e0147ca006bfc06 | /trigger/basedrstrigger.py | 7a0b48c4f3eb53660a39dfdfddb84a49a53614d9 | [] | no_license | CFHT/apero-trigger | 37cd3cf0f7bc9b4916b44a6d561e05deb9641846 | f9ca6b56d40c3dbe7687629b461cb17be55d750a | refs/heads/master | 2023-03-07T04:58:31.304108 | 2021-02-18T03:22:04 | 2021-02-18T03:22:04 | 294,353,536 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,909 | py | basedrstrigger.py | from pathlib import Path
from typing import Collection, Dict, Iterable, Sequence
from logger import log
from .baseinterface.drstrigger import ICalibrationState, ICustomHandler, IDrsTrigger
from .baseinterface.steps import Step
from .common.pathhandler import Exposure
from .exposureconfig import SpirouExposureConfig
fr... |
ecf2d91c367af335192e7e7c46663a054b872dec | 1ad5956f45732ecaf9a59ea4d0c3acd8116edfd4 | /web/app/models.py | 3445226bfde74f6a71dadc944b0991bc7e31d16b | [] | no_license | raginivermaa/azulguard_streamer | c643721545bc4008ed52f2e816bedd288cd711a1 | 7cc92b36da6db836de94b595c7c914382952cd85 | refs/heads/master | 2020-03-25T15:50:45.751091 | 2018-08-08T20:05:18 | 2018-08-08T20:05:18 | 143,903,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | models.py | from app import db
class Sensor_Data(db.Model):
__tablename__ = 'sensor_data'
datetime=db.Column(db.DateTime, index=True, primary_key=True)
apartment=db.Column(db.ForeignKey('apartment.aid'), primary_key=True, index=True)
beacon=db.Column(db.String(64), index=True)
d_01=db.Column(db.String(64), ind... |
d319b1573d185b4a4ab5748123a8033898730293 | 6e344bc749a209bb2a9a8aa61b04e5056f5fcb1f | /tasks/chapter.py | e56fc94de579b8c66368cd0dd631af0c7f06ca3c | [] | no_license | onekstar/nobot | 84bbfd36ef21637f8b3fdc35a6dd73c0873e8fdf | 68f1fff93d06455b803152e8b6ff5bb68315daec | refs/heads/master | 2021-05-29T22:13:21.564455 | 2015-07-04T11:15:10 | 2015-07-04T11:15:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46 | py | chapter.py | # encoding:utf-8
from tasks.celery import app
|
9db3ea7871cc76c3e78d8a72692a6901f7481f0b | 2886c2724fb4f12c99d028e9cb55da9b232a4a85 | /src/rnaseq_lib3/aws/__init__.py | 1727b02ec4c0958f279351732d7f4b1917cfd6d1 | [
"MIT"
] | permissive | jvivian/rnaseq-lib3 | 199f0af5bd0dc0b200cacd3005f67090a964e6d5 | 39d16b7648794c141c2aa00bf2a59786b62ddb09 | refs/heads/master | 2021-06-28T12:22:40.282239 | 2019-05-10T00:40:48 | 2019-05-10T00:40:48 | 135,637,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,013 | py | __init__.py | import os
import boto3
# S3
def list_all_buckets(profile_name: str = 'default'):
session = boto3.session.Session(profile_name=profile_name)
s3 = session.resource('s3')
for bucket in s3.buckets.all():
print(bucket)
def list_bucket(bucket_name: str, profile_name: str = 'default'):
session = b... |
f9309d2979df065c2f1e0a81f3d0cb330e92e66e | 4b242bcc2fc87c446bc56aa41db7968735a56665 | /3for/cycling/cycling.py | 93d70b809543b6dcc1c6b73b9760943d2b31a9a1 | [] | no_license | simpleboss/Python-Honglee | f85e2169e76ccc1d0b173aec0638dd591c743b43 | 2a206078731de0a1ac75b286f6eac11605c4212a | refs/heads/master | 2023-09-02T16:18:09.775696 | 2021-11-19T08:57:36 | 2021-11-19T08:57:36 | 98,964,372 | 0 | 0 | null | 2021-11-19T08:43:49 | 2017-08-01T05:50:26 | Python | UTF-8 | Python | false | false | 678 | py | cycling.py | def cycling(n, input_list):
range = 0
result = [0]
left = input_list[0]
for right in input_list:
if right - left > 0:
range += right - left
#print 'add range', range
else:
if range != 0:
result.append(range)
#print 'appe... |
2b022eb463d55eed5962b4ee86e06905d525c2df | 32300e4c7813c39799e90a19cffa8fc257a3ce1d | /tests/test_SklearnTruncatedSVD.py | 886707abce19588866efcaa9a138c4c46ee479f4 | [
"MIT"
] | permissive | c-bata/sklearn-onnx | 152a9756d852b3d27d1609345956fcecfcdf89c6 | ff3e2eb204991b5799fc606c265b2c283dbfc25c | refs/heads/master | 2020-05-07T15:17:45.479575 | 2019-04-17T17:43:29 | 2019-04-17T17:43:29 | 180,630,659 | 0 | 1 | MIT | 2019-04-17T18:43:40 | 2019-04-10T17:26:32 | Python | UTF-8 | Python | false | false | 1,249 | py | test_SklearnTruncatedSVD.py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import un... |
8d3d387df6fcad66cfe862db73d2db1f1d805f4b | b200f895b66e682b2419fa758d73dee317830349 | /autotorrent/tests/test_at.py | c8106a0735ba23c2daf13678a2db6eb3bf0384af | [
"MIT"
] | permissive | JohnDoee/autotorrent | 8fe33abba8eafabb6a6d2b0e8cf317641c1ab966 | 4f1f1669eb3f8a8ea5751881cbf78db518f115d0 | refs/heads/develop | 2022-06-20T20:10:59.366051 | 2022-05-29T12:50:55 | 2022-05-29T12:50:55 | 13,565,210 | 302 | 51 | MIT | 2021-11-05T04:13:00 | 2013-10-14T15:32:11 | Python | UTF-8 | Python | false | false | 37,577 | py | test_at.py | from __future__ import unicode_literals
import hashlib
import os
import shutil
import tempfile
from io import open
from unittest import TestCase
from ..at import AutoTorrent, Status
from ..bencode import bdecode, bencode
from ..db import Database
def create_file(temp_folder, path, size):
path = os.path.join(tem... |
554ca5ed0ffabec24465d8426bd700fdb9ebe3dc | 9db0e2d33df554ff8394ebd49dceca68758623f5 | /chap1/demo.py | d67a88b1e6192346067a538f0f9e7b437a28dbe3 | [
"MIT"
] | permissive | xhal/study-python | 650bc6bc16abfbe1d8d108d1eb437db178357bd1 | 4b6ba5fae0915ca934c7ff1b18e5d07792fb59eb | refs/heads/master | 2023-08-05T02:50:38.352017 | 2023-08-01T02:15:46 | 2023-08-01T02:15:46 | 335,203,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 419 | py | demo.py | # 版权信息: All rights Reserved, Designed By XHal.cc
# 代码作者: Hal
# 创建时间: 2021/1/21 20:59
# 文件版本: V1.0.0
# 功能描述: print 使用
print(520)
# 不换行
print("this:", (520 + 556565.88565), "ssdfsdfsd", 'sdf222', 2 * 32 * 8 - 11 + 66)
print('sdf222222')
# 输出至文件
file1 = open('D:/python/test.sql', 'a+')
print('test hello... |
4ca43a60d3da63500d9636c8b09c46e74388c15c | 3787aae1032cdbbcabb1ee21331afac6d7b8212f | /angora_unittest/FIELDSEARCH/testproject.py | d911e46a5b31f36abe8620d590ebc0b0fa1cb5e4 | [] | no_license | MacHu-GWU/Angora | fc51bbe0c6a83553b3408666879117eb05756c3b | e4db975abf8566074cd610b1f026f858db047a9e | refs/heads/master | 2021-01-19T21:51:46.909088 | 2015-06-18T20:35:28 | 2015-06-18T20:35:28 | 28,941,721 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,125 | py | testproject.py | ##encoding=utf8
"""
本项目是在 FieldSearchEngine 的框架上进行的项目。采用了该框架后, 创建一个使用单元搜索引擎搜索文档的应用
只需要如下几步:
1. 定义schema, create_schema()函数既是, 具体详细的定义请参考 field.py 和 基于sqlite3的单元搜索引擎.md
2. 从你的原始数据中读取文档, 按照你定义的schema, 将文档封装成字典, 再装入数据库。load_document()既是
3. 用引擎创建一个查询, 添加各种过滤条件, 然后执行查询, 返回用字典封装的document
基本上可以控制在 30 - ... |
65789163f8b0ab6e87c0a0531185a7a0f9ca2a19 | 4b49575619e1035b53f366eec761e5616aacf28e | /AdminSite/DBmanager.py | 5775e2dcac4e55c458429b9f011bf737c62bb332 | [
"MIT"
] | permissive | AndreyChertckov/LibraryHelpBot | fbed52ebdee17e613e7564550349b9d28480d95d | 0bea1afff955d9b67cbad2db2cfbe19fdee2b069 | refs/heads/master | 2020-03-20T19:23:46.558168 | 2018-04-25T13:34:18 | 2018-04-25T13:34:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,945 | py | DBmanager.py | import pymysql
from configs import library_database, library_login_database, library_password_database
import os.path as pt
class DBManager:
def __init__(self):
self.db_connectionn = pymysql.connect(
'localhost', library_login_database, library_password_database, library_database, autocommit=T... |
0874b6e9c9055b598aa6a40ac32eaf0a445f3721 | e2e3315e83353c6f0e6f08125f480295e278a3a9 | /steamFixtureGUI_old.py | 5f131eab24628a7fa39dfdedc7eeb72d6e31beed | [] | no_license | colaso96/Steam_Fixture_3Sensor | 2f0cf9fb774082fbb4fbbf732b0f53796626f51f | 5a8e5cbc9ed06a1c66d6c9c42279d656a6942baa | refs/heads/main | 2023-04-03T12:07:12.232170 | 2021-04-13T19:40:25 | 2021-04-13T19:40:25 | 352,732,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37,190 | py | steamFixtureGUI_old.py | import threading
import matplotlib.pyplot as plt
import pandas as pd
import math
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMessageBox, QApplication, QInputDialog, QWidget
import constants
import steamSensorFixture_noRTD
import os
#-----------------------------------------------... |
52653701906b9338568dbd6a9841b269f05cd54f | 4c7b3c712b8a2f6857919e4bfef96d7804d5aaa8 | /SecondMM.py | 5d6aed5167deccbc4dd36ed6972aceef9c9aa1c5 | [] | no_license | michaelkulinich/ML_Assignment2 | ff862e1e74427692b6252367c54301a5c95326eb | 84e2b83786242958b13471c27dbded9a9c0f63a0 | refs/heads/main | 2023-02-11T17:24:29.861206 | 2021-01-06T19:26:52 | 2021-01-06T19:26:52 | 327,408,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,208 | py | SecondMM.py | import random
punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~|'''
# returns a list of all the words in the file in order
# as if all the poems combined into on long continuous poem
def parse_input(input_file):
starting_word_count = {}
words_list = []
current_rhyme = ''
rhyme_list = []
for line in i... |
de3f04637bfcafc10b47edd184e990d46495ab0e | eadc9e58efadb4b1955c5a8f54bc8a42ea1c7bef | /api/apps/transports/views.py | 7c5a069c3302f0d8c2bb85190788690fbc75930f | [
"MIT"
] | permissive | nunodotferreira/tpp | b1150c09a6865644329c338f2e44e98b67eb9fa4 | 75e466c8c37f11006b601b38668e2a15e9c45204 | refs/heads/master | 2021-05-03T10:33:18.325418 | 2018-02-06T22:56:27 | 2018-02-06T22:56:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | views.py | from rest_framework import viewsets
from api.apps.transports.models import Transport
from api.apps.transports.serializer import TransportSerializer
class TransportViewSet(viewsets.ModelViewSet):
serializer_class = TransportSerializer
queryset = Transport.objects.all()
|
6633b80bf589938d0e022d787850e25981275c23 | 3edec2ab1fe22a5aa8a72583597c3797200b5420 | /plugins/Check_SANtricity_Storage_Pool_Status.py | 8825266bf3fbb4d82b2dfefd3f2bee0d736e066b | [] | no_license | dupondje/netapp_santricity_nagios | 42adfea65ca495fbee8adcbe5d4063c36d083788 | 8ab202ea01893457b5211ee2b69248362bb5e516 | refs/heads/master | 2022-04-30T19:30:18.976906 | 2017-07-13T09:36:26 | 2017-07-13T09:36:26 | 97,102,738 | 4 | 1 | null | 2022-03-22T09:51:44 | 2017-07-13T09:04:55 | Python | UTF-8 | Python | false | false | 10,207 | py | Check_SANtricity_Storage_Pool_Status.py | #!/usr/bin/python
# Copyright 2015 NetApp Inc. All rights reserved.
import sys
import csv
import logging
import SANtricityStorage
from logging.handlers import RotatingFileHandler
serverUrl='https://10.0.1.30:8443'
critical="95.0"
warning="75.0"
urlToServer=serverUrl+"/devmgr/v2"
loginUrl=serverUrl +"/devmgr/utils"
s... |
12115f7ea537cb55abfbaf155f5744680616a031 | 364f42944cff372b873caba95198ab0205afc0a6 | /step1/file_read_and_write/file_reader.py | 1d94853a8c214a2083ec4e5bac2ca590025b1f3f | [
"Apache-2.0"
] | permissive | yusuke-konishi/PyConTutorialSampleCode | f0db861f4d9b572e6ffa6012551e7d56647da448 | 8358f49daef0494b14df49c9dbefd4458bfe5d55 | refs/heads/master | 2020-03-28T19:18:33.783529 | 2018-09-16T15:18:41 | 2018-09-16T15:18:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 764 | py | file_reader.py | # -*- coding: utf-8 -*-
def file_reader():
# sushineta.txtを読み込み専用で開く
f = open('sushineta.txt', mode='r', encoding='utf-8')
# read関数でファイル全体を文字列として読み込む
data = f.read()
# ファイルを閉じる(リソースの解放)
f.close()
print(data)
def file_reader_2():
f = open('sushineta.txt', mode='r', encoding='utf-8')
... |
c88dc6e1acab22c8043c57a7ef2661f35a6853f8 | dbe237cf3f0f2b269b275a430fbab52028371779 | /matcomp/data.py | c10e6aabdaeb781b27bf80e2b2af0a061302e1b0 | [] | no_license | avivrosenberg/mlopt | 454e13dce7fc2795ede720dea4676385b1d14a17 | a9cbd75d3be9a76b82e88bb9fc09442efaed06b5 | refs/heads/master | 2020-05-15T08:30:53.247677 | 2019-09-22T11:16:18 | 2019-09-22T11:16:22 | 182,160,645 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,052 | py | data.py | import abc
import math
import os
from typing import Tuple
import numpy as np
import pandas as pd
from util.util import download_data, cachedproperty
URL_ML_100K = "http://files.grouplens.org/datasets/movielens/ml-100k.zip"
URL_ML_1M = "http://files.grouplens.org/datasets/movielens/ml-1m.zip"
DOWNLOAD_DIR = "./data"
... |
37e86a7ba9421043533d7c707b9ab7965fb817c2 | 0bd6c66380c4300953c5f1b719d61002705fae5f | /setup.py | 60a39ffce6853d96d7efa260650652be30c3b9ef | [] | no_license | davidtangGT/PORMAKE | 34d711c2d7ca932be14c30e836c1b6f72acf0bf8 | 39cde3323363f3028e41c7cb2da0b390f679751f | refs/heads/master | 2023-08-28T12:45:18.426869 | 2021-10-19T21:06:11 | 2021-10-19T21:06:11 | 419,145,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | setup.py | from setuptools import setup, find_packages
# Get dependencies from requirements.txt file.
with open("requirements.txt", "r") as f:
install_requires = f.readlines()
setup(
name="pormake",
version="0.0.2",
description="Construction of nanoporous materials"
" from topology and building b... |
cdb723103a2663043d92c4350905f7e55e7850cf | 5a8214b3a452c574e6c883bf5d90ba58ba87c461 | /leetcode/230.kth-smallest-element-in-a-bst.python3.py | d372c5ece3de7a04a66fd8e2c2806641d9ee5645 | [] | no_license | phlalx/algorithms | 69a3c8519687816e3c6333ec12b40659d3e3167f | f4da5a5dbda640b9bcbe14cb60a72c422b5d6240 | refs/heads/master | 2023-02-03T10:30:30.181735 | 2020-12-26T09:47:38 | 2020-12-26T09:47:38 | 129,254,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,499 | py | 230.kth-smallest-element-in-a-bst.python3.py | # TAGS BST cool
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
# Solution 1
class Found(Exception):
def __init__(self, v):
self.v = v
# Variant of size
def f(t, k):
if t is None:
... |
a4f9d9f41830af3efab381ef9f986af7bd401701 | 9ad788a157c607aa819d1d20acd81d1d97fd28aa | /main.py | 46b2ef353d49071c663fedb093bb76410fc63a57 | [] | no_license | carlo-theunissen/knn-clone | 600317d631a2d3457b465c4a23ee4f5c02450fab | a65436b162c01d4b21179625c1cae4632ab31b71 | refs/heads/master | 2023-03-11T01:27:12.946382 | 2021-02-24T13:16:20 | 2021-02-24T13:16:20 | 342,025,017 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,761 | py | main.py | import multiprocessing
import pandas as pd
from joblib import Parallel, delayed
import numpy as np
import time
from tabulate import tabulate
from sklearn.decomposition import TruncatedSVD
from KNN import k_nn
def knn(train_X, train_y, test_X, distance, p=0):
return k_nn(train_X, train_y, test_X, distance, p)
de... |
9174dba340d77af1057cf5cb84d622f73b194caf | c9d957b7410aec200df967116d99d85d5fad01d8 | /parallel_examples.py | 9c5d7918e1996cdb3adc0bfa94d14f30b8360a94 | [
"MIT"
] | permissive | jorjun/asyncio-examples | 222c7ed6a4e2856b4278ce0af6e835e6f512c096 | 62b7e0f2f01b62ca071feaa19bb0b8cb1ed085ff | refs/heads/master | 2020-03-25T11:38:38.530927 | 2020-01-16T16:12:24 | 2020-01-16T16:12:24 | 143,741,177 | 0 | 0 | null | 2018-08-06T14:35:46 | 2018-08-06T14:35:46 | null | UTF-8 | Python | false | false | 819 | py | parallel_examples.py | """
Demonstrate async 'gather' vs 'as_completed'
@jorjun Dies Martis, Sol in Leo, Luna in Gemini, An:Viv
"""
import asyncio
async def waitn(n):
await asyncio.sleep(n)
return f"I waited {n}"
async def task_gathered():
# Results will be delivered in order of call
results = await asyncio.gather(
... |
767ba07bc7e69dd9ab7c376e9380d94b35b76ae3 | 6bf2c757a86f5747aafe707ff9b005fda82919b2 | /regular expresion 2.py | 523af4b35270f4e01e0cd690771252f0ec22846d | [] | no_license | MahadiRahman262523/Python_Code_Part-2 | 6ab9e3e6ac24ca80216ba3b6bf89c6c617c746c6 | 2f2a743d6dc1c05986f17eb56ab6bc8ebb5978aa | refs/heads/main | 2023-07-16T00:38:26.318118 | 2021-09-05T19:46:31 | 2021-09-05T19:46:31 | 403,398,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | regular expresion 2.py | import re
pattern = r"colour"
text = "my favourite colour is blue"
match = re.search(pattern,text)
if match:
print(match.start())
print(match.end())
print(match.span()) |
5e6bcda86b55f183944eacf652518b8c9388bf8b | 9c7fcaaab4a71429a814a730962fb915c523346e | /Face_Reconition/MTCNN_Train/Detector/ImageDetect.py | 9e8dcb1289df972beeb7ca62a32aaa5d4aa81044 | [] | no_license | brahimbellahcen/MTCNN-of-Litong | 73e22ddb4259197c08b1db17cde145eabf82aafe | ad22f284eec562bd50f6dc5bc124b41059625011 | refs/heads/master | 2022-10-02T19:31:40.317251 | 2020-06-09T07:51:23 | 2020-06-09T07:51:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,723 | py | ImageDetect.py | """
此文件用于图片人脸检测
"""
import numpy as np
import utils
from MTCNN_Train import DetectorNet
from torchvision import transforms
import time
import os
import torch
from PIL import Image, ImageDraw
# -----------------------------设置网络参数--------------------------------
p_cls = 0.4
p_nms = 0.5
r_cls = 0.5
r_nm... |
dcc2861e1ebcacaa6d9bc5113d47f05ffe89d80a | 3a00a6ffaf6601bdca359125728a8d93d452d717 | /ProjectPythonUDM/generador.py | 2b0fc258bdbf9995d1d4476c37cc216b84eadbda | [] | no_license | Micromegass/Python | 9fddc4231025d915edeb7153c1d2ff0c7baf9924 | 06f2969e5e754f98b7e48f41e8d98702b838dafb | refs/heads/master | 2020-04-30T03:38:08.035859 | 2019-05-04T16:18:01 | 2019-05-04T16:18:01 | 143,202,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | generador.py | from random import randint as ra
a = open("simulados.csv","w",encoding='ISO-8859-1')
a.write("idciudad;idproducto;idcantidad\n")
for i in range(5000):
linea = ""
linea += str(ra(1,10)) + ";"
linea += str(ra(1,20)) + ";"
linea += str(ra(1,30)) + "\n"
a.write(linea)
a.close()
... |
d82cc12eb7f6f22bc9252609d6fcce6a4b35500b | 3b1c8822ebbe1afce38e6bad5f3fecde08b00f9a | /BFS_Simulation/SNAP/SSBound.py | 944c94cf56bcc8750636327ed40e6ca7fa8d8297 | [] | no_license | ravikant7890/PycharmProjects | da659be04a7b577a5da96b24e7945b68901605fd | 63b28abfe8ea2444211bb1ebeee983ca0372d579 | refs/heads/master | 2021-01-19T19:38:03.197820 | 2017-06-30T03:16:01 | 2017-06-30T03:16:01 | 88,428,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 79 | py | SSBound.py |
#form a metagraph
#cound the superstep:
#for loop over length of diameter |
8042bd0c2e2af53e1e8cae7ac0e211a79c1b0d6e | d5ee09b0465efb4fd73f0876ccdf4b3d8247b4bb | /clinichub/tests/__init__.py | f9a1071b484ef62fbb08a717f13c47858fd61b2b | [] | no_license | jenwich/clinichub | 2068610c9b6d6db7e74bc8308f21b4770c41c612 | 2e3bcdfdac5be949fcf5cf199097281640014d84 | refs/heads/master | 2021-01-13T07:50:26.267988 | 2016-11-28T05:14:42 | 2016-11-28T05:14:42 | 69,753,653 | 0 | 2 | null | 2016-10-19T15:28:09 | 2016-10-01T17:45:15 | Python | UTF-8 | Python | false | false | 23 | py | __init__.py | from .patient import *
|
f72e377c15a8c7ed9ae8cce1c8e9cceb6e76a541 | 657ac5489186e9e6f9aa7522cbf25ee929f8dde6 | /microchip/blog/models.py | 2e06aef1d96ece885a8c849e879dd5449869f89c | [] | no_license | Ginkooo/MicroChipServer | ab8f30fb87d89d9cd217b5abe7a8e940c9d3de3f | fe18496f1023f13a0dad2efba17cfa95e1748a5e | refs/heads/master | 2021-01-13T05:28:46.870298 | 2017-05-10T10:34:47 | 2017-05-10T10:34:47 | 86,624,819 | 0 | 1 | null | 2017-04-02T13:16:07 | 2017-03-29T20:09:22 | Python | UTF-8 | Python | false | false | 2,467 | py | models.py | from django.db import models
from django.db import models
from django.core.validators import MinLengthValidator
from taggit.managers import TaggableManager
# Create your models here.
class Content(models.Model):
'''
Entity contains content for according post, in multiple languages
'''
english_title =... |
388556c593a043fcbbd3d84e17d01277f0198f88 | 50106d3b4996c56cd625ae5cebbd9e8175d76e4f | /jobadvisor/reviews/models/interview.py | c56500a7d29c0af8d7a36ef3a149da9d277613a0 | [] | no_license | ewgen19892/jobadvisor | 07231a6245024468a33cc6ff734a6276f9b6ec95 | 713b9d84ac70d964d46f189ab1f9c7b944b9684b | refs/heads/master | 2023-05-27T00:15:35.170865 | 2021-06-20T16:31:32 | 2021-06-20T16:31:32 | 378,689,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,950 | py | interview.py | """Interview models."""
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.utils.translation import gettext_lazy as _
from jobadvisor.reviews.models.report import Report
class Interview(models.Model):
"""Interview model."""
class Meta:
"""Meta."""... |
60034fe4fd63f4bc1657df97b6be343caeda64f9 | 626bcce701acac5e09156a40b90af93799f3ec53 | /20.py | 3dad635697c5a3e764d1cf61a2a9a0861c04b4e8 | [
"Apache-2.0"
] | permissive | blademist/py-live | be0c0b5a15d302882639833547950130e0823bfd | 13ad8ef3137774150e93196b0c93987e2aa15227 | refs/heads/master | 2020-05-04T06:41:01.655344 | 2017-09-07T17:04:23 | 2017-09-07T17:04:23 | 179,011,679 | 1 | 0 | null | 2019-04-02T06:18:37 | 2019-04-02T06:18:36 | null | UTF-8 | Python | false | false | 2,912 | py | 20.py | import requests
import json
import hashlib
platform = {
'name': '由于直播',
'id': '20',
'img': "http://www.anzhi.com/icon.php?u=ZGF0YTN8aWNvbnwyMDE3MDR8MTh8b2Qxc0MzQjFIMTJGdE4xNFdoTXM0WDYvNWQyYWE5VlZoUWl5NzYyejlXTT0="
}
class Router(object):
def __init__(self):
self.search_url = 'http://api.youyu... |
0c566984fabe7ad527d5dfcd07adc18afa6b022e | 842cf533f5eb69bc25ca0e6787b20748d642af4c | /openapi_core/parameters.py | cafde800efb9182f7fc4d117e38ab7ab51b0adaa | [
"BSD-3-Clause"
] | permissive | AMcManigal/openapi-core | 4a31d9547980d3d5ac9f8267fc0a5ae7249f8744 | 84d36e33c5d55f7466f1a49bf0c5ff8c3d133572 | refs/heads/master | 2020-03-08T10:14:06.192628 | 2018-04-09T14:30:41 | 2018-04-09T14:30:41 | 128,067,360 | 0 | 0 | null | 2018-04-04T13:38:58 | 2018-04-04T13:38:58 | null | UTF-8 | Python | false | false | 4,731 | py | parameters.py | """OpenAPI core parameters module"""
import logging
import warnings
from functools import lru_cache
from six import iteritems
from openapi_core.enums import ParameterLocation, ParameterStyle, SchemaType
from openapi_core.exceptions import (
EmptyValue, InvalidValueType, InvalidParameterValue,
)
log = logging.get... |
770df3844657abd13e80e83e761a9af68930edba | 3cc68c602b2b39847d2b4c415e696d8031809fe7 | /amqp/listen.py | 35c707d6115d0d5b00237ef5d956851030a804b7 | [] | no_license | asadoughi/toolbox | 11b4682596472ec080de99d429692761d5d37337 | e12784718f486b29ea0196d903b6dcfcb288f6b1 | refs/heads/master | 2020-06-02T00:00:28.335332 | 2014-09-09T22:25:22 | 2014-09-09T22:25:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 625 | py | listen.py | from kombu import Connection, Exchange, Queue
from pprint import pprint
nova_x = Exchange('nova', type='topic', durable=False)
info_q = Queue('notifications.info', exchange=nova_x, durable=False,
routing_key='notifications.info')
def process_msg(body, message):
print '='*80
pprint(body)
me... |
c6b1fefca71747c606bdf6748acf671bf3221d90 | b3c16d826ddb8f7aca764ce5689f94388e781e74 | /app/common/exceptions.py | d9ba5bf12cbbeaaf751ad89624335b3ddf2d10bd | [] | no_license | tominozh/home_base_rpi | f27566af5524d75f1d8908b3798c3568c5fff0ff | ca8ad96677327c077f3253a821c8d0a09c94c60d | refs/heads/main | 2023-01-22T06:59:44.874053 | 2020-12-07T19:22:44 | 2020-12-07T19:22:44 | 319,414,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | exceptions.py | __author__ = 'chenfeiyu'
from . import constants
import logging
class CommonError(ValueError):
def __init__(self, message, root_tag=constants.XML_ROOT_TAG):
ValueError.__init__(self, message)
self.root_tag = root_tag
class ValidationError(CommonError):
pass
class ProcessingE... |
7fd45cd5d59f3ee27e55ba60dc21c7828892b2c4 | 91f07c709f7c96986f41f779ad6457eb65020878 | /jupyterlab_git/tests/test_clone.py | 3b2c0ddd681f142058fb11fc72a1e8ce490ce29a | [
"BSD-3-Clause"
] | permissive | telamonian/jupyterlab-git | 4b5792aa9a0d93864a2e4b75a127df68d0cc9376 | 65cd7761e87519a24e4e25260659c0f505d011b6 | refs/heads/master | 2022-09-11T14:57:24.944887 | 2022-08-25T10:23:24 | 2022-08-25T10:23:24 | 208,159,618 | 0 | 0 | BSD-3-Clause | 2019-12-07T01:21:36 | 2019-09-12T22:57:35 | TypeScript | UTF-8 | Python | false | false | 8,988 | py | test_clone.py | import os
from pathlib import Path
from unittest.mock import call, patch
import pytest
from jupyterlab_git import JupyterLabGit
from jupyterlab_git.git import Git
from .testutils import maybe_future
@pytest.mark.asyncio
async def test_git_clone_success():
with patch("os.environ", {"TEST": "test"}):
wit... |
529f3ce856e456e42cb36a4893e59ebf483ce3a6 | f921fe942edabcb46a7d7d784988795be7551f22 | /ballooning_structure.py | 7373fe1d015383fe678d659c9157d916d0dd9270 | [] | no_license | drdrhatch/IFS_scripts | 1346c35f1914fec927b6c7d9aa5f112a8f4cd7da | b5e490ecbd6ddb1bf9f5a62e584c00d6e513aeee | refs/heads/master | 2023-04-03T16:32:28.801160 | 2023-03-23T23:15:12 | 2023-03-23T23:15:12 | 187,842,157 | 3 | 3 | null | 2021-03-29T21:17:02 | 2019-05-21T13:22:53 | Python | UTF-8 | Python | false | false | 8,580 | py | ballooning_structure.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import argparse
import genelib as glib
import ParIO as pario
import fieldlib
import momlib
import matplotlib.pyplot as plt
import balloon_lib as bl
import read_write_geometry as rwg
import time
parser = argparse.ArgumentParser()
parser.add_argument("suf... |
f9b9a5b45103fc5b8cb1f2ccb7a5f2e7f98b316c | 849c857df7460826e6051fcf8d849ffa0e0c87ed | /dataset/sampling.py | 481feb6d0a639c7764b07391bcb00d06a37cb1af | [
"MIT"
] | permissive | zaihanLit/logbert | 6c18d7189f63573625c3c044311fa74798fbc4ef | 8128ffc1544d537e41bf178bbca7f5086f910da0 | refs/heads/main | 2023-08-07T02:15:34.252785 | 2021-10-01T15:43:03 | 2021-10-01T15:43:03 | 404,273,810 | 1 | 0 | MIT | 2021-09-08T08:42:59 | 2021-09-08T08:42:59 | null | UTF-8 | Python | false | false | 907 | py | sampling.py | import numpy as np
def sample_raw_data(data_file, output_file, sample_window_size, sample_step_size):
"""
only sample supercomputer dataset such as bgl
"""
sample_data = []
labels = []
idx = 0
print("Start sampling")
with open(data_file, 'r', errors='ignore') as f:
for line in f... |
39b370d10d6304399e8693f99a770a95715e1c94 | b1b8627730d5fd6efa1f9b133c94c2c2b273c16e | /ephysanalysis/boundrect.py | 7d47e3e4d324d606bd65bc1b7ad3fb04dc98e2b6 | [
"MIT"
] | permissive | tropp/ephysanalysis | 55aa56cf20e8b17ccab465cf167bb7bdf7be4c55 | 62fde5928825ef52d2f3566aef8bc46dc45bab68 | refs/heads/master | 2022-03-28T00:21:58.905636 | 2019-04-13T11:27:50 | 2019-04-13T11:27:50 | 260,465,154 | 1 | 0 | MIT | 2020-05-01T13:25:44 | 2020-05-01T13:25:44 | null | UTF-8 | Python | false | false | 11,302 | py | boundrect.py | from __future__ import division
from __future__ import print_function
import sys
import numpy as np
import math
import matplotlib.pyplot as mpl
import scipy.spatial
# Find the minimum-area bounding box of a set of 2D points
#
# The input is a 2D convex hull, in an Nx2 numpy array of x-y co-ordinates.
# The first and l... |
2861842163d0fa8db833e9598e0638e7713732a8 | 18039c3eb2c72c755b9956b626f5d035ef14bd67 | /RPi/tcp/tcp_client.py | fa09ab48bd2e622cb1e23a90ec04d4217f27cce7 | [] | no_license | jiafenggit/modbus | 2afff42ce868c926c2a29db8103a83d34651d79c | 1b0c4ce23d3d70883c33e886ea411d4b581ff91e | refs/heads/master | 2020-08-15T12:27:59.739580 | 2019-06-05T01:34:31 | 2019-06-05T01:34:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,519 | py | tcp_client.py |
#from __future__ import division
import unittest
import pylibmodbus
class ModbusTcpTest(unittest.TestCase):
def setUp(self):
self.mb = pylibmodbus.ModbusTcp("192.168.1.142", 1502)
self.mb.connect()
def tearDown(self):
self.mb.close()
def test_get_set_timeout(self):
old... |
baf128629ada479a0238a14328537f7bf4710c86 | 52e761e74e9417470cb52bdb6acb63a50febffc3 | /pgpipe/vcf_to_ima.py | e80f36602442c3255d6fb06a382c55b84608a49f | [] | no_license | jaredgk/PPP | e5a1be0a2a8a797ea68131a162d7f7cdba1a62a8 | d46ed3c22714b569bb52d230e488cc401c21103e | refs/heads/master | 2023-01-09T13:07:06.301315 | 2022-02-11T01:07:30 | 2022-02-11T01:07:30 | 80,046,221 | 15 | 4 | null | 2020-07-30T00:36:02 | 2017-01-25T18:54:08 | Python | UTF-8 | Python | false | false | 31,200 | py | vcf_to_ima.py | #!/usr/bin/env python
'''
Create IMa input file from four-gamete filtered VCF files.
An IM analysis requires an IM-formatted input file that contains multiple
loci, where each locus has sequence information for variant sites as
determined by multiple individuals (which are grouped by population).
... |
8cefec5a542e720bbcbc1cad30a6705cd7bc4818 | 3609a46efc512a1892534e9cb1026bdd66c05c39 | /voter_turnout/neuralNet.py | 5138acb8dbb35de1a3b6209e84b352a17636df58 | [] | no_license | tristanang/VoterTurnout | d9cf1121c64b037c14b1165699ccd81f5c811c88 | f5d1f1030867c894c2b066e79ac03d9ab4f7f44a | refs/heads/master | 2020-04-21T23:33:24.303308 | 2019-02-12T17:27:42 | 2019-02-12T17:27:42 | 169,950,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,289 | py | neuralNet.py | # Based off set 4 code
import numpy as np
import tensorflow as tf
import keras
from keras.models import Sequential
from keras.layers.core import Dense, Activation, Flatten, Dropout
def neuralNet(X, y, X_val = None, y_val = None):
## Create your own model here given the constraints in the problem
model = Seq... |
59a1685c0422962bd30f1376f69d525416e2ea6e | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /085_regular_expressions/examples/Python 3 Most Nessesary/7.40. Replace in line.py | db34160dd278edc99ce7aa8599d359ed0fb4efa0 | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 1,523 | py | 7.40. Replace in line.py | # -*- coding: utf-8 -*-
import re
p = re.compile(r"<(?P<tag1>[a-z]+)><(?P<tag2>[a-z]+)>")
p.sub(r"<\2><\1>", "<br><hr>") # \номер
# '<hr><br>'
p.sub(r"<\g<2>><\g<1>>", "<br><hr>") # \g<номер>
# '<hr><br>'
p.sub(r"<\g<tag2>><\g<tag1>>", "<br><hr>") # \g<название>
# '<hr><br>'
# -*- coding: utf-8 -*-... |
79a0e1f745f6ac13046216cb39c3d03f9a12b548 | 4595452e80564cd0391c51c8e10f9bced05202f6 | /Python/Blender-export-script/blender-export-script.py | 97c1d0dd024b04848e5764e35a264aab565a6976 | [] | no_license | CahootsMalone/maxis-mesh-stuff | c49695b469dca3c63e2e3be453fda8ebeacd1e6e | c054794685e1fdcd6286f9b07210bb7455733654 | refs/heads/master | 2023-07-07T16:53:28.850231 | 2022-08-13T00:50:25 | 2022-08-13T00:50:25 | 240,405,841 | 8 | 2 | null | 2022-01-09T23:23:28 | 2020-02-14T01:43:38 | C++ | UTF-8 | Python | false | false | 12,779 | py | blender-export-script.py | # Blender-to-Maxis-mesh export script
# Author: Cahoots Malone
# ==========================
# === BEGIN INSTRUCTIONS ===
# ==========================
# In Blender, go to the Scripting tab, create a new script, and paste the contents of this file into it.
# Select the object you wish to export and ensure Blender is in... |
4328bbde7fd473a513e164285c3ec308642953e4 | cd2a5cb3eb0b1931ce334fb5b3559e79378f32a6 | /three_menu.py | 9a48e7cfd49f947dbb2eb895ab8c6f219f2a8a8e | [] | no_license | AlanProject/day01-Three_menu | 2f1f23c90b43cf7b0290feac9b64abce8dc8121c | 01cf6f57443ef395aef86df3161221047ac0996d | refs/heads/master | 2021-01-13T00:46:24.260581 | 2015-10-29T07:20:17 | 2015-10-29T07:20:17 | 45,044,903 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,756 | py | three_menu.py | #-*- coding:utf-8 -*-
#/usr/bin/env python
#定义一级、二级、三级菜单
One_menu = ['BJ','HN']
Two_menu = {'BJ':['CY','HD','FT'],'HN':['SQ','ZZ','LY']}
Tree_menu = {
'CY':['CY_01','CY_02','CY_03'],
'HD':['HD_01','HD_02','HD_03'],
'FT':['FT_01','FT_02','FT_03'],
'SQ':['SQ_01','SQ_02','SQ_03'],
'ZZ':['ZZ_01','ZZ_02'... |
1f1ccf6b882325a44ee30df91b4d8da024dd8da4 | a7cbaca512f6f93f0fc1bdc8fd541816dd5d8a2f | /modules/try_numpy.py | 66b042edff663dd362fd44d161a864b298e9f355 | [] | no_license | tuner24/simpleml | 4325134c8e8888c582db3994f1488d8c119d40f0 | f45d7874b4b431914cb1dd0f8d5e700b25db45b3 | refs/heads/master | 2020-05-21T16:44:45.553484 | 2016-10-20T00:24:36 | 2016-10-20T00:24:36 | 64,407,184 | 3 | 8 | null | null | null | null | UTF-8 | Python | false | false | 109 | py | try_numpy.py |
import numpy as np
a = np.arange(16)
b = a.reshape((2,2,4))
c = b.reshape(4,-1)
print a,b
print c
|
f7fe32ead68bbf51d48640c2680b702a20c41982 | 94be6e15abf43870903c35f8cfa89a482288312a | /Django/data/tables.py | 6f70071d19002d1224be7d1d84697938b43985bb | [
"CC-BY-4.0"
] | permissive | MCDeu/EMB | 90aca4adea5d3b9ed8ac682250ed40e127b63f25 | fe73199d32d0f4e8c8840aaa938e039b98927419 | refs/heads/main | 2023-07-10T13:03:11.080967 | 2021-08-20T08:44:53 | 2021-08-20T08:44:53 | 374,333,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | tables.py | import django_tables2 as tables
from .models import Data
class DataTable(tables.Table):
class Meta:
model = Data
template_name = "django_tables2/bootstrap.html"
fields = ("id_station", "day", "temperature", "press", "rain", "air_humidity", "wind_speed" , "wind_direction")
|
e89437c564adeb651724ca2c9f4c5e1d3caa55e3 | 31ff404164fe24a3d9d393ff2eab80bdf96c456b | /pytube.py | adf4ec8e4beadbd4d0dd8b5e55bb4aafd53274f8 | [] | no_license | codl/pytube | c5a9295d1335ebab1518be8d3153bcd72af4b1f2 | 0a886e3289e12450609a9a4c2077fe818da520c1 | refs/heads/master | 2021-01-25T06:36:57.064558 | 2010-12-14T15:46:11 | 2010-12-14T15:46:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,352 | py | pytube.py | import os
import threading
import io
import sys
import pylibmc
import re
import hashlib
import urllib2
import logging
import subprocess
import cherrypy
from mako.template import Template
if not os.path.exists("/tmp/pytube"):
os.mkdir("/tmp/pytube")
logging.basicConfig(filename="/tmp/pytube/log", level=logging.DEBU... |
3f85c307c7f87963da189f16a29560a5ee68de92 | 12c797bf372af9c95ad82cb60179e0127ba77f0f | /python/bradfield_cs/recursion.py | 4399ff207c46a5ace659ddb7e9dedb278b41604f | [] | no_license | aramay/algo-toolbox | 69f4ebfe091a79bae23578a75f754971fbed6925 | cb0d050cce6c9872fdeb99cd00318d4988f7930c | refs/heads/master | 2022-06-20T23:09:45.744515 | 2022-05-17T16:22:14 | 2022-05-17T16:22:14 | 72,224,890 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,237 | py | recursion.py | """
(Recursion exercise from class)
# Alphabet strings
# Part 1
# input: alphabet (e.g. "ABCDE")
# output: all 2 letter words using that alphabet
# - AA, AB, AC, ..., ED, EE
# (Feel free to do this ITERATIVELY)
# Part 2
# 3 letter words
# - AAA, AAB, ..., EED, EEE
# Part 3
# Take in word length as a parameter
# "give m... |
683f17ec7ef813d571247b5027e9806834ea60d6 | bc5581a4ff76c273ecb12e393205f5c8c87139e5 | /flask_app/bancoin/forms.py | 702d350c6ce074d15b3616d8ea2a7625bbac024e | [] | no_license | tpcantergiani/iic2173-Entrega0 | 77912cfab5d43731717c6193ff77648b6f56b2af | 7af81e7ba9281fb8a909adf7607cd6e918f824fc | refs/heads/master | 2023-07-15T22:42:23.276865 | 2021-09-02T01:22:46 | 2021-09-02T01:22:46 | 400,571,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,983 | py | forms.py | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, BooleanField, FloatField, SelectField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError, NumberRange
from bancoin.models import User, Product
class RegistrationForm(FlaskForm):
name = Str... |
99d9759a54a66be6a17cfcdab9ec362f623335bc | c13d9eaffdf7785cfc36db66f01a4bd71fbb0dda | /day16/day16.py | 88bee8537e426a4da9a499759afb02a6ec030f47 | [
"MIT"
] | permissive | mpirnat/aoc2016 | e42e30fd716edeca0cbcfe63308cb3e148361d68 | 1aec59aca01541d0d1c30f85d4668959c82fa35c | refs/heads/master | 2020-06-15T22:48:20.116033 | 2016-12-25T07:23:37 | 2016-12-25T07:23:37 | 75,260,784 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,214 | py | day16.py | #!/usr/bin/env python
"""
Solve day 16 of Advent of Code.
http://adventofcode.com/2016/day/16
This solution is super-naïve and not at all optimised, but it took less time to
run part 2 on my 2011 Macbook Air than it did to start reading suggestions on
the AOC subreddit on how to make it more efficient, so I kind of ... |
4c5745377fac4d3a2a88d1e63ba51aa3160e5ed9 | 6d09ca0a1f6830906710580e45db70a9217d51c3 | /main.py | 7db8f525769fc7d77fc2518471b3468f91f0be8a | [] | no_license | tonywu1999/Automation-Course-Registration | 00c8aa4f64aa7140568501d0de62cb1b70feecac | 8d0e8251a732a7290994cd8aefd048253a091d96 | refs/heads/master | 2020-12-03T08:44:42.370024 | 2020-11-08T21:56:17 | 2020-11-08T21:56:17 | 231,257,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,674 | py | main.py | from selenium import webdriver
from getpass import getpass
import time
from selenium.webdriver.common.action_chains import ActionChains
from datetime import datetime
if (__name__ == "__main__"):
# Step 3a: Get username and password
Username = input("Enter your username:")
Password = getpass("Enter your pas... |
a865ee5315cf455f16752878690c7eb96cab2c7b | 28393c603be01780f2331b71706a7de27b104344 | /carolslist/migrations/0009_auto_20210821_0305.py | 372d021018b803c73b26706e4e60c7cc84a0eeb4 | [] | no_license | Cquillopegrace/lastdrop | ed25988f54944333bb82c40f78dae289b3fbeb63 | 894fcc3edbf8f027f1d75f54f58022c3dd32f6d2 | refs/heads/main | 2023-07-13T07:14:46.700506 | 2021-08-24T19:01:22 | 2021-08-24T19:01:22 | 399,571,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | 0009_auto_20210821_0305.py | # Generated by Django 3.1.6 on 2021-08-21 03:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('carolslist', '0008_auto_20210818_0500'),
]
operations = [
migrations.AlterField(
model_name='applicant',
name='nStud... |
da68c4859d1f10e45b6394591ef1ac416c0fec1d | 0738d9f85b98a7e30d7f33b4fe94ceb58f44b123 | /Basic Programming/Dimik oj/Python3/প্রোগ্রামিং সমস্যা 39 - [৫২ সমস্যা বই] প্যালিনড্রোম.py | efc490a954a4650a36e30594fa374747913cffec | [] | no_license | arifkhan1990/Competitive-Programming | e51606b6bafc0671e8799df4297529b27eb6488e | 9b8ca6e8f2ec4c74ea314e8d80657ac97489a315 | refs/heads/master | 2022-10-28T19:31:16.818123 | 2022-10-14T21:32:51 | 2022-10-14T21:32:51 | 199,027,360 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | প্রোগ্রামিং সমস্যা 39 - [৫২ সমস্যা বই] প্যালিনড্রোম.py | # Name : Arif Khan
# Judge: Dimik Oj
# University: Primeasia University
# problem: প্রোগ্রামিং সমস্যা 39 - [৫২ সমস্যা বই] প্যালিনড্রোম
# Difficulty: Easy
# Time Complexity: 0.4265 সেকেন্ড
# ... |
26ed425775625ce7ae35383b420d476f161c2d42 | e821216cb6de8872586085582df946763ea6278a | /py/fibonacci_generator.py | be0ebe4eeba454f323f14db6752e1fa2aae2ed35 | [
"MIT"
] | permissive | biswarupb/random | 99a911dcb8739e2d3f1cf645063894e0efe774b9 | 4e791fb38eb71c703ee22d1f3365e08546abd1a0 | refs/heads/master | 2020-04-06T16:32:53.270835 | 2018-12-10T14:10:58 | 2018-12-10T14:10:58 | 157,624,026 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,092 | py | fibonacci_generator.py | #!/usr/bin/env python
"""
coding=utf-8
Python 3.5.2
Generate all the Fibonacci numbers between two given numbers A and B
Warning(s):
1. Code does not handle exceptions or large inputs robustly
"""
# Imports
import sys
import time
import math
def perfect_square(N):
"""
Helper function to check whether a number ... |
a9ee1dd2f2c9053068330b96f5c018d5948f78b3 | daa0af45d5f7b251640ac18cab5f35e430a8bbe2 | /.c9/metadata/workspace/callejongolf/urls.py | 2703d5f9ee4c6c130ae82f45391333411d4e8740 | [] | no_license | rojour/callejongolf | ffca864c6ef081855d4d94754fe337c64edf39fb | 5408401ebffc59434f4daa17d8c33dcc67dbe916 | refs/heads/master | 2021-01-19T08:11:45.817073 | 2015-04-17T19:55:50 | 2015-04-17T19:55:50 | 33,005,854 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,108 | py | urls.py | {"filter":false,"title":"urls.py","tooltip":"/callejongolf/urls.py","undoManager":{"mark":100,"position":100,"stack":[[{"group":"doc","deltas":[{"start":{"row":9,"column":4},"end":{"row":9,"column":8},"action":"remove","lines":[" "]}]}],[{"group":"doc","deltas":[{"start":{"row":11,"column":0},"end":{"row":12,"column... |
6dbf56290171b373e3f565740ab8d0fdc84f1d49 | f9ee358be7f06e62385ae6cf2f845d6dc52dde9d | /Scripts/gumps.py | 7157b49a8da89a2ec70b64460050b114efdb55df | [] | no_license | Hectorline/UOStealth | 5fd79a02714497ea00fca6b48d5ee6bbddfdb438 | 599af209668c1752b4cea38a3010ee3b25653ff2 | refs/heads/master | 2021-06-23T16:35:26.341399 | 2017-08-28T13:00:19 | 2017-08-28T13:00:19 | 100,504,159 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 16,807 | py | gumps.py | """
This module will make it easier for you to work with Gumps. Freely inspired by Chrome696 Gumps.pas
Created by Boydon
Only tested with Python 3.x
"""
import time, re
from stealth import *
# def GetGumpID(gump_index):
# """Replaces the built-in function that as of Stealth 4.04 is broken"""
# for line in GetGumpFu... |
2d29b0b6334dee220795965689faadae81d7ce65 | 7b58dd08d6c48022ca697cdacb960e4d3a72357b | /lesson_1/task_6.py | b28d09fea7517a6d48473f53dd48a820342cc0ae | [] | no_license | KonstBelyi/Python_hw | 9cc0924da4fd01627b9ffb5f2e83d388b9debf46 | 1097e457dce7ae93e5fe5865e937d1eea9153805 | refs/heads/master | 2020-06-26T04:41:31.810473 | 2019-09-10T16:16:15 | 2019-09-10T16:16:15 | 199,534,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,188 | py | task_6.py | """
Задание 6. Ввести с клавиатуры два целых числа: x и y
- Вывести на экран консоли оба числа используя только один вызов print()
- Вычислить сумму чисел
- Выполнить целочисленное деление
- Найти остаток
- Вычислить степень числа: x^y
"""
x = 86
y = 13
print(x, y) # Вывести на экран консоли об... |
3974f1aa5dcaec708caff6a895e0ce10e8af7e81 | f088e24d386fdd5a65866ec76d4d785680b56122 | /permutations.py | 0cd801985d999787c0bf9bad778d55467f740227 | [] | no_license | plahteenlahti/tiras20 | 4f471c987be85ab1621d57e107f99fea9e233497 | 66cd6cf6eede58107cc129667e770c88ab1a768a | refs/heads/master | 2023-01-06T12:52:54.043714 | 2020-11-08T15:51:55 | 2020-11-08T15:51:55 | 297,280,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | permutations.py | def search(k,n,included,values):
if k == n:
print( values)
else:
for i in range(1, n+1):
if not included[i-1]:
included[i-1] = True
values[k] = i
search(k+1,n,included,values)
included[i-1] = False
def getPermutations():
n = 9
included = [False]* (n)
row = 1
values = [0] * n
search(0,... |
08ef08bc54466f6406a1c88183e076691a3b5f70 | bacf977955dae587d386311c7fc9301dccd56429 | /src/fabricflow/fibc/dbm/fibcdbm.py | 9390d06adb2d4a7c2f1c5ecfc8d5beff2c37927d | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | JalenLin/beluganos | e20d4dbf8231438a2512a165edc61d3f391f2a30 | 718612ac67dd3cb7569fa47250ba094286d4054b | refs/heads/master | 2020-04-17T03:36:56.165756 | 2018-08-30T09:59:58 | 2018-08-30T09:59:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,477 | py | fibcdbm.py | # -*- coding: utf-8 -*-
# Copyright (C) 2017 Nippon Telegraph and Telephone 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
#
#... |
ee58dcc636524bd5866d6aa15141b4fefed3357f | efa0019b7267cd1ba144922e4b10f71800317979 | /tedxuwa_user/migrations/0003_auto_20180417_2121.py | aee63b72469a3c4e1065572c3d89b0496f080ede | [] | no_license | codersforcauses/tedxuwa-server-backend | c4985215bdd8cb5963fbdaf85858b78cc07ebb18 | bff7d0f7f81c9cfb63c40d5836fbce755553fb21 | refs/heads/master | 2022-12-15T14:43:55.387893 | 2021-06-24T13:30:53 | 2021-06-24T13:30:53 | 129,248,455 | 0 | 1 | null | 2022-12-08T00:56:44 | 2018-04-12T12:34:13 | Python | UTF-8 | Python | false | false | 382 | py | 0003_auto_20180417_2121.py | # Generated by Django 2.0.4 on 2018-04-17 13:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('tedxuwa_user', '0002_member'),
]
operations = [
migrations.RenameField(
model_name='member',
old_name='profile_picutre_url',... |
4991d04c0c1d173a117032c96fb719a03d4aae08 | d8b18fcac7991e6a1f5576440b43bf17a67c3114 | /main/forms.py | 3884c107530843500d6dae36d3d9cb534fc8cc11 | [] | no_license | ddkangfu/redis_exercises | fe1ba62bc011dcabaaeb7e07018630205496f201 | 206adf1d77fe431b063412abea5e2463c4c49eac | refs/heads/master | 2020-12-24T13:44:51.554548 | 2015-02-08T13:49:33 | 2015-02-08T13:49:33 | 30,115,289 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | forms.py | #coding=utf-8
#!/usr/bin/python
from django import forms
class CreateUserForm(forms.Form):
username = forms.CharField()
password1 = forms.CharField()
passowrd2 = forms.CharField()
|
dd19278dddda9e72afc148ab243bc01a8191d14e | a3375aeabc2782d92dc2c3208e5badb00daa3703 | /BtsShell/resources/tools/PickUp/pick.py | f2a9953e89d054a1de383bf3766baaf9d269ca02 | [] | no_license | jufei/BtsShell | f256ff573cbbb7a834ae608eb991eb337503f159 | 75487a40ac2cc5f24f70d011ad6cd3924908f783 | refs/heads/master | 2021-01-10T09:25:02.656231 | 2016-03-29T05:42:04 | 2016-03-29T05:42:04 | 54,948,974 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 22,066 | py | pick.py | """This tool use to run CT with CSV file which stored cases need to be run
informaiton.
1, Parse the SuiteMapping.csv to get case infomarion and store cases need to be run in a list
2, Copy one backup case to current Dir such as "pick_file_name_timestamp"
3, Run case in its primary path and output to "pick_file_n... |
a76613bfaea0a7099cce0905c93d2a9ec48a7a33 | 2b4e85f3c5b7a56a7a46770b0d4f76105c18d542 | /http_related/bruteforce_http.py | 8494edaa6209036b2dcd24397f410c650400f8b5 | [] | no_license | Ankit00712/Python_TOOLS | ef22518343a9858e881e0a9cdea785aac094772f | cfe6caa69ce72c897177171458c59443db470cb3 | refs/heads/master | 2022-04-23T16:53:48.388363 | 2020-04-28T20:22:41 | 2020-04-28T20:22:41 | 259,742,641 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 976 | py | bruteforce_http.py | import http.client, urllib.parse # dir() globals() locals()
username_file = open('username.txt')
password_file = open('pass.txt')
user_list = username_file.readlines()
pass_list = password_file.readlines()
for user in user_list:
user = user.rstrip()
for pwd in pass_list:
... |
10bf7023e8a241bd5f901565a70aea51a1556cf8 | 0ddd227e37388815ac817ae3c22362836dd312a2 | /src/staticpage/views.py | a886e1c9f0a485913f4e3d09350ed3fe0a7231d8 | [] | no_license | PetrDlouhy/naovoce | e807063777922325e5886050f657c5540f8f3cfb | bc15b18e5520129eccea2875b01da40ff389a627 | refs/heads/master | 2021-09-08T00:54:12.152642 | 2017-08-02T12:44:30 | 2017-08-02T12:46:25 | 103,372,379 | 0 | 0 | null | 2017-09-13T08:11:36 | 2017-09-13T08:11:35 | null | UTF-8 | Python | false | false | 387 | py | views.py | from django.shortcuts import get_object_or_404, render
from .models import StaticPage
def static_view(request, template_name=None, additional_context=None):
context = dict(staticpage=get_object_or_404(StaticPage, url=request.path))
if additional_context:
context.update(additional_context)
return... |
fc5590531bc0d796ca92c25deddb156f1687d453 | f6ada4b7b24a44cd78db40d35fcce1339302993e | /example/Nantou0602/plotout.py | c6087489bebb05a0a3adc627c24c34d9e87f27e4 | [] | no_license | jiunting/GPSCMT | b90dbe3cc19f8630f29ccd79de39de06743d1790 | 8d910cefc5da945f79cccaa9350c9113e2ac25f5 | refs/heads/master | 2021-10-08T18:21:05.485553 | 2021-09-29T18:52:07 | 2021-09-29T18:52:07 | 199,480,421 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | plotout.py | from gpscmt import view
res_file='GPSCMT_15.000000.res'
model_file='GPSCMT_dhat.dat'
data_file='Coseis_0602.gam'
view.res_map(res_file,model_file,data_file)
|
55908ed2abb9663ac7abae7fe325eb605894b522 | 16c889fb88308c3f7607016d21cbaf670900b683 | /pages/locators.py | fc0b5930c629759369c0aea834fc9ea6c4554279 | [] | no_license | andrei300399/qa_magnit_project | 28265e816aa74ebd72cd0f9d504aed69234f51ec | 6782809f29cdd67ca9b7ab85ff9a47625f0bb0d3 | refs/heads/master | 2023-05-03T14:44:57.005383 | 2021-05-06T12:47:51 | 2021-05-06T12:47:51 | 359,508,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,221 | py | locators.py | from selenium.webdriver.common.by import By
class LoginPageLocators:
LOGIN_BUTTON = (By.CSS_SELECTOR, "a.login-main__container__card__login-form__button")
LOGIN_FORM = (By.CSS_SELECTOR, "form.login-main__container__card__login-form")
LOGIN_ALERT_EMPTY = (By.CSS_SELECTOR, "#login_alert_empty")
LOGIN_AL... |
8cf1004d5354f3b3cac40001b14363ee024648d7 | 3688ce841e088601e7c67e029e0d76c420e73a49 | /chapter7/7.4.py | 5626b9b0dbe3026a31a72d767c465f611c5af1e1 | [] | no_license | kengneruphine/pythonruphine | 1db4546f5242201aed09c8cc05dd8befcdaadcfa | 4034ddd84e9ca6b55f08fa85f02f99f2329ae468 | refs/heads/master | 2021-01-25T06:17:42.760122 | 2017-11-28T01:59:49 | 2017-11-28T01:59:49 | 93,545,984 | 0 | 0 | null | 2017-06-06T17:35:58 | 2017-06-06T17:35:58 | null | UTF-8 | Python | false | false | 2,067 | py | 7.4.py | #program to create a class called ratonal numbers
from __future__ import division
from fractions import *
class RationalNumbers:
"Rational Numbers"
def __init__(self,numerator=0,denominator=1):
self.numerator = numerator
self.denominator = denominator
def addRationalNumber(self,first):
f1= Fraction(self.numer... |
f3c0ff188384a361dd3cc835dea0c7d7e2672b0a | d3fd910c7289516e16d2de66c0b19ddf4d129e83 | /Multi_class.py | 4369c522cbdc443e5eb030efd49ce79184f24f78 | [] | no_license | buriihenry/python_basics | 4fe39c2b36e8f02741007c79f39c1fbb04804eda | a624f1f2ef3fcf34a72e12fead7a28ff5d3d8ea0 | refs/heads/master | 2022-08-26T05:40:00.292322 | 2022-08-15T04:04:13 | 2022-08-15T04:04:13 | 258,450,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | Multi_class.py | from ast import Pass
class Person:
def person_info(self,name,age):
print('Inside Person class')
print('Name:',name, 'Age:', age)
class Company:
def company_info(self,company_name,location):
print('Inside Company Class')
print('Name:', company_name, 'location:', location)
#Child... |
fce0bc2e6c171a7d236c0a39a1bf547f067c01b0 | e9d2ab28bd23021aef1e478439e290d13dd5ff58 | /python/EXAMPLES/projects/p3_dvd_list_shelve_3d_class_GUI/index.py | 52d5c7d404eb8b6d3800b672485c11c49a98f0d8 | [] | no_license | zlodiak/lessons | cb2177203760200672cf4eec546330d9b1a87f7f | f9a08a51c142d37cd8c4b2d50ba5925898b1acf6 | refs/heads/master | 2020-12-24T08:30:30.018325 | 2016-09-17T09:27:19 | 2016-09-17T09:27:19 | 29,296,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,414 | py | index.py | import shelve
from tkinter import *
from tkinter.messagebox import showinfo
class MyGui(Frame):
def __init__(self, parent = None):
Frame.__init__(self, parent)
buttonShow = Button(self, text = 'Show all records', command = self.show)
buttonAdd = Button(se... |
5ca3a1e62a52a9f1649acb6bafadb56d9ff9faee | fadac33e94923f35229805c9b87fbcb837a5565c | /6.2.py | c0811b105b6641d5d6def2ff817226c1b8c732f3 | [] | no_license | ryan22s/Python3 | 9c4e5fafbff973e67ab414317139bd8655284624 | 8b2d7ecb22ec520ea0ea21bffd03572fadf3ab66 | refs/heads/master | 2020-03-24T06:31:23.006978 | 2019-07-24T18:11:19 | 2019-07-24T18:11:19 | 142,531,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 834 | py | 6.2.py | import math
print('%s: is a %f dogs in %f cats' % ('Edna', 4.22, 5.222))
# Minimum Field Width, sets it to min of 5 spaces, bob is only 3
# paren to show spaces
print('Student name (%5s)' % 'Bob')
# adding leading zeros on ints
#student_id = int(input('Enter student ID: '))
student_id = 1255
print('The user ent... |
0c768533c6d2ce57c4e4a48159b6241207b5a6fc | 60456e05f014a0e9b72af38d84ce4690e1856d58 | /test/acceptance/locators.py | 744b7d00f62e3ff311bc28d179d554b195af6a24 | [] | no_license | eataylor/pitracker | 5b996ab3f8b09cbb643d9aa84fcd82003986c04e | 52819c0f5e670341c1b366ef25ad2245386d7f0d | refs/heads/master | 2021-01-16T20:47:24.230998 | 2015-02-25T12:14:33 | 2015-02-25T12:14:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | locators.py | from selenium.webdriver.common.by import By
class MainPageLocators(object):
NEW_PROJECT_LINK = (By.LINK_TEXT, 'New Project')
ALL_PROJECTS_LINK = (By.LINK_TEXT, 'All Projects')
class AddNewProjectPageLocators(object):
CREATE_PROJECT_BUTTON = (By.XPATH, '//button[text()="Create Project"]')
class AllProj... |
8b34a621e568867064438cb323c8524ec9392601 | beba3ce9fd3fde7b6ef04d4e835e1bfffb14be01 | /face_recognition.py | fba0a4e1764a568d33c5477775b1bbec4c23f22a | [] | no_license | Maruthi18/Face_recognization | 1867841f10eb1aff2c6722122a34dda5d6d0977a | ea7e0cb59b74079d4836be38a894d7189a1fc8cf | refs/heads/main | 2023-01-28T03:18:34.212270 | 2020-12-12T03:16:20 | 2020-12-12T03:16:20 | 320,737,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 541 | py | face_recognition.py | # -*- coding: utf-8 -*-
"""Face_Recognition.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1JuQAOmFWEa3IN0pZLk8EdgATmYQYPlxs
"""
!pip install face_recognition
import face_recognition as fr
import cv2
from google.colab.patches import cv2_imsho... |
1fe8efb23eb61f839530b0707d5b17af522030e8 | 7c3a3ef18983f460ee9a5c569a4239c272d33876 | /sunkingdoms/zones.py | 3a179061fe39008d9be223f22e0263cf4394c111 | [] | no_license | guldfisk/sunkingdoms | 6a15fe0018904e69b788dc131740b8e8cda1821c | a76a0421a9869e15c6644382b8f8ed22bc6bf722 | refs/heads/master | 2020-08-06T02:43:04.165982 | 2019-11-06T15:53:43 | 2019-11-06T15:53:43 | 212,803,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,230 | py | zones.py | import random
import typing as t
import copy
from sunkingdoms.artifacts.artifact import GameArtifact
class Zoneable(GameArtifact):
pass
class ZoneOwner(object):
pass
Z = t.TypeVar('Z', bound = Zoneable)
class Zone(t.Generic[Z]):
def __init__(
self,
name: str,
ordered: bool,... |
bc581d72badab0cd44ae9ac603ce84f709f8bf2f | e3faa8bf854e32607b05d25d612a8200994bd366 | /motion.py | ba6d896cbe5d3dfadc4db1a5583784e46903c5bf | [] | no_license | Pknittel1/integrals | 92c0fbfbf8d837ca9a763eca44910fe751ec4426 | 32cf55a8a010c41ed4c946c549facb9521d7c444 | refs/heads/master | 2023-03-08T22:06:13.658881 | 2021-03-08T01:37:39 | 2021-03-08T01:37:39 | 325,403,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,701 | py | motion.py | #motion of a charged particle due to electric force of two static point charges
import matplotlib.pyplot as plt
import numpy as np
import time as time
from matplotlib.animation import FuncAnimation
neg = (-2, 0)
Qneg = -2
pos = (2, 0)
Qpos = 3
k = 9e9
dt = 0.0000005
t = 0
#particle 1
mass = 1
Q = 5
rx = 0.34
ry = 2.... |
bb829dea7734d704412b82ac8ff6e755442b0a3d | 46bebb26a1fe96e288f29197061da78ce7a1113f | /objectModel/Python/tests/utilities/test_jobject.py | ef26625ccd91447487f1854d049a7de854fc2b44 | [
"MIT",
"CC-BY-4.0"
] | permissive | evandrocg/CDM | d4576298511550f7cda1b07435ed1fba603bceb0 | c31435cfb8775f46d1d18dae90443bf7b593cf94 | refs/heads/master | 2023-01-22T16:51:46.134494 | 2020-12-05T00:21:10 | 2020-12-05T00:21:10 | 274,550,850 | 0 | 0 | NOASSERTION | 2020-06-24T01:58:13 | 2020-06-24T01:58:12 | null | UTF-8 | Python | false | false | 384 | py | test_jobject.py | from unittest import TestCase
from cdm.utilities import JObject
class TestJObject(TestCase):
def test_non_existing_properties(self):
"""Tests if trying to access a non existing property does not throw an exception."""
obj = JObject()
obj.property1 = 'Name'
self.assertEqual(obj.pr... |
06e254f62c28fd522f946b27381e4830835e2d7e | 10b86e6177814aff7d896e989f7b6b264190e073 | /harvesters/csw/ckan/dataset.py | e3468899cccd6ef6f8674c82a5d857fa774d7e2b | [
"MIT"
] | permissive | isabella232/ckan-ng-harvester-core | d25b29b18a01e281dde6550a547b5a3ef583aa06 | 754ceecadbe8bcb83659988ec90982cd24afab58 | refs/heads/master | 2023-03-17T14:54:52.476032 | 2020-02-21T15:44:37 | 2020-02-21T15:44:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,765 | py | dataset.py | import json
from slugify import slugify
from urllib.parse import urlparse
from harvester_adapters.ckan.dataset import CKANDatasetAdapter
from harvesters.csw.ckan.resource import CSWResource
from harvesters.logs import logger
from harvesters.helpers import clean_tags
from harvester_adapters.ckan import settings as ckan... |
dccbcca3b97bf1d0553adf43d34ce4262d50d4e4 | 1b6751f1d4f778d62028e20a7985a6d6041c7488 | /temp.py | a91d15d39a7002ccc8951755f0cfd681f413e09f | [] | no_license | JIuH4/KB_V2 | 31b23b8bd7073d685b22b125bd98d4b4e262ed59 | 47983961451c0904796066767a3752d02d13d366 | refs/heads/master | 2022-12-02T08:14:28.454703 | 2020-08-17T18:10:17 | 2020-08-17T18:10:17 | 286,532,891 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,979 | py | temp.py | import math
import sys
import enum
from abc import ABC, abstractmethod
from kb_class import Module, Pxi2569, Kbk
from kb_nodes import KBK
from typing import List
from ui_elements.graph_items.modules import P2569
from ui_elements.graph_items.krossblocks import Kbk as Kbk_gi
from ui_elements.graph_items.module_or_kb_bas... |
8290e130023e2fe9bbacac4f8d1be62161a3eaf6 | 76ef5f1a36a0d401295db2b7d766eb44c6088f82 | /boards/frdmk64f/multiprocessor_examples/erpc_common/erpc_matrix_multiply/service/erpc_matrix_multiply/common.py | f2d54fd40527e60b613ce9c5ffc26603f161de1c | [] | no_license | mhcchang/SDK_2.6.0_FRDM-K64F | e93273790a4fcbfdd195d0dd66801fbb526e8493 | 35d9979b7e2010a2e89149c2fc5d453f7982b9b0 | refs/heads/master | 2023-03-17T00:40:54.436065 | 2019-10-12T08:15:49 | 2019-10-12T08:15:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | common.py | # Copyright (c) 2014-2016, Freescale Semiconductor, Inc.
# Copyright 2016 NXP
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Generated by erpcgen 1.7.2 on Wed Mar 20 14:14:04 2019.
#
# AUTOGENERATED - DO NOT EDIT
#
import erpc
# Constant variable declarations
#This const defines ... |
1da785f47bbe1ed7ea3a1328fde5dc3efc9361a7 | 322632a0d6a360d105af4015bc929292bbdd5521 | /kernellib/dependence/hsic.py | 97d5f2b933e95a5d446ba8fc6265f9a2afca493a | [
"MIT"
] | permissive | jejjohnson/kernellib | 6a254abc95098e7d336a980ee233ab149ce1760c | eb9f80c1b605c8a6b5e8a324efd4ef07d8f59050 | refs/heads/master | 2019-07-25T15:33:10.944900 | 2019-02-17T19:25:36 | 2019-02-17T19:25:36 | 118,354,468 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 14,852 | py | hsic.py | import numpy as np
import numba
from sklearn.preprocessing import StandardScaler
from sklearn.utils.validation import check_array
from scipy.spatial.distance import pdist
from sklearn.gaussian_process.kernels import RBF
from sklearn.utils import check_random_state
from ..kernels import rbf_kernel, estimate_length_scale... |
32cea6c2c2affac29dc6f0424bddd0bbc85ed550 | bd3e8a1cac0e29f8a59f9ef4eacbd459003469e1 | /main_test.py | 8c13ca605009ef81f5beb04a85a879ce323b9c8e | [] | no_license | TomaszMarcinkowski1000/NTWON-Architecture_Style_Recognition | 99f077f7b22e643112ada03fc9c59e937abfda38 | e400f0eacb611d9ae7f42f9658ff7e1aa7ffb7f4 | refs/heads/master | 2021-09-16T07:18:33.077073 | 2018-06-18T12:37:50 | 2018-06-18T12:37:50 | 125,729,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | main_test.py | import img_manipulation
orginal_folder = "c:/Users/Tomasz Marcinkowski/Documents/MEGA/Zbiory/Zbior3_koledzy/"
processed_folder = "c:/Users/Tomasz Marcinkowski/Documents/MEGA/Zbiory/Zbior3_koledzy_transformed/"
img_manipulation.resize_and_pad_folder(orginal_folder, processed_folder, (200,200), 127) |
4f89b9a04d757500ca385d6e82fbfc859110edf7 | c787682875d755d8cddad7ab21d740d6a79b407f | /credentials.py | 9f338b3caef43eb42f6bc315434fb37aa8a165d8 | [] | no_license | annurfuad/Sentiment-Analisis-Twitter-Jokowi | 9c52c3e3411cc8b852a55428a3fb696b596d058f | 726d5436a9b1b3ff2385310fe53a08d816a3b9de | refs/heads/master | 2020-03-31T16:55:25.961852 | 2018-10-10T09:34:16 | 2018-10-10T09:34:16 | 152,397,972 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | credentials.py | CONSUMER_KEY = 'gg9H0EzMsJBlVt722STHwGxu7'
CONSUMER_SECRET = 'N9cZsJBPThgIg66TD1SCGDFWqTValYkyMP9NffLOhKIGmZ2Ikf'
# Access:
ACCESS_TOKEN = '979692300136677376-9nc3lgCJzZ1RnqjiF9ObeQRCDAfCma8'
ACCESS_SECRET = 's1tn2kJ7NxMM78Hs6LbOTwWPgPZo9H0gepAPKEQxvarwT' |
e1f02ac211c22d20542cd0535f4852a6e555b301 | 7c89e8d4f92893ca913431c5e197615f88162e85 | /warehouse/apis/supplier.py | c1f9ee6559c15da8d9936e48f0359e5071c77de3 | [] | no_license | tuannvmk18/warehouse | b53a6408eaf7d864a1dfceff6c33e8ef226a1728 | 2f7bdbc4f4dca0baf3341e7bce38051904d6e846 | refs/heads/master | 2023-07-17T15:10:04.949640 | 2021-09-06T04:31:30 | 2021-09-06T04:31:30 | 401,767,490 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,325 | py | supplier.py | import json
import traceback
from flask_restx import Namespace, Resource, fields
from warehouse.models import Supplier
from warehouse.services import supplier as supplier_service
from warehouse.ultis import update_attr
api = Namespace('supplier', description='supplier api')
supplier_schema = api.model('Supplier', {... |
95ed749cfd983c2ac9fe20c6d84f6c638175f2f3 | 584713b6056111c510a7cccdd58bb6681c3977ca | /test/calculator-1(no condition).py | 47d4591ad03785c77578d47d7e7cfb17d9588d83 | [] | no_license | JRT-FOREVER/JRT-PythonTutorial | 2520fcb50084b15db30a248c65f3e8f3888c67e7 | 0c8c65a23a2c79a8d3ef38059bd73f5da242390b | refs/heads/master | 2021-01-25T14:09:51.683216 | 2018-03-25T13:28:25 | 2018-03-25T13:28:25 | 123,656,433 | 4 | 8 | null | 2018-03-25T07:53:10 | 2018-03-03T03:45:22 | Python | UTF-8 | Python | false | false | 66 | py | calculator-1(no condition).py | cal_string = input("")
print(cal_string + ' =', eval(cal_string))
|
101cc353b9e3fef43ff45d43ffa66c6b8a1aa103 | f7c2c0d9c919a5a1f79a666e4d177fd2da6ff99c | /stress_test.py | 681a6f01f01d83017b39a88ac0aab00106a9885f | [
"MIT"
] | permissive | danbradham/ends | 9ffce46a8ef3bbb446591def45a799a37a01bdac | 379420ccc320448462ad4b2ba8b33fe6080afc88 | refs/heads/main | 2021-12-24T10:26:05.523936 | 2018-02-13T16:06:50 | 2018-02-13T16:06:50 | 121,317,009 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,978 | py | stress_test.py | # -*- coding: utf-8 -*-
from timeit import default_timer
import textwrap
import time
import sys
import ends
@ends.register
def add(a: float, b: float) -> float:
return a + b
@ends.register
def minus(a: float, b: float) -> float:
return a - b
@ends.register
def multiply(a: float, b: float) -> float:
retu... |
6e67ce5dacc040da6a74c0cfb9716d19b813673e | 9b5a9a0c1655477c5c27256e9db467b4e132b2c2 | /ui/UiMainWindow.py | bd31fadbfe156d05e3e6c3f9eff1af8723249391 | [] | no_license | nico88chessa/marcatrice-csv2json-daemon | efe8fa4ba8c86f7bdfee5ce4263a391de7193149 | da67ae78849f387604a0d59f22156a5f886a0386 | refs/heads/master | 2021-06-13T00:34:31.963122 | 2021-04-09T09:38:20 | 2021-04-09T09:38:20 | 171,444,704 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,669 | py | UiMainWindow.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\ui\MainWindow.ui',
# licensing of '.\ui\MainWindow.ui' applies.
#
# Created: Fri Mar 29 09:15:22 2019
# by: pyside2-uic running on PySide2 5.12.2
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, Q... |
95dc007c13712cc33639abad9a909428b537f91c | 84bb515376e2a1dea45816a3eb172f1cac264459 | /sutradata/management/commands/initjudge.py | 1c4fe0ce0822cee71438d37975e3626b6bc55088 | [] | no_license | cbakgly/TripitakaPlatform | a1cddb81b6961311b7a01843e2f2dde19c61271d | 79e852bd98ba6ec85dcd28668311037c4945df06 | refs/heads/master | 2021-05-04T22:36:18.062686 | 2018-02-02T04:18:08 | 2018-02-02T04:18:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,705 | py | initjudge.py | from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from sutradata.models import *
from tasks.models import *
from sutradata.common import *
from tasks.views.task_controller import *
import TripitakaPlatform.settings
import os, sys
from os.path import isfile, ... |
83c0c8d05c910dae1a853305e61ebd1ad895da1d | c64bb34a3dde14d3c9bf813bde414a7b3f10611d | /job_costing11/construction_project_task/models/models.py | 2bc2bc9ef994a5186fde9cf08cba645536be68aa | [] | no_license | sm2x/my_work | ebf2e1abd06191ee59b0d82a23534274a81a3195 | efc469aee4cd20b038d48d4c09f8257f3f04ba1c | refs/heads/master | 2021-01-07T20:41:45.254025 | 2020-02-12T16:02:46 | 2020-02-12T16:02:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37,737 | py | models.py | # -*- coding: utf-8 -*-
from AptUrl.Helpers import _
from addons.account.models.account_payment import MAP_INVOICE_TYPE_PAYMENT_SIGN, MAP_INVOICE_TYPE_PARTNER_TYPE
from odoo import models, fields, api
from odoo.exceptions import ValidationError, UserError
class ProjectTask(models.Model):
_inherit = 'project.task... |
b6aeecc6d4e6729ecd0e3500217aaaefd082aecb | 48513b79dd1a64919e75b7ccf656fb3fc8322205 | /pdagenttest/test_heartbeat.py | 71cd527873835667d0918dc2ef69c9ac5edc7639 | [
"BSD-3-Clause"
] | permissive | kamsrikanth/pdagent | 29d95b4968100a265c39ad7018bdc5caf9f4664c | e79084feac2a886b17413ac4f7459f0abcec3e27 | refs/heads/master | 2020-08-09T23:52:44.939981 | 2019-10-10T16:47:47 | 2019-10-10T16:47:47 | 214,204,839 | 0 | 0 | NOASSERTION | 2019-10-10T14:30:38 | 2019-10-10T14:30:37 | null | UTF-8 | Python | false | false | 6,407 | py | test_heartbeat.py | #
# Copyright (c) 2013-2014, PagerDuty, Inc. <info@pagerduty.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notic... |
9bf5771cb681262ea8b1d6e27cce7c01ffa5fcc6 | 4c8061ec21fed221c1576244a2d2901ca755717a | /Main_KL-Divergence.py | ce0e43c251da52d97536d325d72a08ca29592636 | [] | no_license | 4202431/CAHD-Taccioli-Venzano | 1651979ec9d9551c82e4460264d57bd778d12ae3 | c83a1858960464e289e39fb9d298f325104324bc | refs/heads/master | 2020-12-29T06:04:24.982597 | 2020-02-09T22:26:37 | 2020-02-09T22:26:37 | 238,483,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,217 | py | Main_KL-Divergence.py | import getopt
import sys
import BandMatrix
import CAHDalgorithm
import time
import numpy as np
import KLDivergence
import random
"""
Main per l'esecuzione di
MatriceBanda e CAHDalgorithm
con calcolo KL_Divergence
"""
if __name__ == "__main__":
dim_finale = 2000 # dimensione massima m... |
fb9a9216a7755c1eaface7e8b14e056305a3ce63 | 0362023a283a492733336dbe899714236b9a06ef | /PRIMERO/python/ejercicio49 frase alfabeto.py | 3975a9981a763726a8c3f588276902d217b91235 | [] | no_license | alexcatmu/CFGS_DAM | 205b8bcc6d09f8351894c5f70e1a354ff25c17a3 | 1a4384dee8833b5d8034fdf0909a0774cbe5b1c0 | refs/heads/master | 2020-04-07T18:27:15.225638 | 2019-12-17T19:34:39 | 2019-12-17T19:34:39 | 158,610,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 971 | py | ejercicio49 frase alfabeto.py | '''
2.6) Un programa llegirà dues paraules, i tot seguit les
imprimirà en ordre alfabètic de
diccionari paraula1 < paraula2 o paraula1 > paraula2. Tingueu
en compte que les majúscules i minúscules són equivalents des del
punt de vista de l’ordre alfabètic.
'''
#programa orden alfabetico
#variables
palabra1 = ""
pal... |
fce2783cb5cdf916fa0f994f1d2095f76342746f | 77a8f80a605134c6cd4fcbf9022aead1928befef | /backend/filesharing/controller/AuthenticationController/AuthenticationController.py | b4981bf758b43f7da322c636c048257acac18aae | [] | no_license | trowik-gibb/m306 | 780f725b6c7a4af2682292f37a657b8903abac5e | bd89f047fd2c4237b79f22593db0e9fce33dc105 | refs/heads/master | 2023-01-19T22:29:06.369097 | 2020-11-23T20:57:00 | 2020-11-23T20:57:00 | 305,379,750 | 0 | 2 | null | 2020-11-23T17:32:47 | 2020-10-19T12:40:36 | Python | UTF-8 | Python | false | false | 318 | py | AuthenticationController.py | from django.contrib.auth import authenticate
from django.contrib.auth.models import User
class AuthenticationController:
def checkLogin(self, email: str, password: str) -> User:
user = authenticate(email=email, password=password)
if user is not None:
return user
return None
|
6e2721a6ab95ca5b7e8d8299f19a15678116b5ae | c1db533b03fd29c01f395ce9311b121bff9af501 | /app.py | c024e2c2c4a2ba070e9e3479cc7fdcd0f72db5fe | [
"Apache-2.0"
] | permissive | sobitorg/cayman | 784b4fffdb162d69a4e6fa9ee255b178dd8f62a6 | c4b1003462177da738ce99ff527842118e6a4a7c | refs/heads/master | 2022-04-09T09:33:18.901087 | 2020-03-23T00:09:52 | 2020-03-23T00:09:52 | 249,272,748 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 936 | py | app.py | #!/usr/bin/python3
#imports
from pymongo import MongoClient
from flask import Flask
from flask_pymongo import PyMongo
from flask import render_template
# connect to MongoDB, change the << MONGODB URL >> to reflect your own connection string
client = MongoClient('mongodb://127.0.01:27017')
db = client.test ... |
28c2233c57b696ad8653d93bc6ebb03f6aa014b1 | 02c16f3cae24187b6a75d4f9ba09441940288fd0 | /tests/conftest.py | 9829e296acba2ecd67536a20b17f9466b837cc21 | [
"MIT"
] | permissive | rhymes/devto-py | b24bbfd712237dfb81cd532df068b9bab51ec289 | b7b667530160644cb26784410f0490c2e08c4bc4 | refs/heads/master | 2022-12-25T23:01:35.886791 | 2022-12-08T15:03:09 | 2022-12-08T15:03:09 | 178,677,434 | 2 | 0 | MIT | 2022-06-02T00:00:48 | 2019-03-31T11:12:10 | Python | UTF-8 | Python | false | false | 397 | py | conftest.py | # coding: utf-8
from pathlib import Path
import pytest
from vcr import VCR
@pytest.fixture(scope="session")
def vcr():
return VCR(
cassette_library_dir=str(Path(__file__).parent.joinpath("fixtures/cassettes")),
decode_compressed_response=True,
path_transformer=VCR.ensure_suffix(".yaml"),... |
036cd171be6ac0deaf5dfa8e50fb6d901f8c1f2a | 85027fd6a94820d7aa8d8f7f2e1353e06c2e807f | /rubrik-aws-ec2-snap-replicate/rk_TagSnaps.py | 5cd438f54e51b67cebc6c4ecd3d6787e39c5766a | [
"MIT"
] | permissive | rubrikinc/use-case-aws-native-snapshot-replication | edb73b449b25f02f36f09ef80fb587b2c99ea02e | d2747bbd013afcfcfda03dade9c5ec27992f66db | refs/heads/master | 2020-05-18T14:53:03.315831 | 2019-12-05T05:21:54 | 2019-12-05T05:21:54 | 184,481,671 | 1 | 0 | MIT | 2019-12-05T05:21:55 | 2019-05-01T21:06:35 | Python | UTF-8 | Python | false | false | 2,481 | py | rk_TagSnaps.py | # This script comes with no warranty use at your own risk
#
# Title: rubrik-ec2-snap-replicate
# Author: Bill Gurling - Rubrik Ranger Team
# Date: 05/15/2019
#
# Description:
#
# Tag Rubrik Replicated AMIs snapshots
import logging
import boto3
import json
import copy
# logging init
logger = logging.getLogger()
#logge... |
8b44d5f890d1fe54b1acf975f7e3427c22c84129 | f0ef94d75d265fc5b7fa1cbd0eeabd369ebf5aff | /Code/pytorch/segmentation_az/pytorch_run_file.py | cfbcefe1256e7530b131b7e78adbc55e4d916c43 | [] | no_license | Leg-en/ML-BLIF | 69ae608217e82d60c6b578211d0bbe6c8f10bb2e | e28d02431e9c39db26fb843e4f350512d205cf39 | refs/heads/main | 2023-08-23T18:21:16.618580 | 2021-10-15T07:43:29 | 2021-10-15T07:43:29 | 360,876,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,434 | py | pytorch_run_file.py | """
Azure Runner File
"""
from azureml.core import Workspace, Experiment, Environment, ScriptRunConfig, Dataset
from azureml.data.output_dataset_config import OutputFileDatasetConfig
# Workspace Abrufen
ws = Workspace.from_config()
# Datastore abrufen
datastore = ws.get_default_datastore()
train_mask = Dataset.get_... |
aebd5c225ae60da12f8436b01e95f29a59bacc03 | 5a31126bd91c8c65fe5669ed4d54129ac94a08bb | /scripts/add-stsci-dss.py | e4a676c1ed9c3afa4f2582c0dc185b1ec27eebc9 | [
"BSD-3-Clause"
] | permissive | Small-Bodies-Node/catch | e76d9856e8635f31ccbab404f893399d6b06e26d | a18d338bc7cc69bc6e828c498fae0262c6385b93 | refs/heads/main | 2023-08-12T12:32:22.226995 | 2023-07-25T14:13:47 | 2023-07-25T14:13:47 | 192,717,072 | 3 | 0 | BSD-3-Clause | 2022-02-24T20:44:17 | 2019-06-19T11:13:48 | Python | UTF-8 | Python | false | false | 1,484 | py | add-stsci-dss.py | # Licensed with the 3-clause BSD license. See LICENSE for details.
import os
import argparse
import numpy as np
from astropy.io import fits
from astropy.wcs import WCS
from catch import Catch
from catch.schema import NEATPalomar
from catch.config import Config
from sbsearch.util import FieldOfView, RADec
parser = ar... |
3ea93f7c0024a46aa5d7a124df7c6438b236b47a | 17bd0244b6e440d7a7127558918ec3f833a8bbcd | /lasso-assisted-CE/energy_functions.py | 8ef4def8cc89cb6202966bb1f6c381931db80890 | [
"MIT"
] | permissive | VlachosGroup/Pdn-Cluster-Structure-Optimization | 835ca63e136bc8bf307ff1f354d3c49c2ee2cc0c | 470fe57bd0dcfdfc131c9b7138b6c6480dfafd4b | refs/heads/master | 2023-04-03T08:58:40.789755 | 2021-03-30T14:51:38 | 2021-03-30T14:51:38 | 227,425,193 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,099 | py | energy_functions.py | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 18 00:38:17 2019
@author: yifan
"""
'''
Energy Evaulation function given a super cell
'''
import os
import sys
import json
import pickle
import random
import numpy as np
from ase import Atom, Atoms
from ase.build import surface
from ase.data import covalent_radii
from a... |
bb76fdb959025f4079be55d4d88c772d6d928757 | 4aff61c60d1915994e47ad8ddda669828caa10bc | /algorithm/백준(BOJ) 단계별 step/10871.py | 8ae958ac9cd1ca91a67db2357931c451a80d5113 | [] | no_license | yeopee2/yeop | 8d88a9f3cb4389bcc15335684b9e554860d50659 | 413be71adbe976e9bf7db3c6a90ec818f4c3aecf | refs/heads/master | 2020-09-22T08:23:17.127068 | 2020-05-17T07:55:17 | 2020-05-17T07:55:17 | 225,120,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | 10871.py | import sys
number = sys.stdin.readline().split(" ")
N = int(number[0])
X = int(number[1])
A = list(map(int,sys.stdin.readline().split(" ")))
for i in A:
if i < X:
print(i,end = " ")
|
a46cdf88197ddfa5524129b956b72eb3663fcb44 | 2ca825d4da3f8f0df4d2b45083e3d675b3491cf0 | /scripts_testing/covert.py | c822fe77c046fb9b928e70533ac14dfb1ce932e2 | [] | no_license | StephenStewart1997/Final_Year_Project_University | 0a21b911878c41b34edb04e80a9d977fba00f494 | ee2150f43ea4c45f8876ad4973d056997a9a41b9 | refs/heads/master | 2020-08-07T15:31:39.294507 | 2019-10-07T23:50:53 | 2019-10-07T23:50:53 | 213,507,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | covert.py | from scapy.all import send, IP, ICMP
send(IP(dst="192.168.3.100")/ICMP()/"This is a message")
|
2b381ac4afd319ef43ed620f062dffa7a98fac63 | a3fe5565a16ee9550c48f564a199fc029bf2eace | /multihost/sites.py | ff0eafdf82702918c42948b2def55cac37f2fab2 | [] | permissive | guidonte/django-multihost | 403678509df6417d8a678049f83fea1b8a4e6ed2 | 7fb8744b6553af5b04ceabf470d604e83d5097f1 | refs/heads/master | 2021-01-02T22:59:37.206588 | 2017-08-05T16:05:11 | 2017-08-05T16:05:11 | 99,433,064 | 0 | 1 | BSD-3-Clause | 2018-07-12T11:19:04 | 2017-08-05T16:01:31 | Python | UTF-8 | Python | false | false | 4,979 | py | sites.py | """Provides utilities to help multi-site aware Django projects.
:Authors:
- James Addison
This is a reworked version of code originally produced by Bruce Kroeze. See
below for the original copyright.
"""
"""
New BSD License
===============
Copyright (c) 2010, Bruce Kroeze http://coderseye.com
All rights reserve... |