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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
64bb332fad8ee8b4547e7c692aa62569a8935bf1 | fb26894afbd80ff4a653cde4cf5424f29046279a | /MultiViewTracks/utils.py | 226f12eb5a5d1a73e1b6db4427cba008d35867aa | [
"MIT"
] | permissive | fritzfrancisco/multiviewtracks | 86c9fb94e6af0ddeebe6028fd8c0c41b0485b8a0 | c01549fdf1475fecf8be22581b9be6f8e29fcf08 | refs/heads/master | 2020-07-17T18:00:29.281668 | 2019-08-24T09:35:02 | 2019-08-24T09:35:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,832 | py | utils.py | import _pickle
import cv2
import struct
import numpy as np
import matplotlib.pyplot as plt
from numpy.linalg import svd
def triangulate_point(pts_2d, views):
'''Triangulate points from multiple views using either OpenCV.triangulatePoints or DLT.
See https://github.com/opencv/opencv_contrib/blob/master/modules... |
af0c0f12205085522bc5298ed3ffda8a82fd74dd | 6555e3b83828466bf1bd41a9b23f558393f24c0d | /calculator.py | 93b44a3a292f50b6f418ff818ed24d6d7cbfd5e9 | [] | no_license | sharklab7/GUI-Calculator | 8c279fe74fd4c537005c5c0eab29a67713baefa9 | fe0956637c6fffd97aef6805bd3a438d8210cf52 | refs/heads/master | 2022-12-23T06:28:52.533142 | 2020-10-01T14:59:26 | 2020-10-01T14:59:26 | 300,256,281 | 0 | 0 | null | 2020-10-01T11:34:33 | 2020-10-01T11:34:32 | null | UTF-8 | Python | false | false | 5,061 | py | calculator.py | from tkinter import *
import parser
root = Tk()
root.title('Calculator')
root.geometry("368x280")
root.maxsize(368,280)
root.minsize(368,280)
root.config(bg="grey")
i = 0
def get_variables(num):
global i
display.insert(i, num)
i += 1
def clear_all():
display.delete(0, END)
def undo():
entir... |
01875e8f98e64dc0bf458b0c9c03a578cb9a3d36 | 3b53ecfaf17c8cc5d5b0df186987860c03abfd16 | /first.py | eedccee65516a6f22e8ff3ff532ad395864a5768 | [] | no_license | solomonmartinez/python | 7f84db89502588d21e16e4600b5166677bbcbb4d | 04d3fba79778eadf11893e4a29d8c023d7316c70 | refs/heads/master | 2021-01-17T04:30:36.670529 | 2017-02-23T21:00:01 | 2017-02-23T21:00:01 | 82,971,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 57 | py | first.py | print "Hi"
print "Kit KAt"
print
print
print
print
print
|
a6c3d331ea5192f4be7c06685c0538dd49c66551 | 3eb33eb985ed2fde63e156df4be32bab8e9e728e | /vendor/github.com/elastic/beats/packetbeat/scripts/create_tcp_protocol.py | 444aa8d2c7fd8542dc0ae8a059683056de85f956 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-other-permissive",
"MIT",
"BSD-3-Clause",
"BSD-2-Clause-Views",
"Elastic-2.0",
"MIT-0",
"MPL-2.0",
"ISC",
"BSD-2-Clause",
"MPL-1.1",
"JSON"
] | permissive | aristanetworks/openconfigbeat | fc9775ae36a727709482d3f8a05653789856ca10 | 0e9487e915dacdc557ac3d0eb2d69374a786b706 | refs/heads/master | 2023-05-28T15:37:43.722652 | 2022-02-08T22:23:03 | 2022-02-08T22:24:06 | 60,233,116 | 22 | 7 | Apache-2.0 | 2023-05-20T13:49:19 | 2016-06-02T04:40:29 | Go | UTF-8 | Python | false | false | 2,201 | py | create_tcp_protocol.py | import os
import argparse
# Creates a tcp protocol
protocol = ""
plugin_type = ""
plugin_var = ""
def generate_protocol():
read_input()
process_file()
def read_input():
"""Requests input form the command line for empty variables if needed.
"""
global protocol, plugin_type, plugin_var
if p... |
f43571f6f193f0512efafb0ef3823a83db2ec555 | f9b75c91ebd8fccdfe2c7181ecc1acceea387a27 | /polls/serializers.py | f89d5fd7b5f7d8651c43db10e01f5ce8e0af2152 | [] | no_license | mingburnu/TokenAuthentication | 75a54de3bcd6a8419b0ea4bc1ce4df6b3d09ef4a | 13333d21bee8788887d56e57d3708b93e13875b5 | refs/heads/master | 2021-01-06T20:45:04.141663 | 2017-09-01T06:59:53 | 2017-09-01T06:59:53 | 99,557,151 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,883 | py | serializers.py | from django.contrib.auth.models import User
from rest_framework.generics import ListCreateAPIView, RetrieveDestroyAPIView, RetrieveUpdateAPIView, CreateAPIView, \
RetrieveAPIView
from rest_framework.serializers import ModelSerializer
from .models import Question, Choice
class ChoiceSerializer(ModelSerializer):
... |
3b30da9d667de43008e233506640c68e89867adb | a9d1619eb9c15eaf2663716a64a7365f2ae28435 | /1d/q_learning_1d.py | 716865fb92dad2d74c3f87b62da541e7b32f0270 | [] | no_license | Amaranth819/Simple-Q-Learning-Examples | e372db423556fbc21f9abf20f11a39b2cb239ce5 | 6c46e170d5ea4765a9297b8ff382f2429271f2bb | refs/heads/master | 2022-07-08T22:54:15.296262 | 2019-12-24T01:31:12 | 2019-12-24T01:31:12 | 229,848,321 | 0 | 0 | null | 2022-06-21T23:57:54 | 2019-12-24T01:30:19 | Python | UTF-8 | Python | false | false | 3,002 | py | q_learning_1d.py | # We have a Q table representing the potential reward of choosing an action at a state. Q(s, a)
# The estimated Q-value: Q_esti = Q(s_old, a)
# The real Q-value: Q_real = R + gamma*max(Q(s_new))
# Difference: diff = Q_real - Q_esti
# Then update the Q table by: Q(s_old, a) += alpha*diff
# Deciding the action is after t... |
aec8b0e5b7a9dceaead55424e965d40c2cd6d426 | c21c8cba94f4f73aa23de98e555ef77bcab494f0 | /GeeksforGeeks/Random-problems/all_character.py | 6c3740dbd7981d44c808f6fc878d43842be80705 | [] | no_license | hoatd/Ds-Algos- | fc3ed0c8c1b285fb558f53eeeaea2632e0ed03ae | 1e74995433685f32ce75a036cd82460605024c49 | refs/heads/master | 2023-03-19T05:48:42.595330 | 2019-04-29T06:20:43 | 2019-04-29T06:20:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 907 | py | all_character.py | from collections import defaultdict
def solve(s, lst):
cnt1 = defaultdict()
for i in s:
p = ord(i)
if i.islower():
p -= 97
else:
p -= 65
if p in cnt1:
cnt1[p] += 1
else:
cnt1[p] = 1
ans = []
for l in lst:
... |
130ad14ba529c445b9b553751654b6df20ae176f | 72a3f964a2aea31a3d56499ae8097e514233c684 | /nstorch/models.py | 82ab0166ae9ce8a93fb88221ad00a9aba95ac885 | [
"Apache-2.0"
] | permissive | maet3608/neuro-symbolic-torch | 09e152dc9fb78a3423f24a38f0dd678ad29047ec | 921e77569dd36904fe9ac99ef820a3d0379c71be | refs/heads/master | 2020-05-22T23:39:20.329950 | 2020-02-05T22:47:45 | 2020-02-05T22:47:45 | 186,564,092 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,649 | py | models.py | """
.. module:: modules
:synopsis: Neuro-symbolic Pytorch modules.
"""
import torch
import torch.nn as nn
from torch import Tensor
from torch.nn import Parameter
from torchsummary import summary
from nstorch.losses import mse_loss
class NSModule(nn.Module):
"""A neuro-symbolic module that is composed of sub-... |
5314060ae6bdfa7c557ed0b03bdfec136a620642 | 2d4c6f4a09e60becc56f4c592e64568c374ea222 | /gen1.py | 9753a9776482819baf86a7c68cdec845771ac92a | [] | no_license | stewrav/py1 | 6845c8f7e5ecb3e394d1f2a34ff30ae77bd96c81 | 265999d10543e7c5e38a554d015691a8414c24ef | refs/heads/master | 2016-09-15T08:01:29.343370 | 2016-04-12T12:08:35 | 2016-04-12T12:08:35 | 42,123,048 | 0 | 0 | null | 2016-04-12T12:08:35 | 2015-09-08T15:56:47 | Python | UTF-8 | Python | false | false | 129 | py | gen1.py | def first_n(n):
num = 1
while num <= n:
yield num
num += 1
sum_of_first_10 = sum(first_n(10))
print('10',sum_of_first_10)
|
e4b530e7532c6bbbecbd4c9793add69903897ecf | 20329e08af0389ebddaf0773e70cac084591a820 | /interface_py/optim/sgd.py | e22cffaf7e3c6c94e7afd45777d43c2c7ee27cc9 | [] | no_license | gpfworld/starXin | 8886e9c0ee960ffe730220b3854b7d62c0a1fa2b | 00e792496133412a443c0086611aa87a11146a8c | refs/heads/master | 2020-08-27T08:00:16.617503 | 2019-08-15T02:10:30 | 2019-08-15T02:10:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,129 | py | sgd.py | # @Time : 19-8-12 下午2:34
# @Author : Aries
# @Site :
# @File : sgd.py
# @Software: CLion
import numpy as np
from .base import Base
try:
from ..ndarray import gpu_op, ndarray
except ImportError:
pass
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9, use_gpu=False):
... |
e60067691ec14d181934edb04a75ac7c1bf2e673 | e0b1e99630521cdb807153806e560f537e921ec6 | /backend/alist/helper/singleton.py | 6018633acfb923a6520422d4a47f5428e2594e0e | [] | no_license | hapylestat/anime-library | 3fd285cef88b019fd13475cd4f663df70ebf0c01 | e592013b1537632280e871772a3f38309eba1f15 | refs/heads/master | 2021-01-19T05:49:53.875773 | 2015-12-09T06:46:21 | 2015-12-09T06:46:21 | 18,423,785 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | singleton.py |
class Singleton(object):
def __init__(self, decorated):
self._decorated = decorated
def get_instance(self):
if '_instance' in dir(self):
return self._instance
else:
self._instance = self._decorated()
return self._instance
def __call__(self):
raise TypeError('Singletons must ... |
e2dcb11062fa430b5aee74b994e42a640292b65d | a9cac73a2ff3f1033893dd3d800d89e264b6e13e | /semana_ti/entry/models.py | 19b2d429ef8dda275544f339ca9f86a3f57b354a | [] | no_license | PedroFagundes/semana_ti | cbed05edb33f6c13cee49eb171ba030670307ee8 | 1d9b11282ff3dfd569360514c8662e34037070c5 | refs/heads/master | 2020-05-21T14:55:32.682540 | 2016-10-04T11:43:18 | 2016-10-04T11:43:18 | 65,740,257 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 707 | py | models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from subscription.models import Subscription
class Entry(models.Model):
subscription = models.ForeignKey(Subscription, verbose_name='Nome')
when = models.DateTimeField('Quando', auto_now_add=True)
in_out = models.Positiv... |
a797d5b96699e3c1d5c5dbf558cd1267bd7f3ecd | 06e48c3825d4a4132b6c5be59771c77da9c9c9e0 | /Python/PyBank/pybank/main.py | 028810203a1bc54e1e1d3bd91bba1bdabf682e66 | [] | no_license | jiebai999/Pybank | 3cfb6dde5f326ba19aeb0def27893b51b938f91f | 44863404d68c56b9533f62af1071f81905421098 | refs/heads/master | 2023-08-28T16:59:22.133613 | 2021-11-06T21:45:29 | 2021-11-06T21:45:29 | 198,851,415 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,882 | py | main.py | import os
import csv
totalMonths = 0
totalRevenue = 0
avgRevenueChange = 0
greatestRevIncDate = "Date1"
greatestRevIncAmt = 0
greatestRevDecDate = "Date2"
greatestRevDecAmt = 0
totalRevenueChange = 0
csvpath = os.path.join('..', 'Resources', 'budget_data.csv')
with open(csvpath, 'r') as csvfile:
csv_header = next... |
fa0e2e3b60589a3026dfa3ea43911b2a85a66138 | 4024c25c90fb7c29953dbcb95c6b7ee208e3ed66 | /solutions/day_09.py | 61dcc61df99e11ee0a81429a3a60b2600bc0fe8d | [] | no_license | eignatenkov/aoc2020 | 01062c6a5efba56f091cd26a44b1c4ea8938fc17 | aa20cfd116a97c8cf257500dc43574eabbd659a4 | refs/heads/master | 2023-02-04T03:54:02.196060 | 2020-12-25T11:21:41 | 2020-12-25T11:21:41 | 317,534,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 589 | py | day_09.py | from tools.read_data import read_ints
import numpy as np
ints = read_ints("../data/input_09.txt")
for i, n in enumerate(ints[25:]):
prevs = ints[i:i+25]
diffs = n - prevs
if not set(prevs) & set(diffs):
print(n)
bad_number = n
break
for i in range(ints.size - 1):
cumsums = np... |
0d8136146b518a9d9ecfdc35446e79552001a52f | 978ff8c77684f56774a56f74242384ecc64a14eb | /9th.py | e675cacaa8ff019fb229d3faef3df392127d5baa | [] | no_license | sandhyaramavathu/pythonprograms | 16c573712d4e10d12e6f97613209baa0258b441f | 91407c47000bb13a68f9cdaa3742db734f4f4296 | refs/heads/master | 2020-03-26T23:35:49.717441 | 2018-12-15T07:43:07 | 2018-12-15T07:43:07 | 145,554,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | 9th.py | # your code goes here
low,upp = map(int,raw_input().split())
count = 0
for num in range(low,upp+1):
if num > 1:
for x in range(2,num):
if(num % x == 0):
break
else:
count = count+1
print (count)
|
d8d406cef7f87d5a3991c9f7bb720cace003fe7a | fbd9e3e42cc8c79982adecfe7057ab3bdc9d16a8 | /Python/Matrix Operations/Diagonal_Traverse.py | 9942b86bd33cccf3839e9d1573b5244b65355746 | [] | no_license | pvpk1994/Leetcode_Medium | 13dd0633d77be09071a2f1e3ef3e2637b3bb579d | 1d6b47c1498bfc21824e59993fbfcc65833618a2 | refs/heads/master | 2023-07-19T12:21:11.745303 | 2021-09-12T15:43:50 | 2021-09-12T15:43:50 | 282,114,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 930 | py | Diagonal_Traverse.py | # Traverse along the Diagonal
# Author: Pavan Kumar Paluri
# Leetcode Question: https://leetcode.com/problems/diagonal-traverse/
# Time Complexity: O(N*M) and Space Complexity: O(min(N,M))
class Solution:
def findDiagonalOrder(self, matrix: List[List[int]]) -> List[int]:
if len(matrix)==0:
retu... |
e19ee8ee70915c584bf54ad282fc3d28381e725a | 92a00fb9e90f38a022bb004ab7e331932c899d9c | /Newwork.py | 7d57345566ddb5ca0a5d06ae6a60aefbe3c6c586 | [] | no_license | FumzyH/Assignment_2 | 614d13589e8255145e4124a8ffa2e474c0d56afb | 4a7046e3aa650f7d78fddb8975092581c572abe4 | refs/heads/master | 2020-07-01T06:32:11.490084 | 2019-08-07T15:11:01 | 2019-08-07T15:11:01 | 201,076,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31 | py | Newwork.py | R = 2
b = 4
D = (2*4)
print(D)
|
0c5afbdb15ecd2d80161b664214f0f9ec314b25a | a022b6c2090a02bbdd6069ca4e07b88d46652760 | /tests/integration/test_scmrelease_view.py | 3ed635b404cea09b1e46748445cd02917e9574ae | [
"Apache-2.0"
] | permissive | okiniri6/katka-core | df7fd0da8ed59ea5d534b02ebbce973991c1607a | c9d63c90db6df639352b99d823a7313b11a31848 | refs/heads/master | 2020-05-07T10:13:26.317664 | 2019-04-09T07:53:12 | 2019-04-09T07:53:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,282 | py | test_scmrelease_view.py | from uuid import UUID
import pytest
from katka import models
@pytest.mark.django_db
class TestSCMReleaseViewSetUnauthenticated:
"""
When a user is not logged in, no group information is available, so nothing is returned.
For listing, that would be an empty list for other operations, an error like the ob... |
88935f59fd2ff7ac969ad9e06eddc259f38fe60b | 7bda67fbaeed5d85c3b66eab880697ff04375518 | /watcher_tempest_plugin/tests/api/admin/test_audit.py | 818933d6ddbc3f22c86a350deeb6c68c08dac725 | [
"CC-BY-3.0",
"Apache-2.0"
] | permissive | openstack/watcher-tempest-plugin | cb45ea13c99adc15e38267f406db8f6cf6668232 | 92ca984a8de525b47eff940f47d7d103ba573d17 | refs/heads/master | 2023-09-01T02:51:18.453847 | 2023-08-16T01:11:14 | 2023-08-16T01:11:14 | 99,956,239 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 10,713 | py | test_audit.py | # -*- encoding: utf-8 -*-
# Copyright (c) 2016 b<>com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
e6bab7f4fa0afab7d47a4c5f23b59e61aaecff34 | e1a6c56617fe867c19905da4f51e1e812fc1bb62 | /muninn/remote.py | 847205128ca0837def5562e5cef09952154f54ae | [
"BSD-3-Clause"
] | permissive | stcorp/muninn | fedf9e52ced2aae03f20ea1edd47ce8c0eb516e5 | 8d8744038f994ab4b3d1831195b08c4c543be9c1 | refs/heads/master | 2023-09-01T08:04:14.885018 | 2023-08-24T13:01:58 | 2023-08-24T13:01:58 | 86,570,064 | 7 | 5 | BSD-3-Clause | 2023-01-10T16:41:10 | 2017-03-29T10:39:39 | Python | UTF-8 | Python | false | false | 13,063 | py | remote.py | #
# Copyright (C) 2014-2023 S[&]T, The Netherlands.
#
from __future__ import absolute_import, division, print_function
import logging
import os
import re
import json
import ftplib
import tarfile
import zipfile
import muninn.util as util
from muninn._compat import urlparse
from muninn.exceptions import Error
class ... |
fa73c88f7149662ad93e8c92297c070f4d141260 | c91d29dba4b653a5612ffed10b5ebf5f8311f190 | /bot/tests/test_battlecalculator.py | 87ffbeb886352b18aaa7e7fb051f5dd784e492a5 | [] | no_license | sobolews/BillsPC | 2ce36dbfb687e5c4a0ac0bb9b83641e551b4dfbb | d1e2fd8cea4f39d9f5c165ec8732293ff107cdab | refs/heads/master | 2020-04-06T03:33:24.695001 | 2016-09-10T07:26:05 | 2016-09-10T20:33:21 | 42,156,792 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | test_battlecalculator.py | from bot.battlecalculator import BattleCalculator
from battle.moves import movedex
from tests.multi_move_test_case import MultiMoveTestCaseWithoutSetup
class TestBattleCalculator(MultiMoveTestCaseWithoutSetup):
def test_calculate_expected_damage(self):
self.new_battle('vaporeon', 'leafeon')
bc = Ba... |
0827ab2f4f267bce8d4c56e5ce186c562ae2b361 | 946ded37631c3f54a73c9577f7f733b034b13f93 | /alice/onboarding/enums/document_source.py | 63d866fd2f8487d21edb089e0aa65a63df800b1c | [] | no_license | alice-biometrics/onboarding-python | db515fce1afaa361af9022a6a56459209145960c | 9f50a6b3a16289d69b6c7d0f843dccaf763427f3 | refs/heads/main | 2023-09-04T03:52:00.229448 | 2023-08-23T14:54:22 | 2023-08-23T14:54:22 | 239,815,144 | 12 | 2 | null | 2023-09-06T11:02:22 | 2020-02-11T16:53:02 | Python | UTF-8 | Python | false | false | 92 | py | document_source.py | from enum import Enum
class DocumentSource(Enum):
file = "file"
camera = "camera"
|
3b0ec1893aa43111cd2348c49449f71e3b049f07 | 36dfe29989de2005f5ad8f61b7575e16bc7f46ed | /Blue/DSU/War.py | 0c451cd01d6dc88d4538ba3d4ec535b4e86e32a8 | [] | no_license | chrislevn/Coding-Challenges | ca17e26476a721ca855fef6e2e1587148758dde5 | dee52baaf5d15046a901b174e8b319deaa1c6107 | refs/heads/master | 2022-03-26T00:05:09.817752 | 2022-02-03T17:37:53 | 2022-02-03T17:37:53 | 242,436,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | War.py | MAX = 10000
parent = []
ranks = []
def makeSet():
global parent, ranks
parent = [i for i in range(MAX * 2)]
ranks = [0 for i in range(MAX * 2)]
def findSet(u):
if parent[u] != u:
parent[u] = findSet(parent[u])
return parent[u]
def unionSet(u, v):
up = findSet(u)
vp = findSet(v... |
1e1841116ae1b1ece26287486cbb4bc8256a72f0 | c577e25fcb3d0446fbb62499aeefa9ebb0cea2d6 | /Adv5.py | e33851d8118893e38ae27a3f2fe87a4b3b62bcaf | [] | no_license | barrypearseburke/DIT-Advanced-Security | f4fc019727fa4d3f9af6eded8285451b2250d43e | 36c8da4d6e1fe3d9b7f664340c33a1db0a4ae6a8 | refs/heads/master | 2021-03-27T10:08:51.479237 | 2017-08-13T17:56:26 | 2017-08-13T17:56:26 | 68,091,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | Adv5.py | m =11*19
xi = 9
def rng():
global xi
xi = (xi*xi)%m
return xi
#output q1
for i in range(12):
print(rng())
#output of running this is 81
# 82 36 42 92104 157 196 169 137 168 9
#question 2
from RandomnessTests import RandomnessTester
Bitstr =""
for i in range(120):
Bitstr += bin(rng())[-1:]
rn... |
a5c7a472c3b0aebfb2efcdd584332cd299e3da5d | 3b2e7799075dc2155703aab3ac306626be7b6296 | /Revision 5.py | 806d806c8a90d5bbfccf76dc07a5dc5b3cc7827d | [] | no_license | Indi44137/Iteration | 702d5fe449f3aaadb6610bf80afa3556be65202d | ccaef6acac456f6efa8710080c1604ae5e657af9 | refs/heads/master | 2021-01-19T14:07:17.193343 | 2014-11-10T12:18:51 | 2014-11-10T12:18:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 466 | py | Revision 5.py | #Indi Knighton
#20/10/2014
#A program asking the user for a series of numbers and a rogue value and print the average of the numbers
result = 0
total = 0
for result in range(0,5):
result = int(input("Please enter a number here: "))
if result >= 0:
total = total + result
elif result < 0:
... |
d483e5fe0e492aa35c1b6ec617cf7e5f7ea42c10 | ea3e35eb82436bfa1e544346267b126bd80888e6 | /get_top_1000_language_list.py | 9d91ecc1a4e9eafbd9814a57d1f0b28d53afebd2 | [] | no_license | amazingguni/commits-dataset | 5800ed7c9624d036c0e286b7e6e14887ed6d261e | 688eea9b1906859e2538cd8eda50dac82b006738 | refs/heads/master | 2022-11-29T18:14:43.623696 | 2020-08-04T08:03:54 | 2020-08-04T08:03:54 | 261,342,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,052 | py | get_top_1000_language_list.py | import requests
def main(language, token):
fullnames = []
for i in range(10):
page = i + 1
print(f'download page {page}')
query = f'topic:{language} language:{language} stars:>0'
url = f'https://api.github.com/search/repositories?q={query}&sort=stars&per_page=100&page={page... |
09321fdaa906a7a9c099fe94effabf139b76331c | c8f48077f310bb4bffdfdb0cc8da95d4a74f23b4 | /Fases/FaseLabirinto.py | a0b9cae195798147cd3e563c8971a29362a01bbf | [] | no_license | MatheusFBBueno/nome-a-definir--pygame | e5543aa9b32a615df9c12c489d06d14b4d534e2c | 6acd00bf97f82aa89cc4803965d9a4c57bd3c88e | refs/heads/master | 2020-05-30T12:49:11.826964 | 2019-06-22T22:29:00 | 2019-06-22T22:29:00 | 189,744,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,640 | py | FaseLabirinto.py | import pygame
from Fases.player import Player
from Fases.wall import Wall
guy = pygame.image.load('images/dood.png')
camac = pygame.image.load('images/bed.png')
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (50, 50, 255)
LIME = (26, 242, 152)
#NADA = (255, 255, 255, 0)
marrom_bombom = (188, 100, 28)
SCREEN_WIDTH ... |
8cdfa721829103557419064de8b2c34e1b0cfc62 | 9b47c05bd713d456132f1fa9143f52dabd2c6e3c | /Testing/extract_bursty_issues.py | ede6f1a6ef5d4366101bf3284b5e27fd97d3a3b2 | [] | no_license | samridhishree/github_linguistic_cues | bea514a2f970555af3de9a276a8325da59939b73 | 4d59e9df32c4ef1977215d800d75c24ece37e1e1 | refs/heads/master | 2020-03-25T16:53:32.811015 | 2018-08-09T18:32:03 | 2018-08-09T18:32:03 | 143,952,617 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,879 | py | extract_bursty_issues.py | '''
Extracts the issues belonging to the bursty periods for projects
'''
import os
import sys
import csv
import glob
import calendar
import cPickle as pickle
import pandas as pd
from collections import defaultdict
from datetime import datetime
import argparse
csv.field_size_limit(sys.maxsize)
parser = argparse.Argum... |
6884b6b1d068f7c92ed2968d6dccaf51d3fb1fb1 | 88235bd706da63c66dba589b8d7a7742f89e60ac | /HackerRank/MediumTasks/TheBlindPassenger.py | 80b1926a954b3b8d447bd040cb8f0bba9cabd1af | [] | no_license | krzysztof-piasecki/python-hackerrank | ada15eedec8341e7fd02291b3ececd28410d2162 | c356e7ae388045a29c13735369c867ea1cb26481 | refs/heads/main | 2023-07-10T00:11:30.490207 | 2023-06-22T12:32:05 | 2023-06-22T12:32:05 | 311,722,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | TheBlindPassenger.py | import math
number_of_test_cases = int(input())
for i in range(number_of_test_cases):
seat_number = int(input())
if seat_number == 1:
print("poor conductor")
else:
row = (seat_number + 4) / 5
position = ""
if row.is_integer():
row -= 1
if seat_number % 10... |
a1c035842020c874e3d8a44293ecdefe38db413d | 5629b4722d9650e8ca01e2a401edb279ab8e69e9 | /gusPyCode/Solexa/sortDEGout.py | 5f741a1d7e564bce0fbed286d54899f6062ac9c3 | [] | no_license | xguse/gusPyProj | 193c5872cbe03550436668035c79c47f0ae4f312 | e2d2119c208ad383c92708f4fad3142de95d224f | refs/heads/master | 2021-01-19T14:29:42.053306 | 2011-07-23T15:50:23 | 2011-07-23T15:50:23 | 345,724 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 939 | py | sortDEGout.py | import optparse
print '\n\n'
# --------- Process User Input ---------
usage = """python %prog inFile [xtraFile xtraFile]"""
parser = optparse.OptionParser(usage)
(opts, args) = parser.parse_args()
if len(args) < 1:
parser.print_help()
print '\nERROR: Please supply at least 1 inFiles.'
exit(1)
# -... |
0d9f8036ed4a45ca0dcdd9f52298afc85c720da6 | 2337351b228818e41be3002bd38f68f77c2aa074 | /tests/core/models/test_escalationpolicy.py | d11c6ca710fd25cdc32b9774e81462fa2a22e202 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 2,651 | py | test_escalationpolicy.py | # ----------------------------------------------------------------------
# EscalationPolicy tests
# ----------------------------------------------------------------------
# Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Pytho... |
04262e3c1c8f907a013f430337bf18fe2896283b | 508968c1a4713f78870151c2efb720d811f7efa8 | /Vis/RegressionHydro2d.py | 905b6a3e14ca3342db1fe6ec4d4b01ae579f5d3e | [] | no_license | jzrake/Mara2 | 9734666344d05234e5d682c11d7eb5353bcb9aab | 9fda99aa086b4a131e16c448c5238b5739551946 | refs/heads/master | 2021-01-20T12:52:05.490247 | 2019-03-24T03:16:43 | 2019-03-24T03:16:43 | 90,419,726 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,326 | py | RegressionHydro2d.py |
class MethodOfLinesTVD(object):
def plot(self):
figs = [ ]
for scheme in ['pcm2', 'plm2']:
try:
figs.append(self.with_scheme(scheme))
except IOError as e:
print e, "for scheme", scheme
return figs
def with_scheme(self, scheme):
... |
6375592dc59036999199b2899b7df894ab2e0bf5 | e8fa798b5a67b902313b3d7144a41a719d53261c | /TestVscodeDebug/hello.py | 7eae4b7a3a61a55cf9c6283dd60ecc0454e2b375 | [] | no_license | ttom921/StudyPython | 322c0827f9d162c3a608100df6040989fb7b28d2 | c0b9081ca9919d8ef1e8ad8e3039aab21c9c1a43 | refs/heads/master | 2023-03-06T22:54:08.941450 | 2022-11-21T01:43:33 | 2022-11-21T01:43:33 | 183,985,647 | 0 | 0 | null | 2023-03-02T18:48:57 | 2019-04-29T02:24:06 | Tcl | UTF-8 | Python | false | false | 2,537 | py | hello.py |
# calobj=calendar.monthcalendar(year,month)
# print(type(calobj))
# print(calobj)
# msg = "Hello World"
# print(msg)
def __getEpochTime(year,month,day):
import datetime
import calendar
import time
strtime=f"{year}-{month}-{day:02d} 00:00:00"
# 取得GMT的時間
dt = datetime.datetime.s... |
f8f79f60df7569b791e75d217d24a26d00d29613 | 8986cedd2301b934dec77db7c0b89f3cb6b9a2f8 | /iceeg/bad_epoch.py | 8ee02aaed02c2d36d8b0bb083aa44d88f16a871e | [] | no_license | martijnbentum/iceeg | 7386dbb4361b14931e57e2a48d25e94d8cb9469b | f77194bda0faab2d83a32edf62e0540e27562b76 | refs/heads/master | 2021-06-21T00:42:26.301438 | 2019-08-28T14:26:40 | 2019-08-28T14:26:40 | 85,686,277 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,040 | py | bad_epoch.py | from matplotlib import pyplot as plt
import copy
class Bad_epoch:
'''Object to store information about streches of EEG data that have artifacts.
Contains boundaries (object) of type start and end with start sample with respect to start block
Contains info about participant id experiment type block number and start ... |
26937e7c962051ba7497e48569f5a8b52f95d29c | 17fc011c6e8518ff23298299f60093055017fa3d | /Homework2/draw_2.py | eb31dda07514f9a91e8fe271d91d38897e9f5ad3 | [] | no_license | nmdatt/NguyenManhDat-D4E17 | a46c81a450bb7c22800e7d2d6775b55c533bbf7c | 824cbb0ba07ae459d2b0585b8d215ba35dcf204b | refs/heads/master | 2023-01-12T17:51:59.286050 | 2020-11-16T09:54:56 | 2020-11-16T09:54:56 | 309,283,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 223 | py | draw_2.py | from turtle import *
for i in range(3,7):
for j in range(i):
if (i%2==1):
pencolor('blue')
else:
pencolor('red')
forward(100)
left(360/i)
mainloop()
|
6c48bcfd90bb2aaabb6f842d35ebf26dad54391c | 24091ce7bbfecbeacbc3f4da655d866cab886b56 | /tests/unit/test_locator.py | f653b3cd493533d92373bdb86c9d1703e2184acd | [
"MIT"
] | permissive | lukas-linhart/pageobject | 7acef47d0db44d3742f8a5e2a2121e58cc68c25b | 6ae83680ae62a94f93cefc394e4f3cc6999aeead | refs/heads/master | 2020-04-15T16:25:28.104172 | 2017-02-06T16:17:42 | 2017-02-06T16:17:42 | 68,078,350 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,372 | py | test_locator.py | import pytest
from pageobject.locator import Locator
from pageobject.pageobjectbase import PageObjectBase
from .fixtures import mock_locator
def test_constructor_inits_parameters_correctly():
xpath = "//body"
locator = Locator(xpath, page_object=PageObjectBase())
assert locator._initialized_value == xpath... |
70b96f266e0cf0a16c0dfb2a7ec454072936e0a2 | b0012e9e4680a10dc6b5298226e6a8f0a595117c | /coursera exercises/fib.py | 880feefbd4189b4debc41636160ee9bbd3bbf574 | [] | no_license | pitcany/practice | ef385839c522c74eeb442564b468ece10f687953 | 1ab692830640636ed8c4d336409f5359ec3a8733 | refs/heads/master | 2022-07-17T17:23:46.784225 | 2022-07-17T05:27:33 | 2022-07-17T05:27:33 | 170,180,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | fib.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 22 02:00:56 2019
@author: yannik
"""
def calc_fib(n):
if n <= 1:
return n
previous = 0
current = 1
for _ in range(n - 1):
previous, current = current, previous + current
return current
if __name__ == '__mai... |
528efbc7d5ee337e20bb21361081436a4eff92af | 68a7183340d2e2141409852905e87083bcd2ce44 | /run.py | f882a4c0808d05aee3b380935a5cbc693a403797 | [] | no_license | carsayao/lonr | db2b26bbd6acaae637662f9f6bd693657ef7a458 | 644e43e777a7ff893ed937467a99db4bc6e48413 | refs/heads/master | 2021-05-17T09:11:31.572524 | 2021-03-17T07:48:02 | 2021-03-17T07:48:02 | 250,721,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 897 | py | run.py | from markov import generate_message
from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
app = Flask(__name__)
socketio = SocketIO(app)
def ack():
print("\t[+] Message was received")
# Render page
@app.route("/")
def index():
return render_template("public/index.html")
# ... |
11646057602d1607973dcdd0a21017a49a157980 | 37e04d0336c8f2fefecefa092557213e89f9cfb5 | /course_picker/views.py | 4f0a1e21ddeb6bb52306fcd1b11761bbf0de9c1d | [] | no_license | projectHolsey/course_picker | 6b86df4cbf6ea18a66384e59517d79149605aa61 | 02265a05937f904204405d802f545f4b99236591 | refs/heads/master | 2023-06-23T18:42:28.709418 | 2021-07-27T22:07:01 | 2021-07-27T22:07:01 | 389,777,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,941 | py | views.py | import csv
import os
from django.shortcuts import render
from django.views.generic import TemplateView, ListView
from django.http import HttpResponse, request
from .models import CourseContent, Prof, Spec
# Create your views here.
# def HomePage(request):
# return HttpResponse("Hey Mara")
class HomePage(ListVie... |
7ad81d0d86075ceae6909f3e210c729017a3f107 | bdc40ff6aa0167a0b5670ab26392b8a6c6986490 | /QLearn_Func.py | 7edb0da2d22c37018cce9a324152441192cf17c8 | [] | no_license | MaxLikesMath/DeepLearningImplementations | 8f9b0f9bb975b301a5894875b38608779f1a676e | 5819bd33ebbc5d48fdc18c09ddbcb639f9b5196b | refs/heads/master | 2021-10-10T10:47:58.756541 | 2019-01-09T19:12:00 | 2019-01-09T19:12:00 | 119,410,929 | 14 | 7 | null | null | null | null | UTF-8 | Python | false | false | 1,828 | py | QLearn_Func.py | '''
This is a quick and dirty Q-Learning function for exploring the concept. It runs the Frozen Lake environment, and can run most other environments
if the observation and action spaces are tweaked. That being said, there are much better algorithms for reinforcement learning, and a lot can be deployed
easily usin... |
93a9993d62d0cf78632ee85ca69ef6100ee0ca5a | 67c1c1e5b25b04d983239dcd0878c8e9dc681f6c | /solutions/python_assignements/check_similarity.py | 0228d4da1b4a6fbee4bfc6e2bdaee07aad1540fe | [] | no_license | ShadowOst/data-science-for-everyone | 5857ea2be74f97e6f5d35d2a05c6ca5dc9469218 | d5f15819f83709bb6f3d01f75d0b94d0c9d34fa4 | refs/heads/master | 2023-04-08T00:23:29.855660 | 2020-06-11T02:58:26 | 2020-06-11T02:58:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,190 | py | check_similarity.py | import re
import pprint
from stop_words import stop_words as sw
file_name_melina = '/Users/asabeneh/Desktop/projects/data-science-for-everyone/datasets/melina_trump_speech.txt'
file_name_michelle = '/Users/asabeneh/Desktop/projects/data-science-for-everyone/datasets/michelle_obama_speech.txt'
def clean_text(file_name... |
6d3d00bd386c19bc35a04f11b71b12d79fe7fbf9 | a400aeb4f56e4904e6a5118dc524e3583864637c | /xo/template/__init__.py | 071367bb78511360276499b5bccb62647436a356 | [] | no_license | GitGaryHuang/xml-ormz | 78a0d0b9880d503134846ded58d74ca47ef18a22 | 10840ec7070df70b3fb18b4094166dc437bbcdf7 | refs/heads/master | 2020-07-22T13:27:31.204324 | 2019-09-09T08:23:25 | 2019-09-09T08:23:25 | 207,217,056 | 0 | 0 | null | 2019-09-09T03:33:32 | 2019-09-09T03:33:32 | null | UTF-8 | Python | false | false | 46 | py | __init__.py | from .generate import generate_pycode_from_xml |
70418bad426aff27da643b6d01b7f80671882f15 | 7fe3a9cd066e2cdb73f9b7fd9e86dfe8ad92d040 | /EmailPC/EmailPC_FW.spec | cad674e43e58b0886442e58b79828161ab04f169 | [] | no_license | MagicalBomb/EmailPC | 5defe9896d229500fbbf50d25e0c65dc846b3ba2 | d5bdce6fc58e1470f30f1787514428a7a7bc9e36 | refs/heads/master | 2021-01-12T07:47:46.649174 | 2017-03-14T14:28:22 | 2017-03-14T14:28:22 | 77,018,266 | 1 | 0 | null | 2016-12-21T05:39:16 | 2016-12-21T04:41:57 | Python | UTF-8 | Python | false | false | 1,638 | spec | EmailPC_FW.spec | # -*- mode: python -*-
# -F -w
block_cipher = None
a = Analysis(['C:\\Users\\Magicalbomb\\Desktop\\Work\\myPyLab\\Projections\\EmailPC\\EmailPC.py'],
pathex=['W:\\Tools\\Python\\Python3.5.2_64\\Scripts'],
binaries=[(r'W:\Tools\Python\Python3.5.2_64\Lib\site-packages\PyQt5\Qt\bin\Qt... |
c3c5fc9cd44d247926e41a9df1e6da075a375281 | beb27b177ba136040a39312a1ffc6c08ae6743a2 | /tests/test01.py | 55bdd57b38aca2850b5b737272ad1954bc16a553 | [] | no_license | jeremyferguson/pygrad | 054546d829f9ffce98105198348e5b240c80d5cc | a9db158dd87283d7e1cf9558194093b525f7cb50 | refs/heads/master | 2023-01-29T03:50:02.798001 | 2020-11-30T01:28:52 | 2020-11-30T01:28:52 | 282,481,921 | 0 | 0 | null | 2020-10-31T18:03:53 | 2020-07-25T16:26:59 | Fortran | UTF-8 | Python | false | false | 2,888 | py | test01.py | import unittest, os
from Pygrad.Pygrad import Pygrad
from Pygrad import utils
#A class to test the setup and density functions.
class TestSetup(unittest.TestCase):
pygrad_home = os.getenv('PYGRAD_HOME')
setupErrorPath = pygrad_home + '/tests/errors/setup/'
densityTestPath = pygrad_home + '/tests/fortran_te... |
79d818cd3759f06d4b22de02abc867df5202e39b | a68ed98a1dc0a8946c6a5f59acc24318000383f6 | /xoto3/cloudwatch/metrics.py | b53169f33fa022f978c6276e9d2b20f6109d7e70 | [
"MIT"
] | permissive | petergaultney/xoto3 | 686a78a479a38ade3f1fafd73bdcd933d7782161 | 50a77661953ec7f97bb9bb6ad82ae1e7774a5c20 | refs/heads/main | 2023-06-29T13:54:30.959841 | 2021-07-22T20:20:36 | 2021-07-22T20:20:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,524 | py | metrics.py | """Wrappers for CloudWatch metrics"""
# References for much of this can be found at
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudwatch.html#CloudWatch.Client.put_metric_data
import functools
import typing as ty
from datetime import datetime
from logging import getLogger
import bo... |
1a2a92fc6348f1fd61714acdebea8aa75d082018 | 607226451dd639c5206ad416e721af23d85f1102 | /aguacate/usuario/models.py | d1e24c5d1b935b650a4a14d745a433c10c131fc1 | [] | no_license | Dudin13/Prueba-Django | a70b20922e879f818dd95986480a72ce6163fa48 | 59a9eab784f4e39cbe3083154847115b6f6f1a8d | refs/heads/master | 2023-03-20T19:40:46.291647 | 2020-11-26T19:21:02 | 2020-11-26T19:21:02 | 316,316,701 | 0 | 1 | null | 2021-03-21T09:23:23 | 2020-11-26T19:07:53 | Python | UTF-8 | Python | false | false | 730 | py | models.py | from django.db import models
# Create your models here.
class Usuario(models.Model):
username=models.CharField(max_length=250)
email=models.EmailField()
password=models.CharField(max_length=30)
class Idea(models.Model):
private=((1,"publica"),(2,"protegida"),(3,"privada"))
texto=models.CharField(... |
d17ecb0d86a2e858cb0b2cd9c93602cff7cd1570 | 9819acdc600a80b630304212c195ffb3c9424d3d | /parsers/PathTagParser.py | c1959a521186249d3c36f087ad357b11031e4108 | [
"MIT"
] | permissive | thinking-binaries/pyparsers | cea755bf5bac3fcdabf91ff3ce83daf9aa4bf188 | 41e6e5c807959ff18c2f625f3d9b67e669132390 | refs/heads/master | 2021-08-08T03:26:26.727492 | 2017-11-09T13:22:44 | 2017-11-09T13:22:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,958 | py | PathTagParser.py | # PathTagParser.py 10/04/2014 D.J.Whale
#
# Based on ideas from around 2008
# Turn tags into hierarchical paths, for event filtering and processing
import os
from .TagParser import TagParser
def trace(msg):
print(msg)
def error(msg):
print("ERROR:" + msg)
class PathTagParser(TagParser):
... |
fd04e790f5e5203a32c0def4fff092200573df7b | 7114b6966955f2d6f3980bde211e88d74632cbd5 | /dutymanager/test.py | 3e868fd4b0084b787119335e62d088b542082d2d | [
"MIT"
] | permissive | Nikitolpl/IDM_mod_2_0 | 9ee3b9b1584db533121b80df870c893a08ee3122 | e6de0eb0008611cb2d2546af80f8212638d898e5 | refs/heads/master | 2023-04-17T22:28:59.620378 | 2020-05-15T13:12:51 | 2020-05-15T13:12:51 | 264,192,964 | 0 | 0 | MIT | 2021-05-13T20:52:12 | 2020-05-15T12:53:36 | Python | UTF-8 | Python | false | false | 453 | py | test.py | from vkbottle.user import User, Message
user = User("da0f2da472f050977ddfc33dec8d5414797371305081a3ef009a631d139cd2bd5d9c3a7bdea06616824e8")
@user.on.message_handler(text="!лп тест")
async def wrapper(ans: Message):
print("Что-то получиили")
await user.api.messages.edit(
peer_id=ans.peer_id,... |
ffbb4201cfb331ef44304d38fdd9a69af9949271 | e4bcac7835e2fb0e5608303f53b027f33f8aa4bc | /live feed background subtraction.py | bb2cf685d7c385339df8a4b54a56dfe1c9534ccb | [] | no_license | harshitherobotist/OpenCv | 62f338fc7f5278c2b05e0216782235598740c158 | 52f1dda8f95089c72395610d1b5e45ee3d3acdc4 | refs/heads/main | 2023-04-04T19:06:32.571555 | 2021-04-06T04:35:52 | 2021-04-06T04:35:52 | 346,603,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | live feed background subtraction.py | import numpy as np
import cv2 as cv
Feed = cv.VideoCapture(0)
Check = Feed.isOpened()
if(Check):
boolReturn,frame = Feed.read()
while(boolReturn):
boolReturn,frame = Feed.read()
Background = frame
cv.imshow('Video Feed',frame)
key = cv.waitKey(1)
... |
45780a8a8244c6b6db585c89ad30cca6b54a3e12 | c5bbd7fdf894e6b47158ba9db7392e87d4c16389 | /solver/basesolver.py | 9d7a5c9ead495585fc7b8e8f8f89dde9bb0917ea | [
"Apache-2.0"
] | permissive | petch/simulator | 90adbc3c7648c58dd7484da819df53bf24e6fee4 | d2af2dc0c03809dc3fa3f5ffc31cad9dc2d4cb19 | refs/heads/master | 2020-05-25T10:53:02.995080 | 2019-05-21T05:34:29 | 2019-05-21T05:34:29 | 187,768,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,277 | py | basesolver.py | from .common import *
class LinearSolver(Enum):
default = 0
mumps, petsc, superlu, umfpack = 1, 2, 3, 4
bicgstab, cg, gmres, minres, richardson, tfqmr = 5, 6, 7, 8, 9, 10
class Preconditioner(Enum):
default = 0
none, icc, jacobi, ilu, sor = 1, 2, 3, 4, 5
amg, hypre_amg, petsc_amg = 6, 7, 8
... |
168b99336a94d75b15ff356089d284edad8ef0d4 | 5fc3beafdf52a92b4bf98f8b2c6aca8aaddcc4c5 | /needleman_wunsch/bundle.py | 71267e37eaf0314f7b90ad5f5c3749da3d5e3d7d | [] | no_license | france-dagrain/python-eval | d40053fa843f9381806537f74c7e5c369b51170e | c6daabcc9b2319559ea07fa2ce1775d0b3b15342 | refs/heads/master | 2022-04-12T06:46:39.181551 | 2020-03-31T21:31:26 | 2020-03-31T21:31:26 | 251,041,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | bundle.py | import numpy as np
from colorama import Fore, Style
import os
os.chdir("C:/Users/Lenovo/Documents/GitHub/python-eval/needleman_wunsch")
mon_fichier = open("DATASET.txt", "r")
#on le lit avec read.
import ruler
from ruler import Ruler
contenu = mon_fichier.read()
contenu = contenu.split()
print(contenu)
i=0
while i < ... |
071a39c19f562d296e196662d992d157bf56f2cf | 3cf965dfb4dd72fd3b55ed27fd2d5d2ad0213870 | /Extra Fun/battleship.py | 63a0c25eca7de31b567be2c7751496e1249180bb | [] | no_license | mjain2020/Moreau-python-class | 182e6a06e1ce5a3088cef34c7b2cd51a1465ceca | 49e015a70747ff1ee915ea6e38ffff74bcfd9ebf | refs/heads/master | 2020-06-05T08:38:18.350990 | 2020-01-13T21:54:30 | 2020-01-13T21:54:30 | 192,379,277 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,511 | py | battleship.py | from blessings import Terminal as term
from random import randint
board = []
for x in range(5):
board.append(["O"] * 5)
def print_board(board):
for row in board:
print(" ".join(row))
def random_row(board):
return randint(1, len(board))
def random_col(board):
return randint(1, len(board[0]))
def ge... |
9bd27d95806fb28608d3177e1a5233d886122b80 | 831164b1f1b3d6ed7e2d48db397b831e7d445a39 | /src/grocsvs/stages/sv_candidate_regions.py | 49e4a3665f89c9048ca5e2382a1610c1cdb5423d | [
"MIT"
] | permissive | grocsvs/grocsvs | c8959066829a9076b2ab5f3f3bb06095d31414dd | ecd956a65093a0b2c41849050e4512d46fecea5d | refs/heads/master | 2022-07-06T04:53:49.282885 | 2020-01-17T12:36:16 | 2020-01-17T12:36:16 | 67,724,321 | 40 | 9 | MIT | 2022-06-21T21:12:00 | 2016-09-08T17:16:48 | Python | UTF-8 | Python | false | false | 7,450 | py | sv_candidate_regions.py | # import gzip
import h5py
import itertools
import numpy
import os
import pandas
from grocsvs import step
from grocsvs import utilities
from grocsvs import structuralvariants
from grocsvs.stages import barcode_overlaps
class SVCandidateRegionsStep(step.StepChunk):
"""
Takes the matrix of barcode overlaps an... |
9e44b60bc2a8e769e4fe2fdd7f9abbe6bf73a7e0 | 9dda2acd3e0d132a36858feba955509e64eaae6e | /py/readAndHackHoltz.py | 865775dcb2baf9ff47d84b0be08aeb3044a690dd | [] | no_license | jobovy/apogee-rc | 1680dfd654cc82b2806a66538481cc635bf6084a | 39ecc554aea6830d27c1952ef3ee1163d111093a | refs/heads/main | 2022-12-01T00:29:38.828965 | 2016-04-12T22:55:08 | 2016-04-12T22:55:08 | 40,669,619 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | readAndHackHoltz.py | import esutil
from galpy.util import bovy_coords
import apogee.tools.read as apread
def readAndHackHoltz():
alldata= apread.allStar(adddist=True,distredux='v402')
jk= alldata['J0']-alldata['K0']
data= alldata[(jk >0.8)*(alldata['DISO_GAL'] > 0.)]
#To allow for XY pixelization, we will hack these
dat... |
ad7bb5bbb18a09fd9f9f0a8893161a5330701c95 | 40fa1a8c27d18232b47e488b758835933206264b | /meal/views.py | 9e632c7f863570f9775de99f7b6b90dad604e1a7 | [] | no_license | Seo-yul/school_meal | 7ab091c0393a57bf51861165e2da811ad4640e6a | ad39706d80b9da255081cc013f062661addd6eba | refs/heads/main | 2022-12-24T15:39:13.496447 | 2020-10-06T14:27:42 | 2020-10-06T14:27:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,844 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
from concurrent.futures import ThreadPoolExecutor
from meal.api.openAPI import SchoolInfo, MealInfo
from meal.DBmanager import School_Info_DB, BASED_INFO, USER_INFO
import threading
import json
import datetime
school_data_list = list()
ATPT_OFCD... |
147467815b9953d88106a695407cf77ee19a1df1 | cb250a6aa3cf8882ddb73b604dae1e638b61951e | /nav_loc_vqa/nav_loc_vqa/models/cnn.py | 387d1a5d12655b6de0239d7d2abaea7af154b932 | [
"BSD-3-Clause"
] | permissive | johndpope/MT-EQA | 00582c02467c4d2b213bbfa3f659aca577b5dc9c | 9a5483cc29ed6ee8d00590e28264743c6bcbe7ad | refs/heads/master | 2020-06-02T18:07:37.907083 | 2019-06-10T21:50:04 | 2019-06-10T21:50:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,840 | py | cnn.py | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import time
import h5py
import math
import argparse
import numpy as np
import os, sys, json
import torch
import ... |
9353df197524039200d0c1e745c15c38a9b0d7c3 | 7343ece3b82ac87a594865c4074623b45b0297b4 | /synapse/replication/tcp/redis.py | 7e96145b3b226f4317f8a2ffa8edb799aee3d140 | [
"Apache-2.0"
] | permissive | matrix-org/synapse | a00111f83310783b78e2996557f8bbae4d9fb229 | d35bed8369514fe727b4fe1afb68f48cc8b2655a | refs/heads/develop | 2023-09-05T05:24:20.808942 | 2023-09-04T16:14:09 | 2023-09-04T16:14:09 | 22,844,864 | 12,215 | 2,869 | Apache-2.0 | 2023-09-14T15:20:48 | 2014-08-11T15:51:42 | Python | UTF-8 | Python | false | false | 15,341 | py | redis.py | # Copyright 2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
ba6f9db46d6d0eeb4130f5f56ca475b5aa8f549f | 6e2c9d558a30eab8491d30d08556dba10489f129 | /users/views.py | 225c8300dd529574b72e65a148a8d555d7e25c39 | [] | no_license | TheNutrinet/nutrinet | 877fbbcdeb71d4e90dda1740206fc80ac58e9626 | f4540379c7f848c2bca2a384e293646627017868 | refs/heads/main | 2023-07-05T17:17:38.448924 | 2021-07-26T04:52:57 | 2021-07-26T04:52:57 | 395,248,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,221 | py | views.py | from rest_framework.authtoken.models import Token
from rest_framework.response import Response
from rest_framework import status
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.models import User
from django.shortcuts import render
# Rest Framework Imports
from rest_framework.decorators ... |
885c6199fcd1a0aac99ddbf7f368dd5030e35790 | 690a3b6506cf2fa8bb43f976614a3748afa2087a | /Algorithm/Programmers/스킬체크테스트L2-2.py | e387213646de313acdab84eab77c0279dd0a7968 | [] | no_license | jes5918/TIL | d1429c14cecd94620a188ba592d8da981446417b | e2f66f7e8e77a12a5d5f265f161de43d1059af42 | refs/heads/master | 2023-08-24T22:00:33.512302 | 2021-01-12T07:42:25 | 2021-01-12T07:42:25 | 280,310,413 | 6 | 0 | null | 2021-09-22T19:37:34 | 2020-07-17T02:47:58 | Python | UTF-8 | Python | false | false | 276 | py | 스킬체크테스트L2-2.py | def solution(prices):
answer = []
q = prices[:]
while q:
price = q.pop(0)
res = 0
for n in q:
res += 1
if price > n:
break
answer.append(res)
return answer
print(solution([1,2,3,2,3])) |
7e541dd1697daa1ccd27569b0faec673488d35e3 | 24b0a173280e381d1ba0e77761b6c402e9c81c6e | /Single User Dungeon/movement_commands.py | a59f52b9ee8e3daf46f333f0b99942e570eb5c05 | [] | no_license | vinceleg/vlproject | 64c0aeb71d9ea70e815267368c2fa0d9702bc905 | dfbb423bf43ca8d16373f4aedbf69d6fe735b6bb | refs/heads/master | 2023-01-10T13:11:22.922584 | 2020-07-29T03:10:26 | 2020-07-29T03:10:26 | 163,797,060 | 0 | 0 | null | 2023-01-06T08:17:01 | 2019-01-02T05:18:25 | JavaScript | UTF-8 | Python | false | false | 2,583 | py | movement_commands.py | """Movement Command functions."""
from character import Character
def get_player_command() -> str:
"""Cue the user to select a direction, format the selection to lower case and return it.
PRECONDITION: N/A
POSTCONDITION: N/A
RETURN: move as a lower-case string
"""
move = input("Enter 'quit' a... |
1a1c03f4c3d89eea305d940524b993d870005131 | 6de8891367b56abf83ad4fe361b793efdbf06fa8 | /dashboard/src/TypeDashboard.py | 34c48d00635d2eff65d7a6d688f86cf3d69c0663 | [] | no_license | lheuveline/sirene-dashboard | 7fe7cf09960c883ac9d310e2b1906079039eadd4 | 2e8377aed35cedf80fece903636ad5f3fdd03248 | refs/heads/master | 2022-12-08T06:44:51.118734 | 2020-03-02T16:29:06 | 2020-03-02T16:29:06 | 239,883,871 | 0 | 0 | null | 2022-12-08T03:35:57 | 2020-02-11T23:11:54 | Python | UTF-8 | Python | false | false | 2,746 | py | TypeDashboard.py | import os
import json
import pandas as pd
import altair as alt
import panel as pn
from jinja2 import Environment, FileSystemLoader
class TypeDashboard:
def __init__(self, **kwargs):
self.data_path = kwargs['data_path']
self.code_categoriejuridique_path = kwargs["type_code_labels_path"]
... |
1c4f466aac0c6b34cd7e180700d88cb4f8691820 | 18f9dba2e173140ff134112a9e4356c78f66222c | /testing/migrations/0001_initial.py | 56911cdd4d90bbe31ff812fc6c8147519fdc0756 | [] | no_license | farichrr/testing_django | 631657fc3d78f9542a70727e5d4a46513df263a3 | 53130cda3183b03716422ebb73709a6f367f674f | refs/heads/master | 2023-04-25T13:47:16.940428 | 2021-05-18T07:02:14 | 2021-05-18T07:02:14 | 367,701,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | 0001_initial.py | # Generated by Django 3.1.7 on 2021-05-15 18:30
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Publisher',
fields=[
('id', models.AutoFiel... |
bc2891ff9907881ea16ada1e3632977381a15ebf | d0c287b3af3d468d79a241de470a1ec1adae2d8d | /task__1.py | bb21c3aaa3a93a19d933b7e679663da74b812b02 | [] | no_license | Honest-red/Home_task | 8bb2308489d47d13309c0a1f4ba0c7ad1baf3b8a | 07cfc210e037ca0e332691aa0598e7cc2976c59d | refs/heads/main | 2023-07-30T00:42:18.980190 | 2021-08-28T18:11:28 | 2021-08-28T18:11:28 | 374,689,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 84 | py | task__1.py | print(5/6, type(5/6))
print(3%1875, type(3%1875))
print(1234%10, type(1234%10))
|
2c41e047777f6ce05c6913cd03c02a049a1c8e8e | e96143a4e22e4387380076ba055f3f313fc262b8 | /python/0055.py | 75575ff35540ea7c7034fb512bdd54cf82a291da | [] | no_license | ehki/AOJ_challenge | ce9458470c80fdc1abfd3d879f0962c29db230a3 | e2123c81c4fce60ea4b68812cee2d5b44324ddd4 | refs/heads/master | 2020-03-25T22:32:15.473001 | 2018-10-27T14:42:52 | 2018-10-27T14:42:52 | 144,227,870 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | 0055.py | while True:
try: a = float(input())
except: break
ans = a
for i in range(9):
a = a*2*((i+1)&1)+a/3*(i&1)
ans += a
print("%.8f"%ans) |
32ceb768a26332d838b2906f9e7273868e20cb84 | bdcfab7fef115312988ef7d2bf4f375ab0723e51 | /test/drawing/条形图1.py | 00b6e2b2525207251556d53f13ff7fc646737c1a | [] | no_license | ChenLaiHong/pythonBase | c2587bfa78fbbec225c364c297394131fa2f6f37 | 00bf1b404be8714f907c7750a60c052e83555b3e | refs/heads/master | 2020-03-11T00:57:13.403866 | 2019-09-19T11:55:09 | 2019-09-19T11:55:09 | 129,676,746 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 230 | py | 条形图1.py | import matplotlib.pyplot as plt
# 设定x有值的地方
x = [1, 3, 5, 7, 9]
# 设定y有值的地方
y = [4, 6, 2, 8, 9]
# 画图
plt.bar(x, y)
# x的范围[0,12],y的范围[0,10]
plt.axis([0, 12, 0, 10])
# 展示图
plt.show() |
192512869f2d1c3f64aa95744af621708d50d66f | 5f06b5086d6e0d9fd9de0fd25e6bb85f57279bce | /business/TestKeywordAndData.py | 3daf0d4d3bab5d12e90efe311ad3112091de707e | [] | no_license | Ella100/PythonAppTest | b6213817b1cbc68142315d7c807d103f21b53bc9 | 1d22d69b4ca65e53d1c03de4527e601856fb26a2 | refs/heads/master | 2020-08-31T10:32:45.544083 | 2019-11-10T09:03:08 | 2019-11-10T09:03:08 | 218,670,499 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,643 | py | TestKeywordAndData.py | from business.TestWriteDataExcel import *
import logging
import logging.config
import os
#
# # 将Excel数据文件加载到内存
# excelObj.loadWorkBook(dataFilePath)
CON_LOG = '..\config\log.conf'
log_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), CON_LOG )
logging.config.fileConfig(log_file_path)
logging = logg... |
94d7e5039d776f99c953c0a2c069b2999acf8b2e | 9026b5237831c08da5ca89ba107ef25b76bc432c | /blog/migrations/0005_delete_mobile.py | e0178dc3906444a08d3bca65efe9a82f6fa45ff0 | [] | no_license | patiencedaur/my-first-blog | 6c2c5596caf4f6d54bbace6af5c0a36ac654cd51 | 3e6eb78dc33d8da1471a8828a45c275bf98c44de | refs/heads/master | 2020-03-21T09:16:07.397128 | 2018-08-03T07:01:09 | 2018-08-03T07:01:09 | 138,391,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | 0005_delete_mobile.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-01 16:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0004_remove_comic_created_at'),
]
operations = [
migrations.DeleteModel(
... |
fc5312b5801305e137444eb33bdd05db81e14464 | 4d75121d43ed6d1063f467b7b75309b28d8f48a2 | /old/String/191. Number of 1 Bits.py | cda9038f2f62fb340a9715f7b4aa63a22b3862b7 | [] | no_license | cosJin/LeetCode | b311d43a5224cc7156f8ad72f4233e1f85556f20 | 26fddfdbd09c30376cb0720e13baf0402c3a1e90 | refs/heads/master | 2022-11-08T10:29:43.461016 | 2022-10-27T15:04:16 | 2022-10-27T15:04:16 | 154,267,347 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | 191. Number of 1 Bits.py | class Solution(object):
def hammingWeight(self, n):
"""
:type n: int
:rtype: int
"""
#方法一:先模2,然后右移一位
#x = x & (x-1) 去掉最右侧的 1 ,while(x!=0)即可
i = 0
while n != 0:
n = n & (n-1)
i+=1
return i |
d95f3975cb9394fd7f029582f9a7d8438067b623 | a7734054780fbd5713f2b7bfc2da67f441ab98ac | /interact/base.py | aa5ddc35801ae71b040f4f6da59294bfa4882be6 | [] | no_license | caizhengxin/interact-cli | 09c1589d0b4c1eee11e5555b7668f6641807c4ec | 712f840d63894d6ef63f180ed6a7b2da08dc428d | refs/heads/master | 2020-10-01T21:21:51.909982 | 2020-01-06T15:45:05 | 2020-01-06T15:45:05 | 227,627,372 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,733 | py | base.py | # -*- coding: utf-8 -*-
# @Author: JanKinCai
# @Date: 2019-12-12 12:52:19
# @Last Modified by: JanKinCai
# @Last Modified time: 2019-12-30 16:13:27
from __future__ import print_function
# import sys
import json
# import traceback
from typing import (
Callable, Optional, Any, Dict
)
from interact.error import ... |
62de04eecd3a1fbaad58ab3092c6572d5d888789 | 5393a08e99e417c91c5cbf292fc07a3c51cd2505 | /HakerRank/Python/sWAP cASE.py | b1291c763d15c65b1b416b9cda427a11abbd2b0f | [] | no_license | soaibsafi/Competitive-programming | 083ec5d7c5c89f8415ef0828ffb6e511f072d7d3 | 0215b5175bbf1aeb2211a089401b575df02e5152 | refs/heads/master | 2023-02-15T15:18:53.449158 | 2021-01-12T20:20:50 | 2021-01-12T20:20:50 | 46,543,500 | 2 | 2 | null | 2020-10-04T14:06:12 | 2015-11-20T06:17:59 | C++ | UTF-8 | Python | false | false | 538 | py | sWAP cASE.py | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 6 17:58:55 2020
@author: Soaib
Problem: sWAP cASE
Link: https://www.hackerrank.com/challenges/swap-case/problem
"""
""""
simple method:
print(str.swapcase())
"""
def swap_case(s):
result = []
for i in s:
if i.isupper():
result.append(i.low... |
d42050a8cc18506b0afd439c2e62b8f37fb751be | 14af74cffda43dc6e2487b3c0f866600702da4c0 | /Paper_13/Classes/Transfer_to_RAM.py | 10eea8780951754c735866caca2562d493facd08 | [
"MIT"
] | permissive | draco892/DevAndCompForRecSys2016 | 7b9fb42727aca2ba60a15debf3d199b22cd75909 | f8c4d5a1f184d5e773f841dce9f855ba0d792b65 | refs/heads/master | 2023-04-06T08:59:08.340858 | 2020-02-17T22:37:40 | 2020-02-17T22:37:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,828 | py | Transfer_to_RAM.py | """
@author: Andrea Domenico Giuliano
@contact: andreadomenico.giuliano@studenti.unipd.it
@organization: University of Padua
"""
import sqlite3
import datetime
import Pikle_operations as p_o
from Functions import Time_Calcolation as tc
from Functions import Users_dict as u_d
from Functions import Items_dict... |
9a4d7d428085470ff2149b41a17f8b22495f1efe | 41dc205781b0693a40484a6e26aeaf86fd9bf564 | /If Statements/checking_usernames.py | 8fed3cc45d4598a5887f6ffc7a9574994df629d8 | [] | no_license | Keviwevii/Python-Crash-Course | ed7f0dce0149cb7e8be1c7198c1ee96ca82611a1 | 56eec89518a8525a7f3b310c2d9cb4decee6f988 | refs/heads/main | 2023-03-29T21:12:01.622603 | 2021-03-28T22:55:17 | 2021-03-28T22:55:17 | 346,332,856 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | checking_usernames.py | #Program that stimulates how websites ensure everyone has unique usernames
current_users = ['Kev', 'Jerry', 'Tate', 'Apple', 'Lewis']
current_users_copy = [user.lower() for user in current_users] # A copy list that contains usernames in lowercase
new_users = ['Jenny', 'KEV', 'Ginny', 'Lewis', 'Pini']
for user in ne... |
e0716e6d4ff3486f64b97c8bb332d6cce167cda7 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_101/ch76_2020_04_12_21_40_48_751588.py | 33f875ac098982b9ab4deb6796867025bb24ebb0 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | ch76_2020_04_12_21_40_48_751588.py | def aniversariantes_de_setembro(dic):
dic9 = {}
for k, v in dic.items():
if v[4] == 9:
dic9[k] = v
return dic9 |
c02637cb9fccb96729f66c97b39298498372c7d3 | a5d3301a89a5541c425533eebea56b16f1ca09d0 | /monitor.py | 706f17335e938ee7e4486f37350f5d184c3d6b5b | [
"MIT"
] | permissive | trigunshin/tsm | 56510fe5ff0d0ef5c8894caea3e2294be4fa3339 | 49d2de073b3fd44d5b11db7eaae4bb2f73e879e5 | refs/heads/master | 2021-01-01T05:49:29.943417 | 2015-09-24T18:31:00 | 2015-09-24T18:31:00 | 29,355,485 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,633 | py | monitor.py | from driver import start, load_urls
undermine_url = "https://theunderminejournal.com/#malganis/item/%d"
armory_url = "https://us.battle.net/wow/en/vault/character/auction/browse?itemId=%d&start=0&end=40&sort=unitBuyout&reverse=false"
alt_armory_url = "https://us.battle.net/wow/en/vault/character/auction/browse?reverse... |
20552af77790db41157f140005b9f5b810bbc1ee | afdfb00380132fe153d6721c9ae83eab40840227 | /QueryTwitter/admin.py | df0d1313b715a798bf29d0cb397dc3825236fef8 | [] | no_license | manish59/QueryTwitter | b950372cfcdf346a9f0b480b446c75b9d72f426f | 5ba09d6c9d5ec7d3fa8c33509ac9683366e48609 | refs/heads/master | 2021-09-27T06:50:05.621053 | 2020-02-04T07:43:44 | 2020-02-04T07:43:44 | 238,131,451 | 0 | 0 | null | 2021-09-22T18:30:48 | 2020-02-04T05:34:52 | JavaScript | UTF-8 | Python | false | false | 180 | py | admin.py | from django.contrib import admin
from .models import *
class HashTagAdmin(admin.ModelAdmin):
list_display=('HashTag','TimeStamp')
admin.site.register(QueryHashTag,HashTagAdmin) |
689209e657914b01a82b129fe9375ac478aecebf | a443b3c07eeb66dbbbaf7c4da913d9269698bba2 | /znail/ui/api/capture.py | d6474ff0206b1bd6b262962b6083d010002b8d5e | [
"Apache-2.0"
] | permissive | znailnetem/znail | 99f985fbb286ee9af38b88b1a09f8dfa44a3563d | 214c2c6e3813ddaa13cebbd0e1f80b7735181f1c | refs/heads/master | 2023-05-11T11:07:00.262815 | 2022-11-17T08:19:11 | 2022-11-17T08:19:11 | 207,292,069 | 18 | 4 | Apache-2.0 | 2023-02-15T23:47:25 | 2019-09-09T11:20:38 | Python | UTF-8 | Python | false | false | 254 | py | capture.py | import flask
from znail.netem.tcpdump import TcpDump
from znail.ui import app
@app.route("/capture.pcap")
def capture():
with TcpDump("eth1") as generator:
return flask.Response(generator, content_type="application/vnd.tcpdump.pcap"), 200
|
7f5d535c26f9edd23c7e41ffd2e08b011990814d | 131c573f2e448f5c7bfebfd5b42d727f31904700 | /intro_to_python/P-Lab1.py | fac44f0d0b0b8a67c37981706a14d5ed9bb27a33 | [] | no_license | dburaglio/Cyber333_Projects | ab9dd111f704f11037b4fa4ec50093d68c26247f | 412efa77015e6b4b91e9e206732d29ef61ea0b7b | refs/heads/master | 2020-07-11T15:24:58.321129 | 2019-09-05T14:38:06 | 2019-09-05T14:38:06 | 204,583,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 81 | py | P-Lab1.py | print("Hello World!")
p = "Hello World!"
for c in p:
print(c, end = '')
print()
|
f925a8cd904e470fcebabdc3737b8926852335cb | a25871e7746b76edf29bd1730866742d72e4741a | /hello_www.py | 87323dd66a04d82af384f09094dbc6e6fd9b13e2 | [] | no_license | abenedykt/mongodb-testproj | d22e30743bcae17c40f3a71ace8ec3780e11e171 | 21e3886511d7c96dcd2cf6948b58e1baa0c24511 | refs/heads/master | 2016-09-06T19:59:30.533061 | 2015-06-14T09:29:15 | 2015-06-14T09:29:15 | 36,762,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | hello_www.py | import bottle
@bottle.route('/')
def home_page():
return "<html><body><b>Hello World</b></body></html>"
@bottle.route('/testpage')
def test_page():
return 'test page'
# bottle.debug(True)
bottle.run(host='localhost', port=8080)
|
23c6d743dc8c09edce00753c26a78e3c69246c5a | 091dd9d72083b3f717a3073cd3a599a02a276f60 | /no_more_wifi.py | 9c50b1d9a427c741d52e7e1cd9a9467ededabad8 | [] | no_license | ryanmia/wifi_deauthentication_app | a032af162414c204f771a08431b5e5644afd5dcc | 0a4719de085399a16ccdc71549e40143c0b568f2 | refs/heads/main | 2023-04-12T07:17:23.133186 | 2021-04-15T21:52:11 | 2021-04-15T21:52:11 | 358,401,746 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,766 | py | no_more_wifi.py |
#scapy needed for packet sniffing and sending
from scapy.all import *
#threading for the two fucntions to run concurrently
from threading import Thread
#subprocess allows for terminal commands to execute
from subprocess import Popen, PIPE
#channel_hop_n_deth: rotates channels 1-11 infinitely, sending deauthenticat... |
b14a1ef413e7ec1a13bc38454988e598eed28c69 | d319165fca8067a172fde00f9d058ebc833a5c43 | /cv1/utils/print_sim_matrix.py | 2c7102471cfbc5ec5446d82c415a055b4f537570 | [] | no_license | pro0255/MADII | 208a2c1d6a8b795865bc03beb41f4031e8a71453 | 7e4ab3aa0b506e7e4cc8ce08b681ecded1dd6e9d | refs/heads/master | 2023-04-12T15:29:13.202166 | 2021-04-27T11:24:31 | 2021-04-27T11:24:31 | 340,859,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 961 | py | print_sim_matrix.py | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
def print_sim_matrix(sim_matrix):
verticies = np.arange(len(sim_matrix))
fig, ax = plt.subplots(figsize=(10,10))
im = ax.imshow(sim_matrix)
# We want to show all ticks...
ax.set_xticks(np.arange(len(verticies)))
ax.set_ytick... |
8083691dcec8d89d6a4295fa63ee025331249f72 | 242f1dafae18d3c597b51067e2a8622c600d6df2 | /src/0900-0999/0939.min.area.rectangle.py | 4ad55a1d0941a7f9e83e8c79afc226bad9479400 | [] | no_license | gyang274/leetcode | a873adaa083270eb05ddcdd3db225025533e0dfe | 6043134736452a6f4704b62857d0aed2e9571164 | refs/heads/master | 2021-08-07T15:15:01.885679 | 2020-12-22T20:57:19 | 2020-12-22T20:57:19 | 233,179,192 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 843 | py | 0939.min.area.rectangle.py | from typing import List
from collections import defaultdict
class Solution:
def minAreaRect(self, points: List[List[int]]) -> int:
d = defaultdict(set)
for x, y in points:
d[x].add(y)
xs = sorted(d.keys())
m, n = float('inf'), len(xs)
for i in range(n):
for j in range(i):
ys... |
3bb55ec2d8cb4b33a5298c3f37cf3fc066c03531 | d62721baa41f122da33d2b1e3cd6aa42868e6d82 | /city/city/views.py | d64ea7b9af22b328546f3133cc6dea9807b965f5 | [] | no_license | cityStoryline/Storyline | 252d8508e5ee13abf09c46983dcfeb97c2d991ff | eab08378a94b4a82c0c5cbde4a0e5de5b1cf1c8a | refs/heads/master | 2021-01-10T13:08:16.169634 | 2016-04-13T04:02:28 | 2016-04-13T04:02:28 | 54,146,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | views.py | from django.shortcuts import render_to_response
from django.template import Template
def home(request):
return render_to_response('index.html')
def about_us(request):
return render_to_response('about.html')
def help_page(request):
return render_to_response('qa.html')
|
c05910ca85f6a32669db622304380e76731e7c2b | de33091037128fe3feb5a6dad28be5b72aed86a0 | /LeetCodeArchive/121.py | 233a93c0ed566bc09f4851f6233a96a076a72e8f | [] | no_license | khannasarthak/codingPrep | 78fbf089c6f095f7ec8a5f5d9998593aea2942fe | 2b638ab284bf9fefa2259fd7aa4ca3905438b7ab | refs/heads/master | 2021-01-12T02:58:04.236524 | 2018-11-07T06:03:37 | 2018-11-07T06:03:37 | 78,140,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 352 | py | 121.py | class Solution(object):
def maxProfit(self, prices):
minPrice = 9999999
maxProfit = 0
for i in range(len(prices)):
profit = prices[i]-minPrice
if prices[i]<minPrice:
minPrice = prices[i]
elif profit>maxProfit:
maxProfit = pr... |
febb98ad9d7f961b881267e9eadf32353edfc555 | 8852240a56a475649a080003d05ecf1936f5397b | /Data Structure/04. Linked List/26. remove_loop_optimized.py | a67ea4524ef6bcbc0bc16758168071ecfa172d7a | [] | no_license | Slothfulwave612/Coding-Problems | aea6191b7baaee14720fd73d334d9dbb60cc153a | 6870426104aef417086788221dad29e887ddfe3f | refs/heads/master | 2021-01-01T13:45:01.922455 | 2020-06-25T04:36:31 | 2020-06-25T04:36:31 | 239,305,169 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,262 | py | 26. remove_loop_optimized.py | ## remove loop in linked list | 2nd approach
class Node:
'''
a node class.
'''
def __init__(self, data):
'''
Function to initialize the Node class object.
Arguments:
self -- represents the object of the class.
data -- int, value to be added to the node.
... |
d4b0e056857334287ca91c97a0ad4db7fda54cd9 | 6a25b8eb5349b8ddcc5fc4dba6a3c01462760f8e | /train.py | 5abc94ab3bf9ef615922bc5e9d83473c2d7a66a9 | [] | no_license | EdieLu/Seq2seq | 9a5479a489366c2cdea4ae1299299f444ee749c7 | d1a5f364015ec5b5d2ae20714d51315825611f9d | refs/heads/master | 2022-12-31T00:32:39.136847 | 2020-10-22T20:47:34 | 2020-10-22T20:47:34 | 267,534,770 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,611 | py | train.py | import torch
import random
import time
import os
import argparse
import sys
import numpy as np
from utils.misc import set_global_seeds, save_config, validate_config, check_device
from utils.dataset import Dataset
from models.Seq2seq import Seq2seq
from trainer.trainer import Trainer
def load_arguments(parser):
"""... |
178e2c9cf4cd55823849dfcb343ad96ce037b780 | 6329bb3c89d73725f4ebd44502e825ae2b90a898 | /hello.py | 90adc90a90b2f46dca4f3c352e17e637cedeea82 | [] | no_license | piyushmali/Python-Lab | 02ddd26fed61962ea165d6ba89706a1e2a12f009 | 8e6cbe732f6272c30b053618bc2640e16d64b6cc | refs/heads/main | 2023-07-25T21:23:05.705267 | 2021-09-04T18:28:45 | 2021-09-04T18:28:45 | 378,999,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23 | py | hello.py | print("hello piyush")
|
ff821a74174fcaf22895812d30b5b5ae90566a30 | 63d406b933f66487ee158e345dbe3b9a76be5f73 | /Khadamat.py | 8a1668a758f658502d7e93f8c3fcb0b527a2861d | [] | no_license | hatefi1377/ScriptPharmacy | d1fe11c379845b9e835b3ea7e57c43376f1b062a | 5e49846332bdae1dcc4c4fab3f9182fa32328188 | refs/heads/master | 2022-12-25T15:27:10.072720 | 2020-10-10T04:34:18 | 2020-10-10T04:34:18 | 302,735,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,273 | py | Khadamat.py | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
import time , os , shutil
dir_path = os.path.dirname(os.path.realpath... |
b1a1b010f1240e9f110eaeb244d6d86ba726eb24 | fe0cdf7eb7d547e67663a961b1aab2cfce35de3b | /flask-chatbot/app.py | 09a94eae36cbb8d494b15fb0543f85d4f49d4cc8 | [] | no_license | DASI-2021/api-dasi-project | 1244c4223a43e281c15ea4f8852feb44cb351fa1 | ea562487d7f1e4bdc101afad2a722f911fd3735c | refs/heads/main | 2023-05-29T02:03:37.819053 | 2021-06-07T15:43:59 | 2021-06-07T15:43:59 | 367,026,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,451 | py | app.py | import time
import json
from chatterbot import ChatBot
from chatterbot.conversation import Statement
from chatterbot.trainers import ChatterBotCorpusTrainer
from classifier import ClassificationAgent
from extractions import ExtractionAgent
from flask import Flask, render_template, request
from spade import quit_spade
... |
800a9a063953d7a89d48eb6b607671219d08f36f | 11dd63376296da717b687a167148f900ccecf07c | /MachineLearning/logistic.py | e5f51b85fd459e085c46f7418f850d74895b0740 | [] | no_license | berkankadioglu/Random | b841836090ce8e85b2ff73813c95e5da41a1ff4e | 102bdb538d5dc6c5afbd81961e588137851c79e4 | refs/heads/master | 2023-07-14T12:07:53.395643 | 2021-08-31T21:13:01 | 2021-08-31T21:13:01 | 124,914,999 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,013 | py | logistic.py | """
Simple logistic regression implementation
"""
import numpy as np
from optimizers import adam_opt
def logistic_reg(lr, XC, yn, v_XC, v_yn, pb, s2b):
"""
Logistic regression for beta.
"""
# Init variables
M, D = XC.shape
beta_opt = adam_opt(lr=lr)
# Init beta
e_beta = np.random.randn... |
a8bf5a488c9f9e18365069836422860daf54e9ef | b39d8a524b53e9d8f22be0a5f0b43a92b06fe33e | /experiments/ddpg_train.py | 583125ca4096d5499ded6eae266ddd75d55f5486 | [] | no_license | montrealrobotics/unsupervised-adr | c1bd5a6f09194080a637b28f6a424eb6d3a0abe6 | 8d955f012e5c00b8466f65ee48c4dd3eab3065f3 | refs/heads/master | 2020-12-07T03:40:57.696208 | 2020-04-12T17:19:14 | 2020-04-12T17:19:14 | 232,623,583 | 12 | 1 | null | 2020-01-14T21:48:47 | 2020-01-08T17:46:30 | Python | UTF-8 | Python | false | false | 6,129 | py | ddpg_train.py | import numpy as np
import torch
import gym
import argparse
import os
import gym_ergojr
from common.agents.ddpg.replay_buffer import ReplayBuffer
from common.agents.ddpg.ddpg import DDPG
import common.randomizer
from common.randomizer.wrappers import RandomizedEnvWrapper
from common.adr.adr import ADR
import multiproces... |
5c3fd9a761ccc7491656fdcbcc0b51a2fbefbbdc | 54d17336ca03801bd9c9ef37be8642b332ab71c4 | /osm/SO/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/proxy/filesystem.py | 907815e58c1d68f848cbf3d815c18968877c4105 | [] | no_license | dennis-me/Pishahang | 2428379c4f7d3ee85df4b85727ce92e8fe69957a | cdd0abe80a76d533d08a51c7970d8ded06624b7d | refs/heads/master | 2020-09-07T12:35:54.734782 | 2020-01-24T20:11:33 | 2020-01-24T20:11:33 | 220,782,212 | 2 | 0 | null | 2019-11-10T11:46:44 | 2019-11-10T11:46:43 | null | UTF-8 | Python | false | false | 6,681 | py | filesystem.py | #
# Copyright 2016 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
b547dfdd7f6c973e24659ad7c4c3318a7c9e2cf1 | bb622baf75ee35c3880968923d6b86ad28939e12 | /model_v1.py | 2973201ba3763931d2640d10b3e26da1cb517884 | [] | no_license | pmoghimi/RL_RNN | 27223e7854c05d8ceace57c8889ff9d565e70f19 | 5afb87e3e7316e550685a38ed8437d981cd5a083 | refs/heads/master | 2020-03-29T07:29:56.756622 | 2018-09-20T21:02:31 | 2018-09-20T21:02:31 | 138,890,558 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,022 | py | model_v1.py | """
Nicolas Masse 2017
Contributions from Gregory Grant, Catherine Lee
Modified in Feb 2018 by Pantea Moghimi to create a model for RL
Based on the 'Song, Yang, and Wang, 2017, eLife' paper
Class Model constructs two recurrent networks: the policy network and the value networks
"""
import tensorflow as tf
import nump... |
c727035bc7487ff0f4b56836736b764d741a01eb | c1592fd52165ab2a710d8786a6fea6dce8908ae5 | /src/np4d/np4d.py | 3c4600b3ee92180afc75cabe110377a88b66d83d | [
"MIT"
] | permissive | edwardoughton/np4d | a2ccabe4912f65ef22c4954c2d2ca306630f83e8 | 2c96e72626635ae155a6263a96d4cf1beb95cff2 | refs/heads/master | 2021-07-22T18:28:28.813135 | 2021-06-23T08:16:03 | 2021-06-23T08:16:03 | 221,439,178 | 2 | 0 | MIT | 2019-12-07T10:50:28 | 2019-11-13T11:02:42 | Jupyter Notebook | UTF-8 | Python | false | false | 4,940 | py | np4d.py | """
Network Planning in Four Dimensions - np4d
Written by Edward Oughton
November 2019
Oxford, UK
"""
from shapely.geometry import Point, LineString, mapping
import numpy as np
from itertools import tee
from np4d.path_loss import path_loss_calculator
def estimate_link_budget(model, receiver, site, frequency, bandw... |
4ebe0108e7f0276c8ed01c9a4fcee3da3a2b7d1e | c5ef11c695950bf8d2512506a5377ae019bdeec2 | /market_options_put.py | 31c56a37abac0e0ceffff588d2fd1280637e7cf2 | [] | no_license | munendra-bandela/userful-python-scripts | 0f1c0c92148180345cad3acad47f4f9c700f099b | f63791c5a2b074546f2c2404a749587b85f30dc1 | refs/heads/master | 2020-07-24T02:56:21.771055 | 2019-09-11T10:11:17 | 2019-09-11T10:11:17 | 207,781,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,506 | py | market_options_put.py | from bs4 import BeautifulSoup
from pprint import pformat
from lxml import html
import sys
import json
import urllib.parse
import requests
import logging
import datetime
logging.basicConfig(filename='app.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)
NIFTY_PERFORMANCE = None
... |
9fb61d060e50a67dbecf870e158e955496c0d37f | 74a299ea825b882aca6f3187caa926029e70a98a | /Estructuras de datos/slices.py | c221f3bf3428ebd636443cf6ee82c35f2078827e | [
"MIT"
] | permissive | Mazzya/Aprendiendo-Python | 2fda417c821b4ab87cc4080a5704d785a401642d | 31527d1952833f194d3089fa1d827cdb5bfddc73 | refs/heads/master | 2022-12-12T21:19:44.640163 | 2017-10-24T21:05:04 | 2017-10-24T21:05:04 | 293,818,150 | 0 | 0 | null | 2020-09-08T13:25:55 | 2020-09-08T13:25:55 | null | UTF-8 | Python | false | false | 1,901 | py | slices.py | numeros = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
#Recordar que para obtener el elemento de un índice concreto
print("Dato en indice 3: "+str(numeros[3]))
#Sin embargo, para seleccionar del 1 al 5 utilizariamos
seleccion=numeros[1:6]
#El número de comienzo está incluido, pero el último no está incluido
print("Lista de... |
8a8554d1ccb0afce9d0ba9b3901c2021bbfd510e | 9135384fe2a5fa7f95bf18942b743cd6c621f207 | /data.py | 325a5149f813f3b4edeb0a07974c48d0375402ec | [] | no_license | Hyeokreal/ALI-for-toydata | 674a54dc53bbf38edc8fa9dbd58aa44ad236d28a | 80c90c809fc105d45cc66e8769ce6f366e46e4eb | refs/heads/master | 2021-01-01T15:45:43.196649 | 2017-07-24T13:18:51 | 2017-07-24T13:18:51 | 97,691,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,818 | py | data.py | import numpy as np
import matplotlib
import os
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from args import get_args
class ToyData:
def __init__(self, load_saved=False, path='./data', batch_size=32):
self.start = 0
self.end = batch_size
self.batch_size = batch_size
self.... |
dea4f917217f789011296e70a04bd3841a1084c3 | 53bbecb07582b7e01fa1f61596de8155570c4d03 | /interface.py | f9cf276c18e21f52d751b6ce44c8c7ef2067e800 | [] | no_license | BBR2394/ChariotParty | c25bcb58301a1e4564611b6616bf64c99e4d8adc | ef60d2be6d4a1ef3045790070dae0719fbd5d294 | refs/heads/master | 2020-07-29T13:51:22.308759 | 2019-09-25T13:42:44 | 2019-09-25T13:42:44 | 209,829,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,375 | py | interface.py | import turtle
#definit le dossier où sont les images
dir = "img/"
#taille des images en pixels
imgSize = 100
#definit la taille de l'ecran
turtle.setup(1000,1000)
screen = turtle.Screen()
#Images correspondantes aux cases
green = dir+"cases/green.gif"
screen.addshape(green)
red = dir+"cases/red.gif"
screen.addshape... |
776e1ebaf403f3076be54db7eba9910e0d1fed5f | 54fe280b1e41f2995d4b9a72edd967f375656481 | /546A.py | b4aa7e97ec0214e72474056774cbbdb3f4176781 | [] | no_license | Taddist/CodeForce | 214a3851d742b8ba0c0e1aff4b97bcf089ebb7fa | cc4e26e0875a6835fca7fe391f87f60b64273287 | refs/heads/master | 2020-03-22T19:47:47.936640 | 2018-07-11T09:18:41 | 2018-07-11T09:18:41 | 140,551,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | 546A.py | l=list(map(int,input().split()))
k=l[0]
n=l[1]
w=l[2]
sum=0
for i in range(1,w+1):
sum=sum+i*k
if(sum-n>=0):
print(sum-n)
else:
print(0) |
12ebccab7c70a3593074039fe61dd69af115e743 | 1dae37682c9e9cfcdadf8c0f4a62e577ac9166c0 | /winter/contact/forms.py | 9c4ec2f46847288df527896eb6024e3937f3da34 | [] | no_license | eye-of-dev/gb-django-course | 7af4f8a3825e7deab7bdc56b346fa080c790d76b | 881194968ef136c9d23e735aa938b7c972bf3abc | refs/heads/master | 2022-12-11T22:51:29.587562 | 2020-05-31T09:47:20 | 2020-05-31T09:47:20 | 251,579,293 | 0 | 0 | null | 2022-12-08T09:51:16 | 2020-03-31T11:09:51 | CSS | UTF-8 | Python | false | false | 541 | py | forms.py | from django import forms
from contact.models import Feedback
class FeedbackForm(forms.ModelForm):
class Meta:
model = Feedback
fields = ('name', 'email', 'subject', 'description')
def __init__(self, *args, **kwargs):
super(FeedbackForm, self).__init__(*args, **kwargs)
for fie... |
9b33594d81be59611545a51fa145402068e12ee9 | 4486484e326f55955f10e549109ad67d403aaf05 | /cinema/main.py | 5ba52050134e04fd2447bee81ff3470377b40f2e | [] | no_license | xandymelo/Cinema | 8688904876087f3a02a54656e5ca6dfbf8997bdf | 3d20bfb06bfb2626d81d9c3357a2e66d8683c88d | refs/heads/master | 2020-09-10T19:50:38.041652 | 2019-12-13T02:45:41 | 2019-12-13T02:45:41 | 221,819,616 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | main.py | import os
from Assentos import Assentos
from ControladorAssentos import ControladorAssentos
from interfaceConsole import interfaceConsole
os.chdir(r"C:\Users\xandy\Desktop\cinema")
interfaceconsole = interfaceConsole()
interfaceconsole.main()
|