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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
833c8234d829dfa1937392f0ad4952aeffa4e26d | 92b43799cbeb7dba5903c49f83d4ae88a8e28cf3 | /SuperbalancedTrees.py | 443747d741c700c7d9f3fadb501c2e267e2c22e7 | [] | no_license | jagwarrx/InterviewCake | 580d0f24ff3437e6ef35bbc7a426d1ebae7c53e4 | b00072f7daebbca4dc80b1cb6aced8195cd5397e | refs/heads/master | 2020-05-05T09:16:53.140137 | 2019-04-06T23:31:26 | 2019-04-06T23:31:26 | 179,897,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 916 | py | SuperbalancedTrees.py | def is_balanced(tree_root):
# Determine if the tree is superbalanced
if tree_root is None:
return True
nodeQ = [(tree_root, 0)]
depths = []
while len(nodeQ):
last_node, depth = nodeQ.pop()
if( not last_node.left ) and (not last_node.right ):
... |
6d5acaa4a60b646432feb59f4d8eb9c9d0dceb0f | 2c07ae4239d217f4a4b3d356ca4be31629dea4d5 | /block/sape.py | e5d6b359fa43d8c542e68410bd22c21d02ea02eb | [] | no_license | themylogin/thelogin.ru | 771afe0e3afbdc1072695fb2d4920f6ec3b7c6d3 | 1f66ff940dfafe6d065c63e832d51b5e16522edc | refs/heads/master | 2023-04-25T22:02:56.004822 | 2020-03-22T18:02:40 | 2020-03-22T18:02:40 | 7,691,963 | 0 | 0 | null | 2023-04-15T01:17:22 | 2013-01-18T18:31:57 | Python | UTF-8 | Python | false | false | 1,318 | py | sape.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import phpserialize
import urllib2
from cache import cache
from config import config
def block(request, limit=None):
try:
links = cache.get_cache("sape", expire=3600).get(key="links", createfunc=load_links)
except:
links = cache.get_cache("sape", expi... |
aeab80e2d0006ffa938366ef046d2ab3d387f88c | 6ea2a5b47ae62851f54dcf8072a42fb1b3afce08 | /Examen_practica.py | 04e7f9ae7c20e7b6ad16002f48b83ae3b9c64b0d | [] | no_license | itm-dsc-tap-2020-1/examen-1-interfaz-grafica-con-tkinter-MxrioHuerta | e037e7f8ac812bd4b8a40363b0dafb9636b435d2 | 63fdaf7837a55adbaa417bf420d01a27bd0a97e4 | refs/heads/master | 2021-01-26T05:33:07.825242 | 2020-02-26T18:02:18 | 2020-02-26T18:02:18 | 243,328,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,283 | py | Examen_practica.py | import tkinter as tk
from tkinter import ttk, messagebox, Menu
ventana = tk.Tk()
EntryArr = []
Label = ["¿Que es la analisis psicologico?", "¿Como se lee la mente?", "¿Cuantas persepciones psicologicas existen?", "¿Padre de la Psicologia moderna?", "Parte del cuerpo donde esta la psyco"]
Arr3 = tk.IntVar()
opciones1 ... |
a2871585ce36888cf89c4dc5a6a7de6b212412bb | 4075050c0f04d715613b98956e27bdd1b22d54c2 | /functions/functions_basics.py | 2a9ba9bbed2bbf80babee4d25c2b72451fb599bd | [] | no_license | wandiyu/Python_for_atmo_research | 9c52f13e9fbe8073cd816bcb37bfb719cbf893db | 4f3e859d7e2706a3566e74257fbc8fab5635e7c6 | refs/heads/master | 2023-02-18T23:20:39.938717 | 2023-02-16T01:59:37 | 2023-02-16T01:59:37 | 218,201,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,681 | py | functions_basics.py | def geo_avg(x,lat,dim=2):
'''
geo_avg: to calculate weighting average according to latitude
input:
x: variable
lat: corresponding latittude
dim: the order of the lat dimension, two cases: 2:[time,lev,lat,*lon],or 1:[time or lev, lat, *lon]
output:
result: 1d or 2d avera... |
3a6038cb80548b98fc7e4a328092f1dc1ffd6dfd | 23a974a12f2b5aa6d07f241cf05338fae83162e7 | /core/config_loader.py | 4bb5edff10f637424f947da0c86da89ac4af46c1 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | ifurusato/letterbox-robot | cdcb227bef221ee59aa05a9dacd758113d921736 | 2d50002144dd40402ed1991788a3c1216bd5f0ce | refs/heads/main | 2023-06-27T02:32:11.312586 | 2021-07-30T21:33:25 | 2021-07-30T21:33:25 | 378,603,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,559 | py | config_loader.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020-2021 by Murray Altheim. All rights reserved. This file is part
# of the Robot Operating System project, released under the MIT License. Please
# see the LICENSE file included as part of this package.
#
# author: Murray Altheim
# created: 2020-04-15
# ... |
34d3eebf6ccb19f891ccbb16db47cd6412f1cb0f | 6fc44d4833314ff8c66c094cb935e12f063c51b9 | /Week 3/lists.py | 5dd4813f4a2fcde1122ad643e027b6f685b3c3dd | [] | no_license | Python-Programming-Boot-Camp/JonathanKarr | ea45080b2c67f7da65717b65c01e21cc4a264044 | 256e86da4c732c2a4ba7db1a4dd313e174ffa8ac | refs/heads/master | 2023-02-28T04:43:09.375944 | 2021-01-28T18:27:43 | 2021-01-28T18:27:43 | 318,028,375 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | lists.py | numbers = [3,4,6,7]
# 0 1 2 3
print(numbers)
print(numbers[1])
print(numbers[-1])
numbers[1] = 3
print(numbers)
del numbers[1]
print(numbers)
numbers.append(17)
print(numbers)
numbers.insert(2,5)
print(numbers)
numbers.sort()
print(numbers) |
05ced056bf2f59f85bef82e53803e7df7ff8c8df | 1b3b048bc38601ee5b66dcfff46d60de5c4c2714 | /scripts/python/plot.py | 42b78dcd07a097f81c15f81c87576b23343b046b | [] | no_license | UHH2/VLQToHiggsPairProd | f4d6e10abe306bfc49b051749d808e1e46b3fe5f | 4ce78dbef7a5eaeb2ed73d17e119e372b9916d54 | refs/heads/master | 2020-05-21T20:07:32.314164 | 2017-08-25T13:01:29 | 2017-08-25T13:01:29 | 27,542,599 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,473 | py | plot.py | #!/usr/bin/env python
import ROOT
ROOT.gROOT.SetBatch()
ROOT.gROOT.ProcessLine('gErrorIgnoreLevel = kError;')
import os
import time
import varial.tools
import varial.generators as gen
import itertools
from varial.sample import Sample
import varial.analysis as analysis
# import varial.toolinterface
dirname = 'VLQToHi... |
7c63abacce07ee9d4c2b3941d05f951b75c8d0ff | 63b79c404d83e4980891c488f4d9592558ecda35 | /assets/src/ba_data/python/ba/_stats.py | 5d94bbe6df085c02eeeec485880b2cd9556db2b5 | [
"MIT"
] | permissive | kakekakeka/ballistica | 56e8879cd5b4b990e5e05da3dfd300d7cbb45446 | 3ffeff8ce401a00128363ff08b406471092adaa9 | refs/heads/master | 2022-11-14T08:11:57.160782 | 2020-07-01T05:43:13 | 2020-07-01T05:49:44 | 276,755,445 | 2 | 0 | MIT | 2020-07-02T22:18:37 | 2020-07-02T22:18:36 | null | UTF-8 | Python | false | false | 19,400 | py | _stats.py | # Copyright (c) 2011-2020 Eric Froemling
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... |
243016b14f503a09147f434e7bec31dc204fafdf | 13507185d78d2c21f599e106c2642cc4476d7aa5 | /Character_creation.py | 717ea0cea1045cce763b820944932b173d19ccf9 | [] | no_license | Legnanese/The-cave-game | fc4ac1373b49f529c429fae302814d3b7671d60c | 98fb04758b092f9c96017c6c4da88e8498ba041b | refs/heads/master | 2021-06-10T19:38:20.857964 | 2017-02-07T00:24:44 | 2017-02-07T00:24:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | Character_creation.py | # This script is for character creation.
print ("Welcome to the character wizard creation!")
# Here you will select your race from the list.
race = ["human", "ork", "elf"]
print race
race = raw_input("Please choose your race: ")
print "You have choosen %r" %race
# Here you will select your gender.
gender = ... |
2187f38dc9b14ecc355e98fe15d36fdefd548f04 | 28c228ca129e815a011d812f3fe877a2a7f50242 | /backend/api/info/utils.py | 1f5a23b0560aa048446fdac161187203e61efa49 | [] | no_license | DimaProskurin/Material-Assistance | ead7974ecb22a85935699d8c75d468be80327a1c | 806325b8618bd185ff659dac38edfc1624053d26 | refs/heads/master | 2023-05-13T17:59:55.204329 | 2021-04-09T13:59:19 | 2021-04-09T13:59:19 | 212,851,916 | 0 | 0 | null | 2023-05-06T22:52:00 | 2019-10-04T15:53:09 | JavaScript | UTF-8 | Python | false | false | 656 | py | utils.py | import re
from .models import ValidatedStudent
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import User
def get_token_from_request(request):
token_tuple = request.COOKIES.get('money_api_token')
matches = re.search(r'(<Token: (\S*)>)', token_tuple)
token = matches.group... |
c6808f5f9cb072b8b659d5181c5b59e45f5c122f | ba8c3a5a8128f487f3058c20259ff34a3e334777 | /POT_Bot/mapDownloader.py | 87277414fdbf78041f2bd1b12779c7e164366acb | [] | no_license | Potla1995/POT_Bot | 0696ec63df8b5449b622af09079856e44d2b9f98 | 8dea311997952966e8c2a7df9cd85ded0a680515 | refs/heads/master | 2020-05-30T20:03:33.218450 | 2019-07-12T19:13:23 | 2019-07-12T19:13:23 | 189,940,251 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 580 | py | mapDownloader.py | import urllib.request
import sys
import os;
#Usual URL https://osu.ppy.sh/beatmapsets/705788#osu/1492654
beatmapsetID = sys.argv[1::]
for i in range(len(beatmapsetID)):
beatmapset = beatmapsetID[i].split('/')[-1];
urllib.request.urlretrieve('https://osu.ppy.sh/osu/'+ beatmapset, 'test/'+beatmapset+'.osu')
... |
4cebe0b8707fb2dddd31121464f1c6175db2fd40 | 3db770f0069a9bd7e84aa6b7c2f56e4b348779cc | /imd_sat.py | b3622ea3a3283cc62fef9e9dc9515fc2b870de49 | [] | no_license | yyr/iitmtv | a3934d27dd87b82eedb76a6cd8ec0c2079c5a9b8 | 4208ee00965b5ecd5df0ebc805e9e3b7dd857a0d | refs/heads/master | 2020-12-03T03:45:04.639144 | 2017-07-12T11:28:58 | 2017-07-12T11:28:58 | 95,769,490 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,186 | py | imd_sat.py | #!/usr/bin/env python
import time
from util import *
url_base="http://satellite.imd.gov.in/img/"
url="http://satellite.imd.gov.in/img/3Dglobe_ir1.jpg"
tmp_file="3Dglobe_ir1_index.html"
old_time = 0
data_dir = "/data/imd/"
remote_imgname = "3Dglobe_ir1.jpg"
log_file = "/var/log/imd_sat.log"
def imd_down(url_base, ur... |
da761bc8c7f28103037e80c983890a5070a2f484 | 365129650ea4168f98a0e8139b665a00fef18e5a | /profileproject/urls.py | 5c455e87309f7c68e005864a08826af129e9a8a3 | [] | no_license | alish-xeno/materialize | 2678fe20fb5aaf42974f6d5a6a2ab724fefab8a6 | 7cc5527e6be57a2b2151f2ab3314d556404775da | refs/heads/main | 2022-12-28T20:14:02.315156 | 2020-10-16T09:40:07 | 2020-10-16T09:40:07 | 303,333,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | urls.py | from django.conf.urls.static import static
from django.urls import path, include
from django.contrib import admin
from django.conf import settings
urlpatterns = [
path('django-admin/', admin.site.urls),
path('', include('profileapp.urls')),
# path('summernote/', include('django_summernote.urls')),
# pa... |
6ec979f4243bf0646ff132f368f21c31a134bb76 | 76ed2f057b7b9c2b69aa799549bb4d6c99f9080d | /model_factories/TensorFlowModelFactory.py | 4d8a532f867abb3e22aa2120836e939788ff5342 | [
"Apache-2.0"
] | permissive | md-k-sarker/BlackBoxAuditing | 203834efb435e531f38a314db01742e08479a396 | d7f9cbccafc7705c2abdfcca52451177f656a034 | refs/heads/master | 2021-01-25T08:23:29.995935 | 2017-06-07T15:54:19 | 2017-06-07T15:54:19 | 93,763,397 | 1 | 0 | null | 2017-06-08T15:12:09 | 2017-06-08T15:12:09 | null | UTF-8 | Python | false | false | 11,018 | py | TensorFlowModelFactory.py | from AbstractModelFactory import AbstractModelFactory
from AbstractModelVisitor import AbstractModelVisitor
import os
import numpy as np
import tensorflow as tf
import time
TMP_DIR = "tmp/"
if not os.path.exists(TMP_DIR):
os.makedirs(TMP_DIR)
class ModelFactory(AbstractModelFactory):
def __init__(self, *args, *... |
72c714217b4002da9c131386c36873eff08b7f79 | 1e50f27593c931712cbb15fa735799c15cc08e63 | /deepDBSCAN/src/_deepdbscan_no_noise_remove.py | 347acb57047209affd50c641b6995d0b2d50b9ac | [] | no_license | parkstar82/workspace_python | 66bf991b7677b1ea9765ae946a20005d8b935409 | 0d99c8f1b3e5611b4bc60baf365db4840b43e2ea | refs/heads/master | 2020-06-17T05:18:08.427338 | 2020-01-30T09:30:58 | 2020-01-30T09:30:58 | 195,773,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,550 | py | _deepdbscan_no_noise_remove.py | # -*- coding: utf-8 -*-
"""
DBSCAN: Density-Based Spatial Clustering of Applications with Noise
"""
# Author: Robert Layton <robertlayton@gmail.com>
# Joel Nothman <joel.nothman@gmail.com>
# Lars Buitinck
#
# License: BSD 3 clause
import time
import warnings
import numpy as np
from scipy import spars... |
e72e4f2d18225c63a6e6f52f31ff1bcb2227fac0 | a0c143449cf809ef39776863db476139d630a407 | /nervous_game.py | e199d7a209c06514ca9b60d1b10d5923e9d3b2a8 | [] | no_license | takashi-0205/study | 032d8e49b73658a0803fb38c3d1737d4a88d7e5d | 8be1a09c7fa8966f45d289739d176ac8b61edf1e | refs/heads/master | 2022-02-17T03:48:36.870878 | 2019-08-05T05:23:26 | 2019-08-05T05:23:26 | 197,095,093 | 0 | 0 | null | 2019-07-16T04:16:03 | 2019-07-16T01:03:48 | Python | UTF-8 | Python | false | false | 405 | py | nervous_game.py | import tramp_game
def main():
while True:
game = tramp_game.NervousGame()
auto_mode, player_num = tramp_game.input_data()
flg = tramp_game.input_limit_flg()
game.play(int(player_num),auto_mode,flg,input_limit_turn(flg))
if not tramp_game.more_game():
print("See yo... |
68d1fc682c05256d5a40c800c66167a8b8817af9 | 771857cbb0ee8895e885b4abdb6fda54979c90dc | /example.py | b8f678c57d510fad1031b99548e3e74578faf731 | [] | no_license | cecezhou/wordsegmentation | 82e14438a00c759baa176594dbfe4bfda04716d1 | c5969ab52ade351594575a8e60ba754e7079fcad | refs/heads/master | 2021-01-10T13:28:11.292117 | 2015-12-10T16:30:36 | 2015-12-10T16:30:36 | 46,764,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,441 | py | example.py | import time
import re
import helpers
import models
shorttext= "thequickbrownfoxjumpsoverthelazydog"
print "Text: " + shorttext
mytext = models.NoSpaceText(shorttext, 15)
# process basetexts
helpers.parseBaseText()
# get frequencies from base text
(freq_dict, normFactor) = helpers.getFreq("alphanumeric.txt")
(trans... |
c2c1b08d569a21f971b79c729b7ee05422e4cb63 | 75da0f608715a87b1478d2cebf01c279774fcf3d | /src/bratdb/scripts/freqs.py | 5fd9851a6a3fe7e4771ac0976300f9b28ddd59f9 | [
"MIT"
] | permissive | kpwhri/bratdb | 683989ecf2ac2e46a7e246a4cb10363b24a84080 | 69aa3f5099250a5cc0027e3580ab4fce03b98530 | refs/heads/master | 2022-05-22T09:29:54.803236 | 2022-05-04T20:39:53 | 2022-05-04T20:39:53 | 204,509,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,223 | py | freqs.py | from bratdb.funcs.frequency import build_frequency_file
def main():
import argparse
parser = argparse.ArgumentParser(fromfile_prefix_chars='@!')
parser.add_argument('bratdb',
help='Path to brat data dump (result of build script)')
parser.add_argument('--outpath', default=None,
... |
367c9c9af18f524ecb7b14c0fdd4ab6e91ac8deb | 170f1c9eadaace246e788f86696af5516d21fb11 | /myspiders/wubajob_spider/wbjob_spider/spiders/job_spider.py | dd6195b1f857ae3c899e50b6d2b8b6c425c09053 | [] | no_license | WendyJJ/myspider | c06bb27266c8b380957e2def65cbec0504da6ac5 | 52b4dd84640cf5e688cbb519c362d3be37b4ddf1 | refs/heads/master | 2021-08-24T06:34:43.231407 | 2017-12-08T12:35:06 | 2017-12-08T12:35:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,981 | py | job_spider.py | # -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
import re
import datetime
from wubajob_spider.wbjob_spider.items import WubajobSpiderItem
from scrapy_redis.spiders import RedisCrawlSpider
class JobSpider(RedisCrawlSpider):
name = '... |
28452dcf70d66300a4092531011b57052c3caeb0 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5652388522229760_1/Python/Yuxiang/2016_1_a.py | 1a8b2954e6f736ba44787f600b88455ca5eb824d | [] | 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 | 529 | py | 2016_1_a.py |
t = input()
cases = []
for i in range(t):
cases.append(int(input()))
for index, n in enumerate(cases):
if n == 0:
print("Case #{}: {}".format(index + 1, "INSOMNIA"))
else:
val = 0
d = {}
while True:
val += n
for number in str(val):
... |
08527e43e5fb5615be2b8770a46b53c776435400 | adef987d8985651c0e7063f4c61025027a459236 | /dist/Basilisk/simulation/clock_synch/clock_synch.py | ed4c72187d52a9418c80a125fceb18e185923556 | [
"ISC"
] | permissive | maxprofs-llcio/basilisk_mag | cab6202b10f8a29e7f57de79d2bb6190a05a2567 | a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14 | refs/heads/master | 2022-03-19T15:51:48.295046 | 2019-04-08T19:09:09 | 2019-04-08T19:09:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,007 | py | clock_synch.py | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_im... |
b77b4b22e7843551fc0a8af5ffdc36af325a9579 | 819f897f4e37d474aa0d33e5df3187a9c65fce74 | /lego_ev3/sensor/touch_sensor.py | 3bb8e9dfc51eb54030cc456e1c4de8f290601b2a | [
"MIT"
] | permissive | CPSuperstore/PyRSquared | a8495d8a8b2194d3409e997f76246e5d81e7432d | 6b7a4375ebb15213251c5af43fa7bd27ca91b600 | refs/heads/master | 2023-07-09T17:22:40.150079 | 2021-08-06T15:13:40 | 2021-08-06T15:13:40 | 392,344,009 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | touch_sensor.py | import PyRSquared.lego_ev3.sensor.sensor as sensor
class TouchSensor(sensor.Sensor):
def __init__(self, ev3_parent, port):
super().__init__(ev3_parent, port)
self.type_number = 16
def is_pressed(self) -> bool:
return bool(self.read_mode(0))
def count_presses(self) -> int:
... |
fe3155d918cfef0ce767abc982b544eb0c26b577 | 3a3cdb1614a1bf5ec94338e45b6365d2148f0534 | /flask/epsilonGreedyLib.py | 002c60427e3dee7813d6be3bc493887bbffa1d23 | [] | no_license | VigRAN084/Epsilon-Greedy-Algorithm | 8acb73771dffc0875151b4453797739caeb12699 | a341f46581ed74ca5339a343bdbaeb75a83b867d | refs/heads/main | 2023-06-09T06:36:10.916608 | 2021-06-29T04:58:14 | 2021-06-29T04:58:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,286 | py | epsilonGreedyLib.py | import numpy as np
import matplotlib.pyplot as plt
class Decision:
def __init__(self, sampleMean):
#sample mean amongst past selections of the arm
self.sampleMean = sampleMean
#mean of the reward distribution
self.mean = 0
#number of selections
self.N = 0
def getReward(self):
... |
3608836520db655f3f63f48fb536cc2da36c8ac2 | b89ae940c8982baa3067fb15279c9c1c40b8f2e7 | /2020-05-14 3D conv, 3D max pool, Transpose conv/3_2D_transpose_conv/2d_transpose_conv.py | 940aa8178bd082e0378532fdabea3602b67cb58b | [] | no_license | albertovitto/VCS | c04e7a7d95a5b8193266dd1fb3390da0224a6335 | 4286596ee7d3e627f9f2681770f72e8d68150a59 | refs/heads/master | 2022-12-17T02:13:20.463482 | 2020-09-19T11:04:58 | 2020-09-19T11:04:58 | 242,100,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,683 | py | 2d_transpose_conv.py | # Your code will take an input tensor input with shape (n, iC, H, W), a kernel kernel with shape (iC, oC, kH, kW) and a stride s.
# It needs then to apply a 2D Transpose convolution over input, using kernel as kernel tensor, using a stride of s on both axes, no dilation, no grouping, and no padding, and store the resu... |
b526a7213ce850df54f0e98cb4b063fa5e88a10f | 327a079c764879d195aa2c0883185b1732db35ac | /prob3.py | e9a75ee11c82c06ce9794573364d179a55381855 | [] | no_license | bnsh/pyeuler | 9245cc0b8c7aef3646fb99e51d2facdb4a925dfa | b64d175011077a40876155b75f4c26036a470c84 | refs/heads/master | 2021-01-13T02:06:37.970867 | 2010-12-19T02:15:50 | 2010-12-19T02:15:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | prob3.py | #! /usr/local/bin/python
v = 600851475143
maxfactor = 1
found = 1
while ((v != 1) and (found)):
factor = 2
while (((factor*factor) < v) and ((v % factor) != 0)):
factor = factor + 1
found = 0
if ((v % factor) == 0):
found = 1
if (factor > maxfactor):
maxfactor = factor
while ((v % factor) == 0):
v ... |
8386a65158bca2c50d10bfb71656a0ef6854b806 | 79bbc2bf3a12c463bf497a68163d4a15a9290a3f | /src/programmers/MCCS2_Yin-Yang addition.py | 9b65b8062a257054953baa279e09fb3cd1f7e5fc | [] | no_license | melodist/CodingPractice | f5cf614f3be07211d0afe02141b7f6848abeaa12 | 96f56c8b4779a8616e6c9b7ad570010e85c89b68 | refs/heads/master | 2023-09-01T08:02:43.090395 | 2023-08-27T13:33:53 | 2023-08-27T13:33:53 | 238,710,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | MCCS2_Yin-Yang addition.py | """
https://programmers.co.kr/learn/courses/30/lessons/76501
Implementation Problem
"""
#1. My Solution
def solution(absolutes, signs):
return sum([a if s else -a for a, s in zip(absolutes, signs)])
|
9df4b1a48e96040b1d1aec6ee6bd456f95a85f86 | c92ce9a1b140ce88cdc66377e39c8f9add41b8e9 | /part3/webrtc/stats/avg_enc_dec.py | ab27b421c13f85827e1c33d514a01f1f44462e24 | [] | no_license | MMirelli/ip-assignments | b1abb61de77a3e22bc0b80e88cb6c9758dad2dae | a671d917aa100217b5656eb4eea12ce6194662e8 | refs/heads/master | 2022-12-13T09:59:45.153102 | 2020-02-25T16:09:53 | 2020-02-25T16:09:53 | 242,859,149 | 0 | 0 | null | 2022-12-08T03:40:57 | 2020-02-24T22:38:11 | JavaScript | UTF-8 | Python | false | false | 2,135 | py | avg_enc_dec.py | import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--sender_n',
default=3,
choices=[3,6,9,12],
type=int,
help='''Select number of senders'''
)
args = parser.parse_args()
SENDER_N = args.sender_n
with open('pb_data-'... |
0400d99cb12bb13733922d6c648f576dafe0d865 | 06ce9fb6eb0f7e928343208c58b12341748b19e4 | /gifPlayer.py | d1f54e94b0da5a068aeb0c1397d0c95cacfb6f61 | [] | no_license | Polleps/Great-Fabulous-Turnip-Super-Hero-Captain | b9052935ca17c03e84802a7c70071340bc87e4da | 7b2674f782bbf2be63cde4d4ac99ed1e2de0c46e | refs/heads/master | 2021-01-17T06:48:24.303092 | 2015-10-16T14:36:04 | 2015-10-16T14:36:04 | 44,166,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | gifPlayer.py | __author__ = 'Brent'
''' tk_animate_GIF_sequence.py
play a sequence of gifs to create an animation effect
the gif sequence was create with PIL_animatedGif_frames.py
note: Tkinter cannot display animated gifs directly
(dns)
'''
import itertools as it
try:
# Python2
import Tkinter as tk
except ImportError:
... |
f56e4352472283aef2feb1337da5579ca049c66c | 153e9d0de755fee62f610b52a7f30f849a2570ec | /test_dish_selector.py | 848f2c44f40c9a86bff5941e74d72b5f4f3bf0d9 | [] | no_license | praxpk/Dish-Selector | 106d6d4205714d24a5b06dc416ac1aa21f128e2a | bd3d4b492d9319a721dfb10924804da5bec6b599 | refs/heads/main | 2023-06-09T22:26:51.382071 | 2021-07-04T22:14:40 | 2021-07-04T22:14:40 | 382,956,247 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,727 | py | test_dish_selector.py | import json
import unittest
import os
from utils_dish_selector import (check_and_return_json, check_currency, check_keys_and_values, check_menu_prices)
class TestDishSelector(unittest.TestCase):
@classmethod
def setUpClass(cls):
#this variable contains the file path to the test files
cls.curre... |
03efa663cedc3f6f5854dc3a9ca0dec1c3aaa3cf | a842af74e125caf6aec7edf4acfb796f5393c38b | /src/module/data/items.py | 36b262eeb2a17886a4b78102384df9eae1abbdf2 | [] | no_license | SeuJoaquim/WebScraping-ComputerComponents-Prices- | 4e74666b41b8984ded240f79b16f6abace4ed4c0 | 467dd7f869c5fd6198c19c4eef46c044eecc7168 | refs/heads/master | 2022-12-29T17:26:43.620637 | 2020-10-21T18:23:32 | 2020-10-21T18:23:32 | 306,112,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | items.py | import sqlite3
from sqlite import Storage
banco = Storage()
cur = banco.conexao.cursor()
cur.execute("SELECT * FROM storage")
rows = cur.fetchall()
for item in rows:
print('\nTitle',item[1])
print('\nActual_Price',item[2])
print('\nLower_Price',item[3])
print('\nIdeal_Price',item[4])
print('\nUrl'... |
f7af346973c592d088eb11f443ca4103be27a606 | d0ae1156cd8a9273418a8ae383b4c165c5a5b54f | /ALT4 Sensors Inputs Outputs/Raspberry PI Sensors/Rasperry Pi Pico/servotest.py | 7fad4e93d4256b37ab5df5268757e5440efd10d9 | [] | no_license | STJRush/handycode | e63aead20daaad6c52cba7199fcdfe8c90abb0c4 | 56adc99d6c2201397bb38e50885d1de6266fdeac | refs/heads/master | 2022-12-10T14:37:16.690632 | 2022-12-07T01:48:50 | 2022-12-07T01:48:50 | 91,385,270 | 7 | 18 | null | 2021-09-21T15:03:31 | 2017-05-15T21:11:45 | Python | UTF-8 | Python | false | false | 966 | py | servotest.py | # code from Youtuber @YoungWonks
# this code turns a servo back and forth
from machine import Pin, PWM
import utime
MID = 1500000
MIN = 1000000
MAX = 2000000
led = Pin(25, Pin.OUT)
pwm = PWM(Pin(15))
pwm.freq(50)
pwm.duty_ns(MID)
while True:
pwm.duty_ns(MIN)
utime.sleep(1)
pwm.duty_ns(MID)
... |
ee189fbf3e76e8796adb916478dc8599be2a9dc1 | c508865f71caaf1efe360fef608e1c6b6280bbe2 | /unit11-hw/python/Bird.py | ec6495b89f44d68e153aca05b5c67e7c82cadc51 | [] | no_license | rlowman/ProgrammingParadigms | 83817846fcda35eef4adaed514265ac792a06514 | aa876888b631b3edce1b94c1ef46938fe913a5dc | refs/heads/master | 2020-03-18T23:01:35.439965 | 2016-12-15T17:55:18 | 2016-12-15T17:55:18 | 135,378,906 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | Bird.py | # Bird.py | Defines a Bird superclass to be extended by specific bird
# sub-classes.
#
# Completed by: Robert Lowman
# Date: 12/6/2016
####################################################
class Bird:
def __init__(self, theName):
self.name = theName
def call(self):
return 'Squaaaaaaawk!'
def getName(... |
c9fcf59ce03a1a0b86125b70d6b0be311d8e3870 | fa499a35746da45c74265d957b5af4a88571fddc | /gitautodeploy/lock.py | b0b408b839c8e547d62f41b9b5ad2b4ffb5ed914 | [] | no_license | vladionescu/Git-Auto-Deploy | 746a3c968faa4fe93d457b605fa2eca795df6b9e | b4e3c96aecc821ce089442a62a825cd2c78bb876 | refs/heads/master | 2021-01-21T09:43:06.763128 | 2016-05-18T19:23:39 | 2016-05-18T19:23:39 | 59,700,305 | 0 | 0 | null | 2016-05-25T21:53:20 | 2016-05-25T21:53:20 | null | UTF-8 | Python | false | false | 1,338 | py | lock.py | class Lock():
"""Simple implementation of a mutex lock using the file systems. Works on
*nix systems."""
path = None
_has_lock = False
def __init__(self, path):
self.path = path
def obtain(self):
import os
import logging
logger = logging.getLogger()
tr... |
6793eac6513f1857e98e47f3dc1f587127c0fb6c | a2fc0d8ddeef3443823844da618cbc9c09480a61 | /Ellipse_Dataset.py | aa12fe46f5e7c2c9de2da33d149c548258418390 | [] | no_license | coolgpu/Demo_HyperParameters_and_Schedulers | 09f379363baa169e0dd38946f8b382af3ae0a483 | bedfb6d065ce90b3a830fdd910370d5cbea61ad0 | refs/heads/main | 2023-03-16T16:43:53.626312 | 2021-03-20T19:26:34 | 2021-03-20T19:26:34 | 349,572,411 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,637 | py | Ellipse_Dataset.py | import torch
from torch.utils.data import Dataset, DataLoader
import math
from matplotlib import pyplot as plt
def generate_training_data(N, a, b, noise_scale=0.1, plot_data=True):
# prepare the training dataset
c = math.sqrt(a*a - b*b)
xHohmann = torch.linspace(-(a+c), (a-c), N)
yHohmann = b * torch.... |
2bde1d297c5113373b2ca7506d352fd593fa606c | c11a5b263ed815a00ee6741b72a550098e1c5ee1 | /spider/solidot/solidot/spiders/titles.py | bf128174c0b652bd058d32c44d05a4454b756ba8 | [] | no_license | 3fen/Magic-Winnower | 1079c7d79be4d14fe450a73dbae04985eaf65451 | eedac70a78112bd31f632b1766221e51adcde29b | refs/heads/master | 2021-01-13T00:37:48.694123 | 2016-04-12T09:00:52 | 2016-04-12T09:00:52 | 49,854,896 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | titles.py | import scrapy
class TitleSpider(scrapy.Spider):
name = 'soli_title'
allowed_domains = ['solidot.org']
start_urls = [
"http://www.solidot.org"
]
def parse(self, response):
for t in response.xpath('//body/div[@id="main"]/div[@id="center"]/div[@class="block_m"]/div[@class="ct_tittle"]... |
e167be2e21d2b076c7dcdadaa41d0d9460fc71d5 | 33e0942230b6d59b0d86218ea72caf308f11bcdb | /Tutorials/01. 10 Days of Statistics/006. Day 4 - Binomial Distribution I.py | ca5dd415d86bca7500198125dc4f589da6ef1cc8 | [
"MIT"
] | permissive | ankitsharma6652/HackerrankPractice | 99eac99e83f770f3320a188c43b96e5af5141474 | 5036a708486f396b1a7611e89a67ef4a0eb9725c | refs/heads/master | 2022-12-23T01:33:07.937401 | 2020-09-30T17:21:51 | 2020-09-30T17:21:51 | 299,996,829 | 1 | 0 | MIT | 2020-09-30T17:20:40 | 2020-09-30T17:20:39 | null | UTF-8 | Python | false | false | 274 | py | 006. Day 4 - Binomial Distribution I.py | # Problem: https://www.hackerrank.com/challenges/s10-binomial-distribution-1/problem
# Score: 30
import math
p = 1.09/(1+1.09)
ans = 0
for i in range(3):
ans += math.factorial(6) / math.factorial(i) / math.factorial(6-i) * p**i * (1-p)**(6-i)
print(round(1-ans, 3))
|
02b36d681d0c7c804d279e34bee18cb59bef8934 | ed6e62c986e3ef096fa23eab3d38499df7e55fba | /src/ropa/migrations/0003_ropa_prom.py | 3c7b63e1f76ab116c858ffc7aafe255807194e53 | [] | no_license | christian460/proyectoFinal | 0450865a80535cff4385d915b66ae9b49aa5faa3 | 7a8c44ff26b1a1903f3d65a804bed18118b5d8c5 | refs/heads/master | 2022-12-04T11:35:22.419519 | 2020-08-14T21:53:22 | 2020-08-14T21:53:22 | 278,426,245 | 0 | 1 | null | 2020-07-27T18:31:50 | 2020-07-09T17:16:58 | CSS | UTF-8 | Python | false | false | 435 | py | 0003_ropa_prom.py | # Generated by Django 2.1.5 on 2020-07-14 23:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ropa', '0002_auto_20200714_1142'),
]
operations = [
migrations.AddField(
model_name='ropa',
name='prom... |
14a93f4270d9f42fa35f28ee81b7f83ffdcadd2a | 4548ea7435ca2ca1fe46aaf0f75182c3d398f357 | /erc20.py | 7d8738ad4c3b0d40e250424a8f98d899382a9050 | [] | no_license | nouveaupg/eth_node_client | 2775328673bef700ef4a060c87a8ee7dfb5d1a30 | 16cc83f531ec1419f94d54be0fc208ee5e61341e | refs/heads/master | 2020-04-02T02:44:22.176388 | 2019-08-21T16:21:10 | 2019-08-21T16:21:10 | 153,925,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,531 | py | erc20.py | from eth_abi.abi import encode_abi
import binascii
import json
import rpc_interface
import ipc_socket
import util
class ERC20Contract:
def __init__(self, token_name=None, symbol=None, initial_supply=None, contract_address=None):
binary_stream = open("erc20.abi", "r")
self.erc20abi = json.load(bina... |
9f0096b21e00b3b92c8728c39da9cd0443c53cce | ce357c45860b5b81de0ffaabc01446c6607e94d1 | /CAR_SELF_DRIVING/SIMPLE_LANE_DETECTION/Simple_lane_detection.py | 38eed0c79b26fd7c23ad931e7474e920e727961b | [] | no_license | Avyaygokavarapu/SELF_DRIVE | 9e7e8d141d4c5d41e9809142b7e8c5fc3d3de490 | 78fb0611bcfe0b0ecbcadf1b4b88a939c694298a | refs/heads/master | 2022-07-07T18:21:00.850434 | 2020-05-12T07:28:05 | 2020-05-12T07:28:05 | 263,262,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,213 | py | Simple_lane_detection.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 11 16:28:32 2020
@author: avyay
"""
import numpy as np
import cv2 as cv
lines=[]
def colorconvert(frame):
hls=cv.cvtColor(frame,cv.COLOR_RGB2HLS)
lower=np.array([0,120,0])
upper=np.array([255,255,255])
yellower = np.array([0,0,0])... |
4087dd834308f5db0920f144d463399879df8188 | cc93fe1cc1b668570c78b09f9e7f6474db4e046e | /Problem 243.py | 93bae73f090444350ad16f9a21c6ac4ddfdf1b9d | [
"MIT"
] | permissive | mdaudali/project-euler | e6e24fe3b5ff247ca729d0e6b4716de7605083a2 | 763a63d94d6e5a97a4da454fe74a31332f30d048 | refs/heads/master | 2020-04-10T10:00:33.326508 | 2018-12-08T15:46:11 | 2018-12-08T15:46:11 | 160,951,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,959 | py | Problem 243.py | """Resilience
"""
import math
from utils.utils import get_list_of_primes, get_prime_factors
from functools import reduce
from operator import mul
THRESHOLD = 15499 / 94744
def binary_gcd(u, v):
if (u == 0): return v
if (v == 0): return u
c = 0
while (u | v) & 1 == 0:
u = u ... |
f7f4d074f9b59356f7ddaef3ed7125e251b428b8 | 2cefe4b6be391e753cf3a5bf610b9c9dc7f83fbe | /setup.py | 3d4aa688ebae37193ada325d972d92a4b9de4ea3 | [
"MIT"
] | permissive | navapbc/ecs-utils | af5ab87efc6583cc79a2413185b8468a8d79742d | 9b364ed64aba3e3b8d4bc6c85b2a426eb255d1e3 | refs/heads/master | 2022-03-14T18:23:49.979534 | 2022-02-23T17:19:26 | 2022-02-23T17:19:26 | 146,796,368 | 2 | 4 | MIT | 2022-02-23T17:19:28 | 2018-08-30T19:21:16 | Python | UTF-8 | Python | false | false | 1,013 | py | setup.py | """setup.py."""
import os
from setuptools import find_packages, setup
INSTALL_DEPS = ['boto3>=1.8.5',
'botocore>=1.11.5']
def read(fname):
"""Read a file from the filesystem."""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="ecs-utils",
version=read(... |
b2942a903ccaef47d25c56327575a54c7859f784 | 26f785282329cb06ea69b8ad40e7bf33b802caae | /Python/Latihan/materi uts/perulangan6.py | 7d3ee29a0612310bbe5fbb65dec0c06c8aa7b9de | [] | no_license | ardiandp/python-areta | 3384b37ff89476655250cdc92c610222e92a7a63 | 20fd477036ed52d31da14e20284829abde779de5 | refs/heads/master | 2020-04-23T06:29:01.740194 | 2019-04-13T07:34:31 | 2019-04-13T07:34:31 | 170,974,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 116 | py | perulangan6.py | # Perulangan sebanyak x
for i in ["Nasi Uduk","Nasi Rawon","Soto Ayam"]:
print (i, "Adalah Masakan Nusantara..") |
198836ff93c4d13a7fc19877804a6f25dccac5ee | 29f6ec8882afba5faf919f7d88fbfd8b306464cc | /If else/bài tập rèn luyện break.py | b757350f5103fb85188054020e1ec14495edf30e | [] | no_license | xuancanhit99/Python | 9fae947396865ef5d6b25316f990b99dfce7eaca | 356664a2f0682f40ff5a64370e0cac03a5eaa5b4 | refs/heads/master | 2022-12-27T09:39:56.731204 | 2020-09-20T21:31:10 | 2020-09-20T21:31:10 | 297,166,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 76 | py | bài tập rèn luyện break.py | while True:
n=int(input())
if n<0 :
break
print("n= ",n) |
5e2fee549db26aee9c733a7bead200086f89990e | b34584c596547c4aa66e60271a642368fd5dbd1c | /ride-sharing/FloydWarshall.py | f1cabf26714e7e386b8b757a8ba849957310885e | [] | no_license | zpfbuaa/papers_with_code | 0028747a832bcb16b5c24f9da1f139f2b5ef0612 | 3b1cb5e4c78e995609a2ac34be2bb860b3ef91ef | refs/heads/master | 2020-08-02T18:54:53.809652 | 2019-05-07T10:04:18 | 2019-05-07T10:04:18 | 211,471,650 | 1 | 0 | null | 2019-09-28T08:49:57 | 2019-09-28T08:49:57 | null | UTF-8 | Python | false | false | 2,254 | py | FloydWarshall.py | """
to create output matrices dist and time that can give temporal and spatial distance from all to all nodes
run using:
python FloydWarshall.py <input file> <output file>
input file must adhere to the following format:
no. of nodes(V)
no. of arcs(E)
<tail node> <head node> <weight> --this line occurs E times
""... |
ea6f524523497f75e8fc28ff50475984e02c12f8 | 6dd52e0a80abd5899336371a5d3e112ddc714786 | /new_project2.py | fe98592db23ca397b4f3f2373c7c9c845be6fe82 | [] | no_license | changchanglccc/SPIMI_IR | ef266032e9a1009521d49f9ba6449a6631e51e5d | 9c68ffe13347d6d65bb7205f92308ead25e7dd91 | refs/heads/master | 2020-06-18T06:41:17.298701 | 2017-03-05T18:58:08 | 2017-03-05T18:58:08 | 75,151,787 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,931 | py | new_project2.py | import glob
import time
import nltk
import collections
import sys
from math import *
import json
#n terms in query, we need to iterate n times
#ranking = 0
#ranking = ranking + prepareforRSV(term)
#for every term in query,find doclen,avgdoclen,docfreq,termfreqindoc and then, calculate the formula,
#add t... |
b186830f65442a8b7216bfe930ca0df61e0681cc | 6312ae52fb81f68ca80ad5c607148d011052850d | /aarsol_accounts/res_company.py | f70b298547fa7458d93254143a50ec9ca889ecad | [] | no_license | cokotracy/sos_guards | e88b95026185aaf1d622b223d39afd5e60a60ee9 | 84242b484cbd9a4296d3083747b4e31f2ebb3e73 | refs/heads/master | 2022-06-14T05:36:27.971635 | 2019-10-07T07:01:58 | 2019-10-07T07:01:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 957 | py | res_company.py |
from odoo import models, fields, api
class default_report_sett(models.Model):
_inherit= 'res.company'
@api.model
def _default_journal_template(self):
def_tpl = self.env['ir.ui.view'].search([('key', 'like', 'aarsol_accounts.JOURNAL\_%\_document' ), ('type', '=', 'qweb')], order='id asc', limit=1)
return def_t... |
7a38c06abd97df1703af91f8084999455f4f8b63 | c29435767012007d0d249da590a66ef9ad38487a | /SearchBYdomain.py | e54fda08551ac3ac528d6559c729a6a67fc29256 | [] | no_license | Sergey985/Apishka | bf18f30baf2da93e57b4baa188dec6d497769b7f | cac6b633cf7492d25112b9cb197e52dbd01d6560 | refs/heads/master | 2023-08-10T16:30:33.860472 | 2021-10-06T11:07:18 | 2021-10-06T11:07:18 | 409,210,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,423 | py | SearchBYdomain.py | import csv
import datetime
import requests
from sqlalchemy import Column, Integer, Table, String, create_engine, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, aliased, Query
from sqlalchemy import MetaData
from pygame import mixer
import json
mixer.init()
mi... |
b7ff5e8bcd6416e8beab6f28ff1ec08a774a8b1d | d8c76262e9e33e341da4b275cc15c4af0862eecc | /blackhack.py | ff06b3f9d908bc3ff4c263b341301c4c2caaab9a | [
"Apache-2.0"
] | permissive | Medioprah/BlackJack | 96cd5e9e9bc3432d3fbd1a52a463ba1bd410c2cb | 267372f826633adefb5bdb17f11cd6aaa3bb93d1 | refs/heads/master | 2021-01-20T07:56:44.768656 | 2017-05-03T01:11:41 | 2017-05-03T01:11:41 | 90,068,654 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,972 | py | blackhack.py | import random
import tkinter
top = tkinter.Tk()
# Code to add widgets will go here...
top.mainloop()
gang = 0
opps = 0
fin = False
while fin == False:
cardlist = [1,1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10,10,10,10,10,10,10,10,10,... |
eede1e8c384594b2a665d911da98cf82497e0d4e | a27dcede175c9b37fde1ec50a7a11cc9fa1300e4 | /server/webApp/labelImage.py | bc09e7b1f14c8e2907e1a5f1002c4e6e6855ad6b | [] | no_license | leinerf/garbage-filter | f654ba9c28ba6239f619f7b14f1af2c03a874f3b | 93ce13582ae00cae5d9b23cfa192769932881c5b | refs/heads/master | 2020-04-16T06:29:12.038989 | 2019-01-13T16:07:48 | 2019-01-13T16:07:48 | 165,348,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | labelImage.py | import requests
def getImageLabel():
url = "api url"
# Adding empty header as parameters are being sent in payload
headers = {
"Prediction-Key": "secret_prediction_key",
"Content-Type": "application/json"
}
data = {
"Url": "https://s3-us-west-2.amazonaws.com/sbhacksv-garbage... |
fa8e10dbfe257b35133539c61a5dd36968df0d0d | 1d469883761b946268d56d670028301ddedae339 | /tests/test_era.py | 5437dad63a858cc44d45572fa66ce839ddd0986c | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | twmacro/pyyeti | b6c051daed9990b387518acc2d78fe5787e5afd4 | ccd24fd166e25e596c673447897bda91477cc38d | refs/heads/master | 2023-09-01T19:55:53.168663 | 2023-08-30T22:31:32 | 2023-08-30T22:31:32 | 270,387,438 | 28 | 11 | NOASSERTION | 2023-09-09T22:01:14 | 2020-06-07T17:56:37 | Python | UTF-8 | Python | false | false | 5,427 | py | test_era.py | import numpy as np
import scipy.linalg as la
from pyyeti import era, ode
import pytest
def get_model_data():
M = np.identity(3)
K = np.array(
[
[4185.1498, 576.6947, 3646.8923],
[576.6947, 2104.9252, -28.0450],
[3646.8923, -28.0450, 3451.5583],
]
)
D... |
f5870727446a8092619dad25787c5d8569bcd258 | 880d75590e82c74c05616aba471fc63b624dffb5 | /Workshop 5/Excercise_page_149/excercise_03_page_149.py | 844729fd237363268c7f6a1955b87e5f0321a7b7 | [] | no_license | Scaletts/Python | 7591a6ae29e7d8a77072ebe5b8af597d40612b78 | d55a7ab0f8824178aae0e43b4e1b78785773fa1e | refs/heads/master | 2023-08-18T12:34:39.900662 | 2021-10-17T16:19:41 | 2021-10-17T16:19:41 | 402,992,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | excercise_03_page_149.py | """
Author: DuongTruongTho
Date: 09/08/2021
Program: Exersice_03_page_149.py
Problem:
Use the function even to simplify the definition of the function odd presented in
this section.
Solution:
"""
def odd(x):
return x % 2 == 1 |
6cf3a6273eb6160822ceb7d6b7e99d925d9ffe74 | 0a1716384ac3425b0f457e210e43c0a499bd66d2 | /_old/result_plots/results_db.py | 8af9dc2b738d4031f9a275572eee629a65c1f31a | [] | no_license | ilbarlow/process-rig-data | d54d0489ad42ef92e422915d01ac43feeb62bed3 | 89fc296628eb7f9260b099ee3cb2f25680905686 | refs/heads/master | 2020-03-18T21:50:05.775230 | 2018-03-28T20:13:41 | 2018-03-28T20:13:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,399 | py | results_db.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 29 08:19:55 2016
@author: ajaver
"""
import os
from plot_db import get_feats_db, plot_boxes, plot_boxes_group
from plot_db import plot_db
DATABASE_DIR = '/Users/ajaver/OneDrive - Imperial College London/compare_strains_DB'
#%%
def first_test(ta... |
6e43c9af6e81888f5373e4baa6e60ca20886069a | 81edcd0769366103fd89c055c39cadc91091c5fe | /graphreader.py | df20fea55ce2b73c84b36c275edd69438e3ff482 | [] | no_license | pyuvaraj37/CS220_Final_Exam_Questions | 7543d0301ccd3b0e076d11d1b209de4b71ce8dc7 | 38aa6e7afa0453b52f5c9f67cf4fcdd8eaa3d096 | refs/heads/main | 2023-05-31T08:56:18.274115 | 2021-06-11T02:27:45 | 2021-06-11T02:27:45 | 375,806,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,065 | py | graphreader.py |
def Data(path_to_data):
V = []
E = []
numEdges = 0
numVert = 0
file = open(path_to_data, 'r')
for line in file:
line = repr(line)
line = line.strip('\'\\n')
line = line.split()
#print(line)
if len(line) > 2:
numVert = int(line[2])
... |
e5a7068e69a6f921f5bfe4f63a21f2aca6bb0932 | 557d64543b61dbe9147e279875823af153e93344 | /drugs/urls.py | 8f68ce95f0f6383de94e9adeb81b0fc334824727 | [] | no_license | levietanh0001/DDMS9 | e8e63fab90f4839b1303cf415728da2ba19af814 | 4a8728e8bbf3784590a5240e783b8d785269710d | refs/heads/master | 2023-08-20T06:59:29.534018 | 2021-10-31T08:40:02 | 2021-10-31T08:40:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py | urls.py | from django.urls import path, re_path
from .views import (
DrugListView,
add_drug,
)
urlpatterns = [
path('add-drug/', add_drug, name='add-drug'),
path('drug-list/', DrugListView.as_view(), name='drug-list'),
] |
d01965dc2cbd830ce87e1047522cc83af419bb61 | 2b8db31b0e4fed2e5ce204b6dc6e273a6a1ab868 | /cagematch_scraper.py | d37132e6b772b8c4bf1ba6c43cd566b333f1eb2c | [] | no_license | manaschaturvedi/pro-wrestling-recommendation-engine | a357da37da933bd799059a79e6511b01f9d3aaf8 | fabedbbe52d3ee68027b8bdc8f08049de17a66ff | refs/heads/master | 2020-07-05T17:16:31.670079 | 2019-08-16T10:45:14 | 2019-08-16T10:45:14 | 202,710,263 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | cagematch_scraper.py | import requests
from bs4 import BeautifulSoup
import pandas as pd
matches = []
for page_num in range(100):
url = 'https://www.cagematch.net/?id=111&view=list&s=' + str(page_num)
source_code = requests.get(url)
plain_text = source_code.text
soup = BeautifulSoup(plain_text, "lxml")
for elem in soup.f... |
839950f5ff7e8a87468ff17ee8a26b1dd6d04e71 | 16450d59c820298f8803fd40a1ffa2dd5887e103 | /baekjoon/15596_정수_N개의_합.py | 91df7fdccd8d8255d9d00e19c0e3d5555aab2d32 | [] | no_license | egyeasy/TIL_public | f78c11f81d159eedb420f5fa177c05d310c4a039 | e2f40eda09cb0a65cc064d9ba9b0e2fa7cbbcb38 | refs/heads/master | 2021-06-21T01:22:16.516777 | 2021-02-02T13:16:21 | 2021-02-02T13:16:21 | 167,803,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 76 | py | 15596_정수_N개의_합.py | def solve(a):
summ = 0
for i in a:
summ += i
return summ |
8b895bd56ca78e7584a90d0477f4383004080c97 | 1dca6377a90d06eead322f81e91988ad170d66f4 | /authenticator/authenticator/services/sessions.py | e7373fc95a5eb2af08651c9d8651ed638a8fd3ab | [
"MIT"
] | permissive | arXiv/arxiv-auth | 27f7b6c035063b158976c372ab16dc6bdba94873 | 734f88e5839acebe34252cbb3eb8ce71a31aa117 | refs/heads/develop | 2023-08-09T02:52:03.850455 | 2023-05-02T13:00:31 | 2023-05-02T13:00:31 | 107,317,309 | 20 | 18 | MIT | 2023-05-02T13:00:33 | 2017-10-17T19:56:35 | Python | UTF-8 | Python | false | false | 555 | py | sessions.py | """
Provide service API for distributed sessions.
This module maps modules and functions required by the accounts service to
corresponding objects in the :mod:`arxiv.users` package.
"""
from arxiv.users.auth import exceptions
from arxiv.users.auth.sessions import SessionStore
InvalidToken = exceptions.InvalidToken
E... |
853ffb7c0a5a6143c89e50053657f92b8ad62516 | f051205c1b7f0e001a828782a53d4cff3d8ee3e0 | /constants.py | 4827d23a98380b8d5365961fc48e7df581810372 | [] | no_license | escoder89/scorum-auto | f39e5206ba06ff235c814042fc36fdaa7a383a51 | afdefc179b32f1a312463c269c8b5302f61fad1f | refs/heads/master | 2020-03-08T02:25:18.890630 | 2018-04-03T06:44:51 | 2018-04-03T06:44:51 | 127,859,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | constants.py | BASE_FORMAT = '%Y-%m-%dT%H:%M:%S'
class StatusCode:
OK = 200
METHOD_NOT_ALLOWED = 405
NOT_FOUND = 404
BAD_REQUEST = 400
class Method:
CALL = "call"
class Headers:
ContentTypeText = {"content-type": "text/plain"}
|
31c47e838a92cc87d11b1712ce7c4de5b2076f37 | cd43541a08c46da5ff9881c5d573b98ab9f636ee | /1_Python_basics/2_Embedded_types/Task4.py | 92f7dd6d86437c4b26d8a2c90b572b5afd9925a5 | [] | no_license | aeroswitch/GeekBrains | 22204babf4c361e79d76a7707d2842e38ee49500 | 79c6c03619918dd97c77f1280396453ef3b2f670 | refs/heads/master | 2023-03-17T22:46:19.919193 | 2021-03-08T21:03:54 | 2021-03-08T21:03:54 | 271,860,778 | 0 | 0 | null | 2021-03-08T21:03:54 | 2020-06-12T18:03:01 | Jupyter Notebook | UTF-8 | Python | false | false | 1,566 | py | Task4.py | '''
4. Пользователь вводит строку из нескольких слов, разделённых пробелами. Вывести каждое слово с новой строки. Строки
необходимо пронумеровать. Если в слово длинное, выводить только первые 10 букв в слове.
'''
user_str = input('Введите строку из нескольких слов разделенных пробелами: ')
result = user_str.split()
f... |
ff89eaaf9af183c83144011e64515b3eb6d804a7 | 16feeb3128685ae738c36e65c26ea65956dabc19 | /src/scs_core/model/catalogue/model_compendium_group.py | 35047ce818ce8b7ce6b8e0cf3e13c5482cd7490f | [
"MIT"
] | permissive | south-coast-science/scs_core | 08e914809e9b3f7561b35574f7c225004ccbda9c | 60b46d3238720fa5fee65e63d58aaeb3bda672aa | refs/heads/develop | 2023-09-01T18:01:18.288247 | 2023-09-01T12:04:36 | 2023-09-01T12:04:36 | 79,104,344 | 4 | 5 | MIT | 2023-09-13T13:54:02 | 2017-01-16T09:46:43 | Python | UTF-8 | Python | false | false | 4,774 | py | model_compendium_group.py | """
Created on 15 Oct 2021
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
A catalogue entry for a group of machine learning model compendia, one for each gas
By convention, the name of the group should be the same as the name of the ML model template.
document example:
{"name": "oE.1", "compendia": {"NO... |
04487dce97231a7be2bf3b164e93f0ea4d01ba05 | 8554e32593fe31b9aec76543c0e8c61471ece751 | /1-4.py | 1af596ed2d6a774fbfdb1fe1ac28abdb42550661 | [] | no_license | PaulWThi/Cracking-the-Coding-Interview | 1efedd56584336074cd86b0db6f6a18c54d4fec4 | 2c7533caacdcbfdf4a8bf330ff2be791830bf448 | refs/heads/master | 2023-03-06T16:23:03.542927 | 2021-02-12T06:20:16 | 2021-02-12T06:20:16 | 335,200,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | 1-4.py | # Write function that determines if a string a palindrome off of any permutation
def palinPerm(str):
# Create empty set
charSet = set()
# Loop through string, if character does not exist in set, add it. If it does, remove it.
for c in str:
if c not in charSet:
charSet.add(c)
else:
charSet.r... |
5e355732f07029aa644617ac9b5e9ad50ee9397f | f00645f938062b5b896516f215f1e89e5e9a5766 | /appPortas/urls.py | deaefb82be94d713414bdd1b70e4c8745a1d638d | [
"MIT"
] | permissive | ValerioMedeiros/SCEFA | 892fa6f1bec3e7b8bf8934a74512f1f8f95f7e51 | 9028b575f8813e309c01061f0c1f58776e225ae7 | refs/heads/master | 2021-07-08T00:49:13.048579 | 2019-10-21T20:36:38 | 2019-10-21T20:36:38 | 216,660,085 | 0 | 0 | MIT | 2019-10-21T20:32:46 | 2019-10-21T20:32:46 | null | UTF-8 | Python | false | false | 1,723 | py | urls.py | from django.conf.urls import url
from django.contrib.auth.views import login,logout
from appPortas.views import *
urlpatterns = [
url(r'^porta/list$', porta_list, name='porta_list'),
url(r'^porta/detail/(?P<pk>\d+)$',porta_detail, name='porta_detail'),
url(r'^porta/new/$', porta_new, name='porta_new'),
... |
6bcddd1b2ec8653400f710e5cab552d4bec75b6b | 942d5347355d3faef7ff37dc3d71c013a61ce2db | /rgtest.py | 98985001e91b83cf2d04870a86df1e842d0a367e | [] | no_license | BloodD/my-utils | 542d5be1a99594e7f349c1c74d54733450219637 | 0c937dd77f5a7f62ae1440a4601cf7be3dc5001a | refs/heads/master | 2021-01-22T07:04:08.034883 | 2014-03-03T07:00:04 | 2014-03-03T07:00:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | rgtest.py | #!/usr/bin/env python
"""
This code is fot testing the region growing.
"""
import os
import sys
import time
import nibabel as nib
import region_growing as rg
import matplotlib.pyplot as plt
import numpy as np
img = nib.load("zstat1.nii.gz")
data = img.get_data()
#test coor [36,60,28] [21,39,30] [23,38,30]
coor = [23,... |
e464b465c4bc90c250c0ea02c17b7398d975964b | 62cc92e6f01b7e0474a851d3f2475126dac9649c | /dmcalc.py | 85d47e62d6c9ded82dee26dd5d4e1eeee810f032 | [] | no_license | Yonhua/dmcalc | 80370753a37b90ced61a7ab4461d8b8c3bd9cb49 | 22e051bd3c404cf4bc4389e1719215f7c3592e3e | refs/heads/main | 2023-03-06T18:40:50.204260 | 2021-02-22T07:44:55 | 2021-02-22T07:44:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,499 | py | dmcalc.py | #!/usr/bin/python
'''
** dmcalc **
Estimates the Dispersion Measure (DM) from the data in psrfits file format.
Returns the DM value with its uncertainty and reduced chi-square from tempo2
DM fit.
Dependencies
-------------
PSRCHIVE with python interface: http://psrchive.sourceforge.ne... |
307bb7461a729ba979f6a862fe7c292c42f96ce6 | 8c531e5c65cea62a83f2768d573e337589ce1edc | /exercicio-11/Marlysson/exercicio.py | 1142c81eb9082b959c9ccbf729d6f14579e2086a | [] | no_license | luanribeiros/Exercicios | c09fe045c3390b13470a52bcc6165f7ddf35882d | 7f300c22d7f97edd8db8c3513819715e7f553724 | refs/heads/master | 2021-09-26T17:49:57.143522 | 2018-11-01T02:15:46 | 2018-11-01T02:15:46 | 109,782,008 | 2 | 0 | null | 2017-11-07T03:26:03 | 2017-11-07T03:26:02 | null | UTF-8 | Python | false | false | 281 | py | exercicio.py | # -*- coding: utf-8 -*-
elements = str(input("Type the elements of list: ")).split()
elements = list(map(float,elements))
times = int(input("How many times you wish shift to right: "))
for _ in range(times):
removed = elements.pop()
elements.insert(0,removed)
print(elements) |
83e2f9c56c45a288aabd777fb244089367649258 | 5fdafef4fdedf81da72674418997d639872dc23f | /docs/config.py | f5edce4f1665f13e396052f8556fad0d10eab5e7 | [
"MIT"
] | permissive | jalvaradosegura/folder_organizer | 8e51a8609986b0c2fcedf52657a4f47aa9a1a13c | 96079da76b2cc393f14580c1f0c51453e698e8db | refs/heads/master | 2023-05-11T10:28:56.884008 | 2021-06-02T02:53:10 | 2021-06-02T02:53:10 | 284,526,302 | 1 | 0 | MIT | 2021-06-02T02:53:11 | 2020-08-02T19:20:15 | Python | UTF-8 | Python | false | false | 517 | py | config.py | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
IS_TESTING = False
FOLDER_TO_ORGANIZE = ''
FOLDER_FOR_OTHERS = ''
FOLDER_TO_ORGANIZE_TEST = ''
LOG_FILE = ''
IGNORE_HIDDEN_FILES = True
FILES_DESTINATION = {
'images': ['.jpg', '.jpeg', '.png'],
'documents': ['.pdf', '.xlsx', '.... |
8035f195cd01dc50691cd93ea91a6377b1d83f24 | 45db79eb6c6c16e32bfd9fa4e761f2e16d68e9c6 | /work_gpu.py | 7aecb756865bca62dfa688195fa4694b781cbae1 | [] | no_license | chylvina/wly | 6421ad2e6e0c38fa953cb7eb6e759520e9312f56 | 56a6a898eefe5b705b4257472e558945abfead33 | refs/heads/master | 2020-06-09T22:26:02.137810 | 2019-06-26T06:04:13 | 2019-06-26T06:04:13 | 193,518,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,160 | py | work_gpu.py | import threading
import time
# import numpy as np
import pickle
from utils.ret_utils import error_info
from nodule_class.isnodule import LungIsncls
from preprocessing.location import lobe_locate_gmm
from detection.lung_detection import LungDetection
from func_timeout import FunctionTimedOut
from func_timeout import fu... |
def089c2749444797ac3079809c082dacab08554 | af6e98508d053c8b80482fc5dff827e78a49f60e | /msclassifier/src/domain/machinelearning/ModelInfo.py | 8c9ab5f0d654d3d6a206405f50707f28c186e25b | [] | no_license | JohannesHaering/WASA1 | caed7e62ee344ad8e477b025cc57fbc655e07ba2 | c8369ef3d242352f6598e5a9de5d7bc05885397c | refs/heads/master | 2023-08-30T06:56:21.622966 | 2021-11-03T17:51:39 | 2021-11-03T17:53:58 | 424,325,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | ModelInfo.py | class ModelInfo:
def __init__(self, name: str, path: str, filter: str):
self.name: str = name
self.path: str = path
self.filter: str = filter
|
17505f5c14190df3311c04c19f687937481b920b | 1a3c6b5eb29a0013132533eda8870cdfec392d8e | /pythonBackend/venv/Include/service.py | 1de456208899b42cc4be4be29e0c80b13dd21234 | [] | no_license | issamlf1/CORONASTAT | 963b2b3b6ab72571aec82e652ce2837de86ef455 | 119b5baf4923e4174c2243a28652816f28b040eb | refs/heads/master | 2023-01-09T03:51:50.872759 | 2020-11-06T03:13:35 | 2020-11-06T03:13:35 | 303,728,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,138 | py | service.py | from flask import Flask, jsonify
import dataExtraction as dataEx
from flask_cors import CORS,cross_origin
from analyseSentiment import twitterDataExtaraction
from flask_pymongo import PyMongo
app = Flask(__name__)
app.config["MONGO_URI"] = "mongodb://localhost:27017/scrapingDB"
mongo = PyMongo(app)
db = mongo.db
cors ... |
5c1ce46f45da33acf75a7f47add811b14d58414d | aea7b59d10a72ccac35a06e6d31a508771efc5a0 | /Day 26/Factorial.py | ef2db64f9c13f7a0c6415d1424f633d62934c31c | [] | no_license | divyatejakotteti/100DaysOfCode | d52871b27146cd1b1ef2b997e93b9a96ca8ac5a9 | 3c8555b021482565f56d7fb86fa5dacb304dfd3c | refs/heads/master | 2023-02-01T10:48:19.082268 | 2020-12-21T06:34:02 | 2020-12-21T06:34:02 | 294,888,731 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 862 | py | Factorial.py | '''
Function Description
Complete the extraLongFactorials function in the editor below. It should print the result and return.
extraLongFactorials has the following parameter(s):
n: an integer
Note: Factorials of
can't be stored even in a
long long variable. Big integers must be used for such calcu... |
8de7f98263d07e74edceac005df544c95296442f | 18916212979d0a2828140449ab0a3d22ecfbc3e6 | /APE/ape/testes/avaliação 2 numero 3.py | 542b5c8b26a49fc1ee228ab78cca451322924c14 | [] | no_license | christophersousa/Primeiro-Periodo | 8e36340017d1913487385df2d08177c253818eeb | 46fd04b41f8214c7934905d8eab703cda529dec4 | refs/heads/master | 2023-03-02T00:01:31.441793 | 2021-02-11T15:29:17 | 2021-02-11T15:29:17 | 309,739,814 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | avaliação 2 numero 3.py | nome = input('Nome do empregado: ')
salario = float(input(' Salário atual: '))
reajuste = salario * 20/100
salario2 = salario + reajuste
print(f'\n empregado: {nome} \n Salario atual: {salario} \n reajuste do salarial em 20%: {reajuste} \n Salario reajustado vai ser no valor de: {salario2}')
|
b6a652cde27a3950591f0a00b78bff7bc3ebcb5c | 0d743f2efe74277d8d32fee20c510589a765dbc8 | /core/decorators.py | 4d9ef729e9cb926e23125c63c8f13ccbfb4c3241 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | anikeshkumar1052/modmail | 2b5f17638956b58caaf90f5c8b415bf60c781f17 | 178b816bc81982d6b231eb6ed2336dd4cf7062e4 | refs/heads/master | 2020-04-17T14:09:59.358395 | 2019-05-11T05:04:12 | 2019-05-11T05:04:12 | 166,646,265 | 1 | 1 | MIT | 2019-01-20T09:56:05 | 2019-01-20T09:56:04 | null | UTF-8 | Python | false | false | 938 | py | decorators.py | import functools
from discord import Embed, Color
from discord.ext import commands
def trigger_typing(func):
@functools.wraps(func)
async def wrapper(self, ctx: commands.Context, *args, **kwargs):
await ctx.trigger_typing()
return await func(self, ctx, *args, **kwargs)
return wrapper
d... |
5aa2b40a71e5afc7caac813d9d5e3183501a7273 | ab01443d0c1ec6796ec20b5d576a2d2e8b7ddd10 | /smsd3/smsd3/scripts/zhangshangtong.py | 6594d4f188363d4c7e7d1736200550ae58975f0e | [] | no_license | xbfool/smscd | ed5e056be20b7f6090204602a638ac2d878a11b4 | 6cac858cfa0634ea3b668330fdb3601f43414a58 | refs/heads/master | 2020-06-14T03:08:14.545823 | 2018-08-23T15:04:21 | 2018-08-23T15:04:21 | 75,513,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,156 | py | zhangshangtong.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
import copy
import httplib, urllib
site_settings = {}
site_settings['zhangshangtong'] = {
'host': 'pi.f3.cn',
'path': '/SendSMS.aspx',
'port': '80',
'mode': 'POST',
'sender': 'zhangshangtong',
}
config_settings = {}
config_... |
000d66f33a95c619b92f2dd618802a7452b0dbfb | f0d98c6393a953201399a96c12e1a4a0363bbd1f | /Environment.py | 86dc1f78f0ac412f505cbd7cfc053567f2b10407 | [] | no_license | SpiliosEv/SoftActorCriticVanilla3D | ec84fab7e033c544422368521639ffe1bc78b8ee | 4c00218afa2684b058bb6fa387d15a3ee94cfcea | refs/heads/main | 2023-08-07T11:15:30.333079 | 2021-10-09T20:45:45 | 2021-10-09T20:45:45 | 414,385,244 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,867 | py | Environment.py | import numpy as np
class ContinuousEnvironment(object):
def __init__(self, max_dim, drone_dim, f_Smaps, f_Dmaps, f_Sphase, f_Dphase, S_cord, D_cord, ell, rho, P_R, P_S, sigma_DSQ, sigmaSQ):
self.max_dim = max_dim
self.drone_dim = drone_dim
self.f_Smaps = f_Smaps
self.f_Dmaps = f_Dmaps
self.f_Spha... |
716746bfa52c9b0d6fd9a5f8a895bc1e39ef5e3b | e4f9c38783038002ca95b21cd6e75c2734fd350c | /pp_load_mean_pickle_multiple_4203.py | b948a148e6da0d571947cf24c3a1c9dd0561728f | [
"MIT"
] | permissive | gavin971/Monsoon-Python-Scripts | cd8bcd9619373ba5352c5934f217d7462c0db7a4 | 5c1257a89fdea5b71200ae59a8d9944804d0f256 | refs/heads/master | 2021-01-22T03:23:05.417123 | 2015-01-15T11:45:59 | 2015-01-15T11:45:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,205 | py | pp_load_mean_pickle_multiple_4203.py | """
Load multiple pp diagnostic files, aggregate by year, day etc, calcualte mean, sum etc and pickle
"""
import os, sys
import glob
import itertools
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
import numpy as np
from mpl_toolkits.basemap import Basemap
import cPickle as pickle
import iris
impo... |
7a0b5815243b0d9947f8dc530817bd49900d29be | 21fc3bc51c1d7e4fe2097f1412e25704c905cc25 | /params.py | b1f60c70d655c9c59f366057d50033ac727f6da1 | [] | no_license | varununayak/autonomous_offroading_aa228_project | 041978e0b502d1939de89ffb1a66bbbd6a2542ff | b14085ee690d99eb5bac21d5b369b147c279b6fe | refs/heads/master | 2020-09-08T10:52:35.299954 | 2019-12-06T16:46:26 | 2019-12-06T16:46:26 | 221,113,149 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | params.py | PATH_LENGTH = 100
PATH_STEP_SIZE = 1
PATH_MIN_HEIGHT = 1
PATH_MAX_HEIGHT = 5
D2GOAL_BIN_RES = 10
MIN_VEL = 1
MAX_VEL = 10
NUM_PASSES_FOR_LEARNING = 1
NUM_RANDOM_PATHS = 30
NUM_RANDOM_VELOCITY_PROFILES = 30
NUM_TRAINING_SETS = NUM_RANDOM_PATHS*NUM_RANDOM_VELOCITY_PROFILES
VELOCITY_DYNAMICS_NOISE_AMP = 1 |
9d4ce5daf74ea0d4d9fd1b79a14a0cf16ba954d9 | 6ea0a75c9ba1a7161e7ba106405196fb68749abe | /GUI/mp/pooltest.py | 7d9d2031716497fb2b99163df9f796a2c2d27263 | [] | no_license | hvnsweeting/XuppyMail | 329912790ff12ea57a1743240b33eace74ddab35 | 60f35811b60e1a94a47b8d6b89c9ce10593d7cb8 | refs/heads/master | 2021-01-01T06:18:04.386169 | 2015-12-20T11:06:26 | 2015-12-20T11:06:26 | 2,523,283 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | pooltest.py | from multiprocessing import Pool
def f(x):
return x*x
if __name__ == '__main__':
po = Pool(processes=4)
result = po.apply_async(f, [10])
print result.get(timeout=1)
print po.map(f, range(10))
|
604cfe8d712ee0b2b22c8581f3ece5e760372160 | 3c15d7ee10f2d71102f43b906141321a59c3e049 | /pk/models.py | 852e84c328695ee1ce7083bf1d88917b3658c335 | [] | no_license | bismi123/project | 0be35f15d1f8048078325453c2058de1ac898c75 | 202e33527c0d4728c6fab82ddcb0e7e1ed3317c7 | refs/heads/master | 2020-04-03T09:41:11.590000 | 2018-10-29T07:42:52 | 2018-10-29T07:42:52 | 155,170,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Customer(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE,)
address=models.CharField(max_length=10)
nationality=models.Ch... |
1f42444ea78e2b2ee20d2ac40e89633579b08d6a | c374013805d0246b5d2d3e79a3727a647451be48 | /youtube.py | df056bf41d3f417d260aab2dd6ac02e218244086 | [] | no_license | DaoyuanYang/python_automation | 50f3819d0b4d091a795862a0bc02a609ac14aebe | 1692522146c55b29a9887cc8b16e817cba1c32d9 | refs/heads/master | 2022-11-16T19:30:39.018562 | 2020-07-15T05:53:54 | 2020-07-15T05:53:54 | 276,540,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,778 | py | youtube.py | import time
from selenium import webdriver
'''
# When having private videos returns some error.
# Potentially if playlist too long to load may not exaust the list.
'''
def login(username,password):
time.sleep(2)
login_button = driver.find_element_by_xpath('/html/body/ytd-app/div/div/ytd-masthead/div[3]/div[3]... |
480b329b37bc089ca0d4d06ddaae203b9f401e3a | faf3df5ebb1b119b8cc9bafe51e06f4ae8f4d278 | /perfectparty/app/modules/event/models.py | 3f2b422645bb8eccd9f5c17dec3ccdfecdaf2b6b | [] | no_license | winston86zhu/CS348-BackEnd | b09db1af27c6e5826550bdcfb99e00705d84100d | a96acc0d4106eaeab123c9933a77634b1f63af4f | refs/heads/master | 2023-05-10T23:58:02.429990 | 2023-05-02T17:24:58 | 2023-05-02T17:24:58 | 211,599,967 | 0 | 0 | null | 2023-05-02T17:25:43 | 2019-09-29T03:50:56 | Python | UTF-8 | Python | false | false | 304 | py | models.py | from dataclasses import dataclass
@dataclass
class Event:
event_id: int
client_user_id: int
planner_user_id: int
location_id: int
institution_id: int
event_name: str
event_budget: int
planning_fee: int
start_timestamp: str
end_timestamp: str
orders: int = 0
|
1a45d7863718b699ad4b9897401b2e1745f2ecf5 | 4c3d2408f915ae6e51bd04120fb86d6c4d7b58e7 | /nlp.py | a5286aa1f664c3ceeb4b3e83a6954955cc8350cf | [] | no_license | nehalmuthu/amazon_review | 7a94aa20fb5cbfe463bcc31da897675c106da088 | b2428a6b4a455d8cf2a4ec29840785268f13e9fc | refs/heads/master | 2020-04-14T17:57:39.385546 | 2019-01-03T17:05:26 | 2019-01-03T17:05:26 | 162,865,288 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,264 | py | nlp.py | #correct
import pandas as pd
import numpy as np
from nltk.tokenize import RegexpTokenizer
import nltk
from nltk.corpus import stopwords
from nltk.tokenize import sent_tokenize,word_tokenize
import collections,re
#import naiveBayesClassifier as nb
s=pd.read_csv("train.ft.txt",sep="\n",nrows=1000)
x=s.values
y=np.zero... |
2184f4729e96569fbe31350a0b3a69c9d4fbd9f1 | c2b0fdd38291d52b9d0fc3453df78cba20cf0436 | /accounts/api/views.py | 4c4f28ba40f459e12201389db2162458ccd904e5 | [] | no_license | RicardoPizano/Denarius_Django | 03a1fb2828e268db7ee60c7aa1661355193eeb7a | 3c5b41f83cec0fd9cd137e0d2c250354beae7e6e | refs/heads/master | 2021-05-04T16:46:22.370400 | 2018-04-07T02:11:24 | 2018-04-07T02:11:24 | 120,258,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,411 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from django.views.decorators.csrf import csrf_exempt
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from accounts.models import Category, Account... |
5c1568b178b6c77cda27662e172f2029a8287127 | 759f45a1c10ba407ee35e1d8ff9fe2034af4c9df | /test1-07.py | 0edcfb9caa24bb81c45e31c68caff4a5a1c9518e | [] | no_license | qijiamin/learn-python | 4a384e25304654c96203a400bc77e5ef725fadbf | dd651202b54632ba7a17083a793b7a903c781fdc | refs/heads/master | 2020-07-09T09:02:23.615045 | 2015-06-12T10:56:01 | 2015-06-12T10:56:01 | 33,399,330 | 0 | 1 | null | 2015-04-04T08:36:42 | 2015-04-04T08:36:41 | null | GB18030 | Python | false | false | 947 | py | test1-07.py | # -*- coding:utf-8 -*-
#########学生基本信息############
#姓名:齐佳民
#学号:1403050116
#班级:通风14-1班
##############题目###############
#近似求导数
############代码#################
import math
a=input('请输入a:')
#dx=0.1
f1=(math.pow(3+0.1,a)-math.pow(3,a))/0.1
print 'f1=',f1
#dx=0.01
f2=(math.pow(3+0.01,a)-math.pow(3,a))/0.01
print 'f1=',f1,'f2... |
2dc5e0d8b934d3b425a8ec43d54b9fe281d2f510 | a2a14995c95e024644623ea26add2f27d186ea16 | /pywingui/network/ipmib.py | b3b47b40fe1e5825385894acb462c28d6b4556b6 | [
"MIT"
] | permissive | swdevbali/lit | 89db51ae912770ac4030a3c491ad775a68b95a4b | dbc01ee8e4e600a0a43e49ffd18873653cc3f7cc | refs/heads/master | 2021-01-21T00:25:50.001045 | 2013-02-16T13:52:50 | 2013-02-16T13:52:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,864 | py | ipmib.py | # ipmib.py
# Copyright (c) 2012 Maxim Kolosov
ANY_SIZE = 1
MIB_IPADDR_PRIMARY = 0x0001 # Primary ipaddr
MIB_IPADDR_DYNAMIC = 0x0004 # Dynamic ipaddr
MIB_IPADDR_DISCONNECTED = 0x0008 # Address is on disconnected interface
MIB_IPADDR_DELETED = 0x0040 # Address being deleted
MIB_IPADDR_TRANSIENT = 0x00... |
34fa46b268758092c976a76f00400bca33ebccc9 | f6c862bc0e97d35ac783f6179db35563d7c31330 | /mailhelper/mailhelper.py | 515c00a656fcbcda98dd3ca2a1bc07ec5293d79c | [] | no_license | andreaslbauer/leopardmon | 9d975bdf6da9f30a020ffc4da37d51cb53d4cdc1 | 2e7cbfbd2b0d4bfab525b1a7ef8e1af6c879be5d | refs/heads/master | 2020-05-15T13:45:23.245707 | 2019-09-29T02:44:00 | 2019-09-29T02:44:00 | 182,312,901 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 978 | py | mailhelper.py | import smtplib
# set up username and smtppassword as global variables
global smtpusername
smtpusername = None
global smtppassword
smtppassword = None
# read the username (e-mail address) and password from file
def readUsernamePassword() :
file = open("username.txt", "r")
line = file.readline()
splitLine =... |
0d8a15139690ce4dec11cd562319dd8752f0b060 | 6538e906075bf19edbe5c708b06790ccd66dbbbd | /tec/dnn/training.py | 154ae01a05c667cd017d8a05b8f4d8812aeb0895 | [] | no_license | chuber1986/tec_workshop | e874b93934de4a89ff3df38fb02bca0ccf96a067 | 2d34ef1eee1164c9d36512a89584652f798153a8 | refs/heads/master | 2021-05-10T13:14:47.400881 | 2018-01-23T09:57:59 | 2018-01-23T09:57:59 | 118,435,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,630 | py | training.py | import sys
import torch
import torch.nn.functional as f
from torch.autograd import Variable
from torchvision import datasets, transforms
from tec.dnn.architecture import ZOO
from tec.utils.plotting import TrainingPlot
from tec.utils.torch_utils import load_checkpoint, save_checkpoint
def train(model, data_loader, o... |
5cf819f8cb05cdc5305bfba9b863d64a8a89e1c1 | c4d7833efca2cc5bafee57455a67654ad58d2378 | /selections/migrations/0006_auto_20180620_1232.py | 14c4dae96cd24b4d4c24e255e8227b85c163c089 | [
"MIT"
] | permissive | UUDigitalHumanitieslab/timealign | e5ef7085df6127cf367a84d48e29d0fd9afcffe6 | 7a6e98f2023f763cba5742be097b8cb34ee7007c | refs/heads/develop | 2023-04-02T10:57:57.340044 | 2023-03-29T06:58:06 | 2023-03-29T06:58:06 | 63,778,252 | 9 | 2 | MIT | 2022-01-21T15:39:38 | 2016-07-20T12:06:36 | Python | UTF-8 | Python | false | false | 870 | py | 0006_auto_20180620_1232.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-06-20 12:32
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('selections', '0005_auto_20180423_1452'),
]
operations = ... |
25d1adf4a6eac1f8d53f18c1e17ea477ad91a3e8 | 919fa338248caf0792bcc9357518f04c125617a7 | /venv/lib/python3.8/site-packages/djangokeys/utils/modules.py | 78ba2d39303f0d8ec66132699b04a45d3b5f55be | [] | no_license | Zauree/backend | 9123d9c2285b49ead8ac00f7f4b622457edeffce | 4518129b349d4ea6722068f0b9f09a7c7c65a746 | refs/heads/main | 2023-05-08T22:09:29.457452 | 2021-05-29T04:21:10 | 2021-05-29T04:21:10 | 371,877,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 873 | py | modules.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Contains functionality related to modules.
import importlib.machinery
import os
import sys
def resolve_module_path(module_name):
""" Returns absolute filepath of Python module with a given name.
:param str module_name: qualified name used to import module
... |
6728cfccf58a7087e2eea493e4c8d77d997ee9a5 | 41e1a2ffbc560479503e56dec1a6baa4829c52bb | /findPointsInCell.py | e9fcc54175f2f05aee0ef98f627608eacebe1983 | [] | no_license | gacevedobolton/myVTKPythonLibrary | c26036e0a17ff672beb976d9e2c5f236f57c1cd0 | ce772abbbcc07e855105aed9752700e1572fa1f2 | refs/heads/master | 2021-01-16T21:17:43.586729 | 2016-01-15T16:32:53 | 2016-01-15T16:32:53 | 49,753,755 | 1 | 0 | null | 2016-01-16T01:20:56 | 2016-01-16T01:20:56 | null | UTF-8 | Python | false | false | 1,876 | py | findPointsInCell.py | #coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2012-2016 ###
### ###
### University... |
b5e80cd54b62e4eb283a34db80dba33a7d2f6f3b | a4f3b71c3030b9a6ee8bf508b50f6c02f2480c06 | /zebra/models.py | 958da835b2e3e72d1f435e7f88b0942a8d2a9cd5 | [] | no_license | vuhoang17891/zebra | 64e3fd6aadcd6b7f23dfa46d8d4ab350c6e54e85 | df1f0531afb1afa9d31d6729e49f5da796b53b37 | refs/heads/master | 2020-04-07T07:59:15.098254 | 2018-11-20T13:05:00 | 2018-11-20T13:05:00 | 158,195,925 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
# Create your models here.
class Page(models.Model):
page_title= models.CharField(max_length=1000)
page_title_2= models.CharField(max_length=100)
page_content= models.TextField(max_length=1000)
def __str__(sel... |
9ca3afbd733784b59bc47f17d51fb44abc03ccfb | d1e39fee074c306aef3e4150929c68b017edd567 | /plot.py | 05ba7af902ea31103686b2455d1bc24db7b5d868 | [] | no_license | HalfVoxel/diplomering | 15c7270791d61483bdf80dd430514431b0bef7a1 | f2f05628d93e1548531079c84508f139865b2ae4 | refs/heads/master | 2021-01-25T07:01:05.881115 | 2018-05-15T14:17:00 | 2018-05-15T14:17:00 | 93,638,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,718 | py | plot.py | #!/usr/local/bin/python3
from matplotlib import rcParams
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
rcParams['font.family'] = 'serif'
rcParams['font.serif'] = ['CMU Serif']
rcParams['font.size'] = 24
rcParams['mathtext.default'] = 'regular'
fig, ax = plt.subplots(figsize=(12,... |
8d52ab8eb94fe87aea76bca2f73e719034e9570e | a76384fb6887b4f915d2fe42e6a2d6d78f0ac99e | /inventory/common/utils.py | c539ae78c3b8345039772f903b291fa9af4bc221 | [
"MIT"
] | permissive | cnobile2012/inventory | 37c683477329808262e98233568addf85e4bb6d2 | 44a8f151652640306bd6112c9838db99f5fc5c38 | refs/heads/develop | 2023-01-24T05:58:58.553756 | 2022-11-14T00:16:32 | 2022-11-14T00:16:32 | 28,699,208 | 14 | 6 | MIT | 2021-09-20T01:17:38 | 2015-01-02T00:16:09 | Python | UTF-8 | Python | false | false | 993 | py | utils.py | # -*- coding: utf-8 -*-
#
# inventory/common/utils.py
#
"""
Global utilities
"""
__docformat__ = "restructuredtext en"
from IPy import IP
from django.conf import settings
__all__ = ('IPList', 'get_site_url',)
class IPList(list):
"""
Converts standard network address protocol to a list of valid IPs.
h... |
cd762e4247330d68bf6d400fb1438833b8afd018 | d4ac8ba4d660df318e2d8a2fada7b13e6bf69a57 | /implement_strstr.py | 5c9088c7badb493a94206c863ddff3b163654eca | [
"MIT"
] | permissive | fossilet/leetcode | 68d960e1f8da20de1838ffc5cedc20b6e5f00c8d | 4cf787c74fc339dc6aee6a0b633ca15b38ac18a1 | refs/heads/master | 2021-01-22T06:58:28.517053 | 2017-09-27T08:56:52 | 2017-09-27T08:57:57 | 23,453,977 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | implement_strstr.py | """
https://oj.leetcode.com/problems/implement-strstr/
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
"""
class Solution:
# @param haystack, a string
# @param needle, a string
# @return an integer
def strStr(self, haystac... |
0932ba8197b94fe5194031c0ca9a0cf5880f50c5 | 55d7af64ccadb17dbbbbc7519cacb24c74861f40 | /cleaner.py | 05038949d04b4fabacad1c90039a0749d4a8fe41 | [] | no_license | jjacisin/mod_4_project | 523c4d91404f4f3028afe364da38351982bd0ba6 | 44d4f14226ebc7f87891ea9c215ce81a7835839c | refs/heads/master | 2022-02-26T20:15:11.746864 | 2019-01-24T11:41:19 | 2019-01-24T11:41:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,575 | py | cleaner.py | from PIL import Image
import urllib.request
import os
import multiprocessing
import time
import random
import pandas as pd
write_lock = multiprocessing.Lock()
other = [3,8,10,11,14,15,18, 20,25,27, 28,29, 30,31]
def create_dataframe(exclude=[]):
df = pd.read_csv('books.csv',encoding="latin",header=None)
df.... |
c6435c2287592e67d35ee078bcc3ca7b09660f71 | 9a095b96a2d6117d201e4616629ce0e135ea1463 | /Compiler/MiniLISP-Compiler/ply-3.10/ply/MiniLispCompiler.py | 4b7f090aad46a24f57e8151615571ddabeb55a19 | [] | no_license | SeanCherngTW/NCU-Courses | 87302cfa62993c28d719149498963e1593101248 | 4bf33e8faa32301ffab3a84d0a8725935dfaff1b | refs/heads/master | 2018-09-19T02:40:10.635398 | 2018-06-18T13:34:24 | 2018-06-18T13:34:24 | 119,238,784 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,827 | py | MiniLispCompiler.py | # -----------------------------------------------------------------------------
# MiniLispCompiler.py
#
# A Mini LISP Compiler.
# -----------------------------------------------------------------------------
reserved = {
'if' : 'IF',
'then' : 'THEN',
'else' : 'ELSE',
'while' : 'WHILE',
'defin... |
c7e48eac1c8a24ffb72b181c4da52ea80f5adb0a | f36d96489e796a82fbadd76dc5cb24db74310483 | /dice_set.py | a47426c8dbfd724188d42ba3034a9b369d19e09e | [] | no_license | UtkrishtDhankar/DiceParser | 54784346c4c64d5e1e9ca968a4fe9df291eb1e3e | ba248a362377b6a1337994c7f005a9c9db710b57 | refs/heads/master | 2021-01-24T18:24:46.706862 | 2017-03-15T13:34:15 | 2017-03-15T13:34:15 | 84,423,303 | 0 | 0 | null | 2017-03-09T09:27:37 | 2017-03-09T09:27:37 | null | UTF-8 | Python | false | false | 1,967 | py | dice_set.py | from dice import Dice
class ContainerEmptyError(Exception):
"""
Raised whenever an operation is attempted on an empty container object
which should only be attempted when the container is not empty
"""
pass
class DiceSet:
"""
A pool of dice. That can be rolled.
"""
def __init__(... |
ec6911964efd85dbd1a68ad63d368820ea9ec2d0 | 4fb4e17c55521e0017b8cb18dc5f7348cb2cf630 | /euler/helper.py | a0dda39d1c1f8ace0379caf7ceea89be8c093913 | [] | no_license | yejianye/programming-problems | d061ef729544cde67dd57a8881d6ed04676cd0e6 | 2336e2763cfa988cd4a4e375eddfd676e6c85166 | refs/heads/master | 2020-06-06T10:48:14.799776 | 2012-07-20T07:47:02 | 2012-07-20T07:47:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | helper.py | plusStep = 10
plusThreshold = 10 ** plusStep
def bigMul(a, b):
pass
def bigPlus(a, b):
(first, second) = len(a) > len(b) and (a,b) or (b,a)
first = [int(first[(x > plusStep and x - plusStep or 0) : x]) for x in range(len(first), 0, -plusStep)]
second = [int(second[(x > plusStep and x - plusStep or 0) : x]) for x... |
900423a91f975888dcaaabf31ac29924a7c0229f | 6c859ec78d61edcc7d35032893c30465644ed61d | /2020_2/SSTable.py | c36cfd9cc478eee6fb2b9a3d0a8ab217d63a86d5 | [] | no_license | Dianaaaa/summer_camp_coding | 2ab98e71a35187f8270d39f75981e5af5a8e7ead | f3e27406da30e2e677a7a92a6d5c7dd369b871f7 | refs/heads/main | 2023-04-03T22:40:40.672682 | 2021-03-22T04:58:39 | 2021-03-22T04:58:39 | 348,346,045 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py | SSTable.py | class SSTable:
def __init__(self, time, pairs):
self.time = time
self.pairs = pairs
def printPairs(self):
for pair in self.pairs:
print("("+str(pair.key)+", "+pair.value+")")
def toString(self):
result = ""
for pair in self.pairs:
result ... |
8c13a390ffeb4310b13ae7b669a66e1db0395790 | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_which.py | 78c84da56ed9cef81900e8508ee1ca0af3b4e9f0 | [
"Apache-2.0"
] | permissive | h2oai/h2o-3 | 919019a8f297eec676011a9cfd2cc2d97891ce14 | d817ab90c8c47f6787604a0b9639b66234158228 | refs/heads/master | 2023-08-17T18:50:17.732191 | 2023-08-17T16:44:42 | 2023-08-17T16:44:42 | 17,371,412 | 6,872 | 2,345 | Apache-2.0 | 2023-09-14T18:05:40 | 2014-03-03T16:08:07 | Jupyter Notebook | UTF-8 | Python | false | false | 674 | py | pyunit_h2oH2OFrame_which.py | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.utils.typechecks import assert_is_type
import numpy as np
from h2o.frame import H2OFrame
def h2o_H2OFrame_which():
"""
Python API test: h2o.frame.H2OFrame.which()
"""
python_lists = np.random.randint(1,5, (100,... |
1964fc9432017746173b18e0aa3c90d337ee3d5a | 85c8f4f54fbbc68970d0fa35145060671d3c327d | /algorithm/구현/10799.py | 299b6c111e8c97148e4cfd3fdd8b25149f0bedcf | [] | no_license | dongyeopca/python_algorithm | cf3c3b747277a30d4f82e21f2923e0fe63076140 | 36d1bc56f984bae27fd6820fee47350b55ddc2b4 | refs/heads/master | 2023-08-29T11:12:42.967297 | 2021-11-04T07:08:47 | 2021-11-04T07:08:47 | 415,252,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,019 | py | 10799.py | # import sys
# input = sys.stdin.readline()
# s = input
# count=list()
# answer =0
# stack = list()
# for i in s:
# if stack:
# if stack[-1]=="(" and i==")":
# count.pop()
# stack.append(i)
# for k in range(len(count)):
# count[k]+=1
# elif stack[-... |