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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3bf6c40ae7e392ff295fb1d7b359a78c2bb7e42c | 3f47065d40be96a4bdd8e1e7a2c8e67bf7541ab9 | /day5/part1/main.py | a04c361df98b4a5b4e8ab5c120d03467de03dba3 | [] | no_license | florinrm/aoc-2020 | cfc840778a0443815f029523bf70f7835c73dcff | 8649ee3c07c5c94b3021b26b43020b75a6cf655f | refs/heads/main | 2023-01-31T04:19:11.712468 | 2020-12-15T22:07:42 | 2020-12-15T22:07:42 | 317,512,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,229 | py | def decrypt(code):
row = code[:7]
col = code[7:]
start = 0
end = 127
step = 64
row_index = 0
col_index = 0
for r in range(len(row)):
if row[r] == 'F':
end = end - step
elif row[r] == 'B':
start = start + step
step = step ... | [
"florinrmfm3@gmail.com"
] | florinrmfm3@gmail.com |
12e59424ec052b0722a557bc8ffd7be8ac9d32ed | acb0b6a7a4b87cd6bab22704e2e4883dcab2724e | /baidubce/services/mvs/mvs_client.py | d5b351415bfbc036e698e4f9a2acf5329d7a546c | [
"Apache-2.0"
] | permissive | yunfan/bce-sdk-python | b19816987be790608313a4e0d0fbafc19e6eb041 | 00df2be78cd44373c3d99cd1bb69d17968f30d2b | refs/heads/master | 2020-11-28T04:27:05.116640 | 2019-09-16T08:06:15 | 2019-09-18T04:20:51 | 229,702,964 | 0 | 0 | Apache-2.0 | 2019-12-23T07:46:43 | 2019-12-23T07:46:42 | null | UTF-8 | Python | false | false | 5,802 | py | # Copyright 2019 Baidu, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwa... | [
"jijianchao@baidu.com"
] | jijianchao@baidu.com |
20303f447a511b4193ad269eca6e0c60b2f0aec5 | 3f3af5062b8551606e16e997e600fdfcd943b929 | /faxue/ReptilePart/getListOfJournal/getListOfJournalFour.py | 5430d36b954fb8d85c83b4c072e63cf1aedb9d70 | [
"MIT"
] | permissive | YaKaiLi/GraduationProjectYan | 63179df688522c486f8874a3443ef05d22cc7d72 | 5ddcc081748daa39f7d7b070f5b172c6a5919349 | refs/heads/master | 2020-03-07T23:05:17.741977 | 2018-05-09T14:15:57 | 2018-05-09T14:15:57 | 127,771,839 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,729 | py | # -*- coding: UTF-8 -*-
from urllib import request
import chardet
import re
import pymysql
if __name__ == "__main__":
# 打开数据库连接
db = pymysql.connect(host="localhost",user="root",password="root",db="graduationprojectyan",port=3306,charset="utf8")
# 使用 cursor() 方法创建一个游标对象 cursor
cursor = db.cursor()
... | [
"jkliyakai@163.com"
] | jkliyakai@163.com |
fdf66e43935929b007b9406e47b57288e90346f3 | 0220c3db6f880a8eee087fe03f8fad6d14952a0e | /src/main.py | fdac9bb02f25095de01dfc025ece7b327661e98d | [] | no_license | phoneticallySAARTHaK/Mumble_Assignment_Writer | 53a25d65c03d53bd49a40fd7fd322652274069e6 | 6654b4ab5d35a42d4e0bcb6e560418c4f7504124 | refs/heads/main | 2023-09-04T22:31:09.429076 | 2021-11-10T06:40:55 | 2021-11-10T06:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | import PyPDF2
a = PyPDF2.PdfFileReader('SodaPDF-compressed-DLD PRAC. FILE-compressed_reduce.pdf')
#print(a.documentInfo)
x = a.getNumPages()
str = ""
for i in range(1,x):
str += a.getPage(i).extractText()
with open("text.txt","w" , encoding='utf-8') as f:
f.write(str)
| [
"noreply@github.com"
] | noreply@github.com |
9861243e962db416c8b310a710946976ce68c6bd | 5085ecbb8403f701ef0e1dbfc9d247162b82d51e | /webscrambles/tmtproject.py | fcf093d2281e3b8198d09ab39a962bf17d9badf5 | [] | no_license | gnehzr/tnoodle | ea6809dbe1cc15124f6d29bbce5a856cdaa6cb6d | 4d3dca6168d3bbea298fcd1c44872c335dbef2b2 | refs/heads/master | 2021-01-18T03:02:23.787389 | 2013-02-22T09:24:18 | 2013-02-22T09:24:18 | 8,286,318 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | import tmt
import subprocess
from os.path import join, exists
import shutil
class Project(tmt.EclipseProject):
def configure(self):
tmt.EclipseProject.configure(self)
tmt.WinstoneServer.addPlugin(self)
Project(tmt.projectName(), description="A server plugin wrapper for scrambles that also draws pdfs.")
| [
"jeremyfleischman@gmail.com"
] | jeremyfleischman@gmail.com |
9af0b1c58bb1fb1a4ecbbacf86e2e4df2322826d | e37050384528b91832860d5490c1551812f45359 | /train/train_spider_funtions/constant.py | 24228b31060266e820cb2c471204257d584cba3f | [] | no_license | gii001/train_spider_api | 72366cf4c17ac9596090bba1f9b80778e1d2d289 | 5307b6f538bad1379e6f218f824a402565c42fee | refs/heads/master | 2020-05-01T03:59:11.263971 | 2019-04-05T06:07:07 | 2019-04-05T06:07:07 | 177,261,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 60,619 | py | #!/usr/bin/env python
# encoding: utf-8
"""
常量设置
Author: Wendell
Date: 2019/03/23 11:00
"""
# 车次信息网址
TRAIN_NO_BASE_URL = 'https://kyfw.12306.cn/otn/leftTicket/query?'
# 车站信息网址
STATION_INFO_BASE_URL = 'https://kyfw.12306.cn/otn/czxx/queryByTrainNo?'
# 成人票网址后缀
PURPOSE_CODES = '&purpose_codes=ADULT'
# User-Agent
... | [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
370b9d1e5738731995469d3572171a1eb0805860 | b20cc37e0b986a0b458f7f446d5025beee01ba7a | /326-power-of-three/326-power-of-three.py | ee9a38938a90148c4442109da4f8e747ba9f4374 | [] | no_license | Maruf-S/Competitve-programing | e5e405912a4c2d9a1fad35d66411964ecbc10d00 | 3134d9c1b7e987c6cec3c614512faab4114fe0bd | refs/heads/master | 2023-02-04T08:08:43.374565 | 2023-02-01T17:29:55 | 2023-02-01T17:29:55 | 225,399,606 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | class Solution:
def isPowerOfThree(self, n: int) -> bool:
if n==1:
return True
if n<1:
return False
return self.isPowerOfThree(n/3) | [
"56218443+Maruf-S@users.noreply.github.com"
] | 56218443+Maruf-S@users.noreply.github.com |
dee4c636e7942fb1628a33bd9034f00d3c0944cd | 4125b4e65bd523e2c8c44d0a269d11de3f246d9c | /jsont/transforms/xml.py | a55dbbb796cca2e236b85972001c744456e2f77e | [] | no_license | usnistgov/jsont | a3be1c2a9f3c16d670a4cb0ad12470b1b289a34c | 091f5471f2aaba71ffe7904b7ff620f09f4ebf15 | refs/heads/master | 2021-01-10T02:09:21.988933 | 2016-03-16T00:19:40 | 2016-03-16T00:19:40 | 53,922,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,959 | py | """
transforms for creating XML from JSON data
"""
import os, copy, re, textwrap, collections
import json as jsp
from ..exceptions import *
from ..base import Transform, ScopedDict, Context
from .std import JSON, Extract, StringTemplate, Function
from . import std
MODULE_NAME = __name__
TRANSFORMS_PKG = __name__.rspl... | [
"raymond.plante@nist.gov"
] | raymond.plante@nist.gov |
b9b729355f00f06c81c387568d229eb5f38329c1 | b206fdcb53cb69497745c67beed17e0be909ddf6 | /Hack2020/db_load/init_data.py | d13c1243716ba3d30a4ad449457696d4830a6ddd | [] | no_license | zapravka-team/hack_django | 1e5300684699420085048b3bdfae67f5daa75937 | 007f6e216d605c4742d55285064c077b7e0c2755 | refs/heads/main | 2023-01-05T21:44:32.829539 | 2020-11-01T08:59:32 | 2020-11-01T08:59:32 | 308,709,023 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,678 | py |
from pet.models import PetType, PetGender, EarType, TailType, ColorType, EuthanasiaCause, DeathCause, DisposeCause, \
FursType, Breed
ears = \
"""Стоячие
Полустоячие
Висячие
Купированные"""
tails = """Обычный
Саблевидный
Крючком
Поленом
Прутом
Пером
Серпом
Кольцом
Купированный"""
death_cause = ""... | [
"lionless072@gmail.com"
] | lionless072@gmail.com |
1a2d9304616fb11065524a81f641383496a423d4 | 20d4aac372684501ce6d1b35b8d0beeb20769341 | /pyart/xradar/accessor.py | 76732422085ab837a5976a716a27a39a25298418 | [
"BSD-3-Clause"
] | permissive | ARM-DOE/pyart | c108dd28a2d6eb1eaaa414408757feefac9515c3 | 172bbcf1cf3bcdb953c76ebae72c27c95dc2e606 | refs/heads/main | 2023-08-18T07:41:28.137014 | 2023-08-17T15:58:24 | 2023-08-17T15:58:24 | 6,248,645 | 455 | 255 | NOASSERTION | 2023-09-14T20:09:51 | 2012-10-16T17:51:30 | Python | UTF-8 | Python | false | false | 3,044 | py | """
Utilities for interfacing between xradar and Py-ART
"""
class Xradar:
def __init__(self, xradar):
self.xradar = xradar
def get_field(self, sweep, field_name, copy=False):
"""
Return the field data for a given sweep.
When used with :py:func:`get_gate_x_y_z` this method ca... | [
"noreply@github.com"
] | noreply@github.com |
54a9a094e0ee5716cca0e893e3b82f367b83dbe1 | a0dda8be5892a390836e19bf04ea1d098e92cf58 | /7章之后刷题/7章/求一元二次方程的解.py | 517c5ec018ad4fd2fec5dfce6394c34f9bf20cf7 | [] | no_license | wmm98/homework1 | d9eb67c7491affd8c7e77458ceadaf0357ea5e6b | cd1f7f78e8dbd03ad72c7a0fdc4a8dc8404f5fe2 | refs/heads/master | 2020-04-14T19:22:21.733111 | 2019-01-08T14:09:58 | 2019-01-08T14:09:58 | 164,055,018 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 769 | py | """
【问题描述】一元二次方程:ax2+bx+c=0 (a ╪ 0)
【输入形式】输入a、b和c的值(有理数)
【输出形式】输出x的两个值,或者No(即没有有理数的解)
【样例输入】1 2.5 3
【样例输出】No
【样例输入】1 -2 1
【样例输出】1.00 1.00
【样例输出说明】输出的两个解保留两位小数,大的在前
"""
import math
a, b, c = input().split()
if a != 0:
a = float(a)
b = float(b)
c = float(c)
if b ** 2 - 4 * a * c < 0:
print("No"... | [
"792545884@qq.com"
] | 792545884@qq.com |
5eed332eafbf68df0b627c9d3f98c3af0c353507 | 4c9dc272e44d895c687ee37cc1a6749c54f8a3a3 | /app/routes/ra_restricted.py | c8caa6bcc27eef41e30cc047e202ebcfafb0cffe | [
"Apache-2.0"
] | permissive | superphy/spfy | 8ae3ee6ceda877a11997fb8d68cf752560dd608e | 867e61b32ab00ec536378f96a63f0fb379f47c58 | refs/heads/master | 2018-10-14T16:12:47.991087 | 2018-09-14T01:56:28 | 2018-09-14T01:56:28 | 78,564,076 | 2 | 1 | Apache-2.0 | 2018-07-18T16:18:07 | 2017-01-10T18:59:57 | Python | UTF-8 | Python | false | false | 1,581 | py | from flask import Blueprint, request, jsonify
from middleware.auth import get_token_auth_header, requires_simple_auth
from middleware.mongo import mongo_update, mongo_find
bp_ra_restricted = Blueprint('reactapp_restricted', __name__)
@bp_ra_restricted.route("/api/v0/secured/simple/ping")
@requires_simple_auth
def sec... | [
"kevin.kent.le@gmail.com"
] | kevin.kent.le@gmail.com |
13ab9815d54f9a9d44e67335e677be85d354b66f | 0881a1434f3b54402e4a9c59fca54bb67babf282 | /StorageAddon/osf.io/addon/settings/defaults.py | 9eb235d632553a5919786eb8590bc873f801199e | [
"MIT"
] | permissive | kitakou0313/RDM-developer-guide | 6ef46a0d4614afcb95d4d5da9967f8196bdc639f | 2b7649b572182308c2c5801215d9a0c07d49a594 | refs/heads/master | 2023-06-05T15:30:15.512222 | 2021-03-24T08:57:19 | 2021-03-24T08:57:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26 | py | MAX_FILE_SIZE = 128 # MB
| [
"shun.nakazawa@voice-research.com"
] | shun.nakazawa@voice-research.com |
28de35bcbed5708ff495874a9074a3e059d647c8 | 4c7c02de2881ecb1db78fa263cc754c244e13c8a | /bot/7/utils/db_api/add_to_database.py | 14c67d565b1c0471aa7a8dcb094c02c186a0fbe1 | [] | no_license | KoEzzz/bot | f96f702432d5b0815dd7582f945850f1c08466da | 9b516999253bb726e0282e295f8a2bd921732faf | refs/heads/main | 2023-04-09T10:32:22.359852 | 2021-04-16T16:41:40 | 2021-04-16T16:41:40 | 358,661,151 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,712 | py | from utils.db_api.db_commands import add_item
import asyncio
from utils.db_api.database import create_db
# Используем эту функцию, чтобы заполнить базу данных товарами
async def add_items():
await add_item(name="ASUS",
category_name="🔌 Электроника", category_code="Electronics",
... | [
"noreply@github.com"
] | noreply@github.com |
04412e08a39312c68486499b1121c0646400bad5 | 8216eeeaa3e885bb8823509b0a455081ed9924c7 | /main.py | ccfdbb485a98043e27ed57a3190427ce60f30fdd | [] | no_license | costas-basdekis/find-the-cats | c7559c95818fcecdb9b8d6701bd745deddbb9027 | b7717336fc1dd4b428bc70d564d735bdcef3a0a5 | refs/heads/master | 2021-01-10T13:17:35.773928 | 2015-12-22T15:32:36 | 2015-12-22T15:32:36 | 48,342,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,162 | py | import sys
import json
from random import sample, choice
class Stations(object):
@classmethod
def from_json_files(cls, stations_filename, connections_filename):
stations = cls()
stations.load_from_json_files(stations_filename, connections_filename)
return stations
def __init__(se... | [
"costas.basdekis@gmail.com"
] | costas.basdekis@gmail.com |
77d5a599d9f2da28824ed4250313c3adcf4d4397 | 96fde26c1be28a0bfcd6c09f177de46812e8690a | /vendas/migrations/0009_auto_20210329_2035.py | 0eb7771f43c7175726ba376b5723d205b38c4e00 | [] | no_license | LeonardoLacerda/exemploparaturma | 406f20d1e0996b9de6af258e375488329f702656 | b30668a545ce4b9d2759d99ea2ccd0b0925d6485 | refs/heads/main | 2023-04-03T10:05:18.636684 | 2021-03-30T00:19:16 | 2021-03-30T00:19:16 | 352,817,858 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,499 | py | # Generated by Django 3.1.7 on 2021-03-29 23:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vendas', '0008_venda_cliente'),
]
operations = [
migrations.RemoveField(
model_name='venda',
name='email_cliente',
... | [
"leonardolacerda.as@gmail.com"
] | leonardolacerda.as@gmail.com |
34b6466171461421fb8135bb7342cf1bc2005a89 | 8ff0a962d8ea988768eb93ec7862b7da19fba7e7 | /euler20.py | ebfdb0cc1455dda60bbcb61930976f46ef721313 | [] | no_license | metodj/Project-Euler | 6c9a69054afe6f2c981ec274c641707a6346eb59 | 974c7e4d73f91f735f60d95de929027bb67c77f8 | refs/heads/master | 2021-01-12T06:35:25.810484 | 2016-12-26T14:48:37 | 2016-12-26T14:48:37 | 77,389,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | def factorial_for(n):
s = 1
for i in range(1, n+1):
s *= i
return s
def euler20(n):
resitev = 0
for znak in str(factorial_for(n)):
resitev += int(znak)
return resitev
| [
"noreply@github.com"
] | noreply@github.com |
cb404b4d172d193fdd675a194c0f74c3dc2bcbec | 7e8c799037f47345cb12a6fc7911610d7ac63640 | /blog/models/kategory.py | db1f3aed151335e537ac97042a080087a708be89 | [] | no_license | SonerArslan2019/Django_Blog_kilicarslan | bcfd953dfc0d530217c02ff9bf1428160a63e68e | 8959708689b830c387c76414545add2474beeddd | refs/heads/master | 2023-06-04T06:19:28.209246 | 2021-06-27T14:50:40 | 2021-06-27T14:50:40 | 346,781,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | from django.db import models
from autoslug import AutoSlugField
class KategoriModel(models.Model):
isim = models.CharField(max_length=30, blank=False, null=False)
slug = AutoSlugField(populate_from='isim', unique=True)
class Meta:
db_table = 'kategori'
verbose_name_plural = 'Kategoriler'
... | [
"soner@arslanyapi.com.tr"
] | soner@arslanyapi.com.tr |
f490e88b162f3d646cdc9f8836c1ca0aa8cfe015 | e242850058e62299d7c75c3e47fa34b139b7bdbf | /rm-repeats/script-2.py | b9e1668d34941a46d57850ff0d966765abb2f798 | [] | no_license | PiperPat/attorneydict.github.io | 058d91733a2d7056e10f7329953608d858423d0f | 6e89aeb199a6dd63f7fdd184956848591bd2baaa | refs/heads/main | 2023-08-07T02:16:05.294473 | 2021-10-08T04:49:41 | 2021-10-08T04:49:41 | 399,307,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,827 | py | import re
import math
f = open("../dict.js", "r")
all_data = f.read()
f.close()
words = all_data.split(";")
list_len = 1000
sigma = len(words)
num_lists = math.ceil(sigma / list_len)
master_list = []
for i in range(0, num_lists):
list_partition = words[i * list_len : (i * list_len) + list_len]
master_list.... | [
"antonhuggard@gmail.com"
] | antonhuggard@gmail.com |
69219886e2fb7b8ea37b60e28d74a109c0dd00ec | 508bef828c3ce1f1c53fbe52397632ebcb392a7f | /excercise/DataOutput.py | 17f26dd4e5ecf58f8a646828a506123f3f85f981 | [] | no_license | wudangqibujie/excercise | bc19a7923836aae9d12e1147b1d282250c0037c6 | ff3e255e809e414fd43e7cf16e03466c91b613a2 | refs/heads/master | 2021-05-02T12:20:09.701592 | 2018-02-08T09:20:04 | 2018-02-08T09:20:04 | 120,738,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 904 | py | import codecs
import json
class DataOutput(object):
def __init__(self):
self.datas = []
def store_data(self,data):
if data is None:
return
self.datas.append(data)
def output_txt(self):
print(self.datas)
print(len(self.datas))
def output_h... | [
"noreply@github.com"
] | noreply@github.com |
49712f4c5be88cfb65d43c6284bfbc4775e6101d | 1fd64f8da7b28d597499b70236a7bb1e3a300b33 | /foll/migrations/0012_food_brought_by.py | 891c340d67e1c7b6544f9897fb4f010a6fd8306a | [] | no_license | winstonww/Foll | 342a756bb26fc718f683f83c1c57ec8f13af3e65 | f3e1f83574140fbe7c2124614980f24d640e4318 | refs/heads/master | 2018-12-02T02:22:24.441889 | 2018-09-07T04:44:40 | 2018-09-07T04:44:40 | 61,446,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 651 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-03 20:23
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | [
"Winston Wong"
] | Winston Wong |
314cb13e39d3721bdde09602caf9430c87651252 | e2baefd54ed6f44d351d867b8d8eb937424fae23 | /class-10/game-of-greed/tests/version_4/test_keep_scorers.py | ad3c4e7685ac39c0a0bdef3b04d08c355b08a355 | [] | no_license | codefellows/seattle-python-401n2 | 60cc100b5b6dc8bc3d72784a5ec8f9c2c9db1942 | 24148a2ee6526104566b5df64945a40222cfb3e2 | refs/heads/main | 2023-04-23T15:35:49.820538 | 2021-04-24T18:02:51 | 2021-04-24T18:02:51 | 316,109,616 | 8 | 16 | null | 2021-03-10T05:36:09 | 2020-11-26T03:06:19 | Jupyter Notebook | UTF-8 | Python | false | false | 460 | py | import pytest
from game_of_greed.game_logic import GameLogic
pytestmark = [pytest.mark.version_4]
@pytest.mark.parametrize(
"test_input,expected",
[
((1, 1, 1, 2, 3, 4), (1, 1, 1)),
((1, 1, 5, 2, 3, 5), (1, 1, 5, 5)),
((1, 6, 5, 2, 3, 4), (1, 6, 5, 2, 3, 4)),
((1, 6, 5, 2, 3),... | [
"rogerhuba@gmail.com"
] | rogerhuba@gmail.com |
607dba1ed75e31223982c1e0b0599ca7b50b2e01 | 7947a9f764722686a2802e393a7e27008690a118 | /Pruebas/GmailAPI/threads_main.py | 38648430f39becd29be685cef1423005a10e49c4 | [] | no_license | NILGroup/TFG-1920-CarlosMoreno | e5766d11eee76a3f82e6af2872cc34acff7b16a4 | de580fddae4387ac4db4cf9d1a7ad602c5cba584 | refs/heads/master | 2022-11-08T13:49:46.639450 | 2020-06-26T11:14:31 | 2020-06-26T11:14:31 | 196,052,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | from __future__ import print_function
from googleapiclient.discovery import build
import auth
import threads
SCOPES = ['https://mail.google.com/']
CLIENT_SECRET_FILE = 'credentials.json'
def main():
"""
List the threads of a Gmail account
"""
#Creation of an auth instance
authInst = auth.auth(SCOP... | [
"carmor06@ucm.es"
] | carmor06@ucm.es |
c7e4f92a55508556fc7b9f92a57d18166dc63c1e | 50c826c5eed607f9a014aec986a2c93a09566190 | /Wish/vo/commonVo.py | 54f3866dac13a8ffbf8fb9c2f1fb5b53c64bbb62 | [] | no_license | askad/NetY | fa3a223ba3f9f6316214752ff2aabc689d2ad671 | 08e72361091452a8f63d239c4f952e610074cce1 | refs/heads/master | 2020-12-24T17:35:25.030061 | 2013-02-26T13:28:12 | 2013-02-26T13:28:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | '''
Created on 2012-9-26
@author: yyang21
'''
class MyWishVo:
user_name = ""
wish_list = {}
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
pass
| [
"askadyy@gmail.com"
] | askadyy@gmail.com |
7c504f27c5ef9c889d938478c8390e2d3c14a29b | 0683074d64fe3ac065312625b42179dc10adadc4 | /seg.py | 51a051f0cb3a6172caca5b710af3b7c9e8ef7a40 | [
"MIT"
] | permissive | neonb88/hmr | 0366c82131992479164d09fed75603ada1c51a62 | 881bda791048082df1522defca6f7cf147a5fb52 | refs/heads/master | 2020-04-21T09:28:04.077932 | 2019-04-07T14:08:52 | 2019-04-07T14:08:52 | 169,449,698 | 0 | 0 | null | 2019-02-06T17:52:11 | 2019-02-06T17:52:10 | null | UTF-8 | Python | false | false | 14,631 | py |
# TODO: rename everything "seg" rather than "segment"
WHITE=255
BLACK=0
TRANSPARENT=0
import cv2
import os, tarfile, tempfile
from glob import glob
import numpy as np
np.seterr(all='raise')
import tensorflow as tf
import scipy
from scipy.ndimage.measurements import center_of_mass as CoM
from io import BytesIO
import ... | [
"nathanbendich@gmail.com"
] | nathanbendich@gmail.com |
4d215e168c205d90e704b988833ce6f84595c6ed | f92b9bca8b08ab0458f1403218e2c944b3097d6a | /random/tree_stars.py | 688783efcee8dac8211e9df6b54a8980a574c106 | [] | no_license | citlaligm/Cracking-the-Code | f8f46fdc3525a2fd9188a7de68788a6b6b714f34 | 396b8eaffe470caa86cbf0d1fb6394c6da23012e | refs/heads/master | 2020-12-30T12:43:26.960823 | 2018-03-13T22:03:29 | 2018-03-13T22:03:29 | 91,407,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | def print_tree_left(number_rows):
'''
print a tree made with asterisks of this from:
*
**
***
****
*****
'''
for row in range (number_rows+1):
blank_spaces = " "*(number_rows-row)
stars = "*"*row
print(stars+blank_spaces)
... | [
"gmtlali88@gmail.com"
] | gmtlali88@gmail.com |
270a1aae2fd8c1049b534b01bbc44c37a2580987 | 79e19819aec49b500825f82a7de149eb6a0ba81d | /leetcode/704.py | 67ae34f57125b3c89b84138ec42378a347353c62 | [] | no_license | seoyeonhwng/algorithm | 635e5dc4a2e9e1c50dc0c75d9a2a334110bb8e26 | 90406ee75de69996e666ea505ff5d9045c2ad941 | refs/heads/master | 2023-05-03T16:51:48.454619 | 2021-05-26T00:54:40 | 2021-05-26T00:54:40 | 297,548,218 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | class Solution:
def search(self, nums: List[int], target: int) -> int:
try:
return nums.index(target)
except ValueError:
return -1 | [
"seoyeon@nowbusking.com"
] | seoyeon@nowbusking.com |
4af5f5b06477a413ef50ff358860d456184d6503 | 71b72e0e28d72ceb3eadc1cf6bc6d7c07831e8ad | /contracts/Factory.py | d69cbb6d433409eb61a285fab4db68da86b83534 | [] | no_license | naturaldao/SmartContracts | 29f46d7e0835275afb9cabc097af6a3a102c75db | 51907562297ee317f188b9017d5d7846e5b9d59d | refs/heads/master | 2020-06-16T07:05:34.323911 | 2019-07-10T09:02:55 | 2019-07-10T09:02:55 | 195,508,585 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,422 | py | # @dev Implementation of control contract
# @author radarzhhua@gmail.com
from vyper.interfaces import ERC20
# the contract of NDAO ERC20 token
contract NDAO:
def mint(_to: address, _value: uint256): modifying
def decimals() -> uint256: constant
# the exchange contract
contract Exchange:
def setup(token_... | [
"radarzhhua@gmail.com"
] | radarzhhua@gmail.com |
0395031099dc6c96a3af1b752545b7741a73f11d | 94eca3b81a3fa3484904b38f01cd287ae92fb0cb | /django_blog/django_blog/settings.py | d33437015a4188070da6d893002a9d564452a2ee | [] | no_license | Nemo5749/BlogProject | 42dbb05fcb292af9f1790970d4d1d46432dde11b | 7d74bf4455178d746b9329fd34a06c801dd1b92b | refs/heads/master | 2020-09-09T12:34:21.681477 | 2019-11-13T12:00:15 | 2019-11-13T12:00:15 | 221,447,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,250 | py | """
Django settings for django_blog project.
Generated by 'django-admin startproject' using Django 2.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import o... | [
"2118904726@qq.com"
] | 2118904726@qq.com |
adc4c82afca2554fb969296bae54e2b26b9e6e9f | 45c170fb0673deece06f3055979ece25c3210380 | /toontown/shtiker/DisguisePage.py | 3ee2886febb3d641d32591427874690f460eb813 | [] | no_license | MTTPAM/PublicRelease | 5a479f5f696cfe9f2d9dcd96f378b5ce160ec93f | 825f562d5021c65d40115d64523bb850feff6a98 | refs/heads/master | 2021-07-24T09:48:32.607518 | 2018-11-13T03:17:53 | 2018-11-13T03:17:53 | 119,129,731 | 2 | 6 | null | 2018-11-07T22:10:10 | 2018-01-27T03:43:39 | Python | UTF-8 | Python | false | false | 9,526 | py | #Embedded file name: toontown.shtiker.DisguisePage
from toontown.shtiker import ShtikerPage
from direct.gui.DirectGui import *
from panda3d.core import *
from panda3d.direct import *
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.suit import SuitDNA
from toontown.b... | [
"linktlh@gmail.com"
] | linktlh@gmail.com |
f60a09a69c3aa25345ef39d311cc7f87b386b63e | c252f4084b8d96c7d6d97be36aac5557b2ac9c18 | /servicemgr/location/models.py | 1875ef00b20df5a3bc14abf5f170463da0e6cb3c | [] | no_license | joepetrini/django-service-mgr | 4cd0e762027e7fe7fd2e58f2ea99a40eec3526c6 | ca8ea4b9e7dc05cd68c1bed597c3fb75faf10cbc | refs/heads/master | 2021-01-01T15:59:24.229592 | 2014-09-26T21:43:02 | 2014-09-26T21:43:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,334 | py | from django.utils.translation import ugettext as _
from django.contrib.gis.db import models
class Zipcode(models.Model):
code = models.CharField(max_length=5)
poly = models.PolygonField(null=True, blank=True)
objects = models.GeoManager()
class Meta:
db_table = 'zipcode'
verbose_name ... | [
"joepetrini@gmail.com"
] | joepetrini@gmail.com |
573079cfbf0767034053b8a3881dfb1176f8c8db | 2331d06694b8b56ce0894f7353a2c6a4a869bb01 | /fimod/datatools/rate.py | 21bda6367069824d898b2d80af6eeba8568015fa | [
"MIT"
] | permissive | Miksus/Fimod | da2bbb0d23f96e85976ccb1edb1cabc8495fb147 | 357ae2fa5693cf5170046c7387e47bafa591b3b8 | refs/heads/master | 2020-05-17T13:24:47.541762 | 2019-05-11T17:38:34 | 2019-05-11T17:38:34 | 183,734,221 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 557 | py |
DAYS_IN_YEAR = 365
DAY_MAPPING = {
"annual": DAYS_IN_YEAR,
"semi annual": DAYS_IN_YEAR / 2,
"quartal": 90,
"monthly": 30,
"weekly": 7,
"daily": 1,
}
def convert(rate, from_freq, as_freq="daily", effective_rate=True):
origin_in_days = DAY_MAPPING[from_freq]
out_in_days = DAY_MAPPING[... | [
"koli.mikael@gmail.com"
] | koli.mikael@gmail.com |
dd7d84cf34c22012f1c348f929127d0c48a71c90 | 80ebc985a4fbcd371d37d9de20a4cd078ff40208 | /aws/glue/device.py | 411a287b1f5f17aa292d7361786d4841aa51aab1 | [] | no_license | saritajoshi9389/churn | 3ddc1a35f8900cf9c88ae767238f471eeabe9fc2 | 7b0b5dd7d0dc718cc73aaff44aea620ba3493e79 | refs/heads/master | 2020-04-26T00:57:59.258487 | 2019-02-27T14:11:54 | 2019-02-27T14:11:54 | 173,192,680 | 2 | 1 | null | 2019-02-28T21:46:24 | 2019-02-28T21:46:24 | null | UTF-8 | Python | false | false | 575 | py | import sys
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
from features.device import spark_job
from features.utils import yesterday_dt
args = getResolvedOptions(sys.argv, ['JOB_NAME', 'dt', 'input_path', 'outp... | [
"noreply@github.com"
] | noreply@github.com |
b90ab9abd0e1f5494623de49dc9c4c37bbcac6e2 | 66834fc518f37ee51b9e46a4bae249af4f5aa3b9 | /AbaqusUtils/AbaqusWork/CycleXB.py | 9bb6cdd385fca3873693b3f69d67b5328faa76f8 | [] | no_license | asdasdqwdqwfsdf/cpfe | d5a87be85d86505206b2b320e012d04a9649345f | 23d23b64e03aaa4fbfdef81f433a99eee94d34b6 | refs/heads/master | 2022-02-23T16:19:01.657862 | 2019-09-14T06:07:35 | 2019-09-14T06:07:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,333 | py | from abaqusConstants import *
import __main__
import sys
sys.path.insert(0,'Y://GitKrakenRes//AbaqusUtils//junyiPy')
sys.path.insert(0,'Y://GitKrakenRes//AbaqusUtils//abapy')
import numpy as np
from abapy.mesh import *
from abapy.postproc import *
from Rots import *
odb = session.openOdb(name= 'Y:\FromHPC\MgO\MgO_10... | [
"the.junyi@gmail.com"
] | the.junyi@gmail.com |
f02210f3da12f4494ab6585a0fa66d10885bedd2 | f36a13e13ae0bd3e4a3949b8617b826758df9521 | /insert_mock_data.py | d2980c4a1a9840b97c199a779bea9356725e624b | [] | no_license | an6194/stepik_hh | 6b5bf3dadf23d92c2a4e19e0e5972cf549710920 | 6eb2c0d51ee183381f712b1646738d315fed449b | refs/heads/master | 2023-05-05T05:28:29.942471 | 2021-05-23T06:26:57 | 2021-05-23T06:26:57 | 293,783,263 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,151 | py | from datetime import datetime
import os
import django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'stepik_hh.settings')
django.setup()
import mock_data as data
from app_company.models import Company
from app_vacancy.models import Vacancy, Specialty
if __name__ == '__main__':
Specialty.objects.bulk_create... | [
"an6194@gmail.com"
] | an6194@gmail.com |
d63a8cf77a7bbfd03771436916c9f84472b354e1 | 13efb3baccc678f9d57776244c7dc067e486df9e | /students/migrations/0021_auto_20160517_1221.py | e9210404690fc2e9213f7ae9d9febd5fc7d78325 | [] | no_license | grydinywka/studentsdb | fd109dfe60f4ffd666c12acbe645ca14e064c29b | bc2c968538f88bd539d931a7caf1b693fbb65843 | refs/heads/master | 2020-05-31T00:05:22.638475 | 2016-08-26T17:00:43 | 2016-08-26T17:00:43 | 31,331,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import students.models.Result_exam
class Migration(migrations.Migration):
dependencies = [
('students', '0020_auto_20160421_0936'),
]
operations = [
migrations.AlterField(
... | [
"grydinywka@gmail.com"
] | grydinywka@gmail.com |
57a09d50ed51f5ca3f7871bd72fa0d91aae305c5 | 84de12880ac0823b9a2572c74a5d3d66457f6393 | /P7/wsgi.py | bedea21f23cee83cdc9269ba6eb2437d3721f166 | [] | no_license | mbrazio/P7 | bb6bf037e7bc7cc234f043235b3d4acb100609ca | 6ae36192cb71c11e01f58ddc1f365e82cc1b71b6 | refs/heads/master | 2023-02-01T00:14:05.744504 | 2020-12-18T11:06:15 | 2020-12-18T11:06:15 | 322,578,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py | """
WSGI config for P7 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/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_M... | [
"mbrazio@gmail.com"
] | mbrazio@gmail.com |
2bc14afb8d4778200c8a6b3333969f7f8d426010 | 89200d6c72acccca45808f53fa9bb5a9bd61359a | /visual-inspection/inspection-backend/trigger_download.py | 7175fe998dae0d92e923b238679678b640cba1ce | [
"Apache-2.0"
] | permissive | mathiaspet/xai-demonstrator | 57fce6323eb85e93a7ed4f5b31e7ea7b5ddc4668 | e8024fda489fb28089ad4e05045f0b5aafcef96d | refs/heads/master | 2023-06-11T09:11:08.260760 | 2021-06-26T13:18:19 | 2021-06-26T13:24:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | if __name__ == "__main__":
print("(Down)load the model")
from inspection.model import model
print(type(model))
| [
"kilian.kluge@gmail.com"
] | kilian.kluge@gmail.com |
43c8cbfcbbf7743cce201504530523996e37911a | 864c9bcc6570557eebb9209f8ddcb807d292a21e | /load.py | 01d9a6488a72d73fa1f68648f2065de6f26d2b97 | [] | no_license | RobbyDeng/load-forecasting-system | 456d51c57f9c2e9934db42c3dfb9b29e9538bd06 | b8e18a15e2ab6bf0d5dcc78257d69e7864b40be6 | refs/heads/master | 2022-08-29T05:17:28.207290 | 2020-05-24T06:34:24 | 2020-05-24T06:34:24 | 266,481,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,525 | py | # -*- coding: utf-8 -*-
"""
@Time : 2020/4/12 11:38 上午
@Auth : Robbie Deng
@File :load.py
"""
import h5py
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import datetime
import os
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
from keras.models import Model
from keras.layers import Input, Dense, L... | [
"dengyiran2008@126.com"
] | dengyiran2008@126.com |
539f3a3cec8531e5d5f9cea1ac613dce14ff0517 | 421398679045960cccc547a19def37c9def774af | /src/bin_checker/__init__.py | a0032936a03d333f3defeaf18668a1eccaa2f524 | [
"MIT"
] | permissive | yasserko/bin-checker-py | 06e82a67e3cd12cb157f2a686fdaa746759bb8ee | cc8e047df090222c79c3cc60ed6546e446ca97a8 | refs/heads/main | 2023-03-11T17:37:16.191584 | 2021-02-20T03:04:00 | 2021-02-20T03:04:00 | 338,021,279 | 0 | 0 | MIT | 2021-02-11T12:21:53 | 2021-02-11T12:21:52 | null | UTF-8 | Python | false | false | 70 | py | __version__ = '0.1.0'
from .bin_checker import get_bin # noqa: F401
| [
"ugur@promptapi.com"
] | ugur@promptapi.com |
04be8a83b80a681ee99d6bb1d72cd545501a68b1 | 38e5f0a750b36ea9c945ddc6b36cc9571d3016c5 | /Import.py | ca4bb293f45eb642dd5b74c6f3fd2dae8f121622 | [] | no_license | TahirT/DS_1920_Gr25 | 5ad5221724c587ea182e860212d883f8d3a3d49b | e817f5c81e4f75c2fe4d09c5b8c581871a76b095 | refs/heads/master | 2021-03-04T05:24:14.351244 | 2020-06-07T00:25:23 | 2020-06-07T00:25:23 | 246,010,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,166 | py | import sys
import requests
import os.path
def main():
print("-----------------------------------------------------------------------------\nVendos Komanden: ")
inputi = input()
komanda = inputi.split()
try:
importOrExport = komanda[0].strip()
createKey ... | [
"noreply@github.com"
] | noreply@github.com |
d6283a194230e66597706c7e18e3e3de6e81cf1d | b7b88e3af8b29f1c729a33b2d39dfc5344378fcc | /neuro-stabiliser/SurrGradSpike.py | 6cfb7ead97d0d3b555c3e23ed09b928344ebb1fa | [] | no_license | n3w0rld94/master-dissertation-2021 | 4d2e7f2ac22cd97228491b33a4df3b5a4bbb3067 | ed5b27a65e42f0042aa9c785b559e4f4f5a6f07d | refs/heads/main | 2023-07-01T21:59:34.223471 | 2021-08-16T11:56:59 | 2021-08-16T11:56:59 | 380,571,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,454 | py | import torch
class SurrGradSpike(torch.autograd.Function):
"""
Here we implement our spiking nonlinearity which also implements
the surrogate gradient. By subclassing torch.autograd.Function,
we will be able to use all of PyTorch's autograd functionality.
Here we use the normalized negative part ... | [
"elias.faraone@outlook.com"
] | elias.faraone@outlook.com |
0ef2bcc9c688462fe238bb21496e160b45812ca0 | 3e4b8fe54f11bf36f3615c21fdc1dca0ed00fe72 | /month04/spider/day01/text/02_tieba.py | 63d1010207234daf73d93db6df89f20b4e00ef29 | [] | no_license | leinian85/year2019 | 30d66b1b209915301273f3c367bea224b1f449a4 | 2f573fa1c410e9db692bce65d445d0543fe39503 | refs/heads/master | 2020-06-21T20:06:34.220046 | 2019-11-04T06:37:02 | 2019-11-04T06:37:02 | 197,541,549 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,495 | py | from urllib import request
from urllib import parse
import random
import time
from fake_useragent import UserAgent
import re
class TiebaSpider:
def __init__(self):
self.url = "http://tieba.baidu.com/f?kw={}&pn={}"
def set_headers(self):
us = UserAgent()
self.headers = {"User-Agent":us... | [
"42737521@qq.com"
] | 42737521@qq.com |
8d1ae267007951a34533aae1e23eb15ed57cf4ee | 0d5e40b598ee3ad2c0575a45857df49457a99cc7 | /june/handlers/api.py | d6ab577e83fa85e62f43ad5ac12f2b2f71770f36 | [
"BSD-3-Clause"
] | permissive | mitnk/june | 7fdf928b7de452911a9d683bc50ed52a9f04085c | ab2b8e42e9b632923187333cd91af0f683c16ba6 | refs/heads/master | 2021-01-18T12:01:19.949051 | 2012-03-27T07:10:43 | 2012-03-27T07:10:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,530 | py | import math
from tornado.options import options
from june.lib.handler import BaseHandler
from june.lib.decorators import require_user
from june.models import Topic, Member, Reply
from june.models.mixin import NotifyMixin
class UpTopicHandler(BaseHandler):
"""Up a topic will increase impact of the topic,
and i... | [
"lepture@me.com"
] | lepture@me.com |
599b6baeb468718d2bde9a3a0db53943c0eec447 | 0f84a42fb0d872f7b496e2c7746da223906da11c | /test/unitTest.py | bc6931ce0eb49612a0421e57268aa9d616db877f | [] | no_license | MrrRaph/BMP-Processing | a4af33847415888add9d7ffb3de550a0f7e2652a | 3cf9671db2b270e24cd8a013f2776c6c9e42534a | refs/heads/master | 2023-03-03T03:25:41.173202 | 2021-02-11T21:22:00 | 2021-02-11T21:22:00 | 327,082,731 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,547 | py | import os, sys, re
from os.path import dirname, join, abspath
sys.path.insert(0, abspath(join(dirname(__file__), '..')))
from processors import printers as Printers, transformers as Transformers, filters as Filters
from utils import helpers as hp, colourers, gaussianKernel, gaborKernel
from formats import BMP, PNG
i... | [
"dray.raph@gmail.com"
] | dray.raph@gmail.com |
0aa98669f785923be233c50aeaad378655cff25d | cd6fe27f870a5ad7bedd5e3bd76ac88d732dd375 | /merilent/merilent/wsgi.py | 554fa06c2f1217623e9222aea8d1eecd93ced115 | [] | no_license | SangeethaMogaveera/geetha | ead90fd610284b2edb17976ea3ca665806dd4d6e | 2dcfed281d4345709147df69d3e6bbf03e0a6b8b | refs/heads/master | 2021-01-19T18:48:50.774547 | 2017-08-23T10:29:42 | 2017-08-23T10:29:42 | 101,167,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | """
WSGI config for merilent 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.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SET... | [
"sangeetha.kundar@gmail.com"
] | sangeetha.kundar@gmail.com |
0639dcdde1939e7461b958846c5a90a5b200d1f6 | 89fd8658e708ff64b0d63d3d899ba60b72c70630 | /tailor_distro/generate_bundle_templates.py | 010cd0ee0fca4bf84e1bb6b612ede37bcd4500c5 | [] | no_license | nuclearsandwich/tailor-distro | 3790f8756b5480c43127456a471249af164bebda | e414c8c41a5c66dfc4190cfeff77c0a6b3afbb4c | refs/heads/master | 2020-08-31T15:26:03.837901 | 2019-10-21T15:39:25 | 2019-10-21T15:39:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,636 | py | #!/usr/bin/python3
import argparse
import click
import jinja2
import os
import pathlib
import re
import stat
import sys
from . import debian_templates, YamlLoadAction, SCHEME_S3
from typing import Iterable, List, Mapping, MutableMapping, MutableSet, Callable, Any, Tuple
from bloom.generators.debian.generator import ... | [
"noreply@github.com"
] | noreply@github.com |
b79c542c65bdac0a38d15502a1b45d5019f54c11 | 2187986da02e70275cdb6c1e745608295d9b68dc | /bikedata/weather/__init__.py | 87203362d3c163e235106f33edc61def38ed2a54 | [] | no_license | mjarrett/bikedata | f6996b87d454c3dc11949b8265369f4bec2a362e | db4ef8f898200bd3e488e64b0ff683f7082f059e | refs/heads/master | 2021-07-06T12:17:03.197889 | 2021-01-16T05:11:07 | 2021-01-16T05:11:07 | 221,333,191 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | from .weather_funcs import get_weather_range | [
"msjarrett@gmail.com"
] | msjarrett@gmail.com |
f350e82b2ea1a86ccc2c73a633845637fff6923a | bed7acf829ebaa878bbdd5247816ac55eb2ec266 | /perfect_number.py | 38fcb62b5d623f5b78fd045d4adb754d812acd02 | [] | no_license | bilal-u/python_code-practics | 6b88d7a97703fa1adb685b4eb984a6636f08e78c | 36df7b681022c76ab7b1054c3fe7097080f35b14 | refs/heads/master | 2022-12-07T06:17:08.547441 | 2020-09-08T22:00:39 | 2020-09-08T22:00:39 | 286,859,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | def my_func(n):
new_list=[]
sum_new_list=0
for i in range(1,n):
if n%i==0:
new_list.append(i)
for j in range(len(new_list)):
sum_new_list=sum_new_list+new_list[j]
if sum_new_list==n:
return True
else:
return False
| [
"noreply@github.com"
] | noreply@github.com |
935e676a108a424b28e4d96ac5395af9f062ed92 | 8ce241700d47bdcc244ee5b0ccfc2c55acf8e8c2 | /avg.py | 7e2008d3d942e5f6515926548bac0a9ea6d43a37 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | xetqL/uts | 455f4d2af21fd5de34667f64e7f3b19b2946bddd | 841a498133e5970e502ae58e37c061702e2452b7 | refs/heads/master | 2020-05-31T06:48:22.691388 | 2019-06-17T16:16:06 | 2019-06-17T16:16:06 | 190,150,445 | 0 | 0 | null | 2019-06-04T07:20:41 | 2019-06-04T07:20:38 | null | UTF-8 | Python | false | false | 249 | py | with open('result-loadws', 'r') as o:
d = o.read().split('\n')[:-1]
print(sum([float(x) for x in d])/len(d), 'load-ws')
with open('result-ws', 'r') as o:
d = o.read().split('\n')[:-1]
print(sum([float(x) for x in d])/len(d), 'std-ws')
| [
"anthony.boulmier@unige.ch"
] | anthony.boulmier@unige.ch |
6ae7dd790944ad1bced717c8fc33934cc14e4e20 | a975161a65bde7a0786eaab0e493f72ffd9f81b1 | /cv/obstacle.py | 6ce518db5c265bcd2570f085893bcbccbe9ea8cd | [] | no_license | rsx-utoronto/rover2017 | ef85d5bbd1daefb169d3f5c967ab8244b610f6cc | 5c8653ceec035a3668bf8eb02b071327994339c6 | refs/heads/master | 2021-01-13T08:18:40.325531 | 2018-09-07T21:35:54 | 2018-09-07T21:35:54 | 69,744,778 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,253 | py | import numpy as np
import cv2
import matplotlib.pyplot as plt
def main():
# full colour image loaded only so user can see output on top
img = cv2.imread('img/desert.jpg')
imgGrey = cv2.imread('img/desert.jpg', 0)
imgGrey = cv2.blur(imgGrey, (3, 3))
# detect sharp edges only, so high threshold
... | [
"c2huc2hu@gmail.com"
] | c2huc2hu@gmail.com |
89ca5a96776363e57d917e77124bd33367b2f08d | 7e6431c24469182efd9ff5d209353bea988ec926 | /tabulation/sn_Ia.py | f82784fdcbcae9e4b7ab0348fbde5e82be285e98 | [
"MIT"
] | permissive | gillenbrown/Tabulation | 28bf461b31b2bb4e750d1e67992cf97896f2955a | a894d530ca8efe270c42da385150debaaf132fc5 | refs/heads/master | 2021-07-24T13:16:40.467768 | 2020-04-28T17:04:12 | 2020-04-28T17:04:12 | 158,615,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,515 | py | import numpy as np
import yields
from scipy import integrate
class SNIa(object):
"""
Class holding the SNIa delay time distribution and yields.
"""
def __init__(self, dtd_name, yield_name, lifetimes_obj, imf_obj,
**kwargs):
"""
Initialize the SN Ia model.
:par... | [
"gillenbrown@gmail.com"
] | gillenbrown@gmail.com |
a6793fef67f7d299ac2575aa4f3fdafd5fc99bae | 89b0920101eaf09b0afb9a5449f3fabd68ac21c1 | /analysis-blocks/scripts/SlowAdder.py | fd81750d4252600627d344e3bba39799ecfc459f | [] | no_license | metamorph-inc/openmeta-examples-and-templates | cffdcecf8b4fca1ea8ae4f8880a5f2720ec05f4b | 4f6cc54510c742b9a3bf39338a5a01df510c1243 | refs/heads/master | 2023-04-10T06:25:28.691426 | 2020-03-12T23:20:36 | 2020-03-12T23:20:36 | 91,151,238 | 7 | 3 | null | 2018-12-03T23:01:19 | 2017-05-13T05:17:18 | Python | UTF-8 | Python | false | false | 825 | py | from __future__ import print_function
from openmdao.api import IndepVarComp, Component, Problem, Group, FileRef
import numpy as np
import time
class SlowAdder(Component):
def __init__(self):
super(SlowAdder, self).__init__()
self.add_param("x", val=0.0)
self.add_param("y", val=0.0)
... | [
"tthomas@metamorphsoftware.com"
] | tthomas@metamorphsoftware.com |
aebdc3524fc0fc33d949008c93a5e8e09e93196b | be7b3f60f53cc380c37fcefae7fa4f637d01ff25 | /image_processing/denoise_cnn/cnn_model.py | 1464e1d76de11d97c3bb5e51773e1eb626e6b047 | [] | no_license | holmesjian/image_processing | 007ee7b445f7c0bf9301b06bab0dd2536e1d146e | d2602cf9c7876de9035cb26c471460a0780eb2c4 | refs/heads/master | 2022-10-18T09:22:36.476653 | 2020-06-10T14:07:30 | 2020-06-10T14:07:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,055 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 9 18:43:10 2020
@author: SS
"""
import torch.nn as nn
import torch.nn.functional as F
import torch
class Denoiser(nn.Module):
def __init__(self):
super(Denoiser, self).__init__()
# First, define encoding layers
# conv layer (depth from 1 --> ... | [
"shanminlin@gmail.com"
] | shanminlin@gmail.com |
d59fcc9a536b2f7a1bfb75702263cf34958df353 | ee495d420af376e89e4c938be92c1647118b9e11 | /MachineLearning/Will's work/Early Learning Processes/Gnarl Evolution Learning/settings_parametric_swing.py | 5633c6b4b3003d182d09f74e23b779147283c15b | [] | no_license | jonathanmatthews/Robotics | d81779174e6556e3f14b2d87fa621fe82e149904 | c80e19c60a0c15092ac970b2723aac71d890acc9 | refs/heads/master | 2020-05-09T15:28:14.536189 | 2019-04-09T10:44:43 | 2019-04-09T10:44:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,212 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 7 17:09:08 2019
@author: William
"""
import numpy as np
input_nodes = 4
output_nodes = 3
max_layers = 6
max_layers += 1 #1 more than the number of hidden layers
initial_nodes = 50
initial_nodes += 1
maximum_nodes = 500
initial_links = 200
initial_links +... | [
"georgesheppard98@gmail.com"
] | georgesheppard98@gmail.com |
c44a12d77ff12294af2fe0d956eadc83432d93a5 | 77900cdd9a815caf1cd04705321ca93f5072179f | /Project/.history/main_20211116163259.py | e8cab25e7e1da7157cd5e01b04d2ba8c87d33c20 | [] | no_license | Bom19990111/helloword_python | 717799d994223d65de5adaeabecf396ff2bc1fb7 | 2ee2e67a60043f03c1ce4b070470c7d2dcdc72a7 | refs/heads/master | 2023-09-06T04:17:02.057628 | 2021-11-21T20:00:46 | 2021-11-21T20:00:46 | 407,063,273 | 0 | 1 | null | 2021-11-21T20:00:47 | 2021-09-16T07:18:35 | Python | UTF-8 | Python | false | false | 2,680 | py | import product as p
def choose():
action = 0
while action >= 0:
if action == 1:
p.AddProduct()
print("--------------------------------")
elif action == 2:
p.DeleteProduct()
elif action == 3:
p.UpdateProduct()
elif action == 4:
... | [
"phanthituyngoc1995@gmail.com"
] | phanthituyngoc1995@gmail.com |
20429853619b501d1b98f0a94d7a236b46dc147f | d9df5a829a50c6135f10fa9959ab095e012b086c | /gmail.py | 73cb4916304491b23ea4a0d43d669c108927dedd | [] | no_license | weineran/google_apis | 988e9c80eacd31e17bac54731cb5eb2582c1c8a9 | 91bd8f90a26713f00ea4ac7b3e384beb197a9095 | refs/heads/master | 2021-01-01T17:26:24.268145 | 2017-07-23T04:19:59 | 2017-07-23T04:19:59 | 98,074,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,139 | py | from __future__ import print_function
import os
from apiclient import discovery, errors
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
import base64
from email.mime.text import MIMEText
# try:
# import argparse
# flags = argparse.ArgumentParser(parents=[t... | [
"andrew.weiner@phenixp2p.com"
] | andrew.weiner@phenixp2p.com |
da9a9fdeb4ec986b195c6422676a9c0def977e97 | b673bf548ada9285a92d229f0d6c4de82794a50b | /script.py | aa1eede07a50f53741ecf7c6fc65a70dcbb572dc | [] | no_license | bcjay03/Python-numpy | b34079f4a3bfffb45d313ab8046ad28f412bf81b | 14da36b71bd7454de06aa3d9ae0f6a7f309ad12c | refs/heads/master | 2023-01-11T20:54:37.371118 | 2020-11-03T07:50:09 | 2020-11-03T07:50:09 | 309,611,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | import numpy as np
cupcakes = np.array([2, 0.75, 2, 1, 0.5])
recipes = np.genfromtxt('recipes.csv',
delimiter=',')
print recipes
eggs = recipes[:, 2]
one_egg = recipes[eggs == 1]
print one_egg
cookies = recipes[2,:]
double_batch = cupcakes * 2
grocery_list = cookies + double_batch
prin... | [
"noreply@github.com"
] | noreply@github.com |
8ec354f000f4e4342d3dfb11eda1357d84aeddfe | d11f6f2e16e46ddd2382866f45d840ef61bc1888 | /umm-python/app/global_data/global_data.py | cab2f54faf1eaf734635edde2dc8faca47c0a14e | [
"Apache-2.0"
] | permissive | Dongzhu/cubeai | 16809e5b501d78b7a06a436d298716bc549f583c | 019f6334afe4983e9fce462f02e90fd62cbe6ab4 | refs/heads/master | 2023-03-18T01:01:44.655914 | 2021-01-19T01:37:48 | 2021-01-19T01:37:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,315 | py | import uuid
from app.global_data.config import Config
from app.global_data.consul_client import ConsulClient
from app.global_data.oauth_client import OauthClient
from app.global_data.db_client import DataBaseClient
import logging
class GlobalData:
def __init__(self):
self.inited = False
self.init_... | [
"huolongshe@126.com"
] | huolongshe@126.com |
f8d64e590d98bf1860b61263d394aa612856fd4b | 3baa559e4e8241cc23c93a5c5052f43375db532b | /Pandemic simulation/test_sim.py | 90d591d9bf838081ebdd149ad86ff80919aab594 | [] | no_license | jonyeru23/pandemicc-simulation | 3a70d06e2678ee6a0042fd44203c76f659326004 | f4860b03e46e3b63d7c26fa13a08a27bb8ee27a5 | refs/heads/main | 2023-05-11T16:01:44.841288 | 2021-06-01T12:56:30 | 2021-06-01T12:56:30 | 372,829,938 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | from simulation import *
import pytest
@pytest.fixture(scope='module')
def sims():
sims = {
'board': Board()
}
sims['board'].set_up()
yield sims
def test_running(sims):
assert sims['board'].is_running() is True
sims['board'].terminate()
assert sims['board'].is_run... | [
"noreply@github.com"
] | noreply@github.com |
9f4de1e88fa4fbdd4019c23c313111bda821f758 | 6f7c013dba36d7e47d0ad078373d72e034efb267 | /train.py | 5a21d0225541b5fee651c1bc03e36cd1da3578a7 | [] | no_license | BioroboticsLab/cell_inspection | 5b99b18e3d1357232e884da4e6ac49d204282297 | 033b8983dd844bf8d6b5f9a75d3ae45c442cd4be | refs/heads/master | 2020-06-05T09:32:41.762703 | 2019-10-30T21:07:15 | 2019-10-30T21:07:15 | 192,393,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,224 | py | import json, sys
import random
import datetime
from copy import copy
import torch
import torchvision
from torchvision import transforms
from torch.utils import data
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import matplotlib.pyplot as plt
import numpy as np
import itertools
d... | [
"sophie.zabel@gmx.de"
] | sophie.zabel@gmx.de |
e18964129627f7b61f4ca57f193069b5e48fc19e | 5351a750a28e4294331d846781199ea1741b2d21 | /autodonnees/webscraping/scripts/leg019alsace_xml_json.py | ffb9ca8cb5d19ef16b63b9f7b4bf55bcd2d74b13 | [] | no_license | raphadasilva/blog_rdasilva | e64c191e5302dc48decef46e5ddedc60d6e4f026 | a4b02bc6691a0bae09fba78740ac67713edefc9e | refs/heads/master | 2023-04-07T00:02:23.753920 | 2023-03-22T08:12:38 | 2023-03-22T08:12:38 | 220,649,045 | 18 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,256 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from urllib.request import urlopen
from lxml import etree
import json
departements = ["67", "68"]
exceptions = ["68224", "68006", "67482", "67372"]
partis = {"MDM": "MODEM","COM": "PC", "SOC" : "PS", "REM" : "LREM", "REG": "UL"}
liste_objets = []
for departement in departemen... | [
"noreply@github.com"
] | noreply@github.com |
64ea71f5f133f4b646b05a9b3e79b9216c45c24b | 0bd8d455c58928b5473064e70e57b6841fb62d10 | /equinox/filters.py | 5e324fac52d8cc4476bfedabad715b92ab7f6d80 | [
"Apache-2.0"
] | permissive | codeaudit/equinox | 4f52c9e80bed2905dd876e5d645099defca0cce9 | 12acbea2720bb016ff9503650a5bdb11818f3caf | refs/heads/main | 2023-08-21T23:51:06.044870 | 2021-10-02T14:45:43 | 2021-10-02T14:45:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,344 | py | from typing import Any, Callable, List, Optional, Tuple, Union
from typing_extensions import get_args
import jax
import jax.numpy as jnp
from .custom_types import Array, MoreArrays, PyTree, TreeDef
from .deprecated import deprecated
#
# Filter functions
#
_array_types = get_args(Array)
_morearray_types = get_args(... | [
"33688385+patrick-kidger@users.noreply.github.com"
] | 33688385+patrick-kidger@users.noreply.github.com |
ff6302a520720d2dff928cc3c2a84c2b46328e13 | f8b80ad57f11b7afeb148311b06533399453d3ac | /cfwclasses.py | 578a607937fca38886eb1c0dd8eeb131546c8749 | [] | no_license | mlb5000/CFunctionWrapperGenerator | fcabdaf317a8706dea972d5cdcd32bedda766772 | aa02c158ea92459cb28b53edf858af71b6d0eb64 | refs/heads/master | 2020-05-02T05:23:22.015091 | 2012-12-15T15:46:46 | 2012-12-15T15:46:46 | 1,918,327 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,149 | py | import re
import texttemplates
INTERFACE_PREFIX = 'I'
class NullDevice(object):
def write(self, s):
pass
class FunctionArgument(object):
def __init__(self, ast_node):
self.node = ast_node
def type(self):
return self._sanitizeType(self.node.type)
def _sanitizeType(self, ... | [
"github@bakermatt.com"
] | github@bakermatt.com |
6d85caf1b39f7c2f09ed0ea3f3131ab3562b0fb6 | 51f30a0620abacbeaae40bd4a4d200f2fb57b82b | /018-wizards.py | b3d06dffdad0134f4f84ef7f90e6426d77165314 | [] | no_license | blckjack/problems | 0363c6011d2aea1840602f1c38db8ff3e1da7ec1 | 582fbe603947f16a10a7e608462d0cffa3a80955 | refs/heads/master | 2021-01-22T04:18:13.199639 | 2017-06-12T11:14:51 | 2017-06-12T11:14:51 | 92,452,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,391 | py | # http://aAAmp.ru/asp/do/index.asp?main=tasminimum&id_AAourse=2&id_seAAtion=12&id_topiAA=8&id_problem=42
f_in = open("INPUT.txt")
N = [int(s) for s in f_in.readline().strip().split()]
A = [int(s) for s in f_in.readline().strip().split()]
B = [int(s) for s in f_in.readline().strip().split()]
AA = A[:]
BB = B[:]
i = 0
w... | [
"nikita.goncharenko@grammarly.com"
] | nikita.goncharenko@grammarly.com |
acdeb49d680acde21db9044a869d98242838a8cd | 1345e4ec80ceb8baed223e29f345ce68e0b392ad | /rsacipher.py | f9a264dca5436c8316cbf48836cbe77b2704656d | [] | no_license | Dhruv-Pindawala/Cryptography | 86cdbd9206296ce5624409c841fdf24a0d29fe30 | 51b5f030a5f2955003d3e5f3cebc481527233ba0 | refs/heads/master | 2022-12-17T16:55:38.028910 | 2020-07-22T13:25:32 | 2020-07-22T13:25:32 | 281,666,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,619 | py | import sys
defblocksize = 128 #128 bytes
bytesize = 256 # one byte has 256 different values
name = input('enter the name wsing which files were created : ')
ops = input('what do you want to do, enter e to encrypt and d to decrypt : ')
def main(mode):
filename = 'encrypted_file.txt'
if mode == 'e':
text ... | [
"dhruv.pindawala@gmail.com"
] | dhruv.pindawala@gmail.com |
1bd4557b6e1ff74685857f106552ade204203737 | f1f462735673afd42f7a1f0ba70c434222ea8812 | /crm_crash_course/settings.py | b6c7b30c377c43e2f44b6b0b510a28344dc80c0f | [] | no_license | danilivanyuk/CRM | 5e570f54adacc828f02f03f7fe2e23d8648a1b84 | c31666cb9f535dced35a21a5fcb1af67eb3aedab | refs/heads/master | 2022-10-08T08:11:42.413217 | 2020-06-11T14:23:45 | 2020-06-11T14:23:45 | 271,565,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,624 | py | """
Django settings for crm_crash_course project.
Generated by 'django-admin startproject' using Django 3.0.5.
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/
"""
imp... | [
"danilivanyuk00@gmail.com"
] | danilivanyuk00@gmail.com |
61f3b78b6cec5251b63729c9310b0cd9e9bbb29a | 55e30f0d61b89120e6914eae88854a805c46effe | /MACHINE LEARNING PROGRAMS/scripts/gradient_descent.py | de1ff544137207b69a8f7c7431a52572105992ba | [] | no_license | Meghali-Nandi/MACHINE-LEARNING-SCRIPTS-INITIAL- | 8d20bf961971fb2af32899d45ebc83433b8aa918 | 3daf25e0055dc310e9d6345ae214ac8f0a301b3e | refs/heads/master | 2021-01-09T23:42:11.287700 | 2017-09-01T03:25:37 | 2017-09-01T03:25:37 | 102,069,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,409 | py | import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import random
from mpl_toolkits.mplot3d import Axes3D
def data_analysis():
data=pd.read_csv('data.csv')
drop_features=['color','clarity','cut','table','depth','y','x']
for f in drop_features:
... | [
"noreply@github.com"
] | noreply@github.com |
fa45fa3e4460095d824552aa35a17268abf6e8d3 | 481ce69bd3611715fef0be99c655c95d67f16d5f | /riopy/tests/test_halocell.py | bb4e9a4da694b436c60b341228f6c83519a79a89 | [
"BSD-3-Clause"
] | permissive | fsimkovic/riopy | 0ffed18c72573e824affa97d5c17ca462c5f2031 | 5dc4083d1c0919d94ceeac802d3fb40748b947f3 | refs/heads/master | 2021-03-24T10:14:25.904758 | 2018-08-30T13:16:02 | 2018-08-30T13:16:02 | 117,836,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,868 | py |
import unittest
from riopy.halocell import HaloCell
class HaloCellTest(unittest.TestCase):
def test_ops_1(self):
mate_ops = HaloCell.ops(0)
self.assertListEqual([(0, 0, 0)], mate_ops)
def test_ops_2(self):
mate_ops = HaloCell.ops(1)
true_ops = [(0, 1, 1), (1, -1, -1), (1, 0, ... | [
"felixsimkovic@me.com"
] | felixsimkovic@me.com |
5288b36e1e733d76353ea4bf4170c5a33e1bd0a5 | 5670eb8731ffcbeffc0457f12cd077fea29266ac | /tests/test_s3-policy.py | 5668724747bf3872855ff9d6f7a714bd9d53dd51 | [
"Apache-2.0"
] | permissive | kurmiashish/hammer | 92a221e8585c0472f4e6ecf295c23f1f26d1ba0a | fd2b29754fd3d297aa0af6fa5f9f337196f04e6d | refs/heads/master | 2020-06-14T07:11:34.886661 | 2020-04-27T20:46:53 | 2020-04-27T20:46:53 | 194,943,990 | 0 | 0 | NOASSERTION | 2019-07-02T22:39:26 | 2019-07-02T22:39:26 | null | UTF-8 | Python | false | false | 6,004 | py | import pytest
from . import mock_s3
from library.aws.s3 import S3BucketsPolicyChecker
from library.aws.utility import Account
buckets = {
"Bucket1": {
"Description": "Bucket without policy",
"CheckShouldPass": True,
"Policy": """"""
},
"Bucket2": {
"Description": "Public ... | [
"pranav16@gmail.com"
] | pranav16@gmail.com |
31ac6bd14d39cf3d968d2678dd7d021460a763e5 | f8db0e2ef4b3716ba4c9a34663c9b02575e8dfa5 | /Memory game.py | 6454d4de015b489e0eba48759dec2e0f0eaa22ab | [] | no_license | SivakumaranM/Py-games | 3beffdb90ba49a689c11c9cc4cc674916260e09f | 1f48aff8acfad7f32cbebb494e3f2c8a3dd41d28 | refs/heads/master | 2021-01-10T20:56:34.054720 | 2014-04-06T20:36:25 | 2014-04-06T20:36:25 | 18,497,669 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,932 | py | # Card game - Memory
import simplegui
import random
list=range(0,8)+range(0,8)
count=0
# helper function to initialize globals
def init():
global list, exposed, count, state
random.shuffle(list)
exposed=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
state=0
count=0
label.set_text("Moves:"+str(count))
... | [
"sivakumaran.manoharan@gmail.com"
] | sivakumaran.manoharan@gmail.com |
892d1f7a730ca334b28fb0d84012c7de626b560d | e2ef58aa444e9e97ed26ef52bc69ac8bd79bc93e | /podoc/tests/test_utils.py | 4e8a2b8169b447a65c22f3dda2df52035c514a17 | [
"BSD-3-Clause"
] | permissive | willingc/podoc | 1dc1c18f40e06b47760f0f6227ec70bd2dd1d19e | 7021aec70d47a8a3a934c5799828f412e38b7c23 | refs/heads/master | 2021-01-17T10:04:47.414887 | 2016-04-02T09:56:55 | 2016-04-02T09:56:55 | 53,595,629 | 0 | 0 | null | 2016-03-10T15:32:25 | 2016-03-10T15:32:23 | Python | UTF-8 | Python | false | false | 2,014 | py | # -*- coding: utf-8 -*-
"""Test utility functions."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import json
import logging
import os.path as op
from pytest import mark, raises
from ..uti... | [
"cyrille.rossant@gmail.com"
] | cyrille.rossant@gmail.com |
addfd5395fcac478bbbb3b1b1eb799021999e724 | 31aa33650348dc2157ee91c17f5080ee4a1b7923 | /PythonPrograms/BasicPrograms/BinarySearch-Ex-3.py | e90ea8a4e492b49183161a6d36baa25f43a5454b | [] | no_license | kaushiks90/PythonPrograms | 55c0a975a26f9f806b90fef826d613fd4e23c2de | e418bf529146f91d2cd6c46a3472f8be102ab26d | refs/heads/master | 2021-01-11T01:15:22.406750 | 2016-12-10T09:42:01 | 2016-12-10T09:42:01 | 70,735,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,086 | py | #Write Binary Search code to find the first and last occurance in the array
def BinarySearchFirstOccurance(inputArray,searchElement):
first=0
last=len(inputArray)-1
result=-1
while(first<=last):
mid=(first+last)//2
if(searchElement==inputArray[mid]):
result=mid
... | [
"kaushis90@outlook.com"
] | kaushis90@outlook.com |
715d48294f51deec24a2be0e2e499cb445e21a45 | 8e52c27f1b2823db67db4438b2b7e22c18254eca | /pytorch/pytorchcv/models/sepreresnet.py | 1b32e85718d516056c6f4de7cde5a45e85de714d | [
"MIT"
] | permissive | earhian/imgclsmob | 5582f5f2d4062b620eecc28d5c4c9245fea47291 | c87c0942420876941868c016211073dec4392e4d | refs/heads/master | 2020-04-12T02:13:55.258601 | 2018-12-17T20:38:19 | 2018-12-17T20:38:19 | 162,242,486 | 1 | 0 | MIT | 2018-12-18T06:40:42 | 2018-12-18T06:40:41 | null | UTF-8 | Python | false | false | 13,510 | py | """
SE-PreResNet, implemented in PyTorch.
Original paper: 'Squeeze-and-Excitation Networks,' https://arxiv.org/abs/1709.01507.
"""
__all__ = ['SEPreResNet', 'sepreresnet18', 'sepreresnet34', 'sepreresnet50', 'sepreresnet50b', 'sepreresnet101',
'sepreresnet101b', 'sepreresnet152', 'sepreresnet152b', ... | [
"osemery@gmail.com"
] | osemery@gmail.com |
8de2486482a883800948f7d6d08d5ce1676ba874 | 6466eef5477db250879a74935b3b776dc878ff3b | /ideas/views.py | e959cd77ba2866f690fca657fdcb6afc1b18108b | [] | no_license | BakdauletBolatE/django_ideas | 8edb61a569f436865283e82edba3377a150665a8 | ef0258f3aae0c090d38a5098d175bceaddcf67af | refs/heads/master | 2023-03-12T00:02:04.969353 | 2021-03-02T19:41:00 | 2021-03-02T19:41:00 | 324,287,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | from django.shortcuts import render, redirect
from Content.models import Ideas,ICategory
def home(request):
lastideas = Ideas.objects.all()[:3]
categories = ICategory.objects.all()[:4]
data = {
'categories':categories,
'lastideas':lastideas
}
return render(request,'home... | [
"bakosh21345@gmail.com"
] | bakosh21345@gmail.com |
2ea6141d5aad61e70693ebadf2587997323d5e1c | ae05e0bc52b66ef70657270e00ec5e5db01b0fd9 | /CursoemVideo/e094.py | dea1b35e6f9f0ac071f96ce911a882b3cc7ee55b | [] | no_license | jamilemerlin/exercicios_python | c4ca8c28169cb131b047053cd0677e56657af5c0 | 3f6eff865ec52e880fc8303207ed35857cf74a4e | refs/heads/master | 2022-04-18T15:49:39.320014 | 2020-04-18T14:42:31 | 2020-04-18T14:42:31 | 255,313,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,299 | py | dados_pessoas = dict()
pessoas_cadastradas = list()
soma_idades = 0
while True:
dados_pessoas.clear()
dados_pessoas['nome'] = str(input('Nome: '))
while True:
dados_pessoas['sexo'] = str(input('Sexo: [F/M] ')).upper()
if dados_pessoas['sexo'] in 'FM':
break
print('Erro! P... | [
"jamilemerlin@gmail.com"
] | jamilemerlin@gmail.com |
5a5ba580368f3b52d505bffe9a40632b5220bd9d | bc21a501b92919780d9190426ffac37391116c42 | /Polynomial Regression/degree_6_L2 regularistion.py | 2184060b9f15b0f47d6dac0ff3ddcbf59128afe6 | [
"MIT"
] | permissive | prakhargupt00/Machine-Learning-from-scratch | 779d599927c8888b1d3001255b8f8d2b59f612b9 | abd0ea60661656763de485e23bf458c8abfcba57 | refs/heads/master | 2021-07-18T08:39:05.091813 | 2020-10-06T07:05:31 | 2020-10-06T07:05:31 | 217,238,695 | 3 | 0 | null | 2020-10-06T07:05:32 | 2019-10-24T07:31:05 | Python | UTF-8 | Python | false | false | 4,438 | py | # -*- coding: utf-8 -*-
"""
# degree 6 with L2 regularisation
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
df = pd.read_csv("3D_spatial_network.csv")
data = df.values
np.random.shuffle(data)
#for degree 6
data = np.append(data,(data[0:,1]**2).reshape(-1,... | [
"noreply@github.com"
] | noreply@github.com |
6a6fa620c02a9969300f1da35177f8acf5abe1d9 | 585bc7a21664e7a371950c4811723aae92256c92 | /test.py | f3c46723e224226df8b89453fcbcfb8851c88fe4 | [] | no_license | JacquesLucke/ml_test | bfb421ba6c423bfda545dac7aeabbcc81d71abd8 | 3c743b0b60dcf492a64bea2ed16c7edc4e6a6809 | refs/heads/master | 2023-06-03T20:24:46.733564 | 2021-06-19T17:08:10 | 2021-06-19T17:08:10 | 378,464,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | import numpy as np
weights = np.array(
[
[[1, 2], [3, 4]],
[[-1, -2], [-3, -4]],
[[0, 3], [-1, 2]],
]
)
data_in = np.array(
[
[1, 2],
[3, 4],
]
)
print(weights.shape)
print(weights)
print(data_in.shape)
print(data_in)
print(np.tensordot(weights, data_in, 2))
e... | [
"mail@jlucke.com"
] | mail@jlucke.com |
79a374e069f2560a236e3aed7210d2639f2325a0 | 62ba52c70a69199b4d093447f20ade5257623029 | /parser.py | d904cfcb73a3d4f0d169580a4ae1fb1aeacb0c3b | [] | no_license | LeeHwanWoong/tensorflow | 93d376d9ef612282898e433ad42a3990ea0d2439 | c1c75412af6c0c7822bcf4ff416b3930f4d2d5c3 | refs/heads/master | 2021-05-13T21:39:37.645328 | 2018-03-28T12:37:24 | 2018-03-28T12:37:24 | 116,469,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,508 | py | import requests
import openpyxl
from bs4 import BeautifulSoup
movie_num = 98438
row_index = 1
f = open("test2.txt",'w')
f.close()
for i in range(3):
movie_num = movie_num+i
req = requests.get('https://movie.naver.com/movie/bi/mi/pointWriteFormList.nhn?code='+str(movie_num)+'&type=after&isActualPointWriteExecute=fa... | [
"lhw3110@gmail.com"
] | lhw3110@gmail.com |
9534a92e091c4e10f31904e097e3fb0061618275 | d70d242e1dc08c9c35c8b75f86720caa7fd02edf | /DefApp/django.wsgi.py | 2340c6c840cbbc03a869d227793c4200d07944bf | [] | no_license | bifenbecker/defapp | c7d633aa2f06a26404421bbf97a2cbf28aaf6f61 | 660906b828cccf8a6a4de5f9a3f46c912bd360ad | refs/heads/main | 2023-08-22T03:43:37.336500 | 2021-09-28T21:02:08 | 2021-09-28T21:02:08 | 408,874,814 | 0 | 0 | null | 2021-09-28T20:15:13 | 2021-09-21T15:29:37 | Python | UTF-8 | Python | false | false | 193 | py | import os, sys
sys.path.append('C:/django')
os.environ['DJANGO_SETTINGS_MODULE'] = 'testserver.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler() | [
"b1fenbecker@mail.ru"
] | b1fenbecker@mail.ru |
d0f5517126e3f7c0a967829a45dd104a9675b324 | 8705d1667794a5c4d265df1e1bd8faf0226e253b | /test.py | 9f2794e5ce7c8f36103cef6612a82fa22a9bc18c | [
"MIT"
] | permissive | hukim1112/weakalign | 43f978c05e9562f6d3fbc200152f687f2b00499f | 4d2c5a275fd50f34418734198b32de3c8ce749a8 | refs/heads/master | 2020-05-16T10:31:30.698133 | 2019-06-15T13:28:09 | 2019-06-15T13:28:09 | 182,987,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py | from options.options import ArgumentParser
args,arg_groups = ArgumentParser(mode='train_weak').parse()
print(arg_groups['weak_loss']) | [
"hyounguk1112@gmail.com"
] | hyounguk1112@gmail.com |
824db027a189587196ece3814888aad0001898d6 | d95a672d614ea547a79be582fc9e9e97a09f7d9d | /pack/ex3_18.py | 2e00fe3851e1b7f4f70930d8e8514b207e749b6b | [] | no_license | vt0311/python | 26992c096512df8d0304f6d8b452a663645a8b61 | 51fa4c240b9f69a81f68d75e3f6ffdd9dada8848 | refs/heads/master | 2021-09-06T12:01:40.433969 | 2018-02-06T09:28:32 | 2018-02-06T09:28:32 | 107,950,338 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,487 | py | print('방법1 : import 패키지명.모듈명')
import pack.mymod1
print(dir(pack.mymod1)) # mymod1에 정의된 멤버 확인
print(pack.mymod1.__file__)# 경로 명 및 파일 명
print(pack.mymod1.__name__)# 모듈 명
print('mymod1의 함수 호출')
list1 = [1, 3]
list2 = [1, 2]
pack.mymod1.ListHap(list1, list2)
print('다른 모듈의 전역 변수 : ', pack.mymod1.tot)
print('방법2 : fro... | [
"hsw0311@nate.com"
] | hsw0311@nate.com |
aa3665291dc5004e1922789f1b587014fec19d63 | aa37600e639f1ece04d84f7746a836d564a49b3b | /assets/data_asset/life_event_prep.py | b0c3a58f6bd5d1c97a7e08a2606e326b33159cf2 | [] | no_license | WilHoge/TestR | fef5894f8109e436031660abcec0c8fa46f29ad3 | b002e8589d8f860091a21dcf68dae96e2760e23f | refs/heads/master | 2022-11-11T10:27:40.819635 | 2020-07-02T15:13:33 | 2020-07-02T15:13:33 | 276,604,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,104 | py | """
Sample Materials, provided under license.
Licensed Materials - Property of IBM
© Copyright IBM Corp. 2019. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
"""
import pandas as pd
import numpy as np
import da... | [
"noreply@ibm.com"
] | noreply@ibm.com |
d652874582dc40e9e974ff7f83d810641ca7894e | 25852375c15731964c2f6bdd7f43245baf0598f0 | /pytorch_demo/nn_linear.py | c5693948a1185345895aec42c765d983787805c2 | [] | no_license | qufeng126/pyTorch_learning | 2d12c2af0f99e99b0770d084c4075aa2b5e088f6 | 77e62727e96c7ceb99c45a55cdd91a0f7bfe6b68 | refs/heads/master | 2023-08-24T17:14:49.785156 | 2021-10-19T07:21:23 | 2021-10-19T07:21:23 | 417,695,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | '''
线性(直接进行全连接)
'''
import torch
import torchvision
from torch import nn
from torch.nn import Linear
from torch.utils.data import DataLoader
dataset = torchvision.datasets.CIFAR10("../datasets/CIFAR10", train=False, transform=torchvision.transforms.ToTensor(),
download=True)
dat... | [
"lenovo"
] | lenovo |
0d6bf8c67ee4c9ca9bfcb123add49aadc2c2e07f | 735f8009a1708910eef7e67d3f142d34ed192f40 | /server_udp.py | 87633accc329f1a522668915b0235bc75b7ad6b2 | [] | no_license | Ntaylor1027/Networking-Proj4 | 18ac54ab2840b08c6deeb721ecf9fe02f1f3a164 | e3868c83c9783114d3ed742e60e37f5cd0c66eb8 | refs/heads/master | 2020-09-27T00:09:28.838570 | 2019-12-17T19:06:01 | 2019-12-17T19:06:01 | 226,373,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,038 | py | #!/usr/bin/env python3
"""Usage: server_udp.py <outFile>
Options:
-h --help
Arguments:
outFile (String) Name of file to write to
"""
import socket
from docopt import docopt
def grab_seq_num(string):
#string = string.decode('utf-8') # convert bytes to string
payload = ... | [
"noah.j.taylor@wsu.edu"
] | noah.j.taylor@wsu.edu |
9869e19d9b1f3b150675f4842037c2f685ea6e3b | ac1768b715e9fe56be8b340bc1e4bc7f917c094a | /deep_sequencing_unit/sourceTest/core-plugins/illumina-qgf/1/dss/reporting-plugins/setInvoiceSent/script.py | a01000b8dc9574e0f785ca80d4e51315e3843c34 | [
"Apache-2.0"
] | permissive | kykrueger/openbis | 2c4d72cb4b150a2854df4edfef325f79ca429c94 | 1b589a9656d95e343a3747c86014fa6c9d299b8d | refs/heads/master | 2023-05-11T23:03:57.567608 | 2021-05-21T11:54:58 | 2021-05-21T11:54:58 | 364,558,858 | 0 | 0 | Apache-2.0 | 2021-06-04T10:08:32 | 2021-05-05T11:48:20 | Java | UTF-8 | Python | false | false | 2,466 | py | def process(tr, parameters, tableBuilder):
import subprocess
import os
import re
from java.util import EnumSet
from ch.systemsx.cisd.openbis.generic.shared.api.v1.dto import SearchCriteria
from ch.systemsx.cisd.openbis.dss.client.api.v1 import OpenbisServiceFacadeFactory
from ch.systemsx.cisd.openbis.g... | [
"kohleman"
] | kohleman |
417dfcc3c5f7259d1d81b83fb9ee10f6e487a810 | 801f367bd19b8f2ab08669fd0a85aad7ace961ac | /rl-fmri/tmp_sort_by_covariance.py | b8f808ec8e32693436251db5c839ebcdb7657592 | [
"MIT"
] | permissive | Wendong-Huo/thesis-bodies | d91b694a6b1b6a911476573ed1ed27eb27fb000d | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | refs/heads/main | 2023-04-17T18:32:38.541537 | 2021-03-12T19:53:23 | 2021-03-12T19:53:23 | 623,471,326 | 1 | 0 | null | 2023-04-04T12:45:48 | 2023-04-04T12:45:47 | null | UTF-8 | Python | false | false | 635 | py | import numpy as np
N = 5
t_org = np.arange(N)
pi = np.random.permutation(N)
x_org = np.array([np.random.randn(100)*k for k in range(N)])
S_org = np.cov(x_org)
print("Covariance of sorted time steps", S_org, sep="\n")
t_obs = t_org[pi]
x_obs = x_org[pi]
S_obs = np.cov(x_obs)
print("Covariance of unsorted time steps", S... | [
"sliu1@uvm.edu"
] | sliu1@uvm.edu |
3dfba2e73972a603af9c19ba69274641a698779c | 850bf5b185f749b64d69f7b0a5712acdda38e19a | /Python Crash Course/city_functions.py | 3db5965b225cab2fef95de228d83ec7385c2248c | [] | no_license | MortaV/Books | bb58da031fe33cd85126909e59d59cbe211bd8b1 | 04ede76363f4d6029cf04b2887604abcd9275e00 | refs/heads/master | 2023-03-03T16:43:11.284090 | 2021-02-14T12:27:45 | 2021-02-14T12:27:45 | 326,759,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | def city_country(city, country, population=''):
if population:
full_text = f'{city.title()}, {country.title()} - population {population}'
else:
full_text = f'{city.title()}, {country.title()}'
return full_text
| [
"morta.vilkaite@gmail.com"
] | morta.vilkaite@gmail.com |
4795a83391cfb5c95c1a3889ca644e098e257cfb | 5554548a1dc31ae7378838ad39e47a819321b3f0 | /codewars/buildPileOfCubes.py | 5d485df66b6f78f71828dec8fbf28df79a613729 | [
"MIT"
] | permissive | shubham2704/competetive_coding | 06f737b3f521818996e7bc369bd99411a2fccce3 | 13c977a208e26254a0f640ee421768c3433417d3 | refs/heads/master | 2023-05-15T07:26:21.474539 | 2021-06-15T16:39:50 | 2021-06-15T16:39:50 | 269,329,821 | 6 | 4 | MIT | 2021-05-03T07:13:24 | 2020-06-04T10:30:16 | Python | UTF-8 | Python | false | false | 184 | py | def find_nb(m):
n = 1
volume = 0
while volume < m:
volume += n**3
if volume == m:
return n
n += 1
return -1
print(find_nb(1071225)) | [
"cool.shubham2704@gmail.com"
] | cool.shubham2704@gmail.com |
61e529acf05630d5df17039cb22e92b4a87fb10c | abcc28c375659bd005687f674cb0da66f84fb4fd | /11 完成路由功能/dynamic/mini_frame.py | 1d9305bf208dad024ee9df5f0c47b12068abf13b | [] | no_license | ming-log/mini_webserver | e016350b30dcc858050c3ea92224c18ac7d64907 | a4d72de888cba85e0f0d0d3a32c9b73e6d6e62d3 | refs/heads/master | 2022-12-21T23:20:29.638894 | 2020-09-28T05:05:30 | 2020-09-28T05:05:30 | 297,921,970 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 780 | py | # !/usr/bin/python3
# -*- coding:utf-8 -*-
# author: Ming Luo
# time: 2020/9/23 14:23
def index():
with open("./templates/index.html", encoding='utf-8') as f:
content = f.read()
return content
def center():
with open("./templates/center.html", encoding='utf-8') as f:
return f.read()
U... | [
"736704198@qq.com"
] | 736704198@qq.com |
e99ce967d7e2596a1d2f462192078efba900e5eb | 1e4f673eb57b913324b6924351102ec9a006b1a0 | /src/shop/main/migrations/0001_initial.py | bd22c76255f8dbc0feb7621b4acdffd679936565 | [] | no_license | Deolg/pythonShop | 2d7e2c9e7afef3c25f8f787f45e2cdf399e91e7e | 892b5d2572817795fa1d0f6e4cc41bde52da12a3 | refs/heads/master | 2020-03-22T21:39:47.884672 | 2018-07-16T12:11:40 | 2018-07-16T12:11:40 | 140,704,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,086 | py | # Generated by Django 2.0 on 2018-07-10 12:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | [
"sterx334@gmail.com"
] | sterx334@gmail.com |
73b8ba1c7e184e9dcd2e7587c06a155ab2608e7a | cbbea8dc14f9ffbde89d1622c0523117ebc864ca | /unique_streets.py | 49f8006f87cc1e31d3f3ced5f5197ffea77271fb | [] | no_license | karanthacker/Wrangling-Open-street-Map-xml | 4b54aaad38fbbf7a2bb804414683870aa2d41dd8 | 26983684496c342fc76da9d6a092fe9c5afa71f9 | refs/heads/master | 2021-01-23T16:08:07.763142 | 2017-09-07T11:02:43 | 2017-09-07T11:02:43 | 102,727,114 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,803 | py | '''
intro : the code parses the file to catch the street types and look up to
the table of common streets and if not found adds it to a dict of rare street
types with values in it are a set of street names of that type
'''
import xml.etree.cElementTree as ET
from collections import defaultdict
import re
import pprint... | [
"karan.thacker@gmail.com"
] | karan.thacker@gmail.com |
82c582ff24e69ccb0acace9ec4ffa7596294a51b | 8a4c32783b2c8e13eca88d193c767bd25e63306c | /algo/gnn/gat.py | 6d087b9d8c3dafdbfde8dff45067056d7cf2b909 | [] | no_license | fs302/GraphWorld | 6765e4ba36d3af2ed5f820e52514096b3aeb10d7 | 9864eaca21f41117adf758f74379efa87692f5f8 | refs/heads/master | 2022-07-31T17:05:32.535380 | 2022-07-08T08:35:15 | 2022-07-08T08:35:15 | 196,156,937 | 5 | 5 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | import torch
from torch.nn import Linear
import torch.nn.functional as F
from torch_geometric.nn import GATConv
class GAT(torch.nn.Module):
def __init__(self, input_channels, hidden_channels, out_channels, heads, dropout_ratio=0.):
super().__init__()
torch.manual_seed(1234567)
self.dropout... | [
"fanshen.fs@alibaba-inc.com"
] | fanshen.fs@alibaba-inc.com |
019392d0da0c05e3b2279265be2387c148389911 | 551f9584c69a25009b15531d2b8950dfb12588b8 | /botnet.py | 72ade67d9172d28b55cc860250fc0b8be16f0f35 | [
"MIT"
] | permissive | rastadayon/Multirepresentation-Learning | ffc597a99265b5e333342e7ab66ea01963b7917f | 3cc4233e920708f6553d8c1479af158eac21cbb0 | refs/heads/master | 2023-03-30T07:53:20.996630 | 2021-04-08T16:20:36 | 2021-04-08T16:20:36 | 349,185,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,443 | py | import math
import torch
from torch import nn, einsum
from ws_resnet import ResNet, Bottleneck
from einops import rearrange
# translated from tensorflow code
# https://gist.github.com/aravindsrinivas/56359b79f0ce4449bcb04ab4b56a57a2
# positional embedding helpers
def pair(x):
return (x, x) if not isinstance(x, ... | [
"rasta.tadayon1378@gmail.com"
] | rasta.tadayon1378@gmail.com |
d65c17fddc35eb48ebcf9a7d8ecbd2a03b37978e | 215b6bf996c8c653b4e5627534af12388d8c397b | /data/sqlite.py | b1b76d873a765c12a9d857f2824f387bc270c441 | [
"BSD-3-Clause"
] | permissive | skylogic004/pylinkcloud | 25be839dc2e17f4587d7eb90a9ab342cd8514455 | 018535058d508a36c1ea5acf906bcb7114cd914c | refs/heads/master | 2021-01-10T04:12:57.369626 | 2015-06-25T16:17:46 | 2015-06-25T16:17:46 | 36,756,960 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,209 | py | import sqlite3
import numpy as np
import os
from data.bookmark import Bookmark
from colorama import Fore, Back, Style
import time
OVERWRITE_DB = False
class SqliteHelper():
bookmarksColumns = [
('bookmarkId', 'INTEGER PRIMARY KEY'),
('linkTitle', 'TEXT'),
('linkURL', 'TEXT'),
('linkDirPath', 'T... | [
"matt@skylogic.ca"
] | matt@skylogic.ca |
590f162c4352eaeed22441160d690672d7ded123 | 2d0297ba6682bf006da6d28a505e37f27665c07a | /MachineLearning/ML01.py | fd0c50c0b7911c935aebfbb39b67f4d9d3885af8 | [] | no_license | JeongDaHyeon/2020_2 | 4903f901ec902ff6482e5eaca404549f3607e809 | 930dfb91ad77c6b5bba78e5ca77fec56f61dab06 | refs/heads/master | 2023-01-14T05:04:53.336637 | 2020-11-25T18:44:13 | 2020-11-25T18:44:13 | 293,424,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | def add_odd_numbers_of_array(array):
return_value = 0
for num in array:
if num % 2 == 1: # if the num is odd
return_value += num
return return_value
if __name__ == '__main__':
array1 = [2, 4, 6, 8]
array2 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
array3 = [1, 2, 3]
# print t... | [
"201802152@o.cnu.ac.kr"
] | 201802152@o.cnu.ac.kr |
def7a88798f6f6845ff73e15fa9b40c643d34ab2 | 395db06167c256bf0eb6a09ba54842f569fb8986 | /api/video-downscaler/video_downscaler.py | b9fa1dc58947982935b731c5318c81f1fdbfba94 | [
"MIT"
] | permissive | ManojLL/speculo | 1bc3ed40dd14023c75ac194b7536f1aa365c4157 | cf3b69b9155ac58c5ca337289c8f0d470b4e2adc | refs/heads/master | 2022-12-27T07:41:17.129149 | 2020-09-03T19:49:44 | 2020-10-03T19:30:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | # standard libraries
import os
import subprocess
class VideoDownscaler:
def __init__(self, filename):
self.filename = filename
def downscale(self):
for count in range(3):
print(count, count % 2 == 0)
if count % 2 == 0:
subprocess.call(
f"ffmpeg -y -i ./videos/{self.filename}.mp4 -vf mpdecima... | [
"akassharjun@gmail.com"
] | akassharjun@gmail.com |
f746b99611ca94ecc8506642e3a3cb894c2820df | 780ebabd83899e3893358ec4ba6b0e077c2565ca | /Snake.py | a131d9aa466b897c358311e4aae4ad95f394afa9 | [] | no_license | usac201602491/PythonAlienware | 7dcfe0e28565bb1674d15c48388c215d2f5af545 | 380fa5f2d615361179013806c6af5aaad9182b7e | refs/heads/main | 2023-01-03T08:42:25.777845 | 2020-11-03T04:40:52 | 2020-11-03T04:40:52 | 309,573,566 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,322 | py | import random
import curses
from curses import textpad
s = curses.initscr()
curses.curs_set(0)
sh, sw = s.getmaxyx()
w = curses.newwin(sh, sw, 0, 0)
w.keypad(1)
w.timeout(100)
snk_x = sw/4
snk_y = sh/2
snake = [
[snk_y, snk_x],
[snk_y, snk_x-1],
[snk_y, snk_x-2]
]
food = [sh/2, sw/2]
w.addch(int(food[0])... | [
"2931416571705@ingenieria.usac.edu.gt"
] | 2931416571705@ingenieria.usac.edu.gt |
18b8dfdd41efbf26b0a77f0333a56a082bc89535 | c58f89836f6bf0d88bece5e33501e976dd080d33 | /Intelie/settings.py | 462a26b35c012cdaa9fa8e79a8f1ff33c47c898a | [] | no_license | Johnaval/Intelie-Python-Challenge | e889a9b050901f5fd4cd163ded4897e1af0fe45b | efead71ab09e543d0140e7d5d9374d95b1001b89 | refs/heads/master | 2020-06-07T20:59:04.673967 | 2019-06-24T22:08:33 | 2019-06-24T22:08:33 | 193,092,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,213 | py | """
Django settings for Intelie project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
#... | [
"joaov@poli.ufrj.br"
] | joaov@poli.ufrj.br |
4774f102b0f7733c9f8604114e55f1899b131b19 | f3cdf76d2ce6c0f88ab257ee6ec6d0198311147b | /blog/migrations/0001_initial.py | 44ca11bddacbeb87d93c2fedc2d74176ed9bd0d4 | [] | no_license | Sammion/Blog_Django | dc53e6316c3898639d9a67537d47e015874d842a | 502912309244d65285d49b6fb2f9410c23c9a993 | refs/heads/master | 2021-09-18T18:16:58.210352 | 2018-06-17T09:02:50 | 2018-06-17T09:02:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,078 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-12-17 05:51
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
depend... | [
"samqian163@163.com"
] | samqian163@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.