blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10bd440af25fcfc5967e75f66f53e53c0bd41ade | 4ea0c695055d4707e7875d9379b2364537a40bb8 | /run.py | 1d4baee84bee6c5a43d73f7ba025fe67e0079784 | [] | no_license | richardangell/bank-statement-getter | ddb31dfdc6bb22489d12f7cc413636bdb9cabd70 | 7538eaa8863e1c6a1bfe9a73cd267fc1679d67d3 | refs/heads/master | 2021-01-24T01:34:43.959296 | 2020-11-10T20:29:05 | 2020-11-10T20:29:05 | 122,814,261 | 0 | 0 | null | 2020-11-10T20:29:06 | 2018-02-25T07:20:05 | Python | UTF-8 | Python | false | false | 1,424 | py | from bankstatementgetter.export import BankStatementExporter
from bankstatementgetter.google_sheets import GoogleSheetsManager
class ExporterAndUploader(BankStatementExporter, GoogleSheetsManager):
"""Class combining the exporting and google sheets functionality to run entire process."""
def __init__(self):... | [
"noreply@github.com"
] | richardangell.noreply@github.com |
a9a74d10d303248d0045e537304581b2556c5942 | 47191dcffda07d0fc1c91a4a5e28fb5f0f264b42 | /python/afghan_constants.py | 8a99ce9194586fb1f2082e195e6662110eaeb271 | [] | no_license | sharonyang/afghan_election_analysis | b2950c61dddccaca80afa4819da235f0c3edad1c | afe2f2c5f48af711ba30c2a37f6819145906613b | refs/heads/master | 2021-01-19T01:42:22.040827 | 2016-07-07T07:04:59 | 2016-07-07T07:04:59 | 31,369,333 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 903 | py | # By: Laksh Bhasin
# Description: Useful constants for this election. Import this into other
# scripts.
# The total voting age population of Afghanistan, as well as the total
# population of Afghanistan. Both of these figures come from
# http://www.idea.int/en/vt/countryview.cfm?CountryCode=AF
VOTING_AGE_POPULATION = ... | [
"lbhasin@caltech.edu"
] | lbhasin@caltech.edu |
a2a811d98170b636628d0408cd93c6f7296bad6e | 1b0b7dc0e5ca5e944ca557ccc4bee87f1ae4fe68 | /catalog/migrations/0004_bookinstance_borrower.py | a6e7efc7d50f0c8aca24c5ec4d5756788d9ad57f | [] | no_license | ssotirop/locallibrary-py-django | af6ccb3bfc84f6a16530c732136b40001bbb1bfd | c10805def41fdf2aabd67b633fdf5918e119991e | refs/heads/master | 2023-04-28T12:06:23.108221 | 2019-05-24T11:01:52 | 2019-05-24T11:01:52 | 188,205,171 | 0 | 0 | null | 2023-04-21T20:31:57 | 2019-05-23T09:40:13 | Python | UTF-8 | Python | false | false | 604 | py | # Generated by Django 2.2.1 on 2019-05-19 11:08
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('catalog', '0003_book_lan... | [
"sotiris.sotiropoulos@gmail.com"
] | sotiris.sotiropoulos@gmail.com |
d16c5c146b7726a1b886ecb41cf281755815d699 | 2265b7f2169d03b2bc6cc33643342cfbee3e97dc | /04_Loop/0412-ZigZag1.py | b68e543dad5a8c9dc21112e0ce25c823ac31c661 | [] | no_license | natTP/2110101-comp-prog | 812b3d789705d03b3f16c4adb71f04cb88312604 | 222eabd4e548bd5c64eebd8213e8550f6115f7ab | refs/heads/master | 2022-12-15T15:43:39.259673 | 2020-09-04T17:23:54 | 2020-09-04T17:23:54 | 292,893,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | n = int(input())
left = [] #x1y2
right = [] #y1x2
for i in range(n):
inp = [ int(e) for e in input().split()]
if i%2 == 0:
left.append(inp[0])
right.append(inp[1])
else:
left.append(inp[1])
right.append(inp[0])
instruction = input()
mini = float('inf')
maxi = f... | [
"noreply@github.com"
] | natTP.noreply@github.com |
cc23c1978efa6079896499041f49373ee4f47218 | a8452675352388feb1e8909a067d8523f8eceea5 | /aux_files/twentyfour.py | eb15571cf75f54ec6f839133348b547a31976ddf | [] | no_license | julioaamaral/ml | 07ac0fa1fd79d52edd654ee19e0cb2a8767d2d75 | bbe43fa747e1d23e9f4fa5bc7440ca3df313a213 | refs/heads/master | 2020-04-05T14:13:12.478943 | 2018-03-16T22:57:02 | 2018-03-16T22:57:02 | 94,831,824 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | ...
...
#for a given input x
predictions = model.predict(X)
...
...
| [
"noreply@github.com"
] | julioaamaral.noreply@github.com |
953365f16426725c60701d09491b63b7293624d2 | fbab057c2a98242def74f4e75cd90a1706b76ec3 | /code/imdbScraping/review/migrations/0004_review_is_positive.py | fef5b567dca9f6e627e53e60beb30deb7bb09503 | [] | no_license | javatarx/imdb-reviews | 271ea3c45d0d1d7a1e3d18ea69b4ad3cdd40139b | 679be55fe63d69c4250cd2ecaf7948df90fce213 | refs/heads/master | 2022-12-12T12:56:19.897786 | 2018-12-18T21:30:59 | 2018-12-18T21:30:59 | 161,176,622 | 0 | 0 | null | 2022-12-08T01:28:16 | 2018-12-10T13:08:05 | Jupyter Notebook | UTF-8 | Python | false | false | 394 | py | # Generated by Django 2.1.4 on 2018-12-08 21:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('review', '0003_review_rating'),
]
operations = [
migrations.AddField(
model_name='review',
name='is_positive',
... | [
"lambdev@upeu.edu.pe"
] | lambdev@upeu.edu.pe |
39c2edd65a6079cb4857923e9a7fcf48e65aa50e | d16a23c513ec6155b25c692eed28ae1a6aac8f72 | /python1.4.py | 9ee4435ba6187d664efced34fe9b1366dc295a1f | [] | no_license | stewartjonte/codecademy | cc66359b89a6bb9b872a699bbe93c6b73d48cd5f | ccf58bd9018d79aab6a38e617b3b6c3bb3fa707c | refs/heads/master | 2020-07-09T01:23:26.782858 | 2019-08-22T17:17:05 | 2019-08-22T17:17:05 | 203,835,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 48 | py | print"hello " + "Jack Dylan Earl Stewart-Jonte"
| [
"54412122+stewartjonte@users.noreply.github.com"
] | 54412122+stewartjonte@users.noreply.github.com |
786ab5906e080853b8f60967a91a017764f24ad3 | 2171068726a5c9769697bb0292edc4370efa6454 | /provision-service/scripts/install.py | fae06c249c10121efd867b18b5bc83f920423015 | [] | no_license | vincentchivas/nautilus | d896e9a6f775fa639fbbbadbdc2a362040afe1f5 | fdbec9bba17d4d63092d35b708d82df82d68208f | refs/heads/master | 2021-01-22T11:36:53.234945 | 2014-08-21T14:53:47 | 2014-08-21T14:53:47 | 23,190,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | '''
Created on Nov 1, 2011
@author: kunli
'''
import sys
import os
PYH_FILE = 'provision.pth'
if __name__ == '__main__':
paths = filter(lambda p: p.endswith('dist-packages'), sys.path)
if len(paths) > 0:
dist_path = paths[0]
pth_path = os.path.join(dist_path, PYH_FILE)
if os.path.exis... | [
"vincent@ubuntu.ubuntu-domain"
] | vincent@ubuntu.ubuntu-domain |
b601eaa6a429e27a4543725d7905f4d287da71a3 | dceed3b97b902a6b526106e37754fba3b0e17774 | /面向对象/call方法.py | 18b38bc7a4ccfa1b50f24a336a6f3bd387114ff8 | [] | no_license | awuxina/www | 2ef8e92eb4d290b2eafa271b63b7bacbc43a32be | 76746bbff013295348041cf9b95cb81d3a0c1fcf | refs/heads/master | 2020-03-22T01:37:13.076909 | 2018-07-01T09:05:44 | 2018-07-01T09:05:44 | 139,317,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | class People:
def __init__(self,name):
self.name=name
def __call__(self, *args, **kwargs):
print('call')
p=People('ecall')
p()
print(callable(p))
print(type(p))
print(type(People))
#typer---->类----->对象
| [
"97550080@qq.com"
] | 97550080@qq.com |
42c0e130fbd9c011da6ab77279953d0c461958f5 | 09060df69b191c048339ba449ee558ed9187dc3e | /comprehension_sets.py | b35abc371a1ca6fb0b52505eef0c7373ab3fa362 | [] | no_license | asad632/Python | 79c4201949d6fec64ba7cde45401724b790e8fdd | 4dde2c2330e6b480049b7d27aab86d10d4c9fed9 | refs/heads/main | 2023-01-31T13:30:43.967450 | 2020-12-09T16:19:01 | 2020-12-09T16:19:01 | 317,615,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | # # set in comprehension
# s={i**2 for i in range(1,9)}
# print(s)
#
#
# names ={'asad', 'khan', 'ullah' }
# asad={name[0] for name in names}
# print(asad) | [
"noreply@github.com"
] | asad632.noreply@github.com |
abf2b403e29ca06c83b56f0fe6e6d2f6ad9a9656 | 14a1312dfb7c4d5e2b76f49b0837cc024f5a1295 | /python/servicegate/logic/messagehandler/handlers.py | a75d7c114ddd185887797896f754c7050ed18445 | [] | no_license | bropony/gamit | b3a493c55407efa83ae20286b1e624b280b46494 | 47811e2cfe67c3c0de4c4be7394dd30e48732799 | refs/heads/master | 2020-05-17T01:51:38.887194 | 2015-11-05T12:57:13 | 2015-11-05T12:57:13 | 36,106,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 799 | py | """
@author: mahanzhou
@date: 8/6/15
@file:
@desc:
"""
from gamit.log.logger import Logger
from gamit.message.commandhandler import CommandHandlerBase
from message.db.mongodb.posttables import TSysTopic
from resources.systopicmanager import SysTopicManager
class SysTopicMessageHandler(CommandHandlerBase):
def... | [
"ahda@qq.com"
] | ahda@qq.com |
ab10bfb135f46d9dc1a3686506b2c7659799e7ba | 82e7a4dbe6b78ffa988b363a514d5fd6e34b0ad5 | /__init__.py | 11f9a68c2bc6d5d9c6c01f1b388e925898bb9219 | [] | no_license | scidam/cmsplugin-mathjax | 6b7fdf089cc48e025b800f26c15bcf6cd0bd5ff4 | 44126b74be3a0dea72289e4461b9915918a8d856 | refs/heads/master | 2021-01-10T04:08:23.521096 | 2015-12-03T06:02:43 | 2015-12-03T06:02:43 | 47,104,334 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 664 | py | def load_defaults(application):
"""Load cmsplugin-mathjax default settings"""
try:
__import__('%s.settings' % application)
import sys
_app_settings = sys.modules['%s.settings' % application]
_def_settings = sys.modules['django.conf.global_settings']
_settings = sys.module... | [
"kislov@easydan.com"
] | kislov@easydan.com |
5e985e773a00c8bcfe5a71a986f6c77253f7b11d | 800628018a3ca4aac5339e30662826a11d2fbb6e | /python/ray/serve/controller.py | e531e2f19bccc972b3f7a4d8679f4895cc93a49c | [
"Apache-2.0",
"MIT"
] | permissive | liuyuqi123/ray | 4d62add89aa9087f41eb19a11880770750a37aac | 2e2b8cefbf6f51046dd79b90bf751a31fc66ed74 | refs/heads/master | 2023-02-06T05:15:16.642007 | 2020-12-29T10:12:26 | 2020-12-29T10:12:26 | 294,570,275 | 0 | 0 | Apache-2.0 | 2020-12-29T10:12:27 | 2020-09-11T02:11:04 | Python | UTF-8 | Python | false | false | 46,460 | py | import asyncio
from asyncio.futures import Future
from collections import defaultdict
from itertools import chain
import os
import random
import time
from dataclasses import dataclass, field
from typing import Dict, Any, List, Optional, Set, Tuple
from uuid import uuid4, UUID
from pydantic import BaseModel
import ray
... | [
"noreply@github.com"
] | liuyuqi123.noreply@github.com |
9be85af534c4d86583912784bba1926e6783576b | 617f1b605be66e00d6a8c006db96e8131ad9d4ff | /xtreme_vision/Detection/keras_resnet/blocks/_3d.py | 4b8793932bb2df449ed33cc780b15840e16f6fe0 | [
"MIT"
] | permissive | AsadRasheed-AR/Xtreme-Vision | 8d7b5966c0c2c267538c27c0858ec0f4cf2807c3 | 2e09e6972c6b2752bc37f8356fafda151acacd0d | refs/heads/master | 2023-03-26T11:34:04.459514 | 2021-03-27T03:08:40 | 2021-03-27T03:08:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,271 | py | # -*- coding: utf-8 -*-
"""
keras_resnet.blocks._3d
~~~~~~~~~~~~~~~~~~~~~~~
This module implements a number of popular three-dimensional residual blocks.
"""
import tensorflow as tf
from xtreme_vision.Detection.keras_resnet import layers
parameters = {
"kernel_initializer": "he_normal"
}
def basic_3d(
filt... | [
"kingadeel2017@outlook.com"
] | kingadeel2017@outlook.com |
5a5e02326b83bc2f2e09ea36e04523b0b8b5f97b | 587840ef968ad41a8e80bd2404b72d349b21816d | /Practice_py/FirstChallenge/practice-10.py | af0720f92249770aeac0c50db23f6fa591d3c9b0 | [] | no_license | DamonReyes/Python_Classes- | b4b0ff2a6e11549406b7b9f852fffb4b70c6d888 | 2e15eb2af0cd79a76a371bcf8f8d9f281185c7d0 | refs/heads/master | 2023-05-04T05:05:33.457765 | 2021-05-12T03:44:13 | 2021-05-12T03:44:13 | 305,586,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | def run():
pass
cantidad = int(input('cuanta cantidad de millas quieres?: '))
km = 1.609344
total = cantidad * km
total = str(total)
print(total + ' ' + 'kilometros')
if __name__ == '__main__':
run() | [
"steve069888@gmail.com"
] | steve069888@gmail.com |
6e5d4fe9f1ffb878699205e022649cde08a33907 | 355ddf1f4b1b60a8c83c1880d01d0b7071521c73 | /setup.py | be40e74a4d92b317fd06948eeb0f23727855ecbc | [
"BSD-3-Clause"
] | permissive | vstadnytskyi/dataq-di-usb | bcba792feb6859d3c03f0875af1088371cf0846e | 720bc5026a54336799894c906bcf5d537cb73cd6 | refs/heads/master | 2022-11-22T07:02:01.941923 | 2020-07-07T18:54:02 | 2020-07-07T18:54:02 | 277,897,367 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,138 | py | from os import path
from setuptools import setup, find_packages
import sys
import versioneer
# NOTE: This file must remain Python 2 compatible for the foreseeable future,
# to ensure that we error out properly for people with outdated setuptools
# and/or pip.
min_version = (3, 6)
if sys.version_info < min_version:
... | [
"v.stadnytskyi@gmail.com"
] | v.stadnytskyi@gmail.com |
d7ee1eda6b12e0fb1263e0d13d95339759f08aed | 90a2cd620fff4dd8f63e0ac268f459f85776b3e8 | /backend/pandora/pandora/core/header.py | 3ec4b50a13689b855d572008bfda8fc44b2359d3 | [] | no_license | daleeg/idaas | aafe4065608f8db8acf8b697dd5a257ec468ebee | 3314edefac2fba2ededb4f803ff49cb3bbb90372 | refs/heads/master | 2023-06-28T15:48:59.949445 | 2021-08-05T03:46:48 | 2021-08-05T03:46:48 | 243,650,933 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | from __future__ import unicode_literals
from rest_framework import HTTP_HEADER_ENCODING
from django.conf import settings
def get_company_header(request):
company = request.META.get("HTTP_{}".format(settings.COMPANY_HEADER), b"")
if isinstance(company, str):
company = company.encode(HTTP_HEADER_ENCOD... | [
"wangli1319@jd.com"
] | wangli1319@jd.com |
3d1bb13e433521880f53e86aa1c6cced6acc58c7 | 0af4dacb4eadbfefe3e2c00274b811b470b4cb30 | /musicapp/libs/db_sqlite.py | 2585c0a5e4b53436f882434cc566c8242788764a | [] | no_license | bb17pugc/dashboard | 0b0473b0e161aa6d3f3e18db97008cc991d21f68 | 1166182c4fefa809c017b1707a6e833dce8b7f84 | refs/heads/master | 2022-12-25T22:23:35.695339 | 2020-10-04T20:23:22 | 2020-10-04T20:23:22 | 301,219,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,694 | py | # from db import Database
# from config import get_config
# import sqlite3
# import sys
# from itertools import izip_longest
# from termcolor import colored
# class SqliteDatabase(Database):
# TABLE_SONGS = 'songs'
# TABLE_FINGERPRINTS = 'fingerprints'
# def __init__(self):
# self.connect()
# def connect... | [
"ali@gmail.com"
] | ali@gmail.com |
dbfa75f02f7ee806b6c55b5e7d0257c8a92ad672 | 2c7c03faa533557862bff95530e4814187a0cdff | /题目十六/16.py | 2a4dc799ec73925b8a491f1de2705cc5f118c038 | [] | no_license | lifengshuo/leetcode | c56f90543db68b30ec667f885fc8b41760dcf64b | 8ad40480b12aba2cbadb1ff8f27e8cd517e1289a | refs/heads/master | 2023-02-11T16:03:41.885352 | 2021-01-03T13:12:32 | 2021-01-03T13:12:32 | 298,794,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,258 | py | class Solution(object):
def threeSumClosest(self, nums, target):
M = float("inf") # 三个数的和初步设置为最大值
lens = len(nums)
nums.sort() # 排序
for i in range(lens):
if i>0 and nums[i]==nums[i-1]: #如果nums[i]的值相等,则跳过
continue
left = i + 1
... | [
"‘791320686@qq.com’"
] | ‘791320686@qq.com’ |
3264ddcf2e2f2fd497deb3ef202175e0c68c6af5 | 46073779c036c64fc8835663b26c3cbc937fc58f | /node_modules/socket.io/node_modules/engine.io/node_modules/ws/build/config.gypi | c43eaf541c42d42f54cfcd279892b7f3879de219 | [
"MIT"
] | permissive | aalteirac/nodeChat | 32c9b8dd978a2cf7b82e654d211b820b00893f49 | 9755cd926c7a84e4ef5943cbf1aa406aff5acf43 | refs/heads/master | 2016-09-11T08:13:33.492901 | 2014-09-23T17:09:07 | 2014-09-23T17:09:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,344 | gypi | # Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"clang": 0,
"host_arch": "ia32",
"node_install_npm": "true",
"node_pref... | [
"anthony@alteirac.com"
] | anthony@alteirac.com |
bc2abba030ded9f65f92d6af8e69b7e0987aa6b5 | f19b3885fe8b08607bc1d740ec46f9a0215f423b | /tests/sparsezoo/models/classification/test_mobilenet.py | 1b14968a1a6dc60df3db5d4b0d8b2e06c34995f9 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | chenjun2hao/sparsezoo | 62c9c0639727303dc8dd9ba319c6b5d7ed6bc1ad | 1588d22910c820eb9f0ec56a8448fa2f231d3111 | refs/heads/main | 2023-03-09T10:32:30.828138 | 2021-03-01T17:02:35 | 2021-03-01T17:02:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,101 | py | # Copyright (c) 2021 - present / Neuralmagic, Inc. 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 b... | [
"noreply@github.com"
] | chenjun2hao.noreply@github.com |
1cd4b52dca6eb61cddde320b65934f00f9bd78f8 | 4c602d7878b3e87557e85925937c0b5daaa9a51c | /seguros/users/models.py | dbeca59817d0b43b36a753755c52f847d2d99e19 | [
"MIT"
] | permissive | joaquinquintas/seguros2020 | 490315ed13014d37b36053aa456fb991922d8e2f | 2d26a6c6a82d740d5c3671ee3fbc6165a731bfab | refs/heads/master | 2021-04-05T23:40:42.453564 | 2018-06-01T14:28:57 | 2018-06-01T14:28:57 | 124,537,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | from django.contrib.auth.models import AbstractUser
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
class User(AbstractUser):
# First Name and Last Name do not cover name patterns
# around the globe.
name = models.CharField(_('Name of U... | [
"brunomartintenaglia@gmail.com"
] | brunomartintenaglia@gmail.com |
27fe564b6a341cffb6fb0d78d201e3796486cd71 | 26e195c5ffc34dc5f747f2605e35c741e87a5f56 | /neo_hikitsugi/pages/forms.py | 8be1280e862ba23f06012ced1b483ce982e3d779 | [] | no_license | socomplicated808/django-projects | eaefb5e687b2f71ed393c458daf71acc8f9ea3f9 | 4cf1053f00a6cd8721c838657a60eb5433b55f76 | refs/heads/master | 2023-08-22T15:18:36.124197 | 2021-10-16T04:00:51 | 2021-10-16T04:00:51 | 417,695,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | from django.forms import ModelForm
from django import forms
from django.forms.widgets import ClearableFileInput
from .models import Cluster, Post,CR
class PostForm(ModelForm):
class Meta:
model = Post
fields = ['name','time','cluster_log','files']
widgets = {'files':ClearableFileInput(attrs={'multiple':True})... | [
"socomplicated808@hotmail.com"
] | socomplicated808@hotmail.com |
631b16c7d490e62ddea47a65eba19530c522bb89 | a8ff08dccbd864bb4c1f165e63e875b8e89c113f | /threadssubclass.py | e6e09d654dee3c7a5db6e8a7b2bd35fb481705ad | [] | no_license | kokot300/python-core-and-advanced | d3084d6e90db8661a306c1028eec326817dc41fc | e9a75f7b8a9b149b074f6a259d96df7b5e20e0ec | refs/heads/master | 2021-05-17T13:13:21.519377 | 2020-03-30T11:09:46 | 2020-03-30T11:09:46 | 250,787,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629 | py | import threading
from time import sleep
class MyThread(threading.Thread):
def run(self):
threading.Thread.run(self)
self.displaynumbers()
def displaynumbers(self):
sleep(5)
for i in range(0, 11):
print(i)
print(threading.currentThread().getName())
class... | [
"kokot300@gmail.com"
] | kokot300@gmail.com |
698c86a1789e5e1d7105a013fff5ead5649454cc | 2cb120360192dfdf9afa233c8585232cb3df6e8c | /samples/tf_study/GPU/multi.py | d7a26ed4b542ad4459a1b61e81a93dfef25d64c6 | [] | no_license | CosmosShadow/MLPythonLib | 6323583bca8c6ff5757465fb1a0d5c4f23deb56c | 3a2da2601330a032b737ff0addf71f679eeee94b | refs/heads/master | 2020-05-21T15:08:58.082575 | 2017-04-30T17:03:15 | 2017-04-30T17:03:15 | 44,087,820 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | # coding: utf-8
import tensorflow as tf
import prettytensor as pt
import numpy as np
import cmtf.data.data_mnist as data_mnist
c = []
for d in ['/cpu:0', '/gpu:0']:
with tf.device(d):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3])
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2])
... | [
"lichenarthurml@gmail.com"
] | lichenarthurml@gmail.com |
b667077a04eedda09c0606a6d1ae33ff916c5468 | b4f28a0c699e54348177c8db2b1d0f7d80af0c29 | /python/log_printing.py | adbbbeffd896458119e38df79005a8a7c1ad8f6e | [] | no_license | homerobse/snippets | 8d60dfb8402aaf142b11256f6aa0cf48d8995bfb | 8e4440cbd34e023bffa5735da630e6a91949cf7f | refs/heads/master | 2023-01-14T04:42:38.438780 | 2023-01-06T04:27:46 | 2023-01-06T04:41:45 | 166,845,555 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 705 | py | #!/home/homero/miniconda3/bin/python
# https://docs.python.org/3/howto/logging.html#logging-advanced-tutorial
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.WARNING)
logging.warning('Watch out!') # will print a message to the console
logging.info('I told you so') # will not pri... | [
"homero.esmeraldo@cncb.ox.ac.uk"
] | homero.esmeraldo@cncb.ox.ac.uk |
182b5b5d5624603c6b49c9ce628094fc7722e98f | f3891312d9bb380543e2ab92e765e242a1937d5d | /env/lib/python3.6/struct.py | 86bf5ed25332b0bf04397ea4b555253b0bd71fd0 | [] | no_license | akando42/psychology-therapist-backend | 72d6b99445e72f0fb475ddfac6e18cc15ea99354 | 88463da75b5f1f70052716135019a276cc034aba | refs/heads/master | 2021-10-08T22:54:31.383049 | 2018-12-18T18:15:21 | 2018-12-18T18:15:21 | 159,715,742 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 49 | py | /Users/troydo42/anaconda3/lib/python3.6/struct.py | [
"hoangdov@gmail.com"
] | hoangdov@gmail.com |
85c94893954d6111bbdb5db2a378b045c734d47e | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2413/49687/317163.py | f2ba3b2827d0d5f59c37f8ff5bd9bb1d061e5e24 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | n = int(input())
start = int(input())
if(n==2 and start == 3):
print("[3, 2, 0, 1]")
elif(n==3 and start == 2):
print("[2, 6, 7, 5, 4, 0, 1, 3]")
elif(n==3 and start == 4):
print("[4, 0, 1, 3, 2, 6, 7, 5]")
elif(n==5 and start ==3):
print("[3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26,... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
5d5e5ece9ff5ae5c4d05800115cf180e0ad68909 | d09ca11452ef54d936736c682eb1cc38575bf6e1 | /10.py | 018693f0a131d5d09d8a773e545e34caa267a2d0 | [] | no_license | anishghimire603/Insight-Workshop-Academy | f8c424edc76af802c7371643d572de8ead9688a3 | e5958d827b0c7ff64a3043ba2d2de305a650c3ea | refs/heads/main | 2023-01-22T02:14:08.553931 | 2020-11-30T15:33:03 | 2020-11-30T15:33:03 | 304,255,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | def odd_values_string(str):
result = ""
for i in range(len(str)):
if i % 2 == 0:
result = result + str[i]
return result
print(odd_values_string('python'))
| [
"aghimire603@gmail.com"
] | aghimire603@gmail.com |
ec0a4630ff15af894ced23f4850435fee9b7810c | 33528048ed219a3567777901249ec48641e00ec8 | /NN_code.py | 19a841b5aaa34ceb1a22f6dbf27ffe5da4f0b740 | [] | no_license | priyadiwakar/Face-Image-Classification | b4f91c2f510b95795b06ccc6cd7b095ae6030865 | 705f18dc6d2cee80ce998500095fed1e6bb2b0c4 | refs/heads/master | 2021-07-09T14:56:01.426185 | 2020-09-30T18:33:46 | 2020-09-30T18:33:46 | 196,488,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,212 | py | # -*- coding: utf-8 -*-
"""
@author: priya
"""
import tensorflow as tf
import numpy as np
import cv2
import glob
from pathlib import Path
from sklearn.preprocessing import StandardScaler
import random
import math
import matplotlib.pyplot as plt
"""
Uncomment commented part to work with new dataset images from system... | [
"noreply@github.com"
] | priyadiwakar.noreply@github.com |
ec7639ddadc6ad338a0ad28c87af1740f8afa6e5 | ebcf04a2a7755b65dad8fe758222e87e69bd005f | /professionals/views.py | 6dacf4ff6fcc66faf868d0785ad1fd47a4106031 | [] | no_license | ezekieltech/theanalyticshub | 845bce5bc2a106013496705c4ac1d1b3916dc7b5 | 3887585353596404d9e45c427a481df3d9a22c79 | refs/heads/main | 2023-04-25T01:31:30.417644 | 2021-05-17T21:28:22 | 2021-05-17T21:28:22 | 325,266,230 | 0 | 0 | null | 2021-05-17T21:28:22 | 2020-12-29T11:17:46 | JavaScript | UTF-8 | Python | false | false | 2,034 | py | from django.shortcuts import render
from django.views import generic
from django.conf import settings
from django_hosts.resolvers import reverse_host
from account.models import CustomUser
from mainWebsite.models import Post, Service
from utilities.getUsernameFromSubdomain import getUsernameFromSubdomain
host = get... | [
"ezekielobhafuoso@gmail.com"
] | ezekielobhafuoso@gmail.com |
85a083b5cbd917e6f8a1b1ff4dd171598c7fad8a | ac59aa52ddb3aafa47508907247cc0ccac847b50 | /config_app/migrations/0026_snmpconfigparameters_traps_activated.py | e71a7f5f6406a02c69375c7cab1a656ebbeff5f1 | [
"MIT"
] | permissive | radekska/django-network-controller | f07efa26bf068d2cc7ac832c08929436ba0d365a | 6bcb847cbe1efa7dee118974de5e49b4f411e5da | refs/heads/master | 2023-08-04T15:11:22.138718 | 2021-09-18T15:54:24 | 2021-09-18T15:54:24 | 298,096,472 | 0 | 0 | MIT | 2021-09-18T15:54:25 | 2020-09-23T21:16:47 | CSS | UTF-8 | Python | false | false | 436 | py | # Generated by Django 3.1.1 on 2020-11-01 10:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('config_app', '0025_auto_20201026_1845'),
]
operations = [
migrations.AddField(
model_name='snmpconfigparameters',
na... | [
"bp4fradek@gmail.com"
] | bp4fradek@gmail.com |
f75eeb964f8b417bd2871a3d445441e8686f8ee4 | d6f10cb259d01313afabe96c35c71ac5e72e8263 | /benben/__init__.py | b3194c411c92271d5c6086542c65f766824884e1 | [] | no_license | alemarpiz/benben | 00840af6e0c057d06775fe53968eddc6834ea02a | 0ea6aebc9ad07c50af0095a8c0321a00b83c2145 | refs/heads/master | 2020-12-02T21:05:34.001425 | 2013-04-15T21:54:19 | 2013-04-15T21:54:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | from benben.models import get_root
from pyramid.config import Configurator
from pyramid.threadlocal import get_current_registry
from sqlalchemy import engine_from_config
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
from benben.models import initialize_sql
... | [
"david@glicksoftware.com"
] | david@glicksoftware.com |
d873671b3a3cfe8525278b3c30928ab16b59aadf | 21e64f9410323a11d4550b889fd0bb0d68543fab | /apps/rss_feeds/migrations/0037_remove_story_author.py | 6bddb79fe330e3ec0439cfb490873060cd36b240 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | quanganhdo/NewsBlur | a7eaa3c5bdb2e57998651d736db861f88fcd1e75 | cef29f01658c845564a5044b48b4cf19efcaa4d6 | refs/heads/master | 2021-03-05T23:56:27.976498 | 2020-02-27T15:23:23 | 2020-02-27T15:23:23 | 246,164,347 | 1 | 0 | MIT | 2020-03-09T23:34:18 | 2020-03-09T23:34:17 | null | UTF-8 | Python | false | false | 7,240 | py | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Tag'
db.delete_table('rss_feeds_tag')
# Deleting model 'StoryAuthor'
db... | [
"samuel@ofbrooklyn.com"
] | samuel@ofbrooklyn.com |
58cb122a9f766c59712b222fb978b8441746c9ae | 1aaca8a5a7dc142ca7c112ea27b17e24ccfca781 | /Day01/__init__.py | 15c996c80f973beb81630afab50056b5ac1fad75 | [] | no_license | TWI1/AdventOfCode2016 | 90e9caa3f4f37233e609f0123457b3d97a0044cb | b6f9839bc4a51128c631efc575644ab6f7c88154 | refs/heads/master | 2021-01-11T22:49:56.972092 | 2017-08-19T19:49:09 | 2017-08-19T19:49:09 | 78,510,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,247 | py |
#get the input
#create a method Solver - input is a list of doubles - direction and length, output is a number of blocks
#global vars - x, y, direction
#if direction is 0 (north), I'm adding to x
#if direction is 1 (east), I'm adding to y
#if direction is 2 (south), I'm subtracting from x
#if direction is 3 (west), I... | [
"twinsen@mainbox"
] | twinsen@mainbox |
bfbca156f14639004cba3ff38eb6bb1430924d4d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02898/s358750792.py | b820a14fcc2dce85d984a436348f64beb8ef6863 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | n=input().split()
h=input().split()
count=0
for i in range(len(h)):
if int(h[i])>=int(n[1]):
count+=1
print(count)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
783203ad1f6026a89b93743dcae8d305dbb86752 | f523332c62c0d82b5483864ad09b0a4a5e4afca1 | /training/versuch1/ranking/trainModelWithHyperParameterTuningRanking.py | 584f47812985e0c3bcc62cdc6f804adf8e6cb464 | [] | no_license | Martinay/masterthesis_code | 081d838500f583517f428d5a1cae4ef2e423b220 | d15cce5880a3630d149f84cccf69a57713b80daa | refs/heads/master | 2020-12-11T13:53:01.423396 | 2020-01-14T15:01:41 | 2020-01-14T15:01:41 | 233,864,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,794 | py | import ptvsd
ptvsd.enable_attach(address=('0.0.0.0', 5678))
# ptvsd.wait_for_attach()
from tensorflow import keras
from tensorflow.keras import layers, metrics
from tensorflow.keras.callbacks import EarlyStopping
from kerastuner.tuners import Hyperband
from kerastuner.engine.hypermodel import HyperModel
from kerastu... | [
"4411119+Martinay@users.noreply.github.com"
] | 4411119+Martinay@users.noreply.github.com |
f90d78e9b315ef2b087db8e4b081d2ea77b0be6d | 4ab08b3a9c0239fbcb774c81b1bcec6cd82744c7 | /aws/aws/urls.py | 822332ea08a397dab504d2c96bf9ff7727360a72 | [] | no_license | yongdol/awstest | 7e0cbaa1cb9ac84a678cf9f41b92ec30ed9eeca1 | 7fc0804bb2f458fb12aa50e4a07bbf23cc26bea4 | refs/heads/master | 2020-12-24T12:20:51.285992 | 2016-11-08T07:38:17 | 2016-11-08T07:38:17 | 73,050,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | """aws URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | [
"kungbuk77@gmail.com"
] | kungbuk77@gmail.com |
fe4212bddcc8ceeddcff2a7c7216ecd8a3f98102 | dfe984dbe420f86c4af22355432951179dc7eeea | /src/tests/test_album_actions.py | 137c5ef23a9ff112dd05d0722a4f9122a4188763 | [
"Apache-2.0"
] | permissive | svnovikov/jsonplaceholder-tests | dd8c8f746002218957bc02c89ebc3d712a2efe28 | 583c3248c8cbd167e3a8d6efffc90fd7074e6559 | refs/heads/master | 2023-01-12T02:14:24.582395 | 2018-10-15T09:28:45 | 2018-10-15T09:28:45 | 152,973,677 | 1 | 0 | Apache-2.0 | 2022-12-27T15:44:30 | 2018-10-14T12:55:23 | Python | UTF-8 | Python | false | false | 5,153 | py | import pytest
from src.utils import check_fields
@pytest.mark.albums
@pytest.mark.parametrize(
'endpoint, expected_code',
[
('/albums/1', 200),
('/albums/0', 404),
('/albums/100', 200),
('/albums/101', 404),
('/users/1/albums', 200),
('/users/11/albums', 404)
... | [
"snovikov@mirantis.com"
] | snovikov@mirantis.com |
cf8eff9dea17234409bec5e7ad16ea03ff90a305 | 984959f729615658dc4e2947db33e92d3588ca9d | /crawler/config.py | 7ff9019c36b050adb5c0d7f3f7ee83f605b5d5c2 | [
"MIT"
] | permissive | plrthink/musicians | 153c5a8d127a2963c310f81c3226270cd90bf1e1 | dfd914a384f9609d44948cb21514e09ab6fb19cd | refs/heads/master | 2020-12-11T05:51:55.944597 | 2014-12-21T08:35:13 | 2014-12-21T08:35:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py |
from firebase import firebase
MUSICIANS_PAGE_PICKLE_PATH = 'musicians.pickle'
FIREBASE_BASE_PATH = "https://musicians.firebaseio.com/"
MUSICIAN_STORE = 'musicians'
firebase = firebase.FirebaseApplication(
FIREBASE_BASE_PATH,
None
)
| [
"iseansay@gmail.com"
] | iseansay@gmail.com |
64d7ab6ab96aaa73f4156389bc168f83c3e2dac1 | 29084eefb0dcf231b94f341b7cec00c221b52a6c | /lib/reast.py | df7a9cb31d31ecaef80f0a118cf5e5560384b8f1 | [] | no_license | akechi/todobot | 156615546b8d97cde7db2ff0ed4b14a6acf103d4 | 060340e205e389c6e395e3c53a4c764045060d0b | refs/heads/master | 2020-06-03T21:18:06.086923 | 2013-08-09T13:44:37 | 2013-08-09T13:44:37 | 10,821,776 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,993 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import inspect
from inspect import Parameter
from functools import partial
from itertools import filterfalse
class Capture(object):
def __init__(self, astnode, parent=None):
assert isinstance(astnode, ASTNode)
self.children = {}
self.par... | [
"bgnori@gmail.com"
] | bgnori@gmail.com |
fd575ac1cde7dd951bbf9862a7ee743a2b207ee6 | b975bcfe4c15a22e3ab5a14d95890a2339e8f132 | /python/167.py | 0c9ad42b89238fbefe33d5bb9c0a8e3cf295a0f9 | [
"Apache-2.0"
] | permissive | HymEric/LeetCode | 54987f6b8396beb084e8a41db3e10edbb1c7eb16 | e32439a76968d67f99881b6d07fb16e21c979c9e | refs/heads/master | 2020-08-01T19:39:48.229668 | 2020-02-13T14:15:33 | 2020-02-13T14:15:33 | 211,094,924 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,087 | py | # -*- coding: utf-8 -*-
# @Time : 2019/10/6 0006 15:31
# @Author : Erichym
# @Email : 951523291@qq.com
# @File : 167.py
# @Software: PyCharm
class Solution:
def twoSum(self, numbers: list, target: int) -> list:
low,high=-1,-1
for i in range(len(numbers)):
try:
j... | [
"noreply@github.com"
] | HymEric.noreply@github.com |
1dcb11ed3b38bd5a76bf4a8703e465770acd8297 | 6eee5e023c026dcbcb7101189389905785601282 | /vrep_pypot/matplotlib_Dialog.py | ad2e0b9e97277cc69d98c02e35668ed285e998ec | [] | no_license | kmolLin/Pyquino_plugin | 26e7d9e8f75235f455ff550631ebb391ae1a81ee | 7c4aff7b6e6e84ced41e3ae124f87600a1c56533 | refs/heads/master | 2021-01-18T17:25:49.294387 | 2017-04-09T13:04:07 | 2017-04-09T13:04:07 | 86,797,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,125 | py | # -*- coding: utf-8 -*-
"""
Module implementing matplotlib_show.
"""
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from Ui_matplotlib_Dialog import Ui_Dialog
import sys
import os
import random
import matplotlib
# Make sure that we are using QT5
matplotlib.use('Qt5Agg')
from numpy import arange, sin, pi
f... | [
"smpss91341@gmail.com"
] | smpss91341@gmail.com |
98b72acc87e1366fe2c9308189b0e28b738d95a6 | 710ac369ce06c8648ab7b8de905ca68b6fcb30da | /Python/Finished/Problem151_StringReversal.py | c76bda25a5e5e8868f16642b2d1471898bde9af3 | [] | no_license | XuanShawnLi/LeetCode | d268b1623ab311ae75d0896b71176a484e1f99f7 | a7ff2c37de71ef1f82f78f31d862738820630730 | refs/heads/master | 2021-01-01T06:38:36.274615 | 2015-04-27T21:52:19 | 2015-04-27T21:52:19 | 31,913,092 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | """
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Update (2015-02-12):
For C programmers: Try to solve it in-place in O(1) space.
"""
class Solution:
# @param s, a string
# @return a string
def reverseWords(self, s):
newword=s.strip()
... | [
"xuanli1981@gmail.com"
] | xuanli1981@gmail.com |
def4b651e82986350783a83c780c9be71ee185fb | 47ebf27cd965269321b5d07beea10aec6da494d9 | /Analysis/scripts/old_scripts/radial_profile_KerrSF_phi_sphere_vs_slice.py | c700d75b81f86839dd2bd74119751d979809b534 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | JamieBamber/GRChombo | 9220fa67eeaa97eee17bc3c0a8ad17bfd3d02d0e | 4399e51f71618754282049d6f2946b69ad2c12ee | refs/heads/master | 2022-03-21T18:49:41.668222 | 2020-11-24T23:21:14 | 2020-11-24T23:21:14 | 201,951,780 | 0 | 0 | BSD-3-Clause | 2020-03-11T10:19:26 | 2019-08-12T14:55:47 | C++ | UTF-8 | Python | false | false | 2,992 | py | import yt
import numpy as np
from yt import derived_field
import time
# import sys
import matplotlib.pyplot as plt
import math
from yt.units import cm
start_time = time.time()
# load dataset
data_root_path = "/rds/user/dc-bamb1/rds-dirac-dp131/dc-bamb1/GRChombo_data/KerrSF"
data_sub_dir = "run2.2_KNL_l0_m0_a0.99_Al0"... | [
"dc-bamb1@login-e-14.data.cluster"
] | dc-bamb1@login-e-14.data.cluster |
788fe06647b09768ae78371dc177c5c3795a772c | bb08eb6609c9dbf721ffdf613135571c662e6756 | /MNIST Clusters.py | 1e56622d6a72ae42fe867cf83664662e21264d13 | [] | no_license | rumiio/ServerlessAI-1 | d269bb9fad2ff7dd3be72f8b09ccdb20c288c99e | d1441d5f087c45267994d3082f95f3a872f64dc3 | refs/heads/master | 2020-04-01T02:14:54.624303 | 2018-10-11T00:36:08 | 2018-10-11T00:36:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,095 | py |
# coding: utf-8
# # MNIST Clusters
# In[5]:
from sagemaker import get_execution_role
role = get_execution_role()
# In[6]:
get_ipython().run_cell_magic('time', '', 'import pickle, gzip, numpy, urllib.request, json\n\n# Load the dataset\nurllib.request.urlretrieve("http://deeplearning.net/data/mnist/mnist.pkl.gz... | [
"noreply@github.com"
] | rumiio.noreply@github.com |
b1503a00135afba514e7590e99b4df2ec8d63a57 | a8053bd5e459e1496112787049182b59540e29fb | /python/getpop.py | 5f64a8097369c9bb8d48323f916905123b3ee4d2 | [] | no_license | larsbutler/ged | d0c81409423727a1cbf552eed379c38c90570d5d | bac70d66aab6172778e25dee4ac8dc92f370cfc7 | refs/heads/master | 2020-12-25T00:06:00.919684 | 2013-02-18T14:27:38 | 2013-02-18T14:27:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,804 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2010-2012, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, eithe... | [
"paul@openquake.org"
] | paul@openquake.org |
89a5954ff3954c83f37c579a6f9b43cbe7fd9c34 | 904b0d81152649ccd3349f94f88e7b89a7b5c76a | /scripts/plotting/plot_wedge.py | cf9b2395645d90bc12e00db3f26c19924497385e | [
"BSD-3-Clause"
] | permissive | desihub/LSS | ec33538a0e7280ad1c6b257368cc009ed4b39cbb | 5645461929172d327ed30389d76e7e887043c9bf | refs/heads/main | 2023-08-18T23:17:13.123605 | 2023-08-18T20:08:22 | 2023-08-18T20:08:22 | 36,753,969 | 14 | 28 | BSD-3-Clause | 2023-09-13T18:37:35 | 2015-06-02T18:42:51 | Jupyter Notebook | UTF-8 | Python | false | false | 3,022 | py | import matplotlib.pyplot as plt
import numpy as np
import os
import sys
import fitsio
from astropy.table import join,Table
import healpy as hp
from LSS.tabulated_cosmo import TabulatedDESI
cosmo = TabulatedDESI()
dis_dc = cosmo.comoving_radial_distance
outdir = '/global/cfs/cdirs/desi/survey/catalogs/main/LSS/daily/... | [
"ashley.jacob.ross@gmail.com"
] | ashley.jacob.ross@gmail.com |
0d0c91379fb0afa3b4f47cb1b6414956158c67f4 | ed9c1fc1f34e7546d896cd3d64b4ce983b30282c | /assignment-10.py | 37c2c618122f11793adefa2e0769010553df310b | [] | no_license | rahulsingh9878/Daily_Assignments | 6d21fccd12e7e979a2704e879640240df536d9d5 | 7b1a3029674efb4d81f37ab7775c0f3ce48c9f3d | refs/heads/master | 2020-03-26T14:05:04.900444 | 2018-10-07T16:54:01 | 2018-10-07T16:54:01 | 144,971,143 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,380 | py | f=open("Rahul.txt",'w')
f.write("hi")
f.write("\n hello")
f.write("\n up")
f.write("\n hi")
f.write("\n below")
f.write("\n hello")
f.write("\n werty")
f.write("\n hi")
f.write("\n hello")
f.close()
#Q.1- Write a Python program to read n lines of a file
f=open("Rahul.txt",'r')
lines = f.readlines()
n=int(input('No. of... | [
"rahulsimgh9878@gmail.com"
] | rahulsimgh9878@gmail.com |
d84b359fb10c180b482718d87c4d2b0b17cfdc49 | cca186e9e8d5d29807e93a7c34cf8b975c420621 | /geops/built_in/compound_surface.py | b1c0e1500effe7630b0ad126cd38ec5c59a156ae | [
"MIT"
] | permissive | tokarevart/geops | 972ec17b75a67b5e10a3995571998e09a9997bd0 | c358d79e7e4bfd11da604b181f992494f7ed39ea | refs/heads/master | 2020-07-03T23:27:17.610821 | 2019-08-13T15:37:26 | 2019-08-13T15:37:26 | 202,085,527 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,047 | py | from .surface_base import SurfaceBase
class CompoundSurface(SurfaceBase):
"""
Generates the Compound Surface Gmsh function.
Creates a compound surface from several elementary surfaces.
When meshed, a compound surface will be reparametrized as
a single surface, whose mesh can thus cross internal bo... | [
"tokarev28.art@gmail.com"
] | tokarev28.art@gmail.com |
bfb894afda59ae12d5f2976185153477c045b24e | c6949a72cdadab6558c0abad85046b8373b13ff0 | /netprovider/bin/sqlformat | bc24e8261734f870928d6bea8e5f5e0ed655485c | [] | no_license | priyambajpai22/netprovider | fb6c5974fcd3af79c25e5f2c04b6d903c808f6df | b5274ee7b763710dcd4a76a3cb5b85c014c046ee | refs/heads/master | 2022-08-25T04:21:01.817502 | 2019-08-20T08:53:34 | 2019-08-20T08:53:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | #!/home/golu/env/netprovider/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from sqlparse.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"golubajpai302@gmail.com"
] | golubajpai302@gmail.com | |
765c2d34cad0ed3db835fc0f216d0c88986ca9f8 | 1fc35e54ee4723cfa3d13de713895eac30616847 | /baekjun/stage solve/20.stack/10828.py | 935d7ec8096e90a8ee88591746be2958546e03fb | [] | no_license | yhs3434/Algorithms | 02f55a5dc21085c0a17d9eaec5e3ba0cbd6d651d | 24d234a301077aac1bc4efbb269b41a963cedccf | refs/heads/master | 2021-07-12T19:21:00.446399 | 2021-01-20T01:44:27 | 2021-01-20T01:44:27 | 226,431,877 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 764 | py | # 스택
# https://www.acmicpc.net/problem/10828
import sys
rl = sys.stdin.readline
st = []
def solution(cOrd):
if len(cOrd)>1:
st.append(int(cOrd[1]))
else:
cur = cOrd[0]
if cur == 'pop':
if not st:
return -1
else:
return st.pop()
... | [
"yoonhs3434@naver.com"
] | yoonhs3434@naver.com |
566dfb97cc4da20f81cf6becff3ec01cfb7e91f8 | f8f4cc4c94b304def8efbd593f8a44c55897f7f0 | /杭州交付/web_bert_classify.py | ad5687deaa154aed14e2ef824fb1cf9d383cc3f2 | [] | no_license | AdamCuiYH/website-classification | e986d6397cae114c013a7072ef9b4acefd9a6a91 | c617c123b5637077c17b452e31c35c5f4fa05939 | refs/heads/main | 2023-03-18T09:38:44.920107 | 2021-03-12T03:31:14 | 2021-03-12T03:31:14 | 304,557,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,113 | py | import pandas as pd
import time
import multiprocessing
from utils import chrome_spyder
from simpletransformers.classification import ClassificationModel
global html_content
if __name__ == '__main__':
print(' ---------- 开始爬虫,请耐心等待 ----------')
# 调用爬虫模块,得到爬虫文本
start1 = time.time(... | [
"noreply@github.com"
] | AdamCuiYH.noreply@github.com |
2e5a372d00383fe3ea8f959e7e3ad7991bc68056 | 18d4189c0cfd054890fcc70c6f223ff030f08c9c | /assignments/a1/html-compressor-separated.py | 4ab6c38095d62f7a5d937f81dda69ce6cc5071b7 | [] | no_license | erikaris/cs834-f16 | 572309e431835b97b143b94222bd24347625d4d7 | 895d671823f94ddd77d52349f24dcd839e29e8a0 | refs/heads/master | 2021-01-22T01:06:05.098411 | 2016-12-17T16:52:54 | 2016-12-17T16:52:54 | 67,218,768 | 0 | 0 | null | 2016-09-02T11:56:38 | 2016-09-02T11:56:38 | null | UTF-8 | Python | false | false | 3,154 | py | import json
import string
from HTMLParser import HTMLParser
import htmlmin as htmlmin
import requests
# HTMLEncoder is extent of HTMLParser
class HTMLEncoder(HTMLParser):
_tags = [] # convention for private variable
def handle_starttag(self, tag, attrs):
# Append to array, with type 'starttag'
... | [
"noreply@github.com"
] | erikaris.noreply@github.com |
adbbd7044769fce98db6a4c2fe373101e6b31812 | ef9aab4d53caf9126ddcb83a268a1702b2b4dac7 | /contmon/content/models.py | 413a1e1c51b0814467e90a8e0a0818521d6eb301 | [
"BSD-3-Clause"
] | permissive | adandan01/contmon | c347365f59beac6dcfe0f243457f477dacae90c4 | 95cb6ff432ce5e02cdaa823430626a8abb03d01e | refs/heads/master | 2021-01-06T20:42:45.363275 | 2015-07-09T17:47:28 | 2015-07-09T17:47:28 | 37,098,228 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,698 | py | from django.db import models
# Create your models here.
# class ContMonWebsite(models.Model):
# pass
from jsonfield import JSONField
from model_utils.models import TimeStampedModel
import reversion
class CrawlUrl(TimeStampedModel):
url = models.CharField(max_length=500, db_index=True)
domain = models.Ch... | [
"danio.chen@gmail.com"
] | danio.chen@gmail.com |
5a2fff6f3995b075b57cb0927c81e5fa76fb7714 | d305e9667f18127e4a1d4d65e5370cf60df30102 | /tests/st/ops/gpu/test_softplus_op.py | 1ee9d3c9c4594b3b54afe4a11dabd5056013e300 | [
"Apache-2.0",
"MIT",
"Libpng",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.1-only",
"AGPL-3.0-only",
"MPL-2.0-no-copyleft-exception",
"IJG",
"Zlib",
"MPL-1.1",
"BSD-3-Clause",
"BSD-3-Clause-Open-MPI",
"MPL-1.0",
"GPL-2.0-only",
"MPL-2.0",
"BSL-1.0",
"LicenseRef-scancode-unknow... | permissive | imyzx2017/mindspore_pcl | d8e5bd1f80458538d07ef0a8fc447b552bd87420 | f548c9dae106879d1a83377dd06b10d96427fd2d | refs/heads/master | 2023-01-13T22:28:42.064535 | 2020-11-18T11:15:41 | 2020-11-18T11:15:41 | 313,906,414 | 6 | 1 | Apache-2.0 | 2020-11-18T11:25:08 | 2020-11-18T10:57:26 | null | UTF-8 | Python | false | false | 2,782 | py | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | [
"513344092@qq.com"
] | 513344092@qq.com |
3bfefc21757436c7a416f2e49b7aa84b341eb947 | f1119c7d9d2ae98cee7611ecfd0c9c20b2adf7a0 | /removeCSVHeader.py | 82a069cecd84b0beed274ce201f2ccc59b21251e | [] | no_license | Starviper/PythonAutomation | 56d2d89109597451bcb1fb11ba3af5f11cd6f13b | 6cb44683804215e4a9d633a4c5cad78eb2c3d633 | refs/heads/master | 2022-11-17T21:34:07.040641 | 2020-07-21T06:24:22 | 2020-07-21T06:24:22 | 277,970,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 911 | py | #! pythjon3
# removeCsvHeader.py - Removes the header from all CSV files in the current working directory.
import csv, os
os.makedirs('headerRemoved', exist_ok=True)
# Loop through every file in the cwd
for csvFilename in os.listdir('.'):
if not csvFilename.endswith('.csv'):
continue # skip non... | [
"noreply@github.com"
] | Starviper.noreply@github.com |
4676e4095a7a2d94af717ea6d54b5d378ea60db3 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_asperities.py | 1ebc25dc9f32377f9af0114b9c0e7203225008b1 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py |
from xai.brain.wordbase.nouns._asperity import _ASPERITY
#calss header
class _ASPERITIES(_ASPERITY, ):
def __init__(self,):
_ASPERITY.__init__(self)
self.name = "ASPERITIES"
self.specie = 'nouns'
self.basic = "asperity"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
76b491c83b4d9a471381859aa1a9f826f2c54f53 | 027c1ef71a4e55cf13f8acb9b24f3f93f1f8ec54 | /DeeplingAI_course1/week3_simple_net/week3_work.py | b0971565fba353045d99189d8ee022de25c8fac8 | [] | no_license | JiangChenrui/DeeplingAI | 7c7ade8db4221f105225bb4073b34c68205af6bc | d336665be3767a93c894a13514d4957a59c6cacb | refs/heads/master | 2020-04-09T11:33:52.907097 | 2019-07-13T05:19:42 | 2019-07-13T05:19:42 | 160,314,873 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,929 | py | #%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataSciece.changeDirOnImportExport setting
import os
try:
os.chdir(
os.path.join(os.getcwd(),
'DeeplingAI\DeeplingAI_course1\week3_simple_net'))
print(os.getcwd())
except... | [
"1102592323@qq.com"
] | 1102592323@qq.com |
ac809c7c237ab4e8610c52747662d4478919dabb | fc7813a3d01a4c4a02d50f75020a021533846e8f | /data.py | 4dc1614cd357a959fdb606a9b25539d6d031f394 | [] | no_license | danielspeixoto/MovieGenreClassifier | 64bb0588f2b86705ef1ce8e8e137dccc48882083 | e1fefd7202dc89bbc24c38d33c5068b2299eda9e | refs/heads/master | 2021-08-27T20:48:06.279924 | 2021-08-01T22:43:24 | 2021-08-01T22:43:24 | 158,778,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,182 | py | import pickle
import re
import nltk
import pandas as pd
from nltk import TweetTokenizer
from nltk.tokenize import word_tokenize
from nltk.stem.snowball import SnowballStemmer
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
import nltk.corpus.reader.wordnet as wordnet
def get(filename, genre... | [
"danielspeixoto@outlook.com"
] | danielspeixoto@outlook.com |
120e96c7d21f0726bc44ad6697697cb916a49650 | a8c9d9547e38abbd34d318061ec15d3fe357c8ae | /main.py | de0cda64812b1f26a096561ebdefd21011c9c466 | [] | no_license | momotaro98/HouseholdsRecommendationFormGenerators | 69476340b0a4c7caff7309cc6050bf1376c75b2c | 69ac8d8a839764f7ab7438ced192225402a15c52 | refs/heads/master | 2021-01-12T13:26:57.571897 | 2016-12-21T04:10:57 | 2016-12-21T04:10:57 | 69,164,404 | 0 | 0 | null | 2016-12-21T04:10:58 | 2016-09-25T12:58:42 | Python | UTF-8 | Python | false | false | 14,055 | py | import csv
from datetime import datetime
from datetime import timedelta
import time
import random
from household_recommendation_form_generators import *
class PredictionEvaluation:
"""
>>> pe = PredictionEvaluation([0, 1, 0, 0], [0, 1, 1, 0])
>>> precision = pe.ret_Precision()
>>> recall = pe.ret_Rec... | [
"ikenshirogivenup98@gmail.com"
] | ikenshirogivenup98@gmail.com |
5f35e60b6dc952576092adbd362d9e286493add4 | 64fc74529b7d26d79de4093f27dceba082e5a298 | /mnist-regression/mnist-regression.py | 6fe7fc5af9d90ba9c4f05bfe1ff6794c70ce755d | [] | no_license | ttskch/tensorflow-tutorial | 90c9b3285f7a0b941616f1ec31e09766c32dcfbc | 398a79b11bb753dfac19acbfe18ad57a395def46 | refs/heads/master | 2021-01-23T05:29:24.169759 | 2017-09-05T11:57:35 | 2017-09-05T11:57:35 | 102,469,676 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,630 | py | from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
import tensorflow as tf
# float値をとる784x可変長の2次元配列のプレースホルダ
# 訓練画像のピクセルごとのピクセル強度のデータ(784pix)を、訓練画像の枚数だけ持つためのもの
x = tf.placeholder(tf.float32, [None, 784])
# 784のfloat値が10個の入力ニューロンに入力される際のそれぞれの重み
# こ... | [
"kanemoto.takashi@gmail.com"
] | kanemoto.takashi@gmail.com |
292a15f37cd349657a16a0ba08546b23f2d030d6 | 7ad1ac9c5631676b92c9271d54edd70fe147fca4 | /ros_ws/build/learning_ros_external_pkgs_noetic/gazebo_ros_pkgs/gazebo_ros/catkin_generated/installspace/spawn_model | 8951e64f58c55e66278a87348222917d73e139ea | [] | no_license | Iris-ye233/final_project_1155150731 | e92432603592a69593aec2fd556f3f2eec6a5b64 | b68cf6f7581e545cc765d3fecb4acae09c2a9787 | refs/heads/master | 2023-05-04T05:09:26.441975 | 2021-05-26T09:21:55 | 2021-05-26T09:21:55 | 370,749,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,692 | #!/usr/bin/env python3
#
# Copyright 2018 Open Source Robotics Foundation
#
# 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 require... | [
"1155150731@link.cuhk.edu.hk"
] | 1155150731@link.cuhk.edu.hk | |
4eeecd18a80bf773f8d4642633b66f15f11bf0f8 | d138deda43e36f6c79c5e3a9ef1cc62c6a92e881 | /python/paddle/vision/__init__.py | aeb07bf281fb0a0289640e0591af4d864ca10b39 | [
"Apache-2.0"
] | permissive | seiriosPlus/Paddle | 51afd6f5c85c3ce41dd72953ee659d1539c19f90 | 9602a182b2a4979247c09df1ec283fc39cb4a981 | refs/heads/develop | 2021-08-16T16:05:10.848535 | 2020-12-27T15:15:19 | 2020-12-27T15:15:19 | 123,257,829 | 2 | 0 | Apache-2.0 | 2019-12-10T08:22:01 | 2018-02-28T08:57:42 | C++ | UTF-8 | Python | false | false | 929 | py | # Copyright (c) 2020 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 app... | [
"noreply@github.com"
] | seiriosPlus.noreply@github.com |
b6a66dcb3d0936e7e0833050be4330e71692e6d8 | 8a101318023566a379096c46d94816dc3237b58a | /RaspberryPi/nafiqad1/python/hware.py | b70d879b40ddbafc56330cdcdce0060aff7dc859 | [] | no_license | binhpham1909/MyProject | 8aef1971073af88874adf027e5072c1df26bc1fe | 11c2ebf99bae3ea9180421324e8e886d8ab87e21 | refs/heads/master | 2021-01-20T20:15:24.575508 | 2017-05-12T09:25:11 | 2017-05-12T09:25:11 | 60,657,275 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,071 | py | import os
import RPi.GPIO as GPIO
import database
class HARDWARE:
def __init__(self,alertbtn,alertled,smsbtn,smsled,ringbtn,ringsms,bellbtn,bellout):
self.alert_btn=alertbtn
self.alert_led=alertled
self.sms_btn=smsbtn
self.sms_led=smsled
self.ring_btn=ringbtn
self.ring_led=ringsms
self.bell_btn=bellbtn
... | [
"binhpham1909@gmail.com"
] | binhpham1909@gmail.com |
949f0533477c0e3fb2249c565b4b279fd4869472 | 562d297e429949d92d7081016d18bbe1c357f1a9 | /todo/models.py | 2e63260f8931a69f26187e6af74ba5deb4394903 | [] | no_license | dan0712/django_todo | 7411e23f34305ea72a06eaf0b6a84f0a994264e1 | 7997df678bfb1063b2d5077e13d251faab03ab11 | refs/heads/master | 2021-01-12T11:08:47.298372 | 2016-12-01T11:52:41 | 2016-12-01T11:52:41 | 72,846,378 | 0 | 0 | null | 2016-12-01T11:52:42 | 2016-11-04T12:36:53 | Python | UTF-8 | Python | false | false | 3,522 | py | from __future__ import unicode_literals
import datetime
from django.db import models
from django.contrib.auth.models import User, Group
from django.template.defaultfilters import slugify
from django.core.urlresolvers import reverse
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compa... | [
"dan.balan0712@gmail.com"
] | dan.balan0712@gmail.com |
1ffc2c5a06d51f5b06d730f8f40258749e0ef1b1 | 9b3c1f5c65b72a70fe4821fb86b550fada74fe0e | /app/controllers/usuario.py | 71f99258dcb9341920953fe1ee66df5b26aa1429 | [] | no_license | rodrigondec/pds_Home-Control | e2c27a1c5fbf0ee139625f2614bcf3556d29a236 | d4767bba06921d6eb5182e632c212bac8f8333a7 | refs/heads/master | 2021-06-18T05:29:03.531780 | 2017-06-20T13:09:39 | 2017-06-20T13:09:39 | 91,518,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,184 | py | from flask import render_template, Blueprint, session, abort, flash, redirect, url_for
from app import db
from app.models import Administrador, Usuario, Component
from app.forms import UsuarioForm, AdicionarUsuariosForm
mod_usuario = Blueprint('usuario', __name__, url_prefix='/usuario', template_folder='templates')
@... | [
"rodrigondec@gmail.com"
] | rodrigondec@gmail.com |
100e0f5d8059c567277afc8783402dc3af76b53c | 66d02af8c7aa5b0d27a3ba4adeab6b218f456fd9 | /main.py | 4950bf754005e01b99df7578f263376a7a834178 | [] | no_license | ruodingt/Distillation-of-Faster-rcnn | ad433ae57c09e241659831115bec3f1e4bee1ff4 | 43c8ec0b7f77296092b8e620ebb9cf8e14fec8d6 | refs/heads/master | 2020-09-01T08:49:03.739412 | 2019-07-16T07:13:54 | 2019-07-16T07:13:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,634 | py | output = model(to_device(input))
output_teacher = model_teacher(to_device(input))
# rois_label_t=output['cls_target']
'''
Classification and regression distillation:
'''
if cfg_distillation.get('cls_distillation',None):
cfg_cls_distillation = cfg_di... | [
"noreply@github.com"
] | ruodingt.noreply@github.com |
e3f0c0455ddf71a846c572c5a51b3c57cf28f2d0 | eadf2f0440d70963e00fa053082ed42cbb930e24 | /MutilProcess.py | b51b5b9d8875198cdd5c8a146a48a046d02b6b85 | [] | no_license | chenyunzhan/StudyPython | a3277d933b5ce2ae63783ed1313c37c1af22048a | c1c4e58210bb50352a9b13bf3a17e7692d7cd1ed | refs/heads/master | 2021-08-07T21:23:05.301980 | 2017-11-09T01:30:31 | 2017-11-09T01:30:31 | 107,389,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 450 | py | from multiprocessing import Process
import time
class MyProcess(Process):
def __init__(self, time):
super().__init__()
self.time=time
def run(self):
start = time.time()
time.sleep(self.time)
stop = time.time()
print("child spend %d"%(stop-start))
start = time... | [
"chenyunzhan08@126.com"
] | chenyunzhan08@126.com |
dc26e457355547f57dfa09f0d3e429952a1b3679 | 220d1675123669aae6250b1f51e430731af0ddee | /mundo-01/ex019.py | 9673e0e0938cc4f02594c9d73d8a28f3a6028c43 | [
"MIT"
] | permissive | bryan-lima/python-cursoemvideo | de6ce440a6ee29435b8021a9dcaa62e5f4c884ee | 6b8b621fb5958d8b5314bc788e8ef3bb4bfe5217 | refs/heads/master | 2023-02-20T08:31:59.103951 | 2021-01-23T23:42:16 | 2021-01-23T23:42:16 | 321,140,944 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | # Um professor quer sortear um dos seus quatro alunos para apagar o quadro
# Faça um programa que ajude ele, lendo o nome deles e escrevendo o nome do escolhido
from random import choice
student1 = input('Nome do primeiro aluno: ')
student2 = input('Nome do segundo aluno: ')
student3 = input('Nome do terceiro aluno: ... | [
"bryanlima200@outlook.com"
] | bryanlima200@outlook.com |
2229eeaf95cea95f93d89096dce48baac03028f0 | 1578ce8cc9d5d2af4500fadd3d6cabf42e3389fc | /bits.py | 31fdd469ae3cbfeb90ffceb47a6551652ffe9e44 | [] | no_license | Man0j-kumar/python | 28bb0291a39c90bcaeab73fc46c6973ac91f6255 | 43e9e8ce2b90c2b8f9318ea4724d23786ac46629 | refs/heads/master | 2020-06-28T09:38:07.618541 | 2019-08-16T10:26:06 | 2019-08-16T10:26:06 | 200,201,198 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 46 | py | import struct
print(struct.calcsize("p")*8)
| [
"noreply@github.com"
] | Man0j-kumar.noreply@github.com |
60933e4c69b13bbfd89cf6070d6829a1b44ecea6 | 040303210bb29385d68d1333423c843cf0ed3ab6 | /preprocessing/simplepreprocessor.py | d3fcf11c4298369deb47d91c0de61f91f239b2c2 | [] | no_license | TrungKhoaLe/ComputerVisionProject | d83dece743b48559ecd40be28eccd1489372536c | 7d21af25c8899330598f454c7fbf95217e5a6bce | refs/heads/master | 2020-06-13T21:15:51.885643 | 2019-12-15T11:36:51 | 2019-12-15T11:36:51 | 194,790,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | import cv2
class SimplePreprocessor:
def __init__(self, width, height, inter=cv2.INTER_AREA):
# store the target image width, height, and interpolation
# method used when resizing
self.width = width
self.height = height
self.inter = inter
def preprocess(self, image):
... | [
"KhoaLeTrung@Les-MacBook-Pro.local"
] | KhoaLeTrung@Les-MacBook-Pro.local |
5fd5332acc29cd3209b53c9e2b7dac33c0cc5b89 | e92c110f34f54c239cf51f47b9b78336f73e0982 | /exercises/mar4/birthdays1.py | dcfbfd14a54e9eae6b16d1725ece2c4b38d7ec44 | [] | no_license | averycordle/csce204 | 953149b9255a66f6da61fd1f9772a3489abba7b9 | 9c864aa100927aa689a80c1cf3cd8caf0249b3a4 | refs/heads/main | 2023-04-15T08:38:08.687747 | 2021-05-03T17:01:46 | 2021-05-03T17:01:46 | 328,207,946 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 678 | py | #Author: Avery Cordle
from datetime import date
birthdays = [
date(2021, 7, 23), date(2021, 2, 25), date(2021, 10, 9), date(2021, 4, 29), date(2021, 9, 20), date(2021, 10, 20), date(2021, 11, 29)
]
closestBirthday = date(2021, 12, 31)
for birthday in birthdays:
daysTilClosest = (closestBirthday ... | [
"noreply@github.com"
] | averycordle.noreply@github.com |
24199eef493f792f7fa42254f02857e7fbe96929 | ce664ee0abe3487316059c9d6379582544696eea | /smallest_positive.py | 8bb9e2b2c729dc61e202f123f30b3e664bc45aa0 | [
"MIT"
] | permissive | OuedraogoAbdoul/python-review | eddcc16015d01f98f92f039423d8f6cd0df90abc | 644cbfdd6f77d11241d0ca30d4717c3d9c8b7cc2 | refs/heads/master | 2021-01-13T18:26:45.760483 | 2020-02-23T04:57:51 | 2020-02-23T04:57:51 | 242,456,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | def smallest_positive(in_list):
# TODO: Define a control structure that finds the smallest positive
# number in in_list and returns the correct smallest number.
return sorted([i for i in in_list if i > 0])[0]
# Test cases
print(smallest_positive([4, -6, 7, 2, -4, 10]))
# Correct output: 2
print(smallest... | [
"ouabdoul@hotmail.com"
] | ouabdoul@hotmail.com |
61455cbafe0dcc297640de81ea173c2d3ff67f9f | 6f3389c93cf1057bca5398940932561c19dbec1d | /백준/기초/2577.py | 7c4f1c1e4c1bdb889d09109f1aa9f249c9ca0c60 | [] | no_license | Jeonseoghyeon/APR | 0af9ac1b4ba666a97d78b92e3e599c5a8bc87acc | 7a3822913b84ae6ecf80c8e35c7c8e400981d1fe | refs/heads/master | 2020-12-23T13:55:24.194463 | 2020-06-30T07:00:23 | 2020-06-30T07:00:23 | 237,172,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | x,y,z = [int(input()) for x in range(3)]
print(x,y,z)
result = str(x*y*z)
print(result)
for i in range(10):
if i == 0:
print(result.count('0'))
continue
else:
print(result.count(str(i)))
| [
"jsh28592@gmail.com"
] | jsh28592@gmail.com |
dcd99135a01a9bb542329a85735346226d9bf41f | 6bf879172a44c5c07d4595c44a6634c225aa56fc | /snippets/admin.py | a72a807674d8936806fb2dd7472556bb2fd2209f | [] | no_license | shubham1560/Google-sign-in | 0f6ce102ae4994867ff2b6ad216009b8467e851e | f7fd1cbf6f5934cb8ea17381c78c5b45234be47b | refs/heads/master | 2022-08-30T01:39:45.764622 | 2020-05-27T12:51:46 | 2020-05-27T12:51:46 | 267,318,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | from django.contrib import admin
from .models import SystemProperties, Snippet
class SytemPropertiesAdmin(admin.ModelAdmin):
list_display = ('key', 'value', 'description')
class SnippetAdmin(admin.ModelAdmin):
list_display = ('id', 'title', 'sys_created_on', 'sys_updated_on')
admin.site.register(SystemPro... | [
"shubhamsinha2050@gmail.com"
] | shubhamsinha2050@gmail.com |
2bd370ce7abc4118cb4016644984971b14cbd8cd | 677c06029ec9026ca4cee4f10b790b613142ce9e | /Animation Paint Board/Project Source and Support Source/demo.py | d793d3f6478b32f8deb850d0af3003ff39eed85d | [] | no_license | zhuzihope/WenzhuLiu | ba40711073ab969e5b8cad4f8fd40d0440b8c02e | 8cdca9264a9aa05b377888d1cb11b33979e3b203 | refs/heads/master | 2021-04-09T16:39:49.377805 | 2014-06-26T19:58:07 | 2014-06-26T19:58:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,252 | py | # Wenzhu Liu + wenzhul + section L
# This is the main class which makes the paint board work well.
# We could draw like pencil, pen, and dropper. It also includes eraser, images
# and the method how to draw a regular line.
# What's more, we could put some images on the canvas and make them move
# in different directi... | [
"liuwenzhu2012@gmail.com"
] | liuwenzhu2012@gmail.com |
2710e4f3d65358a568d7e312ed2f939553f89fbb | f8beb6e0eefdca3a38014615e79b2da96f9ba1ce | /chsr501.py | c129cb391aa24277d994df42bfa1d53003ce411d | [] | no_license | YuheiTakagawa/python-firebase | 9faafe8a05cc4a2216c0ce2f0bce4b0934c6bf4f | a2ce97ac05be765fe077350f6e48222aff5a7f84 | refs/heads/master | 2020-05-14T14:35:03.340784 | 2019-06-30T17:20:24 | 2019-06-30T17:20:24 | 181,836,867 | 0 | 0 | null | 2019-05-05T04:39:51 | 2019-04-17T07:11:24 | Python | UTF-8 | Python | false | false | 691 | py | from datetime import datetime
import time
import RPi.GPIO as GPIO
INTERVAL = 3
SLEEPTIME = 5
GPIO_PIN = 18
GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_PIN, GPIO.IN)
if __name__ == '__main__':
try:
cnt = 1
while True:
if(GPIO.input(GPIO_PIN) == GPIO.HIGH):
print(datetime.now... | [
"roto11fon@gmail.com"
] | roto11fon@gmail.com |
ae8ea68cb62921a729e08c5b2abc5e7dee0f88ea | 28445de3b12cee662dc31ab1f0f011bdfa1e3602 | /tests/test_alignment.py | d456579231702ae030cc34757c42e4aeeaf25d0f | [] | no_license | hitochan777/nmt_processor | 2504ae225c7e660dabd257db10327301f20b41d1 | c7c67f507a455f9087443f5b7fa687398f607e05 | refs/heads/master | 2021-01-18T22:29:29.618288 | 2016-11-09T05:16:36 | 2016-11-09T05:16:36 | 72,538,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | from unittest import TestCase
from alignment import Alignment
class TestAlignment(TestCase):
def test_convert_string_to_alignment_dictionary1(self):
line = "1-2 2-1 3-2 4-1 1-3"
alignment = Alignment.convert_string_to_alignment_dictionary(line)
self.assertDictEqual(alignment, {1: [2, 3], ... | [
"hitochan777@gmail.com"
] | hitochan777@gmail.com |
b83ca65d4f219d8cd22c9bdee20821c364e01fa6 | 08f5ea96a3a3fdce0b3192e7c3ed214cd3cabc59 | /src/pandaframe/fast_df.py | e87b4c6622d3806c51f06567d75a0834ec713ed5 | [] | no_license | SivaanandM/TickAlgoAgent | 55739f8a18cbe64b4a8928da820e9922f0366b16 | 749878656f02599260ad21c3645b733d56a018d4 | refs/heads/master | 2022-10-05T15:46:57.035861 | 2020-06-03T15:48:23 | 2020-06-03T15:48:23 | 208,987,355 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,397 | py | import os
import sys
sys.path.append(os.getcwd()[:os.getcwd().find("TickAlgoAgent")+len("TickAlgoAgent")])
from src.main.algo_agent_object import AlgoAgentObjects as abObj
from src.pandaframe import fast_indicators as indi_obj
import traceback
# from src.loghandler import log
import time
# os.environ['TZ'] = 'Asia/Kol... | [
"sivaanand.m@gmail.com"
] | sivaanand.m@gmail.com |
bb49ad91b47ee7061f94169c8fb31d3728856b71 | 17b2254410e1dbf5af3ec0e73f86b5cfb577180c | /mainapp/migrations/0006_auto_20190328_1944.py | 168364636102e05a7f9d34b515924b039f59771f | [] | no_license | nicolasbolt/VideoSharingSite | aca8f551dfd6b99b59df7f38b31fffb71804280a | 0fb89f5d9d0e440a90bf5df38618f1cc18f38283 | refs/heads/master | 2020-05-04T12:58:49.104727 | 2019-06-24T15:49:12 | 2019-06-24T15:49:12 | 179,142,279 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | # Generated by Django 2.1.4 on 2019-03-28 23:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0005_video_thumbnail'),
]
operations = [
migrations.AlterField(
model_name='video',
name='thumbnail',
... | [
"nicolas.bolt@gmail.com"
] | nicolas.bolt@gmail.com |
e10dfbcf3fe3feda140d976234b316d2afb6a44e | e5dbae874442fbe162e5fff58641fb042a7f56e7 | /pbsnodesParser.py | 81b5539f42aac97dfabd29b79ca46cc1e40bab3b | [] | no_license | IceCube-PSU/clustertools | 37cbc8011bfbef01e02186ab6075b73d1debb5a2 | 9e6332652bb789cda9113a0c0464b9582238b3d8 | refs/heads/master | 2020-12-24T16:31:44.766795 | 2020-05-14T18:07:08 | 2020-05-14T18:07:08 | 23,080,559 | 0 | 0 | null | 2018-02-19T19:33:01 | 2014-08-18T17:45:53 | Python | UTF-8 | Python | false | false | 2,311 | py | import re
import sys
sys.path.append('./lib')
from vsc.pbs.pbsnodes import PbsnodesParser
#from vsc.pbs.node import NodeStatus
parser = PbsnodesParser()
#
# Next incarnation of this script will do the following:
# - loop over all accumulated pbsnodes files
# - extract time from filename
# - keep track of various p... | [
"noreply@github.com"
] | IceCube-PSU.noreply@github.com |
42beec1d7a484e6b3f943490519107cdf81b1853 | 202c605d4ff02f93625c46b91cf15a5a46ce33c1 | /login/migrations/0001_initial.py | a5198f1d926a3aa8829afbf74ea553b476cdf535 | [] | no_license | zhuerl/mysite | bd91e9435ae45ca4cbf5b5d496a1e1aa865a7552 | 4e281d846a1b641638679c7e5953e4bcc050a9e9 | refs/heads/master | 2023-05-03T14:31:55.318804 | 2019-11-09T19:18:19 | 2019-11-09T19:18:19 | 220,687,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,736 | py | # Generated by Django 2.2 on 2019-11-10 01:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
... | [
"190381929@qq.com"
] | 190381929@qq.com |
09c1e07399852eea39b1f91ebc3088c04b873bf4 | 0410073eb08bb92d44ef70333a065e80700227c0 | /BaseTools/Source/Python/Ecc/Check.py | d563a2f961b2487a3091a98fe46540f6ab339468 | [
"BSD-2-Clause"
] | permissive | Perry31/mu_basecore | f69bc463835ec19a80005bdf7b7fc45df47ed84c | 0d16728c1b41e25e55476358f6dcf4d8fed45f8d | refs/heads/release/201808 | 2023-08-16T21:03:50.066318 | 2018-11-21T23:51:35 | 2018-11-21T23:51:35 | 159,019,460 | 1 | 0 | BSD-2-Clause | 2023-06-21T14:19:01 | 2018-11-25T10:17:46 | C | UTF-8 | Python | false | false | 98,519 | py | ## @file
# This file is used to define checkpoints used by ECC tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. T... | [
"brbarkel@microsoft.com"
] | brbarkel@microsoft.com |
a3f6ae7c20cd1bfb28fbfeef13b36f8fe71a7f48 | 1abf781b85cade4c57d1784fbfa61298f1d11d7f | /assignment01/assignment01/stock_manager.py | 60e3415f0a6a850356c8f823a968614dab30733e | [] | no_license | bayram98/APME_class | 3200ba5cb10ac2a79db968728cb4a9b7e33cf487 | 8fcfb198e0c0f7d135e711cc976534a01e10706a | refs/heads/master | 2020-04-09T09:29:50.879851 | 2018-12-03T19:03:41 | 2018-12-03T19:03:41 | 160,235,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,112 | py | """
Refer to the assignment specification for more details
ID: 20162023
Name: Bayram Guvanjov
"""
from module03_stacks_and_queues.part00_preclass.stack import ArrayStack
class StockManager:
def __init__(self, o_name, o_surname):
"""
Initialises the Stock Manager with the name and surname of th... | [
"noreply@github.com"
] | bayram98.noreply@github.com |
0b3b95468803f1c3c7f46c276d0bdb6e893daee2 | 4855811d329fecb387fe9964147a8be38e005496 | /source/Solver/Distance_Solver.py | 297e0e00f353dc36d70e3708f3cac248db1906dd | [
"MIT"
] | permissive | afarahi/XTRA | a9b9570720895cd0c7bf800a301763073e7875e1 | 6550b216264abaa3ed705835aca0981f2934e069 | refs/heads/master | 2021-01-13T05:28:58.341354 | 2019-07-17T15:47:47 | 2019-07-17T15:47:47 | 86,624,796 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,748 | py | from numpy import sin, sinh, sqrt, linspace, zeros, savetxt, array
def distance_integral_element(Input_Param,z):
dl = sqrt( Input_Param.Omega_M*(1.0+z)**3 +
Input_Param.Omega_DE*(1.0+z)**(3.0*(1.0+Input_Param.w)) +
Input_Param.Omega_R*(1.0+z)**4 -
Input_Param.Omega_k*(1... | [
"aryaf66@gmail.com"
] | aryaf66@gmail.com |
9e5d3a6432c78cb8a03c5b9a86742cdb2c43ec43 | 0201c0e75575af3db0a57c1e2270c3934ccf68ae | /addok/core.py | 3f9ca919534ad004ae913b8a0eb2ba2902617797 | [
"WTFPL"
] | permissive | eric-pommereau/addok | f694f6a5fcdff2131e8bf4c3b6ebc686cd2a2b4b | ab15e43ade7e434055c3a656fdd1f1fa04e6db75 | refs/heads/master | 2021-01-18T09:04:13.773277 | 2016-01-29T15:36:20 | 2016-01-29T15:36:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,071 | py | import time
import geohash
from . import config
from .db import DB
from .helpers import keys
from .helpers.index import VALUE_SEPARATOR
from .helpers.text import ascii
def compute_geohash_key(geoh, with_neighbors=True):
if with_neighbors:
neighbors = geohash.expand(geoh)
neighbors = [keys.geohas... | [
"yb@enix.org"
] | yb@enix.org |
aae4793daeef18f577ffd36084f0c7832b95c6b9 | 360b51c2b1b83856cdeda7dc5eac789e15ebd359 | /Section 11/script5.py | 9901a1176b9d6553cedef0c5f0c8db90fb9c5880 | [] | no_license | EfezinoErome/PythonMegaCourse | 4df164d1092914e6826b4468d3c253e660cd6bec | b9ddba962145dd7a466ebcdf6e105a5c0f318c97 | refs/heads/master | 2021-04-28T22:19:34.420524 | 2017-01-25T18:27:29 | 2017-01-25T18:27:29 | 77,755,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | import folium
import pandas
df = pandas.read_csv("Volcanoes-USA.txt")
map = folium.Map(location=[df['LAT'].mean(),df['LON'].mean()],zoom_start = 5,tiles='Stamen Terrain')
def color(elev):
minimum = int(min(df['ELEV']))
step = int(((1/3)*(max(df["ELEV"]) - min(df["ELEV"]))))
if elev in range(minimum, mini... | [
"johnerome09@gmail.com"
] | johnerome09@gmail.com |
3412068c88db0a4b2867e3f9492c89f4caddc089 | a7f6321c52f8993f20afd4bf1934f6a0223c9a00 | /LearningOpenCV3WithPython/temperatureMonitoring/MatplotlibWidget.py | d41ce578a4fe1085d0caf20b541518ad9145a87b | [] | no_license | CycloneBoy/pythonLearning | 23a1aef5e8345a0ad2d7dffcdd0cd75426f9035b | 1a7cbbb0add0521f7eb080801d560fac70fd0e0d | refs/heads/master | 2021-01-23T23:45:37.883636 | 2018-06-04T15:41:06 | 2018-06-04T15:41:06 | 116,812,409 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,261 | py | import sys
import random
import matplotlib
import datetime
import matplotlib.dates as mdates
import matplotlib.cbook as cbook
import numpy as np
import csv, pyodbc
matplotlib.use("Qt5Agg")
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QSizePolicy, QWidget
from numpy impo... | [
"xuanfeng1992@gmail.com"
] | xuanfeng1992@gmail.com |
bcdfa2627a3a7059adc14cc77b201eb84f302170 | d4b6480e6c06b6be8670abcbed4e30b8e2c617ed | /ttuple.py | 2774b1aefba32fd2047e19f853c0af6b7b445412 | [] | no_license | kexiaomeng/python | c31bf2096e477fec0ef964de9871165abe471e71 | bc4af30fca7ea4f38d6324aff1919c802f95bfbd | refs/heads/master | 2020-03-31T06:58:08.546235 | 2018-10-08T02:53:00 | 2018-10-08T02:53:00 | 152,001,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,933 | py |
record = [
("foo", 1, 2),
("bar", "hello"),
("foo", 3,4)
]
def do_foo(x, y):
print("foo", x, y)
def do_bar(x):
print("bar", x)
for tag, *arg in record:
if tag == "foo":
do_foo(*arg)
elif tag == "bar":
do_bar(*arg)
import collections #队列
q = collections.deque(maxlen... | [
"307621564@qq.com"
] | 307621564@qq.com |
2f50affd6eebd0aa5aa0d92f85fa6e2305bda42f | a22aa358db0a9bc2c9dcd5b152b5437b49ad95b5 | /test/utils_tests.py | c44448e1679e2f49b74bf0ee9f7780dc4a593957 | [
"MIT"
] | permissive | JakubPetriska/poker-agent-kit | 17d79e37f30cffc6642db9b6bc4f689376f36c88 | 12c28711c91447c708719454d1fbd224fa03189e | refs/heads/master | 2021-10-25T20:00:39.501902 | 2019-04-06T19:40:55 | 2019-04-06T19:40:55 | 101,301,631 | 21 | 4 | MIT | 2018-11-17T00:42:56 | 2017-08-24T14:06:00 | Python | UTF-8 | Python | false | false | 763 | py | import unittest
from tools.utils import flatten, intersection, is_unique
class UtilsTests(unittest.TestCase):
def test_flatten(self):
self.assertEqual(
flatten([1, 2], [3], [4, 5]),
[1, 2, 3, 4, 5])
def test_intersection_empty(self):
self.assertEqual(
inte... | [
"jakubpetriska@gmail.com"
] | jakubpetriska@gmail.com |
b396d78f6de5178ad51c6a7d172d32c072adf5d5 | 5d26fb700ae9d40bf142b2773777faaf0d0c8c47 | /Myblog/blog/admin.py | 4da013a0c43af4f1d236834ddea1aeb21fb90b97 | [] | no_license | yangshuer/myblogs | 16e4bb11c0693351536fe019dde0160c7919daeb | f6df13ced173aeb15920ec63672c3c862bb2e2d9 | refs/heads/master | 2020-05-25T01:23:51.989145 | 2019-05-20T02:27:15 | 2019-05-20T02:27:15 | 187,554,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | from django.contrib import admin
from blog.models import Article,BlockInfo,TextInfo,Images
# Register your models here.
# 一对多编辑
class TextToImage(admin.StackedInline):
model = Images
extra = 5
class BlockAdmin(admin.ModelAdmin):
list_display = ['Block_in']
class TextAdmin(admin.ModelAdmin):
inlines = ... | [
"yangxue@yangxuedeMacBook-Pro.local"
] | yangxue@yangxuedeMacBook-Pro.local |
ee0e3a0adf316753938f11a769a36dbf93754a35 | 6238dc5b5818f54295547cf4cb1afa5553ddfb94 | /taobao/top/api/rest/ItemAnchorGetRequest.py | 79056fcdfb49a86ae2bd6eaefc98665235267027 | [] | no_license | liaosiwei/guagua | 8208bb82b1df5506dcb86c1a7094c849ea5576a6 | ee6025813e83568dc25beb52279c86f8bd33f1a4 | refs/heads/master | 2016-09-06T16:45:00.798633 | 2013-05-03T04:02:35 | 2013-05-03T04:02:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | '''
Created by auto_sdk on 2013-04-14 16:35:32
'''
from top.api.base import RestApi
class ItemAnchorGetRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.cat_id = None
self.type = None
def getapiname(self):
return 'taobao.item.anchor.g... | [
"liaosiweiorxiaowei@gmail.com"
] | liaosiweiorxiaowei@gmail.com |
f26d408d3dd24e65a2b3a849ccf4b965215ca6a9 | 94f591d4a966b66b1e1c7096b22f77de2be899d6 | /memory/dns.py | c0ffda400cbdbb9b43e9511e8dbb423795b27d04 | [] | no_license | obulpathi/python | 59961ac509c51fde0f9fa1461550682b3e4050fa | ef3c20ac985a28ac911f9a4badb619436ee487b5 | refs/heads/master | 2016-09-05T09:34:22.879012 | 2015-07-31T15:15:06 | 2015-07-31T15:15:06 | 21,796,513 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,936 | py | import gc
import os
import sys
import time
import requests
import pyrax
import pyrax.exceptions as exc
from memory_profiler import profile
pyrax.set_setting("identity_type", "rackspace")
creds_file = os.path.expanduser("~/.credentials.cfg")
pyrax.set_credential_file(creds_file)
dns = pyrax.cloud_dns
def get_domain... | [
"obulapathi.challa@rackspace.com"
] | obulapathi.challa@rackspace.com |
dc632caf0c068c70908b7b2623e27d816a2a074e | 903c2f1cb06091f8199bf63d74111fe79dac6f8d | /Initial_Assignment/3.14.Pattern.py | d253939f3c113f5f1aa56fdb3f9942c37ff28477 | [] | no_license | praneethpeddi/Python-Assignments | c8b4d8fa58244b033bb4cdf36f55e42b7e7cf6fc | 0a224aeae40a4cc55a5a7259ff2360fc61841abd | refs/heads/master | 2023-01-19T07:58:59.144309 | 2020-11-19T01:46:45 | 2020-11-19T01:46:45 | 299,494,119 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | n = int(input('Enter n value: '))
value = 0
temp = n
while n > 0:
for i in range(0, 2 * temp - 1):
if i >= temp:
value = value - 1
else:
value = value + 1
if value <= n:
print(value, end=' ')
else:
print(' '*2, end='')
value = 0
... | [
"praneethpeddi1995@gmail.com"
] | praneethpeddi1995@gmail.com |
e9964654a7d249c9d2d76a7e29a33b184d8b7231 | cccef35f008e9676f6b207f02bd31b0f8d432d27 | /PrimeNumberFinder/venv/bin/easy_install-3.8 | 256a2c1c96fc14fd7c524174873ac0a5b238bd59 | [] | no_license | finxter/MiniProjects | e8a1a9270194dd467198276c46849e9744efc625 | d754864ddca9b362f043a6eccd37f9b24cd87738 | refs/heads/main | 2023-02-14T01:54:04.230460 | 2021-01-02T13:58:40 | 2021-01-02T13:58:40 | 315,742,089 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 499 | 8 | #!/Users/lukas/Documents/Coding/PyCharm/Projects/PythonBeginnerProjects/PrimeNumberFinder/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.8'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':... | [
"rieger.lks@gmail.com"
] | rieger.lks@gmail.com |
8b696b10470fa0eeb7fcd2e45fdea033d869cab7 | 6751c663dc4c34e41e627658267179aac0f6859e | /app/api/migrations/0001_initial.py | d778345db7ee5a2bb754a1b3eb918afaf4976468 | [
"MIT"
] | permissive | deckTECHeu/profiles-rest-api | d97f9d86cac9499b24ababb2cd9319c791401107 | 031a917f2c5dfbccca60ffec4c55addf57433e61 | refs/heads/main | 2023-03-04T08:12:19.115485 | 2021-02-21T20:12:32 | 2021-02-21T20:12:32 | 339,798,633 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,716 | py | # Generated by Django 2.1.15 on 2021-02-21 18:02
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='UserProfile'... | [
"akozlowski@afdata.local"
] | akozlowski@afdata.local |
ae3d486028cdfe78a2c66dd51bae9ee8a1a6b563 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_173/ch43_2020_03_25_19_08_28_308004.py | 72d28a1bb3f599fe72957af11372f4f38a04b902 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 257 | py | 1 = 'janeiro'
2 = 'fevereiro'
3 = 'março'
4 = 'abril'
5 = 'maio'
6 = 'junho'
7 = 'julho'
8 = 'agosto'
9 = 'setembro'
10 = 'outubro'
11 = 'novembro'
12 = 'dezembro'
pergunta = range (0,12)
pergunta = int(input('Escreva o número do mês: ')
print (pergunta | [
"you@example.com"
] | you@example.com |
baec9a3ff03abd76ae8a1fede5d7d5b7b201a35a | 1c40a5b1e7ffb7ffed2cfe831c1686aa4af82284 | /omm/analysis/aes/aes_excel_geo.py | 3129856e444e11a47ae139c318d80b353245afe6 | [] | no_license | rhodges/oregon-marinemap | 3c4bb3c13f15ec5f2efd405b0006c8a85d3b42b0 | 4a3797f507a48fd158be5f751fa0ca8c24a47cb7 | refs/heads/master | 2016-09-05T17:49:44.702600 | 2011-11-04T15:56:18 | 2011-11-04T15:56:18 | 32,354,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,740 | py | import xlwt
from analysis.excel.utils import major_heading_style, minor_heading_style, heading_column_style, data_style, perc_style
from analysis.excel.geography import geo_spatial_headers, geo_spatial_data
def populate_geo_sheet(ws, context):
geo_header(ws, context)
geo_spatial_headers(ws)
geo_spatial_dat... | [
"sfletche@gmail.com"
] | sfletche@gmail.com |
6f556dcc6d01cb80678c187bac0d3dd3fd5c7fde | 174833cc3f8ea752ecfa5ffbbdfbab2798dc8745 | /ml_params_tensorflow/ml_params/extra_symbols.py | eecf0002e3b84ec8e61c0cee6b2ff11d02420b23 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SamuelMarks/ml-params-tensorflow | 35098d95de15b65d4bf7ae944eb9a62efb245584 | 86fb92147443e69982d05755361b101f8a6f64e5 | refs/heads/master | 2023-04-22T14:59:15.464011 | 2021-04-08T11:03:24 | 2021-04-08T11:03:24 | 276,570,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | """
The symbols to expose. This is the public API used by ml_params.
"""
from importlib import import_module
extra_symbols = {
"loss"
if mod == "losses"
else mod: import_module("ml_params_tensorflow.ml_params.{mod}".format(mod=mod))
for mod in ("callbacks", "losses", "metrics", "optimizers")
}
del im... | [
"807580+SamuelMarks@users.noreply.github.com"
] | 807580+SamuelMarks@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.