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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3cb225f72576655ceb256774a37ab22d8364393f | 6a25171b9f0a6b47f844aa6f22538917c25c2a45 | /REST API - Tensorflow/server.py | c63739a4aeb3685b5a5fdd163b769146a99b8be0 | [
"MIT"
] | permissive | mauryas/DataScienceTasks | c37d52f88a03d7c15d7cbc7dff33084b24098138 | 78cd4c47067101128de668a641b999d6fb406ab8 | refs/heads/master | 2020-04-01T13:59:02.947765 | 2018-10-16T13:39:58 | 2018-10-16T13:39:58 | 153,275,401 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,715 | py | #%% Import Libraries
import flask
from model.model import ImageClassifier
import io
import numpy as np
import os
from sklearn.preprocessing import OneHotEncoder
import zipfile
from PIL import Image
import psutil
import logging
from config.config import IMG_COLS, IMG_ROWS, TO_TRAIN
# Setting logging file path
try:
... | [
"shivammaurya@outlook.com"
] | shivammaurya@outlook.com |
3ba25a861b7cc7b205249f2f68cddee66bca052e | 879c73341649ffe8e4df11ca40e78c9a76280f97 | /cityengine-mmk/scripts/mmkcegraph.py | ac20882941064cab4bb3599b3e87c07c4d560faa | [] | no_license | zhechkoz/MMK | 8f93ad0bbf74a9f9000f1d2993685a2108b95706 | a5675091dea43170992980a71f29e11afea5bfad | refs/heads/master | 2021-03-27T11:43:54.463922 | 2018-05-20T17:56:28 | 2018-05-20T20:19:01 | 99,523,207 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,591 | py | '''
Created on 03.11.2017
@author: zhechkoz
'''
import sys
import datetime
class CEGraph(object):
def __init__(self, project, author):
self.author = author
self.date = datetime.date.today()
self.project = project
self.nodes = {}
self.segments = {}
self.OSMOID = {}
... | [
"jechkoj@gmail.com"
] | jechkoj@gmail.com |
2f1f274dd1ad0310608a42872e14fff7fbf05b1f | c65dfb808e23263b8f3f703a4f31ea7e153b4efd | /tockstats.py | 62fa54d729eb6e180e8686f52ea5921fa2030dd9 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | 18F/quick-stats | 68fcd3bc9fde390f1a74a370f232dd8086865b07 | 400b48bcebea242ac574dd30f870ed1687c3b863 | refs/heads/master | 2021-01-17T06:08:00.304550 | 2016-07-27T16:09:22 | 2016-07-27T16:09:22 | 64,323,703 | 0 | 2 | null | 2016-08-08T15:25:00 | 2016-07-27T16:15:43 | Python | UTF-8 | Python | false | false | 1,030 | py | """Hours statistics from Tock exports"""
from collections import Counter
from csv import DictReader
import sys
def file_to_counter(filename):
"""Read CSV, convert it to a counter of hours by project"""
counter = Counter()
with open(filename) as csvfile:
reader = DictReader(csvfile)
for row... | [
"christopher.lubinski@gsa.gov"
] | christopher.lubinski@gsa.gov |
ceb3aeda4643e1231491fcb39994da2829556c49 | feec3e5576b2d54f59480ae99d30c7c814b1b66d | /mysite/polls/views.py | e72c41b6846b941879fb7fa44cfa49c0a1184935 | [] | no_license | Macielyoung/Seq2Seq-Chatbot | be32c18925d902b25b880906f76dace42a5a6449 | dae00f1001bf5033335890f16581ddddf96209b1 | refs/heads/master | 2020-04-16T01:11:49.994953 | 2019-01-22T08:12:20 | 2019-01-22T08:12:20 | 165,164,044 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | from django.shortcuts import render
from django.http import HttpResponse
from infer import SeqModel
import json
seq2seq = SeqModel()
metadata = seq2seq.load_data()
seq2seq.load_model(metadata)
# Create your views here.
def index(request):
query = request.GET.get('query', '')
qa_pair = {}
qa_pair['query'] = query
... | [
"maciel@yangwenyandeMacBook-Pro.local"
] | maciel@yangwenyandeMacBook-Pro.local |
560407d9be25f531ac76d887c37f045f78cda5f9 | 3636ccf637805558a841517fc85cb54c6ddd6985 | /virtual/bin/wheel | 3589919ddf4d44525cf25520ab3598c6ddc4fc20 | [
"MIT"
] | permissive | Chiuri254/pitch | db5497390241c15411c85c1eb454cef859c8d04d | fd49e9454a636f449fd4f109d4d55c5db5520325 | refs/heads/master | 2020-04-22T18:58:04.178490 | 2019-02-14T16:16:10 | 2019-02-14T16:16:10 | 169,743,427 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | #!/home/joseph/Videos/oneminite-master/virtual/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from wheel.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"joseshiory@gmail.com"
] | joseshiory@gmail.com | |
c7e5ffa9443909c4bd27e126568a6a404fd4a262 | 3e35a6b2d6ad60d62083081bbaed4e85fc3d29d0 | /hello.py | 502345209d8ab7c8b1088fbde830d67012ad09c0 | [] | no_license | issderek/first_rsp | 535d573bdc0da9189158ef43e9738344d73d11b0 | 7356ef71be080ef26eaf9fcf5227546005a978b6 | refs/heads/master | 2021-01-22T04:15:09.330104 | 2017-02-15T02:26:08 | 2017-02-15T02:26:08 | 81,522,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,275 | py | #coding:utf-8
import pandas as pd
import sys
reload(sys)
sys.setdefaultencoding('utf8')
ori_qa = pd.read_csv("qa.csv",header=None, sep=",")
querys = list(ori_qa[0])
answers = list(ori_qa[1])
you_str = "#".join(list(pd.read_csv("you.csv",header=None, sep=",")[0]))
#替换所有的称谓
for i in range(0,len(querys)):
querys[i] ... | [
"53200690@qq.com"
] | 53200690@qq.com |
805d18e7ddecffd215d64fb87ffd6e37dd42915a | 4e3099dc20145814e35d81cc7c58996d72bf0b32 | /venv/bin/django-admin.py | 8c2150c19370424ca7cfabcd728dfc1875d8cb3f | [] | no_license | eashwerks/evillage | 65e0c2a01cb7898e2c1873eb28fad2adf7ab7f23 | 5482765498ead600145bcf80c343a80657386140 | refs/heads/master | 2022-12-03T17:03:25.084567 | 2020-06-05T13:04:43 | 2020-06-05T13:04:43 | 266,114,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | #!/home/eashwerks/PycharmProjects/evillage/venv/bin/python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"eashwerks@gmail.com"
] | eashwerks@gmail.com |
89e8ab9227a0a50a720b819e974157d583e35762 | b5012bfee90c3974176c76bd55c89652be441d9c | /hackers.py | 59014634ed3ccebbec4acbb81d8f7ea453eaad14 | [] | no_license | Tuoppi1/School-work | 5affeb751d46df6a584236f62f6e6fb24eb22f9a | d5ce3be273c644013ae0341a7776792f86e1ffed | refs/heads/master | 2020-08-12T23:53:30.492774 | 2019-12-15T02:18:07 | 2019-12-15T02:18:07 | 214,868,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,097 | py | import re
import time
import requests
import matplotlib.pyplot as plt
# This program uses a russian proxy IP address
# Because i got banned from www.iplocate.io
# Current proxy worked for me at least
# Use your default IP address by removing proxies parameter from requests.get(url,proxies).json() (line 30)
file = o... | [
"noreply@github.com"
] | noreply@github.com |
16e6aad20191bccd6294c9578cb217ce79720b51 | a6beb7c6901d49493fe8c2bd7e001464af799a19 | /jd_goods/jd_goods/spiders/get_goods | 67742aab9a5aecacc3c624e207892303cc41b2c3 | [] | no_license | RokieProgramer/Scrapy_demo | 72b5b4f1ffa3abcf5cf7f5f138f1b1d4eda81fb3 | 3f5ebb70f975aa86494339f5ad43a9a3ff11bc35 | refs/heads/master | 2020-05-30T09:40:26.703200 | 2019-05-31T23:49:33 | 2019-05-31T23:49:33 | 189,652,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,572 | # -*- coding: utf-8 -*-
import scrapy
from jd_goods.items import JdGoodsItem
from urllib.parse import urlencode
import re
import json
class GetGoodsSpider(scrapy.Spider):
name = 'get_goods'
# allowed_domains = ['jd.com']
# https://search.jd.com/Search?keyword=huwwei_p30pro
def start_requests(self):
... | [
"noreply@github.com"
] | noreply@github.com | |
ba92d4f9f437fcf74daf2e0b5f28089408f310c4 | aaa06c63f0fba6c5aad5121d83715d0be828ce4e | /OpenStreetMap/models.py | 6746038957e195d82202ad40ba008a0f5667564b | [] | no_license | scotm/Comrade | b023b338f0daf5d083ae37e2e3a73d3d424f8a7c | c7186f00cd20916a78cc2282ea201f440102ebb7 | refs/heads/master | 2020-05-18T06:49:01.411310 | 2014-07-25T08:13:10 | 2014-07-25T08:13:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,658 | py | from django.contrib.gis.db import models
class BaseOsmModel(models.Model):
access = models.TextField(blank=True)
addr_housename = models.TextField(db_column='addr:housename', blank=True)
addr_housenumber = models.TextField(db_column='addr:housenumber', blank=True)
addr_interpolation = models.TextField... | [
"scott.scotm@gmail.com"
] | scott.scotm@gmail.com |
2a6a3d870dc598862aae7dc106fe09e8a905e679 | c52b749a1f41f43881cb53c02982c2379497ecb2 | /ecommerce/upstreet/store/admin.py | 3675c71296c7c82f09bae59a0fa4b708752e7dfb | [] | no_license | sureshkokkiri/CIDM6325 | 4349226e70d3e0dea382a7a4c76ad029570271c1 | f38c3657779b25ccbd9a53e904da5d9093d0848b | refs/heads/main | 2023-01-24T08:20:16.470959 | 2020-11-30T05:21:33 | 2020-11-30T05:21:33 | 301,221,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | from django.contrib import admin
#from parler.admin import TranslatableAdmin
from .models import Category, Product
# Register your models here.
@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
list_display = ['name', 'slug']
prepopulated_fields={'slug': ('name',)}
# return {'slug': ('name... | [
"westgree4@gmail.com"
] | westgree4@gmail.com |
c088978c79af6296316fa521727b2ebf9bb34d07 | 291c7ed825161973a2d8742f2f180f04ce6e2689 | /website/__init__.py | a55432fa42f2f76214b396a4257247662bb44e9c | [] | no_license | opoweiluo/E-commerce-for-small-business | ec1f870d7cadaffdcfe449e5b51e09a05c3a8f5b | 2ab617e1814259aac689579025c6af4775e4181b | refs/heads/main | 2022-12-27T00:33:14.023612 | 2020-10-13T01:42:51 | 2020-10-13T01:42:51 | 302,741,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629 | py | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from flask_login import LoginManager
from flask_bcrypt import Bcrypt
import pymysql
pymysql.install_as_MySQLdb()
app = Flask(__name__)
app.secret_key = 'david'
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:ro... | [
"noreply@github.com"
] | noreply@github.com |
6e3b1401ef59aa4c7b7b60c95643e0850ea06e69 | c9f710b342e0a2504f02ab8487d686ab9f2cff2b | /app/models/user.py | c93629ba2366c57f16871fb659b49cf4f3b6d62d | [] | no_license | kalsmic/SendIT_API_endpoints | 4c00394577a6fef1e8e88aa4943c35ae35343a55 | 91ba3e6258ae323f234e2f1aa1346bb4e061f31d | refs/heads/develop | 2022-12-18T01:39:11.557734 | 2018-11-19T05:38:48 | 2018-11-19T05:38:48 | 156,332,638 | 0 | 0 | null | 2022-12-08T01:23:14 | 2018-11-06T05:50:50 | null | UTF-8 | Python | false | false | 738 | py | # users.py
""" Module contains Data structure for a User"""
class User:
"""class defines the user data structure"""
def __init__(self, id, user_name):
self.id = id
self.userName = user_name
def __str__(self):
return "User(id='%s',username='%s')" % (self.id, self.userName)
users... | [
"kalulearthur@gmail.com"
] | kalulearthur@gmail.com |
b5ffffc779bb9a663018d7d61a89415f02b6c32a | 3f9163cc45befbc20b19a19bf1fd875b483c2965 | /python/paddle/distributed/passes/auto_parallel_gradient_merge.py | bc40dad8ac0d9a69f37ef6d6704bd644b87522cc | [
"Apache-2.0"
] | permissive | forschumi/Paddle | 27926b1ddb76be08dc3f768df787fc9a4078f8e4 | 58d2949d6d2a1689e17527fb501d69c3501adf9f | refs/heads/develop | 2022-07-04T03:07:52.446858 | 2022-06-05T11:44:04 | 2022-06-05T11:44:04 | 83,878,029 | 0 | 0 | null | 2017-03-04T08:11:50 | 2017-03-04T08:11:49 | null | UTF-8 | Python | false | false | 14,250 | py | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# 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 appli... | [
"noreply@github.com"
] | noreply@github.com |
a596bb3c9d9652d2ae7143f07e2a8838190af2e0 | 08b9e2128236a37df530d6afa5d127b7d2a28b95 | /test/test.py | 85bff6c475551aa6698d5c9525f433377c736b53 | [] | no_license | glebLit/Chat | c1889679ae3989efdc313a4fede5cadba94a91c0 | 271866dd1841235ba5e856cd14cb32627a6e91ac | refs/heads/master | 2021-08-23T22:06:12.105637 | 2017-12-06T19:42:59 | 2017-12-06T19:42:59 | 109,710,943 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,149 | py | #!/usr/bin/env python
import unittest
import urllib2
import time
from flask import Flask
from flask_socketio import SocketIO, emit
from socketIO_client import SocketIO, LoggingNamespace
from socketio import packet
import socket
app = Flask(__name__)
class FlaskTests(unittest.TestCase):
global result
result = ... | [
"gleb19960@yandex.ru"
] | gleb19960@yandex.ru |
ca06edde0b5cfd9aac6613d1fe1529f2a76675e1 | ad23346ae1a2c47446c7ef3363ac28192a7598ad | /rover_ws/build/catkin_tools_prebuild/catkin_generated/pkg.installspace.context.pc.py | a9c0976f9c91a358d3ddc0f7899fed4f0abe8126 | [] | no_license | michaeldibono/mini-rover-backup | 5c24e307e9a546bbdf7371b2a684f6cc006af4ab | 1d9fb172c75289eb69fc22d2bc28030d1a138e5e | refs/heads/master | 2021-01-18T18:36:43.353374 | 2017-08-16T18:15:20 | 2017-08-16T18:15:20 | 100,519,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "catkin_tools_prebuild"
PROJECT_SPACE_... | [
"yetan@fiu.edu"
] | yetan@fiu.edu |
633f383970cec190025bf934ec1d356e6c1d9a65 | 3823bfba09bbb1bc0f525a241283df3cb6b97615 | /scrapyprj/replay/ZipUtility.py | 742983d59edfb0b637490abcd6254bdb2f2d1a06 | [] | no_license | alexmason528/torforum_crawler | ed3a585dd7b454ad71b021f3014f40a48b38c1e9 | 70964905d79818501c9fc32d3e6417dcc6eaa828 | refs/heads/master | 2020-03-19T01:04:25.914342 | 2018-05-29T18:24:36 | 2018-05-29T18:24:36 | 135,520,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,584 | py | import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
try:
import zlib
del zlib
_ZLIB_SUPPORTED = True
except ImportError:
_ZLIB_SUPPORTED = False
try:
import bz2
del bz2
_BZ2_SUPPORTED = True
except ImportError:
_BZ2_SUPPORTED = Fa... | [
"steven@gilligan.io"
] | steven@gilligan.io |
bf96a09a63a04c6313e4811b636283950b097e22 | ef0aed73e99562d86250e13eb9d0bcf2cf6b2229 | /main.py | 1d89ca3a79e87bdc03d5f61afbed1c0ec61977d5 | [] | no_license | HuesodeDurazno/MagicPoemModel | 38869dfed4ea82515eddf9207693b68facfcbd5d | 30b3058c342c8051cf1084cf4c208b0b0c5f3576 | refs/heads/main | 2023-09-01T10:43:34.852352 | 2021-10-26T22:42:38 | 2021-10-26T22:42:38 | 421,604,862 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | import os
import numpy as np
import re
import spacy
import urllib.request
def poem_generator(file, word, n_sents=4):
nlp = spacy.load("es")
init_str = nlp(word)
| [
"ivanwhite230@gmail.com"
] | ivanwhite230@gmail.com |
d0fd9ae97dd8894464641a2387bc5db31a6ea3a3 | 04bd3387ed96a9856c14f76e3022171305203a72 | /GetPopuler.py | 348fc46c31c5691ec2af8fdeaedfdaec2f02e79d | [] | no_license | Yashwant94308/ATG-Selenium | bb3fff41b642951db3b5ab605d524ddcee4794f1 | 39424bee93e49f752105dd35311c2569e1a2de43 | refs/heads/master | 2023-05-26T04:36:58.998935 | 2021-05-29T08:34:26 | 2021-05-29T08:34:26 | 371,921,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | import requests, json
response = requests.get(
'https://www.flickr.com/services/rest/?method=flickr.photos.getPopular&api_key=22a1377a56b4c384b61b723a80a73492'
'&user_id=193065083%40N04&format=json&nojsoncallback=1')
print(response.json())
| [
"yashwant94308@gmail.com"
] | yashwant94308@gmail.com |
174769dec8a2daec7c96b080ca6fe9f8c1de0b45 | 22af8fd63f53ead6cf92fd1628025d95859f0942 | /emplay/wsgi.py | bc70109ee95562f413bf5ce87b1880b3b69f8b6e | [] | no_license | alok162/EMPLAY-PRO | dd2e076ce381182719f599c23f5bc402c4629d93 | 345fae1c41067c674de542450b011967b9f2328c | refs/heads/master | 2020-03-19T17:04:47.598527 | 2018-06-13T05:11:02 | 2018-06-13T05:11:02 | 136,743,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | """
WSGI config for emplay 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.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTIN... | [
"alok@Aloks-MacBook-Pro.local"
] | alok@Aloks-MacBook-Pro.local |
204a504cca4f179ed50d214b89f4d43b0f58d0eb | 9a8878b48bafaac3877a2354e070b85dd7ec00f0 | /EDPC/B_frog2.py | 77d8b927688d8ba2a9cdf4b512d7e3a9e2ea5864 | [] | no_license | ikikohei/atcoder | 5505506a20f15cb32821d43b592e3fc9ee44dafe | 9fe585e8554cd19a9d04aa4d9c2e7531e6586fcb | refs/heads/master | 2023-05-31T22:01:01.734021 | 2021-06-26T14:13:02 | 2021-06-26T14:13:02 | 311,360,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | def DPmethodForFrog2(N,h,K):
max_val = 10000000000
dp = [max_val]*(10**5 + 1)
dp[0] = 0
for i in range(N-1):
# if i+1 <= K:
# for j in range(i+1):
# if dp[i+1] > dp[j]+abs(h[i+1] - h[j]):
# dp[i+1] = dp[j] + abs(h[i+1]-h[j])
# else:
... | [
"i.k0712r@gmail.com"
] | i.k0712r@gmail.com |
0a9807695a6b48465c8bcda0fe72456b4e3a34b2 | 284d0cfb0d62bcbd1b5ec42cdafef0ff0c776231 | /Imaging_Jellies/src/camera_test/camera_noise_test.py | 0d7d13e7237949eebc310b9cdc222eec31e9cf3b | [] | no_license | nicolewxu/BE107_ProjectGroup3_Jellyfish | d7e082f2279fa44e024d69be48cb9f2c046db0df | 631b59fdd02d18acbbdd9d90161fbed829def94f | refs/heads/master | 2020-12-24T13:20:59.944454 | 2015-05-26T06:50:47 | 2015-05-26T06:50:47 | 35,862,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,912 | py | import cv2
import os
import numpy as np
import cPickle
def main():
#move_pics()
#make_avg_background()
#find_contours_with_background()
find_contours_with_adaptive_thresholding()
find_contours_with_otsu_thresholding()
#find_contours_vanilla()
def move_pics():
pics = dict()
for folder in ['fly_with_food_still... | [
"nicolewxu@dhcp-7-245.caltech.edu"
] | nicolewxu@dhcp-7-245.caltech.edu |
d47dec240304cb46afa238c6d1e46db1d150dbf4 | 8d9e9f5e3246ea3c682b81c6a8c9578dd4e0666b | /max_soft_function.py | 272135a948561debcd22f51eb1c589849c64aa25 | [] | no_license | defunSM/python-machine-learning | f9df9e32b8c28b58410203a2300f31935f6477b5 | 21eb73491e0526b6b654df00a70fe66869837b23 | refs/heads/master | 2021-01-12T08:58:07.509854 | 2017-06-01T11:22:15 | 2017-06-01T11:22:15 | 76,738,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 320 | py | #!/usr/bin/env python
import sys, os
import numpy as np
def maxsoftfunc(x):
return np.exp(x) / np.sum(np.exp(x))
def main():
array = [0.1, 1.1, 2.1]
ans = maxsoftfunc(array)
print(ans)
total = 0
for i in ans:
total += i
print(total)
if __name__=="__main__":
main()
| [
"sxh8083@g.rit.edu"
] | sxh8083@g.rit.edu |
db2053ff6088956d37ca5a3a875a95d76e48daa4 | e08f10a7469868f44a3cc5278033d4fd19b36598 | /collection-old.py | f9b812733fa7253152c1f837adeda1807b1fea90 | [
"MIT"
] | permissive | neal-rogers/baseball-card-inventory | 4498cadd444755afcf8b3d7c1ee2825264de40ce | 9940ba746072892961b7ade586e63f7deb26d2e6 | refs/heads/master | 2020-12-25T23:18:48.513129 | 2017-02-19T00:45:32 | 2017-02-19T00:45:32 | 34,287,900 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,874 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is a simple baseball card inventory system."""
import graphx, csv, json, os
def check_file(self):
"""Args:
None.
Returns:
something() = stuff.
Examples:
>>>
"""
if os.path.isfile('data\cards.json'):
prin... | [
"neal.rogers@spsmail.cuny.edu"
] | neal.rogers@spsmail.cuny.edu |
b6f35c1a1ea83e61d21732c084d936b0869d821b | 401f694fd838a88b7782ab3fb80fe687a0268082 | /InterpreterDebugger/demo_script.py | 9a30fc19b36c28932359006b406607b0405fef40 | [
"MIT",
"Python-2.0"
] | permissive | rockobonaparte/cloaca | 8871f46ebcd1d018be2a61b5775daa65444ee0eb | f2b28cb77faaeca736bb0cf286361dd96f362789 | refs/heads/master | 2022-10-22T08:46:36.872543 | 2022-10-08T19:21:06 | 2022-10-08T19:21:06 | 175,341,337 | 4 | 4 | null | 2020-05-15T11:57:02 | 2019-03-13T03:42:17 | C# | UTF-8 | Python | false | false | 65 | py | import heapq
heapq.heapify([0, 9, 1, 8, 7, 3])
print("Done!")
| [
"adam.preble@gmail.com"
] | adam.preble@gmail.com |
5ddbda28127ab2fb18249701f06df9c1649219a4 | 8fe781f8ac5b1c1d5214ac5a87c5ad855f791a6d | /src/clean_data.py | 90720e0134fea7776aa816fbd08598bb52e51b1b | [] | no_license | ternaus/kaggle_ultrasound | fabf45b89f5ab0888bb22e9b5205d90b14ce8f06 | 2d688d0cea8e2b1651980e972b1d6400b797c70b | refs/heads/master | 2021-01-11T15:48:19.835115 | 2016-08-20T01:47:37 | 2016-08-20T01:47:37 | 64,818,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,349 | py | from __future__ import division
"""
This script makes train data less noisy in a way:
Finds similar images assigns to these clusters of images max mask
"""
import networkx as nx
import os
import pandas as pd
from tqdm import tqdm
from PIL import Image
import glob
import pandas as pd
import cv2
import os
import numpy... | [
"iglovikov@gmail.com"
] | iglovikov@gmail.com |
f502a1ab4fbd3fb3c402deb9bcb0a91171c04ca9 | 3ea75e35408de10bba250f52120b5424bd50fdd9 | /py/plotSigzFunc.py | 21812552da7cc7dfcdf7898e0e091f012d051cf2 | [] | no_license | jobovy/segue-maps | 9848fe59ee24a11a751df4f8855c40f2480aef23 | ed20b1058a98618700a20da5aa9b5ebd2ea7719b | refs/heads/main | 2022-11-30T15:27:08.079999 | 2016-12-20T04:28:26 | 2016-12-20T04:28:26 | 40,663,061 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,199 | py | import os, os.path
import math
import numpy
import cPickle as pickle
from matplotlib import pyplot
from optparse import OptionParser
from scipy import optimize, special
from galpy.util import bovy_coords, bovy_plot
def plotSigzFunc(parser):
(options,args)= parser.parse_args()
if len(args) == 0:
parser.p... | [
"jo.bovy@gmail.com"
] | jo.bovy@gmail.com |
6a71b1c6d6048d65ec434b7db6b8ca6701671ae5 | 8d1237874cceee240d605edc0caa4ac5255d040e | /HW4/example-ptt(version dict).py | b51264fe5da721ebace4a993db6d7de471b097f7 | [] | no_license | fatwinnie/Sam_Test | 545f9c7f4782d7e279a2aafd3278e58b8272ee23 | 3ba99bd3d21baeb74b94c703edcad1d480b99661 | refs/heads/master | 2022-12-27T16:06:47.323058 | 2020-10-16T09:51:44 | 2020-10-16T09:51:44 | 287,498,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py | import requests
from bs4 import BeautifulSoup
import numpy as np
import pandas as pd
url = "https://www.ptt.cc/bbs/joke/index.html"
response = requests.get(url)
html_doc = response.text # text 屬性就是 html檔案
soup = BeautifulSoup(response.text, "html.parser")
post_author = [] #建立一個空的 list 放作者 id
recommend = [] # 放推文數
p... | [
"noreply@github.com"
] | noreply@github.com |
458365ada1fd265704f15bcdea4a1b43e2126cfb | 57c0b710086538c41a119d1866a71705c43ea2d9 | /Face and Feature Detection/detectfacescircle.py | 7ca145d58a9f47d937dfedf8341858d2ad7b91d5 | [] | no_license | AlokRanjanBhoi/pencv-For-Python | 3bf171790f5c0bb50553eba6b0cd3a0252bdcd67 | 087150f6c1c486e3b136e8d71e140241d83c67cf | refs/heads/master | 2020-04-08T02:00:31.737585 | 2018-12-27T16:41:10 | 2018-12-27T16:41:10 | 158,918,641 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | import numpy as np
import cv2
img = cv2.imread("faces.jpg",1)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
path = "haarcascade_eye.xml"
eye_cascade = cv2.CascadeClassifier(path)
eyes = eye_cascade.detectMultiScale(gray, scaleFactor=1.02,minNeighbors=20,minSize=(10,10))
print(len(eyes))
for (x,y,w,h) in ey... | [
"noreply@github.com"
] | noreply@github.com |
3a5877287dae4f76c16aa6d37576640de2e97602 | 127cdebd60c1c439f559c1f711d071c0d920d131 | /leilei/cainiao.py | d88ffe7d7fa247568fd80458973cfb4e750a4fe7 | [] | no_license | fei2yi/mytoos | b13660af90b2a4029bbb9fd292961d8007e856c8 | 9901e33a0a19f1ac0bf19f7b7c7b2eb0e58b96b0 | refs/heads/master | 2020-04-08T18:27:59.262780 | 2019-05-16T03:45:02 | 2019-05-16T03:45:02 | 159,609,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,127 | py | import xlrd
from win32com import client as wc
from docx import Document
kinship,amend = {},{}
name,num,mynum,col_index,margin,mf_list,ROW = [],[],[],[],[],[],[]
# def doSaveAas():
# word = wc.Dispatch('Word.Application')
# doc = word.Documents.Open(u'aaaa.doc') # 目标路径下的文件
# doc.SaveAs(u'E:\\bin\\tuokoulv\\aaaa.docx', ... | [
"415923506@qq.com"
] | 415923506@qq.com |
7b1ce87dae5357070654d64c13e0421c247e54da | 51f886e82c1b670d2202e9e2dee9ae7e776f55ad | /HITB-XCTF 2018/WEB/Python's revenge/run.py | ff9357baaba52f64c3568293733c5bb94d5dd212 | [] | no_license | kankanhua/CTFS | e2249699c0c8096b3362fd7b79add6fa897fffa9 | 2ea1cedbd124e9136e28ad77d5173524a90ee0b3 | refs/heads/master | 2020-04-03T01:19:05.281002 | 2018-07-09T13:20:57 | 2018-07-09T13:20:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 80 | py | #!flask/bin/python
from app import *
if __name__ == "__main__":
app.run() | [
"523279238@qq.com"
] | 523279238@qq.com |
bcf521a2c46390f05edb564682e5fe27c896efd1 | 7a1085aa658114bacc3889c1c7d92d1d6e411159 | /thread_cls.py | 06dbbfe502d83a277367c7634480f01650c20699 | [] | no_license | huahuijay/class3 | cc66956ba13006e832a722aff560225df9c5b3f2 | 0551f4a64f5748d396d44f0915e5f9fea110f966 | refs/heads/master | 2021-01-11T02:00:20.122088 | 2016-10-13T15:03:01 | 2016-10-13T15:03:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 622 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import Queue
import threading
import time
ip_queue = Queue.Queue()
class Ping(object):
def __call__(self):
while 1:
if not ip_queue.qsize():
break
ip = ip_queue.get()
time.sleep(1)
print ip
if __n... | [
"peng.luo@idiaoyan.com"
] | peng.luo@idiaoyan.com |
28bf8e32b2fc71691571cc473c7d4d6c7cefcf3a | fe98f7502a5724be0ec7ec3ae73ff4703d299d6e | /Neural Tree/data.py | 1b85e274b45f66319d308125e39f23e90bf4375f | [] | no_license | SoumitraAgarwal/BTP | 92ab095aacf3dd374148f40b9e777bb49c4253f1 | 07df960ad7e8680680a9d3494c8a860b394867d1 | refs/heads/master | 2020-03-16T12:39:13.548988 | 2018-05-09T06:09:11 | 2018-05-09T06:09:11 | 132,671,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,513 | py | import random
import math
import pandas as pd
import numpy as np
from sklearn import preprocessing
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import axes3d, Axes3D
plt.switch_backend('agg')
random.seed(311)
def generate(radius, centre):
alpha = 2 * math.pi * random.random()... | [
"agarwalsoumitra1504@gmail.com"
] | agarwalsoumitra1504@gmail.com |
dd84a0764d1cd38b85cddd32caf67859a5427497 | 4ac77337083c7fdb28a901831003cfd0e0ef7bf1 | /any_urlfield/models/fields.py | 2d6a67b84cb2f887d661bd1a22600a432304957f | [
"Apache-2.0"
] | permissive | borgstrom/django-any-urlfield | deb6a10b87c26f53bb3ca5085d486238ab6c2a6c | 3f97bfd628a5770268b715ee8f796aaab89cf841 | refs/heads/master | 2020-12-11T02:13:14.725873 | 2013-12-12T21:55:12 | 2013-12-12T21:55:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,655 | py | """
Custom model fields to link to CMS content.
"""
from django.core.exceptions import ValidationError
from django.core.validators import URLValidator
from django.db import models
from any_urlfield.models.values import AnyUrlValue
from any_urlfield.registry import UrlTypeRegistry
class AnyUrlField(models.CharField):
... | [
"vdboor@edoburu.nl"
] | vdboor@edoburu.nl |
ef3d990361a736c2c8243ef71653066e995e9f04 | a1c7b21d96d6326790831b2b3115fcd2563655a4 | /pylidc/__init__.py | 95c187456f43a5b9aafdc6d2673def316432c058 | [
"MIT"
] | permissive | jovsa/pylidc | 3837b17fbe02bc60817081a349681612f24b2f81 | bd378a60a4b0e6dfb569afb25c3dfcbbcd169550 | refs/heads/master | 2021-06-13T02:45:41.359793 | 2017-03-10T23:14:57 | 2017-03-10T23:14:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,068 | py | """
--------------------------------------------------------
Author: Matt Hancock, not.matt.hancock@gmail.com
--------------------------------------------------------
This python module implements an (ORM) object relational mapping
to an sqlite database containing the annotation information from
the XML files provid... | [
"mhancock743@gmail.com"
] | mhancock743@gmail.com |
13cd0c8c3642448ab20d30e377b9836c2e2b3b0f | 7a4ed01a40e8d79126b26f5e8fca43c8e61e78fd | /Python Built-in Modules/Python Itertools Module/1.Infinite Iterators/1.3.repeat()/1.Example_Of_repeat.py | b1c087d52f7e27726d3536cbc8a9c1f00b84432f | [] | no_license | satyam-seth-learnings/python_learning | 5a7f75bb613dcd7fedc31a1567a434039b9417f8 | 7e76c03e94f5c314dcf1bfae6f26b4a8a6e658da | refs/heads/main | 2023-08-25T14:08:11.423875 | 2021-10-09T13:00:49 | 2021-10-09T13:00:49 | 333,840,032 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 102 | py | from itertools import repeat
print ("Printing the numbers repeatedly : ")
print (list(repeat(25, 4))) | [
"satyam1998.1998@gmail.com"
] | satyam1998.1998@gmail.com |
8bf5be3241894ee6b7a5f6ec3ba7cdc9946a56f7 | 57e1c170b3721e2c4f9529415b0c015d0de91ff1 | /utils.py | 675248601b525ba2ea93060751236375ab0ed512 | [] | no_license | sobadrush/DockerDev-ReadCsv2Excel | 3b849222f7cd0a64fed423df1ff179cdfc5f9794 | 4e1d1c088f6da9a34473987f8c671965b3829d7e | refs/heads/main | 2023-09-05T10:00:37.796979 | 2021-11-22T07:50:41 | 2021-11-22T07:50:41 | 417,730,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 886 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def plus(a, b):
return a + b
def handleMemo(_list):
if len(_list) == 1 or _list[0] == '':
return
# for idx, val in enumerate(tempLine):
# if idx >= 4:
# tempLine[idx] = val.replace(" ", ",")
# return tempLine
# ref. ht... | [
"sobadrush@icloud.com"
] | sobadrush@icloud.com |
015abfc9ea79a4582643af75018f4ff2b5c66e16 | 97b87984b70021730df04bac0b5cf1d076bf4592 | /quartile.py | cbbe94b69dd22d55559ef291addce60772d64294 | [] | no_license | ayush-ruel/Statistics | 0bcede4691e861ec45e4b4d2f3d9274e071b6b78 | 1f2ba99d685c8a0a224d41b9cb46dc6b255f5a8f | refs/heads/master | 2020-04-23T18:02:54.940588 | 2019-02-26T21:59:03 | 2019-02-26T21:59:03 | 171,353,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | from statistics import median
n=int(input())
arr=[int(x) for x in input().split()]
arr.sort()
t=int(len(arr)/2)
if len(arr)%2==0:
L=arr[:t]
U=arr[t:]
else:
L=arr[:t]
U=arr[t+1:]
print(int(median(L)))
print(int(median(arr)))
print(int(median(U)))
| [
"noreply@github.com"
] | noreply@github.com |
ac8bb2b49f625d413a32f8fef679bc03ce802ab6 | ade22d64b99e7306eaeaf06684cc9c4f2d539881 | /oscquintette/tests/v1/test_plugin.py | 36de987851507a942e89237853e783acf38e25f1 | [
"Apache-2.0"
] | permissive | dtroyer/osc-quintette | 59204e4ad2e25be237fb3ec13cbb5087518197d6 | e37585936b1db9e87ab52e11e714afaf167a0039 | refs/heads/master | 2020-04-04T22:57:54.745055 | 2015-01-15T06:42:16 | 2015-01-15T06:42:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,266 | py | # 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, software
# distrib... | [
"dtroyer@gmail.com"
] | dtroyer@gmail.com |
40a3d067d1e3b7a8dc8e422b14866b6111bd77a8 | 3e9ac661325657664f3f7fa26ff2edf5310a8341 | /python/demo100/15.py | 82e514ce0d7a6957012d7aafb52d784906df006e | [] | no_license | JollenWang/study | 47d1c22a6e15cb82d0ecfc6f43e32e3c61fbad36 | 660a47fd60dd1415f71da362232d710b322b932f | refs/heads/master | 2020-06-15T23:53:37.625988 | 2017-04-21T11:18:20 | 2017-04-21T11:18:20 | 75,257,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | #!/usr/bin/python
#-*- coding:utf-8 -*-
#author : Jollen Wang
#date : 2016/05/10
#version: 1.0
'''
题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。
'''
def main():
score = int(raw_input("$>Enter the score:"))
print "grade=",
if score >= 90:
print "A"
elif score >= 60:
pri... | [
"jollen_wang@163.com"
] | jollen_wang@163.com |
64a5d750a89fb054c3e4071ed1214595cb22f90c | 5acc62ab7c37bc2aa5b2e7eedc8c0960b37bda7b | /setup.py | ef25940cc4b5a049843c0c1d65b07ed48d136ecb | [
"MIT"
] | permissive | DanWertheimer/pyJDBCConnector | 6476a3039ec0ba7a957e28744a869a0cfe859c41 | 41d7121fefb51692f1cec9bfc464de448bfc159f | refs/heads/master | 2022-08-29T00:30:42.744437 | 2020-05-20T10:19:34 | 2020-05-20T10:19:34 | 264,123,305 | 2 | 0 | MIT | 2020-05-19T14:14:32 | 2020-05-15T07:12:19 | Python | UTF-8 | Python | false | false | 1,675 | py | import setuptools
from pyjdbcconnector import __version__
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setuptools.setup(
name='pyjdbcconne... | [
"Daniel.Wertheimer@absa.africa"
] | Daniel.Wertheimer@absa.africa |
45b764bb9a978270fd4f4004643081df442084c4 | 8531e93ea9a499804da4606499dfb258efc4ed3c | /speechToText.py | 5d0edc8dad0fe274ac651a8c210f34be183b1a8c | [] | no_license | marblefactory/Speech-to-Text | a09ce4fe9276af89200ee1dcc1a85f6ef68a07b5 | 8888561bbbe27a41594ab27da64f6281d9dc0fc0 | refs/heads/master | 2021-07-20T23:57:10.949806 | 2017-10-30T12:47:22 | 2017-10-30T12:47:22 | 108,848,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 839 | py | import speech_recognition as sr
r = sr.Recognizer()
m = sr.Microphone()
try:
print("Geting ambinent noise")
with m as source: r.adjust_for_ambient_noise(source)
print("Energy threshold established")
while True:
print("Say something:")
with m as source: audio = r.listen(source)
... | [
"c.leathart@hotmail.co.uk"
] | c.leathart@hotmail.co.uk |
6e1df05610ec9c28d74938442be383a7185cc1d9 | d1820a2b617f0ebb1c60f5f258bd8a844bd660d3 | /schedule/models/route.py | b6edf5c88fd2f300488236fc29d6f820544d1c52 | [] | no_license | sfrieson/subway | 0db4a8b9ef60bcb9c62803c0c9a28e6dbb8e6fc1 | 7f4252d12b7d5a935188dba359579849da008397 | refs/heads/master | 2020-03-26T04:36:27.977293 | 2018-09-09T11:35:17 | 2018-09-09T11:35:17 | 144,512,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | from lib import db
def get(route_id):
return db.get_one("SELECT * FROM routes where route_id = '%s';" % route_id)
def get_paths(route_id):
return db.get_many("""
SELECT
shape_id, points.point_id, shape_pt_sequence, point_lon, point_lat
FROM
shapes
JOIN points... | [
"sfrieson@gmail.com"
] | sfrieson@gmail.com |
8c4a5643db05aa582d6890691f9259ba39448975 | 455ce0c304e4a9f080862cb8459066ac741f3d38 | /day06/funcAsVar.py | abdfe02a2e1454e4e58302d9b697a4725542a345 | [] | no_license | venkatram64/python3_work | 23a835b0f8f690ca167e74bbbe94f46e3bd8c99f | 754f42f6fa2be4446264a8e2532abd55213af4df | refs/heads/master | 2021-06-15T22:41:31.031925 | 2021-02-16T04:56:50 | 2021-02-16T04:56:50 | 153,217,220 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | def square(num):
return num * num
s = square # function is assigned to a variable, and later can be excuted
print(s(5)) | [
"venkat.veerareddy@hotmail.com"
] | venkat.veerareddy@hotmail.com |
2129c72f2a51f1fe14350be0ad03e9f24634a8fb | ccb7633dae1393b546a189e0fd513665fae3e49f | /lambda/lambda_function.py | 56e022fca38257a6b11f88d467cc74fffe8ec3e3 | [] | no_license | rahulsinha036/Weather-API-Alexa-Skill | 65003976b119aaa0f154a9df52fcd0fa816f39eb | d07bf560f62a3c351e5d78111a310ff2b68ce46b | refs/heads/master | 2022-12-25T05:34:51.151714 | 2020-09-27T10:35:09 | 2020-09-27T10:35:09 | 299,008,011 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,801 | py | # -*- coding: utf-8 -*-
# This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK for Python.
# Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management,
# session persistence, api calls, and more.
# This sample is built using the ... | [
"noreply@github.com"
] | noreply@github.com |
e9c684dd4c93afc3e080a8243908e154b3b2ebeb | ff4fc5ffab9143e5440ae78415b1128429530a5f | /knowledge_files/函数列表.py | ee836d26dae015ce05eb4a8b6fc3c47366260076 | [] | no_license | LyuuuuXinwei/knowledge | 4ee2a4cdc5007430ca6ef09a1368604b89deead0 | 218f1c903bc8113b70fd4997e5f5349a86263153 | refs/heads/master | 2021-01-20T01:50:04.702084 | 2018-02-08T16:18:48 | 2018-02-08T16:18:48 | 101,301,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,136 | py |
match_ # 正则检查需要被变复数的单词
apply_ # 以正则方式替换
import re
def match_sxz(noun):
return re.search('[sxz]$', noun)
def apply_sxz(noun):
return re.sub('$', 'es', noun)
'''rules函数列表'''
rules = ((match_sxz, apply_sxz),
(match_h, apply_h),
(match_y, apply_y),
(match_default, apply_default)
)
def plural(nou... | [
"416626614@qq.com"
] | 416626614@qq.com |
d476c12d19016fedb10bf55bbe245feb207b93ac | 971e0efcc68b8f7cfb1040c38008426f7bcf9d2e | /tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_Lag1Trend_NoCycle_NoAR.py | ff7ef11eee723d83fe871324617d9665f298f2bc | [
"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 | 154 | py | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Quantization'] , ['Lag1Trend'] , ['NoCycle'] , ['NoAR'] ); | [
"antoine.carme@laposte.net"
] | antoine.carme@laposte.net |
9207c0d477fcdff3fdfc7421a7da2c788d2c36af | 38b5f3ad3ff93342c817b74e7b315f06dd077119 | /exec27.py | 14ae0f84658618befe9a7b0257f2663c1df63854 | [] | no_license | xXxDevBR/Python-Exercicios | abff6e2fcc48b27db11d68ba375916413ca90edc | aaa2c1608f258023adb1d56370a9d8c596ef458e | refs/heads/master | 2020-04-16T10:50:38.294074 | 2019-01-13T15:17:28 | 2019-01-13T15:17:28 | 165,518,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | nome = str(input('Digite seu nome: ')).strip().split()
print('Seu primeiro nome é {}'.format(nome[0]))
print('Seu último nome é {}'.format(nome[len(nome)-1]))
| [
"xXxDevBR@clashoverdrive245@protonmail.com"
] | xXxDevBR@clashoverdrive245@protonmail.com |
debd832aa46efe641d1cd44a23481c762f2593d0 | eb874c1b263a1db2f7beb04b08d51a5b0f6ad8e8 | /dcl_main.py | d8d844d6508f216dc70b4286a3389fafcbe761c9 | [] | no_license | freekang/DCL-1 | 2c89d5b07767864819709118f06f1e34465c5c5d | 63f30e282716a22a922c29e4f3b5e5f81696dbb0 | refs/heads/main | 2023-04-03T14:29:45.764790 | 2021-04-11T02:53:20 | 2021-04-11T02:53:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,652 | py | import os
import sys
import torch
import yaml
# from torchvision import datasets
from models.mlp_head import MLPHead
from models.bert_base_network import BertNet
from trainer import BertBYOLTrainer
from dataclasses import dataclass, field
from typing import Optional
import logging
# os.environ['CUDA_DEVICE_ORDER'] = 'P... | [
"852975133@qq.com"
] | 852975133@qq.com |
21ac7b8bd278492a0c7324f8fe0d272953855df9 | 67dbbe74262b95ddce44287967d7dd7af393a60b | /web_deploy/__init__.py | bfa0f3ffe8e23bb2df5f913dedc9ed52dfdb19f2 | [
"Apache-2.0"
] | permissive | ygavenchuk/web-deploy | 444b93e70ffa8ba848992f7cfd2a68cae0f5fb01 | 2a1cc0931a931a68114c535af3b508fc01f00684 | refs/heads/master | 2021-01-01T19:21:17.094038 | 2015-07-06T12:59:11 | 2015-07-06T12:59:11 | 38,040,524 | 0 | 2 | null | 2015-07-01T10:07:38 | 2015-06-25T09:31:04 | Python | UTF-8 | Python | false | false | 830 | py | # -*- coding: utf-8 -*-
#
# Copyright 2015 Yuriy Gavenchuk aka murminathor
#
# 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 requir... | [
"y.gavenchuk@bvblogic.com"
] | y.gavenchuk@bvblogic.com |
a25ee7b2a7ac37922e741c367dfb32c3a7c44e00 | dbe4e7b18e611907201f2d46a1d3df5834cae14f | /splunk_add_on_ucc_framework/start_alert_build.py | d05cfedf7930e2f14bad9b2898621ee42d26788d | [
"Apache-2.0"
] | permissive | JasonConger/addonfactory-ucc-generator | d6198e0d0e8b1113034403d3e2df67c9e00f4652 | 17548eee55ee270d8954e9b3df3ebc9da2d90300 | refs/heads/main | 2023-04-04T20:44:55.629207 | 2021-04-12T07:12:52 | 2021-04-14T18:57:49 | 358,644,617 | 1 | 0 | null | 2021-04-16T15:35:03 | 2021-04-16T15:35:02 | null | UTF-8 | Python | false | false | 2,621 | py | # SPDX-FileCopyrightText: 2020 2020
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from . import normalize
import logging
import os
from .modular_alert_builder.build_core import generate_alerts
import traceback
class LoggerAdapter(logging.LoggerAdapter):
def __init__(self, prefix,... | [
"rfaircloth@splunk.com"
] | rfaircloth@splunk.com |
aa187842f546ec38434033435a6d0116e9184da1 | d8127d11c7294796a4d85a8ed0dba43cb6fce715 | /basic_knowledge/10_2_3.py | fd0e314d26afb2b1df2080fef79e4910693c7a57 | [] | no_license | TophTab/Learning_python_firsttime | 77e6a33069fa6718c878bcf6b7925fa3f703d16e | 4e30d6d2c120a911c8e6cc1f0918128bf7fb372b | refs/heads/main | 2023-01-06T22:23:39.482131 | 2020-11-07T13:34:55 | 2020-11-07T13:34:55 | 310,820,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | with open('programming.txt','a') as file_object:
file_object.write("I also love finding\n")
file_object.write('I love creating\n')
with open('programming.txt','r') as file_object:
print(file_object.read()) | [
"TophTab@github.com"
] | TophTab@github.com |
5be51dbb88aa58f10058062d78de161544e789e6 | cc2fcc1a0c5ea9789f98ec97614d7b25b03ba101 | /st2common/tests/unit/test_configs_registrar.py | e23dfe74262ed4c55b95ba299c1a0f50fbeb08c9 | [
"Apache-2.0"
] | permissive | Junsheng-Wu/st2 | 6451808da7de84798641882ca202c3d1688f8ba8 | c3cdf657f7008095f3c68b4132b9fe76d2f52d81 | refs/heads/master | 2022-04-30T21:32:44.039258 | 2020-03-03T07:03:57 | 2020-03-03T07:03:57 | 244,301,363 | 0 | 0 | Apache-2.0 | 2022-03-29T22:04:26 | 2020-03-02T06:53:58 | Python | UTF-8 | Python | false | false | 4,577 | py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | [
"wei.ying@easystack.cn"
] | wei.ying@easystack.cn |
95a196583e24ca85981351ed0bf9c3a4ece3c9bb | f6644453d0a228cec214d09551468105134c5da3 | /mobilenetv2.py | 84c1b802d29d0097fc7043eceb38466e66aa5a92 | [] | no_license | ibadami/MobileNet_v2 | 97a49692edce291631b8d123ae2031c8179ff395 | b10065448bf65e007032e0e04a170045c4a0b8b2 | refs/heads/master | 2020-04-17T22:02:34.702865 | 2019-01-22T10:53:33 | 2019-01-22T10:53:33 | 166,977,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,710 | py | """MobileNet v2 model for TFLearn.
# Reference
[MobileNetV2: Inverted Residuals and Linear Bottlenecks]
(https://arxiv.org/abs/1801.04381)
_author__ = "Ishrat Badami, badami@nevisq.com"
"""
from tflearn.layers.conv import conv_2d, grouped_conv_2d, global_avg_pool
from tflearn.layers.core import dropout, reshape,... | [
"noreply@github.com"
] | noreply@github.com |
8f580dc6cac81d892c88c452ae7a6db718851418 | ded0a8f68a945d40aaeabdd298a08117cbe79e3c | /Projets/fonction.py | ea482df223a7f40553a74440ee21358e51c510cf | [] | no_license | Stephanie-Njike/Python | cd3931af29851f3bc89ccf468123dcb8c01b496b | f22f3a5ddb19bd27404a532781802ef7d33af8bc | refs/heads/main | 2023-07-05T15:39:41.744830 | 2021-08-09T15:28:25 | 2021-08-09T15:28:25 | 394,320,479 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,242 | py |
"""
def list_in_param(*params):
return params[0]+params[1]+params[2]
value = list_in_param(1, 2, 3, 4, 5, 8)
print(value)
value2 = list_in_param('1', '2', '3', '4')
print(value2)
def list_in_param2(a, *params):
return params[0]+params[1]+params[2]+a
value = list_in_param2(1, 2, 3, 4, 5, 8)
print(value)
... | [
"pair_one@smart-coders.guru"
] | pair_one@smart-coders.guru |
196964f8812712d14c761353096cc995312f630d | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/containsDuplicate_20200907093833.py | a13711fe822495f778880bcdac9e84cd2d398e7d | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | def duplicate(nums,k,t):
number = None
for i in range(len(nums)):
for j in range(i+1,len(nums)):
if nu
| [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
3df1a403fdfd729c21e8a16868b681af9bfc772f | 7f8ac39fa2d83a6a12cbb7ac26996dc465f57bcb | /Analysis/susyAnalysis.py | 3f1324ab35c40586a4a7a5d10f4c283c9fbe1a80 | [] | no_license | ingridavh/SUSY | 7450ce7c2bec21e78158c2448eb7d016fddbb875 | 8a9b3a6eae1720b5674a06d01ffda91b87234554 | refs/heads/master | 2021-01-20T09:36:55.930940 | 2017-06-01T17:42:43 | 2017-06-01T17:42:43 | 90,267,226 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,706 | py | import AnalysisHelpers as AH
import ROOT
import Analysis
import math
#======================================================================
class susyAnalysis(Analysis.Analysis):
"""Semileptonic susyAnalysis loosely based on the ATLAS analyses of top pair events where
one W boson decays to leptons and o... | [
"ingridavh@hotmail.com"
] | ingridavh@hotmail.com |
7fd01682debf28b599f6a3f86aa54b2e11ffb67d | 7f392d3d784a95e0ba99118070bdfcf508d225c2 | /projectManager/sproject_manager/views.py | 2f5ea3c271647f97cfbee1aef53180bcdf4ff0c1 | [
"MIT"
] | permissive | ufajardo/task-tracker | 0656b86edbe98b5e5b3c8dfab43b14f785e43c97 | 5817c6d1b563a9a6d2c1112bcd0b73531a316a8c | refs/heads/master | 2021-08-07T07:26:26.395368 | 2019-05-30T20:44:31 | 2019-05-30T20:44:31 | 186,176,679 | 0 | 0 | null | 2020-06-05T21:03:17 | 2019-05-11T20:04:53 | Python | UTF-8 | Python | false | false | 3,036 | py | from django.shortcuts import render, get_object_or_404, redirect
from django.utils import timezone
from rest_framework import generics, viewsets
from .serializers import ProjectSerializer, TaskSerializer
from .models import Project, Task
from .forms import TaskForm, ProjForm
# Create your views here.
def index(request... | [
"ulysses.fajardo214@gmail.com"
] | ulysses.fajardo214@gmail.com |
286901b3a6a7ec15eaad0c29b53851f0e00a3e81 | 599db5e2e3c4d6c296de25a8ef8e95a862df032b | /OpenAI Gym/(clear)breakout-ramdeterministic-v4/model6/14000epi/modelPlay.py | 7e5537269ecb2dd11378115b992616635625fad7 | [] | no_license | wantyouring/ML-practice-code | bb7577e99f22587c7ca016c1c4d067175e5ce9d9 | a3efbb4d252bacc831c5d7a01daf6476e7a755e4 | refs/heads/master | 2020-05-14T17:45:17.735081 | 2019-06-30T14:43:25 | 2019-06-30T14:43:25 | 181,898,074 | 0 | 1 | null | 2019-06-15T05:52:44 | 2019-04-17T13:31:24 | Python | UTF-8 | Python | false | false | 3,233 | py | # 학습모델 play. random action과 학습model 비교.
import gym
import pylab
import numpy as np
import gym.wrappers as wrappers
from doubleDQN2 import DoubleDQNAgent
EPISODES = 1 # 처음은 random으로 수행, 나중에는 학습model로 수행
global_step = 0
def change_action(action):
if action == 0:
return 0
elif action == 1:
retu... | [
"pwc99@naver.com"
] | pwc99@naver.com |
2da6036ab876d2232b76b7ef2f9869daa5258513 | 1d3c4449b6884578dbd9b8d0cdcf183c844c2801 | /1106.py | 13f7dcb81326f394a13899b3001195962f6aa552 | [] | no_license | thanos73k/CoTe | fa5e84048c6405daa712445391b14e9160fb7507 | e96754b970ed33269c50fef00973aa066d9739a6 | refs/heads/main | 2023-07-13T10:42:51.845553 | 2021-08-23T14:31:08 | 2021-08-23T14:31:08 | 383,343,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | goal, city= map(int, input().split())
info=[]
INF=987654321
dp=[0] + [INF]* 2000
for _ in range(city):
tmp =list( map(int,input().split()))
info.append(tmp)
for cost, people in info:
for i in range(people, goal + people):
dp[i]= min(dp[i],dp[i-people]+cost)
print(min(dp[goal:]))
| [
"59728699+thanos73k@users.noreply.github.com"
] | 59728699+thanos73k@users.noreply.github.com |
17bb28c909cb81a12d6e09aa97eceda48b4c70d7 | 2ac2dc7550d4e08d56dff220c65d78799e221dc9 | /users/forms.py | a28532794be55c34c3d0c00b0f403baddb94d9a9 | [] | no_license | Vladimir-1909/blog_news | b152883962ac3521c3294bd1e590f4144dc18966 | d5a45e70bb44c7004824b83e1e3771c25760c975 | refs/heads/main | 2023-03-07T15:47:43.969174 | 2021-02-22T08:37:44 | 2021-02-22T08:37:44 | 341,130,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,474 | py | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Profile, SendMail
class UserRegisterForm(UserCreationForm):
email = forms.EmailField(
label='Введите Почту',
required=True,
widget=forms.TextInput... | [
"vtgk12ak@gmail.com"
] | vtgk12ak@gmail.com |
07f54965bf19a638d7de2870978fd0fccb3c3b59 | 635670997e25d7fd578701995fe0422dd5671528 | /src/models_VAE/best_models/vae/encoder.py | 48db109dad68d468093e78e6d9e4cbd35e10fc19 | [] | no_license | QuangNamVu/thesis | 5126c0281d93e7a5c2c3a5784363d7f6c6baadfd | 01a404de2dfb70f13f3e61a9a8f3b73c88d93502 | refs/heads/master | 2022-12-24T10:08:33.472729 | 2019-12-21T16:27:07 | 2019-12-21T16:27:07 | 174,741,015 | 0 | 3 | null | 2022-12-14T06:56:36 | 2019-03-09T20:09:03 | Jupyter Notebook | UTF-8 | Python | false | false | 1,892 | py | import tensorflow as tf
from tensorpack import *
from tf_utils.ar_layers import *
from tf_utils.common import *
def encoder(self, x):
is_training = get_current_tower_context().is_training
# [M, T, D] => [M, T, f0]
fc_l1 = gaussian_dense(name='encode_l1', inputs=x, out_C=self.hps.f[0])
activate_l1 = ... | [
"you@example.com"
] | you@example.com |
00ccd496ce7dea6f368a321332faf326dce7f540 | a38eb3c692ea213b9db90148edb2052468ff7bc3 | /datasets/__init__.py | da8a68bfb78cbd159bf9a7a64efa3cf0917df160 | [] | no_license | VictorTao1998/ActiveStereoRui | cc5cc5d282d2935dab5c7ecb34e691a88682ec4e | cd5325932b52ff4090e6e40403a8710a99723a6d | refs/heads/main | 2023-08-24T03:59:05.904458 | 2021-10-28T17:42:31 | 2021-10-28T17:42:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 45 | py | """
Author: Isabella Liu 8/8/21
Feature:
"""
| [
"jit124@ucsd.edu"
] | jit124@ucsd.edu |
dcb6d1f9b8f18e4873a300301df53135071597f8 | 853f628139c5accdb14a2bcbcb2ea11df5e2ea82 | /3-5.py | 3e90e66f83d69f658ce7c67025617164fef60c0b | [
"MIT"
] | permissive | MasazI/python-r-stan-bayesian-model | cdcc49348a55bbd615925da8de5f260a6235620b | 05a224958a3f5cbea207001465ac12b6862d9d9f | refs/heads/master | 2022-02-28T13:21:32.779730 | 2019-11-03T13:36:04 | 2019-11-03T13:36:04 | 218,285,214 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,098 | py | ###############
#
# Transform R to Python Copyright (c) 2016 Masahiro Imai Released under the MIT license
#
###############
import os
import numpy as np
import pystan
import pandas
import pickle
import seaborn as sns
import matplotlib.pyplot as plt
import arviz as az
file_beer_sales_2 = pandas.read_csv('3-2-1-beer-... | [
"masaz.dream@gmail.com"
] | masaz.dream@gmail.com |
6e7000c867060f75c285361bd18e96b9365fac25 | 90ee22848a633676fe0da4a0a061e6d278d318fb | /Arrays/leet.py | 7ce365448183389917db26fee33a9050a4ba9fdd | [] | no_license | VinothRajasekar/practice | 459d33dbe9a0b4f55485baee1389beba3d1abc04 | c395f2fc9028c33e2d52c2c0c86f0c1077d29c8e | refs/heads/master | 2020-04-18T19:54:11.577376 | 2019-11-07T03:04:12 | 2019-11-07T03:04:12 | 167,724,045 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | def hello():
print("hello world")
val = set()
val.add("1")
val.add("2")
val.remove("2")
print(val)
c = hello()
print(c)
| [
"vinu.barro@gmail.com"
] | vinu.barro@gmail.com |
9620bd4a537d18089f1bbe6c5d247c907e171b40 | 486ea742752f63c65015fb982798a7fef43c8bae | /bot/account_manager/browser_automation_utils/webdrivermanager.py | 848cc683628670552bb1be960c9d49720e99406d | [] | no_license | rrosajp/BingRewardsBot | 6f17ec00a624cc8406bef5f4c0fbf32ec340521f | 56d4012dfda61ee7303a6942f87635bdb4e4c820 | refs/heads/master | 2021-06-01T10:16:33.546077 | 2016-08-14T08:29:50 | 2016-08-14T08:29:50 | 286,825,267 | 1 | 0 | null | 2020-08-11T18:59:02 | 2020-08-11T18:59:01 | null | UTF-8 | Python | false | false | 2,327 | py | import os
import browsertypes
_ABS_PATH_TO_THIS_DIR = os.path.realpath(os.path.dirname(__file__))
def _make_path_absolute(path):
'''
@param path
A relative or absolute path to a webdriver executable __file__
@return
- If path is absolute or None, then return as is.
... | [
"sairambkrishnan@gmail.com"
] | sairambkrishnan@gmail.com |
4ce5322003186f1ce33d14ae98702957ae346789 | 0cbe53436e0e753c41b039a3050f77a8b7f2e0e1 | /data_pro/Queries_pkl.py | e2f6e2feee71993a08e39c38d504c278388b8a1d | [] | no_license | s1530129650/Code_Recommendation | 9848d95ec3edc7c61a48178b9e9e06348b2e2e66 | 1d77e1a35a1ab92a717e0435e521cf4ff520cec6 | refs/heads/master | 2020-05-14T23:51:11.111958 | 2019-05-28T12:08:56 | 2019-05-28T12:08:56 | 182,002,981 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,380 | py | #!/usr/bin/env python
#!-*-coding:utf-8 -*-
"""
@version: python3.7
@author: v-enshi
@license: Apache Licence
@contact: 123@qq.com
@site:
@software: PyCharm
@file: Queries_pkl.py
@time: 2019/4/25 9:46
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
im... | [
"noreply@github.com"
] | noreply@github.com |
8f7329745bd74286e1d3df0ea9914dfa18347a3b | 0e0e755dcee24259fff3223a8f3579e6f1717e52 | /Final Project/final project.py | 2d98f59c616276085d2f0eb8e5a7fe6aaa72f1ff | [] | no_license | anwittin/Python | 0e25eb4cf7822d338e9fd64da1d7daa058d249c0 | 1a9eeba502dc74b0279fab8466f6d088a6fc425f | refs/heads/master | 2016-08-12T04:27:13.080084 | 2016-01-01T22:40:11 | 2016-01-01T23:16:36 | 43,617,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,384 | py | from sys import exit
import time
def kitchen():
print "This is the kitchen, there is food to cook and a small door at the back too."
print "You're hungry. what do you do?"
print "cook | enter door"
choice = raw_input("> ").lower()
if choice == 'cook':
print "Nice, hopefully you know what you're doing!\n"
... | [
"anwittin@gmail.com"
] | anwittin@gmail.com |
15a49c1e93ac6f6575ef74ea8af48334dbb97f8f | f6f9ca202b70e93a324de89b8316f389bf838508 | /src/gui/archat.py | 9c95974953d8bd0a0d132a0a6ee09cafd8c5017e | [
"MIT"
] | permissive | 180D-FW-2020/Team8 | 4e6d46870041d5015f2d5094acd44f15270017fa | ba439a2e65d759d0abd8d4fa827601b16228d841 | refs/heads/master | 2023-03-13T20:00:05.024413 | 2021-03-11T17:43:04 | 2021-03-11T17:43:04 | 297,810,211 | 2 | 1 | MIT | 2021-03-11T17:41:58 | 2020-09-23T00:46:07 | Python | UTF-8 | Python | false | false | 7,302 | py | ## AR Chat #######################################################################################################
## a class for creating a message board in OpenCV
ROOT = "data/gui/"
import cv2 as cv
'''
An ARChat object outputs an array with a custom UI created by the Butcher Bros (spec. Michael)
Public Function... | [
"noreply@github.com"
] | noreply@github.com |
4a18ef0719c0058c463c0200d66e76acbe62ccfd | e49b654d3db99773390c5b9686df9c99fbf92b2a | /linked_lists/is_palindrome.py | 703a4960dc6cfbe7e741efde1dd056a7ede1b2cc | [] | no_license | hao89/diary_of_programming_puzzles | 467e8264d0ad38768ba5ac3cfb45301293d79943 | 0e05d3716f28075f99bbd7b433d16a383209e57c | refs/heads/master | 2021-01-16T00:49:38.956102 | 2015-08-25T13:44:53 | 2015-08-25T13:44:53 | 41,692,587 | 1 | 0 | null | 2015-08-31T18:20:38 | 2015-08-31T18:20:36 | Python | UTF-8 | Python | false | false | 831 | py | """
Implement a function to check if a linked list is a palindrome
"""
import random
from linked_list import LinkedListNode
def is_palindrome1(linked_list):
# reverse and compare
pass
def build_palindrome_list():
root = LinkedListNode(5)
previous_node = root
for i in range(0, 2):
new_node ... | [
"me@davidadamojr.com"
] | me@davidadamojr.com |
dc2ea8bc1a8d47ea00f0731625419d553fe1c45e | 1081b4b2a575b4b786db71289f6e06497da4ae27 | /PSO/Microgrid optimization/In objective approach/Multiprocessing/MicrogridPSO_module_PSO.py | 3a081a2119588e545b5c45c775954a51d5982771 | [] | no_license | cycle13/Miniconda | 6e468f6d87b8424f662cf3aefdf250c1ec81f97b | 0d589134a9d65dccad05bb968406c98df26f29ab | refs/heads/master | 2022-01-06T21:51:16.291238 | 2019-07-09T02:11:04 | 2019-07-09T02:11:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,507 | py | import numpy as np
import copy
from MicrogridPSO_module_flowchart import loop_flowchart
# * Initialize particles & to input parameters
def initialize_PSO_parameters(PSO):
# * input initialize parametes
n_iterations = int(PSO.Multiprocessing_parameters["n_iterations"])
n_particles = int(PSO.Multiprocessin... | [
"insideman02468@gmail.com"
] | insideman02468@gmail.com |
1350a94623bca2d8ec71d8f2452ae5975888cf01 | ff3b1f10d179ffae5b63a4a86c46c0d50858c122 | /env/bin/django-admin.py | f8b5cecf0a7d827708532a25d8ff2790739def6f | [] | no_license | Petrovich80/urok2 | de9e50a5d670e0ed836d799b0f24129efcd69cfb | 0f55ed9c3fc9067372d843f8e451e409ec601c78 | refs/heads/master | 2023-05-10T01:41:32.383023 | 2021-06-08T08:40:47 | 2021-06-08T08:40:47 | 375,018,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 148 | py | #!/home/petrov0803/app2/env/bin/python3.8
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"petrov0803@gmail.com"
] | petrov0803@gmail.com |
b45cc10b7dd6a7c3e4acc055c6c47c9efec8d6f7 | 02e3fca30edaa8d8cc87c21895cb0cf1df112a35 | /prepare_training_dataset.py | d7b4a8c00870b3ae1a809173e5a7253e35f57a78 | [] | no_license | huster123/DataScience_Project | dc151c159d906f5a169c5bdfd7c9da304598aeac | 6289d49052be64efccaf618553b67b9613207db2 | refs/heads/master | 2020-05-01T13:35:36.916908 | 2018-08-13T16:41:37 | 2018-08-13T16:41:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,751 | py |
# coding: utf-8
"""
Created on Thu Jun 7 13:07:59 2018
@author: fahad
@purpose : The purpose of this code is to prepare the training dataset and calculate the RUL.
The program will read the required C-MAPSS dataset file and will return the dataset with calculate RUL as
a dataframe. Also, will save the dataframe ... | [
"noreply@github.com"
] | noreply@github.com |
f09d1140e195dbf860ff3a408fbcd67171d8c3f0 | 834d7ea5179414f17d37f3bb58164b8f6ac11b24 | /bin/MadGraph5_aMCatNLO/cards/production/2017/13TeV/bbDM_2HDMa/Multigrid_producer.py | 465a227c5e5e12cba4fea295a8cb75925b14a0c1 | [] | no_license | diracyoon/genproductions | aa9ee41ac1dde9e14ed039496c3259328ece7073 | a7740f4d28c7bfff4e71827dc807d57d974e29b7 | refs/heads/master | 2021-01-11T11:22:44.685243 | 2018-11-23T14:05:36 | 2018-11-23T14:05:36 | 72,719,084 | 1 | 0 | null | 2016-11-03T07:21:29 | 2016-11-03T07:21:29 | null | UTF-8 | Python | false | false | 3,326 | py | import sys
import os
verbose = False
old_cardsPath = 'Template'
prefix = 'bbDM_2HDMa_MH3_AA_MH4_XX_Mchi_YY'
os.system('mkdir '+ old_cardsPath+'/'+prefix)
os.system('cp '+old_cardsPath+'/'+'run_card.dat'+' '+ old_cardsPath+'/'+prefix+'/bbDM_2HDMa_MH3_AA_MH4_XX_Mchi_YY_run_card.dat' )
os.system('cp '+old_cardsPath... | [
"tiwariPC@users.noreply.github.com"
] | tiwariPC@users.noreply.github.com |
b5915b18fbbba281d99d4d188ad3de150336d99e | dbaad22aa8aa6f0ebdeacfbe9588b281e4e2a106 | /0423 Pandas/1-複習-pandas/Pandas1_csv_-plot1.py | 58fb6438f52cd86d1347b1d57e7b87de2c826879 | [
"MIT"
] | permissive | ccrain78990s/Python-Exercise | b4ecec6a653afd90de855a64fbf587032705fa8f | a9d09d5f3484efc2b9d9a53b71307257a51be160 | refs/heads/main | 2023-07-18T08:31:39.557299 | 2021-09-06T15:26:19 | 2021-09-06T15:26:19 | 357,761,471 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,289 | py | #!/usr/bin/env python
# -*- coding=utf-8 -*-
__author__ = "Chen"
# 0423 練習
"""
資料出處:
公開發行公司股票發行概況統計表_New
https://data.gov.tw/dataset/103533
主要欄位說明:
年月、上市家數、上市資本額_十億元、上市成長率、上市面值_十億元、上市市值_十億元、
上櫃家數、上櫃資本額_十億元、上櫃成長率、上櫃面值_十億元、上櫃市值_十億元、
未上市上櫃家數、未上市上櫃資本額_十億元、公告日期
"""
import pandas as pd
df = pd.read_csv('每月_公開發行公司股票發行概況統計表.... | [
"47476106+ccrain78990s@users.noreply.github.com"
] | 47476106+ccrain78990s@users.noreply.github.com |
7ae19c87ae0a743f37e10842eb6d7fe795206b0d | 4afa76df7f5f42fa97fd90f8da01374654d0d891 | /train.py | 4365b894e7248fe4525d2627f482f451ef9b658d | [] | no_license | hantek/zmlp | 923b8ce11c93dca620fe4bae0be5a5d341a3f64f | 0fce920850f84631f6996e50df2a6089a958a172 | refs/heads/master | 2021-01-22T02:34:12.575698 | 2014-12-06T03:58:25 | 2014-12-06T03:58:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,025 | py | import numpy
import numpy.random
import theano
import theano.tensor as T
SharedCPU = theano.tensor.sharedvar.TensorSharedVariable
try:
SharedGPU = theano.sandbox.cuda.var.CudaNdarraySharedVariable
except:
SharedGPU=SharedCPU
class GraddescentMinibatch(object):
def __init__(self, varin, data, cost, params... | [
"lin.zhouhan@gmail.com"
] | lin.zhouhan@gmail.com |
a96bac8257857719d4e612c36e2dc88f720a5690 | ad212b92beac17c4d061848c1dcd443d02a168c8 | /monthly_challenge/202008/19_goat_latin.py | e866084a3ba4569f5efdb64fd6aa23d3416e864d | [] | no_license | 21eleven/leetcode-solutions | 5ec97e4391c8ebaa77f4404a1155f3ef464953b3 | 35c91e6f5f5ed348186b8641e6fc49c825322d32 | refs/heads/master | 2023-03-03T10:22:41.726612 | 2021-02-13T21:02:13 | 2021-02-13T21:02:13 | 260,374,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | """
A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only.
We would like to convert the sentence to "Goat Latin" (a made-up language similar to Pig Latin.)
The rules of Goat Latin are as follows:
If a word begins with a vowel (a, e, i, o, or u), ... | [
"noahlidell@gmail.com"
] | noahlidell@gmail.com |
534e606f6d54fae55bbd0424ff0939fd209fb081 | d75cb7e463247cb88196e90fe3e9c8ed4595775b | /SchoolJudgeSummary/delete_db.py | 2681952472a2f7e0519ae19eeb3537421caf0d27 | [] | no_license | xscrat/SchoolJudgeSrc | 7bcd993c5096df52de40117be8b52de893437e28 | bca646254417232f15fe991ce75f92288590ecc5 | refs/heads/master | 2023-03-09T05:27:53.020785 | 2021-03-03T02:54:05 | 2021-03-03T02:54:05 | 343,808,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 235 | py | # -- coding:utf-8 --
import requests
import globals
r = requests.post('http://%s:%s/delete_db/' % (globals.server_ip, globals.server_port))
if r.status_code == 200:
print('删库成功')
else:
print('删库失败')
| [
"xjfscrat@gmail.com"
] | xjfscrat@gmail.com |
aa2d46b8434f07ea0404ccb72de436955c2f5a6f | d260346cf55f36c0a97b2b68fa65cabbf6f16564 | /witheppy/runner.py | e8cf1cb86ca49af4d13cd292146c2921fc0ec00c | [
"MIT"
] | permissive | pyenergyplus/witheppy | d27ba26f761d270b8787166c2c71193fcddb374b | cf1870827d43a0068cb63b93634a3deaa862241c | refs/heads/master | 2023-07-07T05:04:28.885150 | 2023-06-29T20:39:26 | 2023-06-29T20:39:26 | 153,138,024 | 10 | 2 | MIT | 2023-06-29T20:39:27 | 2018-10-15T15:32:30 | Python | UTF-8 | Python | false | false | 1,468 | py | # Copyright (c) 2019 Santosh Philip
# =======================================================================
# Distributed under the MIT License.
# (See accompanying file LICENSE or copy at
# http://opensource.org/licenses/MIT)
# =======================================================================
"""helpers tha... | [
"santosh_philip@yahoo.com"
] | santosh_philip@yahoo.com |
5fdba8f4725b9411b49d8f846a12dd1a5db0e84d | 37c5ba847d3e466a916d58f8707c0e04704f9144 | /ariac_behaviors/ariac_flexbe_behaviors/src/ariac_flexbe_behaviors/get_order_sm.py | 12309fd2f1b750050ce3f829501d711014c49cdb | [] | no_license | JustPtrck/roboticsP4 | 32bcf2076c11b51fecc19b8ea4dc21defe209f89 | 5904b11d6981fe2a19aed34cc235ef8f49fbcbc1 | refs/heads/master | 2022-09-01T06:37:09.519532 | 2020-05-19T10:50:04 | 2020-05-19T10:50:04 | 261,726,933 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,454 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################
# WARNING: Generated code! #
# ************************** #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] ta... | [
"patrickverwimp@gmail.com"
] | patrickverwimp@gmail.com |
2caa36497292851a2824c6d22461f476df9e29db | 8d113f0a487dab55c733ff63da5bba9e20f69b69 | /config/settings.py | bca76446204a4d8a3e3373d62517eb9c85a8dc70 | [
"MIT"
] | permissive | AktanKasymaliev/django-video-hosting | c33d341a7709a21869c44a15eb6a3b6e9a783f54 | b201ed3421025da22b43405452bde617ea26a90f | refs/heads/main | 2023-07-18T08:10:00.289537 | 2021-09-02T20:15:41 | 2021-09-02T20:15:41 | 387,730,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,039 | py | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
fro... | [
"aktan.kasymaliev@icloud.com"
] | aktan.kasymaliev@icloud.com |
b77ad5adbfe3bdc3c5a57d4185371cc854289ac2 | a07124716edd86159dff277010132ba9c5cd0f75 | /Text-Based Browser/task/tests.py | 3ca883bce21f71b1767281f280b941e8d1d999d1 | [
"MIT"
] | permissive | drtierney/hyperskill-TextBasedBrowser-Python | 27a15fa0bd44a927a9552d4815a0b4ab69375710 | a4f2ac60643559e580b75a02078a679e5f1f0a2c | refs/heads/main | 2023-08-28T04:24:51.693648 | 2021-10-25T17:34:58 | 2021-10-25T17:34:58 | 415,304,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,637 | py | from hstest.stage_test import StageTest
from hstest.test_case import TestCase
from hstest.check_result import CheckResult
import os
import shutil
import sys
if sys.platform.startswith("win"):
import _locale
# pylint: disable=protected-access
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
C... | [
"d.r.tierney@hotmail.co.uk"
] | d.r.tierney@hotmail.co.uk |
c7e654ae56b455cb14bc56c0dedaa2ea56c31dd7 | f268c12874985a5028150d64cffdcb2470b32dd4 | /build.py | b8f53a09af44c659a9e1befc5a913ad4322ec625 | [] | no_license | sagarambalam/fsdse-python-assignment-31 | 49b39bb6fc01caece448dda89fba17a45770d535 | d75be72c5e06592c7c791b203bd2c02753886493 | refs/heads/master | 2021-01-21T23:04:24.852859 | 2017-06-23T05:13:43 | 2017-06-23T05:13:43 | 95,184,731 | 0 | 0 | null | 2017-06-23T05:02:25 | 2017-06-23T05:02:25 | null | UTF-8 | Python | false | false | 262 | py | def solution(dic1):
list_a = sorted(dic1.values())
list_1 = list_a[0]
list_2 = list_a[1]
final_list=[]
for i in range(len(list_a)):
for j in range(len(list_a)):
final_list.append(list_1[i]+list_2[j])
return final_list
| [
"sagar.ambalam@gmail.com"
] | sagar.ambalam@gmail.com |
1d4c1a6a7d097727c67229681c7abf1bfe13d42a | 05e99875ebdb5b95fe478bc9a0dedfc6adae5442 | /render.py | db6d102a7db6785bf36f50afef50cde267b9eb80 | [] | no_license | dstathis/renderdocs | 96d7fea587f7760aa3526eb3c58100e8ea8cc2ba | cac27f25f66f1c72ab918b4e00670a211154bf79 | refs/heads/master | 2022-12-18T20:00:25.220294 | 2020-09-28T21:13:01 | 2020-09-28T21:13:01 | 296,403,587 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,644 | py | #!/usr/bin/env python3
from __future__ import print_function
import pickle
import os.path
import subprocess
from pathlib import Path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
# If modifying these scopes, delet... | [
"dylan@theone.ninja"
] | dylan@theone.ninja |
9a985c189a5328bcc149258b1faf5e97c967615f | ab66cdd15bb1ad964e21ce236e3e524b1eebb58a | /build/toolchain/win/setup_toolchain.py | 66e840bb9bee4e29ff2d61f9afdf05d8d839e3f3 | [
"BSD-3-Clause"
] | permissive | tainyiPeter/build-gn | 729659f3af90318d8ca80caa0a2f72d9bbfc595e | 59376ea32237f28525173e25fe1ce4a5c19ad659 | refs/heads/master | 2020-04-19T09:52:23.499802 | 2018-12-18T10:43:26 | 2018-12-18T10:56:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,687 | py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Copies the given "win tool" (which the toolchain uses to wrap compiler
# invocations) and the environment blocks for the 32-bit and 64-bit builds on
#... | [
"zcbenz@gmail.com"
] | zcbenz@gmail.com |
0a6f99febf158ce23215714249263dc107358160 | 2724412db1fc69b67b74a7d1c4ca4731962908d3 | /tests/test_streams.py | fd7c66a0bdc95eac88148387db0573a5c90b4496 | [
"BSD-3-Clause"
] | permissive | Tijani-Dia/websockets | a981267685e681df822307bce4ec7eb781e9927d | ed9a7b446c7147f6f88dbeb1d86546ad754e435e | refs/heads/main | 2023-08-23T13:10:16.030126 | 2021-10-08T20:18:24 | 2021-10-28T20:17:30 | 425,114,573 | 1 | 0 | BSD-3-Clause | 2021-11-05T23:56:39 | 2021-11-05T23:56:39 | null | UTF-8 | Python | false | false | 6,055 | py | from websockets.streams import StreamReader
from .utils import GeneratorTestCase
class StreamReaderTests(GeneratorTestCase):
def setUp(self):
self.reader = StreamReader()
def test_read_line(self):
self.reader.feed_data(b"spam\neggs\n")
gen = self.reader.read_line(32)
line = ... | [
"aymeric.augustin@m4x.org"
] | aymeric.augustin@m4x.org |
4a29bb1b1e74602ea2d8737fb776aeaa75db8ac5 | 0ccee825e9315b5490496be46706ddfe38b36dad | /paddleball.py | 68363f367699f85e31782e7e94bfb0a034580ad9 | [] | no_license | Drewleks/python-for-kids | dd86bee3f110c779fbfa64aab982e2fec18fd02f | 2896df13f511456ca1682b077ca82086082e7c27 | refs/heads/master | 2020-04-07T15:58:46.274090 | 2019-06-19T20:28:54 | 2019-06-19T20:28:54 | 158,509,999 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,421 | py | from tkinter import *
import random
import time
class Ball:
def __init__(self, canvas, paddle, color):
self.canvas = canvas
self.paddle = paddle
self.id = canvas.create_oval(10, 10, 25, 25, fill=color)
self.canvas.move(self.id, 245, 100)
starts = [-3, -2, -1, 1, ... | [
"noreply@github.com"
] | noreply@github.com |
473edc044398c5b3eca2579faca5a7c518d2a277 | 10e5b1b2e42a2ff6ec998ed900071e8b5da2e74e | /array/0509_fibonacci_number/0509_fibonacci_number.py | 5d815145881d946e9ff8a001d2a66e9ff2dcd44e | [] | no_license | zdyxry/LeetCode | 1f71092d687316de1901156b74fbc03588f0b0a5 | b149d1e8a83b0dfc724bd9dc129a1cad407dd91f | refs/heads/master | 2023-01-29T11:59:14.162531 | 2023-01-26T03:20:23 | 2023-01-26T03:20:23 | 178,754,208 | 6 | 4 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | # -*- coding: utf-8 -*-
class Solution(object):
def fib(self, N):
if N <= 1:
return N
return self.fib(N - 1) + self.fib(N - 2)
def fib2(self, N):
array = [i for i in xrange(N)]
for i in xrange(2, N+1):
array[i] = array[i-1] + array[i-2]
return ... | [
"zdyxry@gmail.com"
] | zdyxry@gmail.com |
209064d49d8c00a51c9b5b172250822afd75a2ac | c88ea9215c3f87c5a06e8f98ea57931144d4c022 | /tests/strategy/filtering/test_thunk.py | 9e1bdabd3eadf83a7e9079a3ccbb0d41ec00701e | [] | no_license | dylandoamaral/certum | 980e01dac2febfb1c9da7cb7be5301a5a6a91f3d | d8595cb4c3a101f9a78cddc1aa2c51cccac9095a | refs/heads/main | 2023-03-13T23:00:25.733011 | 2021-03-14T10:06:14 | 2021-03-14T10:06:14 | 332,206,245 | 1 | 0 | null | 2021-03-14T10:06:15 | 2021-01-23T12:34:39 | Python | UTF-8 | Python | false | false | 927 | py | import pytest
from certum.error import Error
from certum.strategy.filtering.thunk import ThunkFiltering
@pytest.mark.parametrize(
"errors, result",
[
([Error(["x"], "my message")], 1),
([Error(["x", "b"], "my message")], 1),
([Error(["x"], "my message"), Error(["x", "b"], "my message"... | [
"noreply@github.com"
] | noreply@github.com |
c3bb7b99c92804951ac54fb144661450664dff9e | 5312c056c32595007ca3f35c63088cfb76f2d408 | /convolutions/sequences.py | a859c50dc06ce90146df6163bbc3a1035b974eae | [] | no_license | namisama269/COMP3121-3821 | 9a46b3b59fd0b4a8017a0085fabf3e2f5acca801 | 3fd5b94a7a591ea8ce5209ac2af90119f6dc69e8 | refs/heads/main | 2023-08-23T04:25:40.814329 | 2021-11-03T04:14:36 | 2021-11-03T04:14:36 | 408,246,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | """
Operations on 2 sequences A and B
A = [a0,a1,...,an], B = [b0,b1,...,bm]
"""
def add(A, B):
pass
def pmul(A, B):
pass
def dot(A, B):
if len(A) != len(B):
raise ValueError("A and B must have same length")
return [A[i]*B[i] for i in range(len(A))]
def concat(A, B):
pass
def convolutio... | [
"namwarlockclash@gmail.com"
] | namwarlockclash@gmail.com |
0c41eb9b825513fc3f392c454d24189c96027204 | c3796ebebb42e55878556a53abad1a2e18fa4020 | /test/functional/p2p_unrequested_blocks.py | f90431fdef055f22d5946052e24c023ed7e313de | [
"MIT"
] | permissive | lycion/genex-project | a9e54d22138ca81339f76bba166aa9f366fa9dd8 | fc103e93ee274dc57179d01c32b0235b29e364ca | refs/heads/master | 2020-03-29T02:18:33.445995 | 2018-08-07T23:56:27 | 2018-08-07T23:56:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,842 | py | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Genex Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of unrequested blocks.
Setup: two nodes, node0+node1, not connected to each other. Node1... | [
"40029035+genexcore@users.noreply.github.com"
] | 40029035+genexcore@users.noreply.github.com |
4b14a84a25716004baaf55a0e43796fab1a29293 | a137466dbaa5d704cd5a15ab9dfd17907b24be04 | /algo2/mrdqn/agent.py | 21a44e7aca50bb7bc677d14406d87263a932f502 | [
"Apache-2.0"
] | permissive | xlnwel/g2rl | 92c15b8b9d0cd75b6d2dc8df20e6717e1a621ff6 | e1261fdd2ce70724a99ddd174616cf013917b241 | refs/heads/master | 2023-08-30T10:29:44.169523 | 2021-11-08T07:50:43 | 2021-11-08T07:50:43 | 422,582,891 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,158 | py | import tensorflow as tf
from utility.tf_utils import softmax, log_softmax, explained_variance
from utility.rl_utils import *
from utility.rl_loss import retrace
from core.decorator import override
from algo.mrdqn.base import RDQNBase, get_data_format, collect
class Agent(RDQNBase):
""" MRDQN methods """
@tf.... | [
"122134545@qq.com"
] | 122134545@qq.com |
457db9cf31f17eff66a91f40c6afac4e33165f21 | c2e2d1a80850017b95931752801024eb3f03b66a | /revision/repeated_word.py | 2be1c4bb117045c352ee5c281760dcd177c55f98 | [] | no_license | shreyasvinaya/School_assignments | 61e7c909f1f0764d0978455d137a962e05e34c5e | 2c2dbd328fc896b70555176802c1c2166c974353 | refs/heads/master | 2020-07-08T18:58:15.001500 | 2019-11-19T05:01:12 | 2019-11-19T05:01:12 | 203,750,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | #most repeated word
a=input('enter a sentence')
b=a.split()
print(b)
d={}
for i in range(len(b)):
pass
if b[i] not in d:
d[b[i]]=1
else:
for j in d:
pass
if b[i]==j :
pass
d[b[i]]+=1
highest=0
item=''
for q in d:
if d[q]>highest :
pass
highest=d[q]
item=q
print(item,hi... | [
"noreply@github.com"
] | noreply@github.com |
7023c1ee2710feaa888de4d2ad13b09a40472335 | 7209bab118b61d6ae36cca7f725226518bb9c0ec | /Drivingschool/urls.py | 53f7eee7661676e0ac01be06f1349a4aae4bdb20 | [] | no_license | saaid960/driving1 | a965e117d7b41a038bcf8f73c1b1e3f9dc04e1f2 | 63c1327ba64cb5e0ad1fafb02de86b641e599c07 | refs/heads/master | 2023-04-12T04:20:43.062582 | 2021-04-25T06:03:09 | 2021-04-25T06:03:09 | 344,208,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | """Drivingschool URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.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... | [
"saaid7600@gmail.com"
] | saaid7600@gmail.com |
6332935611c8fc4d545043236f06b43121fcb9a3 | 555319a2f344a789e6971a877824111b13004c6d | /transfer_points.py | 65a0b2040789bb1378783a424f0548a72d95a945 | [] | no_license | Kairobo/Learn_Python | 66e792054e70b72039a610cb8159693352b3092e | 903f5d1d8614f4b3a81dc005362efb0ee50e8778 | refs/heads/master | 2021-01-25T09:45:00.162914 | 2018-09-12T04:53:07 | 2018-09-12T04:53:07 | 123,317,004 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,917 | py | from copy import deepcopy
import numpy as np
def vector_norm(vec):
return np.sqrt(np.power(vec[0],2)+np.power(vec[1],2))
def vector_divide(vec,divider=1):
assert(len(vec)==2)
vec_new = deepcopy(vec)
vec_new[0] = vec_new[0]/divider
vec_new[1] = vec_new[1]/divider
return vec_new
def vector_add(... | [
"kajia@umich.edu"
] | kajia@umich.edu |
668a48a3ce0d405c8471c0a654011de3bee895c6 | 96facbfa0cd5a2ca63819d67f46af3c3456631c1 | /sound4bats/plot_metrics.py | 9e4acaa3c4f6e31ed3e7ecbc9ab6650ece023e7c | [
"MIT"
] | permissive | cloudedbats/cloudedbats_sound | 114a79f88ea0dd789304b88ecf451acc4196bb3e | e9c263ed86665f2f2a0b8bed300bca0a5c5b61f6 | refs/heads/master | 2021-07-14T03:36:12.777907 | 2020-07-21T07:27:54 | 2020-07-21T07:27:54 | 158,961,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | #!/usr/bin/python3
# -*- coding:utf-8 -*-
# Project: http://cloudedbats.org
# Copyright (c) 2019 Arnold Andreasson
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
import numpy
import pathlib
import dsp4bats
class PlotMetrics():
""" """
def __init__(self, debug=False):
... | [
"parallels@parallels-Parallels-Virtual-Platform"
] | parallels@parallels-Parallels-Virtual-Platform |
440882081229f4907b7d73f358e1e957fd47ae98 | 9660ada2f477f0d89f60cfd2e979824c7c97ea31 | /src/experiments/no_trading_data.py | 6903b582da442d6a8ab9f56f8ff7138f8a02fa9c | [] | no_license | JonasLaksen/deeptsa | 941464fa499ac8022f7980e59265d48d83d078b9 | 1e8f9faf6272e9720bafcb7a0269ad7301fd3cdd | refs/heads/master | 2022-12-20T21:46:39.246314 | 2020-07-19T21:28:36 | 2020-07-19T21:28:36 | 170,122,906 | 0 | 0 | null | 2022-11-21T22:47:57 | 2019-02-11T12:11:49 | Python | UTF-8 | Python | false | false | 3,705 | py | import json
import os
import pathlib
import random
import sys
from datetime import datetime
from functools import reduce
import numpy as np
import tensorflow as tf
from src.lstm_one_output import LSTMOneOutput
from src.models.stacked_lstm import StackedLSTM
from src.utils import load_data, get_features, ... | [
"pthoang94@gmail.com"
] | pthoang94@gmail.com |
9aba1899299285447301d3bd0bbab2728dbffe70 | 2f5e366b7dc799e77ea7a4200e7a491f78a538b9 | /src/Writer.py | 84833457bb852ecf7460d82bd22e39d03afacd74 | [] | no_license | dspray95/swarm-ai-python | 111e0555b8ec2bd823980691b4e39f5db453da26 | 156b072689badb2542b4cc8032b3733a7d33bc53 | refs/heads/master | 2020-03-11T19:02:26.953261 | 2018-04-21T14:27:54 | 2018-04-21T14:27:54 | 130,195,277 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py |
class Writer:
def __init__(self, path):
self.path = path + "\\data"
def write_file(self, aggression, distribution, dead, productivity, time):
csv = open(self.path + "swarmdata.csv", "w")
title_row = "aggression,distribution,dead,productivity,time\n"
csv.write(title_row)
... | [
"dspray95@gmail.com"
] | dspray95@gmail.com |
c436a852bf1b29fdd43c22fec676f7de2348174a | da7a165522daea7c346693c5f32850017c482967 | /abc51-100/abc066/c.py | 09ed9795009df321637516a4eee2dcfb604ef0b8 | [] | no_license | SShayashi/ABC | 19f8750919208c5ff8935638dbaab941c255f914 | 3cbfee0c5251c1bb0df6306166d8d4b33bf7bb2c | refs/heads/master | 2021-05-04T21:06:10.720367 | 2020-07-11T13:59:16 | 2020-07-11T13:59:29 | 119,886,572 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 317 | py | def main():
n = int(input())
a = list(map(int, input().split()))
even = a[1::2]
odd = a[::2]
ans = []
if n % 2 == 0:
even.reverse()
ans = even + odd
else:
odd.reverse()
ans = odd + even
to_str = map(str, ans)
return " ".join(to_str)
print(main()) | [
"sshayashi0208@gmail.com"
] | sshayashi0208@gmail.com |
13be7231187d37ac75c66c3d2fed7e893c559c16 | e93ba589366452ccb47ccbaf1ec4c613ba8bbc73 | /clase4_map.py | 539de9b06741a829ff7b01afd7cef891a524be75 | [] | no_license | ericksc/pythonbasico | d340209683084ca7059767fea39c33987f8fcac2 | 13110acef5b2af02bc11954e38dc3443a0c43419 | refs/heads/master | 2023-06-19T05:44:13.349958 | 2021-07-16T16:17:26 | 2021-07-16T16:17:26 | 369,639,836 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 57 | py |
a = [1,2,3, 'hola', 4, 5, True]
b = list(map( type, a)) | [
"ecsa@gft.com"
] | ecsa@gft.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.