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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
04e4057d234d61b1e5601b17f88bf737846e61f2 | 7ae0d45f51de06142872b50b0de2b04590ddba7b | /android/test_Activity.py | 4309b59a696ba3284cb8dc6ea6447573e7c9fdcb | [] | no_license | xj52hp/auto_bot | ac9ca0cfe050e8ab819231bdea1c005ae68f564d | 103f8c686976f27ed11ca22909d5136bfe22c044 | refs/heads/master | 2021-01-19T10:12:36.938498 | 2017-02-16T10:18:57 | 2017-02-16T10:18:57 | 82,167,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,337 | py | test_Activity.py | #-*- coding: UTF-8 -*-
import os
import unittest
import sys,time
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from appium.webdriver.common.multi_action import MultiAction
from time import sleep
PATH=lambda p:os.path.abspath(
os.path.join(os.path.dirname(__file__),p)
)
c... |
73411042ac79fa4c104e4536c8762418a846e580 | 3a9f2b3d79cf214704829427ee280f4b49dca70a | /saigon/rat/RuckusAutoTest/components/Messages.py | e5db2166fbca285c51c573fbf788f7db7e2b2c47 | [] | no_license | jichunwei/MyGitHub-1 | ae0c1461fe0a337ef459da7c0d24d4cf8d4a4791 | f826fc89a030c6c4e08052d2d43af0b1b4b410e3 | refs/heads/master | 2021-01-21T10:19:22.900905 | 2016-08-20T03:34:52 | 2016-08-20T03:34:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,320 | py | Messages.py | '''
*** The Messages.py is the implementation of ConfigObj, is a powerful and
flexible configuration file parser suitable for any configuration needs. ***
Why we use ConfigObj instead of Python standard library ConfigParser?
The biggest advantage of ConfigObj is simplicity. Even for trivial configuration
files, where... |
4dac660e7954cac50b00d0ecac6a3b92289cc5b5 | fc14fcdbf30e355d141dee196a6ca1d76f1a4de7 | /listLoop2.py | 5e0e5af355a03796ceea0be076996681372cc907 | [] | no_license | a-mansakahn/Python-4-Everybody | 8b79a9002d8330f6220fa644b266f23a5cb3ab68 | 5f965c001c1120dbb1f08b9b92c1874e4000a5c5 | refs/heads/master | 2020-07-09T20:54:01.494247 | 2019-08-23T23:10:10 | 2019-08-23T23:10:10 | 204,081,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | listLoop2.py | min = None
max = None
while True :
line = input('> ')
if line == 'done':
break
else:
number = int(line)
if max == None or max < number:
max = number
if min == None or min > number:
min = number
print('Maximum', max, 'Minimum', min)
... |
1a90d90b2a8c8eb14d018eb6cfbebc2bf04c50e6 | 37acfa725631c97c2a334dacfa65df05d71cdf12 | /data_type.py | b2dd4c022efc544cc2ee0b457229c87582a35678 | [] | no_license | harryggg/consolidation | 5fa43d906558a89dd9e0bf547788e5f17f80b2c0 | d01443ed6f9b0e0653426f32bed4ca1d0de7c556 | refs/heads/master | 2021-01-11T11:00:16.370795 | 2013-05-09T07:17:30 | 2013-05-09T07:17:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,646 | py | data_type.py | class Tree:
def __init__(self,value):
self.__value = value
self.__left = None
self.__right = None
def getValue(self):
return self.__value
def add(self,value):
if value < self.getValue():
if self.__left:
self.__left.add(value)
... |
1802c84e26d1505c57787ca8bdad24ea17ad6772 | 385734d3cea02415df29eca90d1f01d6fb7a3ea7 | /app/static/strings.py | 9f38e3fbd3fcdc050c0cd8ddac5b0a36df6ac4de | [] | no_license | sssemion/ege-result-notifier | 15a0ee9bd3328e501e356ea477169b36584b2cb6 | d1ac118b3e012773f35ac42c02ff7bf9a8af368e | refs/heads/master | 2023-06-04T18:38:21.716171 | 2021-06-25T11:00:20 | 2021-06-25T11:00:20 | 377,937,212 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,866 | py | strings.py | from enum import Enum
class Status(Enum):
NOT_FOUND = 0
NAME = 1
DOCUMENT = 2
REGION = 3
CAPTCHA = 4
AUTHORIZED = 5
AUTHORIZATION_ERROR = 6
welcome = "Привет! \U0001F44B Пройдите регистрацию как на сайте [checkege](http://checkege.rustest.ru) " \
"и узнавайте о новых результато... |
273528da64153751a6c26aa3dd157313c71ab3b2 | 1dc1675389fff5709de570b1848b3e5b59fb2750 | /tests/test_logger.py | f1adf78f34e568d7544e7295f2f101e64983852a | [] | no_license | J-Fraser-92/mirror | d0c1f63437778772bc67a4d3611c91dac5f528e3 | eab015659c626a2dd6bf0fe35957fcba841a3dad | refs/heads/master | 2020-05-23T08:17:45.265292 | 2016-10-07T12:24:52 | 2016-10-07T12:24:52 | 70,244,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,030 | py | test_logger.py | import unittest
from app.skygrid_on_demand import SkygridOnDemand
from moto import mock_ec2
class TestSkygridOnDemand(unittest.TestCase):
@mock_ec2
def test_logger_operates_correctly(self):
skygrid_service = SkygridOnDemand(testing_mode=True)
skygrid_service.logger.info("testing info")
... |
c5ea4ac4fd6a5b8824fab9d894e8799c4afbf0a7 | 29a9a273e8cf8b1f9279ecdba8edf9527f83deac | /chariots_core/models/core/account_batch_payment.py | 736d8d7d339a2b30e76e2564c7a7ab19f5967686 | [] | no_license | izzihector/odoo-core | ee3d9976f0d7119a1f3d0d6dfc8ba438f325faa5 | 3dc710bc2e41b42a70e3b417f752e9e1642d6b8d | refs/heads/master | 2023-01-24T07:18:55.991767 | 2020-12-07T15:48:46 | 2020-12-07T15:48:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,594 | py | account_batch_payment.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import logging
import time
import random
import os
from lxml import etree
from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_repr, f... |
9226ac9002f0b897bbef3b8c16daf2904e4b94e8 | 1f4325776b6d1b071cc47e3e0e0599c15859935d | /Graph-Search/WordLadder/GreedyBFS.py | 041559527138da8f560034212a7be4fdfaf74b3b | [] | no_license | SSYoung/AI | 1ef28b1add60dbd0a3db495804943a5acae3f826 | 428c5b389ef0e6ed836c53f2d6e4ca2e2fe95495 | refs/heads/master | 2020-07-09T04:43:20.803878 | 2016-09-09T23:37:20 | 2016-09-09T23:37:20 | 67,839,045 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,796 | py | GreedyBFS.py | #-------------------------------------------------------------------------------#
# Author: Stefan Young
#-------------------------------------------------------------------------------
def loadFile(fileName):
file = open(fileName, 'rb')
import pickle
loadedDictionary = pickle.load(file)
ass... |
be56cd3e449812fa2dec49ff7c93f3e2a1792aba | 13c18f98dcefc4f0c797c2dfbe5de5ffc2e38901 | /kingAdmin/urls.py | ef308e930b3e708db1750574e6919dcd70db3c0b | [] | no_license | jcrkit/temperatureGet | 2d4f263056eb7d7e2e56b4fb84475c470dedeab6 | 6296d30bc21f416698d586a5d1b6201cebae7707 | refs/heads/master | 2021-01-07T20:11:17.476916 | 2020-02-20T06:55:42 | 2020-02-20T06:55:42 | 241,808,719 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | urls.py | from django.urls import path, re_path
from kingAdmin import views
urlpatterns = [
path('', views.king_table, name='king_table'),
re_path('^(\w+)/(\w+)/$', views.king_index, name='king_index'),
re_path('^(\w+)/(\w+)/(\d+)/change/$', views.king_change, name='king_change'),
re_path('^(\w+)/(\w+)/(\... |
cc7e80c030f97cb0e6e29bd04dbbe26f1ea15275 | 499a844ed73e185fbed8fbc07957b5a157c07ffe | /breezeblocks/sql/values.py | e09e6c5836965c12c9c1060233d58e3141180184 | [
"MIT"
] | permissive | Python3pkg/BreezeBlocks | 8bab2934049e4e88fa93cf561a908353f64f397a | 2a8aed3cf8ce7939c5e0ea20d096ac97ead99eaf | refs/heads/master | 2021-01-21T09:30:01.166147 | 2017-05-18T06:17:49 | 2017-05-18T06:17:49 | 91,656,157 | 0 | 0 | null | 2017-05-18T06:17:47 | 2017-05-18T06:17:47 | null | UTF-8 | Python | false | false | 959 | py | values.py | """Defines some availble types of value expressions for DBAPI queries."""
from .expressions import ConstantExpr
class FormatStyleValue(ConstantExpr):
"""A format-style constant value expression.
Placeholders in queries will appear as '%s'.
"""
def _get_ref_field(self):
return '%s'
... |
c23ee50f2363d7d0a8580d2593aef2e5bba205fe | 17be25e4530a32b70048ff9f282c4b14d36c8bfd | /generate_test_result.py | 8f085137ab341b68999d029913be23279bba25f3 | [] | no_license | grant81/ManhattenLSTM-LearningSentenceSimilarity | 8908ec862e0d23f8e4fd7e0b259b5f3026570e83 | d53998bb04e1777496c01e9f1ed9f1207c781161 | refs/heads/master | 2020-09-24T09:51:09.636281 | 2019-12-23T19:24:05 | 2019-12-23T19:24:05 | 225,733,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,547 | py | generate_test_result.py | import torch
from hyperparameters import *
from ManhattanLSTMModel import Manhattan_LSTM
from dataset import QuoraDataset
import torch.nn.utils.rnn as rnn
import pandas as pd
def my_collate(batch):
data = [item[0] for item in batch]
result = torch.stack([item[1] for item in batch])
return [data, result]
... |
01993ea681f58346f3ff14c2a7929044f91311ec | 22a8d887247f5620221f17906f26eba529aac4bb | /ASS/Stock.py | 802a8e430f24079a6e67f130a349b50180938323 | [] | no_license | mubaskid/new | 2255c01a189068661c47bb4ce77e7d505d1ce23b | 56996963b5ed069907848adc66bfdd27cc24539e | refs/heads/master | 2023-06-09T09:46:43.744027 | 2021-04-21T13:47:06 | 2021-04-21T13:47:06 | 356,242,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | Stock.py | class Stock:
def __init__(self, Name, Type, ManDate, ExpiryDate):
self.Name = Name
self.Type = Type
self.ManDate = ManDate
self.ExpiryDate = ExpiryDate
|
384bcb846d7d2f56dfef3b12ba8c1a4fd20c5f1e | a51a28348275a0f73054afaf5b2711300a8a355a | /code/05.03.py | 8f25a7d19b337a2c55084eed09cccfc960c20911 | [] | no_license | kiyoxi2020/leetcode | 98f8ef8044742179a925a9d0ecfac295ae804c60 | ad1eabfa27dda65b743d7d93524f1ec8f1e0ebfc | refs/heads/main | 2023-07-08T21:19:55.577592 | 2021-08-23T05:33:42 | 2021-08-23T05:33:42 | 382,379,981 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,608 | py | 05.03.py | '''
面试题 05.03. 翻转数位
给定一个32位整数 num,你可以将一个数位从0变为1。请编写一个程序,找出你能够获得的最长的一串1的长度。
'''
class Solution(object):
def reverseBits(self, num):
"""
:type num: int
:rtype: int
"""
def convert(x):
sign=0
if x<0: sign=1
out = []
... |
58947c00f837bcb41dbdf5ab9e0d3ce31dcd6592 | d06a84782bd3a022de11fcc9dd634b514257a3d3 | /066 - Diophantine.py | 9d04f179bdce45da5a3955ba44469d23b1ad8735 | [] | no_license | jsundram/euler | 0c301ad09fd95173ea9751f8e108f302e347b3b8 | 907e636f6d6e34dad5a228087baae4c8d0b09f30 | refs/heads/master | 2016-09-06T12:03:44.012502 | 2013-02-01T06:22:03 | 2013-02-01T06:22:03 | 1,256,230 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,694 | py | 066 - Diophantine.py | #!/usr/bin/env python
# encoding: utf-8
"""
066 - Diophantine.py
Created by Jason Sundram on 2010-01-13.
Copyright (c) 2010. All rights reserved.
Problem 66
26 March 2004
Consider quadratic Diophantine equations of the form:
x**2 – D * y**2 = 1
For example, when D=13, the minimal solution in x is 649^(2) – 13×18... |
d34bd6a61f0e4c7492caac37f3429190591f7c75 | e5805c1fa9dc6020f533c35458f98a51a3b339d5 | /RequestsTest/RequestsTest/http_auth.py | 8e273e906b03f948fad50f892d2b0016ca4aa6ad | [] | no_license | Air-Zhuang/Test27 | fe9b72bd5cd186aa0326d6837f0bea79ad181af1 | a44559e84f9602a8b2643b7cd925e1d24c11b9b3 | refs/heads/master | 2020-03-28T03:18:30.395004 | 2018-09-06T07:40:56 | 2018-09-06T07:40:56 | 147,636,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,111 | py | http_auth.py | # _*_ coding: utf-8 _*_
# __author__ = 'Air Zhuang'
# __date__ = '2018/6/5 19:37'
import requests
BASE_URL='https://api.github.com'
def construct_url(end_point):
return '/'.join([BASE_URL,end_point])
def basic_auth():
response=requests.get(construct_url('user'),auth=('imoocdemo','imoocdemo123'))
print res... |
00b505f70aa6adf091a3adcef56cb82ecefc2a47 | e57735920ed1deab3ba5f2bb98d1518ef4bc05dc | /3_ML/src/validation_ANN/FFN_val.py | 36915edd3ccf8f7ef4c3f234201ab6eb4065cea0 | [
"Apache-2.0"
] | permissive | IBPA/MutationDB | 12b168b00d42f5ff73682b8e2a354218aba529a8 | eb1648e511cf6cc4a9e2cc72abafae4a8b20ac30 | refs/heads/master | 2021-06-01T22:27:17.681872 | 2020-10-12T16:47:28 | 2020-10-12T16:47:28 | 107,740,638 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,490 | py | FFN_val.py | import pandas as pd
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout,BatchNormalization
from keras.optimizers import RMSprop,Adagrad,Adam
from keras.regularizers import l2,l1
from sklearn.model_selection import LeaveOneOut
from sklearn.metrics import roc_curv... |
f2337cb3556556bbc397d700f6fe40bf11ae6444 | 99cfe61e7ef3013a4923d4b795ca94766e1d762b | /JollyBee/JAWABAN/a+b2.py | b440425f299e15d29386ab26da8cdfa09792ea05 | [] | no_license | abdilahrf/OnlineJudgeSolution | 9d9423655404e16e759a130aa6af62a833ef2743 | f46941dd7b18f36fd154ae978912d0df8718d2b7 | refs/heads/master | 2021-01-11T04:30:56.362852 | 2017-03-28T06:47:28 | 2017-03-28T06:47:28 | 71,146,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | a+b2.py | input_string = input()
total=0
input_string = input_string.split(" ")
for x in range(len(input_string)):
total += int(input_string[x])
if x==0:
total = 0
print (total)
|
6b52ca918f17e3f55b116eb7a91be10fd2c4b6cc | 7b1d93ba62e9c7401cffc17a05f66b2c80c48eb1 | /2d/tp1/ex1.py | f04ce3f549f014e42a1a94a774b41af32c31fdd4 | [] | no_license | clemzux/infographie | b947a70b48aeba842fdb1dcc6cceb6b7d0cb6c05 | 7816e62724d076f4e73c769bf6071a9e6f2abda4 | refs/heads/master | 2021-01-10T13:07:38.740714 | 2016-04-07T22:19:45 | 2016-04-07T22:19:45 | 55,258,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,542 | py | ex1.py | import cng as c
__fen = None
__sousFen = None
__rect1 = None
__rect2 = None
x1 = None
y1 = None
x2 = None
y2 = None
######## mouvements du rectangle ########
def bougerHaut():
global __rect1
global __rect2
c.obj_move(__rect1, 0, 5)
c.obj_move(__rect2, 0, 5*(350/800))
def bougerBas():
global __rect1
glo... |
20616fb0f305e588494a47c8deac4c6b68d65f4f | 89ccc41a81e00404f620f15b926471418412cb2b | /cloudbaseinit/plugins/common/userdatautils.py | 230245a9ef1fcc4ae204c742c29ef652a266ede7 | [
"Apache-2.0"
] | permissive | pellaeon/bsd-cloudinit | bf6bf73aa4f22cd15bb34ccca06cb8fdfcd6dbc3 | d2fabf40119267164b9e765e59e3f99cd61fdcef | refs/heads/master | 2021-06-11T17:02:36.812016 | 2021-02-25T06:51:02 | 2021-02-25T06:51:02 | 13,364,507 | 75 | 40 | Apache-2.0 | 2021-02-25T06:51:03 | 2013-10-06T15:52:33 | Python | UTF-8 | Python | false | false | 2,088 | py | userdatautils.py | # Copyright 2014 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
8f240671ce8a1364695a980da94454e60a61df8e | 847d2c54906e3cbe39cd168ac1aeb06089ceb5b9 | /Raspi.py | 2d8bfed08f558bec9f51410df2d7905a00971672 | [] | no_license | ceberous/GmusicAPITest2 | 470cf7dd3b23dfba29f1e50dfef61d91964bab79 | 4e587536ba1c29c52e54ecbf7fbb943f9b0c9ddb | refs/heads/master | 2020-05-30T23:23:53.806949 | 2016-08-08T04:21:42 | 2016-08-08T04:21:42 | 65,063,575 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,240 | py | Raspi.py | import sys , select , tty , termios
import psutil
import os
import subprocess , signal
import threading
import time
# Raspi Input Setup
# ==============================================================
#import Rpi.GPIO as GPIO
#GPIO.setmode( GPIO.BCM )
#GPIO.setup( 23 , GPIO.IN , pull_up_down=GPIO.PUD_UP )
#GPIO.set... |
ca6b868cdd83b6aea8ab33071b0288f8cca494bc | 1f7e92c900f1a03661918653bc35335c6dfd8ea3 | /win32com_.py | 864eb7ad903fed2733724ebfae4f9f7c1bf8353c | [] | no_license | kkmh/stock_python | fa3d83fe8888285fbfb079225c3328589dd879e3 | 9c186a9fe96067c2ff2d3cbedccf6e82a71f6d98 | refs/heads/master | 2021-01-09T09:37:23.753228 | 2017-02-07T07:05:22 | 2017-02-07T07:05:22 | 81,177,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py | win32com_.py | ## win32 only
import win32com.client
explore = win32com.client.Dispatch("InternetExplorer.Application")
explore.Visible = True
import win32com.client
word = win32com.client.Dispatch("Word.Application")
word.Visible = True
|
4fe53c3c7fe1cffc5f2475b58ec71b5269c84a94 | 63c6ccf2aacf3099ddb223cb0e34cc853a837776 | /test_env/offend_ross.py | 4d5ce50c994dce496fc79792c05b3fe9ff222cd8 | [] | no_license | henrymj/Self_Regulation_Ontology | ec7cb9b65afc01264156d02d1e49b5a3def97012 | 7c4dba9a4da31cf25020ca02f87af644ae41b82a | refs/heads/master | 2022-04-13T10:45:54.908182 | 2020-04-13T17:16:22 | 2020-04-13T17:16:22 | 208,912,144 | 1 | 1 | null | 2019-12-11T00:13:03 | 2019-09-16T22:51:00 | null | UTF-8 | Python | false | false | 1,983 | py | offend_ross.py | import pandas as pd
import numpy as np
import scipy.stats as ss
import sklearn
import sklearn.decomposition as skdec
import matplotlib.pyplot as plt
import random
from rpy2.robjects.packages import importr
from utils.clean_utils import transform_remove_skew, remove_outliers, remove_correlated_task_variables, drop_vars... |
1a7498230bdfb555e2e7b67e2b6407a00071982b | 1eb42a444d840f48f8df08e6ecf184c4b30c838a | /ex80.py | 728b3f03a2c1619ea80159e793c95dd5b177dbbb | [] | no_license | horselurrver/100_python_exercises | 76c8b9a3a5acbab4f155bd74f510f1adfcd1e4ff | 2d789d3e8c4716b06491e2cb523fc705e4a6dcc7 | refs/heads/master | 2020-06-15T16:34:25.028953 | 2019-07-08T02:29:12 | 2019-07-08T02:29:12 | 195,343,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 306 | py | ex80.py | """
By using list comprehension, please write a program to print the list after removing the 0th, 2nd, 4th,6th numbers in [12,24,35,70,88,120,155].
"""
list = [12,24,35,70,88,120,155]
list = [value for index, value in enumerate(list) if index != 0 and index != 2 and index != 4 and index != 6]
print(list)
|
45fef82c5094c7d488f2fbd5eb70ab3168ff5de4 | da1b7aeef9d3983eb337d8e2e28d380904eea4e3 | /matrx/logger/log_tick.py | a8447bfca6e1996099e183057b0b37da40c5d8c4 | [
"MIT"
] | permissive | matrxs/MATRXS | b56066dde925d9fcd6064f8c3c379c823e98e6f4 | 99c653396b8c9fa8a96b8f5c01503b2e122cdbac | refs/heads/dev | 2020-09-17T01:26:24.067345 | 2020-02-27T13:40:33 | 2020-02-27T13:40:33 | 223,945,108 | 1 | 0 | MIT | 2020-02-27T13:28:24 | 2019-11-25T12:36:47 | Python | UTF-8 | Python | false | false | 585 | py | log_tick.py | from matrx.logger.logger import GridWorldLogger
from matrx.grid_world import GridWorld
class LogDuration(GridWorldLogger):
def __init__(self, save_path="", file_name_prefix="", file_extension=".csv", delimeter=";"):
super().__init__(save_path=save_path, file_name=file_name_prefix, file_extension=file_ext... |
61409accff11ae50e70dfda2bbf97d78106abb27 | 3a2159716417dd7cfdd3323075d5b941adc942eb | /nmdb/intensity.py | 1f0c3d4d9257d5fe451571ab79a24a4478c99cca | [
"Apache-2.0"
] | permissive | CSIRO-enviro-informatics/cosmoz-data-pipeline | dce203a7fd9f667b6ad9e053e9d9fe5f75efaeb8 | e4fc54558fe817764b54076440cd883c96bc06ec | refs/heads/master | 2022-12-13T13:42:41.593923 | 2021-05-18T02:41:53 | 2021-05-18T02:43:56 | 188,954,004 | 1 | 0 | Apache-2.0 | 2022-12-08T09:24:48 | 2019-05-28T04:30:34 | Python | UTF-8 | Python | false | false | 1,207 | py | intensity.py | # -*- coding: utf-8 -*-
#
from datetime import datetime
class Intensity(object):
__slots__ = ("site_no", "timestamp", "intensity_value", "bad_data_flag")
def __new__(cls, site_no, timestamp, intensity_value, bad_data_flag=None):
"""
:param site_no:
:type site_no: int
:param tim... |
5e06310a85525e8aa24a71827b1a80662945d861 | c879ba618b7d0becf55ef7f2445029ef9d803669 | /students/К33402/Surina_Liza/practical_work/simple_django_web_project/project_first_app/forms.py | 11c0273352dc89b31a0449dde4fe1fd5544096a9 | [
"MIT"
] | permissive | lololol0/ITMO_ICT_WebDevelopment_2020-2021 | 2d86b5706798bfac780fb4a6c07c3ced704f9f70 | a6fedd76daa38e01aa0362827ae96e3cce5ca82c | refs/heads/master | 2023-04-19T21:37:15.154071 | 2021-04-09T15:10:15 | 2021-04-09T15:10:15 | 296,360,906 | 0 | 0 | null | 2020-09-17T15:04:38 | 2020-09-17T15:04:37 | null | UTF-8 | Python | false | false | 221 | py | forms.py | from django import forms
from .models import ExampleModel
class ExampleForm(forms.ModelForm):
class Meta:
model = ExampleModel
fields = [
"title",
"description"
]
|
082c569cb7f147e5807e74c67012ae8c55a44b67 | 8d87a120d8c859ed9337be98eb186e126a48fadb | /main.py | 5236496e7a07e15276b6fe37c2b56ab9caa9ef7e | [] | no_license | matv3ys/flask-sqlalchemy-git | 1ecc8a9c14ea589e24416beaa28e9a8faacc0e71 | 0a2a9c3c705a38b6adceea31a868c98830c9af6e | refs/heads/master | 2021-05-19T09:40:16.256913 | 2020-04-01T08:36:05 | 2020-04-01T08:36:05 | 251,630,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,940 | py | main.py | from flask import Flask, render_template, redirect
from datetime import datetime
from data import db_session
from data.users_model import User
from data.jobs_model import Jobs
from data.departments import Departments
from registerform import RegisterForm
app = Flask(__name__)
app.config['SECRET_KEY'] = 'yandexlyceum_s... |
a2fbcea41bac4d1e884d6cf786ffd08498dd5f71 | bf40945b021a2c5389c024a159e3cf3ebed41843 | /求一元二次方程的解.py | 527fddf2430de4731b271a4a7d5bd470916c9412 | [] | no_license | dingguopeng/python3_test | 4b71d0734b71c7680b7bd4acd8957276eb21ba11 | cf74974da72050bf3fef2dd7de6daf9837c2da55 | refs/heads/master | 2020-04-05T19:33:09.770394 | 2018-11-12T02:25:48 | 2018-11-12T02:25:48 | 157,139,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | 求一元二次方程的解.py | # 求解方程的根,并能接受多次计算
import math
flag = 1
while (flag):
a = float(input("input a : "))
b = float(input("input b : "))
c = float(input("input c : "))
if (a != 0 and (b ** 2 - 4 * a * c >= 0)):
print('x1 = ', (0 - b + math.sqrt(b ** 2 - 4 * a * c)) / (2 * a))
print('x2 = ', (0 - ... |
6dbf464834b9dab5b19f00a01245c1c38de5a6c0 | 24bff2a6f7f0bb75c7708b65a0dba49d26719cdd | /facebookIV/bidder.py | 3718f538bf8d98c7fb774e199cfbb881d9144727 | [] | no_license | podlipensky/kaggle | bcf8f6c15e3b4b965ae2615cce7d5182d65179fa | 352254df76f8bb21ee919bee340678f066b1c432 | refs/heads/master | 2020-05-17T08:08:09.739246 | 2015-06-09T23:29:33 | 2015-06-09T23:29:33 | 37,163,964 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 21,842 | py | bidder.py | import numpy as np
import operator
import math
import bisect
from collections import defaultdict, namedtuple, deque
import shared
import utils
from bids import Bid
class Interval:
def __init__(self, start):
self.start = start
self.end = start
# namedtuple('StoredIncrement', ['auction', 'bidder_id... |
6740a81b8dcb06162b3cdf6ea189f5105daecf82 | 4e9c1bf45287389a5505660ef0a78770b62993ba | /api.py | 36956fd90de456800776476e76281e824fa8d1dd | [] | no_license | ravrahn/etymograph | eeedb25082f6633725aabe48d99d81d696793cfa | 3d8f590be1f0e7b5755ba03fd7e7bbbe692e1373 | refs/heads/master | 2021-01-22T10:33:16.869496 | 2017-04-30T00:40:35 | 2017-04-30T00:40:35 | 45,151,267 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,078 | py | api.py | from flask import Blueprint, request, json
import helpers
import model
api = Blueprint('api', __name__)
@api.route('/search')
def search(): # ET-5, ET-19
'''
Search for all words that match a particular substring
usage: /search?q=<string> or frontend search bar
'''
query = request.args['q']
r... |
4a3293b762c6a5c402127cf9ebc4f57b9cfa5867 | c8d77bfebd94ae37d1c4fc4df1a68b800cd8b43f | /Udacity/cs215 - Intro to Algorithms/final assessment/constantly_connected.py | 6c83b71b329339685c1096176685fbd352e464b8 | [] | no_license | lamelameo/Algorithms-Udacity-Misc | a3cfd92c3fb839f95cd9a695344838361388c926 | 1467800552ad2042375376290ee2653fb056bb01 | refs/heads/master | 2023-03-06T07:53:50.833022 | 2021-02-10T04:11:13 | 2021-02-10T04:11:13 | 185,810,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,426 | py | constantly_connected.py | #
# Design and implement an algorithm that can preprocess a
# graph and then answer the question "is x connected to y in the
# graph" for any x and y in constant time Theta(1).
#
# `process_graph` will be called only once on each graph. If you want,
# you can store whatever information you need for `is_connected` in
#... |
1cc67e5430975e252df79266598833d549ad6b47 | de85b22eb2ebb8af4bde39184c1cd7a535ad4e50 | /Verilog HD Sensor Fusion/support_circuits/connectivity_matrix_gen.py | 4f552d688a373729507cbc36f0b6489bf73248a0 | [
"BSD-3-Clause"
] | permissive | harrisonliew/cs252_ee290_project | 5163c2d8392536b27824a4143e592332c1e8347c | 93cecbda906267a68f05c9652349375d3bc2cff6 | refs/heads/master | 2021-04-17T23:46:28.024518 | 2020-05-09T19:17:11 | 2020-05-09T19:17:11 | 249,486,686 | 1 | 1 | BSD-3-Clause | 2021-03-29T22:28:22 | 2020-03-23T16:38:31 | C | UTF-8 | Python | false | false | 405 | py | connectivity_matrix_gen.py | import numpy as np
HV_DIMENSION = 1000;
MAX_BUNDLE_CYCLES = 80;
def HVbin(hv):
dim = len(hv)
return ''.join(['1' if hv[i] > 0 else '0' for i in range(dim-1,-1,-1)])
file = open('conn_mat_newline.txt', 'w')
for i in range(MAX_BUNDLE_CYCLES):
hv = np.zeros(HV_DIMENSION)
flips = round(HV_DIMENSION/(i+1))
idx = np... |
c3b02d4b867a14407aec2b5efb47ed6597ab14c8 | 5d9f342a9dd64840372073ccc65c52af5f96e2cc | /plus/phpweb_SQLInject.py | 44ac5026bcc8370c56b53417e46412373dba9c29 | [] | no_license | Tycheo/Bugscan | 85bb264ccdd09bb12fcf385d2dedf8df7e50d4c5 | 07caa0b18dbe211c282d94b9949666bfed79ab7f | refs/heads/master | 2021-01-18T07:42:33.650735 | 2015-08-12T13:10:00 | 2015-08-12T13:10:00 | 41,476,385 | 1 | 0 | null | 2015-08-27T08:58:50 | 2015-08-27T08:58:50 | null | UTF-8 | Python | false | false | 587 | py | phpweb_SQLInject.py | def exploit(url):
poc = "http://"+url+"/news/html/?410'union/**/select/**/1/**/from/**/(select/**/count(*),concat(floor(rand(0)*2),0x3a,(select/**/concat(user,0x3d,password)/**/from/**/pwn_base_admin/**/limit/**/0,1),0x3a)a/**/from/**/information_schema.tables/**/group/**/by/**/a)b/**/where'1'='1.html"
try:
ok=fuck... |
f9c944647abbcc4501daac6c9248bee4e00c089e | 147389cf28e0c92f0b2ef8000b0562a71d766880 | /lesson_basic/6_while.py | a7e6df229846c23383b8872bdf98f8b9b4028e9c | [] | no_license | dohyekim/hello | 3821ca97079818c9938df33fc6d8d6ea9ca763a5 | 84f5704fe6cb6e5b63fb7903e311b650d65a394a | refs/heads/master | 2022-02-25T11:12:31.077335 | 2019-09-22T06:23:00 | 2019-09-22T06:23:00 | 156,352,382 | 1 | 0 | null | 2022-02-12T11:48:53 | 2018-11-06T08:39:18 | JavaScript | UTF-8 | Python | false | false | 644 | py | 6_while.py | # while
i, sum = 0, 0
while(i >= 0): # ()안의 조건을 만족한다면 영원히 돌린다. #(True)하면 무한loop
i += 1
if(i > 10 and i < 20): # i = 1, 조건 충족 X, i = 10, i +=1 i = 20, i +=1 수행. i = 19, i+=1 i = 20, 조건충족 X
continue
#i>10 and i<15를 만족하지 못하면 밑의 줄로 넘어간다.
sum += i ... |
43cdec447b9ae4d16bfa2cc81c6376c0e1b806c8 | ecb2074ddf5fd51732c6c7c7eff5c8ca6293ff08 | /teleop/src/teleop/command_publishers/twist_stamped_command_publisher.py | d266d7551a1db40a120412651f5a6a01773368f9 | [] | no_license | roamlab/arm_teleop_ur5 | a19159e21baa705cdc13af991e9e6c590e63609c | 6de9f1da1b91db8ded4dc56f58681749b00573dd | refs/heads/master | 2020-04-09T15:07:16.197970 | 2020-02-10T02:58:29 | 2020-02-10T02:58:29 | 160,416,358 | 4 | 2 | null | 2020-02-10T02:58:30 | 2018-12-04T20:42:37 | Python | UTF-8 | Python | false | false | 911 | py | twist_stamped_command_publisher.py | import rospy
from geometry_msgs.msg import Twist, TwistStamped
from teleop.command_publishers import CommandPublisherBaseClass
class TwistStampedCommandPublisher(CommandPublisherBaseClass):
def __init__(self, config_data, section_name):
super(TwistStampedCommandPublisher, self).__init__(config_data, secti... |
adcaf38c61e552be92ff094139f73501e7e8a79a | 49ef54142ecdc7778ee789d23951ef730a506441 | /Graph/Topological Sorting.py | dd5cf940bcf78ecc8ec7a1157ba7cf23b228594f | [] | no_license | Ragul-SV/Data-Structures-and-Algorithms | fa7471fc24c93e04bf69804b4a978ec33c0d9b28 | ab35edb82f8f27eb23e98d2b73321022abfbe4e6 | refs/heads/master | 2023-06-05T07:14:03.551044 | 2021-06-24T17:14:00 | 2021-06-24T17:14:00 | 248,221,115 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | Topological Sorting.py | import sys
sys.setrecursionlimit(10000000)
def topoSortUtil(adj,v,visited,stack):
visited[v] = True
for i in adj[v]:
if visited[i]==False:
topoSortUtil(adj,i,visited,stack)
stack.insert(0,v)
def topoSort(n, adj):
visited = [False]*n
stack = []
for i in range(n):
... |
a44f9bd762b7f749f60576dbef725ea49abec31f | 3fd7600e9bd29f6aee861e949de7e012e131a925 | /main.py | 69fa93250b057a31f3ef4ed901eb8120b5fa377b | [] | no_license | kings1990/PlaneWar | 9bff93e1734015c8b69fae82608b62c9f2d9744e | 2d9883bd3323fce75014e8991c3e001722499aea | refs/heads/master | 2023-03-10T14:02:18.691051 | 2021-02-26T01:04:20 | 2021-02-26T01:04:20 | 342,423,259 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30,403 | py | main.py | import pygame
import sys
from my_plane import MyPlane
from small_enemy import SmallEnemy
from mid_enemy import MidEnemy
from big_enemy import BigEnemy
from bullet import Bullet
from double_bullet import DoubleBullet
from bomb_supply import BombSupply
import constants as consts
from pygame.sprite import Group
from bull... |
035bbe4320e87b3365f3b12894aee9255e69ac42 | 4070c7b13a6f30086610d5724cfaf6cd2a2f977e | /RigidWallOverdampedLangevin3D.py | 5d688f1bef1a738cd7a896b42e2d8c2d3486dd76 | [] | no_license | eXpensia/Stage2020-Nageurs-actifs-proche-de-parois-deformable | 4263474205d042c272e7f5e32ef4b701e84550dd | c265e6f43c027c6777c7bba885159ca1e015fd74 | refs/heads/master | 2022-11-19T14:48:17.078587 | 2020-07-24T20:19:04 | 2020-07-24T20:19:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,707 | py | RigidWallOverdampedLangevin3D.py | # Élodie Millan
# June 2020
# Langevin equation 3D for a free particule close to a rigid wall without inertia and with weight.
import numpy as np
import matplotlib.pyplot as plt
# from OverdampedLangevin3D import Langevin3D
from InertialLangevin3D import InertialLangevin3D
class RigidWallOverdampedLangevin3D(Inerti... |
f96628cead8e5fd4defcffc354d88cab237c4e42 | 458a501056355dc0dcc1150cee92ab2fdcffc370 | /Week 5/Day 4/Translator/Translator.py | 9520926812a81fcb2dcec498eda057dd03720e9e | [] | no_license | alonganot10/di | 3f874883cca8aa6212f709439e19798154f52d9d | 2741e760e7d6fbc65f502862242094798441fe9b | refs/heads/master | 2022-12-03T20:48:44.941984 | 2020-08-03T13:03:15 | 2020-08-03T13:03:15 | 272,377,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | Translator.py | from translate import Translator
with open('text.txt') as f:
text = f.readlines()
translator = Translator(to_lang="he")
for line in text:
translation = translator.translate(line)
print(translation)
|
441fb2ba03e3bd1be0da8071bafdca1ce8894d53 | e1d9c62509a67f38b23a607a6cf792d27238b6ab | /weibo_app/weibo_search.py | a28f31f2fda771ab7bc1853a4e35a667091d2480 | [] | no_license | superShi-1998/Search_keys_weibo_data | c6317a419982abbf22907de5607c4af7e85e8c82 | 5b495e912c3303379cfe277d5f9d04935f89cab8 | refs/heads/master | 2022-01-07T00:31:14.827235 | 2019-05-30T08:24:45 | 2019-05-30T08:24:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,467 | py | weibo_search.py | # coding: utf-8
import json
import urllib.request
import ssl
from bs4 import BeautifulSoup
import re
import random
import time
import urllib
import requests
import os
from django.http import HttpResponse
import json
import simplejson
import copy
import weibo_app.gzipMiddleWare as gzipUtils
# 模拟登陆
class weibo():
de... |
c2317a6b5407e859938b8f72e93d626305dc7204 | ba72633b9985e94bd17faa874c50f2dc8299cec4 | /traverse.py | 3834ab97f7247bd869c33f57baffb7958ec49708 | [] | no_license | CS-BuildWeek2-Team-12/backend | f9923de2710e8411b2f059e14391d05432b567d0 | 9895e9cb8e8c01b8ea51424a2cddeef23b8e40fe | refs/heads/master | 2020-09-12T21:55:09.262330 | 2019-11-19T05:33:00 | 2019-11-19T05:33:00 | 222,570,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,440 | py | traverse.py | from util import Queue, Stack
from world_graph import Room, World
from decouple import config
import requests
class Traverser:
def __init__(self, world: World, starting_room, apikey=config("APIKEY")):
self.world = world
self.visited = set()
self.starting_room = starting_room
self.p... |
752ec3b096aa94006fca86979bee058fc1e73fc9 | 9f70e9ff0100c7f1d8a04ea535acd052f8dce067 | /scripts/39/Battle2/PieceAnimation2.py | df17e50a17e0ca24d6db4ee654233293e09e646b | [] | no_license | tuscom/RPGforPython | 49c9aaadac0433f009b7515f20dbc01a2300d58e | 5bca5092427a0bffb10c9113d84070314fb4da51 | refs/heads/master | 2020-03-23T15:46:37.391608 | 2018-10-15T02:00:51 | 2018-10-15T02:00:51 | 141,773,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,030 | py | PieceAnimation2.py | import pygame
from pygame.locals import *
import sys
import PieceAnimation1
class PieceAnimation(PieceAnimation1.PieceAnimation):
def __init__(self, name, ObjectClass): #Animationの最小単位
self.GetSource(ObjectClass)
self.ProgramParameter()
self.SetFunction(name)
def AfterUsedStart(self)... |
074da0aa784e6f6736c1cc19123d7c601b876cb7 | b46b1cac5e318241fcb268aacf536b8efe6568ea | /server/mongoDBCon.py | 6f4408fc5c961daf7a7b04ef4c06e78cafdaa17c | [] | no_license | kerow1004/tensorflow_imageprocessing | 1cc0e5ef8f95ad30c8ccc4254d055f03e67302c4 | cc883695fdb0cf04dc630bcea7692171e4ec3ce5 | refs/heads/master | 2022-12-22T00:57:46.620124 | 2020-09-08T04:11:29 | 2020-09-08T04:11:29 | 293,470,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py | mongoDBCon.py | from pymongo import MongoClient
def dbCon(col, query):
# Mongodb 접속
client = MongoClient('mongodb://mongomath:znqjspxltmMongo@m-dev-rs0-primary.thewonri.com:27017/math?authSource=admin')
db = client['math']
result = db.get_collection(col).find(query)
return result
|
6bd6738dcdcd3cec1ca43852a3a0300c4da26fdb | d524e17b6c06f1df26294749bc94079921cf7329 | /Tree/practice.py | 89cfbfe2f7377033d0701bcb6385a430a6abe5d4 | [] | no_license | updownC/python-data_structure | d4eabbe4bd3371edd8777e6d11333b3df178638d | b404a1c6dca796db371aaad4cda18a26bcdd5ec3 | refs/heads/master | 2022-12-09T14:46:45.759043 | 2020-09-18T02:39:52 | 2020-09-18T02:39:52 | 295,127,374 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,257 | py | practice.py | import random
class Node(object):
def __init__(self, value, left = None, right = None):
self.value = value
self.left = left
self.right = right
class BST(object):
# initiation, 빈 루트를 시작으로 하는 BST 생성
def __init__(self):
self.root = None
self.size = 0
# 빈 트리인지 아닌지 판단
def isEmpty(self):... |
edab0e4403a60009c56dda92577575b6598f0a01 | d88dd594a8a51ca806e91caf64f5b7aa7d94c977 | /anagrams.py | 2134253bcff09168e4ddcafd023aec21b1c11eb4 | [] | no_license | BloonZhang/Microsoft-Practice | 6ff62b9ba225e18db320d6741ccbad6135066871 | bee1d14703de13fdc020185db64fe12affa6422e | refs/heads/master | 2021-07-11T10:29:58.827622 | 2017-10-05T05:50:18 | 2017-10-05T05:50:18 | 105,837,545 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,151 | py | anagrams.py | # A variation on anagrams
# 1 point
import sys
import re
def main():
# The input
# Expected cmd input: python anagrams.py filename
args = sys.argv[1:]
# If there was no filename given
if not args:
print("Please specify a filename.")
sys.exit(1)
# At this point, we should have the file
# Let's ... |
59147ac9b5e4c49ef0b13013d4053fccedb6ef54 | 456d0675848b8b11bfec8d052590bdf7eab3a20d | /codes/raulcr-p1023-Accepted-s1182824.py | a06b6add08898686440020ea5460d8e6986a1326 | [
"MIT"
] | permissive | iocodz/coj-solutions | 7dfa34ec0b7c830cca00cb0171ee6de18e6553a5 | b8c4d6009869b76a67d7bc1d5328b9bd6bfc33ca | refs/heads/master | 2022-11-07T09:10:58.938466 | 2020-06-23T06:21:28 | 2020-06-23T06:21:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 123 | py | raulcr-p1023-Accepted-s1182824.py |
suma = 0.00
for i in range(12):
a = float(input())
suma += a
suma /= 12.00
print ("$" + str(suma))
|
f488c4514bef603080957546493c9cd4c1b81704 | 02c394db353d996038c9bedbeaf91bb080c12ca2 | /dsm/epaxos/net/impl/udp/util.py | 47bbb53f66961390b7df313070d3f1db1e059338 | [
"MIT"
] | permissive | Limber0117/python-epaxos | 0633752cffaca65c0d8b9c3aecf9c8bc6ca70f3e | e68bab50e7df32770103196c91d8708863691579 | refs/heads/master | 2021-08-23T22:31:47.283682 | 2017-12-06T22:16:21 | 2017-12-06T22:16:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,695 | py | util.py | import socket
import struct
from typing import Dict
from urllib.parse import urlparse
from dsm.epaxos.replica.quorum.ev import ReplicaAddress
from dsm.epaxos.net.packet import Packet
from dsm.serializer import serialize_json, deserialize_json
def _addr_conv(my_addr):
my_addr = urlparse(my_addr)
udp_ip = my_... |
c8ceef9e57f1c6b727141794e503a0aaabc13699 | 8a819d2c753e09207b2cde6e47a33c69a4c0c2a5 | /examples/example2/example2.py | 097d974a85cad877a37e7feb18e6e1fd03d727fc | [
"MIT"
] | permissive | tivvit/yap | 676668fddd412104d3ce8434838109631413583b | e1c5dee5fb062ded2b5dd953f69302c38ce4f88a | refs/heads/master | 2023-03-02T06:35:23.322259 | 2021-10-24T23:18:33 | 2021-10-24T23:18:33 | 193,581,903 | 1 | 1 | MIT | 2023-02-25T10:15:11 | 2019-06-24T21:17:18 | Go | UTF-8 | Python | false | false | 201 | py | example2.py | import yap
p = yap.Pipeline()
print(p)
p.add(yap.Block("a", "ls"))
print(p)
bl = yap.DictBlock({"name": "B", "exec": "ls"})
print(bl)
p.add(bl)
print(p)
# yap.Pipeline().load_from_file("a.yml") |
649fdf0253488d4a6a65c6ec11fa666d9197d998 | 72a1085e254d85f9b8a7dc8dcea11e8b39d825a2 | /randwordgen/randwordgen/apps/randwordgenerator/views.py | 92ad00650836858c0ea648e13bb2eb07e31f851f | [] | no_license | Daju230/codingdojo | a0e4e508d55fb3b28ad59fab6d11fa825529dd23 | e625e315613a97a309fb18ab6cb71d82390a0cb7 | refs/heads/master | 2021-04-03T08:00:47.671663 | 2018-05-22T07:02:45 | 2018-05-22T07:02:45 | 124,346,020 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | views.py | from django.shortcuts import render, HttpResponse, redirect
from django.utils.crypto import get_random_string
def index(request):
if 'attempts' not in request.session:
request.session['attempts'] = 1
else:
request.session['attempts'] += 1
random_word = get_random_string(length = 14, allowed_chars='abc... |
ca1687f904590ceafa868728333d74f84d5eb6c2 | 0df8056af92f217384625fd99223d2489bfae02b | /setup.py | 109bedd6e9d40f52471cbffce97dfde31960cc21 | [
"MIT"
] | permissive | natea/django-deployer | ec5435f021098fabbcf34718341dee230019d2d1 | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | refs/heads/master | 2016-09-06T03:15:30.127544 | 2013-09-27T16:06:09 | 2013-09-27T16:06:09 | 5,717,979 | 19 | 3 | MIT | 2020-04-15T01:32:14 | 2012-09-07T14:33:10 | Python | UTF-8 | Python | false | false | 1,333 | py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name="django-deployer",
version="0.1.6",
description="Django deployment tool for popular PaaS providers",
long_description=open('README.rst').read() + '\n\n' + open('CHANGES.rst').read(),
keywords="Pa... |
5f35160bea24254ecf89067f356a65b4ee18894e | 299ae2792dfa05ab74148ecbeaac03cf8cd29e9c | /ex39_dicts.py | dcd4592708be0933e7593322e8aa02124c072611 | [] | no_license | ekirkend8/lpthw_book | f49e6cfa84c187798ba405c3b650bba1b1456c1c | 9ae1d7941362a516e7ad0e3cafa7062876f2d0f4 | refs/heads/master | 2022-03-25T20:14:05.885893 | 2019-12-29T04:55:20 | 2019-12-29T04:55:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,364 | py | ex39_dicts.py | things = ['a', 'b', 'c', 'd']
print(things[1])
things[1] = 'z'
print(things[1])
print(things)
stuff = {'name': 'Evee', 'age': 39, 'height': 5*12 + 5}
print(stuff['name'])
print(stuff['age'])
stuff['state'] = 'OH'
print(stuff['state'])
stuff[1] = 'woww'
print(stuff)
del stuff[1]
print(stuff)
states = {
'Orego... |
29d62d5cc084eb78df7c512a8f84e2ca477d3fda | 27b6e5814ef06b305dfd59130d5e666def79f598 | /rl.py | 2bf7fcaa598c9b54c92f9a1dc801f85f360da705 | [] | no_license | overlordtm/AI-ReinforcementLearning | e02546398c3020ff6bcfc04fe0dd270e53d890f7 | 6c93d92182f8446ad2e31c2c6a76b54138219dac | refs/heads/master | 2020-06-03T01:47:14.379936 | 2014-01-14T18:53:11 | 2014-01-14T18:53:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,511 | py | rl.py | from environment.brickBreaker import BrickBreakerEnv
from agent.ADPAgent import ADPActiveAgent
from environment.maze import MazeEnv
import pprint
if __name__ == "__main__":
# env = MazeEnv()
env = BrickBreakerEnv(3)
agent = ADPActiveAgent(env, gamma=0.3, Rplus=1, Ne=2, maxPolicyIter=5000)
agent.train(30)
print... |
38f7bb5382d5567633ff7f056a207532d75af578 | e7565ea1487f8dd58ddeecec76cd02d73085bdf1 | /exception.py | 26052fa8cec9c1ec9e02060ff15495541df35e39 | [] | no_license | rekhacse/python-basics | 31b7576f92fab7ffe5ade056369973caebe06cc7 | d836cbdd77eee4c3420fd7d98b9438f96216a8a5 | refs/heads/master | 2021-07-02T17:43:01.252279 | 2014-01-27T18:37:09 | 2014-01-27T18:37:09 | 16,027,953 | 1 | 1 | null | 2020-10-16T11:42:30 | 2014-01-18T15:29:17 | Python | UTF-8 | Python | false | false | 179 | py | exception.py | try:
c=234/0 # or put another expression to execute else part
except (ZeroDivisionError):
print("Divided by zero")
else:
print("No Error")
finally:
print("program executed")
|
f16b48697bd0c076a96cea92a499f1bb1a6a505b | cc82a0958d23ff9e0b5fe8d4ed2ff7fe49949ef6 | /code/ain_withoutmask.py | d60f57941afa8dae952f98ead780a216906b3455 | [] | no_license | shellynie/DeepLearningTeamProject | b48aefc09fd4f88e420d3b9da28404f09201f801 | 2d678825a800edde74e9ec615d0823175618549e | refs/heads/master | 2020-04-09T05:58:44.215294 | 2018-12-04T21:25:48 | 2018-12-04T21:25:48 | 160,089,620 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,366 | py | ain_withoutmask.py | import numpy as np
import os
import torch
import torch.nn as nn
from torch.utils import data
from torch.utils.data import DataLoader, Dataset
import torch.nn.functional as F
import skimage.io
import csv
from PIL import Image
from torchvision import transforms
NB_CLASSES = 128
IMAGE_SIZE = 224
class FurnitureDataset(... |
5a6d68f01ea509c54ac925caea67159f0cdc0e0c | 2e6032aa0e5f0fe93898a3d40b7f90d483b398d0 | /tools/droidbot/tool.py | 096b41bdb1958492db48f579cbe74a80e2ee4d4b | [] | no_license | droidxp/benchmark | d3cc791e11ac80c9916a9588d010c97dfe8975db | d3724bef15dae3feb5a64527cbccdaf9a416ce16 | refs/heads/develop | 2023-06-25T02:15:44.482024 | 2023-06-09T22:30:45 | 2023-06-09T22:30:45 | 249,045,697 | 9 | 3 | null | 2023-06-09T22:30:46 | 2020-03-21T19:26:06 | Python | UTF-8 | Python | false | false | 1,119 | py | tool.py | import os
import re
from benchmark.commands.command import Command
from ..tool_spec import AbstractTool
class ToolSpec(AbstractTool):
def __init__(self):
super(ToolSpec, self).__init__("droidbot", """DroidBot is a lightweight test input generator for Android.
It can send random or scripted input... |
c5c3cbedc9b63a327e721afb6fa95f80150284cb | db4a0d3dfbf75b4826ecf396a71826d6983c0641 | /num2aheui.py | a77645e7a28d2ffee6af3d04fd5f9a598e6e73ee | [] | no_license | kuna/num2aheui | dbb6c1609477489dcbe23540771703e533fb1be7 | 08c3a582a62b7477413e06095fa16ef27b733053 | refs/heads/master | 2020-05-17T00:20:58.485748 | 2014-06-23T14:37:05 | 2014-06-23T14:37:05 | 21,129,118 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,387 | py | num2aheui.py | #!/usr/bin/python
#-*- coding: utf-8 -*-
class FixedArray(list):
def __init__(self, size):
list.__init__(self)
for i in range(0, size):
list.append(self, None)
OPER_ADD = 0
OPER_SUB = 1
OPER_MUL = 2
OPER_DIV = 3
OPER_COPY = 4
class logdata:
def __init__(self, num=None, oper=None):
self.num = num
self.op... |
d63cb449be41929e537bac203dbaef3d7de5619e | a3371564332688b66705590a606a9da12c3b079a | /db.py | 6a8257d9c3df81af65d173da92f67c77fea18366 | [] | no_license | jhylands/aglodie | 688981c74ec9d09cc4428fc925dd94b78639c672 | 9a64d883af1215bb7fd928ff7cff992f03dac9ac | refs/heads/main | 2023-05-15T03:19:14.680407 | 2021-03-30T16:41:00 | 2021-03-30T16:41:00 | 352,934,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 114 | py | db.py | from flask_sqlalchemy import SQLAlchemy
# init SQLAlchemy so we can use it later in our models
db = SQLAlchemy()
|
75cc805cadaec7b702c4ce14632f007b5a91435a | 9ce9a59ea7b02f5e07bdc862a83aae0a69ebc773 | /JPL_CMDA/services/svc/svc/src/collocation/dev/middle_end.py | e89aa3b328070900a8f4c3aa59a8d0261176a791 | [] | no_license | cmusv-sc/JPL-CMDA-2017 | 8968d9a37df958141948d6d4f6fec576672e0a4c | 0dc0d4bd21302bdbcc23246cf7abee6410a3d60f | refs/heads/master | 2021-01-01T15:34:28.952280 | 2017-07-18T22:38:03 | 2017-07-18T22:38:03 | 97,649,642 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,008 | py | middle_end.py | import numpy as N
import file_list as FL
import datetime
import bisect
import util as UT
import sys
import nna
import struct
class middle_end:
def __init__(self):
self.src_time = N.array([]) # elapsed second since Unix time
self.src_latitude = N.array([]) # in degree
self.src_... |
58eddec2ffe5880309d0bfad1c5ccabade6da87d | 7e9958c87987cd37a0554afd0b17b2da5134c95e | /calkowanie.py | 6ea881aa6f3367fda10d23aea58b4899fb9c817b | [] | no_license | BartlomiejRasztabiga/CKEGoNienawidzi | f2466e1f56e780a01a02ce97d5ef947f3cfc54d6 | 66bb80e772315f9b585a94a8991f8158bcbaf5c8 | refs/heads/master | 2023-03-10T17:10:42.585529 | 2021-02-28T17:10:27 | 2021-02-28T17:10:27 | 175,285,483 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | calkowanie.py | def f(x):
return x * x
def prostokatow(a, b, n):
pole = 0
szerokosc = (b - a) / n
srodek = a + (szerokosc / 2)
i = 0
while i < n:
pole += f(srodek) * szerokosc
srodek += szerokosc
i += 1
return pole
def trapezow(a, b, n):
pole = 0
szerokosc = (b - a) / n
... |
08433e1c6fa024d369b91e034645f0b73981c72a | f6e0da14aaf5df67c01e768a6bce9dda1d2cb6c7 | /oldp/apps/topics/admin.py | 470ba91eaafa7d1d3d4ef2d401e76822ed671e8e | [
"MIT"
] | permissive | openlegaldata/oldp | f4d7b15817e06f1bc88d0bb6ff1d579b109b4b2a | 298953d762733e17d4c2d0e8a88c3bd7c414057a | refs/heads/master | 2023-02-21T13:51:30.285570 | 2023-02-16T10:56:11 | 2023-02-16T10:56:11 | 132,149,199 | 80 | 15 | MIT | 2022-12-08T06:32:41 | 2018-05-04T14:16:19 | Python | UTF-8 | Python | false | false | 264 | py | admin.py | from django.contrib import admin
from oldp.apps.topics.models import Topic
@admin.register(Topic)
class TopicAdmin(admin.ModelAdmin):
date_hierarchy = 'updated_date'
list_display = ('title', 'created_date', 'updated_date')
search_fields = ['title']
|
3cb3a641abfaaf710e962d6612efb0fe7feefff0 | 561f4e79b2aa0951828b9fa46039eed77e98bb09 | /segundoModulo/PYTHON - DODO/0.2_list-f-s-retorno-c-parametro(TERMINADO)/7.py | 1223bc33c65b335afa961ee4c78cfaa83e0c7af8 | [
"MIT"
] | permissive | TharlesClaysson/Python-Basico | fc7da4aaf00e9a66c71e764cd9ad8f2df4e1550b | 16a135e08d4f1c7e46e33d4df5d4f36f7498b4ea | refs/heads/main | 2023-06-04T21:33:20.100413 | 2021-06-28T15:01:46 | 2021-06-28T15:01:46 | 381,044,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | 7.py | def parImpar(valor):
if valor%2:
print('O valor ',valor,' é Ímpar')
else:
print('O valor ',valor,' é Par')
def lerValor():
print('conferir se o valor é par o ímpar')
valor = int(input('Informe um valor: '))
parImpar(valor)
def main():
lerValor()
main()
|
c64eb58fcee8bc50105430894700c321c5733795 | 7b23ed45c2b7fe800da063a558656ebc292077a3 | /cracking-the-code-interview/chap8_9.py | d2bf6302f16f30f8005bb21145c74f0a40edf7d3 | [] | no_license | kitakou0313/cracking-the-code-interview | 8b5d625a749f902fc4b4c739a9be1e40bad671e2 | bad5fb1445a3e9d9540fa93ef8a8e498293256c7 | refs/heads/master | 2023-01-11T16:59:36.343037 | 2020-11-11T04:56:05 | 2020-11-11T04:56:05 | 262,353,570 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py | chap8_9.py | import unittest
def parens(n):
if n == 1:
return set(["()"])
ansSet = set()
resList = parens(n-1)
for res in resList:
ansSet.add("(" + res + ")")
ansSet.add(res + "()")
ansSet.add("()" + res)
return ansSet
class Test(unittest.TestCase):
def test_parens1(sel... |
6c189a1873c6fe2ff486462ee1bbeedae7eab860 | 6d54b335d8016316f35eff2f086fdf565b18a9e5 | /old.py | a9b7b5cf4c65790ce3833e8a778ae6fe1b0f8e67 | [
"MIT"
] | permissive | srichakradhar/Flask-Blog-with-Login | 8b625b385ce5183fa89faff3f5835a26c8816ff4 | 9e52f37507729b5f4b246956c7f6026015cfb518 | refs/heads/master | 2023-03-21T19:49:13.668489 | 2020-07-02T00:16:18 | 2020-07-02T00:16:18 | 276,508,431 | 0 | 0 | MIT | 2021-03-20T04:32:09 | 2020-07-02T00:11:12 | CSS | UTF-8 | Python | false | false | 6,178 | py | old.py | #
# __author__ = 'Zhongxuan Wang'
# __doc__ = 'iGlossary'
#
# app = Flask(__name__)
# # app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///words.db'
# # Remember, every time you make changes to the column (such as adding one col or removing one col, change the value),
# # you have to do the following: open terminal fro... |
799f6852616526dccd6a5d0d757439a1cab64509 | 244ad96a8a297458e5e346bb209ee6adbc30c7ad | /bookofwwe/controllers/default.py | 8fed4995d4fda2b2fd7bf4f19937d53fe045c821 | [
"LicenseRef-scancode-public-domain"
] | permissive | mertcansusuz/mertcansusuz.github.io | 1e125f151291da46a249041b5f84da824e8081a9 | 4dc21d15e097e3b22941ebeddca8a7194d3f2711 | refs/heads/master | 2020-04-01T17:54:50.142420 | 2018-11-22T20:05:23 | 2018-11-22T20:05:23 | 153,458,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,896 | py | default.py | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
# -------------------------------------------------------------------------
# This is a sample controller
# - index is the default action of any application
# - user is required for authentication and authorization
... |
d98d1b286948e45b5ac8075f7bd09705a64319f7 | 08959d1146978218660ad55b699f29fa17659ad5 | /gfqsub | fc1ad9098299d42ca7b399da65d81c8cb3e44b32 | [
"BSD-3-Clause"
] | permissive | pombredanne/gfqsub | e02cdb3cfdf3f4ba1970cb2877d3de1795415514 | 83c3eb76394e0a23baba1f691fb842d7df3626df | refs/heads/master | 2020-04-05T23:24:29.163414 | 2013-12-07T00:50:34 | 2013-12-07T00:50:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,478 | gfqsub | #!/home/okazaki/local/python/bin/python
import ConfigParser
import datetime
import logging
import optparse
import os
import sys
import threading
import fnmatch
import subprocess
import Queue
import paramiko
import socket
CONFIGNAME = '~/.gfqsub'
class InterruptableQueue(Queue.Queue):
def __init__(self, maxsize):... | |
f08ea8de1625d8cde4a63bf39780d6b1e995a6f9 | af22d82cd0f139cfb480e5eeb8e4c866964d2019 | /chapter1/babihua.py | a6ec7817016a7639ee959e36fad6a810c3cdda16 | [] | no_license | wsaicyj/WebScrap | c04f795b515947be019ff89739c83d86b938ac19 | a09ef8b6edfd3869b929389c378e7a18e886d6a0 | refs/heads/master | 2020-03-07T04:50:59.215952 | 2018-04-13T11:01:24 | 2018-04-13T11:01:24 | 127,278,417 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,843 | py | babihua.py | #! /usr/bin/env pthon3
# -*- coding:utf-8 -*-
__author__ = 'Aaron_chan'
from urllib.request import urlopen, HTTPError
from bs4 import BeautifulSoup
import re
import requests
from selenium import webdriver
import time
# try:
# html = urlopen("http://zd.diyifanwen.com/zidian/bh/8.htm")
# except HTTPError as e:
# ... |
4ba8c39cd16b0f09ab89d067192653ff44095ba2 | 3b904d31a14602b080d95a67fc614dafdb55fdcd | /docs/src/rnaseq_figure.py | 12a8f45a7b7b76fca23f2affe5d428f291c1ae14 | [] | no_license | shouldsee/polyq-figures | d57ddd2277e579998a9e013c25018aaf0fad9645 | 32d193603cc3e5fe2df59d733b1fdec40c8090c1 | refs/heads/master | 2022-12-16T00:06:01.157869 | 2020-09-20T13:12:55 | 2020-09-20T13:12:55 | 219,304,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,116 | py | rnaseq_figure.py | import pymisca.ext as pyext
pd = pyext.pd; np = pyext.np
import os
SRCDIR = os.path.dirname(__file__)
from lazydict import LazyDictionary
rnaseq_figure = template = job = LazyDictionary()
# with pyext.getPathStack([]) as stack:
# ! ls -lhtr *.pk
from util import _get_file
###############################
#### Dat... |
b1505fe14094db35f100876a93aca757d135cfbc | 118dd349dc47a58de80687b590dd221a2688c52c | /edx_adapt/select/skill_separate_random_selector.py | c348fa7c1713a4482f63da3e6b063b3b24a2bb36 | [
"Apache-2.0"
] | permissive | sumeshiit/edx-adapt | 68053b7bade21910b195cb09fc8918949bb31620 | 9534d5c040aa78d0cfa23b0445de742cf5f2b083 | refs/heads/master | 2022-01-05T20:02:26.825622 | 2019-06-11T07:52:46 | 2019-06-11T07:52:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,336 | py | skill_separate_random_selector.py | import random
from interface import SelectInterface, SelectException
from edx_adapt.data.interface import DataException
from edx_adapt import logger
class SkillSeparateRandomSelector(SelectInterface):
""" This is an implementation of the adaptive problem selector.
At each time point, to goes through every sk... |
cf1e953122df8665cacccd9aa7d45a1ae9422b8b | 9a82cf1b0d76f017abc6686510919164aaa437dc | /lib/flows/general/filesystem_test.py | cecb2fc1efcb6814e0ed63f7997007e69a37ed78 | [
"Apache-2.0"
] | permissive | MiniSEC/GRR_clone | 3983feb8a8eef71bf673cc0f530bf8f530a8a48e | eaee75b9daf58e23c2f0f6cc61f44f3fe3fc338b | refs/heads/master | 2021-01-10T20:26:11.938212 | 2013-08-04T07:49:55 | 2013-08-04T07:49:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,274 | py | filesystem_test.py | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Test the filesystem related flows."""
import os
from grr.lib import aff4
from grr.lib import rdfvalue
from grr.lib import test_lib
from grr.lib import utils
class TestFilesystem(test_lib.FlowTestsBaseclass):
"""Test the interrogate flow."""
def t... |
a2b2f0aa008a10fef8b065358fcf18b76de2798b | 8ed362f04a1347acb1ce93a42c397fe7b5e005bb | /VENV/lib/python3.6/functools.py | 6f8ed2e37d52ee56a390e53bb7f1f179d3e34331 | [] | no_license | dengjiing/mblog | a4bc3a0eafd79b0865138cd85935b0d50589d204 | ae9921d8de1dc2c81a9b678235713e16cdb45a46 | refs/heads/master | 2021-04-18T22:38:52.929964 | 2018-03-28T10:52:29 | 2018-03-28T10:52:29 | 126,561,544 | 0 | 1 | null | 2018-03-25T09:42:06 | 2018-03-24T03:14:31 | Python | UTF-8 | Python | false | false | 45 | py | functools.py | /home/dj/anaconda3/lib/python3.6/functools.py |
59601e6577dbed3e49e6c116f5aafcc3c5c100f9 | cb1baeccca938be8c631cf4083034957334f3b7d | /2-Flask Web Application Skeleton/app.py | 46afeeb504eed15cc8e0e8e5627daebc8d67f974 | [] | no_license | pransandip/FLASK | 8a30394a97b85288f9f2ae730235da2ad08dfe2c | 1db0598c0f8a97d1254f8fff1955278ceb2984a0 | refs/heads/main | 2023-06-08T04:23:35.008219 | 2021-07-03T13:19:11 | 2021-07-03T13:19:11 | 382,250,989 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py | app.py | from flask import Flask
## WSGI Application
app=Flask(__name__)
@app.route('/')
def welcome():
return 'Welcome to my first FLASK App 2'
@app.route('/members')
def members():
return 'Welcome to my first FLASK App 2 members page'
if __name__=='__main__':
app.run(debug=True) |
9942ab23f069fc7b7760babcf9a07bba1db45bc2 | b18ba0c304f0ef6ee546666897aebd192fbfd61e | /movies/migrations/0001_initial.py | 8b103ee4f94da482299d48cf91fd9ccade0f3cba | [] | no_license | wns312/Moview_Backend | 6596cd12fb85bf0d896fac89db2527da194adc45 | 8f05d8ba2a76cca8e31c1d20940c729d028dc49d | refs/heads/master | 2023-06-11T06:05:47.447510 | 2021-05-27T17:06:04 | 2021-05-27T17:06:04 | 383,492,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,432 | py | 0001_initial.py | # Generated by Django 3.2.3 on 2021-05-22 15:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
73caefc75c72553f8ce81104d067900d36be974c | c50043fd3a4a5757385ee6b63cea4cbb43708435 | /etfl/io/dict.py | d8b13d2ac1fc74b7f8c824cf353aa391add15102 | [
"Apache-2.0"
] | permissive | EPFL-LCSB/etfl | d453f18dbe0fc278c24e082fb78a2b4a11b7cbf5 | f857a9d51a660912b74082f3f531ec5b22dbb00d | refs/heads/master | 2022-07-18T19:47:57.348329 | 2022-07-11T11:36:54 | 2022-07-11T11:36:54 | 178,238,025 | 17 | 17 | Apache-2.0 | 2021-06-09T08:47:15 | 2019-03-28T16:03:35 | Python | UTF-8 | Python | false | false | 32,648 | py | dict.py | # -*- coding: utf-8 -*-
"""
.. module:: etfl
:platform: Unix, Windows
:synopsis: Expression and thermodynamics-based models
.. moduleauthor:: Pierre Salvy
Make the model serializable
"""
from collections import OrderedDict, defaultdict
from tqdm import tqdm
from Bio.Seq import Seq
#from Bio.Alp... |
5140268cd31953437c83cef3d60dfd274fb35c05 | 0ee33b6a6838ee46a6550478b6a56c23e85291dd | /analytical.py | c1cf128c5432467190f922334f982326bd5d717d | [] | no_license | ErolB/cytometry | e8bd9eba4438fb24d87aca1baedcce70eacf0c9c | 342e649dbd17b7a748b5ca8d7c9da987655a770b | refs/heads/master | 2021-01-21T20:01:41.757970 | 2017-06-20T21:06:41 | 2017-06-20T21:06:41 | 92,184,946 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,839 | py | analytical.py | """
This module contains functions for analytically calculating the distributions and mututal information. This is mainly
used to verify calculations based on real data.
"""
import numpy as np
from matplotlib import pyplot as plt
from scipy.stats import gaussian_kde
# finds the determinant of the covariance matrix
d... |
c1ec34beea535d7bbc89613fd81d51a76e6b92ac | 5a91b4def89456f328b8ccf47e9443cd22252136 | /lpthw/ex36.py | 4ec911cc802f2f4ea6f7e03eac4edefb9e415486 | [] | no_license | HerXtheSlayer/LearningPython | 9964cbabaf1e67dbdc1f0c14e69684a56f54a481 | 5b61f18228e64bdd0780074c1340609f26fa6357 | refs/heads/master | 2021-01-01T17:39:06.121030 | 2017-09-27T14:53:40 | 2017-09-27T14:53:40 | 98,121,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,665 | py | ex36.py | from sys import exit
dagger = False
def entrance():
"""First zone, determines the loot"""
print """
While visiting a frontier town near the edge of the
Timberway, you learn that merchants here pay
handsomely for the pelts of the elusive Timberway
lions-up to 50 gp apiece. By asking around town, you ... |
2743eb596822f84d4ef5d6e7649ba52018143db2 | 5d61565651b7ba5fa8fade3313a5e82fca8b6686 | /common/migrations/0001_initial.py | efd23d864f35f82b23804ee5336fa02462907600 | [] | no_license | lonelyxmas/ISMS | d597b00072bfa77907875f575b866fbb1fb53295 | 08c5e2f3518fc639cf1a1f2869f4b2f3ae58e306 | refs/heads/master | 2023-08-14T12:02:59.001215 | 2021-03-22T03:34:58 | 2021-03-22T03:34:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 769 | py | 0001_initial.py | # Generated by Django 2.1.4 on 2019-08-08 15:21
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='sequence',
fields=[
('id', models.AutoField... |
ff3fcf2e2892c91edc1c755b84330fd0db9b0998 | 8d0a7ccba0d0a5356f00bb9d76e7f5d7eaf1bd18 | /factoring.py | 78b8b25ac05cb9a1c74e9fd8d49ad7313e2e0538 | [] | no_license | msahil432/quantum | 84ae2d23c1232b0cf6472aee53848761bf6dfafe | 76073261eccef9fe95ffacf4c62bc57d518de29f | refs/heads/master | 2020-04-03T21:12:26.972064 | 2019-02-05T10:00:23 | 2019-02-05T10:00:23 | 155,566,631 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,247 | py | factoring.py | #!/usr/bin/env python3
## Initialization
P = 3*5
digits = "{:06b}"
size = 3
vars = ['p0', 'p1', 'p2', 'p3', 'p4', 'p5']#, 'p6', 'p7']#, 'p8', 'p9', 'p10', 'p11', 'p12', 'p13', 'p14', 'p15']#, 'p16', 'p17', 'p18', 'p19', 'p20', 'p21', 'p22', 'p23', 'p24', 'p25', 'p26', 'p27', 'p28', 'p29', 'p30', 'p31']
first = ['a0', ... |
e45868e6e5203db4ff6ceac5e02563f6a5870a9f | 99c088ec4d5494411a35c77535de9b89ceaecf8f | /cantusdata/models/manuscript.py | 60e99bf8b6df21b8e75c953062b9b006bf669b02 | [] | no_license | WeiToGo/django-cantusdata | 563268507b06ff4e9cf949c317e8883c5b3b0b32 | 64a1969330aecec0c466029c52b1f46497d3eed1 | refs/heads/master | 2020-06-01T18:47:31.371847 | 2014-05-14T18:42:07 | 2014-05-14T18:42:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,059 | py | manuscript.py | from django.db import models
from django.dispatch import receiver
from django.db.models.signals import post_save, post_delete
class Manuscript(models.Model):
"""
A Manuscript is the top-level model,
Pages, Chants, Feasts and Concordances belong to a Manuscript
(some may be shared among di... |
5b1f18972d621fe3eef7c39613db82160e3143fd | 2a1f4c4900693c093b2fcf4f84efa60650ef1424 | /py/hwid_extractor/rlz.py | 38ced389084b5f5048a00d2414962146aba0de8d | [
"BSD-3-Clause"
] | permissive | bridder/factory | b925f494303728fa95017d1ba3ff40ac5cf6a2fd | a1b0fccd68987d8cd9c89710adc3c04b868347ec | refs/heads/master | 2023-08-10T18:51:08.988858 | 2021-09-21T03:25:28 | 2021-09-21T03:25:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,993 | py | rlz.py | # Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
RLZ_JSON = os.path.join(os.path.dirname(__file__), 'rlz.json')
def GetReferenceBoardName(device):
reference_board = device.get... |
92ca1f2646eeeee184dab6d66dddbef404e41197 | 5b1ca29d02ba32911c71a3dcb142d3ce070369d7 | /RaspberryPi/dataBase/sqlite3/DeleteTableDb.py | 1f6564e49b0197e0c7a0534be26d65cd63061015 | [
"MIT"
] | permissive | Bideau/SmartForrest | a52f57f86a2f4e03cd83ed1887a865b240c19786 | 5fe58593b18ac4e5e285d271a8ec5e9292093409 | refs/heads/master | 2016-09-01T06:56:56.953919 | 2016-04-01T06:37:09 | 2016-04-01T06:37:09 | 51,444,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | DeleteTableDb.py | #!/usr/bin/python
# -*- coding: utf-8 -*
"""
The MIT License (MIT)
Copyright (c) 2015 Christophe Aubert
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limit... |
197c069da8203c6c314e0d5ce3ebbecb57ac3ec5 | 9a3700418f8f3f8698c45ccdcaef79f846d01426 | /3 Models.py | 6160ff4dbae828e8ee14347e2f810817f2b731b4 | [] | no_license | p1halani/Amazon-food-Reviews | edee140508517ddbbacb9c2e1879e80767cc1c72 | 1998b0006e1673cb010c278f5956e1a64ed3a911 | refs/heads/master | 2022-04-25T02:36:54.234827 | 2020-04-29T11:58:21 | 2020-04-29T11:58:21 | 259,911,132 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,096 | py | 3 Models.py | # To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %%
get_ipython().run_line_magic('matplotlib', 'inline')
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import pandas as pd
pd.set_option('display.max_colwidth', -1)
from matplotlib import pyplot as plt
import... |
342b392a96d0313b59d529df1a6d7f856cee1234 | 6f568a5da8e67af0e752a3eddc1a2fb718c30df1 | /scraping-with-tor/windows/basic_example.py | 3bdb0ebbcf4b4404f1c94b94b46acee8d5ec2d34 | [] | no_license | piotr-kalanski/knowledge-repository | 789fffa435e0ea95165c19a866fac91be8573686 | 29056005f643d62f77c09833447699fa20ffc0b2 | refs/heads/master | 2023-01-22T22:21:24.847168 | 2019-12-25T11:54:13 | 2019-12-25T11:54:13 | 217,652,239 | 0 | 0 | null | 2023-01-05T03:39:55 | 2019-10-26T03:47:14 | JavaScript | UTF-8 | Python | false | false | 384 | py | basic_example.py | from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
chrome_options = Options()
chrome_options.add_argument("--proxy-server=socks5://127.0.0.1:9150")
with webdriver.Chrome(executable_path='D:\\Selenium\\chromedriver.exe', options=chrome_options) as driver:
driver.get('... |
7adb310ed0d6de22ddce36f6ffe3bbb1f99ebe47 | 955769c361f33e0b089171ebe421629631848342 | /language.py | 1813e46dafa7395778e9df8e9cd0654e6563b3b3 | [] | no_license | Ry0kugin/Boulder-Dash-DUT-INFO-I | 01dd950afe6b7308ffcbee2c2f8d42408a4619fb | d15684051a1ba9a6e893768d06bb73a62b4e86a4 | refs/heads/master | 2022-04-04T06:48:40.185201 | 2020-02-18T13:08:08 | 2020-02-18T13:08:08 | 218,814,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,922 | py | language.py | locale = "fr"
dictionnary = {
"fr": {
"playButton":"Jouer",
"scoreButton":"Scores",
"editorButton":"Editeur",
"levelSelectionButton": "Selection\nniveau",
"quitButton": "Quitter",
"randomButton": "Aléatoire\nInfini",
"loadFromSaveButton": "Depuis sauv... |
6e59ce6485c878ee0d8f2c372a8d1d81ddb99d19 | ffb995aea1454695a8deec2a5a101464da10c592 | /spiderSites/__init__.py | dcfb3bb59ecfae4955383f7aa4d1fb3d9e438513 | [] | no_license | walton007/ChemicalCrawler | 527ea97ae3aa673458838d53cd4de9fe64e0dcf3 | fa779e984a62d38fb1de856dbf90579aa6235bd1 | refs/heads/master | 2016-08-04T10:44:07.542328 | 2014-03-24T15:13:48 | 2014-03-24T15:13:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | __init__.py | class ReadURLException(Exception):
pass
|
a50100fb88878d5a4f926eff0379a47e18f4605b | 3c3a3ef77fb2661cd4e3d61aa239e3796236085c | /杨一春+作业一/Visualization/view.py | 742d4244c9f49e64f226fc8ec5c26885814295ef | [] | no_license | mmmine/SEU-AI-G10 | 9d25b3f9f7655e8b730b920b11b2cfbff1b0fbd2 | 71964696420f99bb53c20d1d1bcd8cdac6436247 | refs/heads/master | 2020-12-15T20:31:28.376590 | 2020-02-26T01:07:51 | 2020-02-26T01:07:51 | 235,245,986 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | view.py | import pandas
import matplotlib
import matplotlib.pyplot as mpl
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
matplotlib.rcParams['axes.unicode_minus'] = False
table = pandas.read_csv('course.csv', usecols = ['cname', 'number'])
df = table.sort_values(by = 'number', ascending = False)
df = df.i... |
46184ae941b4846119ba2f7fe9917f9c10725dbd | bad5a31464133fcc4b383abdd661c9ffa3f7374e | /ledstrip1.py | 7cf22ec86389d54d304f50e136d3e28ecb152484 | [] | no_license | freedomwebtech/rpi4rgb | befc52b91b7e600831aba628af9a327ea493009f | a01094ea6c7ad5037b2460a096717a9b39978589 | refs/heads/main | 2023-07-07T14:27:57.218247 | 2021-08-14T08:20:21 | 2021-08-14T08:20:21 | 395,940,881 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,099 | py | ledstrip1.py | import board
import neopixel
import numpy as p
from time import sleep
colors = p.random.randint(0, 255,(80, 3))
np = neopixel.NeoPixel(board.D18, 60)
np.brightness = 0.5
def color1():
for i in range (60):
color = colors[i-19]
np[i]=(color)
np.show()
def color2... |
87180677804a56f0a7b23147ebd9bcc825be5117 | 0ba1743e9f865a023f72a14d3a5c16b99ee7f138 | /problems/test_0027_compact.py | ed43e38117614ac73926c4af8af9bb6a91ef04eb | [
"Unlicense"
] | permissive | chrisxue815/leetcode_python | d0a38a4168243b0628256825581a6df1b673855c | a33eb7b833f6998972e5340d383443f3a2ee64e3 | refs/heads/main | 2022-06-20T15:09:27.221807 | 2022-06-02T21:55:35 | 2022-06-02T21:55:35 | 94,590,264 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 687 | py | test_0027_compact.py | import unittest
class Solution:
def removeElement(self, nums, val):
"""
:type nums: List[int]
:type val: int
:rtype: int
"""
write_index = 0
for num in nums:
if num != val:
nums[write_index] = num
write_index += 1
... |
142d3afd4ee1ef2a22831c0f2ab2368e566667ff | d50ec59e1c3b87bf3862231a8f341274e88b89d5 | /misc_scripts/async_client.py | 21d180185c2b732c1107da057d4bccec993f48ef | [] | no_license | tranquilo12/streams | 014ffc90876fd346170a73826eb1aa9fb040f742 | 3076ccb633d1c41417550602bd30b093414eee33 | refs/heads/master | 2023-01-09T19:26:56.808172 | 2020-11-17T16:58:31 | 2020-11-17T16:58:31 | 278,407,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,065 | py | async_client.py | from typing import Dict, Type
import aiohttp
from polygon.rest import models
from polygon.rest.models import unmarshal
class AsyncRESTClient:
""" This is a custom generated class """
DEFAULT_HOST = "api.polygon.io"
def __init__(self, auth_key: str):
self.auth_key = auth_key
self.url = ... |
20d8501691991bcc35578d6946d52398a2334ba0 | 2fd25a190db3c043b3d7d2e5fe03c2479e72a46c | /main.py | f1ff669d45f43d49e48fdd76f0591f3f28cba96b | [] | no_license | RPBRICKS/Memetastic | 289abf62765efc87e9ac3d23dc0f460caf824ad4 | 188653b5c84dca114c7d04a1440b92658ce29ca7 | refs/heads/main | 2023-07-23T08:34:31.821998 | 2021-09-04T15:59:02 | 2021-09-04T15:59:02 | 403,098,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 59,389 | py | main.py | import discord, datetime, time
from discord.ext import commands
import random
from discord import Spotify
import os
import dateutil.parser
from asyncio import sleep as s
from discord import Embed, TextChannel
import daytime
import discord
from webserver import keep_alive
from discord.ext import commands
import async... |
3641969c5b79409bfa79de4bc6fe09ab42d0b996 | eaed15d116cad2587d73c9ea59a553bf48d0d655 | /tools/performance_db/performance_db_frontend/app/user_data_pb2.py | edbf11699a264336735f4f930385e7285bd00318 | [] | no_license | sidrakesh93/grpc-common | f03975a487497c9022679c145b7158c32cc709e6 | 34a567080a38775ad76bdc770ea97b9be7675789 | refs/heads/master | 2021-01-18T20:41:29.385134 | 2015-06-17T22:06:01 | 2015-06-17T22:06:01 | 37,095,314 | 0 | 0 | null | 2015-06-08T22:00:13 | 2015-06-08T22:00:13 | null | UTF-8 | Python | false | true | 29,741 | py | user_data_pb2.py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: user_data.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _ref... |
b437a9f2ac1a8b1e49febeb58dd81777183cab4a | f471ff8d8316d4cffe406844117e5df4a6f61267 | /users/migrations/0007_auto_20210611_2317.py | 975433a092098e9d9795a26ad262c6ba562f2492 | [] | no_license | AlexC47/app_project | 1bbd7df83681780f1a0172d4688a8824d2fdd702 | 42ab60a39a1dca085a13f6177b3b13f07ba738da | refs/heads/master | 2023-08-01T18:02:35.445043 | 2021-09-23T15:58:41 | 2021-09-23T15:58:41 | 363,509,285 | 0 | 0 | null | 2021-09-23T15:58:42 | 2021-05-01T21:19:47 | Python | UTF-8 | Python | false | false | 425 | py | 0007_auto_20210611_2317.py | # Generated by Django 3.1.7 on 2021-06-11 20:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0006_auto_20210611_2313'),
]
operations = [
migrations.AlterField(
model_name='statistics',
name='touch',
... |
9ce7f0fe6daaf5f867dee307ebc530c778b7e7d5 | 3caf678fda5803923629cf7e9524781f59d6002d | /rest_framework_simplejwt/token_blacklist/__init__.py | 7a71a1014f159ec419d28f3e701b1cbc1fe4b899 | [
"MIT"
] | permissive | BillSchumacher/django-rest-framework-simplejwt | 5a4dc4b05136be7f5d1c3104a16ab2d3d6317efd | 888c151ded37597a2c4a6893f338f977fde78195 | refs/heads/master | 2022-10-18T18:49:55.581003 | 2022-10-11T21:57:45 | 2022-10-11T21:57:45 | 219,377,882 | 0 | 1 | MIT | 2022-10-11T22:24:43 | 2019-11-03T23:05:32 | Python | UTF-8 | Python | false | false | 159 | py | __init__.py | from django import VERSION
if VERSION < (3, 2):
default_app_config = (
"rest_framework_simplejwt.token_blacklist.apps.TokenBlacklistConfig"
)
|
ab45f0526afd20139f7ef0d0abb83075ff6444a5 | c7094cbd033bdfb64a97173d87b12aaf34a06e6e | /tools/cardiff/utils.py | 557d44e0b44109d3600a09cd1b26dd712b1bc742 | [
"Apache-2.0"
] | permissive | hkumarmk/edeploy | 5d48a425f09d096d45cb08f6f779fc2adfbee234 | fd8a4cf236d779859ab31b64b3384f315d3aedd7 | refs/heads/master | 2021-01-18T14:57:50.053859 | 2014-09-12T14:04:54 | 2014-09-12T14:07:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,014 | py | utils.py | import fnmatch
import os
class Levels:
INFO = 1 << 0
WARNING = 1 << 1
ERROR = 1 << 2
SUMMARY = 1 << 3
DETAIL = 1 << 4
message = {INFO: 'INFO', WARNING: 'WARNING', ERROR: 'ERROR', SUMMARY: 'SUMMARY', DETAIL: 'DETAIL'}
# Default level is to print everything
print_level = Levels.INFO | Levels.W... |
987422ca5cc296da620b8aede0ccef4f5279cebe | 0b842bcb3bf20e1ce628d39bf7e11abd7699baf9 | /oscar/a/sys/platform/manager/manager.py | 49f25e8066f97e940a99d9af57063cf5ce44e87a | [] | no_license | afeset/miner2-tools | 75cc8cdee06222e0d81e39a34f621399e1ceadee | 81bcc74fe7c0ca036ec483f634d7be0bab19a6d0 | refs/heads/master | 2016-09-05T12:50:58.228698 | 2013-08-27T21:09:56 | 2013-08-27T21:09:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,412 | py | manager.py | # Copyright Qwilt, 2012
#
# The code contained in this file may not be used by any other entities
# without explicit written permission from Qwilt.
#
# Author: shmulika
#
__pychecker__ = 'maxrefs=20'
import threading
import time
import a.api.yang.modules.tech.common.qwilt_tech_platform_manager.tech.platform.manag... |
70a629aeccabd6b29910324bd72d6e93a9f02186 | 6ab31b5f3a5f26d4d534abc4b197fe469a68e8e5 | /tests/beta_tests/test_your_basic_fizzbuzz_kata.py | 415dac2f186d3470c72586582db87b7dea8977b9 | [
"MIT"
] | permissive | mveselov/CodeWars | e4259194bfa018299906f42cd02b8ef4e5ab6caa | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | refs/heads/master | 2021-06-09T04:17:10.053324 | 2017-01-08T06:36:17 | 2017-01-08T06:36:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 873 | py | test_your_basic_fizzbuzz_kata.py | import unittest
from katas.beta.your_basic_fizzbuzz_kata import fizzbuzz
class FizzBuzzTestCase(unittest.TestCase):
def test_equals(self):
self.assertEqual(fizzbuzz(1), 1)
def test_equals_2(self):
self.assertEqual(fizzbuzz(2), 2)
def test_equals_3(self):
self.assertEqual(fizzbuz... |
c84076ed8396d1fde2056106c62586f2cccf5a6e | 90bba4f25bf9488f94d6f8051e740d2f6e2486d2 | /scripts/domain_plot.py | b01655e461b6acb4b20292b3bae16ef22c8d0416 | [
"MIT"
] | permissive | lmompela/multiparser | 3c4c3399183d3ff5d2217369ae7e58f052aad7f6 | f77e7c688ec51bc09f52441900fbe27c5c62f6bc | refs/heads/main | 2023-05-27T17:24:35.718487 | 2021-06-05T08:41:37 | 2021-06-05T08:41:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,815 | py | domain_plot.py | from pathlib import Path
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib.lines import Line2D
results_dir = Path('results/domain')
result_file = 'de_word.csv'
#############
# Common for all plots
#############
linestyles = ['-', '-', '-', '--', '--', '--']
color = ['red', 'blu... |
3afd768a0c9d2c012e4f2738fea9e022f05ee356 | 3b9bbd37b053e1e588d86246ded4381fd71a2b19 | /HDSKG-Chunking/tags_spider.py | cbb87a59218658389c9b7e86cf2170b0dc47165c | [] | no_license | Billionerd/Implementation-of-HDSKG-using-BERT | 2d95b8322e2e1333266aff44ed092feebb4c247f | a0fd4f7966f5ec68c37a1c5bbe9bcf5760875a25 | refs/heads/main | 2023-06-20T09:01:36.483986 | 2021-07-15T07:19:37 | 2021-07-15T07:19:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,552 | py | tags_spider.py | """
spider tags
url = "https://stackoverflow.com/tags?page=" + ### + "&tab=popular"
"""
import requests
from bs4 import BeautifulSoup
from tqdm import tqdm
import sys
import argparse
def tags_spider(start_index, end_index):
"""
spider tags from pages[start_index, end_index]
"""
print("-----------spide... |
637cf28f2e23e9df4ee3fdbee2fc302146212f49 | 9d74cbd676e629f8acdc68a4bac3dea0a98b9776 | /yc267/1236.py | 254c4f3eba13614b75911eded03c7c83cb462301 | [
"MIT"
] | permissive | c-yan/yukicoder | 01166de35e8059eaa8e3587456bba52f35bd0e44 | dcfd89b0a03759156dcea8c2e61a7705543dc0d4 | refs/heads/master | 2022-03-20T06:50:48.225922 | 2022-02-25T15:48:50 | 2022-02-25T15:48:50 | 237,735,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | 1236.py | from bisect import bisect_left
A, B = map(int, input().split())
x = [i * 12 * 60 * 60 // 11 for i in range(12)]
t = (A * 60 + B) % (12 * 60) * 60
print(x[bisect_left(x, t)] - t)
|
eb8a762f9e634724fa3a7779712ca84d0db4e87f | 8daf6cd7974a90e67724f0f879b0741812bd3ae2 | /freudifier/slip/forms.py | ae5f69def7ad52cf584e8f10009714ccb8d22a5e | [] | no_license | assamite/Slipper | e54f2f8a8cc7478d92a8c020ed13339c62e761ba | 53ea871f2a24f2a309c7971f06823d06142cdbf3 | refs/heads/master | 2016-09-06T16:47:04.755492 | 2012-12-13T16:36:47 | 2012-12-13T16:36:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | forms.py | from django import forms
class URLform(forms.Form):
'''
Simple form to get URL of the desired web site.
'''
url = forms.URLField(initial= "http://", label = "") |
c567845096d08a231ab7a1e1939397b9543799ed | e6acdd3df90088278e7b65a379163bb340f434ab | /changetemplatedlg.py | d3ed874bd40cc2e520709255e123d7d068704ac8 | [] | no_license | povarisovma/actof | cba31d5541e8d3bb84dd85fddee3d3477e5e39ad | 56ec7b5e0263b9d452f8586dc1543f455321e50b | refs/heads/master | 2023-06-06T19:00:00.988775 | 2021-07-11T17:23:41 | 2021-07-11T17:23:41 | 280,629,037 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,101 | py | changetemplatedlg.py | import wx
import templatesdb as db
ID_BTN_OK = 1
ID_BTN_CANCEL = 2
class ChangeTemplDlg(wx.Dialog):
numtempl = 0
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
#Получение выбраного номера шаблона:
self.numtempl = self.Parent.OLVtempl_acts.GetSelectedObjects()[0... |