blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aefe209940bc4b34c6bc1de86f72876bf4394890 | 4838552992476399d0452a92d0a38aa9b8b29c63 | /books/serializers.py | 9bcac01e22850c80eaea8102c4e89f7fa859d736 | [] | no_license | sannycand/books | 16cee4d0f8c1a1a4a52108fd0403c258620e146a | 593d77ccd1f4b68be0a5ed44adb495c034bea2a1 | refs/heads/develop | 2020-04-05T13:31:09.296128 | 2017-06-20T01:59:53 | 2017-06-20T01:59:53 | 94,852,739 | 0 | 0 | null | 2017-06-20T05:23:40 | 2017-06-20T05:23:40 | null | UTF-8 | Python | false | false | 412 | py | from rest_framework import serializers
from .models import Book, Review
class BookSerializer(serializers.ModelSerializer):
""" book serializer
"""
reviews = serializers.SerializerMethodField()
class Meta:
model = Book
fields = ('__all__')
def get_reviews(self, instance):
... | [
"earvin.gemenez@gmail.com"
] | earvin.gemenez@gmail.com |
0577c97f73a4e81d8f5fac967b35ececb87081d4 | c692ac4a34e8a1f44f6c4b9891a058188a647018 | /artificial_intelligence.py | 16dae3a4aa9bd025cb63024d45a421634e71ea07 | [] | no_license | maedwards3/RPSLS | e8d35d9ad37a489f447100be2c0783605a817e0f | f42a72e288b0c98e5214554097d5855b8839108f | refs/heads/main | 2023-05-01T16:08:51.242753 | 2021-05-20T13:38:42 | 2021-05-20T13:38:42 | 368,248,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | import random
import time
from player import Player
class AI(Player):
def __init__(self):
super().__init__()
def gesture_selection(self):
time.sleep(2)
self.chosen_gesture = random.choice(self.list_of_gestures)
| [
"michael.edwards.4108@gmail.com"
] | michael.edwards.4108@gmail.com |
58a1f2a8ab8f8a387b06c04d0d4b21363890c0ac | 5c55cfb335e21647dc7946a470ca28729c91d427 | /python_crpto/TurningGrill.py | e12e787a8863639ccba1ea686f4a2d5e1178d3af | [] | no_license | famedinap/Cripto-App | d1c7e56c9050ff7ac292d2c87fa1b112f125cafb | 25aaf3be89b163b9845a748256c5c0936c248b59 | refs/heads/master | 2023-06-17T10:52:40.221579 | 2021-07-07T20:31:00 | 2021-07-07T20:31:00 | 383,915,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,417 | py | def genmatriz(tamano):
matriz = [[0 for x in range(tamano)]for y in range(tamano)]
for i in range(tamano):
for j in range(tamano):
matriz[i][j]=i+j+1+(i*(tamano-1))
return matriz
def posicion(p1,matriz,tamano):
a,b=0,0
for i in range(tamano):
for j in ran... | [
"famedinap@unal.edu.co"
] | famedinap@unal.edu.co |
73b721e113d7cf0c9ae2c983f9167a0f7dee2a74 | 5e0318e40d2ecb1af07f2abf36d26979a0848255 | /temperature.py | 2675d212f2b4554212e82cdaac9967a9d3c65161 | [] | no_license | harshvs99/iotMW | 2bf312d84cb23cb14e891216154fee80f8c96022 | 13adebc78a23ae33c4e49cbbf9f73bb11b951637 | refs/heads/main | 2023-06-11T11:41:01.088146 | 2021-07-04T21:04:39 | 2021-07-04T21:04:39 | 382,889,580 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,471 | py | import spi as spi
import configuration as config
import time
SPI=spi.SPI()
class TemperatureSensor():
def configure():
pass
def getRawTemperature():
pass
def updateAdress():
pass
def stop():
pass
class TSEV0108L39(TemperatureSensor):
def __init__(self):
self.isSPIconfigure = False
self.temp={"sens... | [
"noreply@github.com"
] | noreply@github.com |
d60c457b885b32b00ceac856cfe9b8c0ec25fde8 | bc367592d99721a8d9d1c1440ebfaaefac273d8c | /src/menu_constants.py | 0591935a8e7dd9e3c7b7b183e619a046891ce724 | [] | no_license | Amerikranian/Finger-Panic-Python-Version | fdc457413a8e8db944151a243ecb8d2f54c6615c | be38ba695d40b81049d0557929ec6921a4074e56 | refs/heads/master | 2022-10-12T05:03:26.634738 | 2020-06-15T21:35:30 | 2020-06-15T21:35:30 | 270,489,419 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 112 | py | """Contains constants specific to the menu
Will be imported as men_c
"""
MENU_ITEM_TTS = 0
MENU_ITEM_SOUND = 1 | [
"olegjpittman@gmail.com"
] | olegjpittman@gmail.com |
1a46cbfc9df402f268c96e648ec29920d56b4f7d | 3cbffdd5b040ac0eb7b85d5d8c125cc0f62724ac | /ArbolB.py | 416d5c32f519ae6d378530a6d5f3e535dc08c573 | [] | no_license | Elchuzo/ProyectoJunio2017_201404130 | ecc4f85424c05ba3a32c7545c20a0f0f2290d37d | 766815722e0c112a8d7dbf560a08a8c9659857c5 | refs/heads/master | 2020-08-30T10:29:20.887515 | 2017-07-18T06:21:48 | 2017-07-18T06:21:48 | 94,389,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,274 | py | import gc
from graphviz import Digraph
#clase para pruebas
class Dato(object):
def __init__(self,numero,x):
self.x=x
self.numero=numero
def __str__(self):
a = ' x: ' + str(self.x)
b = ' n: ' + str(self.numero)
cadena = a + "\\n" + b
return cadena
... | [
"oagmoa@gmail.com"
] | oagmoa@gmail.com |
a55fe4dd1f941d86ce5e6712ea9c1f329a4cebd9 | 8eda0790660c19daac0b533f9005a851f34d4413 | /fuel_plugin/ostf_adapter/storage/storage_utils.py | 62ff41c417a2e67b6d024aea79c3fde1c8487571 | [] | no_license | DmitryIakunchikov/fuel-ostf-tests | 6c07e1580ab38d6ae4bc20fe9e3cfa9f93b3c606 | a941581af3a92678d02d70ed2edc19d8f2c40929 | refs/heads/master | 2021-01-16T12:16:22.856403 | 2013-10-22T10:41:14 | 2013-10-22T10:41:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | # Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | [
"tleontovich@mirantis.com"
] | tleontovich@mirantis.com |
7a74b09d2af23b609529ac816704e8a2d47f99c9 | efae79bc4b6771191c612b121a420f898356ae77 | /tests/_support/py_conf/fabfile.py | 502c718f919618cab02d64fcbad3831bad9e585f | [
"BSD-2-Clause"
] | permissive | WinstonN/fabric | bd0d7c432d22501022495663a1ee3a385c9b045a | 34edfe4a1cc9e3d72c3cc41490673db29afe7bbb | refs/heads/2.0 | 2020-12-22T17:03:27.644562 | 2020-01-10T21:20:58 | 2020-01-10T21:20:58 | 236,866,877 | 0 | 0 | BSD-2-Clause | 2020-01-30T05:06:49 | 2020-01-28T23:40:23 | null | UTF-8 | Python | true | false | 92 | py | from invoke import task
@task
def expect_conf_value(c):
assert c.it_came_from == "py"
| [
"jeff@bitprophet.org"
] | jeff@bitprophet.org |
3b4b6347e2535618b4e084f8032df2acc602fed0 | e2de3f6fe4373f1d98b67af61dd558a813250d54 | /Algorithm/baekjoon/11726_2xn타일링.py | b6bc38b1ab6cf1a8f42e411b2e97006abbff0e4d | [] | no_license | Hansung-Lee/TIL | 3fd6d48427a8b24f7889116297143855d493535b | c24ebab8b631f5c1b835fdc8bd036acbebc8d187 | refs/heads/master | 2020-04-14T11:18:54.035863 | 2019-04-05T07:26:55 | 2019-04-05T07:26:55 | 163,810,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | N = int(input())
li = [0,1,2,3]
for n in range(N-3):
li.append(li[-1] + li[-2])
print(li[N]%10007) | [
"ajtwlsgkst@naver.com"
] | ajtwlsgkst@naver.com |
409426e32e50759aa74d316fd98e9be4b5f8b9e9 | 49701b6719f8d6663dd63aa83a71ec23a6c6a4e1 | /Leetcode/index.py | 69c57d3081d01411e7e338158e0520c36fa21c1c | [] | no_license | ashwini-cm-au9/DS-and-Algo-with-Python | 6bb9c729f4e9e6900e41f2e9a85595c85aff0a79 | 2a55b63cb755c7ab25e76107b5031ce51e384abd | refs/heads/master | 2022-12-29T02:23:50.727684 | 2020-10-13T17:06:14 | 2020-10-13T17:06:14 | 289,513,684 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 587 | py | class Solution:
def searchInsert(self, nums, target):
if target in nums:
return nums.index(target)
else:
nums.append(target)
nums.sort()
return nums.index(target)
if __name__ == "__main__":
s=Solution()
arr=[1,3,5,6]
target=2
print(s.se... | [
"ashwinichuri93@gmail.com"
] | ashwinichuri93@gmail.com |
7a4946bf049ebf1ed6ee4360fa21fb2fa3271c02 | fe19d2fac4580d463132e61509bd6e3cc2cf958d | /toontown/coghq/MoleFieldBase.py | 508ffbac0ff0495f22fc1b06a212904c3fadf747 | [] | no_license | t00nt0wn1dk/c0d3 | 3e6db6dd42c3aa36ad77709cf9016176a3f3a44f | 7de105d7f3de0f8704b020e32fd063ee2fad8d0d | refs/heads/master | 2021-01-01T16:00:15.367822 | 2015-03-21T21:25:52 | 2015-03-21T21:25:55 | 32,647,654 | 3 | 5 | null | null | null | null | UTF-8 | Python | false | false | 3,950 | py | # 2013.08.22 22:19:18 Pacific Daylight Time
# Embedded file name: toontown.coghq.MoleFieldBase
import random
HILL_MOLE = 0
HILL_BOMB = 1
HILL_WHACKED = 2
HILL_COGWHACKED = 3
class MoleFieldBase():
__module__ = __name__
WHACKED = 1
MoveUpTimeMax = 1
MoveUpTimeMultiplier = 0.95
MoveUpTimeMin = 0.5
... | [
"anonymoustoontown@gmail.com"
] | anonymoustoontown@gmail.com |
114635dbdd614a124e3ed8f049bf0f44250abed7 | 38258a7dd9acbfb7adf72983015de68a948a4826 | /B_6000~/B_6749.py | 679d26eb42d51d74c4f4a7e4ff51b701aad91d01 | [] | no_license | kangsm0903/Algorithm | 13a7fe5729039a1d0ce91a574c4755a8a92fb02b | 7d713d1c9e2e4dc30141d4f409ac1430a357065b | refs/heads/master | 2022-10-04T00:33:49.247977 | 2022-09-26T12:51:16 | 2022-09-26T12:51:16 | 219,265,010 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 47 | py | X = int(input())
Y = int(input())
print(2*Y-X) | [
"kangsm0903@naver.com"
] | kangsm0903@naver.com |
d92958e24ff62b6981e69327f0d73818051e91d6 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_135/3035.py | cf3cfe0ebd3b61e847863f968039e9fe32db8586 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 656 | py | #! /usr/bin/env python
T = int(raw_input())
t = 1
while t <= T:
a = int(raw_input())
i = 0
while i < a-1:
raw_input()
i += 1
r1 = set(raw_input().split(" "))
while i < 3:
raw_input()
i += 1
a = int(raw_input())
i = 0
while i < a-1:
raw_input()
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
451ab1594b11d8928c1109f60c4d88a1d49bd455 | 1ba591c4305076f13c9e858eb0505ce1ce5aa45d | /app/database/crud/podcast.py | 47eeb6e0892edec975e6688d19ef5274879623a7 | [] | no_license | shrikantnarayankar15/FastApi-Audio-Rest-api | 99adfd29c270a782c244d1fa9602500ceccc6e28 | b23cbe009ea8936fceddae3f8ddbf84050c759c2 | refs/heads/master | 2023-04-21T10:57:11.542229 | 2021-05-16T09:04:18 | 2021-05-16T09:04:18 | 367,822,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,310 | py | from sqlalchemy.orm.session import Session
from .. import models
from fastapi import HTTPException, status
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
class Podcast:
def __init__(self, db: Session):
self.db = db
def create(self, request):
try:
result = request.di... | [
"k1nnn18@gmail.com"
] | k1nnn18@gmail.com |
d4d403b01e00e44d6866bca55752f5509a8b15f8 | 748b8c66d8d9f77e047033e07142328ea6939138 | /utils/create-captions.py | 3a8f8271fec5c0ed4ec02b5ca917f56240ba6ce5 | [
"Apache-2.0"
] | permissive | nakamura196/neural-neighbors | 68f073511f10fb2df4c9efb2e504d2f9fb3b8455 | 277cb6e6a2102ad9d850c4397ca454ecb347dd1b | refs/heads/master | 2022-01-24T15:16:49.170431 | 2019-08-11T14:37:23 | 2019-08-11T14:37:23 | 201,567,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | import glob, random, os, json
files = glob.glob(
"assets/images/thumbs/*.jpg")
captions = {}
for file in files:
filename = file.split("/")[-1].split(".")[0]
captions[filename] = filename
fw = open("data/full-captions.json", 'w')
json.dump(captions, fw, ensure_ascii=False, indent=4,
sort_keys=True,... | [
"na.kamura.1263@gmail.com"
] | na.kamura.1263@gmail.com |
23fe4055ae49646cdc77cdb973d2a2088cc3dcf6 | f85ba7bcd9fc709a2ebfd2fc55e6cd9972fb13b3 | /src/c2/ct-to-g.py | f0098af6e9747e99bc0a5cf5447af1c0ee5c401d | [] | no_license | taibon38/python_sample | 8dc5a84bc80d10af307bc946a0af5a374813741a | 520142da8f9d7657c57633c14c77a0da5b14ba2c | refs/heads/master | 2022-12-20T14:33:56.289124 | 2020-10-16T14:38:13 | 2020-10-16T14:38:13 | 301,029,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | # カラットからグラムに変換する
# 変換の元になる値
per_ct = 0.2
# ユーザーから入力を得る
user = input("何カラットですか?")
# 浮動小数点数に変換する
ct = float(user)
# 計算する
g = ct * per_ct
# 結果を表示
desc = "{0}カラット = {1}グラム".format(ct, g)
print(desc)
p | [
"tai.sato@IT020A13039.local"
] | tai.sato@IT020A13039.local |
2ae90b6dffc7987765ffacf37be52a03f335f474 | 971e0efcc68b8f7cfb1040c38008426f7bcf9d2e | /tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingMedian_Seasonal_WeekOfYear_SVR.py | 87afffb284e8c95e2d354f9e473c99b687fc4781 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | antoinecarme/pyaf | a105d172c2e7544f8d580d75f28b751351dd83b6 | b12db77cb3fa9292e774b2b33db8ce732647c35e | refs/heads/master | 2023-09-01T09:30:59.967219 | 2023-07-28T20:15:53 | 2023-07-28T20:15:53 | 70,790,978 | 457 | 77 | BSD-3-Clause | 2023-03-08T21:45:40 | 2016-10-13T09:30:30 | Python | UTF-8 | Python | false | false | 162 | py | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Fisher'] , ['MovingMedian'] , ['Seasonal_WeekOfYear'] , ['SVR'] ); | [
"antoine.carme@laposte.net"
] | antoine.carme@laposte.net |
a1ab7c61c5cea072957a5232d94838417434c5da | 499011740f23638198fa3550ae3b1903166e5323 | /Chapter6/frozenlake_q_learning.py | 972a0fb720520c7320bea728483e33e482498642 | [] | no_license | yudhiesh/Deep-Reinforcement-Learning-Hands-On | f11e8915cf7c8b202bbd1c4bed0d5c80799ff4a5 | 0e4a8a6b98c0e405a1fa6ea87ef9a3b0f5ea6662 | refs/heads/main | 2023-02-10T10:10:13.741075 | 2021-01-09T05:50:31 | 2021-01-09T05:50:31 | 325,590,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,452 | py | import gym
import collections
from tensorboardX import SummaryWriter
ENV_NAME = "FrozenLake-v0"
GAMMA = 0.9
ALPHA = 0.2
TEST_EPISODES = 20
class Agent:
def __init__(self):
self.env = gym.make(ENV_NAME)
self.state = self.env.reset()
self.values = collections.defaultdict(float)
def sam... | [
"yudhiesh1997@gmail.com"
] | yudhiesh1997@gmail.com |
663d72eb1bc9a2eb0d869cc982a772be8d1d7e39 | 7d4db2a1f6dc20e2772a23a67befea7d5ee83555 | /Blog/django_project/django_project/urls.py | c0f8de4e4e6ffc5b0472751091b7ba843f30e0cc | [] | no_license | Dip-Baidya/Django_Blog_Project | d6ceaf699a66772f4d5c98a4424999d46f73e054 | 8ab82bf667b34d13cfee5151b9570a7cd402b1dd | refs/heads/master | 2020-08-04T01:22:30.947707 | 2019-12-19T20:26:09 | 2019-12-19T20:26:09 | 211,952,056 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,230 | py | """django_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | [
"noreply@github.com"
] | noreply@github.com |
d69163d53f2a278126dae740f78392f90e009ba1 | 17713d586f680821759b0bba8e25046c2fa6a90b | /build/turtlebot3/turtlebot3_example/cmake/turtlebot3_example-genmsg-context.py | 1b3c982621275c8b2af4189ce01332d11ee1790b | [] | no_license | Saipriyavk/Delivery-Robot | fb899a8330815b02de118275dc6d7a1fad70bc8e | 9255791e683b32573227a1877b5fb92f000dfca2 | refs/heads/master | 2023-06-14T16:32:25.444170 | 2021-07-19T21:43:13 | 2021-07-19T21:43:13 | 387,573,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,339 | py | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/saipriya/projects_ai_cse/devel/share/turtlebot3_example/msg/Turtlebot3Action.msg;/home/saipriya/projects_ai_cse/devel/share/turtlebot3_example/msg/Turtlebot3ActionGoal.msg;/home/saipriya/projects_ai_cse/devel/share/turtlebot3_example/msg/Turtleb... | [
"saipriya.vk31@gmail.com"
] | saipriya.vk31@gmail.com |
8d86da40269921bffa1c814385522d20c36cf4da | 28b0928057e96da28b268cbe1fe64ede3a2a20c5 | /addons/edi_product/models/edi_product_record.py | eeff16a7b54cf541e2c862d2bf6087f2e3be2e98 | [] | no_license | sasakuma/odoo-edi | 370061221e09f7ade1a7753ff237ebec24b55694 | 31a0ff761be3984adc5d6ceaabe781801715ad14 | refs/heads/master | 2020-03-29T18:24:55.576689 | 2018-10-29T04:50:51 | 2018-10-29T04:50:51 | 150,211,179 | 0 | 0 | null | 2018-10-29T04:50:52 | 2018-09-25T05:14:48 | Python | UTF-8 | Python | false | false | 2,829 | py | """EDI product records"""
from odoo import api, fields, models
class EdiDocument(models.Model):
"""Extend ``edi.document`` to include EDI product records"""
_inherit = 'edi.document'
product_ids = fields.One2many('edi.product.record', 'doc_id',
string="Products")
i... | [
"mbrown@fensystems.co.uk"
] | mbrown@fensystems.co.uk |
a01fac3aa0ec2d33e854eac1c3973308a9e2b23e | 8c0b804f1cc8cbf2f8788727df22a2cc149f7b5c | /gala/integrate/core.py | d7150e9b565f316c3bb7011aa15040378aa0d4e6 | [
"MIT"
] | permissive | adrn/gala | 579cc5a4ecb22df118e1c8a2322a46e935825054 | f62e1a6ae7a8466a4db5c8407471b524cf085637 | refs/heads/main | 2023-09-04T11:42:07.278388 | 2023-08-18T18:04:35 | 2023-08-18T18:04:35 | 17,577,779 | 115 | 89 | MIT | 2023-09-05T11:40:10 | 2014-03-10T00:56:18 | Python | UTF-8 | Python | false | false | 4,338 | py | """ Base class for integrators. """
# Third-party
import numpy as np
# This project
from gala.units import UnitSystem, DimensionlessUnitSystem
__all__ = ["Integrator"]
class Integrator(object):
def __init__(
self,
func,
func_args=(),
func_units=None,
progress=False,
... | [
"adrian.prw@gmail.com"
] | adrian.prw@gmail.com |
a9315221e8abc26a56807af8e4c00f8aadfd0519 | 6c9a3d3ff71adb17b5be62e694a91718c1bc09c3 | /atcoder/contests/abs/tasks/practice_1/main.py | 4631c22d60b6679f86afb159117dd3d220dd2186 | [] | no_license | aksh-t/programing-contest | 0085a484c824229b1e5a41cca29b13af39bfe65b | e4ac894e3228e659fdf2502c447dc3c75b9583e5 | refs/heads/master | 2021-03-26T15:09:48.306068 | 2020-05-17T17:22:26 | 2020-05-17T17:22:26 | 247,715,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | # PracticeA - Welcome to AtCoder
# https://atcoder.jp/contests/abs/tasks/practice_1
a = int(input())
b, c = map(int, input().split())
s = input()
print(str(a + b + c) + " " + s)
| [
"tanno.ao@gmail.com"
] | tanno.ao@gmail.com |
e9a75695d2bf750a8c813010462c6b37b028318b | b3ed5638b6065e17b6f7ca8092527a909d4a49af | /train_predict_script.py | f56c8bb7604140933915c0b81a69e59ceae7e7de | [] | no_license | gurinvlad/electricity_forecast | 7fd77eeb44754b435244013952858e7aba743be6 | b3f7879be76ed392b3e376d92817de3988cdb936 | refs/heads/master | 2023-05-26T10:48:16.646168 | 2019-04-09T13:48:47 | 2019-04-09T13:48:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,062 | py | from nn_architecture import NeuralNetworks
from extract_features import ExtractFeatures
from nearest_neighbors_reg import NeighborsRegression
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.preprocessing import OneHotEncoder
from statsmodels.tsa.stattools import ccf, acf
from statsmodels.tsa... | [
"noreply@github.com"
] | noreply@github.com |
00c78f679af941374fae9dcd67056e5b899fed30 | 4f34c3407476c531987d313964af1fae76b9e36f | /c2dh_nerd/ner/mapping.py | 6200f72392d3f9ed6f083ae61f2231d500c6e325 | [
"MIT"
] | permissive | C2DH/c2dh_nerd | e644cd655c46306e2f0606cb2bedf2dada6771c0 | b0ff7649aa3d1e98c217c518d8f9a3d75870f6c0 | refs/heads/master | 2021-06-23T05:39:22.846591 | 2019-12-19T14:03:02 | 2019-12-19T14:03:02 | 195,787,034 | 0 | 0 | MIT | 2021-02-26T02:31:03 | 2019-07-08T10:09:23 | Python | UTF-8 | Python | false | false | 1,604 | py | # Mapping to three standard wikidata classes: ORG, PER, LOC
# https://github.com/explosion/spaCy/blob/719a15f23d76f219fd303e94a8384c50c9fd61e2/spacy/glossary.py#L282-L309
ONTONOTES_TO_WIKIPEDIA_LABEL_MAPPING = {
"PERSON": "PER", # "People, including fictional",
"NORP": "ORG", # "Nationalities or religious or politi... | [
"theorm@gmail.com"
] | theorm@gmail.com |
b56943194cc8eb8873c0f54ac94792638de5afe0 | 7391d18f36c691823ddc3f989f32cef5d979771b | /clock-main/helpers.py | fada5c40cc9626314fe64482f12a932f6cc68a04 | [
"MIT"
] | permissive | shakor29/covid-tracker | 14c88486570bb0bc0243bbf2860e7cc3a77ec0bc | bd6032e6191cb3feedd7d4f1b454662bae11a496 | refs/heads/main | 2023-05-07T04:12:22.450565 | 2021-05-21T00:35:38 | 2021-05-21T00:35:38 | 369,372,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,156 | py | from config import (
engine, covid_api,
weather_api_key,
news_api_key
)
import requests, time
#text-to-speech
def makeAnnouncement(message):
try:
print(f"Making an announcement for {message}")
engine.say(message)
engine.runAndWait()
except Exception as e:
print(e)
... | [
"noreply@github.com"
] | noreply@github.com |
8edfb3b6b4e1905f4abbf7699f990b3d6fe9d6c4 | 2662ec80bc48697b3041fdf00a3afcb55c531b7b | /networks/backbones/imagenet64x64_mobilenetv2.py | f5de4c359a8320f1cb457988820c5b77038bc1b2 | [] | no_license | TonyPod/Two-CILs | b3ae7b3298688d714fdb7378864b33a37f993313 | 0bcd19e52dddafc8fb1b4043db8a799a258c60d9 | refs/heads/main | 2023-06-01T04:49:40.146258 | 2021-06-23T08:35:33 | 2021-06-23T08:35:33 | 357,801,755 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 9,454 | py | # -*- coding:utf-8 -*-
"""
@time: 3/3/21 10:05 PM
@author: Chen He
@site:
@file: imagenet64x64_mobilenetv2.py
@description:
"""
from tensorflow.python.keras import backend, Model, layers, regularizers
def _make_divisible(v, divisor, min_value=None):
if min_value is None:
min_value = divisor
... | [
"843678719@qq.com"
] | 843678719@qq.com |
72a6a65ffdd3d53ac67077c757391b96952730ee | 1885c1cfdc131c4af427aef572e997b29e4cd5b4 | /venv/Scripts/easy_install-script.py | a071983052458059b7e9bbd4f01e34930cbc2197 | [] | no_license | EduardoIxen/Basilisk | fda444710a70ce35ef7a45b874ae1452f4243a03 | b61630aa5746ed5402f455a8eb6969dd9d6ad732 | refs/heads/master | 2023-04-22T16:24:54.110227 | 2021-01-19T18:45:15 | 2021-01-19T18:45:15 | 306,260,806 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | #!C:\Users\Dell\Documents\Python\Basilisk\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\... | [
"tomas-1539@hotmail.com"
] | tomas-1539@hotmail.com |
df8ba9bef4772f8a7f370c8dd7dd08a0986824c6 | a9ed9cc41f2c40a8ccf47b6d4889d11d3aaee710 | /UNM/CS527/Project0/addition.py | 79efd878ce8ce99cfcdd7d07626f146e720abf3e | [] | no_license | Letthemknow/school | 5e7198756a9293bab2fac3e3641350f619857290 | 77022746d23837f91c67b2e47a427907e6eafac3 | refs/heads/master | 2023-01-19T12:53:06.224385 | 2020-12-02T01:24:30 | 2020-12-02T01:24:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | # addition.py
# -----------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
# ... | [
"wgalczak@gmail.com"
] | wgalczak@gmail.com |
107d6599aa53e636b1012c931785822d483c5a95 | 7e3777d0250afff8080e44e78c2cc74ed40ba8ae | /read_google_v1.py | 85a82bf68dcd8694c32d2832fabb8268972aa9a9 | [] | no_license | mannurulz/Machine_Learning | de7e76b5f61d869f614debc033be4f7d0929a652 | 9641a4f5ca83d69d99b64292b31377177ba1497a | refs/heads/master | 2021-01-11T15:09:20.079303 | 2021-01-01T10:50:25 | 2021-01-01T10:50:25 | 80,301,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 82 | py | import pandas as pd
import quandl
df = quandl.get('WIKI/GOOGL')
print(df.head())
| [
"mannurulz@gmail.com"
] | mannurulz@gmail.com |
496876d9c91aed228cefe6c33bfacb7f2d5652b0 | c1af5176737a9670ff502614e4a671dd0f9580a4 | /backend/models.py | 18a1b56b9b0b84f7b0d435e6be398e9b75ddeae5 | [] | no_license | chrisshino/shopify-de-internship | bf84d4f2f3c3c6276e91c07882a3501fa7fd18ed | 4f458cc157a3875d8d8680180139aa7123735518 | refs/heads/main | 2023-08-07T01:41:15.339605 | 2021-10-01T02:45:35 | 2021-10-01T02:45:35 | 406,147,270 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,102 | py | from ext import db
"""
class User:
id:integer
username:string
email:string
password:string
"""
class User(db.Model):
id=db.Column(db.Integer, primary_key=True)
username=db.Column(db.String(25), nullable=False, unique=True)
email=db.Column(db.String(80), nullable=False, unique=False)
password=db.Column... | [
"chris.shino@hotmail.com"
] | chris.shino@hotmail.com |
4dea48ded089036df51b57008a85c8c9e308c501 | c760024f0d2d994415b02a0f25cf433b97b6b03c | /adv_board/migrations/0016_auto_20190326_0119.py | 60170b4e6f125d9832c1a79d38c3a2c296e49996 | [] | no_license | StasOverflow/adv_platform | 24da6045ba8ddc43a1f6888e502b2dc729a0593c | 26d363e8978b718ad8789e44cc6d59f03994c600 | refs/heads/master | 2022-12-15T08:47:01.168769 | 2019-03-27T21:46:54 | 2019-03-27T21:46:54 | 177,461,546 | 0 | 0 | null | 2022-12-08T04:54:33 | 2019-03-24T19:49:59 | Python | UTF-8 | Python | false | false | 389 | py | # Generated by Django 2.1.7 on 2019-03-26 01:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('adv_board', '0015_auto_20190326_0117'),
]
operations = [
migrations.AlterField(
model_name='imagepath',
name='path',... | [
"vladimir.alexeevich.morrowind@gmail.com"
] | vladimir.alexeevich.morrowind@gmail.com |
6a4b0552b744dec84088346b499869e5c6e2f442 | 284b88b3ff07430e17c04503f646db50677f627b | /Algorithm_w_Python/breakingRecords/breakin.py | bcea1259a3ac5551c57727e3d6f685001859b3ce | [] | no_license | ybgirgin3/hackerrank-solutions | ae61c27173c24c920f6e002a12a1acd20928cf59 | 58c4f62585d115eff3e1a43595d6a8375f185696 | refs/heads/master | 2023-05-27T11:32:06.099639 | 2021-06-13T18:12:22 | 2021-06-13T18:12:22 | 280,741,585 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,038 | py | #!/usr/bin/python3
### çalışmıyor aq
import math
import os
import random
import re
import sys
import numpy as np
np.set_printoptions(suppress=True)
# Complete the breakingRecords function below.
def breakingRecords(scores):
# n tane sayı girilecek
# girilen sayıların max ve min terimlerinin
# hangi inde... | [
"ybgirgin3@gmail.com"
] | ybgirgin3@gmail.com |
fc7015ef5ce271e4d0aa090d7a4ab554dc4c3a1d | f266bafc8ca1fb81b2d1d0df8e418e2dd23dc8f1 | /src/data_loader.py | 7ed592b74ae935ae0235a27052aefdd0e49222bf | [] | no_license | jayantrane/Crowd-Count-Alert-System | 12c6b4ea18114b89b2b7f272d478e1bbb7ac53ed | 33083ae1d3dd50372fba2713add024cd5a0d2bb8 | refs/heads/master | 2022-12-04T15:56:51.505700 | 2018-10-23T04:50:06 | 2018-10-23T04:50:06 | 150,745,679 | 3 | 0 | null | 2022-12-02T14:37:43 | 2018-09-28T13:35:37 | JavaScript | UTF-8 | Python | false | false | 5,036 | py | import numpy as np
import cv2
import os
import random
import pandas as pd
import sys
class ImageDataLoader():
def __init__(self, data_path, shuffle=False, gt_downsample=False, pre_load=False, num_classes=10):
#pre_load: if true, all training and validation images are loaded into CPU RAM for faster processi... | [
"jayantrane811@gmail.com"
] | jayantrane811@gmail.com |
9517f4bdae0e34e689aa4aa014ca48cd9ff1ebf2 | efe722c505c42c9a9d28939719e22a5870b5d152 | /very old/TheorieInfo/Huffman/htrees.py | ecc2a2a292abd19306a223604471e832fe524f9c | [] | no_license | TwilCynder/univ-documents | fd29b9ac27dc0daad804aae59884820eda3b90c8 | 3ea0eb8ead644b6231d5d3ee19ec0a1080463292 | refs/heads/master | 2023-04-03T12:49:34.425891 | 2023-03-20T18:09:30 | 2023-03-20T18:09:30 | 212,378,366 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | # The class of Huffman trees, with subclasses Leaf and Node
class Htree:
def __init__(self, val):
self.val = val
# constructor Leaf(val, code)
class Leaf(Htree):
def __init__(self, val, code):
self.val = val
self.code = code
# constructor Node(val, low, high)
class Node(Htree):
de... | [
"twilcynder@gmail.com"
] | twilcynder@gmail.com |
6b71f866ea703c3ab8779cd1aa9032a704e63284 | 83c89ea578f8542c348c50f60d5953605ee3f117 | /main.py | ad320a4e0f3825335bfc4d4e36c5642ec7fcf4dc | [] | no_license | AlexDharmaratne/CSC-part-2 | 083ccb5ad5d52c5d8b8353ac59eac4c2cd559030 | 4a585d7bbaed779f3ae7baaf021cdbd75898836b | refs/heads/master | 2023-04-19T08:40:10.776559 | 2021-05-18T00:20:55 | 2021-05-18T00:20:55 | 368,355,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,457 | py |
from tkinter import *
import random
global questions_answers
names_list = []
asked =[]
score =0
question_answers = {
1: ["What must you do when you see blue and red flashing light behind you?",'Speed up to get out the way','Slow down and drive carefully','Slow down and stop','Drive on as usual','Slow down and ... | [
""
] | |
473dd640c4ad60d5129b85f12606783c492705c0 | 6ddc3e66c5ddd51b7774c9b3258d3d968e6e382f | /mysite/settings.py | d93c55635a65d28794573fe9ec6e27e871fa8cf2 | [] | no_license | KitsuneNoctus/Django_Tutorial_BEW_1_2 | 6c17d495c36651dbcf3a2972d029acbab63fdffe | aa09a07d8f06de3cfee6ecf04c4a55054268d85f | refs/heads/master | 2022-05-06T05:40:39.506813 | 2020-03-05T12:35:16 | 2020-03-05T12:35:16 | 235,900,722 | 0 | 0 | null | 2022-04-22T23:05:16 | 2020-01-23T22:38:34 | Python | UTF-8 | Python | false | false | 3,360 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 3.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# ... | [
"theceintiant@gmail.com"
] | theceintiant@gmail.com |
894b824b511a8ca9cab36eb83afdfb6b3296cfa7 | 24ec64f9578f0bd57d5a98d682c36e8d3863c325 | /news/migrations/0009_auto_20160908_1724.py | d824c286260203d4bf4542686c9273701d4d8069 | [] | no_license | Darlyyuhui/Python-minicms | d62e09c3e3e48d369dcd3e8e00a686112583d864 | 06667afcb5cb031544fc187fb3f2ed2975362fbf | refs/heads/master | 2020-04-17T17:20:21.015640 | 2016-09-12T08:11:58 | 2016-09-12T08:11:58 | 67,675,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 836 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-08 09:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('news', '0008_auto_20160907_1705'),
]
operations = [
migrations.AlterModelOpt... | [
"darlyyuhui@hotmail.com"
] | darlyyuhui@hotmail.com |
d0d1dd77e2058064b00faa8dc46a145766a237d0 | 02033c12858f58c7408d852874a5b6655b7ab6ed | /q2_3_for_loops.py | 742e9643601dd15bf6f6933fb59db4ce47e417f7 | [] | no_license | manu-s-s/Challenges | a75b6532d6e02c631de23809bfb9918f234d9950 | 4fc03510570a438d0322939f0fba4b4e08bd5668 | refs/heads/main | 2023-08-10T15:58:35.391924 | 2021-09-24T06:06:18 | 2021-09-24T06:06:18 | 409,851,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 896 | py | def process(paragraph):
paragraph=paragraph.split('.')
para=[]
for sentence in paragraph:
sentence=sentence.split()
sentence.reverse()
sent=[]
for word in sentence:
if '#' in word:
i=0
while i<len(word):
if word[... | [
"manussnova@gmail.com"
] | manussnova@gmail.com |
942fb16d6341d7adf7dec90c86062803d46ebb56 | db053c220094368ecb784fbe62375378c97457c2 | /92.reverse-linked-list-ii.py | 01812dfd90c75c46be6106a88de76827a53e89a1 | [] | no_license | thegamingcoder/leetcode | 8c16e7ac9bda3e34ba15955671a91ad072e87d94 | 131facec0a0c70d319982e78e772ed1cb94bc461 | refs/heads/master | 2020-03-22T14:51:45.246495 | 2018-07-09T00:00:06 | 2018-07-09T00:00:06 | 140,211,147 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 784 | py | #
# [92] Reverse Linked List II
#
# https://leetcode.com/problems/reverse-linked-list-ii/description/
#
# algorithms
# Medium (31.88%)
# Total Accepted: 145.3K
# Total Submissions: 455.9K
# Testcase Example: '[1,2,3,4,5]\n2\n4'
#
# Reverse a linked list from position m to n. Do it in one-pass.
#
# Note: 1 ≤ m ≤ n ... | [
"sharanbale@yahoo-inc.com"
] | sharanbale@yahoo-inc.com |
999f8590c96bd9f5cf4f156a8dda91530bc9703c | dc878af34f6b1d77f5dfa757d3644cc96e929127 | /sad_vk_2 (1).py | d650896e6d62404cc19222529b08a160ba7239e2 | [] | no_license | Sihionok/- | 8bc111f113819e6148e7ffc8dd80d2687c305c0c | 9415ff8535cdf5ffd71f9dd0fca13ff4078062b4 | refs/heads/main | 2023-01-24T13:33:34.118692 | 2020-12-02T15:01:49 | 2020-12-02T15:01:49 | 313,967,840 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,731 | py | functions = []
def obertka(func):
...
def new_func(message = None):
if message is None:
message = input()
result = func(message)
if result:
print(result)
return result
...
print("в конце оборачивания")
functions.append(new_func)
return new_func
@obertka
def author_name(mes... | [
"noreply@github.com"
] | noreply@github.com |
ed93f6359fc8c624ea8f4a3efb3595b551de4a00 | b7b2f80ab5e1ee0ea028576e3014b62b8d3a8d7e | /pyinst/pyinst-000/postinst.py | fe27556ee5b15caee330210d5f7103f3ac5dc6f8 | [] | no_license | pglen/pgpygtk | 4d1405478a714f003984cf3e3db04ff1f767470b | 33f58010e304f1a312f2356de453ecedb7aa21ef | refs/heads/master | 2021-01-22T01:18:52.238415 | 2019-01-01T01:37:24 | 2019-01-01T01:37:24 | 102,215,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | #!/usr/bin/env python
import os, sys, getopt, signal, select, time
import subprocess
verbose = False
# ------------------------------------------------------------------------
def exec_program2(fname, arg1, arg2, arg3):
global verbose
try:
if verbose:
print "Started", fname
... | [
"peterglen99@gmail.com"
] | peterglen99@gmail.com |
1c8f288a62c147192e4b384da86f76d8be65f9fc | 1d2b8f52298198dd2727a4a41fa7e6c1d931abc4 | /galavant/urls.py | 77dc78842d46ec6def9f77953e1d75d7d70724b5 | [] | no_license | nollybear/galavant | 8621129ec7403ac066064684b5327699e0c74078 | 1f98e7dcd08a936efdc17fcee2f5b16408441dbb | refs/heads/master | 2021-01-12T07:59:50.925785 | 2016-12-22T18:52:28 | 2016-12-22T18:52:28 | 77,082,603 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 787 | py | """galavant URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-b... | [
"nlindeke@gmail.com"
] | nlindeke@gmail.com |
c7bcdd9ccab6d6a8dc700cc14c076283c89fd687 | 610e824dea04cdbeac2a18d905787b3322317bab | /main.py | 14d37b6c74da6453c487b4a4abbd49d14a72ea2c | [] | no_license | iam-smjamilsagar/Auto-React-in-Facebook | 6181d363de5921fe0a254aaf359109051a9bb0c7 | a0481ce23e154234e30b0a95f7fcdca97abb169b | refs/heads/main | 2023-03-17T08:56:43.897309 | 2021-03-09T19:53:21 | 2021-03-09T19:53:21 | 346,094,511 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | # PyAutoGUI lets Python control the mouse and keyboard,
# and other GUI automation tasks. For Windows, macOS,
# and Linux, on Python 3 and 2.
import pyautogui
# to take some break we need time
import time
# to make of our mouse point safe need to use pyautogui.FAILSAFE = False
pyautogui.FAILSAFE = False
# we use ran... | [
"s.m.jamil.sagar1111@gmail.com"
] | s.m.jamil.sagar1111@gmail.com |
947defdb896634c0a1852c38552c4cbaf09b800f | 8d860113a1f9de5ac887f8777f97cc267f2f2177 | /爬虫1/toutiao/toutiao/items.py | 33e19af49374ea477084794565dd9f2e7e4df2db | [] | no_license | shuhangshen/Crawler | 68cdac7a584dcb51202950d5ecd8c0234caedc9d | 60f499a7eacdc472fb90e200bc409d19819a178e | refs/heads/master | 2020-07-16T14:03:22.935046 | 2019-09-12T02:46:55 | 2019-09-12T02:46:55 | 205,802,437 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class ToutiaoItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
url = scrapy.Field()
field = scrap... | [
"xingrenxiaoshu@gmail.com"
] | xingrenxiaoshu@gmail.com |
9db9077c9ec0baf2471ff526f739a35f2080b53a | 954308736f14ae605a57d205722968bead2e84d3 | /notebooks/202102/abc116_c.py | 372a55754ee9ac251d6196e266cfc4648e03367d | [] | no_license | ko-taro/atcoder | b8f79a8aa6835363b2be23ba54fee5581e6b45f6 | 4babaf23b2cb2e5c6cb8ebe279ec23bd750a8d4b | refs/heads/master | 2023-03-17T04:47:27.048776 | 2021-03-09T07:36:01 | 2021-03-09T07:36:01 | 299,477,072 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | # %%
N = int(input())
h = list(map(int, input().split()))
count = 0
def searchl(h):
for k in range(len(h)):
if h[k] != 0:
return k
return None
while True:
k0 = searchl(h)
if k0 is None:
break
for k in range(k0, len(h)):
if h[k] != 0:
h[k] -= 1
... | [
"gjirvko@gmail.com"
] | gjirvko@gmail.com |
5e7986d733821f07a27f6413a44d69a408225431 | bce3c7830ef39bc057eb8c8dc2568445273c4dfd | /inventory/urls.py | 561ff1204ea3e75ddca3dd4e0524d2b238410ff9 | [] | no_license | nazoana/django | c973aa4f9e160dcc0a16cd826f52e0243238cde0 | 7e6c0acb48b2fe8fd1ea5a9a2d15ca11a7326bd5 | refs/heads/master | 2020-04-06T10:35:05.571814 | 2013-04-17T05:31:45 | 2013-04-17T05:31:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 839 | py | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('inventory.views',
url(r'^$', 'index', name='index'),
url(r'^display_meta/$', 'display_meta'),
url(r'^search/$', 'search', na... | [
"mkhan@mercycorps.org"
] | mkhan@mercycorps.org |
ff55be07371ca609d7952abaff8d081428a1ee5b | c56d2198676ad30698b2440f1f42ed9e718189be | /flask/ml/cleaned/search_engine.py | b049bcf0b73d053ce5c3c87f4ebb4f5176aab5c1 | [] | no_license | v15hv4/DSSE | 8930e3036c7a386f2fff69fc9991cb648940b799 | 173bc142e07d92358250c6ed04c4f26bc6f54896 | refs/heads/master | 2022-12-30T12:30:18.405347 | 2020-10-18T18:07:15 | 2020-10-18T18:23:19 | 304,982,324 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,693 | py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
from nltk.corpus import wordnet as wn
from nltk.corpus import stopwords
# In[2]:
def best_file(keyword):
top = os.getcwd()
dir_names = []
for subdir, dirs, files in os.walk(r"./ml/cleaned/"):
for diry in dirs:
dir_names.appe... | [
"vishva2912@gmail.com"
] | vishva2912@gmail.com |
9b10c0a4c7d4f1af8edd8df82150e7b68f045c5b | 2daaf77c340f41eb45628cd700273af70976dc6b | /Desafios.Sebas/Desafio8.py | ff11d6a7adf4db5259fcd673da7446c917396de4 | [] | no_license | felipekamada/Desafios.Python | d7556f58e9de7050d02a95f5f9ec61727458ec10 | 1ed672446f36158a9cbf2b0beb1af6994e1862fe | refs/heads/master | 2020-03-13T21:38:38.904179 | 2018-04-27T14:11:26 | 2018-04-27T14:11:26 | 131,300,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | def posicaomaior (lista):
posicao = None
for i in range(len(lista)):
if (posicao is None):
posicao = i
elif lista[i] > lista[posicao]:
posicao = i
return posicao
| [
"pinguim@localhost.localdomain"
] | pinguim@localhost.localdomain |
bb5b2593a5ba2b2708e6d2abc6730843785df221 | 07bc29f350ae83174988c193cdf57e7a69a696f6 | /函数 定义及调用.py | 5c2d37f181514994f07bcf00a973a3f8b4e2623c | [] | no_license | LuckyDoge67/Freshman | 2d767c1fad56d167cb2fc29978a191370aa4c72f | 522c95c95d43751cd6bf4093b1696fd2f34f86d4 | refs/heads/master | 2023-03-24T17:34:56.079641 | 2021-03-24T13:52:37 | 2021-03-24T13:52:37 | 350,716,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | """
file :函数 定义及调用.py
date :2021.03.21
author :Lucky
desc :
"""
# 定义函数
def printme(str):
"""打印任何传入的字符串"""
print(str)
return
# 调用函数
printme("我要调用用户自定义函数")
printme("再次调用同一函数")
| [
"xiaoleqi@mail2.gdut.edu.cn"
] | xiaoleqi@mail2.gdut.edu.cn |
f5ab01384bf8dd64bf55f4d40cb0aa6c2a6d85e7 | 25d7359728cc0aeafa2d2948674e2ddc1cedb30e | /ПП/pygame/Занятие 2/Таня/4.py | 6e6041f2c19dc624010064365ba83d22e095bbbb | [] | no_license | HandliClub/exam | 7c6395ecfbdc17b1645df5dc1a25c4be7358c0ab | 3af5ed18c7e3d503c1cbc219dc5a9bedf40e1f47 | refs/heads/main | 2023-01-20T00:41:02.164654 | 2020-11-23T15:00:31 | 2020-11-23T15:00:31 | 312,018,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | import math
import pygame
def f_graph(x1):
y1 = x1*2+b
return (y1)
a = -10
b = 10
grModeX = 800
grModeY = 600
pygame.init()
screen = pygame.display.set_mode ( [grModeX, grModeY] , pygame.FULLSCREEN)
sx = grModeX/(b - a)
h = 1/sx
xmid = grModeX // 2
ymid = grModeY // 2
x = a
max... | [
"noreply@github.com"
] | noreply@github.com |
9cef2cb858bb265be3acaa61853f2d3e1822f724 | 095df4be4cd98ec4fff9af6406ffecbdc1e26c18 | /Python/6_Django/time_display_assignment/apps/timedisplay/views.py | c305632ade4e76a8141155c16cdb381d64cd5a8f | [] | no_license | michaelAmused/CodingDojo | 3af333f8d6c5e5a7af048c2edd635e9702d03feb | 00c70b2f09731ea4cb468258df879473c18d7a40 | refs/heads/master | 2021-01-20T12:42:33.650174 | 2017-07-25T15:55:04 | 2017-07-25T15:55:04 | 90,399,767 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | from django.shortcuts import render, HttpResponse
import datetime
# Create your views here.
def index(request):
context = {
"date":datetime.datetime.now().strftime("%B %d, %Y"),
"tme":datetime.datetime.now().strftime("%I:%M%p")
}
print context
return render(request, 'timedis... | [
"mobrien601@gmail.com"
] | mobrien601@gmail.com |
67abc3132d03b33312a73634d58904e58b4b4a78 | a5ee5dc866051c95e0209263c7b66117fb07cd1d | /administrator/urls.py | eb021c49364a58cb8fdadc64f7edbacab7f99764 | [] | no_license | pierceoneill/vuejsdjango | 2d10cba126992b2c09e33b067162dc0b10e6e86a | 2aab90c8f819919287f00ab7abcb3743cfe4af71 | refs/heads/master | 2023-07-12T20:57:45.715066 | 2021-08-13T21:18:36 | 2021-08-13T21:18:36 | 395,795,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | from django.urls import path, include
from .views import AmbassadorAPIView, ProductGenericAPIView, LinkAPIView, OrderAPIView
urlpatterns = [
path('', include('common.urls')),
path('ambassadors', AmbassadorAPIView.as_view()),
path('products', ProductGenericAPIView.as_view()),
path('products/<str:pk>', ... | [
"pierceoneillky@gmail.com"
] | pierceoneillky@gmail.com |
a1a3b1bf42eacc7a8ea19519baec4dec166a12c8 | 650917768b3dbe0ed6083738af4d417a0ab094c9 | /sec5.2-comparsion-of-quantum-memory-parameters/cavity_vs_fidelity.py | 03e5bb1aa01958770798f1044f6ee739e6e75e52 | [] | no_license | ashwanikrrsinha/Chicago-metropolitan-quantum-network | 76056e36f89e3b1a30e338c67a530f5c44fc42d2 | 1198cd2dd46fee104c20a9e3c93375981ae4c9f5 | refs/heads/master | 2022-12-30T07:13:34.997814 | 2020-10-11T00:10:07 | 2020-10-11T00:10:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | def get_fidelity_by_efficiency(C: int):
"""
C: the cavity cooperativity
50 <= C <= 500
"""
gama = 14
gama_star = 32
delta_omega = 0
gama_prime = (C+1)*gama
tau = gama_prime + 2*gama_star
F_e = 0.5 * (1 + gama_prime**2 / (tau**2 + delta_omega**2))
return F_e
| [
"xiaoliang@feynman.mcs.anl.gov"
] | xiaoliang@feynman.mcs.anl.gov |
af369b0e1c00e429888f5c4b9d51fe871a48ccab | 0c2c2fdc7d3f658453ea51547c5a8ecd18e2589b | /playcards.py | b630733f7f68b4f8030c4d4140869f3bb260a22a | [] | no_license | law-lee/runestone | 5b4ba14a9fd41c792e90bb1b06390fbaead92162 | e98d3eba0d5975eb30bd99f154c4066624a83040 | refs/heads/master | 2020-03-19T13:24:17.593248 | 2018-06-09T05:05:43 | 2018-06-09T05:05:43 | 136,577,828 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,659 | py | import random
class Card(object):
"""represents a standard playing card."""
suit_names = ["Clubs", "Diamonds", "Hearts", "Spades"]
rank_names = [None, "Ace", "2", "3", "4", "5", "6", "7",
"8", "9", "10", "Jack", "Queen", "King"]
def __init__(self, suit=0, rank=2):
self.suit... | [
"liliangwei@liliangwei-PC.HDDOMAIN.CN"
] | liliangwei@liliangwei-PC.HDDOMAIN.CN |
bfade84c7b493bcab41c4221d0fc05519244a152 | b6c6e953712ff95b483c475e688578bdc293be73 | /MachineLearning/ML_practice/Linear.py | 75d6d9ad659a7309cee9dea63b830397b5345bee | [] | no_license | KyeoRaeHan/Keras | 626bdd91e07a80f59594de79d3de99825e0eb8bf | af897fd40be120da3e1a644b8e8090daf84282ee | refs/heads/master | 2020-12-18T18:26:50.753930 | 2020-04-16T13:24:07 | 2020-04-16T13:24:07 | 235,484,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 950 | py | from sklearn.datasets import load_boston
from sklearn.model_selection import train_test_split
#1. 데이터
boston = load_boston()
x = boston.data
y = boston.target
x_train, x_test, y_train, y_test = train_test_split(x,y, train_size=0.8, shuffle=True)
#2. 모델구성
from sklearn.linear_model import LinearRegression, Ridge, L... | [
"noreply@github.com"
] | noreply@github.com |
64b6cae8c29f3f130d5d1c34a4736b4e0a0a91e6 | ee370b3bc056bd8c3cab1fa1e05642267d03f8c7 | /scrape_idaho_covid_data.py | a021e2497b9fa4df3f6d39981d951af7b1767f36 | [] | no_license | timspencer/idaho_covid_dashboard_scraper | 713e5f62f071d21b282f8930b175291b1f23de92 | 0feed0e242293e955c72970b6ed550c183580d0f | refs/heads/main | 2023-01-08T18:58:01.199287 | 2020-11-15T17:57:18 | 2020-11-15T17:57:18 | 302,999,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,213 | py | #!/usr/bin/env python3
#
# This script downloads the data from the specified sheet and subsheet on the
# Idaho COVID-19 Data dashboard. It is kinda fragile, in that all this session
# and view ID stuff is totally undocumented by the tableau people in any way
# that I was able to find, so if they change their system, i... | [
"tspencer@hungry.com"
] | tspencer@hungry.com |
7281d23d02e3de9896dd3690adde741d708c1fe7 | 1b60b5c4d2a873b643dbd04fb77504d596237ba2 | /runtests.py | d8b2a28529b2ecfaaa4faf76e40c0f1029086034 | [
"BSD-3-Clause"
] | permissive | amolm-cuelogic/django-charsleft-widget | 32d832c90c9d269efd5877e83983c78a2ff5a0db | bbe0196c597c7b25f51d204acb10d05ab348d703 | refs/heads/master | 2021-01-22T19:09:15.856856 | 2016-10-14T08:15:51 | 2016-10-14T08:15:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,855 | py | #!/usr/bin/env python
import sys
from os import path
import django
from django.conf import settings, global_settings
from django.core.management import execute_from_command_line
if not settings.configured:
BASE_DIR = path.dirname(path.realpath(__file__))
settings.configure(
DEBUG = False,
T... | [
"basil.shubin@gmail.com"
] | basil.shubin@gmail.com |
f7be58452a813250d4677c722ef62885ad4f1574 | 2ce1ce91911b573e5ec31f867be55bcb938c12ca | /test.py | 0c227ee9b68814682b6bb6c5b27a94761025ceb5 | [] | no_license | sivannaa55/ML_Pipeline_Ins_Fraud | 7e29128ecbda54760311316ed5ed44bc458bb063 | e33ba981a6d1ec3c60290bdae4e9c153f3a77250 | refs/heads/main | 2023-04-30T05:43:09.420830 | 2021-06-02T03:59:48 | 2021-06-02T03:59:48 | 372,609,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,067 | py | from wsgiref import simple_server
from flask import Flask, request
from flask import Response
import os
from flask_cors import CORS, cross_origin
from prediction_Validation_Insertion import pred_validation
from trainingModel import trainModel
from training_Validation_Insertion import train_validation
import fla... | [
"shivaabhisheka@MacBook-Pro.local"
] | shivaabhisheka@MacBook-Pro.local |
acbc151d7b384b7d09b14aef7407e39844b2cb9e | a55d515cf59f4ee898892fbf358c327ff53bce96 | /djangodialogs/auth/urls.py | b76c9847559dc83f03b63bbafd5035c1a6a268a5 | [] | no_license | furious-luke/django-dialogs | 859a3c30970f0a40813f828a0e0909cf5de29d24 | 142b5075910c940091a1f58a69d5192f74c10f9c | refs/heads/master | 2016-09-05T17:23:22.244282 | 2012-03-14T04:24:59 | 2012-03-14T04:24:59 | 1,964,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | from django.conf.urls.defaults import *
from views import *
urlpatterns = patterns('',
url(r'^accounts/login/ajax/$', login),
url(r'^accounts/register/ajax/$', register),
)
| [
"furious.luke@gmail.com"
] | furious.luke@gmail.com |
103461d9c8c8d86360e5486f227af2f04a8ac31b | b6d7bfd22a4c2f2abfaad8d1fbedbdb2bf84f63b | /Compound.py | 185ed92e69487dbaf9ea2ba9784caa23757a3e20 | [] | no_license | KingJMS1/Chemistry-Application-Rework | efec5a69a4eefb2773d358ddd8c20c906738d0fa | 89c4d60e5c50435053f49b750e0271d9f188126b | refs/heads/main | 2023-03-26T16:03:04.660962 | 2021-03-25T03:26:25 | 2021-03-25T03:26:25 | 350,921,161 | 0 | 0 | null | 2021-03-25T01:01:02 | 2021-03-24T02:26:50 | Python | UTF-8 | Python | false | false | 2,337 | py | from re import findall, split
_nums = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
class Compound(dict):
def __init__(self, formula, /, charge=None):
dict.__init__(self)
if charge is not None:
self.charge = charge
else:
self.charge = 0
if type(formu... | [
"1kingjms@gmail.com"
] | 1kingjms@gmail.com |
8890f620ef394c5a2aea87c024a250bf32fe4885 | a67635ddcdb8ee6c9dbc19f335696c871bdaa774 | /spatial/prcltbl_deletefields.py | baa2440ba6bca5c0734c595f9c5e6c5e5cb5b24a | [] | no_license | psrc/parcels | f99ef31eef1c399d9bd6456fbc35fb38e4376f0d | b9088e5aa69e854013e0f1ee94a48c114383b773 | refs/heads/master | 2023-01-12T08:14:35.252624 | 2020-11-19T18:23:13 | 2020-11-19T18:23:13 | 74,080,148 | 0 | 0 | null | 2020-11-19T18:23:14 | 2016-11-18T00:38:20 | Python | UTF-8 | Python | false | false | 1,185 | py | # This script will delete selected shapefile fields (containing words: 'OBJECT*', 'Shape_*', and '*area*'). Run before spatial joins script.
# Import system modules
import arcpy, os, time
start = time.time()
# Environment inputs
counties = ['Kitsap', 'Pierce', 'Snohomish', 'King']
shp0 = ['kitptfnl15testCopy.shp',... | [
"cyyllam@gmail.com"
] | cyyllam@gmail.com |
460a1b1f34cea2825871b51874207f025531b2bb | fc81552769485d851d8a1bc4dd82b71507b2400e | /hw2_q4.py | bb3931996e2d49a0ac5241fa4ace58045973b043 | [] | no_license | axgao1/introprogramming_fall2017 | 51e63447e93f5500ae4d08d22e5dc9289758fb2a | 2118549909a756efc3245d8fdbe6c0dbec6a65a0 | refs/heads/master | 2021-04-26T21:54:09.375959 | 2018-03-07T03:52:34 | 2018-03-07T03:52:34 | 124,173,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,814 | py | #!/usr/bin/env python
long_number = '''1334689116556462941882035808943573171674164401363769460864490234588978262666944913475783756741523897245184207879400801772948519107022172112703850995250828017643114989532341638256433902974862681950869909550724964438670365005594138770568327987006988181115098238786559343074732216472... | [
"noreply@github.com"
] | noreply@github.com |
cc5d04ed49a9f671eae60b2370a24d9759652ee3 | f0881c9733727602d138b145ae21fe5a04cfdc4e | /discite_app/services/achievement_services.py | 0f6149eeb3241ef439737fe6642cc0606e423798 | [] | no_license | pbartkowicz/discite | 18b52accea227d241af9386f7ac3c4434aa951f5 | 2d094d5a56286c43ce664d146f45ee4c2b0da23d | refs/heads/main | 2023-02-23T06:34:35.611446 | 2021-01-26T18:48:47 | 2021-01-26T18:48:47 | 318,822,643 | 0 | 0 | null | 2021-01-24T13:54:15 | 2020-12-05T15:31:31 | Vue | UTF-8 | Python | false | false | 1,762 | py | from discite_app.models import Achievement, UserAchievement
def update_user_solve_achievements(test_result, user):
current_user_achievements = user.userachievement_set.all()
# SOLVE ONE TEST ACHIEVEMENT
solve_test_achievement = Achievement.objects.get(key='SOLVE_TEST')
if not any(solve_test_achievemen... | [
"filip.raszka3@gmail.com"
] | filip.raszka3@gmail.com |
131fa69d7c88902d3272e686e559688f3e1406f6 | 5c7f2ff956b1fd1477d56486e239b6e661a08efd | /reinforcement_learning/0x00-q_learning/3-q_learning.py | 38289878256043dd1d61c99f45447b4db0addd4e | [] | no_license | diego0096/holbertonschool-machine_learning | 60c5f40e185df04d02d9887d966542e85a981896 | 64b8984846c2b2b88bbf11125b55b482c7b74eea | refs/heads/master | 2023-04-02T01:27:59.263397 | 2021-04-02T21:33:51 | 2021-04-02T21:33:51 | 279,229,931 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,253 | py | #!/usr/bin/env python3
"""3-q_learning.py"""
import numpy as np
epsilon_greedy = __import__('2-epsilon_greedy').epsilon_greedy
def train(env, Q, episodes=5000, max_steps=100, alpha=0.1,
gamma=0.99, epsilon=1, min_epsilon=0.1, epsilon_decay=0.05):
"""function that performs Q-learning"""
total_rewar... | [
"dfqz93@hotmail.com"
] | dfqz93@hotmail.com |
d4e0da1819ff44bdfec950133ed2006b9d0271cf | dae5e94787c5efd3c6ae4e029ad48a7cc584ba4b | /FaceRecognitionPoets/FaceRecognitionEmbedding/FaceRecognition/FaceRecognition.py | 1768c14291b47fc4b8a5df9facd8124bb4084d0f | [] | no_license | dzmitryyermalovich/courseWork | babd0e92c34a74cbad805b38df007c0fffeb58c0 | 4650e48711a0027afa8170b377ee9c5fa4fbe46f | refs/heads/master | 2023-05-11T08:53:14.007949 | 2021-05-28T18:44:19 | 2021-05-28T18:44:19 | 362,907,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,205 | py | import numpy as np
from keras import models
def get_embedding(model, face_pixels):
face_pixels = face_pixels.astype('float32')
mean, std = face_pixels.mean(), face_pixels.std()
face_pixels = (face_pixels - mean) / std
samples = np.expand_dims(face_pixels, axis=0)
yhat = model.predict(samples)
retu... | [
"ermolovichdima22@gmail.com"
] | ermolovichdima22@gmail.com |
25a115ac2ed7f5a2cae20b819f3d0d0d7c73959f | a50e906945260351f43d57e014081bcdef5b65a4 | /collections/ansible_collections/fortinet/fortios/plugins/modules/fortios_system_3g_modem_custom.py | bfa0a35321a02ba247ba88189f58c418996fe034 | [] | no_license | alhamdubello/evpn-ipsec-dci-ansible | 210cb31f4710bb55dc6d2443a590f3eb65545cf5 | 2dcc7c915167cd3b25ef3651f2119d54a18efdff | refs/heads/main | 2023-06-08T10:42:35.939341 | 2021-06-28T09:52:45 | 2021-06-28T09:52:45 | 380,860,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,173 | py | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019-2020 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of th... | [
"a.u.bello@bham.ac.uk"
] | a.u.bello@bham.ac.uk |
a3853c891ca016a85276919f21c11e6ea1299f0e | 490f5e517942f529ddc8c1e0d421a208ff1ca29b | /02_code/listinstance2.py | c198804a387d5ef0f574c63f87e3a85e035230d8 | [] | no_license | emnglang/py-lab | facdc464a8c84b90f06b5cb639315981c0b4ba8d | bc3566da81e0b2cfa9ce563ffc198d35294971a1 | refs/heads/master | 2020-03-25T15:10:42.856062 | 2018-08-24T14:54:33 | 2018-08-24T14:54:33 | 143,869,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | #!python
# File listinstance.py (2.X + 3.X)
class ListInstance:
"""
Mix-in class that provides a formatted print() or str() of instances via
inheritance of __str__ coded here; displays instance attrs only; self is
instance of lowest class; __X names avoid clashing with client's attrs
"""
de... | [
"linja1688@gmail.com"
] | linja1688@gmail.com |
316e260667a39e7b8480c89172aa2e5bf61a1ff9 | dd4622390bb7122db37a889e647f28004a265ccd | /1806101049马原涛/deepLearn/tensorflow2.0_note/page_11.py | a3b37a421fd7bd09d84a7304aa170f7f621111d9 | [] | no_license | gschen/where2go-python-test | c8adaa095aa8a095401f98c7b3f8f17c72d0532d | eb9e6011b8d33fa45a6b1ef853affd01a296db21 | refs/heads/master | 2022-12-13T19:45:09.874691 | 2020-10-15T13:12:52 | 2020-10-15T13:12:52 | 211,591,156 | 4 | 1 | null | 2022-12-05T07:46:12 | 2019-09-29T02:35:00 | Python | UTF-8 | Python | false | false | 1,744 | py | #张量限辐:根据值裁剪/限制值的范围
import tensorflow as tf
'''
clip_by_value
relu
clip_by_norm
gradient clipping
'''
'''
maximum(x,a)与minimum(x,a)
1.maximum(x,a)
a作为最大值,x比a小就返回a,x比a大就返回x本身
2.minimum(x,a)
a作为最小值,x比a大就返回a,x比a小就返回x本身
'''
x=tf.range(10)
tf.maximum(x,2)#返回[2,2,2,3,4,5,6,7,8,9]
t... | [
"1176632450@qq.com"
] | 1176632450@qq.com |
a2924202df9c988563097e576728e5b857311863 | 876a6375f05527db1b40dee12cb8ef4c6f735d76 | /crypto_trade/wsgi.py | 3fae8d48af61ea0ff4ff89f142a96074db0b8603 | [] | no_license | DominicOrga/Crypto-Scanner | 3c8bfa42188f647da7de1bdf54d12a4bb8815cbe | ca64e35c1b11af1dfcc64264b1201b18390943e7 | refs/heads/master | 2021-08-24T13:46:36.989511 | 2017-12-10T02:41:19 | 2017-12-10T02:41:19 | 110,096,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | """
WSGI config for crypto_trade project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO... | [
"dominicorga@gmail.com"
] | dominicorga@gmail.com |
b4a6d9690191186bed46ae21b7b28f1d1f3ce812 | f8b74a198fd79a20b85015257ad1c6bf2bf626d3 | /lib/lib_filtro.py | 326fa51c55dff2d98d9678af8071dd00e7d617f0 | [] | no_license | lzac/Cazzaniga | 702f9b108a617a62d79d3f9ad3a237b10d81b1ed | a0f696a9e474ca6e76e7ab27ef2325e51d500298 | refs/heads/master | 2016-09-06T15:59:21.552615 | 2014-09-19T19:49:18 | 2014-09-19T19:49:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,918 | py | # -*- coding: utf-8 -*-
import wx
from wx import xrc
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.orm import sessionmaker
from moduli import *
import lib_sql as lib_sql
import lib_function as lib
import lib_menu as menu
import lib_global as g
import lib_sql as libsql
import my... | [
"luca.tecnosphera@gmail.com"
] | luca.tecnosphera@gmail.com |
674b0a7991768af96255c795dd3126b23dd92600 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_172/ch87_2020_04_29_11_23_49_782896.py | b473d466d2bfc573a99a1bf4c984260fa1ce298e | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | with open('churras.txt', 'r') as arquivo:
conteudo = arquivo.readlines()
y = 0
for item in conteudo:
x = item.split(',')
y = y + x[1]*x[2]
print (y)
| [
"you@example.com"
] | you@example.com |
a4e291834a035910169cf5c8fa887a2feef65ec6 | 7b13e6acb2a1f26936462ed795ee4508b4088042 | /算法题目/算法题目/二分查找/LeetCode69求开方.py | cdee55e6ed01d6470cb969ad904f4d20d55e2c37 | [] | no_license | guojia60180/algorithm | ed2b0fd63108f30cd596390e64ae659666d1c2c6 | ea81ff2722c7c350be5e1f0cd6d4290d366f2988 | refs/heads/master | 2020-04-19T08:25:55.110548 | 2019-05-13T13:29:39 | 2019-05-13T13:29:39 | 168,076,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | #Author guo
class Solution:
def mySqrt(self, x):
# if x==1:
# return 1
# if not x:
# return 0
l = 0
r = x
while l <= r:
mid = (l + r) // 2
if mid * mid <= x < (mid + 1) * (mid + 1):
return mid
elif m... | [
"44565715+guojia60180@users.noreply.github.com"
] | 44565715+guojia60180@users.noreply.github.com |
5cb2d367405b1d78b0470ad600c89b7d3f16d4f3 | d9f149f79453b1832eabb10ef0784d02fb1509d5 | /battleship.py | f25aa3f83318b4bfeef846d0c160d957e5f6f1bc | [] | no_license | Mix-Anik/simple-battleship | ed2e3d79c51ae467923da76b4ef4e7fb5c971e5f | 01cf4b5a53b9736a8f39afd7cb957691865dce47 | refs/heads/master | 2022-11-22T05:42:59.056634 | 2020-06-23T06:45:34 | 2020-06-23T06:45:34 | 274,307,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,143 | py | from tkinter import *
from easygui import *
import random
import time as ti
from datetime import datetime, timedelta
import sys
#Main game function
#Основная функция
def battleship():
root_1 = Tk()
root_2 = Tk()
root_3 = Tk()
root_1.title("Battleship(Your Canvas)")
root_2.title("Battleship(Opponent... | [
"xxmixanikxx@gmail.com"
] | xxmixanikxx@gmail.com |
772d2710213f53600f2da917a56490ae3251092a | 7e5a7171eb3e97d9d18b928092f94142e5cb51e3 | /system/t06_publish/snapshot.py | 5fac3d2521971707f55d158fddf4f02dda5f9e6d | [
"MIT"
] | permissive | sbadia/aptly | e67ef68c15bad196b6723644113179a8495277fb | 5d16cf06cf23b5a70b0d375fcc1a43eaa7053071 | refs/heads/master | 2020-12-28T19:24:16.093595 | 2015-02-04T22:49:29 | 2015-02-04T22:49:29 | 28,808,010 | 1 | 0 | null | 2015-01-05T10:27:37 | 2015-01-05T10:27:37 | null | UTF-8 | Python | false | false | 40,731 | py | import os
import hashlib
import inspect
from lib import BaseTest
def strip_processor(output):
return "\n".join([l for l in output.split("\n") if not l.startswith(' ') and not l.startswith('Date:')])
def sorted_processor(output):
return "\n".join(sorted(output.split("\n")))
class PublishSnapshot1Test(BaseT... | [
"Smirnov.Andrey@gmail.com"
] | Smirnov.Andrey@gmail.com |
4c6f6c224597b05b7e7ca61fee80f16589525350 | 248cf77b8a24b3b35e658d81b4c9cb8c450c2ca4 | /cryptex/streamers/bitbay/__init__.py | cdb4ef4c0f13d264b7f1b3ca9447113e54d3cb0b | [] | no_license | Reynaldo61/cryptex | fee1e124f544a049a74775fab4540cfd89d405df | deb34a449bdeb4e26009ef21035383ecf463cb3e | refs/heads/master | 2020-09-09T21:04:44.855833 | 2018-03-04T17:41:32 | 2018-03-04T17:41:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .bitbay import BitbayBase as base
from .wrapper import BitbayWrapper as wrapper
from .streamer import BitbayStreamer as streamer
__version__ = 0.1
__exchange__ = "bitbay"
__method__ = "rest"
| [
"ran@aroussi.com"
] | ran@aroussi.com |
790f68275e8eb8ce99be019271310ed7b17a6600 | a2c056026fbee859e67a507edbdc6379c0fb49b1 | /python_203.py | 9b6b903882a20cc876d02026912c85137c6d0dea | [] | no_license | FahimArman/python_crush_course | 0c964aa70243acaccc07db2423a3e8d5b623a984 | 32849b607953f0d5c3beb1eccad8dcf6f57e3de4 | refs/heads/master | 2022-11-23T20:23:28.544126 | 2020-07-26T02:05:50 | 2020-07-26T02:05:50 | 281,237,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | filename = 'alice.txt'
try:
with open(filename) as f_object:
contents = f_object.read()
except FileNotFoundError:
print("sorry, the file" + filename + "does not exist in the directory.")
| [
"fahim.3761@gmail.com"
] | fahim.3761@gmail.com |
eacab20918d79ac5d79f76307ea5cd4283e90349 | 0b76e4db1f08f2d6d7b9379a884c2075f6e258c3 | /w10/G3/demo/demo/urls.py | 6a76c0435cad61a73f5dc7da4dae78ad382bcce9 | [] | no_license | bobur554396/WD2020Spring | 244ec8b491f297646d1d37f1feeb3767b68b9180 | 2b833c9043701ebaa4d122f717c8465af8fd5677 | refs/heads/master | 2020-12-26T19:01:46.605344 | 2020-04-18T05:33:42 | 2020-04-18T05:33:42 | 237,606,624 | 1 | 6 | null | null | null | null | UTF-8 | Python | false | false | 837 | py | """demo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vi... | [
"bobur.muhsimbaev@gmail.com"
] | bobur.muhsimbaev@gmail.com |
288c6e2ffe13d3b10a13c1f48e108c7897279053 | 0f16e04dcf947ccfde5e9de10a636cf441c1779a | /Visualizations/plot_generations.py | bc91d2a84141c492f58f43e2a2990c3876f51a44 | [] | no_license | williampiat3/GeneticAlgorithm | 54b56c8c0727012d50af35c4cda6a5558064a18b | a1a923a4d431484ca723e8f5a1274ee341ce0d24 | refs/heads/master | 2020-12-05T16:57:50.712658 | 2020-11-09T23:01:55 | 2020-11-09T23:01:55 | 232,181,288 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,273 | py | import matplotlib.pyplot as plt
import numpy as np
import pickle
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
#Function to load a pickle file that contains the population and the hyperparameter space
def load_pop(path):
with open(path,'rb') as pickle_file:
hparams=pickle.load(pickle_file)
pop... | [
"william.piat3@gmail.com"
] | william.piat3@gmail.com |
370b46fe1d4c9bcfcec74e25e30f244d58dced4a | bba0f3b2829bd0e3bb4212b8479315131ef9f525 | /lib/python3.7/genericpath.py | 3d01fc9fcaf0f1933edd93b21f889adb0065bf17 | [
"MIT"
] | permissive | haveaqiupill/sugar-for-leo-bot | f5fca2d4c854821f1ec7c226b07c7a75c828a085 | 114d35c39d416c59c8e544d2aa6ed914711d59dc | refs/heads/master | 2022-11-06T08:46:52.685369 | 2020-06-12T12:53:58 | 2020-06-12T12:53:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 57 | py | /Users/qiujingying/anaconda3/lib/python3.7/genericpath.py | [
"e0323887@u.nus.edu"
] | e0323887@u.nus.edu |
59a1e330b6010ea7f9244a5e054033f6f1259b00 | da2f667ac9002d9bfb6023ae8eb4c64481eafac0 | /elementarz/test_wait_for_google.py | ea94d4c878b6b16a30ac0aa8d083c0c30c1c1732 | [] | no_license | Adamuss1990/selenium_wsb | 95323ee85b32dedb60b0efecfa8888d6e8db8ea8 | 1572b6fe17a67085444fca78a45ea5cf7ac7dd35 | refs/heads/master | 2020-04-29T11:38:11.970078 | 2019-03-17T13:30:45 | 2019-03-17T13:30:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,694 | py | # -*- coding: utf-8 -*-
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class GoogleCheck(unittest.TestCase):
def setUp(self):
self.driver =... | [
"karol.kolanski@wsb.wroclaw.pl"
] | karol.kolanski@wsb.wroclaw.pl |
889709af18dc59d4c67bae68a48dedd5af5c7e18 | 6a395d86aea2ce64550dc4afa5342c70db9c5285 | /location/loc-2-scripts/for_dataset/omit_side_and_bottom_loc-2.py | 3723e59038009aa06d418200191bc9933c5d7218 | [] | no_license | ba-san/Crowd-Analysis-with-CNN | 58b29350157216d61d61724dce5b93dc38a6f101 | f54045e7df3fd976ea9e398a8201700edc7d74be | refs/heads/master | 2021-06-23T08:20:59.706285 | 2021-03-16T18:13:15 | 2021-03-16T18:13:15 | 207,199,794 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,016 | py | import os
import cv2
import glob
from tqdm import tqdm
import pandas as pd
from joblib import Parallel, delayed
csv_path = glob.glob('./csv/*/*.csv')
def cropping(csv):
#for csv in csv_path:
df = pd.read_csv(csv, index_col=0)
bar = tqdm(desc = "Processing", total = int(len(df)/2), leave = False)
for i in range(int... | [
"ohbadai_ybb_ne_jp@yahoo.co.jp"
] | ohbadai_ybb_ne_jp@yahoo.co.jp |
67cf67841c5e1908a4086e5b9737233c7076141c | 2698b0148191078f36efe266c3572d9f30724255 | /sharedslides.py | d49c4cdff40d8d397bccf9a8082771f798ea1678 | [] | no_license | sugar-activities/4196-activity | 8c81dc6c0aa0c7e7fd8bd08da79c5a1279d7d400 | 8eaefd6bc6429694e2d765b70f5bdd42b1a5286a | refs/heads/master | 2021-01-19T23:15:28.535962 | 2017-04-21T05:45:34 | 2017-04-21T05:45:34 | 88,937,828 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,085 | py | # -*- mode:python; tab-width:4; indent-tabs-mode:nil; -*-
# sharedslides.py
#
# Class that performs all work relating to the sharing of slide decks and ink.
# Kris Plunkett <kp86@cs.washington.edu>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public ... | [
"ignacio@sugarlabs.org"
] | ignacio@sugarlabs.org |
5628e326c354f7cd3c1d230e5e6e83140c249278 | a40950330ea44c2721f35aeeab8f3a0a11846b68 | /INTERACTION1/DRIVER/Interaction/PumpsStation/Liquid/_OneSensor.py | b7ac8d7e289207ed76be73e90b0fa19808b3bab0 | [] | no_license | huang443765159/kai | 7726bcad4e204629edb453aeabcc97242af7132b | 0d66ae4da5a6973e24e1e512fd0df32335e710c5 | refs/heads/master | 2023-03-06T23:13:59.600011 | 2023-03-04T06:14:12 | 2023-03-04T06:14:12 | 233,500,005 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,567 | py | import time
import random
import pigpio
import threading
BAUD = 9600
class OneSensor(object):
def __init__(self, pi, sid, rx_pin, tx_pin, data_cb):
self._pi = pi
self._sid = sid
self._rx_pin = rx_pin
self._tx_pin = tx_pin
self._data_cb = data_cb
# PI
self.... | [
"443765159@qq.com"
] | 443765159@qq.com |
3be4c0307380ce8483986ba777308a5710af9df8 | 537cc3cd397900596be19e424d4eed8f57e611ea | /Basic/List/greatest.py | 546f7cf9170d30e8f76b4ddb75a8633f68c29e1a | [] | no_license | kushal200/python | d6dca96fc452d80181bcc0620e0889095e158d06 | 11d88936c3eacec10d2c717263b7a99f1ed270a1 | refs/heads/main | 2023-08-22T05:09:59.981135 | 2021-10-21T03:10:23 | 2021-10-21T03:10:23 | 405,541,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | num = [3, 4, 5, 7, 8]
number = int(input("Enter any number: "))
print("list: " + str(num))
count = 0
for i in num:
if i > number:
count += 1
print("numbers greater than {0} are : {1}".format(str(number), str(count)))
| [
"kushal.shresth2057@gmal.com"
] | kushal.shresth2057@gmal.com |
0a11483653658555e980813887cb6245c822bad2 | 27abd3317e08ab18bbb2747ebc18b307f43ef21b | /scripts/phyghtmap/configUtil.py | c5c9f12071fd17f06e3d7de77c10a4f8781554e9 | [
"MIT"
] | permissive | hiddewie/map-it | 21a5e28f89ed15431e109650161ace66d95a5f20 | b4cdf4491cbbf942ca6428be3d9fb2832ad54235 | refs/heads/master | 2023-08-17T03:51:22.302259 | 2023-08-09T17:18:32 | 2023-08-09T17:18:32 | 207,376,465 | 33 | 6 | MIT | 2023-07-30T20:08:07 | 2019-09-09T18:24:25 | Python | UTF-8 | Python | false | false | 2,196 | py | # -*- encoding: utf-8 -*-
__author__ = "Adrian Dempwolff (phyghtmap@aldw.de)"
__version__ = "2.23"
__copyright__ = "Copyright (c) 2009-2021 Adrian Dempwolff"
__license__ = "GPLv2+"
import base64
class Config(object):
def __init__(self, filename):
self.filename = filename
self.parse()
self.needsWrite = False
... | [
"hidde@hiddewieringa.nl"
] | hidde@hiddewieringa.nl |
1f4fefd569b9180b8e55732f31e5b4c4049adc52 | 1b1f99277e696fb6ef63455fc8d2eadef7062af5 | /server/quiz/quiz_app/serializers.py | 3784a02a36ef8f75814f6e28455bf0156de7e722 | [] | no_license | jsdelivrbot/drf-redux-quiz | aa3ac06428cf4c0531209887e6ad99293c30dacb | 618c42323e569255198499a24541bc35bce3a975 | refs/heads/master | 2020-04-10T10:27:35.544972 | 2018-12-08T18:47:16 | 2018-12-08T18:47:16 | 160,967,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | from django.conf.urls import url, include
from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
from .models import Question
class QuestionSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Question
fields = ('id', 'question', '... | [
"eswarmavuru1607@gmail.com"
] | eswarmavuru1607@gmail.com |
4292449526eca1cdb51ab7201eebc5dc056a46dd | b4f0b6275dd9eed8a767c567b01cc19520ae381b | /Chapter2 基于线程的并行/4_线程同步问题/4_1_使用Lock.py | 51bd264c340790be66f52ea59ef163bccc852922 | [] | no_license | frostime/LearnParallelInPython | f4d86cfbe8aa7a0e04c288f6ef092b7159c4d7d9 | b833af4271f115eae36f97dbc79b9dc8d7034ed4 | refs/heads/master | 2020-05-03T14:46:15.190698 | 2019-03-31T13:00:04 | 2019-03-31T13:00:04 | 178,686,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,096 | py | # -*- coding: utf-8 -*-
# pylint: disable=global-statement
"""
使用Lock来完成线程同步问题:
假定有一个资源: x = 0. 有两个线程分别对它进行加一和减一的操作
分别来看一看在使用和不使用Lock两种情况下的结果.
这里由于比较简单,暂时不涉及死锁的问题
原书中的代码看不出效果,所以稍微改动了一下,变成了:
temp = shared_resouce
time.sleep(SLEEP)
shared_resouce = temp ± 1
这样更能模拟出大规模IO操作中容易出现的问题
"""
import threading as td
import time... | [
"frostime@qq.com"
] | frostime@qq.com |
9270913e1aadb398181db8d611389d88ac63f6ee | cd393b90982621a73283f46f36303d1cdc6beed6 | /DocumentManager/urls.py | a81494b4cd5bde882d8c88d4d9cebfdca385b574 | [] | no_license | Srija0202/DocumentManager | a9b81176992b6f8fd4e2d5f48fdb86c633a82ad2 | cb9abd9b5b0a9e895ef71f3af8af3e7e7c2da113 | refs/heads/main | 2023-02-21T19:49:18.630428 | 2021-01-24T16:47:28 | 2021-01-24T16:47:28 | 332,500,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 807 | py | """DocumentManager URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cla... | [
"srija.viji02@gmail.com"
] | srija.viji02@gmail.com |
eaa4e8f591c41e60286a0c91ba2bf9b61edbe54d | 9c974edd8b0b733fb0eceeca6929bfc7053016e3 | /49.py | 15846455f882b377ac8ea420eae6ec6cef84c175 | [] | no_license | MaoYuwei/leetcode | df8ce2fdf73dffe737624f8d37a0f9263df87770 | 69478ccbf3323689cd22c3e64f39da642fe137d6 | refs/heads/master | 2020-03-22T07:40:35.530814 | 2019-08-02T03:12:31 | 2019-08-02T03:12:31 | 139,717,041 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 609 | py | class Solution(object):
def groupAnagrams(self, strs):
"""
:type strs: List[str]
:rtype: List[List[str]]
"""
dict = {}
for i in range(len(strs)):
s = strs[i]
key = ''.join(sorted(s))
if key in dict.keys():
dict[key]... | [
"maoyuwei@nuaa.edu.cn"
] | maoyuwei@nuaa.edu.cn |
74e9e43553f58b3728817e45fa27970e20971f7b | bdb4bbbffddb590dc5724578c43029aeb8dabf7d | /hexConverter/__init__.py | b84af2dae466ca83c41622b7d1c7c8ad2356246f | [] | no_license | cmgrass/hexConverter | ff2efac210bbc451b32706dd2596f53f1dd2da7b | 947df87d5535140c3b04ce23aedb2f467050246f | refs/heads/master | 2021-06-29T02:03:42.109052 | 2017-09-17T23:59:17 | 2017-09-17T23:59:17 | 103,870,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | def HexConvert(val):
print '0x%x' % val
| [
"C.grass@live.com"
] | C.grass@live.com |
6b822a81c52ad1a954af151406c8f6fad2de0bae | 2940f5416082dadd9c646cd9a46d2d0a99883efb | /venv/Lib/site-packages/networkx/testing/__init__.py | 884ac83d194f33d3597f6095678a2801e2c8fecc | [
"MIT"
] | permissive | tpike3/SugarScape | 4813e4fefbfb0a701f5913d74f045fd0eaed1942 | 39efe4007fba2b12b75c72f7795827a1f74d640b | refs/heads/main | 2021-06-20T03:55:46.288721 | 2021-01-20T17:06:35 | 2021-01-20T17:06:35 | 168,583,530 | 11 | 3 | MIT | 2021-01-20T17:19:53 | 2019-01-31T19:29:40 | Jupyter Notebook | UTF-8 | Python | false | false | 75 | py | from networkx.testing.utils import *
from networkx.testing.test import run
| [
"tpike3@gmu.edu"
] | tpike3@gmu.edu |
5d3bcc63abc0c9968c618acbbfdc663fb12925ce | 2ee18091d6d3c6503b84bb02c34b8d3513263897 | /workflow/models/svm.py | 95b7e83f8bf865c297f90b9dc1335e7b48e0b751 | [] | no_license | ml-in-programming/stan | 4aec0c2b50aa862afbaaf71f6092e5fb011db82c | 5b65947498d2fc2d570f35e11721b1a2ed3cd029 | refs/heads/master | 2021-09-20T17:31:40.569564 | 2018-08-13T13:47:13 | 2018-08-13T13:47:13 | 106,922,764 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,973 | py | from sklearn.svm import SVC
from sklearn.svm import LinearSVC
from sklearn.metrics import make_scorer, accuracy_score
from sklearn.model_selection import GridSearchCV
def train_svm_clf(x_train, y_train, x_test, y_test):
print("Start training...")
# Choose the type of classifier.
clf = SVC()
# Choose... | [
"msicar.ot.on.yas@gmail.com"
] | msicar.ot.on.yas@gmail.com |
60413c7f96d539ba2b325c06b0678d2f48db7667 | 1fe8d4133981e53e88abf633046060b56fae883e | /venv/lib/python3.8/site-packages/scipy/fft/setup.py | f0d5dade992f334540d4759fc4100bb1c8bdaf3c | [] | no_license | Akira331/flask-cifar10 | 6c49db8485038731ce67d23f0972b9574746c7a7 | 283e7a2867c77d4b6aba7aea9013bf241d35d76c | refs/heads/master | 2023-06-14T16:35:06.384755 | 2021-07-05T14:09:15 | 2021-07-05T14:09:15 | 382,864,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | version https://git-lfs.github.com/spec/v1
oid sha256:f32208914b4d7de0ea26596a8be64ef729f4cc5799cd04da84cd8f639c4796de
size 448
| [
"business030301@gmail.com"
] | business030301@gmail.com |
2f2f262f12cc55c8617cf3c83d6e386c3164b136 | 44558c3c48bd0de06cb4bc4b69b48285afc05457 | /division.py | 08519144eb722f03c836dc719dbcb504288757a6 | [] | no_license | sai-hardik/basic_python_programs | 3146881ccbe4c364da82e507f098122ab9b933d6 | 24310790cbfd1dea5c6355e6c31f71ceb85e06f1 | refs/heads/main | 2023-02-11T04:56:20.311758 | 2021-01-06T13:59:13 | 2021-01-06T13:59:13 | 327,323,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 12 10:47:06 2020
@author: babut
"""
num1 = int(input("enter num 1:"))
num2 = int(input("enter num 2:"))
result = num1 / num2
print(num1,"/ ",num2,"=",result)
| [
"noreply@github.com"
] | noreply@github.com |
313b916eceb943438635892f19c8c8346d695a15 | 68c9b0fae3e746ca7680e6eb9813939782df7833 | /day10/main.py | c030b9cabd12c745f0b1f220ea77b59954ee6b66 | [] | no_license | hannah-eichelsdoerfer/100DaysofPython | 87865e96e4484cb0b79561cb57a707537f3f916a | bd1f2b49879e54ce6bf9a3f746d377af25ab3e73 | refs/heads/main | 2023-06-30T06:48:40.455837 | 2021-07-28T17:43:21 | 2021-07-28T17:43:21 | 379,217,802 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,232 | py | # Day 10 Project - Calculator
from os import system, name
def clear():
# for windows
if name == 'nt':
_ = system('cls')
# for mac and linux(here, os.name is 'posix')
else:
_ = system('clear')
from art import logo
print(logo)
def add(a, b):
return a + b
def subtract(a, b):
return a - b
... | [
"hannaheichelsdoerfer@gmail.com"
] | hannaheichelsdoerfer@gmail.com |
3d331f23d39592b87f8fc2da3b412f8d427776ee | 7bfda985eb2ad12e07612440b02db56ad815ae0a | /MySpider02/MySpider02/items.py | 48c296899a7f6a40de91f5e9e370cff790dd0f3b | [
"MIT"
] | permissive | Piyuyang/scrapy_practice | a77e49de61aa45752b8d472f9ff17ac6a8b7c395 | ddcd1a6e2a50bd418b458bdd7cf6bb6f4326ce6d | refs/heads/master | 2020-07-14T21:46:52.921080 | 2019-08-30T15:48:05 | 2019-08-30T15:48:05 | 205,410,092 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class Myspider02Item(scrapy.Item):
title = scrapy.Field() # 标题
href = scrapy.Field() # 链接
source = scrapy.Field() # 来源
pub_time = sc... | [
"pi_yuyang@163.com"
] | pi_yuyang@163.com |
c0c27f1dda42e945520422a61f8a8788302aa29a | 797c9b0f08c71e51b94487f756e94c972735a70c | /liquipy/changeset.py | 07d0b73ef4fad4dc1abb0d94d9a062938f5e8681 | [
"Apache-2.0"
] | permissive | vitaly-krugl/liquipy | 00a3e560a9a7ab4b0622ec503ea10ed9cbe5e10f | 6c67b8ff7385d1c9690c2e04406bae0fe31d4664 | refs/heads/master | 2021-01-21T15:58:15.525429 | 2013-09-24T21:02:20 | 2013-09-24T21:02:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,535 | py | # Copyright 2013 Numenta
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, softwar... | [
"mtaylor@numenta.com"
] | mtaylor@numenta.com |
f91174c1662823ff91bef85a8e785e5e53198137 | 860fdc0a26a0c715e2b2544e2bbc474c2dd8669c | /timaverkefni/6-1.py | ead5c4c1174e49fe200b5e61a57bd4bff1c8a5bf | [] | no_license | Thorarinng/prog_01_kaflaverkefni | 0d7ebd3f5e6e503bd2c9041b718d6c43fa791792 | 39bd88bc82533e2bbfa35bea266735b0f13296f8 | refs/heads/master | 2020-04-01T14:35:44.952844 | 2018-10-16T12:01:40 | 2018-10-16T12:01:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | # s = input("Input a string: ")
# print("{} {} {}".format(s[:1],'', s[-1]))
s = input("Input a string: ")
print("{} {}".format(s[:1], s[-1])) | [
"futomatik@gmail.com"
] | futomatik@gmail.com |
0aba7fff0c8775fcabe8cbedc1b02a547850e4eb | a0f218eafbc459f9ba6603219a8d18366c79453a | /Filip/GTSRB/CNN_3/Testcases3/testcase2.py | f5dd7cf717ce6b830d92eeebfda23333344a9d0d | [] | no_license | PerJNilsson/Deep-learning-image-recognition | 634d48976bae16ec6e07e21c7f00e6fd979d6f67 | 28b4e267996f5f37f09a6eb4d6b26b464c263b5a | refs/heads/master | 2022-12-05T22:12:00.229546 | 2018-05-07T07:58:07 | 2018-05-07T07:58:07 | 118,593,152 | 4 | 2 | null | 2022-11-29T12:02:48 | 2018-01-23T10:12:50 | Python | UTF-8 | Python | false | false | 2,241 | py | import keras
from keras.layers import Dense, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras.models import Sequential
from keras.layers import Dropout
from keras.layers import BatchNormalization
from keras.callbacks import EarlyStopping
# C^2(5) P C^2(3) P
# Dropout on layer: FC layers
# Batch normali... | [
"filhei@student.chalmers.se"
] | filhei@student.chalmers.se |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.