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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd32419148ef6b09deb6293c518ec87edde6bd0e | a176d430ea7a44e4eb715563044dc55b1d7e7014 | /scripts/locus.py | 720b98d30cf37a408929607d4025cf391251debc | [] | no_license | tanghaibao/pgdd | 939d74fdad7256014ea51b50abdf27515d40e167 | 49c97c671159d78b54e71b6d14757ff5f99c495c | refs/heads/master | 2016-09-06T06:36:29.863160 | 2011-01-26T01:05:09 | 2011-01-26T01:05:09 | 536,408 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,583 | py | locus.py | from preferences import *
def get_details(lc):
return "<a href='/duplication/index/details?lc=%s' target='_blank'>%s</a>"%(lc,lc)
def get_block_details(seg_id, lc, note):
return "<a href='/duplication/index/block_details?seg_id=%s&lc=%s&note=%s' target='_blank'>"%(seg_id,lc,note)
def format_seq(seq,... |
5c58c63acb7d9498326ad0c4aeabf91e27280c18 | 589b2bec606695ff1bec8b8a0c23d75a45a4ef20 | /backtracking.py | f373dd845429b66ac99dafb5622bea0ce9562a84 | [] | no_license | KayoRenato/introductionDSA | 02a9cd5b8e9733dfbced69e229fa90d72a565e27 | bdad5b442ae701e2efc1bb2475941486e72b2471 | refs/heads/main | 2023-02-08T01:20:00.752696 | 2020-12-29T01:42:30 | 2020-12-29T01:42:30 | 320,408,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | backtracking.py | def permuta(comb, list):
if comb == 1:
return list
else:
return [y + x for y in permuta(1, list) for x in permuta(comb-1, list)]
print(len(permuta(2, ["a", "b", "c"])), permuta(2, ["a", "b", "c"]))
|
fd4bf8fadc12fe0301f7069d8911db6c8083ea2f | a884039e1a8b0ab516b80c2186e0e3bad28d5147 | /Livros/Introdução à Programação - 500 Algoritmos resolvidos/Capitulo 2/Exercicios 2a/Algoritmo40_lea13.py | 1fa51e29c151e3b5a3eb7b0ba6e32b9a746ad751 | [
"MIT"
] | permissive | ramonvaleriano/python- | 6e744e8bcd58d07f05cd31d42a5092e58091e9f0 | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | refs/heads/main | 2023-04-10T14:04:24.497256 | 2021-04-22T18:49:11 | 2021-04-22T18:49:11 | 340,360,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 459 | py | Algoritmo40_lea13.py | # Program: Algoritmo40_lea13.py
# Author: Ramon R. Valeriano
# Description:
# Developed: 14/03/2020 - 20:05
# Updated:
number1 = int(input("Enter with firs number: "))
number2 = int(input("Enter with second number: "))
dividend = int(number1)
divider = int(number2)
quotient = int(dividend/divider)
rest = dividend % ... |
9e19a5d748f96a06eb7cb6fe6a3a1abf4b41717d | 4f84efe941e8c2cfbf356da7cd7279792bf9879e | /python/tictactoe/base_gamer.py | 68c1cb1c8487e879ed35cfc72a4f0d375f75a09c | [] | no_license | AntonBeletsky/python_learn | bdb8dabb7644a900bdd66d1208279bfbc8237c01 | 1a0af3b3d1cbec48e2f1886915ea7da4a40edad2 | refs/heads/master | 2022-01-09T21:24:29.829845 | 2021-12-28T14:32:08 | 2021-12-28T14:32:08 | 180,114,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | base_gamer.py | #base gamer class
class BaseGamer:
# 1 - крестик, 2 - нолик
player_identificator = 0
#инициализация
def __init__(self, player_identificator):
self.player_identificator = player_identificator
pass
# Ход игрока (переопределеяеться в наследнике)
def player_step(self):
#... |
88505c606fb6f8b321f407f750f2019e14b74960 | e79ed9db4133f071672748b07e24f081904f05d9 | /main.py | ea611246a715a5f84ee90a07eafec0104b7df516 | [] | no_license | songbuja/kaist_study | 28a17af6ff69896f6ff52b4cb13f86784bea1882 | 3687eb549b3bc75a5dbe29c83ad6881c3fc02e76 | refs/heads/master | 2022-12-27T04:23:21.865024 | 2020-10-04T14:21:36 | 2020-10-04T14:21:36 | 298,950,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,888 | py | main.py | import sys
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLabel, QVBoxLayout, QHBoxLayout, QGridLayout, QFileDialog
from PyQt5.QtCore import Qt
#QWidget 을 상속받아 애플리케이션의 틀 만들기
class MainWindow(QWidget):
zoom_rate = 0
# 창의 위치와 크기 정하기 위한 변수
top = 200
left = ... |
f4387043b940c7889197d158a4e912de15e8d53e | c9746c3a7518cdf92a5f0a868606dbb80e40fd1b | /practice15.py | 95c300998e90ed299d39ad8e630b816af5b6921b | [] | no_license | nackwon/Python_Practice01 | 3cc075da44c277ea9edc6cc0718bd13220a4fdbd | a79760aba5227d1af343581a867ec682efa07757 | refs/heads/master | 2020-03-18T03:01:04.601376 | 2018-05-21T12:52:36 | 2018-05-21T12:52:36 | 134,216,999 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | practice15.py |
arr = [str(count) for count in range(1, 100)]
count = 0
for i in arr:
count = (i.count("3") + i.count("6") + i.count("9"))
if count != 0:
print(i, "짝"*count) |
c13546e523015a9dcd55b94ee7010c724a956db2 | d4b61a224f49b1ef1142faa089e74c764e47f763 | /crt_portal/cts_forms/migrations/0170_campaign_archived.py | bb88ebbe6a573e290c50faf7161e1743578c0ced | [] | no_license | usdoj-crt/crt-portal | 7816bfa069f61dc1e792ac7b3bd11f0c63846ef6 | d5d6338cf54a09c2f6c88cd3affa3d7f49bdf693 | refs/heads/develop | 2023-09-04T01:30:20.417437 | 2023-09-01T20:02:48 | 2023-09-01T20:02:48 | 195,066,858 | 18 | 15 | null | 2023-09-14T14:50:59 | 2019-07-03T14:09:09 | Python | UTF-8 | Python | false | false | 391 | py | 0170_campaign_archived.py | # Generated by Django 3.2.17 on 2023-03-30 18:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cts_forms', '0169_primary_statute'),
]
operations = [
migrations.AddField(
model_name='campaign',
name='archived',
... |
06f4b836fb000180a0e6ab8f0b309de3e5253695 | 2ff89b57db9d1250358cedcd6a3121bcde9a9096 | /FocusGame.py | dd0a0105f7d313c6dff07316cc01c3075a7edd5c | [] | no_license | shenalexw/FocusGame | 2f052471163d0d1c2452b2fe7a53673421658ff3 | 5df60e5b3982230dbe6e12902ca47b8b49331d24 | refs/heads/main | 2023-08-05T06:56:11.804185 | 2021-09-12T03:43:21 | 2021-09-12T03:43:21 | 325,190,115 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,451 | py | FocusGame.py | # Author: Alexander Shen
# Date: 11/28/2020
# Description: Replicate Focus/Domination board game with the win condition of capturing 6 pieces.
class Player:
"""
Player class represents blueprint to create a Player object.
Stores the name and color according to player's tuple.
Tracks the number ... |
8945485a73585190c306d18eec404ef8cd62bdfd | f01b29670506387ae5f03bf0ee03bdab5f2660bc | /compiler/reference_compilers/lets_make_a_compiler/tests/tests.py | 1efbff55d8f35a0010afc84a18176895890790c3 | [
"Apache-2.0"
] | permissive | rawrgulmuffins/language_projects | 74d1ffaaf5318e8d1a6430ae3a170d9e203b2ac7 | d40f30badd76027184f124e496170a745e300be0 | refs/heads/master | 2021-01-10T05:04:09.939318 | 2016-10-17T22:40:18 | 2016-10-17T22:40:18 | 47,535,581 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,611 | py | tests.py | """
NOTE: for now this is just intended to be run as python -m tests from the
compiler directory (parent directory of this file).
"""
import logging
import os
import select
import subprocess
import unittest
class CompilerTestBase(unittest.TestCase):
"""Contains the code that actually runs tests and reports their... |
5bded9bad2a523b3a5a86b5f2ef68dce967dbc5c | 2ecb6a209d7d53e394febaae97a8e97ef8f41a02 | /webcart/foodcart/views.py | 371a53b1e6df0e0fc87f1b641d825299121835f0 | [] | no_license | kipsha/dot-py | 939b83ebf5896f1487027dda8c010221cf186d96 | 84db0d75d5982968941ccaef8f4915a045c7758c | refs/heads/master | 2020-06-06T22:35:40.049619 | 2019-06-20T06:34:35 | 2019-06-20T06:34:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,087 | py | views.py | from django.shortcuts import render
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponse, HttpResponseRedirect
from django.urls import reverse
# Create your views here.
def Home(request):
return render(request, "foodcart/home.html")
def about(request):
return render(... |
9bf29f1830cca426b9982033ffd90e87e8e6ec55 | 2a25829368783a62b3d66326c86cb923fef380fa | /what5.py | 18bb7fa15ba09c558bd8e3cb76e68fb6cef56e77 | [] | no_license | hunterxxx/StartHack | 3c33b520e18b8a1c7d5368f1815806cd118c9690 | 01cbc160dea7255bcff46bbc83078158066bc429 | refs/heads/master | 2020-04-27T23:43:12.374394 | 2020-01-10T15:38:04 | 2020-01-10T15:38:04 | 174,787,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,485 | py | what5.py | import requests, json
import pyaudio
import wave
import os, requests, time, json, wave, pyaudio
from xml.etree import ElementTree
class Recorder(object):
'''A recorder class for recording audio to a WAV file.
Records in mono by default.
'''
def __init__(self, channels=1, rate=44100, frames_per_buffer... |
dd88ddfee59fb6b68e0c8e888e3588914ccf40ae | 81539aba88c22cf75bd2e14f5e0e92f2bf54e962 | /DarkMatterMap2017/TTbarDMJets_Dilepton_pseudoscalar_LO_TuneCP5_13TeV_madgraph_mcatnlo_pythia8/TTbarDMJets_Dilepton_pseudoscalar_LO_Mchi-51_Mphi-100_TuneCP5_13TeV-madgraph-mcatnlo-pythia8/TTbarDMJets_Dilepton_pseudoscalar_LO_TuneCP5_13TeV_madgraph_mcatnlo_pythia8_240000_3_cff.py | 8d8183f2c94c4bd61ff5255446fcdaff01f5746a | [] | no_license | nistefan/RandomizedParametersSeparator | ad35b48b95e9745814c0bf9d8d8b6eb8aa479177 | 66a0e291b59113c6b5301768f1c10e36cf23d3c3 | refs/heads/master | 2021-01-03T00:41:17.415005 | 2020-02-19T13:30:54 | 2020-02-19T13:30:54 | 239,838,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,373 | py | TTbarDMJets_Dilepton_pseudoscalar_LO_TuneCP5_13TeV_madgraph_mcatnlo_pythia8_240000_3_cff.py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, lumisToProcess = cms.untracked.VLuminosityBlockRange(*('1:13030', '1:11569', '1:11818', '1:17633', '1:17869', '1:17353',... |
a2567025feb2fd9fab5facddc1c141f859e567c5 | 2ab0791967ae3bbf52053ef82d9ca4ab14f55aac | /algorithm/python/findMedianSortedArrays/findMedianSortedArrays.py | ceedf6df86c11e2795c73b758090ed803531ffe0 | [] | no_license | verybada/leetcode | 8f01dde93f1cd3b0b9698029424cae262d776a48 | 1f0fc27b635bd6c3d6b0f8baad628d1a254bc143 | refs/heads/master | 2022-10-13T13:47:21.506053 | 2022-09-15T15:08:22 | 2022-09-15T15:08:40 | 41,243,779 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 933 | py | findMedianSortedArrays.py | class Solution(object):
def findMedianSortedArrays(self, nums1, nums2):
"""
:type nums1: List[int]
:type nums2: List[int]
:rtype: float
>>> obj = Solution()
>>> obj.findMedianSortedArrays([], [1])
1.0
>>> obj.findMedianSortedArrays([], [2, 3])
... |
dbc88e9105d8210d0aecd73f1815ade49a8c7685 | e9f184d2fb90dfba6c3d935fee2774e881691608 | /wax/models.py | 5fbb6781dc7c2c9c2b30688280ba5a7e6039fef1 | [] | no_license | JasonPellerin/710 | 346ffc0d24ee16417176b37d3c50b037f328ce89 | 2f149365b01fb02db5a8a47840c9da6dc176443d | refs/heads/master | 2021-01-18T15:15:20.321095 | 2015-01-13T22:36:36 | 2015-01-13T22:36:36 | 28,585,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,146 | py | models.py | from django.db import models
from django.utils.encoding import smart_unicode
from djangoratings.fields import RatingField
from django.contrib.auth.models import User
# Create your models here.
WAX_TYPE = (
('E', 'Oil'),
('S', 'Shatter'),
('W', 'Wax'),
('O', 'Other',)
)
HIGH_TYPE = (
... |
8f76a75b286be042837a994d0160b2574e504f4b | f3c4509c4f2830f5429058e0f324a9876654c2a9 | /sequbot_ai/robot/loggers.py | db1433d38a42563ccc9216d4d299886ef85ce5f7 | [] | no_license | phasnox/sequbot | 2482b65b1e4dd855d6c780fe54002affc21b88b0 | 86865383246c463028e263bf3a1e5fb6ba0134da | refs/heads/master | 2022-11-27T11:59:31.382355 | 2020-04-08T19:05:18 | 2020-04-08T19:05:18 | 254,175,116 | 0 | 0 | null | 2022-11-04T19:10:09 | 2020-04-08T18:58:11 | Python | UTF-8 | Python | false | false | 2,085 | py | loggers.py | import logging
import os
import sys
LOG_DIR = '/var/log/sequbot/{}/'
LOGGERS = ['robot_hive', 'instagram_hack_api', 'automata', 'aimodels', 'social_interface']
HANDLERS = {}
LEVEL = logging.DEBUG
# Formatter
formatter = logging.Formatter('%(asctime)s-%(name)s-%(levelname)s: %(message)s')
def get_handlers(proc... |
e160425c7295e9760204dcd2174ce47005daa328 | a40a292161b5f3fc755c53ac01d15a00b7889c56 | /torchcontrib/optim/__init__.py | 5b87fe1791e043f51a8b4dfcc09941d378874184 | [] | no_license | izmailovpavel/contrib | 6574bfe653da233244231c0f093d923e4be8f3f6 | e0f3ad3f30568f5151d6361875fb7b68befff6ae | refs/heads/master | 2020-03-24T03:15:20.582392 | 2018-08-07T23:19:22 | 2018-08-07T23:19:22 | 142,411,297 | 2 | 0 | null | 2018-07-26T08:21:59 | 2018-07-26T08:21:59 | null | UTF-8 | Python | false | false | 21 | py | __init__.py | from .swa import SWA
|
b0cba86030046284f0cf18d92abe6802ca739f32 | 586f151b4e12c4d5d92226c3369c2cfed7b37235 | /mutations.py | 266023d820aea7dc6475bf351fe20e13ecba5711 | [
"MIT"
] | permissive | dlfaults/deepcrime | fbfaf0ada6dee51ebc9996558ce3961f42878f1a | f1f4c8b2d26a1dfb75674cbac0ebf11fa62ec98a | refs/heads/main | 2023-04-14T14:00:04.840316 | 2022-12-14T09:32:55 | 2022-12-14T09:32:55 | 363,419,017 | 14 | 7 | null | null | null | null | UTF-8 | Python | false | false | 62,372 | py | mutations.py | import ast
from copy import deepcopy
from utils import mutation_utils as mu
from utils.logger_setup import setup_logger
import utils.properties as props
logger = setup_logger(__name__)
class Mutation():
applyOnce = True
mutationName = None
def get_model_params_td(self, elem):
"""Extract a dict ... |
1620a7e4d57b868fc068441a805074faa2e78f4d | 7ac271f357f4c8f0c23c697b11966259f836880f | /app/data/fof/stage.py | c5dbc419733ee3cf1278853cc91fd98a8042be1d | [] | no_license | cheng93/PythonWeb | 74a58eadee4ee7d2872a582a907bbf47630df371 | d5ced8dee1d5ba31778125c5e67169c92acf26a0 | refs/heads/develop | 2021-01-19T23:59:11.315871 | 2018-03-04T19:26:18 | 2018-03-04T19:26:18 | 89,063,916 | 0 | 0 | null | 2018-03-04T19:26:19 | 2017-04-22T11:09:14 | Python | UTF-8 | Python | false | false | 648 | py | stage.py | from app.data.fof import Base
from sqlalchemy import Column, ForeignKey, SmallInteger, String, text, UniqueConstraint
from sqlalchemy.orm import relationship
class Stage(Base):
__tablename__ = 'stage'
__table_args__ = (
UniqueConstraint('stage_type', 'rank'),
)
stage_id = Column(SmallInteger... |
d01414809a378a8b5e1db299d0a0877d66c49792 | 257b3c5ba599ac3031179e26ece641b1840971b2 | /Doc2vec/filters.py | 357b12126f32329e5c113d5af4e46096ffea216b | [] | no_license | eubr-bigsea/Tweets-cluster | 510760b492c8fd48b5d55a500f4efecd2e2dbf03 | 199e6e5c4520f346b9c94f5a43622cfd9fb41a4c | refs/heads/master | 2021-01-09T20:02:31.235600 | 2016-08-11T11:21:11 | 2016-08-11T11:21:11 | 64,934,061 | 11 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,672 | py | filters.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import string
import unicodedata
import sys
# THIS CODE ENSURE THE CORRECT ENCODING (OPTIONAL)
reload(sys)
sys.setdefaultencoding("utf-8")
def filter_punct (ent):
''' Remove sinais de pontuaçao STRING --> STRING '''
punct = re.compile('[%s]' % string.punctuation.... |
efd15308b55bfc1f2a93ae40ab6d617c8e97f656 | 4e8d1c3d2500fd7d407281d897aa2f6a99d17a7d | /coupling_analysis.py | e263a3f3530a4938a3b654eeea23449023a2a16a | [] | no_license | kaz94/oscillators | 7e53be90fd33ff3d274d86514c64b2effe032577 | 8a4eb66540c2282b01dc04a530173b17f2acf5da | refs/heads/master | 2021-01-12T15:16:12.969145 | 2017-08-11T19:53:05 | 2017-08-11T19:53:05 | 69,815,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,550 | py | coupling_analysis.py | import numpy as np
from itertools import product
from scipy.signal import hilbert
from scipy.signal import argrelmax
from matplotlib import pyplot as plt
def get_pphases(t, wsol, cut):
wsol1=wsol[:, 0::2]
analytic_signal = hilbert(np.transpose(wsol1))
# cut unstable points due to Hilbert transform
s... |
8df94686cce94b8a680c1aa723b95b4af719593c | 92dfbfbbb1a5ff34e14d4a81297c420682c11dbd | /src/collective/rope/baseportalfolder.py | e26698326f66c853605a90bb59573d5e2bddd68a | [] | no_license | affinitic/collective.rope | 7868e20b974c031ac895bf90d237776690a5b334 | d71a203c55af2938b6f5f683442f711318a8044c | refs/heads/master | 2021-01-15T16:53:21.137734 | 2013-03-15T13:43:38 | 2013-03-15T13:43:38 | 8,626,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,022 | py | baseportalfolder.py | from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from zope.interface import implements
from Products.CMFCore.interfaces import IFolderish
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.PortalFolder import ContentFilter
from Products.CMFCore.permissions i... |
b30d72c73a27480fccb03d5755880c04bf55811b | 006b625e0a87ef0bb511acfa8630f94e07917b3a | /Tarea3/cgi-bin/index.py | 95fb8bbffe8bcfd209b6cf722e01027b63466ef6 | [] | no_license | diegoHurtadoG/desarrolloWeb | 18705c0fdeafd50c1e558fdfb09b5238045af731 | d0a5655d27fa74c55442fb82666fdf1310664aef | refs/heads/master | 2023-05-22T05:41:18.222139 | 2021-06-15T02:45:48 | 2021-06-15T02:45:48 | 352,822,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,565 | py | index.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import db
hbdb = db.Avistamiento('127.0.0.1', 'root', "admin", "tarea2")
data = hbdb.get_lista_portada()
print("Content-Type: text/html; charset=utf-8\r\n\r\n")
utf8stdout = open(1, 'w', encoding='utf-8', closefd=False)
with open('htmls/index.html', 'r', encoding='utf-8') ... |
4c69c059ab81dc2892159e67a9169400060f43fb | 950401d466e71988724a1dd1752e2498aa3ee42f | /atools/old/userTable.py | 85c844645185ddb940d8fe18f7738a45a8caa4ea | [
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] | permissive | sag-googlecode/atools | e5ae37115545a6dbee55688010f00ab082b9672c | 2ed27bc8500c2c810ddf60c32b8f48ff26ea1d24 | refs/heads/master | 2016-09-05T19:01:52.178114 | 2012-01-10T08:34:05 | 2012-01-10T08:34:05 | 32,254,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,874 | py | userTable.py | from lightSql import *
import hashlib
import string
class error:
banned = 0
usernameTooLong = 1
usernameTooShort = 2
passwordTooLong = 3
passwordTooShort = 4
emailTooLong = 5
emailTooShort = 6
usernameBadCharacters = 7
passwordBadCharacters = 8
emailBadCharacters = 9
usernameTaken = 10
emailTaken = 11
use... |
5969489a94c47cb4a4654ac976adf93b6abc91a9 | 6af5bc49d992f9411d86b9dd60e903cea5b7f4e6 | /deepmodel.py | 6293a2c5289c4614104b92ec173a9baf0a7f6f63 | [] | no_license | Song-zhenzhen/movie_score_emotion_analysis | 9fbd4da078fb97a42eaa4c5b33992cdc4657d034 | 9387884af9774da9108598231a6ed928cc7502df | refs/heads/master | 2020-05-20T14:02:03.041944 | 2019-05-08T13:41:52 | 2019-05-08T13:41:52 | 185,612,902 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,939 | py | deepmodel.py | # -*- coding: utf-8 -*-
"""
Created on Wed May 8 16:11:07 2019
@author: 振振
"""
import pandas as pd
import re
import nltk
from nltk.stem import WordNetLemmatizer
from nltk.corpus import stopwords
from sklearn.metrics import f1_score, confusion_matrix
from keras.preprocessing.text import Tokenizer
from keras.preprocess... |
f9f40e7bef6945eaade4663a577a62177cda5d38 | 400ee07c8188a15d37f333f1564a07568c8f9fc0 | /setup.py | 9b9f3a563e3f1c43b11225b9dccc09872ab0e80c | [
"MIT"
] | permissive | kjhhgt76/moblabpy | 7c150c82fb6d3547e287d5cb01b9471adb99b35f | 934fa0d21762f4bc599b698729929053cc57297b | refs/heads/main | 2023-06-03T23:06:30.715828 | 2021-04-19T09:47:43 | 2021-04-19T09:47:43 | 378,693,697 | 0 | 0 | MIT | 2021-06-20T16:40:43 | 2021-06-20T16:40:42 | null | UTF-8 | Python | false | false | 1,391 | py | setup.py | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="moblabpy", # Replace with your own username
version="0.0.2",
author="Moblabpy Official",
author_email="moblabpy@gmail.com",
description="A module that allow use... |
77f307840563626d09d09da2a6d1091e1a281215 | 9c44e20f377ff077cd6d5c9f35b702dca462cfae | /app/bbs/migrations/0009_auto_20200310_1633.py | 707ed2241f161052dca622e5c4fc3cd7d0af2e0f | [] | no_license | h-otter/n0bbs | 1653b9f6f5fc4ab8ed18c9355957a8aa3365021d | 648ed299b987b2875406b4f2cf06e9489392957b | refs/heads/master | 2023-01-07T04:03:07.435442 | 2020-05-09T15:23:29 | 2020-05-09T15:23:29 | 245,365,065 | 0 | 0 | null | 2023-01-05T09:43:16 | 2020-03-06T08:19:23 | TypeScript | UTF-8 | Python | false | false | 424 | py | 0009_auto_20200310_1633.py | # Generated by Django 3.0.4 on 2020-03-10 07:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bbs', '0008_auto_20200306_2225'),
]
operations = [
migrations.AlterField(
model_name='thread',
name='title',
... |
a12d16d47f0b93ce674887023e552d40aeba9ed1 | 3239ed96f99baa3b5e3a997f499940d2e3a18c7e | /Module_1/Section_5/Assignment15.py | 101c88cce514a533765875c867a998183bc2abf5 | [] | no_license | sourabhgupta385/Infosys-Assignments | 70cb4f8cd1d0e7c51278f49086b74d0fcb35c870 | 3a291d6bdef686ebdff94878d80a6b3300067394 | refs/heads/master | 2020-03-11T15:52:14.724028 | 2018-05-17T11:13:48 | 2018-05-17T11:13:48 | 130,098,468 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | Assignment15.py | '''
@author: SOURABH GUPTA
'''
'''
Create four string variables a, b, c, d to store the following values and display them:
• My city is Mexico
• Raghu is my friend's brother
• My favorite programming language is "Python"
• Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.
... |
3e8bf30349c7a0998905e8c9c0d5658d2289aa45 | e5dfc3578a4ea95ffdba766882cc32b93972a8a7 | /ipscan.py | f29a2f752da7ef044503876c8d5caa76836a803c | [
"MIT"
] | permissive | starzc-galaxy/ipscan | 2885d498092a6e3ee35a062fbf9ff75cc9c9f7cf | 063c9c5dc62568bf4f6f34caf9103a5194302667 | refs/heads/master | 2023-06-18T14:29:28.111750 | 2021-06-12T03:58:12 | 2021-06-12T03:58:12 | 374,867,786 | 3 | 0 | null | 2021-06-09T03:11:02 | 2021-06-08T03:21:55 | Python | UTF-8 | Python | false | false | 2,474 | py | ipscan.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ipscan.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui... |
58255e7cb3035f434939ad3377ed23942bff9881 | b9fe1015c96af5b93c5d6f9821fc15b8730ac723 | /dec10/m10.py | dedb5abe410986a45bc8c9f5b2eb3c8b508504bc | [
"MIT"
] | permissive | einarssons/adventofcode2020 | 16f5eaef18c506a054f76d47309a237701b878da | f5c6251b4eacf14e3947bfaaa27f3fac624ea923 | refs/heads/main | 2023-02-05T08:26:01.663323 | 2020-12-25T11:34:55 | 2020-12-25T11:34:55 | 317,015,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,068 | py | m10.py | from dataclasses import dataclass
@dataclass
class Steps():
step1: int
step2: int
step3: int
def sorted_jolts(adapters: [int]) -> [int]:
jolts = adapters[:]
jolts.append(0)
jolts.sort()
jolts.append(jolts[-1] + 3)
return jolts
def find_jolt_steps(adapters: [int]) -> Steps:
"Fin... |
da45cdae91836547da5cdaa5426b6f065a7225b8 | 5ac0c7126ecd47d6edac6d33075fa312407d72f5 | /jumpstart.py | da1163010083b7357f2e052a7c4a8c0389299bb8 | [] | no_license | RodneyMorgan97/calendarJob | f55a8bf404136fdefa2b463d3044c48aeb9a0e39 | fbb1d67703a1709a6611e68963906f73c0b3393e | refs/heads/master | 2021-05-07T13:53:04.818007 | 2017-11-26T20:57:16 | 2017-11-26T20:57:16 | 109,715,007 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,651 | py | jumpstart.py | from bs4 import BeautifulSoup
import urllib2
import json
import helperFunctions
def getJSON():
try:
hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;... |
28e477d570ab7be6865baed6cd4ad21897e78709 | 8105596344568e793ded611ee3673378f2f608e4 | /wintozg/test.py | def256a323225e5d85b24ed07d5b4574f5944e2a | [] | no_license | Ma-Min-Min/ufc | 8cedb6b3bbecdcae028f69b31a028c71eec92c44 | 6c746a425708d2ae277b0a64842579287f1239da | refs/heads/master | 2020-03-22T12:07:18.632640 | 2018-08-31T14:46:51 | 2018-08-31T14:46:51 | 139,479,901 | 0 | 0 | null | 2018-07-02T18:30:00 | 2018-07-02T18:30:00 | null | UTF-8 | Python | false | false | 5,919 | py | test.py | import unittest
import win2uni
import uni2zg
class TESTZG2WIN(unittest.TestCase):
def test_article_one(self):
zawgyi = u'''အပိုဒ္ ၁
လူတိုင္းသည္ တူညီ လြတ္လပ္ေသာ ဂုဏ္သိကၡာျဖင့္ လည္းေကာင္း၊ တူညီလြတ္လပ္ေသာ အခြင့္အေရးမ်ားျဖင့္ လည္းေကာင္း၊ ေမြးဖြားလာသူမ်ား ျဖစ္သည္။
ထိုသူတို႔၌ ပိုင္းျခား ေဝဖန္တတ... |
36a4caf89080c1507d40a30d0c4bd6a93fb052fa | 453a76770313c76e575ff161c05c29c55fe678df | /algorithms/rps/server.py | b88cec3c32d3c3c3954912523672ef36bcc5b61d | [] | no_license | nestevez/dojo-python-django | 72b8f18962168f2085ffbc7f516ee5984b1a0107 | e74b1770aab81fd27a1870c43bdf36bbbb1e3210 | refs/heads/master | 2021-01-20T05:27:23.772640 | 2017-09-26T22:20:11 | 2017-09-26T22:20:11 | 101,445,517 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,350 | py | server.py | from flask import Flask, render_template, request, redirect, session
import random, emoji
app = Flask(__name__)
comp = 0
user = 0
options = {
0: 'Nuclear Bomb',
1: 'Cockroach',
2: 'Foot'
}
message = ''
@app.route('/')
def index():
session['wins'] = 0
session['losses'] = 0
session['ties'] = 0
return r... |
211090430be5266c6b35734612115b4c753d7742 | 2d9abbb0a3018330712fb5b2ca99db1fe481b8d0 | /CMS/myapp/migrations/0005_auto_20201009_1022.py | 8c8b8527060d7ea58c2d08b70112c9e6b464f2f8 | [] | no_license | Abhi84012/sagar | eaf77452309671eecadf15f957232b8a32753492 | 6547c95e5d6f633b906f82d16ab557f1823c6e20 | refs/heads/master | 2022-12-24T11:23:00.300414 | 2020-10-10T04:05:29 | 2020-10-10T04:05:29 | 297,880,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 461 | py | 0005_auto_20201009_1022.py | # Generated by Django 3.1.2 on 2020-10-09 10:22
from django.db import migrations, models
import myapp.models
class Migration(migrations.Migration):
dependencies = [
('myapp', '0004_auto_20201009_0713'),
]
operations = [
migrations.AlterField(
model_name='person',
... |
ed042d792a4c320de8f4893580650b526a645280 | 7a4ac773912fa5c3eb3f8d684eb6050e403832b0 | /python/exercise/error3.py | 89aafd67b06b06b5a62f884bda42919eacf1fb5c | [] | no_license | macinjoke/various | 8e7de61b7bec28bd4b5e6210243fec1891b77f5e | 11ff1d09a94dba41ffd586eb8a56175a94c1674c | refs/heads/master | 2022-12-24T15:02:21.726248 | 2018-12-09T12:58:51 | 2018-12-09T12:58:51 | 81,713,017 | 0 | 0 | null | 2022-12-14T03:10:15 | 2017-02-12T08:31:34 | JavaScript | UTF-8 | Python | false | false | 975 | py | error3.py | class Error(Exception):
"""Base class for exceptions in this module."""
pass
class InputError(Error):
"""Exception raised for errors in the input
Attributes:
expression -- input expression in thich the error occurred
message -- explanation of the error
"""
def __init__(self, e... |
e0535dbcdc41f9cb11619383088bbf9dd7f74131 | 8e62d6b8f49a611cb57e423956e4390ca62c54f1 | /DragPushingCentroid.py | 04f7dcfa4240a03859e4739305fbb9d071177809 | [] | no_license | asonee/MachineLearningWithPython | a70dbc31ee90c41133b319c2876590cb4eb76342 | e4c994efa130677325d44861c5dffa2726c7dac1 | refs/heads/master | 2021-01-20T17:21:19.763129 | 2016-06-25T02:33:40 | 2016-06-25T02:33:40 | 61,854,267 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 7,766 | py | DragPushingCentroid.py | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 4 18:16:25 2015
@author: TuGuanghui
@E-mail: guanghuitu@gmail.com
实现推拉质心向量算法
使用该算法需要调节的参数1)学习率 2)最大迭代次数
"""
import numpy as np
import matplotlib.pylab as plt
import math
"""
加载简单数据集
@return 数据集
"""
def loadSimpleDataset():
"""
dataset = [[1, 2.1, 1.0],
... |
889e6a9f40b6980a998cab713a5c9efe42f24c4d | 58fe3cbfbbe5aef86c31ceed3005ace6d7be7d54 | /Abstract_Extraction_Seq2Seq-PGN/Abstract_Extraction_Seq2Seq/seq2seq_pgn_tf2/test_helper.py | 2e22d9e886f4e38b323934fb4c100026061c2a52 | [] | no_license | qq751220449/Abstract_Extraction | d8d63004a09cb82af297a6ab44cacf71ecf655ff | f4eca168bda90dd6f56aa5e22ea15589f5e8fc1a | refs/heads/master | 2022-12-31T10:38:03.624793 | 2020-10-20T14:40:16 | 2020-10-20T14:40:16 | 305,736,243 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,158 | py | test_helper.py | import tensorflow as tf
import numpy as np
from seq2seq_pgn_tf2.batcher import output_to_words
from tqdm import tqdm
import math
class Hypothesis:
""" Class designed to hold hypothesises throughout the beamSearch decoding """
def __init__(self, tokens, log_probs, state, attn_dists, p_gens, coverage):
... |
295dcfd3fe20ea8ce11c4fc055ef7ff19a77754b | ef7eabdd5f9573050ef11d8c68055ab6cdb5da44 | /codeChef/practice/easy/dce03.py | bf6d17d4c0c559011275a3e0d5f9f3c10576364f | [
"WTFPL"
] | permissive | gauravsingh58/algo | cdbf68e28019ba7c3e4832e373d32c71902c9c0d | 397859a53429e7a585e5f6964ad24146c6261326 | refs/heads/master | 2022-12-28T01:08:32.333111 | 2020-09-30T19:37:53 | 2020-09-30T19:37:53 | 300,037,652 | 1 | 1 | WTFPL | 2020-10-15T09:26:32 | 2020-09-30T19:29:29 | Java | UTF-8 | Python | false | false | 169 | py | dce03.py | catalans = [1]
for i in xrange(0, 1001):
catalans.append((2*(2*i+1)*catalans[-1])/(i+2))
for _ in xrange(int(raw_input())):
print catalans[int(raw_input())-1]%10000 |
aceeb7e2ef862432d1b0a7b33063295e1a36b34c | f595e2ff3de5e63cf8bb96ecbe956ca2fd925152 | /optimization_switch.py | a6ba04b2c0069716aaf2083de51b8f41270ba8c4 | [] | no_license | vsk23/consistent_updates | 33a61483cea04d99bcaba9296d03a0285f4e8b76 | f1043331b12d7ea4a168ce8950e44ddfdc735f96 | refs/heads/master | 2021-01-17T05:54:17.935664 | 2013-05-11T23:49:24 | 2013-05-11T23:49:24 | 8,741,507 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | py | optimization_switch.py | config = { "1":["flow1","flow3","flow2"]}
def if_one_touch(config):
one_switch = len(config)
one_touch_ok=1
one_touch_no_ok=0
if one_switch is one_touch_ok:
return one_touch_ok
else:
return one_touch_no_ok
myreturn=if_one_touch(config)
print("if_one_touch : " + str(myreturn));
|
253848b93f47c404f787de999d0343dd0edbbab3 | 55ee9d59d5b2a683843ee56dcedffef673d59f45 | /plugins/top.py | dcd2c490a4014d7a955ed09d967ee3a7da00c0ae | [] | no_license | 3mph4515/Chat-Wars-Ratings-Bot | c5b841f1b6ddbf5fa7b47ed169e861485d15905d | 3e146beeb1710a481a1083a543d26ad38b4f0c3f | refs/heads/master | 2021-09-14T23:08:51.894284 | 2018-05-21T21:49:43 | 2018-05-21T21:49:43 | 104,122,355 | 1 | 2 | null | 2018-05-21T21:49:44 | 2017-09-19T20:01:08 | Python | UTF-8 | Python | false | false | 3,117 | py | top.py | import time
import re
from config import *
FORWARD_EXPIRE_TIME_IN_SECONDS = 120
@bot.message_handler(regexp="top(.*)")
def command_start(m):
r_full = re.search("top_(\d+)_(\d+)", str(m.text))
r = re.search("top_(\d+)", str(m.text))
if r_full:
range_from = int(r_full.group(1))
range_to = ... |
6febb874417ce3e5ae458445f2fd1174e0b21be2 | 915a15399973bbfeef75c8ea492b3883dbc0a30c | /scripts/EmuVao.py | 08de35fbdeb9974d1f35f76f717d2abddc495020 | [] | no_license | Mars999/regal | e33af4ddfa5d807bad8a1b13707071cb00a457b2 | 65a0efee0619e7922ff15cf57458be4f6b4415a9 | refs/heads/master | 2021-04-12T09:10:12.261082 | 2012-08-06T21:15:33 | 2012-08-06T21:15:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,285 | py | EmuVao.py | #!/usr/bin/python -B
vaoFormulae = {
'Begin' : {
'entries' : [ 'glBegin' ],
'prefix' : [ 'rCtx->vao->Begin( rCtx, ${arg0} );' ],
},
'End' : {
'entries' : [ 'glEnd' ],
'prefix' : [ 'rCtx->vao->End( rCtx );' ],
},
# TODO - GL_ARB_base_instance ?
'Validate' : {
... |
a23a6fd0d487d1426ec450bd10c444af83e58ccf | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2463486_0/Python/razimantv/C.py | ca652576583e908e09d4eb5d12130047326ca3a5 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | C.py | from __future__ import print_function
def reverse(N):
M=0
while N>0:
M=M*10+N%10
N/=10
return M
def ispali(N):
return reverse(N)==N
lim=[0 for i in range(7)]
for i in range(6):
lim[i+1]=10**i
T=int(raw_input())
L=[0 for i in range(T)]
R=[0 for i in range(T)]
X=[0 for i in range(T)]
for i in range(T):
L[i... |
22d24e5e926dfbefe3e51ace9a57898163854ab0 | f0a159538a6c3bf22c83628d1ac3de4cc6999541 | /Interview Preparation/GreedyAlgorithms/MaxMin.py | 7bd7051a32c586653d7d9525c3849b52bde09f7c | [] | no_license | Amaan5033/Hacker-Rank-Interview-Preparation- | dbffe9636daf252c58c556aafd1574e01a6f2c0a | 5dbaa265e6b5b8b5ef1bf87a7854f7f110a539f7 | refs/heads/main | 2023-05-11T08:40:46.007214 | 2021-05-31T12:20:53 | 2021-05-31T12:20:53 | 372,492,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,009 | py | MaxMin.py |
def merge(arr,l,m,r):
left_array=arr[l:m+1]
right_array=arr[m+1:r+1]
i,j,k=0,0,l
while i<len(left_array) and j<len(right_array):
if left_array[i]<=right_array[j]:
arr[k]=left_array[i]
i+=1
else:
arr[k]=right_array[j]
j+=1
k+=1
... |
07b381b40aae883d4e599f5fe7ce3ce4fb705c46 | a5568d02589a7db8047b3b2675dbccf27082fc7a | /Task-06.py | 49efb1b78d25be7018f1f825e98087769d7d8978 | [] | no_license | Tebogo-Sealetsa/Level-0-Coding-Challenges | 8f7102dd23fe74f28e3e15aa9447be368e859c56 | 3376202ece29c9c44dfdf86d15ad7ed1355f7563 | refs/heads/main | 2023-08-23T04:57:24.285862 | 2021-09-22T14:13:03 | 2021-09-22T14:13:03 | 408,820,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | Task-06.py | def maximum(*args):
a = None
for b in args:
if a is None or b > a:
a =b
print(a)
maximum(20,40,10,39,90,100)
|
43aaacab69439a194234f903c1aa58fd8a76cb2d | b77f639499daf94066654f1013bc741d439021d2 | /gicowa/impl/mail.py | 9139d3cbfd4c4dabd4e462c53215c1094a75a6dc | [
"Unlicense"
] | permissive | devopstoday11/github-commit-watcher | 70c5216aa4f45309e21b643ca382ef0384dc37f0 | ca4ea1ee8ebaefdf270e4d16735d563f23cf4833 | refs/heads/master | 2021-09-24T11:53:02.253671 | 2018-10-09T13:40:00 | 2018-10-09T13:40:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,024 | py | mail.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from email.mime.text import MIMEText
import smtplib
import encoding
class MailSender:
def __init__(self):
self.server = "localhost"
self.port = None
self.sender = "gicowa@ghuser.io"
self.dest = set()
self.password = None
d... |
b33008e8bc2837b52c4b87bb3d0b02a3bd451752 | 84ac3692d3389faa6c85eedc25f6cf439ed3a323 | /networks/CorrFeature.py | 42085c0ff0ddcdb33c48a5abecbaead998041792 | [
"Apache-2.0"
] | permissive | guanxiongsun/flow | fc434d00fa9224f54346abab0ae2c090b170dac7 | 49c78bc71ac8cb744de9c72f1a4732738b53ca45 | refs/heads/master | 2022-09-02T14:57:25.422640 | 2019-06-05T17:41:58 | 2019-06-05T17:41:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,887 | py | CorrFeature.py | from torch.nn import init
from .correlation_package.correlation import Correlation
from .submodules import *
'Parameter count , 39,175,298 '
class CorrFeature(nn.Module):
def __init__(self, args, batchNorm=True, div_flow=20):
super(CorrFeature, self).__init__()
self.batchNorm = batchNorm
... |
5bce5311ca1695ffc0c4c43218b898258317a23b | 027f52cbbd4e9ccd52b73dcf9ed523137ec78815 | /python_language/Day_Base_Code/Day_15/contactTest.py | 63e138fa4fe4899cb0653f0595ee3fe97793a688 | [] | no_license | Jade2290/bigdata_class | 0c851440852857ee44496b7112db580cf9b60d57 | 380ad58d56ea4fbcea81f78f9648b1edf27e0554 | refs/heads/master | 2022-04-11T05:05:25.429853 | 2020-03-27T14:30:36 | 2020-03-27T14:30:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,180 | py | contactTest.py | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 24 16:33:37 2019
@author: sundooedu
"""
class Contact: #ID 추가
def __init__(self, ID, name, phone_number, e_mail, addr):
self.ID= ID
self.name= name
self.phone_number= phone_number
self.e_mail= e_mail
self.ad... |
297dcd55e2bac9c689786ad818616e289982895a | 3b282076c1c414d87aa8b2d2c36cf3f956d82c48 | /tutorials/intro/Intro_Tutorial_3.py | 5201205e47162e202b698e2e290d4526f45cb461 | [
"Apache-2.0"
] | permissive | rapheallong/snorkel | 57cd3f9fccc746fc4b2cb3d8fb6afa9224829b5c | 662a8dae8873bb42d31ac26d79afb801b547a7d5 | refs/heads/master | 2021-05-14T15:59:19.859220 | 2018-02-01T10:44:01 | 2018-02-01T10:44:01 | 116,003,629 | 0 | 0 | null | 2018-01-02T10:28:12 | 2018-01-02T10:28:11 | null | UTF-8 | Python | false | false | 3,598 | py | Intro_Tutorial_3.py |
# coding: utf-8
# # Intro. to Snorkel: Extracting Spouse Relations from the News
# ## Part III: Training an End Extraction Model
#
# In this final section of the tutorial, we'll use the noisy training labels we generated in the last tutorial part to train our end extraction model.
#
# For this tutorial, we will be... |
84cfea712ecfd38a6db1464c1cf27a4cdedee511 | a86be6e79554eb1466d51392172c4be06c038616 | /Livro exercicio 3.12.py | f6a34e6b1c08674209a65f2db9ebf2652b2676ec | [] | no_license | coabr/Introducao_a_programacao_com_python | efdfbc35477505fbb6a636fd97ab3632675bb118 | 08f69d4e56f4f9114ac45eee6cc09f4d7f68c6ca | refs/heads/master | 2022-03-24T01:12:23.027576 | 2019-12-11T13:40:45 | 2019-12-11T13:40:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | Livro exercicio 3.12.py | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 17 19:17:14 2019
@author: Carol
"""
temperatura = int(input('Digite a temperatura: '))
conversor = ((9*temperatura/5)+32)
print ('Atemperatura em ºF eh: ', conversor) |
bf241b0f0bfd8ce2e33046783983eff85198aa10 | 61333a66a9909ece13e286ed87852859eee910c1 | /display_colour_histogram.py | e996960b2eb43aa550ecb5a756540a6fbccbdf0b | [] | no_license | emilutz/Flowers_Recognition | b86fab23fe4d7241bc250ab47499a3ac1e6c2fb9 | 0cac8ce962d4cf5475adf58ba567e6ab258093c9 | refs/heads/master | 2021-09-15T00:33:18.435098 | 2018-05-22T20:53:52 | 2018-05-22T20:53:52 | 126,066,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,483 | py | display_colour_histogram.py | import os
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from functions import *
if __name__ == "__main__":
if len(sys.argv) != 3:
sys.exit('Insert a flower and a number')
try:
flower = sys.argv[1]
number = int(sys.argv[2])
files = os.listdir(os.path.join('... |
7da7d398d522e18f6e1be18bf041223bc243386d | 0bc1d920c8f591169fb057fbd30a305d18360c91 | /camp/StructuredGridOperators/BinaryOperators/ComposeGridsFilter.py | 5967e16f5257e2e2b440eef72e02dd4d714320bd | [
"MIT"
] | permissive | fuslab-uofu/CAMP | 7bf8205e68359dd63ba886e5437e8f9b7deca59f | a42a407dc62151ab8a7eb4be3aee1318b984502c | refs/heads/master | 2023-03-07T01:42:23.179890 | 2021-02-16T19:13:59 | 2021-02-16T19:13:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,154 | py | ComposeGridsFilter.py | import torch
from ..UnaryOperators.ApplyGridFilter import ApplyGrid
from ...Core.StructuredGridClass import StructuredGrid
from ._BinaryFilter import Filter
class ComposeGrids(Filter):
def __init__(self, padding_mode='border', device='cpu', dtype=torch.float32):
super(ComposeGrids, self).__init__()
... |
4a074950f97c120cec87bb3dee0107f89d10dee3 | 5889d17beed95248afe4b39fab436abb580504a0 | /first.py | d5e57a277e15d22326ba0b0c4a1aa45265cd5a19 | [] | no_license | tylerwooten/career-path | aa28085f07fed73db13312d22f4322269a18870c | d7c36310efb4325d0c1ae8bfe376d01679c82c49 | refs/heads/master | 2022-05-24T03:43:25.481707 | 2020-04-25T13:21:07 | 2020-04-25T13:21:07 | 258,780,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,096 | py | first.py | import networkx as nx
import pandas as pd
import matplotlib.pyplot as plt
#
df = pd.read_csv('titles_small.csv', dtype='unicode')
csv_out = []
v = 1
for row in df.itertuples():
data = [x for x in row if isinstance(x, str)][1:]
for n, k in enumerate(data[:-1]):
temp = {}
print('processing line: ... |
aa149a91b5ab0c9a02be45e40a69acb6ca244371 | ed7badfc7ecd738001f4d3e9945cce3a2d8b059d | /spiralMatrix.py | 9c8b6de653d60020faf7d173bc31ceda4b69afc5 | [] | no_license | tanjingjing123/LeetcodeAlgorithms | ab41f20bfca1305d07af00ae8db725fef6d059b8 | 2bb2881824cc4e84ab6afad6085e02e1b682c96d | refs/heads/master | 2023-02-04T12:22:52.665477 | 2020-01-01T00:11:20 | 2020-01-01T00:11:20 | 284,194,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | spiralMatrix.py | class solution:
def spiralOrder(self, matrix):
right = 0
down = 1
left = 2
up = 3
direction = 0
spiral = []
while len(matrix):
if direction == right:
spiral += matrix[0]
matrix = matrix[1:]
elif directio... |
89af511de8528948a4ef312444de5233bfe802c8 | 7b26a0058c05b35f3520d47bbe979b8fdebbaadb | /BeautifulSoupRequestHtml/WebScraping1/scrape.py | b14e4638ddc2dadf3b8488d177144bc28bfcff9b | [] | no_license | marco714/WebScraping | 7f66c7a1e08d450c0377a173fcaa85b8b1aab736 | 41655e0b11db59a344b09c0ad798d30361187754 | refs/heads/main | 2023-01-05T07:44:33.074919 | 2020-10-29T08:34:46 | 2020-10-29T08:34:46 | 308,264,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | scrape.py | from bs4 import BeautifulSoup
import requests
with open('index.html') as html_file:
soup = BeautifulSoup(html_file, 'lxml')
for article in soup.find_all('div', class_='article'):
headline = article.h2.a.text
print(headline)
summary = article.p.text
print(summary)
#article = soup.find('div... |
09c0a1bf71f3a08a67ca1b8ac4ca761cf8be5084 | 368f2c7a97af2a11719f0d0f74b45447aba6f8ab | /python/python-lab-3/Project-7.py | d8724d5522ef7602f026d6d8a675cafbca45a7e4 | [] | no_license | RidgeHood/Mashupstacks-Projects | 934a7cc02bff8f85bcf408231a0b675482f69ccb | b361c9072ece3f64a3f57a1849ed5c3eec5a1c80 | refs/heads/master | 2023-06-26T22:59:57.553002 | 2021-07-30T10:58:20 | 2021-07-30T10:58:20 | 388,719,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | Project-7.py | rfile=open("test.txt",'r')
a=[]
for line in rfile:
a.append(line)
print(a) |
e09aeb98a8a736d3bc468a10b9e1b3b14b64d285 | 5036c8a65d3f69a9e6ab876068830be508083597 | /setup.py | b805c851c36b1b6f542250811afbda8fa0ddcb11 | [
"Apache-2.0"
] | permissive | wandsdn/ofsolver | 5b5e78b0d01d8fb27a6b59696eb14130f19b1d5f | 64795a84220416b1a2e4df13198c6529995b7f53 | refs/heads/master | 2022-10-26T14:08:43.754858 | 2019-12-09T00:20:48 | 2019-12-09T00:20:48 | 226,220,969 | 1 | 1 | Apache-2.0 | 2022-10-10T04:19:19 | 2019-12-06T01:29:42 | Python | UTF-8 | Python | false | false | 4,128 | py | setup.py | #!/usr/bin/env python
"""
Installs the ofsolver tool and library
"""
import sys
import os
from os import path
import stat
from platform import architecture
import tarfile
try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
import distutils.cmd
from setuptools import s... |
9f84d4d40bf6b4f4b771fd5bfeccc3e189ef47c0 | bf193a7205f25086ddf5ba59700cc543cd89344e | /accounts/urls.py | eb483c7bf8c9e1077494b8371fa77fbdbbafc477 | [] | no_license | jagdisharma/product-hunt | a4d35d2775c2a73a52602d179f71441d81cef405 | f103f95ab5d26022cf328ccd092aca721554f2bf | refs/heads/master | 2020-09-01T05:14:46.862368 | 2019-11-16T13:50:59 | 2019-11-16T13:50:59 | 218,888,028 | 0 | 0 | null | 2019-11-16T13:51:00 | 2019-11-01T01:07:25 | Python | UTF-8 | Python | false | false | 453 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('signup', views.signup, name='signup'),
path('login', views.login, name='login'),
path('logout', views.logout, name='logout'),
path('profile', views.profile, name='profile'),
path('change-password', views.changePassword, name='cha... |
0829dd1667046ee169cca279a2c7851cbd1197fd | 612b6bdb6e8a97dd78c64346d7f3821d6b898a8a | /misc/FileReader.py | b4f63c67cfa6fa09571805d11b927a2790972097 | [
"MIT"
] | permissive | bioCKO/asep | bc26c85c02ab6b2050ec04fbb8d16c84ae651530 | 7b966a29c79ae59b5c0aa377d1754ef74f91ce98 | refs/heads/master | 2022-11-12T17:31:19.816167 | 2019-09-09T13:32:42 | 2019-09-09T13:32:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,448 | py | FileReader.py | from sys import stderr
# import pandas as pd
import pysam
class FileReader:
"""A class for file reading
"""
def __init__(self, fn):
"""Initialization
"""
self.file_name = fn
def read_file(self, method=None, mode=None, **kwargs):
"""Read file by default method
... |
a2fb75cd15e0ae08cf62bf874e9cda5916af92bc | c21f8243471a24ffe6da9ba55709e815e3bc0af5 | /a_graph.py | 7cc67c9baf4d36d3e737493435068145b2f89c33 | [
"MIT"
] | permissive | B3rse/a_graph | 3690805aaa1b23f6f86e707090ec56a986e62508 | e790f6b18efa4ac9613a5af10465fb95f9e2860b | refs/heads/master | 2021-07-15T06:20:30.642080 | 2021-06-21T14:42:58 | 2021-06-21T14:42:58 | 128,080,307 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,813 | py | a_graph.py | #!/usr/bin/env python
######################################################################################
## a_graph.py
#
# Author: Michele Berselli
# University of Padova
# berselli.michele@gmail.com
#
######################################################################################
######################... |
8df3d47e4e507f2716ff142629958c680e78d664 | f558b3e922167e3fcfb25e96ad6325d341d319c1 | /seqio/fastq.py | 675fc60d18fe995834bb853b9035fb34d8adc6d1 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | jdidion/seqio | a3dc4f0e9187efe16bb89b205cd367f121c7dd7d | 530fed787361e3dd5ca62693d94e84c44055b23a | refs/heads/main | 2021-01-24T11:08:34.648767 | 2020-01-14T21:51:13 | 2020-01-14T21:51:13 | 70,256,276 | 5 | 0 | NOASSERTION | 2020-06-18T13:55:23 | 2016-10-07T14:52:32 | Python | UTF-8 | Python | false | false | 2,677 | py | fastq.py | # https://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_FASTQFiles.htm
from seqio.format import TextSequenceFormat, EMPTY, NEWLINE
from seqio.io import (
SingleFileReader, PairedFileReader, InterleavedFileReader,
SingleFileWriter, PairedFileW... |
2160bec189f5ed8e3e09ddd51ae56acbb9d12eaa | 23e9fbd5b58c5b3ecd4fc0e6f272142a675072a8 | /GA.py | dfcc4c956386951062cd66324f282627af78b5b7 | [] | no_license | sam0719/GA | f66162337d3fec4deb4a446b5ad74ede3711b903 | f5cda5bd8ae5a6d4217673276b7f0152009be56e | refs/heads/master | 2022-11-26T03:26:13.544946 | 2020-08-11T03:53:40 | 2020-08-11T03:53:40 | 280,328,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,519 | py | GA.py | import numpy
from time import *
import math
class GA:
def __init__(self,length,number,limit):
self.limit = limit #迭代次數
self.length = length #長度
self.number = number #種群數量
self.survival_rate = 0.2 #选择率
self.mutation_rate =0.1 #突變率
#self.tournament = 5 #tournament selec... |
759470f6bc07bf3a0792e1310c1fb0e7e6d105ff | a69dce38512c24085a05fc73f913235ea083d207 | /integ/test_extended_counters.py | 2aa75c247ce44e422cbd38f9aeb077ec31342ea4 | [
"BSD-3-Clause"
] | permissive | twitter-forks/statsite | 016c22d73e475747bf975c5d4b02502e0c2bad2b | 33e7d6c65a6abf8a2b5269b90dfc4ad8674169b6 | refs/heads/master | 2020-12-25T23:46:36.775162 | 2019-09-25T18:06:50 | 2019-09-25T18:06:50 | 34,355,843 | 24 | 9 | BSD-3-Clause | 2019-09-25T18:06:51 | 2015-04-21T22:40:41 | C | UTF-8 | Python | false | false | 3,614 | py | test_extended_counters.py | import os
import os.path
import shutil
import socket
import subprocess
import sys
import tempfile
import time
import random
try:
import pytest
except ImportError:
print >> sys.stderr, "Integ tests require pytests!"
sys.exit(1)
def pytest_funcarg__servers(request):
"Returns a new APIHandler with a fil... |
a9dc6a0fce0dbaf2f46ca684ffa3d8ce93d1ab1f | d66eb1032384929151f9708f040e333ee53aa9d2 | /s3backgrounddelete/s3backgrounddelete/s3backgroundproducer | d1d452ea748ca69ae647373ee946a58564575d19 | [
"Apache-2.0"
] | permissive | Seagate/cortx-s3server | 2762cbbe352590cdd06e39d8fab5c33e553f0be8 | b1987967aec7e24530c9703db6f100d2c8289624 | refs/heads/main | 2023-07-06T09:04:44.435137 | 2023-06-26T06:32:53 | 2023-06-26T06:32:53 | 254,163,200 | 38 | 157 | Apache-2.0 | 2023-06-26T06:32:55 | 2020-04-08T18:02:07 | C++ | UTF-8 | Python | false | false | 518 | s3backgroundproducer | #!/usr/bin/python3.6
import sys
import os
from s3backgrounddelete.object_recovery_scheduler import ObjectRecoveryScheduler
if (len(sys.argv)>1):
producer_name = str(sys.argv[1])
else:
producer_name = "prod1"
if (len(sys.argv)>2):
base_config_path = str(sys.argv[2])
else:
base_config_path = "/etc/cortx"
if (... | |
aa27cb3ba0f5832970842c32a09d180168b2d37e | 49815fa2a0ac973608ecacb3fa7ffbc7ea9aff52 | /pydart/pydart/skeleton.py | 29442ffaa231f44b770bd6ff03d756f4a15453fe | [
"MIT"
] | permissive | Jungdam/AlphaCon | 1856f94f3139318312979a84074594ceebc3a355 | 2c70e848ab176537560484d28869cdc3c2fc8cd7 | refs/heads/master | 2021-06-07T23:20:39.184939 | 2016-10-18T05:33:49 | 2016-10-18T05:33:49 | 54,889,718 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,025 | py | skeleton.py | import os.path
import pydart_api as papi
import numpy as np
from skel_vector import SkelVector
from body import Body
from dof import Dof
from joint import Joint
from marker import Marker
class Skeleton(object):
def __init__(self, _world, _filename=None, _friction=None, _id=None):
self.world = _world
... |
5f411617d8c869c7d068e7db42442decc0d4405b | 4c91a347517d7bb5fe45e6ad103e09ed1da69139 | /base.py | 5395297ade0952cc2da662385224fee5f1de6acd | [] | no_license | y-y-huang/learn | 9eb00035f08cbd1ebc8972d7fb68b1dcca35b08d | 42c79c974aaec9596e024cb0fe286fa464806be0 | refs/heads/master | 2020-06-29T17:59:29.530197 | 2019-08-15T10:39:23 | 2019-08-15T10:39:23 | 200,585,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | base.py | a = [1,2,3] #同一类型的列表
print(a) #----->[1, 2, 3]
a = [1,'str',[45,89]] #列表中可以有各种不同类型
print(a) #----->[1, 'str', [45, 89]]
a.append(98.78)
print(a) #----->[1, 'str', [45, 89], 98.78]
a.pop()
print(a) #----->[1, 'str', [45, 89]]
del a[1]
print(a) #----->[1, [45, 89]]
b=(1,2,3,4,56,789)
print(b) #---... |
780e5fd37d3ffc3478bbd1eff42ee453f56d5eeb | ab7450810a94b09b250beea9272e6b4384f09b65 | /db_kursach_s2/model/act.py | 9392b6b2c0434fbd30095fd6311ece94e0c6291b | [] | no_license | Dizzzmas/components-kursach-backend | 522e4f16fc92ff28f567e34f63277f314069611e | 7cb3e44d27efaac5a8533634a89bfe592c3ea6d2 | refs/heads/main | 2023-05-10T02:31:58.266947 | 2021-05-30T22:09:19 | 2021-05-30T22:09:19 | 372,307,742 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 876 | py | act.py | from enum import unique, Enum
from typing import Any, Dict, Mapping
from jetkit.db.extid import ExtID
from jetkit.model.asset import S3Asset
from sqlalchemy import Integer, String, Date, ForeignKey
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy.types import Text
from db_kursach_s2.db import db
@un... |
a0fd4b98e0cd79a53535ec8b299fabd3bca2f1f3 | 938e176a935fc8888f3d0f9ce0376e7c455ad5d7 | /SCwP Projects/boilerplate-time-calculator/time_calculator.py | bcf334693721f9a878683d436096aee5fbdc3b5f | [] | no_license | PradyumnaKrishna/FreeCodeCamp | 439b775780b5131c07288d152783261a9446816c | 1d585f7b5be4df5fca57402579512f3368144eac | refs/heads/main | 2023-06-07T19:32:39.350489 | 2021-06-23T17:44:57 | 2021-06-23T17:44:57 | 346,104,431 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,615 | py | time_calculator.py | def add_time(start, duration, day=None):
time, period = start.split()
hour, minute = map(int, time.split(':'))
add_hour, add_minute = map(int, duration.split(':'))
if period == "AM":
AM = True
elif period == "PM":
AM = False
else:
return "ERROR: Wrong Time Period"
... |
6de73d9d1da5c2227722172787b9c7d7f9bc99f8 | a70309557e5ba0fc7bef6a5f1ad82afb137610d8 | /repeated_dna_sequence/findRepeatedDNASequences.py | f5cc98d9091fc76b5cf1947263ea99f37b0e8448 | [] | no_license | motingz/leetcode | 02928f5e702236376fa7cc7bce9b16dbc9df4041 | f26b564fb7ebf1044d1a443cdbc5609fd0ddcd1f | refs/heads/master | 2021-10-10T22:00:01.531946 | 2019-01-18T01:50:42 | 2019-01-18T01:50:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | findRepeatedDNASequences.py | def findRepeatedDNASequences(s):
sequences = collections.defaultdict(int)
repeated_dna = set()
start = 0
end = 10
while end < len(s) + 1:
curr = s[start:end]
sequences[curr] += 1
if sequences[curr] > 1:
repeated_dna.add(curr)
start += 1
end += 1
... |
8b8582e841b9731f6c62bfac8ba392a78b4d7717 | 521b26eba8208a8f0c5f0455c770b5dfb6b8bb74 | /Aeacus/compare.py | c2d43227947900686d3c5cc734d2e5bb40e80bb0 | [] | no_license | felipeViana/Athena | bf3d2eb78f4ad0596a5a3ff67b8c51de3e0e9761 | 0970823072805b844ae4d6bd9c47c88eca098df8 | refs/heads/master | 2021-01-22T16:04:59.768921 | 2015-05-30T04:56:58 | 2015-05-30T04:56:58 | 33,645,283 | 0 | 0 | null | 2015-04-09T03:00:48 | 2015-04-09T03:00:48 | null | UTF-8 | Python | false | false | 2,505 | py | compare.py | # comparar saida produzida com saida esperada
# receber 3 argumentos (in, out, code)
# in e out vem do banco de dados
# code vem do upload do aluno
# code pode ser .c, .cpp, .zip ou .rar
# rodar codigo e gerar saida
# comparar saida produzida com saida esperada
# inicialmente apenas faz o diff pra ver se sao identica... |
bf52f1fb5da182112d021a7d56756c967fdef5e7 | 6b06348f6646a64fb1b0566519be5a9efe6623cc | /taobao/test.py | 4e8307ea1f73237fe2896c91415e30ba21d01262 | [] | no_license | BlasphemyAngels/Crawls | 950ee168aa7ab9a8d3a7ec1d25e12042f3cac70c | 631489deffecac06c7f953bd470d8d43544cca2a | refs/heads/master | 2021-07-13T04:21:24.672832 | 2021-03-05T13:37:59 | 2021-03-05T13:37:59 | 98,028,275 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,449 | py | test.py | #########################################################################
# File Name: test.py
# Author: caochenglong
# mail: caochenglong@163.com
# Created Time: 2017-07-23 12:08:30
# Last modified:2017-07-23 12:10:46
#########################################################################
# !/usr/bin/python3
# _*_co... |
b61a0522b3ee47ca3862ad9b6ee835f4793e4f57 | 75cbe53da61b81fe30e68f6a455b18cd6dbbee65 | /Problems_A/4xxA/Problemset_479A.py | d5b8e9acd8bef6160fb7abe0a58cc0152d2fffe6 | [] | no_license | TanzimRusho/Codeforces_Solutions | 692bd0418c934cae2e8822d64e18ef64bc6ab593 | 1853d78bf611a057e929f7c0b58099a1400e369d | refs/heads/main | 2023-08-14T09:45:43.501775 | 2021-09-19T15:56:20 | 2021-09-19T15:56:20 | 385,180,585 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | Problemset_479A.py | # cook your dish here
from collections import deque
a = int(input())
b = int(input())
c = int(input())
array = [a*b*c, a+b+c, (a+b)*c, a*(b+c), a+b*c, a*b+c]
print(max(array))
|
c1650a5a222fbec21ecb6e48d50a39374ca43884 | c87fcc8cf199f729b7ad6f945be789b342b0e09e | /reproman/interface/run.py | f1d98b1151b6e43f0e3327094d61baef9197eef2 | [
"MIT"
] | permissive | ReproNim/reproman | 83d566da9cc1b17784ad8af99e134ef4b0b29f0a | 51718fec718da1ec3dfba76c236ca9fdf3abc968 | refs/heads/master | 2023-06-24T18:06:46.232450 | 2023-06-16T15:45:36 | 2023-06-16T15:45:36 | 57,322,104 | 13 | 6 | NOASSERTION | 2023-06-01T18:16:05 | 2016-04-28T17:41:42 | Python | UTF-8 | Python | false | false | 18,104 | py | run.py | # -*- coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the reproman package for the
# copyright and license terms.
#
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #... |
299b9f23c161bb97b91cdfed28376c5c6292bc28 | 8ac75d4893aefedea9592d6572155428817b6930 | /blog/views.py | 016b4490081da820dfcdedf80fb111afffd7d92c | [
"BSD-2-Clause"
] | permissive | bbenko/shinkicker | f07dd9e22b9fbb55acd27f2ef8a6daba354a5090 | 261209b1648c5e035965b594b93fc806fce42691 | refs/heads/master | 2021-01-18T17:25:01.476647 | 2012-07-14T19:10:35 | 2012-07-14T19:10:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | views.py | from django.views.generic import DetailView
from models import PUBLISHED
from django.http import Http404, HttpResponseRedirect
class PostDetailView(DetailView):
def get_object(self):
post = super(PostDetailView, self).get_object()
if post.status != PUBLISHED:
raise Http404
retu... |
eb30d2292e2ab0d35ee9e6f8f1082040e81a1b39 | 6c3f4512a389db42b51cf8f2de7b4ac87b170435 | /articles/views.py | 17eeef8ac3cd34b0765ba9662e84d44ebbecb532 | [] | no_license | GiuseppeGiancarloZappala/Progetto-DJango-di-Giuseppe-Giancarlo-Zappala- | e84b46c69f617c012460566fec78b982d7e7424a | 5738f096065bcaaea9c6cf1379a01cc77460fd63 | refs/heads/master | 2023-03-25T15:46:07.094630 | 2021-03-25T15:57:26 | 2021-03-25T15:57:26 | 349,388,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,689 | py | views.py | from django.conf import settings
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import (
LoginRequiredMixin,
)
from django.contrib.auth.models import User
from django.core.cache.backends.base import DE... |
156831425fbf4c09a7947bfd2ddb8153c518838d | 48c78ab1b416123e1b2776aa70b859d204012e74 | /mailing/email_sender.py | dd66e8d2d8a7c71034799ac122f5a550b3c12178 | [] | no_license | bullerun/CourseMaker | cd1a1189423c2c9ad3e5ca2f11fe7a94154f2885 | 54dd0c8203876191de6260324eac4b1a9b4f9cd4 | refs/heads/main | 2023-04-09T14:16:43.345566 | 2021-04-26T17:20:17 | 2021-04-26T17:20:17 | 361,815,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 892 | py | email_sender.py | import smtplib
import mimetypes
import os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from data import db_session
from data.users import User
def send_email(email, subject, text):
addr_from = os.getenv("FROM")
password = os.getenv("PASSWORD")
msg = MIM... |
0ecd6307701c8c0f318c86aa3dc92761b0e0ec38 | 07c0500edd527522036760a8cadd4e62e5eb1dcb | /python/removepunctuations.py | 9ff44b32084303240d2f3114aaa71b018607b099 | [] | no_license | amarsyelane/pythonprograms | 261323dc453b42d3ba21ae8496d55bfded130dbd | fffc1a0edfd25577beb84e64059ff3d38bc91c35 | refs/heads/master | 2020-06-24T23:37:09.630903 | 2019-07-27T16:47:00 | 2019-07-27T16:47:00 | 199,127,095 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | removepunctuations.py |
def remove_pun(str):
p = '''! () - []{};:'"\,<>./?@#$%^&*_~'''
for i in str.lower():
if i in p:
str = str.replace(i,"")
print(str)
str = input('Enter the string with any puctuations symbols : ')
remove_pun(str) |
5a8f7522bb1be3d336ac77231496fbbd4ee245a3 | 957a2e2a2ab9d4e4e4d7b248dc02a4d25aaac0ed | /pentagon/component/gcp/cluster.py | 7cfda0b3817a4448f0d72a9bb172974556ba14bd | [
"Apache-2.0"
] | permissive | FairwindsOps/pentagon | 974206ad845900baa21f2d85f6c05c3216992234 | 35fc59f910aabc66868c8012a416ff132ddf3911 | refs/heads/master | 2021-10-26T13:12:19.878745 | 2019-04-12T23:08:51 | 2019-04-12T23:08:51 | 92,092,949 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,652 | py | cluster.py | """
cluster.py
This class has a lot of magic in ComponentBase from pentagon. It can be
difficult to discern what properties, and class vars are needed to make this
run correctly. Best advice I can give to future time travelers is use a
debugger or trial and error.
"""
from pentagon.component import ComponentBase
impor... |
84fb8f1fb9033ce6214c4f2ed8871263f37cd485 | 054bef3d587ef4b5bf77647d63f4b1468febeb6c | /NthFibonacci.py | 2f506c251a8be5f93d4e820f6035f4c889a8a285 | [] | no_license | LudicrousWhale/Algorithms | 3407211cd1a4415b6e723762a817e1f0cdfd2c0b | 482d2835f03adb18a92898fd57b251f16cc23c59 | refs/heads/main | 2023-03-28T12:25:43.511077 | 2021-03-20T06:38:14 | 2021-03-20T06:38:14 | 348,348,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,012 | py | NthFibonacci.py | # Naive approach that takes up a lot of space, and is very slow
# O(2^N) time | O(N) space
def getNthFibNaive(n):
if n == 2:
return 1
elif n == 1:
return 0
else:
return getNthFibNaive(n - 1) + getNthFibNaive(n - 2)
# same as the naive approach but reduces the time complexi... |
9090645ce3de097677c4d8faea1dd422b51f082a | db94e90785df39cbb2c91afb48511e1d062f6092 | /ship_test.py | 23890616c6fdc7afcd62afe17c35ae9897737fef | [] | no_license | vwxyzjimmy/ship | 9d0b7fed5d5021fe605ab859d608bb20214ed559 | 3fd753bce182575e251de45ee5e50395f46f22e7 | refs/heads/master | 2020-04-08T12:57:21.206860 | 2019-01-16T04:31:19 | 2019-01-16T04:31:19 | 159,368,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,375 | py | ship_test.py | import pymysql
import numpy as np
import sys
import xlwt
import matplotlib.pyplot as plt
from interval import Interval
key_word = sys.argv[1]
filename = key_word + ".xls"
book = xlwt.Workbook(encoding="utf-8")
sheet1 = book.add_sheet("original-data")
sheet2 = book.add_sheet("min-max")
sheet3 = book.add_sheet("z-score... |
d726ad9b55ff95053ada8b62219f62329fe59018 | cbd5df453f1652d7362dce637d01639139424bf6 | /01_GUI/plotlyInGUI.py | 9a7e5a6304d464abcf9c85f8cf18449c65a17d6e | [] | no_license | seongheechoi/10_ETC | 0ced2da4d99b81e98fa22bcbf43b50928a04a19c | 8194bad92ee7113186d2969b35e620b542390160 | refs/heads/main | 2023-07-12T23:57:15.829629 | 2021-08-18T04:02:05 | 2021-08-18T04:02:05 | 311,207,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | plotlyInGUI.py | import plotly.express as px
df = px.data.iris()
fig = px.parallel_coordinates(df, color="species_id", labels={"species_id": "Species",
"sepal_width": "Sepal Width", "sepal_length": "Sepal Length",
"petal_width": "Petal Width", "petal_length": "Petal Length", },
... |
14e20875b073836a1754aed279f0e4f0804181fc | 5cd3293d4c344f5449eaac7170e020f66ee6dd29 | /test_intervalavg.py | 50e747c9e3b457a5427dda2db285da8df2d831dd | [
"MIT"
] | permissive | zl101/heart_rate_sentinel_server | b8d495cba117d0261af5ac05a969c53132b9b1ba | 2fb8c0e29ec3e909dc8bb450a365a9a85cca8996 | refs/heads/master | 2020-04-06T07:28:52.805694 | 2018-11-16T20:41:51 | 2018-11-16T20:41:51 | 157,274,336 | 0 | 0 | MIT | 2018-11-16T20:41:52 | 2018-11-12T20:43:57 | Python | UTF-8 | Python | false | false | 1,562 | py | test_intervalavg.py | from intervalavg import intervalAvgHelper
import pytest
import datetime
dict1 = {"1": {"attending_email": "a", "user_age": "10"},
"2": {"attending_email": "b", "user_age": "11"}}
dict2 = {"1": [{"heart_rate": "160.1",
"datetime": datetime.datetime(2018, 1, 9, 11, 0, 36, 372339)},
... |
ea36fc43810eafddace5c677308d95b767d32154 | 8cbfce278a6eb34b0bf092f49660ef134f54b4ac | /myshop/contents/migrations/0010_goods_frombrand.py | 7a2baad54a1b0d1c17cc3f3ab2fec9cc0c495c0b | [] | no_license | passed-by/DjangoWebPro | 02fdc7c255d709aa386b2700752edd425ae06d85 | 9d46c301299fa6732ac2650bbbc84c74c894996c | refs/heads/master | 2022-12-22T11:14:50.372449 | 2019-10-14T06:25:40 | 2019-10-14T06:25:40 | 214,931,852 | 0 | 0 | null | 2022-12-08T06:43:05 | 2019-10-14T02:35:49 | TSQL | UTF-8 | Python | false | false | 505 | py | 0010_goods_frombrand.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2019-10-05 16:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contents', '0009_auto_20191005_2056'),
]
operations = [
migrations.AddFiel... |
5f2df3ea858c06ad82361e8e08226d1ea5e129be | 4ae67033116703645665e9fe5b9fc23788eede64 | /1.0/maps.py | a49e1f4bb59f9e75a6b80b22c010f21e48674bc2 | [] | no_license | hhhhhhh2019/Game_Almaz | b69fd6de509835c642b1ca261ca81c5658702569 | 6cea0d05cf9fd553e9636fe97613ff09d0410d9d | refs/heads/main | 2023-02-13T00:25:37.891718 | 2021-01-11T17:56:43 | 2021-01-11T17:56:43 | 328,746,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,454 | py | maps.py | MAPS = [
[
[11, 5], # позиция игрока
[13, 1], # позиция двери
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,0,0,0,0,0,0,0,4,0,0,0,0,0,1,
1,0,4,0,0,0,0,0,4,1,2,1,1,1,1,
1,0,4,1,1,1,1,2,0,0,2,0,0,4,1,
1,0,4,0,0,0,0,1,1,2,1,1,1,4,1,
1,0,4,0,0,0,4,0,0,2,0,0,0,0,1,
1,0,0,0,0,4,4... |
10d56cbc49ac1e3eb024bb683c4135e38e079bf5 | 81fd22389a72c9fc6e8720fac7365dc2fd1da17d | /plots/plot_fits.py | 06509951cdbb2996a0bece98b2e8050ffe2db554 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | evansosenko/aps-spin-lifetime-plots | 6348beb9b3eae6c4839e8d4d25342f51815f1398 | d73d5665e77ef8871ce3f17289efc9102465f625 | refs/heads/master | 2021-01-22T18:51:10.702337 | 2015-05-07T07:41:43 | 2015-05-07T07:41:43 | 17,920,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,883 | py | plot_fits.py | import matplotlib.pyplot
import os
from fit import Fit
from plot import Plot
class Plot(Plot):
def add_ylabel(self, diff):
y = self.fit.meta['dependent']
if diff:
text = r'$\Delta R_{\text{NL}}$' + ' $(\si{' + y['siunitx'] + r'})$'
else:
text = r'$R_{\text{NL}}^+$... |
b2a982678b65cd03a4a74119ed971b0291cfcb3e | b9f3029dd05d7634d0a32f5dc0cbe188e5cb8ea6 | /setup.py | c1ee472c30029fa3c91cb922f113e562d477f037 | [
"MIT"
] | permissive | jakereps/xfoliate | 59dc9874a6f4f6f4075182105f21fda1c7c0ff1c | fc2e7a73db08c4dc9d95feab0c1821aee53fe547 | refs/heads/master | 2020-04-13T09:01:06.718266 | 2016-12-16T03:50:06 | 2016-12-16T18:37:21 | 51,178,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | setup.py | from setuptools import find_packages, setup
with open("README.md") as fh:
long_description = fh.read()
setup(
name='xfoliate',
version='0.0.1',
license='MIT',
packages=find_packages(),
include_package_data=True,
install_requires=['click', 'facebook-sdk', 'nltk', 'requests', 'tqdm',
... |
0769c55c7bbb2561c78fbfd4c62fc7c8199e5cef | 49c52a09004acda3eed03f25a76ebe8bbbe1760c | /first.py | 7c4e27d1d24b6d18e901180b72228101addf42ce | [] | no_license | Cursory-Wizard/CupidsRun | 936852cdd6fa39474108fcc4b6aed2e0f8b42efd | 37db6848ecac79c13a73fc060fc41d18cfe3e1c7 | refs/heads/master | 2020-04-08T05:07:22.125863 | 2018-11-26T01:23:29 | 2018-11-26T01:23:29 | 159,047,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,169 | py | first.py | import pyxel
import cupid
#import cupid2
#import cupid3
import mapset
import mobs
class Running:
player = None
def __init__(self):
#pyxel.init(192,160)
pyxel.init(160, 128)
self.testload = 0
self.testmapx = 0
self.testmapy = 0
self.x = 0
... |
607690352a64d410585ba1be96c470e8c91c16b3 | 33d4f05a358a94aeee0473b079d3912f95b7501d | /scripts/initialize/data/version1.2/update_pe_commodity_spot.py | 39db697e79acf68d1efc7c8b2a67555da2f2e0fc | [] | no_license | moutainhigh/jkzx1 | e45bc70504c9610233747f44811cfef3709a8b6d | f9f87e9477364c5f1926241ca23a797357b7f275 | refs/heads/master | 2023-05-14T16:42:23.946572 | 2021-04-10T03:45:15 | 2021-04-10T03:45:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,956 | py | update_pe_commodity_spot.py | # -*- encoding: utf-8 -*-
import utils
import init_params
def list_pricing_environment(host, token):
return utils.call('prcPricingEnvironmentsList', {}, 'pricing-service', host, token)
def get_pricing_environment(name, host, token):
return utils.call('prcPricingEnvironmentGet', {
'pricingEnvironment... |
0960f90d454c785b8ab5c04ddfe362eb0fb7e4fa | fd7977c022ddbae84c6dfda68060c7a09a0089ff | /filmyweb/models.py | 7b0c2f4c7d885c954afe1b220dbad764c43107f8 | [] | no_license | Mario2010P/Blog-in-Django | 8e6ef2a53c2014828af311810ecdc9309d8f478e | 1e56e262f00d6b5b18eb44b9a5700ab432e031f9 | refs/heads/master | 2022-11-12T11:04:09.335066 | 2020-07-07T10:40:52 | 2020-07-07T10:40:52 | 277,847,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | models.py | from django.db import models
# Create your models here.
class Film(models.Model):
tytul = models.CharField(max_length=64, blank=False, unique=True)
rok = models.PositiveIntegerField(default=2000)
opis = models.TextField(default="")
premiera = models.DateField(null=True, blank=True)
imdb_rating = mo... |
fc4fb97df32312f9c99998787badf2dff7da5b35 | 2073fb91939adb53c3bcfe00c4247c8accb93416 | /projectCreation/export_segmentation_dataset.py | bf751e471b87366ec7d7d2b8cf1b37a470156678 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | microsoft/aerial_wildlife_detection | 01a51292795656901fda84ea25462b4ef8491d35 | 06c36a5bc5d98c7618cade36711ade7a0f677c13 | refs/heads/master | 2023-08-31T04:13:16.912857 | 2022-07-26T13:00:35 | 2022-07-26T13:00:35 | 197,671,887 | 207 | 65 | MIT | 2023-02-10T14:01:42 | 2019-07-18T23:58:41 | Python | UTF-8 | Python | false | false | 6,532 | py | export_segmentation_dataset.py | '''
Pulls segmentation masks from the database and exports them
into folders with specifiable format (JPEG, TIFF, etc.).
2019-21 Benjamin Kellenberger
'''
import os
import argparse
from psycopg2 import sql
from util.helpers import VALID_IMAGE_EXTENSIONS
if __name__ == '__main__':
parser = argparse.... |
fe3b7e31fdd39a0faf39679ed2a077ea3b0ab15b | 93bab67fb19984ab03706864a6f2568dd96f22be | /apps/users/schema_inputs.py | 7a7a35280b509ad5e48eb3667aceee9ea8b86884 | [] | no_license | AnthonyDreams/python-django-graphql | ecf51f768c995530499b7780aff80278f4431533 | bdf019e1f54c48e7ac10cf72461dd1593f1f4a91 | refs/heads/master | 2023-03-03T03:29:00.842697 | 2021-02-18T01:44:50 | 2021-02-18T01:44:50 | 339,900,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | schema_inputs.py | from apps.address.models import DeliveryInfo
import graphene
from graphene_django import DjangoObjectType
|
00db76bf065091a3e2d53d1fd3e4a8c0078f4edc | fc232ef79f06c06662c8b1abcc6f0b237716c0cf | /utility_functions.py | 9f40b6a43dc515aaed667a24cff60ceceb03f1dc | [] | no_license | Zensius/DR16Q | 911cc03529389b182a8cb24f0dde5bdef2d7da6e | 37407527b4f8ef12bf7db79278d4f4af013165f2 | refs/heads/master | 2023-08-27T22:53:10.145523 | 2021-10-14T19:15:11 | 2021-10-14T19:15:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,423 | py | utility_functions.py | import csv
import numpy as np
from data_types import ColumnIndexes, RangesData, PointData
import pandas as pd
import scipy.constants as sc
from scipy import signal
######################################### sphinx #########################################
"""
utility_functions
=================
Utility functions for ... |
fd20bf9f0d60b0b9a771a452d3beace844037f43 | f14ef5d548848565d335250e1349e10194e50587 | /AdaBoost/adaboost.py | 7fdfff6a710f4fd0bef6c2af02c6611ded7a6493 | [] | no_license | rainie1995/Python-code-practice | 49422fc108272e9358d37df5e126f3dbdbc9ce7d | 33c9078f738a90d68cbe85a8a89509849fd59fac | refs/heads/master | 2020-04-29T11:38:16.944765 | 2019-04-06T12:21:47 | 2019-04-06T12:21:47 | 176,105,794 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 609 | py | adaboost.py | from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
from sklearn.datasets import load_boston
from sklearn.ensemble import AdaBoostRegressor
# 加载数据
data=load_boston()
print(data)
# 分割数据
train_x, test_x, train_y, test_y = train_test_split(data["data"], data["target"], test_... |
e92bb4eeeb13e6aaff43990671e6eb119da46867 | 288365f53d83244c62fed913247cf5684eeb190c | /fetch_img.py | 7a8a88341bdd728cbe776d589e92bf35b8a0a712 | [
"MIT"
] | permissive | mwil/deck-prefectures | 580de8ca7d5a86c2ec592b02173ed6075e34283c | efe7b248a4f4d9da81771d7cc91b0f2d48a7d4a4 | refs/heads/master | 2021-07-05T02:10:55.590897 | 2020-08-20T12:41:32 | 2020-08-20T12:41:32 | 153,711,644 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,266 | py | fetch_img.py | import requests
import PIL
from io import BytesIO
from cairosvg import svg2png
from PIL import Image
PNG_BASEWIDTH = 640
################################################################################
def fetch_img():
for img_type in ("img_flag", "img_seal", "img_impression"):
if isinstance(citem[img_... |
2a34f0e4fe12616716dbc517d4f4728ff1ad35fe | b367478bd33aeb9e9901f2d7fa4ef72bc4803965 | /manager.py | f5730c286d88ef09d231cd1bbb61c4b4c0ee4c29 | [] | no_license | Hejingqiang/Hjq_weiibo | 457e719b212004c4984eeb20b534c747a3eea323 | d68b01e31573bce65c1005fb06c1ff8c92343682 | refs/heads/master | 2023-06-18T23:58:13.098319 | 2021-07-15T12:20:16 | 2021-07-15T12:20:16 | 269,938,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,689 | py | manager.py | from flask import Flask, redirect
from flask_migrate import MigrateCommand, Migrate
from flask_script import Manager
from User.views import user_bp
from comment.views import cmt_bp
from libs import config
from libs.db import db
from libs.utils import fake_word, fake_sentence
from weibo.views import wb_bp
app = Flask(... |
7002a18536d9ad6346d0da414b8c08964863261c | f14bc02b72f9c752a30d1e04670bb3bddda506fe | /cp468_a1/src/main.py | 84d6a771c2eccb80c0e00d97a57c29e7171c8aaa | [] | no_license | mihet101/AI | a8697a36d5b15283450151b15b6c6537dc47a335 | e72d838b76fc1249b7f30e0f15737da7b2630993 | refs/heads/master | 2023-01-03T05:32:35.251567 | 2020-10-16T22:30:17 | 2020-10-16T22:30:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 292 | py | main.py | '''
Created on 2020 M10 15
@author: Danni
'''
from Algo import algo
from generate_puzzle import puzzle
if __name__ == '__main__':
pass
puzzleInstance = puzzle()
puzzleInstance.generateRand()
h1 = algo.h1(puzzleInstance.currState, puzzleInstance.currState, puzzleInstance.goalState)
|
c10f4eba585c2c655f3ffc044f0f9649c01c4eb2 | cdb186ad49bba1406c81f634b936e73f8cb04009 | /ABC/129/c.py | 44839c895f6b93a4e1f53a6a5377307ff677c6e9 | [] | no_license | ToshikiShimizu/AtCoder | 9e46f5581f2c1f5149ce1394d61d652cda6256a3 | 41fe6408c20c59bbf1b5d7ee9db2e132f48ad1ac | refs/heads/master | 2023-07-26T22:45:51.965088 | 2023-07-10T14:11:35 | 2023-07-10T14:11:35 | 148,154,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | c.py | N, M = map(int, input().split())
MOD = 10 ** 9 + 7
ng = set([int(input()) for _ in range(M)])
ans = [0, 1]
for i in range(1, N+1):
if i in ng:
ans.append(0)
else:
ans.append((ans[-2] + ans[-1]) % MOD)
print(ans[-1] % MOD)
|
98d9915f8d34fa75e1872ac111c6488fb8e95467 | 12c3c2dfcf7f02a577ee334aa47669c43d148083 | /05_24.py | a2a20b6817ad77ebed15e9d97e1415dba68658a3 | [] | no_license | hkj9057/GUI | eec874976f81ffb76628f22acc4a9129a8dcebaf | 37c8c519ae40e97207829ce54c144443316cbc2e | refs/heads/master | 2020-05-25T04:28:13.857082 | 2019-06-10T11:58:41 | 2019-06-10T11:58:41 | 187,627,654 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,442 | py | 05_24.py | from tkinter import *
import time;
class Window(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.master = master
self.init_window()
self.start = 0.0
self.elapsedtime = 0.0
self.runing = 0.0
self.timestr = StringVar()
def init... |
defb006177fa336d1b331a931df72c277c1b3de7 | 7223a0134250eda933faf094f62812856d605efc | /ch23/Godfrey_Queue.py | de5843954639b610353db4a1d891fb357acd9f11 | [] | no_license | szf963852/2017A2CS | 9d30c804f23e579e1a39b2bcc7e2b06d2803b7fc | 730162e2d8df8b65c6a0938f80310dbc4c0ba2c5 | refs/heads/master | 2021-09-10T17:37:05.097774 | 2018-03-30T07:02:57 | 2018-03-30T07:02:57 | 114,597,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,877 | py | Godfrey_Queue.py | # S3C3 Godfrey
# queue version 2
class Node():
def __init__(self):
self.Next=None
self.content=None
def init():
global Nullpointer,StartPointer, FreeListPointer,busy,List,RealPointer
Nullpointer=-1
StartPointer=Nullpointer
FreeListPointer=0
RealPointer=0
List=[0]*10
bus... |
050577b0c6b01f88030a35b592fdecb7e0a03b75 | ef0048bdae433cae13202bd59b601adccefbb590 | /src/Prediction/models.py | c8988d28c3a041281226094acd83c8c7ae3ac7e1 | [] | no_license | raselcse07/Stock-Market-Prediction | d24019745dcc99714ab6805968de8ab78435f0fc | b6de12e37152cf8dfedc0c5b5279ccfa582b4cc5 | refs/heads/master | 2020-03-18T12:54:48.867768 | 2018-10-05T14:04:49 | 2018-10-05T14:04:49 | 134,750,616 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | models.py | from django.db import models
class Company(models.Model):
company_Name =models.CharField(max_length=250)
month =models.DateField(auto_now=False, auto_now_add=False)
rising =models.CharField(max_length=250)
down =models.CharField(max_length=250)
class Meta:
... |
894b4f92061c160831508238e7788fc3db6ff665 | ee4691390520635e55d0063ab98aaca3343d4b93 | /modele_creation/TEST Simulator.py | aa71c38fd9daa3f7628b896fa4b82d0963dca378 | [] | no_license | BaptisteMP/AIRobotCar | f2b28886271fb79ccd2a041c8cfd90aba3b4a478 | 327daeed9c8c27ca38bd5828d94060758fc281d1 | refs/heads/master | 2020-06-02T15:49:38.234997 | 2020-02-04T07:50:06 | 2020-02-04T07:50:06 | 191,216,712 | 0 | 1 | null | 2020-02-03T15:47:06 | 2019-06-10T17:42:19 | null | UTF-8 | Python | false | false | 4,666 | py | TEST Simulator.py |
# coding: utf-8
# In[1]:
from roadsimulator.simulator import Simulator
# In[2]:
import os
import numpy as np
from tqdm import tqdm
from scipy.misc import imread
# In[3]:
simulator = Simulator()
#Simulator class
# In[4]:
from roadsimulator.colors import White, DarkShadow
from roadsimulator.layers.layers... |
1c6c25ccaed3889d10a69f8bb99494258c173c3f | 4bc0bc930d6379bb9c8d4a1ab7975f27a537f9c2 | /tests/conftest.py | cf2386c27db3b3151d23a69046a72f31d793853c | [
"MIT"
] | permissive | interoberlin/Wunderbar-Python-SDK | 26d21bb8a9cb5e62455fba65c5c735cb21322fff | 20d860a8de811da1bde2a67722703acb4f4499c9 | refs/heads/master | 2021-01-17T18:54:56.582883 | 2015-06-30T10:04:15 | 2015-06-30T10:04:15 | 47,787,744 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 655 | py | conftest.py | """
This module contains test fixture loaders that py.test will find here when
executing test cases.
"""
import os
import sys
import pytest
## TODO: maybe use importlib.import_module
@pytest.fixture(scope='module')
def fix_anonymous():
"Return fixture for anonymous API access."
sys.path.insert(0, os.path.d... |