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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
80c3d9165c1b592122fabf6382e265465604989c | b6aa7415a80bc30baa65695e73d10bd45aee5824 | /api/HelloApiHandler.py | d52255dbf6daa4c7e4bdbf794de78609b1903d89 | [
"MIT"
] | permissive | coopersigrist/DnDML | d324b09cdee6e86adb221fcd60278294ff5ef98f | 782b8908147fc9d90c6fb1dbb25a394ca4022b14 | refs/heads/main | 2023-08-07T11:02:46.104302 | 2021-10-05T01:22:50 | 2021-10-05T01:22:50 | 371,733,820 | 2 | 1 | MIT | 2021-10-05T01:28:54 | 2021-05-28T14:52:28 | Python | UTF-8 | Python | false | false | 936 | py | HelloApiHandler.py | from flask_restful import Api, Resource, reqparse
class HelloApiHandler(Resource):
def get(self):
return {
'resultStatus': 'SUCCESS',
'message': "Hello Api Handler"
}
def post(self):
print(self)
parser = reqparse.RequestParser()
parser.add_argument('type', type=str)
parser.ad... |
ed3fbae19c88100690dd5c558c0dc6d36a4849c8 | c4ac2165e5465726c8481a4fb6c8956c59a6cdb1 | /scrape_weibo.py | 7e3b75d925eb8981b1f7b68e2d9c235450abd175 | [] | no_license | xinjiap/yszl | e8f01cc48f20ff94073b079e9974f3d4ae9553b0 | dea3ba35ae6964b50d74ace45a3c8fee44227875 | refs/heads/master | 2021-01-23T10:58:09.264352 | 2017-06-02T01:52:57 | 2017-06-02T01:52:57 | 93,114,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,126 | py | scrape_weibo.py | '''
Author: Iris Peng. Date: Feb 21, 2016
Usage: Scrape Weibo posts from Zhongsou for the first time for a query
In the terminal, type
$ python3 scrape_weibo.py
and follow the prompts
'''
import requests
from bs4 import BeautifulSoup
from pandas import DataFrame
import time
import pandas
import glob, os
global QUE... |
feb912ac899208618f00c894458c1fda7a402652 | 122f9bf0d996c104f541453ab35c56f6ff3fc7cd | /programmers/moveblock.py | 6c8811f21c102f3dcd846b81404f41eab37c3ee5 | [] | no_license | JannaKim/PS | 1302e9b6bc529d582ecc7d7fe4f249a52311ff30 | b9c3ce6a7a47afeaa0c62d952b5936d407da129b | refs/heads/master | 2023-08-10T17:49:00.925460 | 2021-09-13T02:21:34 | 2021-09-13T02:21:34 | 312,822,458 | 0 | 0 | null | 2021-04-23T15:31:11 | 2020-11-14T13:27:34 | Python | UTF-8 | Python | false | false | 3,347 | py | moveblock.py | from collections import deque
n = -1
D = [(-1 , 0) , (0 , 1) , (1 , 0) , (0 , -1)]
B = -1
up = 0
right = 1
down = 2
left = 3
dic = {}
dic[0] = 'up'
dic[1] = 'right'
dic[2] = 'down'
dic[3] = 'left'
def possi(y , x):
global n
if y < 0 or y >= n or x < 0 or x >= n or B[y][x]:
return False
return True
... |
efc0b8f1c4887810a9c85e34957d664b01c1e92e | 6820f0a9ceef56db799e1da9a4752b1edbfec1dc | /libro/problemas_resueltos/capitulo3/problema3_5.py | 41fcefc8a06be48e4e78e08eb650cdae979ffe8d | [] | no_license | augus2349/CYPFranciscoMC | 0c374ecb0cc03495fde0f68508d0e85a3135c6ee | 4186a0510fcffb36b66a74e42d4648519a604c10 | refs/heads/master | 2020-07-23T18:47:32.621210 | 2020-02-27T03:42:04 | 2020-02-27T03:42:04 | 207,672,237 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | problema3_5.py | N = int(input("ingrese el numero de datos a ingresar "))
SP = 0
SO = 0
CP = 0
for i in range(1,N+1,1):
NUM = int(input("ingrese un numero entero "))
if NUM > 0:
SP += NUM
CP += 1
else:
SO += NUM
PG = (SP+SO)/N
PP = SP/CP
print(f"hay { CP } numeros positivos, el promedio general es de... |
3240a7fb9fbd5cd84165e68f8406e0a146c2b6b6 | 8639820e35a35603d9c80094b5b24754773ce168 | /python.analysis.apachelog.py | 213913b6ad08c4ab35f9bce01c0d0e1b51b8d4af | [] | no_license | weady/python | 3bc78426af3ad6c06e9f4968cbcacc803238b142 | cd281f908621cc54df46ce0a65e195eff3460167 | refs/heads/master | 2020-04-04T02:32:00.285639 | 2018-12-07T09:26:20 | 2018-12-07T09:26:20 | 46,109,443 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,870 | py | python.analysis.apachelog.py | #!/usr/bin/python
# coding:utf-8
#
#这个脚本主要是对apache日志文件的处理分析,过滤出需要的信息
#处理后得到的数据是: 主机IP:192.168.14.44 访问流量:814 K
#使用说明 python 脚本名 文件名; eg:python python.analysis.apachelog.py access.log
#
# by wangdd 2016/02/02
#
import os
import re
import sys
import shelve
#re 模块,利用re模块对apahce日志进行分析
#通过 re.match(……) 和 re.compile(……... |
3ffbef142d8fb53b734567ebea874f9c59ff9a9e | 86c486dfc8a7519b30e550581a77f66237cc23e0 | /20201220/Calculator.py | 05869c2530262ffee76a6f4ba1b1f1ba495b89ef | [] | no_license | sandeepa97/nextGen-py | 3086ac2a5997683e8b28f5a1429d71f8bad9b567 | f7e85bcbd98546fbc4e95fcaf9155cbfdbb9a6b2 | refs/heads/master | 2023-03-04T15:36:17.069742 | 2021-02-11T19:19:20 | 2021-02-11T19:19:20 | 322,862,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | Calculator.py | num1 = 101
num2 = 20
add = num1 + num2
sub = num1 - num2
mul = num1 * num2
div = num1 / num2
mod = num1 % num2
exp = num1 ** num2
fd = num1 // num2
print(num1)
print(num2)
print(add)
print(sub)
print(mul)
print(div)
print(mod)
print(exp)
print(fd) |
4d4f7db6d5b4ed7eac3ced73aca76d3c952c84f4 | c0f4e84ce205e68c6ee73303e44d70e93866801b | /day19/puzzle.py | 846534dd371d3dcdeee7ea23064e942ac85a01cc | [] | no_license | kicsikrumpli/adventofcode2020 | fa34115963b4c939e4d1cbde084eec760734dff5 | 8e5c5f725645aeabf2f18fc85147cdbe9d7a1262 | refs/heads/main | 2023-02-06T19:25:06.490462 | 2020-12-24T16:59:13 | 2020-12-24T16:59:13 | 317,469,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,513 | py | puzzle.py | from day19.rules import Rule, CharacterMatch, OrRule, ListRule
def parse_rule(rules: dict, rule_str: str = None) -> Rule:
if rule_str is None:
rule_str: str = rules[0]
if '"' in rule_str:
return CharacterMatch(rule_str.strip('"'))
elif '|' in rule_str:
or_rules = [
par... |
92dea316889192824c353002670cdcf03dfbcd4c | 2a933c8b2aa1ded6531981846ab4214ccf8c9d4e | /TCS CODEVITA/Tcs_CodeVita_Questions.py | d08fee95af44de526db47e04b6422b98792e576b | [] | no_license | Shubhojeetban/company-wise-coding-question | 4444950d5469850c91de73d801e0e729b1572302 | 36d7c365d837737f24c7f1a4822905b348f7a2de | refs/heads/main | 2023-08-28T17:52:55.819325 | 2021-10-22T16:05:19 | 2021-10-22T16:09:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,402 | py | Tcs_CodeVita_Questions.py | #Question:
"""
The parcel section of the Head Post Office is in a mess. The parcels that need to be loaded to the vans have been lined up in a row in an arbitrary order of weights. The Head Post Master wants them to be sorted in the increasing order of the weights of the parcels, with one exception. He wants the heavi... |
e9c81be79d9107433e00182c27488e64f1ca779f | bb04f9d93916654a1fdee0953301f2d5be6e0ca6 | /apps/BanBanTong/commands/management/commands/start_tasks.py | f39818cc4f91ab187668616a51746044bdb014e9 | [] | no_license | xiaolin0199/bbt | 85c0a140d4440fc01bfb11c071320e04f825c20e | a38403ae7643277ec8ea04bcbc7641c4cce8e613 | refs/heads/master | 2020-03-24T10:21:23.620474 | 2018-07-28T06:48:27 | 2018-07-28T06:48:27 | 142,650,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | start_tasks.py | #!/usr/bin/env python
# coding=utf-8
from django.core.management.base import BaseCommand
from BanBanTong.utils import task_scheduler
class Command(BaseCommand):
'''
启动BanBanTong.tasks定时任务
'''
def handle(self, *args, **options):
task_scheduler.start()
|
d437d77d5a57a6f2f4a2d530be05c3845dce93bc | afe91197077b87cf8022bc2350fd2574b545a799 | /flight_api/views.py | ba17fff2e21cf8b323d215729fd500fcf89f6ea5 | [] | no_license | uzaxirr/flight-reservation-api | 4ccc9d350bc2e3e993cea8f2c644e266adfe040e | 29ceb42033ee3464fa8d848faba3c3e600623ab9 | refs/heads/main | 2023-08-12T21:29:28.926874 | 2021-10-11T14:03:02 | 2021-10-11T14:03:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,438 | py | views.py | from django.shortcuts import render
from rest_framework.response import Response
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.permissions import IsAuthenticated
from .models import Flight, Passenger, Reservation
from .serializers import FlightSerializer, Passenger... |
dcace396fb8599d633eb9bbbb2766a41afb78129 | 146db0a1ba53d15ab1a5c3dce5349907a49217c3 | /omega_miya/plugins/bilibili_live_monitor/monitor.py | e44b764831ebc232a48aef46984cd88b9017b800 | [
"Python-2.0",
"MIT"
] | permissive | hailong-z/nonebot2_miya | 84d233122b2d785bfc230c4bfb29326844700deb | 7d52ef52a0a13c5ac6519199e9146a6e3c80bdce | refs/heads/main | 2023-03-26T14:59:31.107103 | 2021-03-09T17:01:08 | 2021-03-09T17:01:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,369 | py | monitor.py | import asyncio
import time
from nonebot import logger, require, get_driver, get_bots
from nonebot.adapters.cqhttp import MessageSegment
from omega_miya.utils.Omega_Base import DBSubscription, DBHistory, DBTable
from .utils import get_live_info, get_user_info, pic_2_base64, verify_cookies
# 初始化直播间标题, 状态
live_title = {... |
55256e25f38a4bfc514533751e9b65850abe117e | b89fc1c0c21617cbfd23d82d9440ddac57dd6ac5 | /scripts/labelbox2pascal/__init__.py | f8627165e46781b3a3b578755573ec109af0b3f5 | [
"Apache-2.0"
] | permissive | qiaoD/Labelbox | bc8aa2116d98c26887ea7d074c6a05945df9600f | d825826b1a094b2b2976a6644a1c94f0d307f868 | refs/heads/master | 2020-03-07T17:24:50.116954 | 2018-03-31T21:05:55 | 2018-03-31T21:05:55 | 127,610,458 | 1 | 0 | null | 2018-04-01T08:15:56 | 2018-04-01T08:15:56 | null | UTF-8 | Python | false | false | 4,160 | py | __init__.py | import os
import json
import logging
from shapely import wkt
import requests
from PIL import Image
from pascal_voc_writer import Writer as PascalWriter
class Error(Exception):
pass
class UnknownFormatError(Error):
"""Exception raised for unknown label_format"""
def __init__(self, label_format):
... |
7d5d13ff7e3237ea0a0aaaa7725c6826e8d7c19f | 097aa955ea15573dd6cfdcf8ec8db6232ed09f33 | /memory_trunk/memory_trunk_app/migrations/0006_perspective.py | b070bdfb1967508ccdd527756ac541d280fd47b3 | [] | no_license | samphillips1879/Memory-Trunk | d80bcfd16495603d84fd796a73ca1fe8364afe40 | 7da374146cdaae6243af2279c4bcfed9bef4ee39 | refs/heads/master | 2020-05-22T05:35:15.191467 | 2017-04-05T19:45:18 | 2017-04-05T19:45:18 | 84,674,217 | 0 | 0 | null | 2017-03-24T02:18:24 | 2017-03-11T19:21:31 | Python | UTF-8 | Python | false | false | 1,436 | py | 0006_perspective.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-16 15:01
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('tag... |
ded2eacfe92312c5a78fdd11fde44dd0ba8f0e69 | 07aac3e41eb8cafd18b1052b4da389a94c04cb37 | /app/python_analyse/weibo_crawl01/database_use.py | ae010bace33cf960c512003e8cf9b673d3b4e5f5 | [] | no_license | guoweikuang/weibo_showing | 714a733da7870576eea6ecf0ce879323d651dcc1 | ccc00db0f539e258d8c8571891159882ca91410e | refs/heads/master | 2021-01-21T10:45:45.688366 | 2017-05-18T15:08:25 | 2017-05-18T15:08:25 | 91,703,204 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,224 | py | database_use.py | # -*- coding: utf-8 -*-
import pymysql
from DBUtils.PooledDB import PooledDB
pool = PooledDB(pymysql, 5, host='127.0.0.1',
user='root',
password='2014081029',
db='weibo',
charset='utf8')
conn = pool... |
31f71fb77a58a909fa1964ee07d9207575a9a9b2 | 53e5698f899750b717a1a3a4d205af422990b4a2 | /examples/combined/hd+_vibration/serialization.py | e68af8a9573445614ebfeeab7ee251e97862deea | [] | no_license | kvantetore/PyProp | e25f07e670369ad774aee6f47115e1ec0ad680d0 | 0fcdd3d5944de5c54c43a5205eb6e830f5edbf4c | refs/heads/master | 2016-09-10T21:17:56.054886 | 2011-05-30T08:52:44 | 2011-05-30T08:52:44 | 462,062 | 7 | 7 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | serialization.py |
def RemoveNodeIfExists(f, path, node):
"""
Removes a node from a pytables file f if it exists.
f: an open pytables file
path: a group or a path to a group where the node is
node: the name of the node in the group specified by path
"""
try:
f.removeNode(path, node)
except tables.NoSuchNodeError: pass
def Sa... |
c8c91626654702ceb9ecaf0b1d408e8764913b03 | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /dockerized-gists/7547536/snippet.py | ea6c566f633b5ee27de0d3b28a5bf2ec14d68a03 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 1,272 | py | snippet.py | #!/usr/bin/env python
import sys
import datetime
import time
from datetime import timedelta
sys.path.append('/home/reb/local/azure-sdk-for-python/')
from azure.storage import *
from azure.storage.sharedaccesssignature import *
blob_service1 = BlobService(account_name='account1', account_key='key1')
blob_service2 =... |
80b79494b92c92e1002add16dec611d6cef93635 | 856327287c3594e8527e2554c036b65e394f7191 | /word2code/res/text&code8/CorruptedMessage.py | 5e1dc6e1f6f3eed65fde65e8e8f2299bf344560e | [] | no_license | jvalansi/word2code | 93dccfc74a2eafa242cd0a27eff540ba1a75895d | 6c5d1bb46a3001342739473773c1851e8e8f757a | refs/heads/master | 2020-04-06T04:31:43.071229 | 2015-11-04T17:26:57 | 2015-11-04T17:26:57 | 29,089,141 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,984 | py | CorruptedMessage.py | from problem_utils import *
from string import lowercase
class CorruptedMessage:
def reconstructMessage(self, s, k):
input_array = s
input_int = k
N = len(input_array)
''' Your friend just sent you a message.'''
# The message consisted of one or ... |
e8fd48575d1399691ccecaf895e726b012722223 | 491d5306e68793b57be2a411c32b3f2651486766 | /migrations/versions/1719a9c369bf_.py | d6d727cc6fdf1da3047d3aea77dbadaa4bb5ca9c | [] | no_license | dygksquf5/flask_clone_project_api | 2a0e6db73a93f4e953040626102f16c841468613 | 5c6a0e59ed3b880ff8a3547f2616355262de62e9 | refs/heads/main | 2023-03-25T09:30:05.878500 | 2021-03-24T02:02:02 | 2021-03-24T02:02:02 | 349,996,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,074 | py | 1719a9c369bf_.py | """empty message
Revision ID: 1719a9c369bf
Revises: 509a4baea51b
Create Date: 2021-02-21 12:44:42.640953
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1719a9c369bf'
down_revision = '509a4baea51b'
branch_labels = None
depends_on = None
def upgrade():
# ... |
aae37aca9d4d0fc491752883b52824e0a1858428 | 90a31eea16da3be2a1b9134818c3da949cd76d15 | /calculator.py | 301536f633baaa8f3b6e700632964eaf48180c60 | [
"MIT"
] | permissive | gautam-balamurali/Python-Programs | dc32ac4e8b77be3890e90a8d2bc9930b719b16cd | 601d4a171593b84f7fada1870ddddd3999eb16a0 | refs/heads/master | 2021-10-08T04:07:27.345237 | 2018-12-07T15:18:23 | 2018-12-07T15:18:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,085 | py | calculator.py | n=input("enter the no. of times you want to perform a particular task ")
print " 1-Addition "
print " 2-Subtraction "
print " 3-Multiplication "
print " 4-Division "
print " 5-Exponentiation ... |
427d868d16d7e843728eeaa6d8506793db4d81a1 | b64de1f625a0d16b67d3cd307658dc745d797f6b | /base.py | 3772bb7540569ecf086462cbd315a0d70ed2f162 | [] | no_license | Eldo0814/---------Rock-paper-scissors-software | 73cf9fc18a77b4ca41939c5fe625460fa3489d27 | ea2e2584a6daaaa132ec9a9efb75dc86df00600b | refs/heads/master | 2022-12-06T07:22:57.395918 | 2020-08-29T09:53:24 | 2020-08-29T09:53:24 | 291,244,321 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,809 | py | base.py | import random
print('じゃんけんをしよう')
print('1でグー 2でチョキ 3でパーを選択してね')
ai = random.randint(1, 3)
battle = input('最初はグーじゃんけんぽん:')
if int(ai) == 1 and int(battle) == 2:
print('グーをだしたよ')
print('私の勝ちだね')
end = input('エンターを押して終了します')
elif int(ai) == 2 and int(battle) == 1:
print('チョキをだしたよ')
print('私の負けだね')
... |
4b4c0331c7c703c133425591163b779b34beee9b | 8f3ceff01367c4550b2dd71f65af70c28bf8eed1 | /GenericViews/GenericViewPractices/urls.py | 519ce70b6d36a89ff422889b9ba3477b06b83633 | [] | no_license | anupjungkarki/ClassBasedVIEW-and-GenericVIEW-CRUD | 53110379420fca90cceec58c221e51f6523392a0 | ed99e50fab8b531d9a2167b11eb4eee8cc439351 | refs/heads/master | 2023-02-13T16:32:33.930218 | 2021-01-07T09:22:44 | 2021-01-07T09:22:44 | 327,561,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 958 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('std/', views.StudentListView.as_view(), name='student'),
path('std1/', views.DefaultTemplateListView.as_view(), name='student1'),
path('std2/<int:id>/', views.StudentDetailView.as_view(), name='student2'),
path('emp/', views.Employe... |
c02d20ddd5ed2055377ee4360c4c589cabed857b | fd16c46edff24b32942d74ecfc93524f4828a1b9 | /hw/emul_config.py | e1bfa235499808897fe1c240e776481e5883c603 | [] | no_license | azelenov/CarSpider | 041846f97f574a0ddc744e653e73e2abe0c46a87 | c842511fc689379c907cf6042883e7ca16713fef | refs/heads/master | 2020-05-07T22:29:52.436004 | 2013-05-24T08:32:18 | 2013-05-24T08:32:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py | emul_config.py | import requests
from settings import ref_urls
def check_rest():
url = ref_urls['dev']
r = requests.get(url)
print r.status_code
print r.content
check_rest()
|
99cc6d126565403ab844e6341308148cb43080e6 | c0425cb3c67b0f9e9077475d70e463c06aa176f6 | /trie_words.py | 6e0f6913164be8a53aa96004d6651fe022ef56b9 | [] | no_license | EugeneStill/PythonCodeChallenges | e3eba938c74cb64347843cb7e8c8937b6d50aed8 | 4ddeb506f984503d83cb0ad1a2fa2e915009c38f | refs/heads/main | 2023-04-29T00:26:26.537946 | 2023-04-15T01:18:33 | 2023-04-15T01:18:33 | 145,318,074 | 0 | 1 | null | 2023-04-15T01:18:34 | 2018-08-19T16:09:34 | Python | UTF-8 | Python | false | false | 2,303 | py | trie_words.py | import unittest
class TrieNode:
# Initialize your data structure here.
def __init__(self):
self.word = False
self.children = {}
class Trie(object):
def __init__(self):
self.root = TrieNode()
def __repr__(self):
def recur(node, indent):
return "".join(inde... |
b65efc6fa68c7f5b088c042e586fd726a7a02c57 | c174b9c0ddcabf96fa993f83406d18ce06250d81 | /default/Experiment.py | f5944f2ddd0835ddcd0363dd2272175948f6702d | [] | no_license | haondt/OpenAI-Solutions | 7bc4cf543d425561535b652d981d085be8c323c1 | a3b334854dbdb0a07d789adb963e1a14e23118df | refs/heads/master | 2020-04-11T04:38:44.312308 | 2019-07-27T02:57:04 | 2019-07-27T02:57:04 | 161,520,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | Experiment.py | # Built to run RLGlue experiment
# Noah Burghardt
import numpy as np
from Agent import Agent
from Environment import Environment
from rl_glue import RLGlue
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def main():
agent = Agent()
env = Environment()
rlglue = RLGlue(env, agent)
del agen... |
3bdfa4fd3a6d2fcef00d019dfffbb2bd266a9e59 | 284f4775828d155fd289697f5da52cf138e8c937 | /abc152/c.py | f9de8965e4430559abf9f684b39b68fa534f5330 | [] | no_license | aikiyy/AtCoder | f006d9eec4bea0c265b700259fa4a43790f92df0 | e4208bcc708c301b088d01528294fe013a475f21 | refs/heads/master | 2020-06-29T16:57:29.692986 | 2020-01-20T04:53:08 | 2020-01-20T04:53:08 | 200,572,345 | 0 | 0 | null | 2020-01-19T15:36:57 | 2019-08-05T03:00:55 | Python | UTF-8 | Python | false | false | 173 | py | c.py | N = int(input())
P = list(map(int, input().split()))
ans = 1
max_num = P[0]
for i in range(1, N):
if max_num >= P[i]:
ans += 1
max_num = P[i]
print(ans)
|
81101701e4fa99d7e469626e0d7f4da3f5ce8967 | a813668d08cdfe350406eafde0213a60ee9564ad | /stv/tests/models/test_machine_model.py | 16dee819849cd3237bf2291139d8aa3901ef038b | [
"MIT"
] | permissive | Ghalya22/stv | ca9ef74fc4536910399473745e1a9b9e1fe12916 | fc73fd50ad1ab6a36a6b4d6b1aec02c4bcd1b094 | refs/heads/master | 2023-08-14T07:14:15.275302 | 2021-09-20T05:24:38 | 2021-09-20T05:24:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | test_machine_model.py | from stv.models import MachineModel
import unittest
class MachineModelTestSuite(unittest.TestCase):
def test_sanity(self):
pass
if __name__ == '__main__':
unittest.main()
|
f6d9200eec8c83d12d4feeeda362a29c9635689a | dac6f5c477ea2cbaf37d2618d4d17b30ac0fdac6 | /ch2/nester/nester.py | e893acaae956e8b3444638e45c4460fcab58b941 | [] | no_license | jzorrof/headfirst | 3a8019f775b77e356b3f5b43421658d3a3845a3c | 2b902e4790d275cb1e0f052cc159e02828d102c0 | refs/heads/master | 2020-04-09T22:57:06.174294 | 2015-04-21T06:28:36 | 2015-04-21T06:28:36 | 32,065,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 459 | py | nester.py | '''This is the standard way to include
'''
import os, sys
def print_lol(the_list, intent=False, level=0, fn=sys.stdout):
'''
print nester list item
'''
for each_item in the_list:
if isinstance(each_item, list):
print_lol(each_item, intent, level+1, fn)
else:
if i... |
fdfa9fd32bf3b205df0fc002e0378cdebc0935b0 | 86e30a3c8efd9fe2fc04d2b1d6ff12cf71bcbe92 | /tests/testServerConfig.py | 7578cbb5856918101f86d69d1f37ec0b6e213e0e | [
"MIT"
] | permissive | agrc/AutomatedCaching | 0e2ac3c7935bffb7bdae1d3406ecb2e2aebd12fd | 7e0edc4bda3b2bbe2b8c8f18f779be4e33f0f383 | refs/heads/master | 2021-01-20T00:40:05.093992 | 2013-02-05T00:18:21 | 2013-02-05T00:18:21 | 7,875,077 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,918 | py | testServerConfig.py | from mock import Mock, patch
from unittest import TestCase
from agrc.caching.config import Server
class testServerConfigGetTokenUrl(TestCase):
def testUseHttpsReturnsUrlStartingWithHttps(self):
server = Server(use_https = True)
url = server.get_token_url()
self.assertTrue(... |
0fac176cb88dd9189c413d0db0b5b5ca9b16dffc | 5d6e573c005fb603104b5e5ba1a4f913c56ed85b | /shared/util.py | acfd338a18b669b572cc689ca12a3c3d47bf12d0 | [] | no_license | entrity/ML-Term-Proj | 7009e1baeed029ec75a94802e6ad5ab6778ae428 | 5288f76ec3f2c17133013bcf017c8fd16961b306 | refs/heads/master | 2020-05-16T22:07:11.698876 | 2019-06-11T18:57:56 | 2019-06-11T18:57:56 | 183,326,357 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,941 | py | util.py | import os
import logging
import argparse
import torch
USE_CUDA = torch.cuda.is_available()
def is_path_ok(path):
return path is not None and len(path) and os.path.exists(path)
def init_log(log_path):
os.makedirs(os.path.dirname(log_path), exist_ok=True)
logging.basicConfig(filename=log_path, level=logging.INFO, f... |
e30471d79fbdc54efdf4be3e149e728e3c8b9de9 | 2ba8326139a67cde384243bdc1040b06ee3ed234 | /day14/part2.py | b6156a949ac65329bff1509f2369ec921063ebeb | [] | no_license | LeReverandNox/aoc_2018 | c0cbaa8458044efefe4dca50ef8e32979687e062 | 592501454f6eeccfb9ada55baea97a1978aaa013 | refs/heads/master | 2020-04-10T02:49:44.892143 | 2018-12-16T22:06:15 | 2018-12-16T22:06:15 | 160,753,650 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | part2.py | # INPUT = 51589
# INPUT = 59414
# INPUT = 92510
# INPUT = "01245"
INPUT = 165061
def find_seq_in_deque(seq, len_seq, d, len_d):
curr_s = d[-len_seq:]
if curr_s == seq:
return True
def loop():
d = [3, 7]
n1 = 0
n2 = 1
input_str = [int(i) for i in str(INPUT)]
len_input = len(input_... |
e1c58e20e6e57b92c05b7ed66f576fd5cf1e3fd7 | 9b9a02657812ea0cb47db0ae411196f0e81c5152 | /repoData/wbond-package_control_channel/allPythonContent.py | eed5378c3f53f1df6e58e20e88156a00fb4f9ac7 | [] | no_license | aCoffeeYin/pyreco | cb42db94a3a5fc134356c9a2a738a063d0898572 | 0ac6653219c2701c13c508c5c4fc9bc3437eea06 | refs/heads/master | 2020-12-14T14:10:05.763693 | 2016-06-27T05:15:15 | 2016-06-27T05:15:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50,373 | py | allPythonContent.py | __FILENAME__ = test
#!/usr/bin/env python3
"""Tests for the validity of the channel and repository files.
You can run this script directly or with `python -m unittest` from this or the
root directory. For some reason `nosetests` does not pick up the generated tests
even though they are generated at load time.
... |
8986841ca9f1ad1ac9c8c932da3e511b653aee73 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /kPDSPe9cHwbE2jANs_17.py | 9329199145b12a8f4a051fdce8257df51b120303 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 98 | py | kPDSPe9cHwbE2jANs_17.py |
def cards_needed(n):
if n < 0:
return 'invalid'
else:
return int(n * (3 * n + 1)/2)
|
533ebc58df026b8ea97f7fa3f9c8533c4bdcd681 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03600/s313331111.py | e2cad88cef9e450ad8c549637a785cfb95e30c3e | [] | 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 | 641 | py | s313331111.py | import copy
def warshalFloyd(n):
G=[list(map(int,input().split())) for _ in range(n)]
D=copy.deepcopy(G)
for k in range(n):
for i in range(n):
for j in range(n):
G[i][j]=min(G[i][j],G[i][k]+G[k][j])
return G if G==D else -1
n=int(input())
Graph=warshalFloyd(n)
if... |
679d24addcc060e8a3a48d4886236ec91cde448f | 4bfcddffc8d56aa015cb5011af7341ded6a6db0c | /generalEmailParser.py | 6b14c86b55d6229970d73814f3e603002d6d62b1 | [] | no_license | kangzeroo/RentHero_Chatbot | 9fc0f368113e5cdec22be293f0e82cb71ccc8f5d | 1f5d960c63c00bb60a894b88f7cb43365fb52e9e | refs/heads/master | 2021-09-18T06:36:47.987094 | 2018-07-10T21:08:13 | 2018-07-10T21:08:13 | 138,090,424 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,349 | py | generalEmailParser.py | import email
import re
messagefile = './raw_data/raw_emails/MIME_Emails/1vqcsmni9o9td9cmp4l4vvg5qgqmrv6oi3jnaio1.txt'
filters = [lambda a: a!= '', lambda a: a != '>', lambda a: a!= '> ', lambda a: a!= ' >', \
lambda a: a!= '>>', lambda a: a!= '>> ', lambda a: a!= ' >>', lambda a: 'https://' not in a]
d = {}... |
1fb17638912c9b503cc90b8f100b7275c4abd060 | ec3bd268ddcb2e3d216c8571db30cf8fcf1aec73 | /hw0306.py | b9bff1c3ac78795c0edd53c88956a273bd5e531b | [] | no_license | yishin6726/0306 | 0516c15ec18f24e52e46ce89db6dbe021fb9f7c9 | bf69ed5fefe085d40500d6e93b20777c7685a19d | refs/heads/master | 2021-03-31T00:05:58.816979 | 2018-03-13T12:03:32 | 2018-03-13T12:03:32 | 124,352,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | hw0306.py |
# coding: utf-8
# In[2]:
import requests
response = requests.get("http://www.novelscape.net/wxxs/j/jingyong/ffwz/001.htm")
response.encoding = "big5"
book1 = response.text
book1
# In[4]:
book1.find('四')
# In[5]:
word = '四'
book1.count(word)
|
de6498679d758a529d55a1acd1432225c6bacae6 | 24b738890dd7b74529eab92a6e9ccb654b7f937c | /bagnialmare/common/sitemaps.py | 26a303dd3745b7dd00379c2231d6253d54269c00 | [] | no_license | parruc/bagnialmare | 0e934d878ee7f04776e993f90b0597e5d89d28ef | e64263ded8bc448f32824a296b9f4cf3384b3c46 | refs/heads/master | 2021-01-11T05:57:55.837085 | 2019-06-07T00:41:55 | 2019-06-07T00:41:55 | 69,666,472 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 908 | py | sitemaps.py | from django.conf import settings
from django.contrib.sitemaps import Sitemap
from django.utils.translation import activate
from django.urls import reverse
from importlib import import_module
all = ["LocalesSitemap", "StaticLocalesSitemap", "get_sitemaps"]
class LocalesSitemap(Sitemap):
def get_urls(self, page=1, ... |
237a68289e5df495db2a6579fa2d4fff5c2023e1 | 127daf8dfd5e1ac0fe8e32eb622d6f2e89268090 | /web/schemas/resourceSchemas.py | 4a84cc13ba127a33ff457ca12cb25e801db7b930 | [] | no_license | vyrzdev/dot2dot-v1 | 05d90a2985f22467d7df7cb3d2ef330f4e1237c1 | f0a301c910b38540cab4e16ee182018bd3aa6994 | refs/heads/master | 2022-11-21T22:25:58.581764 | 2020-07-24T12:24:33 | 2020-07-24T12:24:33 | 261,998,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,706 | py | resourceSchemas.py | from .. import models
Schema = {
"field": {
"meta": {
"name": "field",
"label": "Field",
"endpoint": "/field",
"redirect": "/field/view",
"dbModel": models.fieldStore,
},
"actions": [
{
"name": "create",
... |
7807ffad1efa1c746d3059ebe87c80d34d8674f4 | 42836d526eee13930bb6ae35a45d87ab44ff2f41 | /make_cutouts.py | 88a715422f6bf8ad1de3deb3357816c1a8fa70db | [
"MIT"
] | permissive | alexia-weisz/galaxy_cutouts | 63bc24e456233315b98946c04ab00e83bfc07346 | 02c7eac9a6251a36290e7c620ff6a76c012fd53b | refs/heads/master | 2022-06-22T10:08:00.200164 | 2017-12-29T17:32:09 | 2017-12-29T17:32:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,235 | py | make_cutouts.py | import numpy as np
import gal_data
import extract_stamp
import warnings
import argparse
from pdb import set_trace
_GALDATA_DIR = '/n/home00/lewis.1590/research/galbase/gal_data/'
def get_args():
""" Get command line arguments """
parser = argparse.ArgumentParser(description='Create cutouts of a given size ar... |
556a7920966003e1c73a63563bf27e9ebf046dd1 | 2cd6b3b10bd975dac21f4973334a8d90cd360cff | /Kubelogin.py | 99c67517b93f3b1ed093a0756161c9b188499735 | [] | no_license | Rock981119/Keycloak-K8s-LoginScript | 3c23913a9ea6fb7e2f72d2aabeedf7bad2512d73 | ddbc306b1b0d419d449670109f12d54cfdbefd96 | refs/heads/main | 2023-03-08T16:38:06.507640 | 2021-02-28T05:41:48 | 2021-02-28T05:41:48 | 334,802,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,613 | py | Kubelogin.py | import requests
import urllib3
import json
from getpass import getpass
session = requests.session()
session.verify = False
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
keycloak_url = input('Keycloak Auth Url: ')
keycloak_realm... |
62f97c4e45d4251cd2687543afe541b6f1f46f56 | 3510de8733fff3411d784a2601d74347b08cec2b | /demo/app/views.py | 2a14fcd59d892e3cc8c065cd3965b75066a7d75a | [
"MIT"
] | permissive | qvp/django-rest-fast | 157a771b74ee8f4390136ea24e334de7e7852f55 | 5c3e84bd140054e1e58d74e15f7ff7f9d0e9bd3c | refs/heads/main | 2023-02-08T13:15:42.376128 | 2020-12-25T11:37:44 | 2020-12-25T11:37:44 | 322,215,224 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,568 | py | views.py | from django.http import QueryDict
from django.http.response import JsonResponse
from django_rest_fast.decorators import get, post, put, patch, delete
from django.contrib.auth.views import get_user_model
from .forms import (
UserLoginForm,
UserRegistrationForm,
PostCreateForm,
)
User = get_user_model()
d... |
4d56c63f8268a4c432bdf6252b43a04485319b49 | c9f1cc3a6715917d658a6e525b7c2d35b0380f9f | /PhD/Alper/exon_counts_compare.py | 136ac210b821d824f45e1a294dedd424aeb2a233 | [] | no_license | geparada/my_src | 4f84887130b985e84aad3d0d35e85911087d9b4f | 8d64f7ef51e1f74303ca88beb0ee964f546d8301 | refs/heads/master | 2021-01-17T01:50:50.414690 | 2017-03-14T10:01:50 | 2017-03-14T10:01:50 | 20,638,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,481 | py | exon_counts_compare.py | #!/nfs/users/nfs_g/gp7/miniconda/bin/python
import sys
import csv
import pysam
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.Alphabet import generic_dna
from collections import defaultdict
def main(bam1, bam2, RepeatMasker):
bamfile1 = pysam.Samfile(bam1, "rb") #PE40
bamfile2 = pysam.Samfile(bam... |
f2cc625d45abc8573b57e7151a5e8de2f369f8e6 | 5f2039b325a63765c43e9fdf28c275f7af990dac | /acamica-course/simple_webscraper.py | f5ed3611b4ab3902803846b9be17679cece313d5 | [] | no_license | pipecm/learning-python | da33cd8c076c58eee426cd4547ab05daaacd60d9 | 3f5fde44db21fb81316d2b2b956c832e719ab8b4 | refs/heads/master | 2022-11-09T18:27:16.515577 | 2020-06-25T01:03:30 | 2020-06-25T01:03:30 | 258,350,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | simple_webscraper.py | from lxml import html
import urllib.request
import sys
if len(sys.argv) != 4:
raise SystemExit('Usage: simple_webscraper.py term page_number per_page')
term = sys.argv[1]
page_number = sys.argv[2]
per_page = sys.argv[3]
u = urllib.request \
.urlopen('https://www.ted.com/search?page={}&per_page={}&q={... |
be3e765503676430043e7db82586f88eb6a3b92c | b3dc85ac865091afd6374e6fde035090e2f489f1 | /Introduction to Data Science in Python/Week3/assignment3.py | 98d2987569c7962d29f6f1ea3e10237133a04dce | [] | no_license | 5cminsuhlim/Applied-Data-Science-with-Python | 63a4e2de9bf3db28f141d64a74ad0a61e6eeb192 | c02ec9acf77e8897a5bfd77fa70f4906e7f00b12 | refs/heads/master | 2023-07-02T22:21:12.473306 | 2021-08-01T21:42:44 | 2021-08-01T21:42:44 | 378,565,992 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,963 | py | assignment3.py | #Question 1
import pandas as pd
import numpy as np
#ENERGY FILE
energy = pd.read_excel('assets/Energy Indicators.xls')
#get rid of unnecessary columns
energy.drop(energy.columns[[0,1]], inplace = True, axis = 'columns')
#rename columns to something understandable
energy.rename(columns = {'Unnamed: 2' : 'Country', 'U... |
cabf05abbd6b798d162b2d24c6b7cadd5b2b609e | 2900ddbe317c0be9d28e497d3ab37b0aeba66028 | /blog/models.py | 34562e4894648d8d237823ad05918cf25944227d | [] | no_license | wenbert/learning_django | e8143aeea58529f76841d32643226ef8d99769d5 | 34574483ba7ffb6de292c5d60450b95645a051b1 | refs/heads/master | 2021-01-01T05:53:12.716461 | 2009-09-25T10:45:33 | 2009-09-25T10:45:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 739 | py | models.py | from django.db import models
class Blog(models.Model):
author = models.CharField(max_length=200)
title = models.CharField(max_length=200)
content = models.TextField()
pub_date = models.DateTimeField('date published')
def __unicode__(self):
return self.title
def was... |
6f8e9e3363d5e397b77a20c9fd8dcedd52803a93 | a5629fe82332792c1237f3d217bae1d52d382ee9 | /Advanced_Data_Structures/stacks.py | 6e9937577ae8b84a97bac99cf876dd2ec50cdd8f | [
"MIT"
] | permissive | Sandbox4KidsTM/python-intermediate-ilovebella02 | 6fe5d7e3a6dc18e1b360c967015a1771b933a116 | cb4aadfd827d441f80c8ad6d53b97f3364a5f481 | refs/heads/master | 2020-03-23T05:44:29.828115 | 2018-07-17T18:05:17 | 2018-07-17T18:05:17 | 141,163,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 524 | py | stacks.py | # -*- coding: utf-8 -*-
class My_Stack():
def __init__(self):
self._stack = []
def _repr_(self):
return" ", __join__(str(x) for x in self._stack.reverse())
def push(self, item):
self._stack.append(item)
def pop(self):
return self._stack.pop()
... |
0deb0debc49e113a84885541eeab8380739ced9f | 7d43c97f8bb1c44d1e932a5ba302a4d90def083f | /Network.py | c66fb9c33c1797402db0d50486ba78334304d482 | [] | no_license | YichengWu/PhaseCam3D | 83bb9e05d88605527f97b01744416277bf3eabd1 | 6b79b28e3d7f3ff01af139c4f98a9636eb3b9ee5 | refs/heads/master | 2021-10-13T16:32:46.145277 | 2021-10-01T02:22:45 | 2021-10-01T02:22:45 | 200,061,233 | 42 | 7 | null | null | null | null | UTF-8 | Python | false | false | 3,542 | py | Network.py | import tensorflow as tf
def max_pool_2x2(x):
return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')
def conv2d(x, W):
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')
def BN(x, phase_BN, scope):
return tf.layers.batch_normalization(x, momentum=0.9, ... |
fabf8f439619966469108406a0cfa861ee4c5bcf | f38303b6c3b8de29b92240d54a738d5970ea0906 | /example/pm.py | ffaf74ba7a8afe669727a1516c493d438862a757 | [] | no_license | aldenleung/simplevc | a7ecfbcf1e1e02e0c22f46d45607dac86ba2f874 | a763cd8eff5029ff03674913fa1170a6a7d36b0c | refs/heads/main | 2023-01-30T23:16:19.685112 | 2020-12-19T00:04:33 | 2020-12-19T00:04:33 | 322,145,219 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,406 | py | pm.py | # These three lines are required to register this module with version control
import sys
import simplevc
simplevc.register(sys.modules[__name__])
# Definition of some_method with version 20200601
@vc
def _some_method_20200601(a, b, c):
"""
This is the docstring for method _some_method_20200601
"""
print("Call from... |
e96b1040a196fea96ea3bc891396310a5a5f07b0 | 9c123ac62e07e71fa546600074671ec79b2e142f | /LSSH/utils.py | 3c2ec7ae8521d63c71f62f5d820d391ced368d7b | [] | no_license | yolo2233/cross-modal-hasing-playground | 973a6607082f6a28c53d43a124726d547854066d | 1be668c32bde06791fab7b9be9ac93497ea3bd55 | refs/heads/master | 2022-11-25T15:34:24.863361 | 2022-11-17T20:24:42 | 2022-11-17T20:24:42 | 182,380,364 | 24 | 3 | null | null | null | null | UTF-8 | Python | false | false | 6,297 | py | utils.py | import time
import numpy as np
from sklearn.metrics.pairwise import euclidean_distances, cosine_similarity
import random
def count_time(func):
def wrapper(*args, **kwargs):
with open('results/results.txt', 'a', encoding='utf-8') as f:
f.write('excute ' + func.__name__ + '...\n')
tic = t... |
9f2d58fbe797e1c59b19b598313285282b118baa | 3a6486c0718e4b0958d741a0cca35630f794e49b | /test_py.py | b12241fb00a5e9a9d0d18950801805edc16b66d5 | [] | no_license | IuliaDumitrascu/cursuri_python | 7505be85a84316a6198bf3e435b21a7695c0ef7a | 354ced45a5cd305f4f30a44446c21c3fe1fe7248 | refs/heads/main | 2023-04-23T14:06:49.650052 | 2021-05-13T10:33:41 | 2021-05-13T10:33:41 | 367,009,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31 | py | test_py.py | print("Primul meu curs Python") |
abca200c4dd4b0f66efe91d0150f53d3191a3f5a | 8dd25404ccd41abea49d4b96513756179d5af095 | /Lesson_5.py | 72940a3d4eacebbd555a38368fe79b2a836538f9 | [
"MIT"
] | permissive | vladimir-popov-dev/Lesson_5 | c5288a8511d4ed9e6d17e059aaf4c5e14223701b | 1e4f44293c50071354822ba37454a601b6ffa219 | refs/heads/master | 2022-12-20T02:14:49.800544 | 2020-09-29T12:24:39 | 2020-09-29T12:24:39 | 297,684,151 | 0 | 0 | MIT | 2020-09-29T12:57:37 | 2020-09-22T15:00:37 | Python | UTF-8 | Python | false | false | 1,780 | py | Lesson_5.py | from divisor_master import *
# 1) проверка числа на простоту (простые числа - это те числа у которых делители единица и они сами);
for x in range(1, 30):
if isprime(x):
print(f'{x} - Простое число')
print()
number = 590
# 2) выводит список всех делителей числа;
print(f'Все делители числа {number}: ', al... |
99d172b84a31d7d5520de818e12c88baa597f40e | 50e872a61aa1ad6b2fd50d8d5aa440f77406f24b | /Tienda.py | f2294b8c7af2f167c7c4017a96a11faff4910b44 | [] | permissive | AlbireoImma/SO_4 | efc3002c886eef3e8c3c11c678dc0565feecce67 | c93e521af1a9cc6bd5c4918b36da1cf41e096d36 | refs/heads/master | 2020-04-11T05:18:22.367439 | 2018-12-16T23:50:26 | 2018-12-16T23:50:26 | 161,545,522 | 0 | 0 | Unlicense | 2018-12-16T23:53:45 | 2018-12-12T21:09:59 | Python | UTF-8 | Python | false | false | 7,423 | py | Tienda.py | from threading import BoundedSemaphore as Sem
from threading import Thread
import time
from time import gmtime, strftime
def getTime():
return strftime("[%d-%m-%Y %H:%M:%S]", gmtime())
class Cliente(Thread):
def __init__(self,val):
Thread.__init__(self)
self.id = val
self.estado = 0 # ... |
3d94fe3bf4de4639e6ddd8969cdd7509bdb5be5f | 36aa8e827750b0a58fd9996d751ea80981c65008 | /Forecasting/real_main - Copie.py | 286f13527b439b4fab3540ec108a913d63c0ae23 | [] | no_license | gregoritoo/UI_Anomaly_Detection | 557d99f5660ea68ed9cd6922d414acb182124d8c | b193e37076b1891212e89e4f1b719f9504427cb1 | refs/heads/master | 2023-01-19T09:08:37.469915 | 2020-07-08T11:47:50 | 2020-07-08T11:47:50 | 275,765,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,090 | py | real_main - Copie.py |
import pandas as pd
import time
import numpy as np
import pickle
from datetime import datetime
from Alert import Alert
from datetime import datetime, timedelta
from Forecasting.prediction_functions import write_predictions,modifie_df_for_fb,make_sliced_request,evaluate_linearity,train_linear_model
from influxdb impor... |
0e413bdcfad9d95484257e6aed1c3f6c9f611555 | 57270d832206a7719930aaac437a45b5b2c80fa2 | /portal/plugins/gnmlibrarytool/forms.py | e2d6fbb9cf9fee50a23b583dc4d918a577047664 | [] | no_license | guardian/portal-plugins-public | f37886ddd58a72ab7c6b9c7bf87677ef5ca4ad07 | 87099c78d1859f18eb99ee461f0229028008a210 | refs/heads/master | 2021-11-20T12:37:32.017813 | 2019-09-12T16:04:28 | 2019-09-12T16:04:28 | 74,485,111 | 8 | 3 | null | 2021-09-01T07:42:29 | 2016-11-22T15:17:31 | JavaScript | UTF-8 | Python | false | false | 3,078 | py | forms.py | from django.forms import *
class ShowSearchForm(Form):
only_named = BooleanField(required=False)
only_with_storage_rules = BooleanField(required=False)
only_auto_refreshing = BooleanField(required=False)
class ConfigurationForm(Form):
library_id = CharField(max_length=32,widget=TextInput(attrs={'rea... |
315bcaee20a0fa42f0ad1369668f6edfa23bd89a | 72eb33f4d72ce5f53104b137371a91f0447b4453 | /Checkio.com/Home/Date and time converter.py | 64ae7c48daface258aef95801795e234de0eb0b8 | [] | no_license | Alberts1995/Example | ebadc66b2921e1723e99928d2da42d4d57f7dd55 | 164a56848ccf5d11ed5cdd026c5cba14ef9da543 | refs/heads/main | 2023-02-26T00:31:07.954797 | 2021-02-02T10:05:19 | 2021-02-02T10:05:19 | 321,967,069 | 0 | 0 | null | 2020-12-18T12:39:11 | 2020-12-16T11:52:52 | Python | UTF-8 | Python | false | false | 1,500 | py | Date and time converter.py | def date_time(time: str) -> str:
manth = {"01":"January", "02":"February", "03":"March",
"04":"April", "05":"May", "06":"June",
"07":"July", "08":"August", "09":"September",
"10":"October", "11":"November", "12":"December"
}
all = {"00":"0", "01":"1", "02":"2",... |
b0a2d0a484e16d88d3fd90161943e6779604b397 | 3f890e3790c3f5207a0b684fecdcfc1b7d0490a1 | /function5.py | f314591befe2051924d3ab0e59f79d1645abcbde | [] | no_license | ifmylove2011/student | 2210b9d4e0c4fc5cc55a9d02b8709ccffa1f8436 | e0815d0de6dfe8f9df071262e2cd49dd8aacbf77 | refs/heads/master | 2023-08-02T06:34:16.130651 | 2023-07-25T05:57:35 | 2023-07-25T05:57:35 | 206,522,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | function5.py | import functools
def count():
fs = []
for i in range(1, 4):
def f():
return i * i
fs.append(f)
return fs
f1, f2, f3 = count()
print(f1())
print(f2())
print(f3())
f = lambda x: x * x
print(f(5))
def log(func):
def wrapper(*args, **kw):
print('call %s():' % func... |
7091e75c2f7c118112b274be4ef3e3d3440b151f | 27fd33abe12f48b0cfdafef7a624e4a96b311744 | /partner_siret_crm/lead.py | 456bbc590274d97f2718eb0dde0747d64da29866 | [] | no_license | mgielissen/julius-openobject-addons | 7b9966ed2894ce82b5fb396bca1bd9984f263737 | 3e35f7ba7246c54e5a5b31921b28aa5f1ab24999 | refs/heads/master | 2021-01-16T20:41:49.131160 | 2016-03-01T12:31:05 | 2016-03-01T12:31:05 | 52,984,093 | 1 | 0 | null | 2016-03-02T17:53:42 | 2016-03-02T17:53:42 | null | UTF-8 | Python | false | false | 2,678 | py | lead.py | # -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today Julius Network Solutions SARL <contact@julius.fr>
#
# This program is free software: you can redistribute it and/or modify
# it unde... |
a15fc76bf6609ff544fd1d1b1c78df36f329e01a | ec00584ab288267a7cf46c5cd4f76bbec1c70a6b | /offline/__Digital_Twin/__release2/__release2_sprint14/test-3.py | dd94f728f142fb21d4f8e8bc323cc1d5e9d743bd | [] | no_license | rahuldbhadange/Python | b4cc806ff23953389c9507f43d817b3815260e19 | 7e162117f1acc12537c7eeb36d6983d804122ff3 | refs/heads/master | 2021-06-23T05:04:20.053777 | 2020-01-28T10:34:28 | 2020-01-28T10:34:28 | 217,307,612 | 0 | 0 | null | 2021-06-10T22:44:11 | 2019-10-24T13:35:42 | Python | UTF-8 | Python | false | false | 3,753 | py | test-3.py |
inputString = """([{{
"_id" : ObjectId("5d108812b6bc8d3280d082b1"),
"asset_id" : "1000021",
"Source" : "sapwarrantyrecall",
"Ts" : "2019-06-24T08:21:37.596035+00:00",
"Seq" : 838,
"source" : "sapwarrantyrecall",
"offset" : 838,
"_clmno" : "000440000120",
"AssetType" : "AGG",
"T... |
b84d2114ff7baea59b8c556582eb918b665d6dd1 | d9912e163d176174a824a102dea1b72ecb049cfe | /src/modelimport.py | 68053c41484f3f57b8b0ccde4d0994cffeb10288 | [] | no_license | oof160030/toolsdev_assignment03 | 895bf37452df918327dd1fa95f4bccdb75d7840a | aeb73d880d8eaacc5892e35990743336bc268ba6 | refs/heads/master | 2022-11-25T10:03:21.280903 | 2020-07-29T22:26:26 | 2020-07-29T22:26:26 | 283,077,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,006 | py | modelimport.py | import maya.OpenMayaUI as omui
from PySide2 import QtWidgets, QtCore, QtGui
from shiboken2 import wrapInstance
from pymel.core.system import Path
import maya.cmds as cmds
import filereader
def maya_main_window():
"""Return maya main window widget"""
main_window = omui.MQtUtil.mainWindow()
return wrapInst... |
ad6e8211b0a7a0669404f783e5cb1a1facd2d735 | abb11deba1548184892570e58fd40c252a11fee5 | /loops/main.py | e6b8489d690686e6fd5191fb658c9336a85b4951 | [] | no_license | Mr-Rakib/Python | a34b6fb3d94a9de0418a8f611d02242cd3ea1a40 | a85d8fc8f58e3d7ce9b0438a2113e415e175c3f0 | refs/heads/master | 2023-03-07T15:00:20.441271 | 2021-02-06T12:21:58 | 2021-02-06T12:21:58 | 335,277,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | main.py | """
list = [1,2,3,4,5,6,7,8,9,10]
print("print the list")
for item in list:
print(item, end=" ")
examList = [int, float, 1,20,66,90, 'Hello', "Rakib", {'rakib': {'id': 1, 'username' : 'rakibhasan'} }]
print("\nprint exam list")
for item in examList:
print(item)
print("\nprint in a range till 6 ")
for i in ra... |
dc29de63d6b6f9a8f08664057a4a2a6d96358288 | ea58a2668650d5a08b524e5822857b876556b021 | /salt/modules/drbd.py | 24fcfc736774cb178deb3c6e6b657671c0b7302c | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | dhiltonp/salt | 355343624cdbfa90ca5f80a99026b65bcc0fc528 | cb259343f5a9ff0b3927ba09843a6e685b741f5e | refs/heads/develop | 2021-07-21T18:23:47.655498 | 2018-11-02T15:02:03 | 2018-11-02T15:02:03 | 155,917,488 | 0 | 2 | Apache-2.0 | 2020-04-28T13:37:17 | 2018-11-02T20:21:25 | Python | UTF-8 | Python | false | false | 3,298 | py | drbd.py | # -*- coding: utf-8 -*-
'''
DRBD administration module
'''
from __future__ import absolute_import, print_function, unicode_literals
import logging
log = logging.getLogger(__name__)
def _analyse_overview_field(content):
if "(" in content:
# Output like "Connected(2*)" or "UpToDate(2*)"
return con... |
2cc9f8c476026311456857d3395a14a45e2f4b80 | d571d407cfda435fcab8b7ccadb1be812c7047c7 | /guild/tests/samples/projects/flags/store_true.py | 2d4c70f0f026c71aca7cdcb8fd3dd970fd65b90d | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | guildai/guildai | 2d8661a2a6bf0d1ced6334095c8bf5a8e391d8af | 149055da49f57eaf4aec418f2e339c8905c1f02f | refs/heads/main | 2023-08-25T10:09:58.560059 | 2023-08-12T20:19:05 | 2023-08-12T20:19:05 | 105,057,392 | 833 | 86 | Apache-2.0 | 2023-08-07T19:34:27 | 2017-09-27T18:57:50 | Python | UTF-8 | Python | false | false | 130 | py | store_true.py | import argparse
p = argparse.ArgumentParser()
p.add_argument("--foo", action="store_true")
args = p.parse_args()
print(args.foo)
|
0d9c50e55df5aa5614bd5a9679729cf7fa69c5df | ddb3cae0628dc37cac63ebc1b6ebedea58c7fc8f | /0x11-python-network_1/6-post_email.py | 696efbe7484fc3a8e93df9e965ef840febfa6011 | [] | no_license | ikki2530/holbertonschool-higher_level_programming | 1df42d49d7b4cf985d53bd5d2a1e55a9b90a195c | f0649aae6f2d96ea7e7c9a6e2e05a96177abb40e | refs/heads/master | 2022-12-20T11:13:29.263591 | 2020-09-26T14:20:02 | 2020-09-26T14:20:02 | 259,413,777 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | 6-post_email.py | #!/usr/bin/python3
"""takes in a URL and an email address, sends a POST request to the passed
URL with the email as a parameter, and finally
displays the body of the response.
"""
import requests
import sys
if __name__ == "__main__":
url_arg = sys.argv[1]
email = sys.argv[2]
params = {'email': email}
... |
38c21fb959d8b98b616006ea48bd720cc6f9995c | 4074b3381ea5d4e6e27137dc2bdc7b2387ef1624 | /digressions/migrations/0005_auto_20180306_1721.py | 600be819edcf3e24e17bb32ce1dc67f9d52c9f18 | [] | no_license | lefebvredaniel/Rproust | 3095b373703645b08f2c6ee9eb0d236a447878fb | de245b9e2dc694b1be353c15304e0810cae99252 | refs/heads/master | 2018-12-21T01:35:39.223323 | 2018-10-25T08:04:55 | 2018-10-25T08:04:55 | 119,298,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | 0005_auto_20180306_1721.py | # Generated by Django 2.0 on 2018-03-06 16:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('digressions', '0004_auto_20180303_1158'),
]
operations = [
migrations.RemoveField(
model_name='ex... |
760a62a94347171eb9e40015c0c43d72df8f4fc8 | 1fd265b5c76ffa83f873e900a597adc0d203a7e3 | /tests/component/app.py | d04a80fda41b611a7dbfbb26c7fdd4901010d0dd | [
"MIT"
] | permissive | c137digital/unv_app | 6129506db32866ea1c09c8c2e4f7d2a147f3edd8 | dee5c9874bdcc1f657f98f331f2b4e0b00e42d6d | refs/heads/master | 2021-09-21T21:40:21.232436 | 2021-09-03T22:07:03 | 2021-09-03T22:07:03 | 164,134,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | app.py | from unv.app.base import Application
def multiply():
print('multiply', 2 * 2)
def setup(app: Application):
app.register_run_task(multiply)
|
d0a73385db0dd6f729d267095ef83b9fec72e40c | 796e0d9b9fd9cb016f74156e4ad74a0e32abae28 | /alembic/versions/a07768b0d4c0_product_ingredient_unique_constraint.py | fb8ae9fa38e231b898cb916b58102c607ddb25e0 | [] | no_license | OpenUpSA/mpr_analysis | 03c2a695afe120a5aa74ebdb07db3dbd61a14e93 | 90768a7ce3ed6fb04bbeb89d0e9e8cf369fb48db | refs/heads/master | 2023-02-25T00:25:23.811528 | 2017-08-29T13:15:47 | 2017-08-29T13:15:47 | 91,677,559 | 0 | 0 | null | 2023-02-10T21:09:42 | 2017-05-18T09:54:29 | Jupyter Notebook | UTF-8 | Python | false | false | 1,384 | py | a07768b0d4c0_product_ingredient_unique_constraint.py | """product_ingredient unique constraint
Revision ID: a07768b0d4c0
Revises: a80cd9a35e58
Create Date: 2017-05-18 11:39:52.258266
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a07768b0d4c0'
down_revision = 'a80cd9a35e58'
branch_labels = None
depends_on = None
... |
ddabceb223f4e457a0f69af5abf793ae72e5f432 | f5881b7cc60474b85d7c5ff6919e74b3d1642253 | /getCommonMotifReadsFromCollapsedFastq.py | e87fe846af3787a1222c067d107f5657283bbf8f | [] | no_license | sharanm0/scripts-susanna-2023-backup- | 46833111734fa082022c1fcaf482c8ce8c7237fb | f16f5c2b2e149f3643222e3bbd2e1ccc3b6c3f78 | refs/heads/master | 2023-03-17T03:19:41.405717 | 2018-06-07T17:30:16 | 2018-06-07T17:30:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,361 | py | getCommonMotifReadsFromCollapsedFastq.py | ## PURPOSE: get reads for certain motifs across certain tumors
## INPUT: manifest data all-tumor-manifest.csv
## collapsed fastq files sample.converted.unpaired.fastq.collapsed
## OUTPUT: table containing reads for specific motif across samples motif.tumor.common.reads.fastq.collapsed.summary.tsv
import... |
e2feb12b88babbbfa4cc8447c91e8a5b6c30f78b | 36da6c5f553d4eb97cc2b6798d8017f313b2705e | /hucais/trunk/driver/antAgv/agvCtrl.py | 1af2b64405ec03a6a5a7bd8cc41f2272d5e714ec | [] | no_license | MOZIJANE/jingxin | da10476edfc25ffbbe87eb8f127c600ce6ad30ce | 01e7e419b15da1b6a7c127d1db1a042a24a12146 | refs/heads/master | 2023-06-06T05:05:11.953104 | 2021-06-23T04:27:22 | 2021-06-23T04:27:22 | 378,850,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,850 | py | agvCtrl.py | #coding=utf-8
# ycat 2017-10-20 create
# AGV的控制
import sys,os
import json
import setup
if __name__ == '__main__':
setup.setCurPath(__file__)
import utility
import enhance
import threading
import time
import log
import re
import lock
import json_codec
import driver.agv.hdcAgvApi as api
g_threads =[]
g_carts = No... |
fcca845b60b050fa5dd0a3c50b3c36c154022f07 | a8faf91c19ffc16c0354c0454beae9cad62a39c5 | /30.连续子数组的最大和.py | 59bac2363b12e1e7e404901c8b19c803cb1eda60 | [] | no_license | runningshuai/jz_offer | e159dd3b283af2809a1d645048afcbf5d4eb5057 | 2787120eacc934b30718fff65256fa3e9dbd85cd | refs/heads/master | 2022-12-17T08:41:52.175516 | 2020-09-07T13:30:32 | 2020-09-07T13:30:32 | 272,410,174 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,097 | py | 30.连续子数组的最大和.py | """
题目描述
HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学。
今天测试组开完会后,他又发话了:在古老的一维模式识别中,
常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。
但是,如果向量中包含负数,是否应该包含某个负数,并期望旁边的正数会弥补它呢?
例如:{6,-3,-2,7,-15,1,2,2},连续子向量的最大和为8(从第0个开始,到第3个为止)。
给一个数组,返回它的最大连续子序列的和,你会不会被他忽悠住?(子向量的长度至少是1)
"""
# -*- coding:utf-8 -*-
class Solution:
def FindGreatestSumOfSubArray(self, ar... |
997b68e42547b8f8a1059776c55c3ad16df494da | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nngallium.py | f81d33f8426dfb4b6dd89337649de652af4dcc6d | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 25 | py | nngallium.py | ii = [('LeakWTI2.py', 6)] |
e675283f14a3d29fba878e7f6d9592130611c2be | 06bd3f140aaf3cc45051bc8b2abfa35bdb8fc0b3 | /backend/resource/models/user.py | bf9e09362952c1e7e61eaba4bad09100db809e02 | [] | no_license | oxygen-TW/LoversCoupon | 1efc2cd8ee8fa1f37515066f286ed8a2e50c57dc | 1ab4656b48b9a4f59fc22c47c9ed72b1fb9280c7 | refs/heads/master | 2022-12-09T14:12:11.572823 | 2020-08-27T05:44:29 | 2020-08-27T05:44:29 | 287,777,365 | 0 | 1 | null | 2020-08-24T23:42:13 | 2020-08-15T15:51:34 | TypeScript | UTF-8 | Python | false | false | 2,678 | py | user.py | import sqlite3
import hashlib
users = []
class UserModel:
id = 0
def __init__(self, name, password, birth, sex, phone, email, id=0):
if(id == 0):
self.id = self.id + 1
else:
self.id = id
self.name = name
self.email = email
#處理密碼
s = has... |
2dd4aaa44f6775f58928334862b16e0b87a5f44a | 685738098d01ee52b3f48cfa02c7258be026799b | /test.py | 01f07b2e3d1fbc79b5b38d24d2fd9bf339d80015 | [] | no_license | ThR3742/fast_wasserstein_gram | 1fd60f9252edb544a4e64daafad9860af825d91e | fd29e8a198929aa5329cab3ae37f070202eb69ea | refs/heads/master | 2020-12-27T15:15:36.905319 | 2020-05-28T14:51:12 | 2020-05-28T14:51:12 | 237,949,209 | 0 | 0 | null | 2020-02-28T09:02:04 | 2020-02-03T11:25:26 | C++ | UTF-8 | Python | false | false | 1,405 | py | test.py | import fwg
import numpy as np
def test_simple_cases():
embeddings = [
[(2.0, 4.0), (4.0, 8.0)],
[(1.0, 2.0), (8.0, 20.0), (34.0, 90.0)],
[(2.0, 4.0), (4.0, 8.0)]
]
print(embeddings)
distances = fwg.fwd(embeddings, embeddings, 50)
print(np.matrix(distances))
expected ... |
ebccbb2c9a8840ed44f3d88dd80cc13d93b012ed | c3414269f54b4c33ea9b05c18957fee5f2d169f9 | /cofferupApp/models/contributor_coffer.py | 531747853e3ccd5ed28534ccf8599fe89e3da21b | [] | no_license | sophiahoffman/cofferup | 8ee30bd962c7ceee3ccc12e697b26c18f29f9bf3 | 8fc0b4bf2c81ebc965c16531135f0b53708187d3 | refs/heads/master | 2023-04-27T11:18:14.564021 | 2022-01-31T20:47:53 | 2022-01-31T20:47:53 | 246,124,669 | 0 | 0 | null | 2023-04-21T20:53:26 | 2020-03-09T19:32:04 | Python | UTF-8 | Python | false | false | 576 | py | contributor_coffer.py | from django.db import models
from django.db.models import F
from .contributor import Contributor
from .coffer import Coffer
class ContributorCoffer(models.Model):
contributor = models.ForeignKey(Contributor, on_delete=models.CASCADE)
coffer = models.ForeignKey(Coffer, on_delete=models.CASCADE)
is_settled=... |
397b0e1dd7c78555dab197c87d37d875e27553cb | 333d1d49c0b936c942bbbf9484ba77e466307e39 | /main/management/commands/newscommand.py | 51ccfec2ad80ff75648b85c7860509ee3c5918bc | [] | no_license | mragipaltuncu/testnews | 58d056daa061de7826cc568c3da860b3a06147ea | 3eedcc0f2ea0c464d3b460baaca44b7546a94b07 | refs/heads/master | 2021-01-22T05:38:31.212870 | 2015-08-31T23:48:36 | 2015-08-31T23:48:36 | 41,706,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | newscommand.py | from django.core.management.base import BaseCommand
from main.getnews import news
from main.models import ArticleTitle
class Command(BaseCommand):
args = 'asdadfdgwdfdsdsakd'
help = "help me"
def handle(self,*args,**kwargs):
list_news = news()
for item in list_news:
article = ... |
ebe8645064b2d7c5758b4dfb365d1bd596bc36e3 | b210d58b724c7199f43ddde031eba40996c82257 | /submissions/sm_026_rohit-kumar/week_13/day_4/session_1/check_superset.py | afaac36fa8025574065f775677370a28f6e96348 | [] | no_license | Tanmay53/cohort_3 | 0447efd2dc8b3c1284b03da7326b35393fdf5f93 | 351fb6e1d0c29995fb5cb3b6af411dbcf0ced64c | refs/heads/master | 2021-05-23T17:55:36.508185 | 2020-04-05T12:58:07 | 2020-04-05T12:58:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | check_superset.py | set1 = [1,2,3,4,6,7,8,9]
set2 = [3,4,5,6]
isSuerset = True
for i in set2:
if i not in set1:
isSuerset = False
print(isSuerset)
|
37fd4b034cfab05f4cb1e4718e648542e468c66f | d748b5742720630207647031ca5a95c7fcf09caa | /zyyang/evaluate/code/dataset/DataSet.py | 5e7fcad56dacbafa1f9a8de35331bb3d1d5eb3e2 | [] | no_license | fanyin/cis526-projects | a51eb06f9df896262a8b8b15f454a02e5832346f | 1afc4fc417b6d068c37c28f2441979961af1a895 | refs/heads/master | 2020-12-31T06:10:41.769432 | 2014-05-07T08:21:02 | 2014-05-07T08:21:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,185 | py | DataSet.py | import sys
import os
from itertools import izip
from Sentence import *
from Tree import *
from Correction import *
from DependencyGraph import *
class DataSetIterator:
"""Iterates over a data set, returning Sentence objects until there are no more."""
def __init__(self, dataset):
self.index = 0
... |
b52afec170b1487dcc64c5a99816e8b3384f8c58 | 4750abce1b3a8434c5feefc1e5032dda23b2ef92 | /individ3.py | dcf61a624a847afbf5497ca6860dbb388ed585be | [
"MIT"
] | permissive | ZyryanovAV/lb5 | 9cf46bb8df47706b13523489029488192b4294ef | 401d1f186a1d6f097711d7962d21adf821dece32 | refs/heads/main | 2023-01-10T23:48:53.906832 | 2020-11-09T13:45:53 | 2020-11-09T13:45:53 | 310,428,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py | individ3.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == '__main__':
word = input("Введите слово: ")
newWord = word[len(word) - 1] + word[:-1]
print(newWord)
|
004cbddf69f7895eefa7399115cea08ed6e8e6e5 | 4a22729851a476f2559c204e7deacf51a0ca3bcf | /reddit/migrations/0004_auto_20210304_1828.py | 29369a1ebcb91d60f70701c4cb3a8077e4636534 | [
"MIT"
] | permissive | DipeshYogi/MyTodoList_backend | 0e5e8977f2a8e5e7d5baaa0dbb202193ff97eeb6 | 0b4103e791857b7e95981bd8c3d580b28b80e9eb | refs/heads/main | 2023-05-09T06:38:42.720916 | 2021-05-27T16:09:21 | 2021-05-27T16:09:21 | 337,664,493 | 0 | 0 | MIT | 2021-03-22T19:07:54 | 2021-02-10T08:43:24 | Python | UTF-8 | Python | false | false | 1,398 | py | 0004_auto_20210304_1828.py | # Generated by Django 3.1.6 on 2021-03-04 12:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('reddit', '0003_tags'),
... |
af318409e1a0866d7263dceb5e5cd47034d6c407 | 8c5145862894377a3dabe4ea3e68c910f2f8be9e | /inscriptions/migrations/0001_initial.py | 038ccaf289b0f6b0141dbc23e0489d922074a808 | [] | no_license | farfanoide/dssd | 5fbcdd398dcd46fdc035e794792706b7e8bb27e4 | 96dff9422f351f7800c77e6d8c9ecf32bfef1787 | refs/heads/master | 2021-01-17T17:51:16.723727 | 2016-11-18T18:55:56 | 2016-11-18T18:55:56 | 70,639,839 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,826 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-27 22:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... |
b565e086fb7a5da0cf64ba55d83f0e9e1e1467d8 | e52ca5e3806755857f4c4412f2d47cfadfd10e46 | /Star's Python Workspace/deploy/yeats_master.py | 5f3d71f08eed6fe2a89b6a5d24a9e4e12e8f9d0c | [] | no_license | clmorgan111/Final-Year-Project | 0b96593d605bc1e3fd69e02e006cae271eed0f6b | dfdfb5755ef1da29c816c412e3f0d8a7a49f8b5d | refs/heads/master | 2020-04-15T13:03:07.732902 | 2018-07-20T12:06:25 | 2018-07-20T12:06:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 64 | py | yeats_master.py | from CodexMRS.core.Master import Master
Master().start_master() |
5c6aa5d704511cb5f31c7579f07656834f75e81e | e606cf2b9ef9bd5560767c79c99070219d67fe6f | /geo/provider.py | 7835b22a1390078b9fea4dc7fc0401f86b8a4cd5 | [] | no_license | LuoZihYuan/RealEstateTW | d2033bad82f589e742c16e40c4e59f846b541de9 | 99a5e92447e6fc18ce7927f8d433ea14219c4516 | refs/heads/master | 2021-01-18T06:09:30.296351 | 2017-12-06T08:56:14 | 2017-12-06T08:56:14 | 84,282,899 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,814 | py | provider.py | """
This module does basic setup for all Geo Providers.
Abstractmethod ensures subclass provides functionalities such as geocode, reverse_geocode, etc.
"""
__all__ = ["Provider", "ProviderOutOfAPIKeys", "ProviderServerError",\
"AddressError", "CultureError"]
# Python Standard Library
import os
impo... |
af85c7601f24e70529e415fb5aa786f6284e2bf1 | 53e0d1bbf9ef8611b9ed6d5c1b9e8f2a7bd52598 | /hello.py | 1f00cbdfb8de2f2f383304267f15317efdb82a1f | [] | no_license | santoshrvarma/easyweb | e5fd1692dd5baa2c6dce48a48fc4f792faa89ee1 | 9ff197185d153bce5c784c7212e2ba4c12277f0b | refs/heads/master | 2020-05-29T08:53:25.232274 | 2019-02-16T10:31:48 | 2019-02-16T10:31:48 | 69,006,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,174 | py | hello.py | from flask import Flask, redirect, url_for, render_template, request, session
import os
import psycopg2
from os.path import exists
from os import makedirs
from config import config
import numpy as np
from flask import Flask, session
from flask_session import Session
SESSION_TYPE = 'memcache'
app = Flask(__name__)
... |
9f408c02c130bf0381dcb3ca93cfe0381f55022c | 1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5 | /codingBat/python/array2/sum67.py | 7bda8a9ffbe22ceaf77ff0025ff0e2adba40144b | [
"MIT"
] | permissive | sagarnikam123/learnNPractice | f0da3f8acf653e56c591353ab342765a6831698c | 1b3b0cb2cff2f478006626a4c37a99102acbb628 | refs/heads/master | 2023-02-04T11:21:18.211654 | 2023-01-24T14:47:52 | 2023-01-24T14:47:52 | 61,184,927 | 2 | 1 | MIT | 2022-03-06T11:07:18 | 2016-06-15T06:57:19 | Python | UTF-8 | Python | false | false | 1,087 | py | sum67.py | #######################################################################################################################
#
# sum67
#
# Return the sum of the numbers in the array, except ignore sections of numbers starting with a 6
# and extending to the next 7 (every 6 will be followed by at least one 7). Retur... |
3f1322374305cd168bf9eff2c4eca2f858a670b6 | 7952f66758b685f4bf045c7eb28efa3a22412a89 | /백준/2309.py | d1145aa694f6057d7bf7cc3b2fe275fe54f1994e | [] | no_license | PingPingE/Algorithm | b418fa13528c27840bb220e305933800c5b4c00a | 89a55309c44320f01d2d6fe5480181a4c5816fd2 | refs/heads/master | 2023-08-31T01:43:09.690729 | 2023-08-27T13:12:22 | 2023-08-27T13:12:22 | 172,465,200 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,841 | py | 2309.py | #브루트포스
'''
왕비를 피해 일곱 난쟁이들과 함께 평화롭게 생활하고 있던 백설공주에게 위기가 찾아왔다.
일과를 마치고 돌아온 난쟁이가 일곱 명이 아닌 아홉 명이었던 것이다.
아홉 명의 난쟁이는 모두 자신이 "백설 공주와 일곱 난쟁이"의 주인공이라고 주장했다.
뛰어난 수학적 직관력을 가지고 있던 백설공주는, 다행스럽게도 일곱 난쟁이의 키의 합이 100이 됨을 기억해 냈다.
아홉 난쟁이의 키가 주어졌을 때, 백설공주를 도와 일곱 난쟁이를 찾는 프로그램을 작성하시오.
입력:
아홉 개의 줄에 걸쳐 난쟁이들의 키가 주어진다. 주어지는 키는 100을... |
bfccacdc910827d3d9bed5da1b85af56dd0e9ef2 | e11b0d20f402e4a8745194fb927b8ee52f74b7c1 | /migrations/migration_0002.py | 6436eef83c7dcbea9bc207e779d80ec645f51c30 | [] | no_license | glogiotatidis/veresebot | 92432207f4da97cec637c999d316bc9c5f1fd640 | 8e1d582e32a0935368d3e03606cf9a6a77bbbe71 | refs/heads/master | 2023-01-13T04:13:44.345698 | 2023-01-08T20:10:33 | 2023-01-08T20:10:33 | 39,766,160 | 3 | 4 | null | 2022-09-12T06:29:23 | 2015-07-27T09:29:45 | Python | UTF-8 | Python | false | false | 311 | py | migration_0002.py | import BTrees.OOBTree
from . import MigrationBase
class Migration(MigrationBase):
DB_VERSION = 2
def forward(self):
self.root.last_update = 0
self.root.tabs = BTrees.OOBTree.BTree()
self.root.users = BTrees.OOBTree.BTree()
self.root.stats = {'number_of_messages': 0}
|
5747c5943c81b887b11060d21c88ef5b1b1e88b3 | d642657fbd6856d51f92a2a4fbee79dba0d00a96 | /rh_server.py | aacf158e49b872d7d5d8f8a5742fb9b817d29acc | [] | no_license | larojas/rh | 19daf708917da5096cb9c7d2f61f75f8ec1aa67d | ec557784b30f67245ce602d2bbf77f882806b92a | refs/heads/master | 2020-06-02T06:45:58.790087 | 2015-02-05T18:23:24 | 2015-02-05T18:23:24 | 15,273,037 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,068 | py | rh_server.py | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
# Copyright 2013 Alberto Rojas (rojas.alberto@gmail.com)
# All rights reserved.
import web
import rh_pb2 as rh
import rh_config_pb2 as rh_config
from log import InitLog, Log
from relays import Relays
from config_manager import ReadConfig
# Constants
OK = rh.OpResul... |
9cb9e275533b61b488b4f76a6ed455b85137fb01 | 51348f550cf809652ec0c50908da57d004296686 | /performance/rerank/kenlm_scorer.py | 946dc8949c6406930e0b97e14976db16b1565357 | [] | no_license | lkfo415579/GOD.util | 99b533e9190e9d317f0984f69ada634a6fe6088f | 87e84806530a8ee94dd4ebd134ff891337b61a36 | refs/heads/master | 2021-06-05T01:21:00.925594 | 2020-04-29T07:46:58 | 2020-04-29T07:46:58 | 116,927,744 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,361 | py | kenlm_scorer.py | # -*- coding: utf-8 -*-
import codecs
import kenlm
import pkuseg
import sys
# sys.stdin = codecs.getreader('UTF-8')(sys.stdin)
# sys.stdout = codecs.getwriter('UTF-8')(sys.stdout)
# usage python .py model threahold
pkuseg = pkuseg.pkuseg(model_name='news')
model = kenlm.Model(sys.argv[1])
pre_id = 0
for line in sys.std... |
5a57044d0801fcf46bbee442bfe82c406d3bb5d5 | 6a531e292af43d3e7aec6d3019e0333362afe454 | /src/cactus/shared/common.py | 74c8b577c2fabd95ff372cdc531f78539dbfb692 | [
"MIT"
] | permissive | ComparativeGenomicsToolkit/cactus | 2d4d891b6b3af0a22b64aba11f18a867a7666e58 | 41d99360cfa79ada5bdca307883c30c7fb59a06d | refs/heads/master | 2023-09-01T20:38:37.550816 | 2023-09-01T14:47:06 | 2023-09-01T14:47:06 | 1,317,650 | 369 | 106 | NOASSERTION | 2023-09-05T20:27:44 | 2011-02-01T20:17:33 | C | UTF-8 | Python | false | false | 49,382 | py | common.py | #!/usr/bin/env python3
#Copyright (C) 2009-2011 by Benedict Paten (benedictpaten@gmail.com)
#
#Released under the MIT license, see LICENSE.txt
"""Wrapper functions for assisting in running the various programs of the cactus package.
"""
import os
import sys
import shutil
import subprocess
import logging
import pathlib... |
e8f516156d7482eed4cfa363eb5bb27650804c9a | 67240a7ccbb13f317bd2d0981680596daafadbb1 | /download.py | 6d8cc76fe87fb3d75ab39aad89ad1c3de8f3e15c | [] | no_license | allangit/reportingAnalys | 6cf9c5653e892f84b8b1ce9ad494fcf81550573e | 2f276c531a347776c3512f60cc8ac5e9fa8f062c | refs/heads/master | 2020-08-03T21:37:00.269382 | 2019-09-30T19:17:54 | 2019-09-30T19:17:54 | 211,893,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | download.py | import os
def get_screen():
urls=open("/home/alan/Desktop/reportingAnalysts/", 'r')
ursl.read()
urls.close()
os.system("https://www.youtube.com/watch?v=OGxgnH8y2NM&list=PLQVvvaa0QuDfKTOs3Keq_kaG2P55YRn5v")
get_screen()
|
ab92a479a34f1a6f4059e85da19f23effd30ab0d | bd1eb3aeb91a6f5587716328cacc58d304ae73d8 | /main.py | 826cb968c8ed0273db4816c567ae835173f30d7a | [] | no_license | Mufolk/python-session | bc1c4c6c76d68ebc2cb2c6e7ad37511276db5d2e | 231d52a0402c261f3c04457f1272f5b697f8f252 | refs/heads/master | 2022-10-28T01:10:00.192167 | 2020-06-17T17:05:22 | 2020-06-17T17:05:22 | 273,031,999 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,246 | py | main.py | from bs4 import BeautifulSoup
import requests
import pandas as pd
page = requests.get("https://forecast.weather.gov/MapClick.php?lat=37.7772&lon=-122.4168#.Xuae0WpKiRs")
soup = BeautifulSoup(page.content, 'html.parser')
seven_day = soup.find(id="seven-day-forecast")
# print(seven_day)
forecast_items = seven_day.find_a... |
e656dc92817a95633b631d198443f4648b1ee210 | 98d0769cb8593f880cc4f959910f05dfe1275dec | /Chapter1/Scripts/saturn.py | 8d67136ce41241d75431b43f89bad912965bf866 | [] | no_license | rvilim/thesis | ea5ff849098fc8c12eb6420595d35779c39a2aa3 | 0930eff79d19fd2986d10e858986ec41accd0fcc | refs/heads/master | 2021-01-06T20:38:18.502744 | 2015-10-16T00:12:50 | 2015-10-16T00:12:50 | 37,783,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 156 | py | saturn.py | gcoeff={}
#Hao 2011
gcoeff[("Saturn","a")]=60268.0
gcoeff[("Saturn","g",1,0)]=21191.0
gcoeff[("Saturn","g",2,0)]=1586.0
gcoeff[("Saturn","g",3,0)]=2374.0
|
3467a90c6a29d43570b99a8d376ca3447aad18f0 | ef5e7d7c2a03f6a2eb3aa5db5e01185856175824 | /myplots/templatetags/myplots_tags.py | da837f23b2848955d8bff890bcde3c810a2aec00 | [] | no_license | KSNikolaus/TOM-Development | b6fa15bc5f53910d5333c2e37150eaf3e09c9cc4 | 0df7eb6ad3a8acdfce8813dba674e75ef0018dee | refs/heads/master | 2020-05-20T16:37:16.694747 | 2019-06-04T17:27:01 | 2019-06-04T17:27:01 | 185,666,641 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | myplots_tags.py | from plotly import offline
import plotly.graph_objs as go
from django import template
from tom_targets.models import Target
register = template.Library()
@register.inclusion_tag('myplots/targets_reduceddata.html')
def targets_reduceddata(targets=Target.objects.all()):
# order targets by creation date
targets = ... |
e9fc94c7aba709c203fd7661f9eb0bad4fc53dbd | d3f06f4c4bfbf7040deff86ac7efb00af5f1a261 | /get.py | 56d9d18120f16caee7354869fa062f90e8d55948 | [] | no_license | fanyer/avmoo | d3f0b6036fc7aca02e90a901606e04b8b75d536d | 252e73be97f5de05c0bbc68ad398f7169b7077da | refs/heads/master | 2020-12-10T03:15:02.058560 | 2017-07-08T03:55:38 | 2017-07-08T03:55:38 | 95,458,097 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,284 | py | get.py | #!/usr/bin/env python3
import os
import urllib
import requests
headers={
'cookie':'__cfduid=dd90cc65e3067b4f78e64cf538544e4a01496836096',
'user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
}
for y in range(29,31):
if y<... |
2d42e658497e10294ded8ea90d911eb546a540d6 | 6b97237bfd9647f7a90c1d1c33b4453c07e56839 | /tests/test_dotenv.py | d2dd6ef6d472fc39863606732cd1ecaa7d54a56d | [
"MIT"
] | permissive | 48ix/routingpolicy | 4e9803659daf84478e3bf41db90a8df642fb50e8 | fd3e9547a5c54bd78ee2144786f6b30fdf41d7ef | refs/heads/master | 2023-01-30T03:20:37.440933 | 2020-12-16T17:19:39 | 2020-12-16T17:19:39 | 295,359,872 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | test_dotenv.py | """Test DotEnv Loading."""
# Standard Library
import os
import json
# Project
from routingpolicy.dotenv import load_env
if __name__ == "__main__":
load_env()
print(json.dumps(dict(os.environ), indent=2))
|
5e9be01ddaaab05452fff0bc6c85497ed96886e2 | 0615f905fe68d3ad3e0be317fc3393a9590d6c8d | /03_svm/simple_svm.py | 72b736d86c45cc658c04d96e31f0d2a29d01f11b | [] | no_license | wssunn/classic_ml | 000234a2aac7a7d0d33b8d3609d0fe854acf7c19 | 6d605960631e395aef01c39d44a66dc8c1fc9abd | refs/heads/master | 2023-03-05T08:48:26.149438 | 2021-02-19T08:35:12 | 2021-02-19T08:35:12 | 266,798,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,469 | py | simple_svm.py | import numpy as np
if __name__ == "__main__":
X = np.array([[-3, 1], [-2, 1], [-1, 1], [1, 1], [2, -1], [3, -1]])
y = np.array([-1, -1, -1, 1, 1, 1])
svm_model = SVM(X, y)
svm_model.train()
w, b = svm_model.model()
print('w=', w, 'b= ', b)
class SVM:
def __init__(self, x_data, y_data, eps... |
04b296ba47c1303a5ca262048d3bdd9bff40b26f | 268c6ea0b1e0a34547de6958fbc7af78cf6efeaf | /webmakeup.py | 83403a95031eb42d5a2e5d35cb82419bf4762a62 | [] | no_license | rpeng/makeup-hackathon | e3afc3e6f70eb3ce78399f0c028b23779f5627e1 | 1526097479ea9d4b168ba53adb3c04a5a0c7ae52 | refs/heads/master | 2021-01-18T14:22:22.780577 | 2014-05-20T04:17:03 | 2014-05-20T04:17:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | webmakeup.py | from urllib2 import urlopen
def get_image_from_url(url):
return urlopen(url).read()
|
266ada1ac2453283ca0502efae82fd3392fed4fb | cce3a36f4bbf6fad0763e97b116c3c7e65b0ce5f | /tests/test_complex_prep.py | 1dbe69c61bdff07f4fb644dc39fb69a4d4e4be68 | [] | no_license | ppxasjsm/openmm_orion | 3dfbed789258e1c66eb8ced065c658f9b018f168 | 85c22ab3bde264144a3c69604cb0febf1f3059e9 | refs/heads/master | 2023-06-02T15:12:10.996059 | 2020-12-14T17:03:57 | 2020-12-14T17:03:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,328 | py | test_complex_prep.py | # (C) 2019 OpenEye Scientific Software Inc. All rights reserved.
#
# TERMS FOR USE OF SAMPLE CODE The software below ("Sample Code") is
# provided to current licensees or subscribers of OpenEye products or
# SaaS offerings (each a "Customer").
# Customer is hereby permitted to use, copy, and modify the Sample Code,
# s... |
fa72326ad24c4f9b1351da615d88f2b8617162f4 | ca5f0e34e53533f2a571f265e58050368513738d | /tests/acceptance/test_infra.py | e1051792ff6ee0474237287427f138de18641d03 | [
"Apache-2.0"
] | permissive | opentelekomcloud-infra/customer-service-monitoring | 788ca5abb89b5d16511cfd0f97b40dbbfa74488b | b443d9f3f902fe9bc20589552a894d2a127c5367 | refs/heads/devel | 2023-02-19T21:35:10.268169 | 2021-06-02T07:36:22 | 2021-06-02T07:36:22 | 198,650,995 | 3 | 1 | Apache-2.0 | 2023-02-08T00:45:52 | 2019-07-24T14:24:01 | HCL | UTF-8 | Python | false | false | 5,497 | py | test_infra.py | #!/usr/bin/env python
import os
import random
import re
import string
import subprocess
import unittest
from concurrent.futures import ThreadPoolExecutor, wait
from ansible_runner import run as run_playbook
from roles.build_infrastructure.files.get_key import Credential, acquire_temporary_ak_sk
from tests.utils impor... |
9919a087d17c2367efafc4644fda261b128566bc | 1015c9b12939a452101bb31ce26b441105acf2c5 | /Section.py | 56cf064e31443543e486a6ed3ef57a3cb6dac797 | [] | no_license | kdmarrett/chordGlove | 04920044f9fb508915c6094484da5e149835e124 | 551b7a228c58faecba001e92488c0ca07c8660d1 | refs/heads/master | 2021-01-14T09:53:56.086804 | 2015-09-11T04:54:58 | 2015-09-11T04:54:58 | 25,137,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,590 | py | Section.py | # from ValidInput import ValidInput
import ValidInput
from HardwareInterface import HardwareInterface
class Section:
global subject
global sectionBackground
global letters
global DictFilesPath
global HardwareInterface
global FINGERS
def __init__(self):
self.pastChord = 0
se... |
7bf4076aa19cfd5b703c0f04c17a5a7750b602a3 | f0699f465f90aac5977ca9be6f28e1c8cf2f45e3 | /setup.py | a20abac1ffb1dd25674fc0739792b06f0f59fd9a | [
"MIT"
] | permissive | linnify/drf-related-object-field | 1c1f345e31b8466da811b1840175cc9c47d8e82d | 96950040d83afffcfeffc1c52681eabf4ddfb2a9 | refs/heads/master | 2022-12-26T02:16:15.576639 | 2020-10-07T19:05:54 | 2020-10-07T19:05:54 | 302,018,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,071 | py | setup.py | from setuptools import setup
readme = open('README.rst').read()
setup(name='drf-related-object-field',
version='0.0.1',
description='Customizable primary key related field which allows for id integer input and serializer based rendering.',
author='Linnify',
author_email='vlad.rusu@linnify.com... |
3128a921d9b7cdb0b9c17ebaced408af53993e1e | 9bbb086c88201a6b7e46aa1240afd6fa1116120c | /EdgeDetectorMetNum.py | 03fad5cb4f7fc14e240a28356f6329120448ed03 | [] | no_license | QueeneDelmarva/Edge-Detector- | a8d3fbc2ceb137bb1320a8f190c0a42d65c1e26e | 7511612faec87ccebf375eec4764fad2a94a417c | refs/heads/main | 2023-03-06T01:17:24.224184 | 2021-02-25T03:44:10 | 2021-02-25T03:44:10 | 342,111,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | EdgeDetectorMetNum.py | #!/usr/bin/env python
# coding: utf-8
# In[3]:
# Edge Detector with matplotlib, numpy, and opencv
import cv2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Importing the image data into Numpy Arrays
moon_image = mpimg.imread('/Users/queene/Desktop/moon.jpg')
print(moon_im... |