blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a430b405c518f5492c4bfcf40ae484ae3432d216 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02618/s417415114.py | ddebb487f588173570c9610c70cadb46a063199e | [] | 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 | 1,303 | py | from sys import exit
import copy
#import numpy as np
#from collections import deque
d, = map(int, input().split())
c= list(map(int, input().split()))
s=[list(map(int, input().split())) for _ in range(d)]
# t=[int(input()) for _ in range(d)]
sche=[0 for _ in range(d)]
s_tmp=float("inf")*(-1)
for off in range(0,13):
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f1a84740d0a5c3bf1ba1441ba380dc64176cbe97 | d7ad696cd1b550bb41d20f87b83c984ec7f19aa7 | /practice/design_pattern/03_abstract_factory/abstract_factory.py | 5fa712b16a1b0fb0cd9de79237fa18d370861894 | [] | no_license | mida-hub/hobby | 2947d10da7964d945e63d57b549c1dcb90ef7305 | 6e6f381e59fc2b0429fab36474d867aa3855af77 | refs/heads/master | 2022-12-21T23:33:14.857931 | 2022-12-19T16:30:34 | 2022-12-19T16:30:34 | 147,890,434 | 0 | 0 | null | 2021-03-20T04:31:58 | 2018-09-08T01:31:59 | Jupyter Notebook | UTF-8 | Python | false | false | 1,129 | py | # Abstract Factory
# abstract_factory.py
from abc import ABC, abstractmethod
class AbcItem(ABC):
def __init__(self, caption):
self.caption = caption
@abstractmethod
def make_html(self):
pass
class PageItem(AbcItem):
def __init__(self, title, author):
self.title = title
... | [
"rusuden0106@gmail.com"
] | rusuden0106@gmail.com |
bb48285834ee29beb7a898493b7d407dafdf7dd6 | 8c7a187ebfe858ff3f840602585d166b29fce576 | /appstore/regulate_underscores.py | db0232fa39df3b96f78c3dc29fa2e15e90914bc1 | [] | no_license | ohannes/pythonScripts | b756faa2e6d5314cb04c7afc0ca07f69027f59b2 | 5249b2735d8b2a9a2c6ad8a1ae625cb47f50d0b5 | refs/heads/master | 2020-04-06T04:20:29.565042 | 2015-07-19T17:40:39 | 2015-07-19T17:40:39 | 34,119,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | import sys
sys.path.append(os.environ["ohannes"])
from ohannes import *
input_file = getStrArg(1, 1)
output_file = input_file + ".regulated"
lines = getFileLines(input_file)
ftw = open(output_file, write_mode)
for line in lines:
sharp_found = False
equal_found = False
line_regulated = False
if not "=>" in line ... | [
"yasinyildiza@gmail.com"
] | yasinyildiza@gmail.com |
2e77842e863422f2ffdaefdc8d6d8126892ba1d3 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03347/s144374882.py | 8ce3352dfe431d952e676130950485ebdc55dc2e | [] | 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 | 751 | py | import sys,queue,math,copy,itertools,bisect,collections,heapq
def main():
sys.setrecursionlimit(10**7)
INF = 10**18
MOD = 10**9 + 7
LI = lambda : [int(x) for x in sys.stdin.readline().split()]
NI = lambda : int(sys.stdin.readline())
SI = lambda : sys.stdin.readline().rstrip()
N = NI()
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
7098f4dd04eee66744539b132a94f353fab0fbdd | 3373b2bbe6303dcee3ae7f7f3e715ce674878a7b | /packages/hyperk/wcsim_dev.py | 7187f72a10ce70577639daba6aa414e563e94670 | [
"MIT"
] | permissive | pgjones/nusoft | f3515a6e2fc90622638cde0b8712ba6fcea2aa8e | 442c7bca2f921892ecf9eb3ff6821e2a9da7b156 | refs/heads/master | 2020-09-12T21:44:54.453633 | 2014-10-03T20:22:09 | 2014-10-03T20:22:09 | 17,223,474 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,401 | py | #!/usr/bin/env python
#
# WCSimDev
#
# The HyperK WCSim development version
#
# Author P G Jones - 2014-06-20 <p.g.jones@qmul.ac.uk> : New file.
####################################################################################################
import nusoft.package.local as local_package
import os
import nusoft.envfi... | [
"p.g.jones@qmul.ac.uk"
] | p.g.jones@qmul.ac.uk |
3ae2079875387f561dad5fbc4ea251ed85ed9d12 | fcef3602a044a82b75eb1bdee87a5eb347a56769 | /recolo/tests/test_coordinate_solver.py | d18af8c84528da0a59395aaf2880b71ea511ddb3 | [
"MIT"
] | permissive | PolymerGuy/recolo | 5cb9c6b01d7eeb4108710606341518aa13efc1d1 | 05b14f0834fa675579eabdf43fac046259df19bb | refs/heads/master | 2023-04-12T00:17:50.150126 | 2022-03-11T12:42:44 | 2022-03-11T12:42:44 | 343,329,602 | 4 | 1 | MIT | 2022-03-05T08:04:49 | 2021-03-01T07:39:40 | Python | UTF-8 | Python | false | false | 3,877 | py | from unittest import TestCase
from recolo.artificial_grid_deformation import find_coords_in_undef_conf, interpolated_disp_field
import numpy as np
def rms_diff(array1, array2):
return np.sqrt(np.nanmean((array1 - array2) ** 2.))
def biharmonic_disp_field(x, y, amp_scale=0.5):
return (amp_scale * 0.4 * np.co... | [
"sindre.n.olufsen@ntnu.no"
] | sindre.n.olufsen@ntnu.no |
138d7251e99fd5b8de87425401cfefea55cd6357 | 84065ee4fb4ebeb8cb2cf1d3f6f385d2c56d787e | /page/__init__.py | 359e38e1661042b3715145fd8b364217bb2881c4 | [] | no_license | bian-py/app_kefu_code | 59ed0bcf247e5dd7b06e0f91cdd9563faa49ce60 | 2f84a152bdc2c226f2bcb6aabc34f0a5313c094e | refs/heads/master | 2023-01-28T11:17:40.984458 | 2020-12-08T11:07:50 | 2020-12-08T11:07:50 | 319,289,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,863 | py | from selenium.webdriver.common.by import By
# 以下是服务器页面配置信息
fwq_new = By.XPATH, '//*[contains(@content-desc,"添加新的服务器")]'
fwq_hand_input = By.XPATH, '//*[contains(@content-desc,"手工输入")]'
fwq_scan_code = By.XPATH, '//*[contains(@content-desc,"扫码二维码")]'
fwq_input_name = By.XPATH, """//android.view.View[@content-desc="{{ '... | [
"334783747@qq.com"
] | 334783747@qq.com |
e3ba9166ff9f094c8ede9e3c3756bb8117241c50 | 3cae667175b2d6aac6d7f3d8189e9a02c38ea1cf | /AOJ/ITP1/python/ITP1_1_D_Watch.py | c0a07556a3ffec6f81a94127a026e1a802c5a520 | [] | no_license | kokorinosoba/contests | 3ee14acf729eda872ebec9ec7fe3431f50ae23c2 | 6e0dcd7c8ee086650d89fc65616981361b9b20b9 | refs/heads/master | 2022-08-04T13:45:29.722075 | 2022-07-24T08:50:11 | 2022-07-24T08:50:11 | 149,092,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | s=int(input())
print(s//3600,s//60%60,s%60,sep=':')
"""
S=int(input())
m,s=divmod(S,60)
h,m=divmod(m,60)
print(h,m,s,sep=":")
"""
| [
"34607448+kokorinosoba@users.noreply.github.com"
] | 34607448+kokorinosoba@users.noreply.github.com |
7765cc67a607b9556d7c75470b892c02b3fe5707 | f208676788a901f4b66fa0a5809ef5563c1d5471 | /classy_vision/hooks/classy_hook.py | ad5c0a900f8643ca8ed1f247fd4a4e113ac37853 | [
"MIT"
] | permissive | cwb96/ClassyVision | 10e47703ec3989260840efe22db94720122f9e66 | 597a929b820efdd914cd21672d3947fa9c26d55e | refs/heads/master | 2021-02-18T03:35:51.520837 | 2020-03-05T05:41:24 | 2020-03-05T05:43:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,321 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from abc import ABC, abstractmethod
from typing import Any, Dict
from classy_vision import tasks
class ClassyHookSta... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
942d5f383fb074463bde66060a1faedb97568626 | 1033c93917117f462771571c29dd046954582bd8 | /revscores/features/proportion_of_symbolic_added.py | 2eeae56295eca238e2c206c786853e46201b8d7b | [
"MIT"
] | permissive | jonasagx/Revision-Scoring | d4e3e892ac5de3a7f3032ef2b4fcc7b6efb20330 | dfacba014e30d49577aa1a56aab13393ecede9d5 | refs/heads/master | 2021-01-17T11:57:39.393734 | 2015-01-10T19:13:02 | 2015-01-10T19:13:02 | 29,064,762 | 0 | 1 | null | 2015-01-10T19:13:03 | 2015-01-10T17:25:22 | Python | UTF-8 | Python | false | false | 501 | py |
from .chars_added import chars_added
from .feature import Feature
from .symbolic_chars_added import symbolic_chars_added
def process(chars_added, symbolic_chars_added):
return symbolic_chars_added/(chars_added or 1)
proportion_of_symbolic_added = Feature("proportion_of_symbolic_added", process,
... | [
"aaron.halfaker@gmail.com"
] | aaron.halfaker@gmail.com |
55095ee0ea77fe40bd4ed68f53cd486d3d782b2d | fb235cccecab5368074bc43ed8677025f925dceb | /notebooks/westgrid/cffi_practice/__init__.py | 6a5ba61abdb1177997fc7a77bffbd803fbab65cb | [] | no_license | sbowman-mitre/parallel_python_course | 88a5f767de2f0f630d48faf94983fad51ecbe50f | 85b03809c9725c38df85b0ac1e9b34cc50c0dc54 | refs/heads/master | 2022-01-04T18:29:12.443568 | 2019-11-29T16:08:06 | 2019-11-29T16:08:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,313 | py | # import version for use by setup.py
from ._version import version_info, __version__ # noqa: F401 imported but unused
from pathlib import Path
import pdb
import os
import pdb
def get_paths(*args, **kwargs):
binpath=Path(os.environ['CONDA_PREFIX'])
<<<<<<< HEAD
libfile= binpath / Path('lib/libcffi_funs.so')
... | [
"paustin@eos.ubc.ca"
] | paustin@eos.ubc.ca |
4668b524700dbf55e3711938e6cfd959affaa864 | 57ddfddd1e11db649536a8ed6e19bf5312d82d71 | /AtCoder/ABC1/ABC123/ABC123-A.py | 04402036b76e6ab088ca47d8dcc146c57c639e4d | [] | no_license | pgDora56/ProgrammingContest | f9e7f4bb77714dc5088c2287e641c0aa760d0f04 | fdf1ac5d1ad655c73208d98712110a3896b1683d | refs/heads/master | 2023-08-11T12:10:40.750151 | 2021-09-23T11:13:27 | 2021-09-23T11:13:27 | 139,927,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | sm = float('inf')
bi = - float('inf')
for _ in range(5):
v = int(input())
if v < sm: sm = v
if v > bi: bi = v
if bi - sm > int(input()): print(':(')
else: print('Yay!')
| [
"doradora.prog@gmail.com"
] | doradora.prog@gmail.com |
8c36fc26a272f071d2585e8f26ae41f860d794bf | 85381529f7a09d11b2e2491671c2d5e965467ac6 | /OJ/Leetcode/Algorithm/54. Spiral Matrix.py | 877d512e72cd9a17631f7f49ff7225fae0269c52 | [] | no_license | Mr-Phoebe/ACM-ICPC | 862a06666d9db622a8eded7607be5eec1b1a4055 | baf6b1b7ce3ad1592208377a13f8153a8b942e91 | refs/heads/master | 2023-04-07T03:46:03.631407 | 2023-03-19T03:41:05 | 2023-03-19T03:41:05 | 46,262,661 | 19 | 3 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | # -*- coding: utf-8 -*-
# @Author: HaonanWu
# @Date: 2017-03-03 10:57:26
# @Last Modified by: HaonanWu
# @Last Modified time: 2017-03-03 11:01:34
class Solution(object):
def spiralOrder(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
ret = []
... | [
"whn289467822@outlook.com"
] | whn289467822@outlook.com |
143a773bbbec049d6b12a6406b50a9fce3cdd585 | 26dec2f8f87a187119336b09d90182d532e9add8 | /mcod/resources/documents.py | da3e92fb9c8f6d9a843336fb6541b7e1b3f9d460 | [] | no_license | olekstomek/mcod-backend-dane.gov.pl | 7008bcd2dbd0dbada7fe535536b02cf27f3fe4fd | 090dbf82c57633de9d53530f0c93dddf6b43a23b | refs/heads/source-with-hitory-from-gitlab | 2022-09-14T08:09:45.213971 | 2019-05-31T06:22:11 | 2019-05-31T06:22:11 | 242,246,709 | 0 | 1 | null | 2020-02-24T22:39:26 | 2020-02-21T23:11:50 | Python | UTF-8 | Python | false | false | 2,197 | py | from django.apps import apps
from django_elasticsearch_dsl import DocType, Index, fields
from mcod import settings
from mcod.lib.search.fields import TranslatedTextField
Resource = apps.get_model('resources', 'Resource')
Dataset = apps.get_model('datasets', 'Dataset')
TaskResult = apps.get_model('django_celery_result... | [
"piotr.zientarski@britenet.com.pl"
] | piotr.zientarski@britenet.com.pl |
220274ef4a9b4c4918eadc9760519ac1b39963d8 | 3cd18a3e789d3a0739768f1ae848d9f74b9dbbe7 | /mounth001/day21/exercise03.py | fe9a7a38bb1bfcf3fe7454d21909dc564595ee5d | [] | no_license | Molly-l/66 | 4bfe2f93e726d3cc059222c93a2bb3460b21ad78 | fae24a968f590060522d30f1b278fcfcdab8b36f | refs/heads/master | 2020-09-28T12:50:18.590794 | 2019-11-27T04:42:28 | 2019-11-27T04:42:28 | 226,782,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 773 | py | """
lstack.py 栈的链式结构
重点代码
思路:
1. 源于节点存储数据,建立节点关联
2. 封装方法 入栈 出栈 栈空 栈顶元素
3. 链表的开头作为栈顶(不需要每次遍历)
"""
# 自定义异常
class StackError(Exception):
pass
# 创建节点类
class Node:
def __init__(self,val,next=None):
self.val = val # 有用数据
self.next = next # 节点关系
# 链式栈
class LStack:
def __init__(self):
... | [
"769358744@qq.com"
] | 769358744@qq.com |
7046f96277b3a24fa4c120d9e42ebb229ccaad4a | fe7763e194be94c402482619c0111fcaca1ef7f6 | /tutorial/snippets/permissions.py | a42b29204436ae53823a6a8aff8bf895527515ec | [
"MIT"
] | permissive | antoniocarlosortiz/django-rest-framework-sample | 1fc8b11af2aa1cacfbbc2c3363e097262eec7aee | 45ff0213b4a74566c8571c498c67adf66b420d3e | refs/heads/master | 2021-01-01T05:18:51.457373 | 2016-04-23T18:28:12 | 2016-04-23T18:28:12 | 56,934,397 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | from rest_framework import permissions
class IsOwnerOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow owners of an object to edit it.
"""
def has_object_permission(self, request, view, obj):
# Read permissions are allowed to any request.
# so we'll always allo... | [
"ortizantoniocarlos@gmail.com"
] | ortizantoniocarlos@gmail.com |
c412835e863548366c31fa22434e45e614059113 | 56278a6e508ce1a282270f90f1cd9984edd14965 | /tests/test_validation/_test_utils.py | ae430d81167f643c218fc773e99d0fc4cf3c2974 | [
"MIT"
] | permissive | gc-ss/py-gql | 3d5707938e503dc26addc6340be330c1aeb2aa76 | 5a2d180537218e1c30c65b2a933fb4fe197785ae | refs/heads/master | 2023-04-10T05:21:24.086980 | 2020-04-01T14:18:20 | 2020-04-01T14:18:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,463 | py | # -*- coding: utf-8 -*-
from py_gql._string_utils import dedent
from py_gql.lang import parse
from py_gql.validation import validate_ast
from py_gql.validation.validate import SPECIFIED_RULES, default_validator
def _ensure_list(value):
if isinstance(value, list):
return value
else:
return [va... | [
"c.lirsac@gmail.com"
] | c.lirsac@gmail.com |
c2191030e2543c62287b31ad7e253f8767252f1c | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v9/enums/types/feed_item_quality_approval_status.py | 2b7fc3c81f16e8f0168b1a99e3484c10977c937b | [
"Apache-2.0"
] | permissive | GerhardusM/google-ads-python | 73b275a06e5401e6b951a6cd99af98c247e34aa3 | 676ac5fcb5bec0d9b5897f4c950049dac5647555 | refs/heads/master | 2022-07-06T19:05:50.932553 | 2022-06-17T20:41:17 | 2022-06-17T20:41:17 | 207,535,443 | 0 | 0 | Apache-2.0 | 2019-09-10T10:58:55 | 2019-09-10T10:58:55 | null | UTF-8 | Python | false | false | 1,260 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | [
"noreply@github.com"
] | GerhardusM.noreply@github.com |
a30f1f5184e240fdb168d288874791f7260c7029 | cdbb11473dc8d34767a5916f9f85cb68eb2ca3f2 | /core/helpers.py | a9cf1b2ad8c669f8aac1b940187d7a46adde3660 | [] | no_license | skyride/evestats | fb2a1a248952771731dcfecadab7d02b1f08cd4b | 4bd2153f65c084b478272513733dcc78f9a0ef98 | refs/heads/master | 2020-03-23T13:50:19.216870 | 2018-08-05T19:19:47 | 2018-08-05T19:19:47 | 141,640,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | from sde.models import Type
def generate_breadcrumb_trail(marketgroup):
def recurse(node):
"""Return an list containing the path to this trail"""
if isinstance(node, dict):
return []
elif isinstance(node, Type):
return [*recurse(node.market_group), node]
... | [
"adam.findlay@mercurytide.co.uk"
] | adam.findlay@mercurytide.co.uk |
fa3e65432481dc50669a709c3740fc9753628e14 | 8f0524fc0171e27a15f4cf5fb3fe48ef2053b40e | /leetcode/DP/edit_distance_formula.py | e9141de529dbc4bde7fdefe5cc4713fae1837147 | [] | no_license | MohammedAlewi/competitive-programming | 51514fa04ba03d14f8e00031ee413d6d74df971f | 960da78bfa956cb1cf79a0cd19553af97a2aa0f3 | refs/heads/master | 2023-02-08T20:25:58.279241 | 2023-02-02T00:11:23 | 2023-02-02T00:11:23 | 222,710,225 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | def edit_str(s1,s2,n,m):
if n<0 or m<0:
return max(m,n)+1
elif s1[n]==s2[m]:
return edit_str(s1,s2,n-1,m-1)
else:
return min(edit_str(s1,s2,n-1,m-1),edit_str(s1,s2,n,m-1),edit_str(s1,s2,n-1,m)) +1
print(edit_str("kitten","sitting",5,6)) | [
"rofyalewi@gmail.com"
] | rofyalewi@gmail.com |
aae84273d14923a5fb83bf35b9b0e6a31ea3d1af | a6270537b5c6d924fa6353a8f0328e07c71a0366 | /numbasltiprovider/urls.py | c12994c32a9c81f0df352e00b8c9d1aa5310f5c7 | [
"Apache-2.0"
] | permissive | oscarsiles/numbas-lti-provider | 9b993175a6b6463a974373c7bdb2c9f38b057b89 | ef7080a2593a800a1b9630c746e4f8667e2ec42d | refs/heads/master | 2020-08-20T03:47:54.399198 | 2020-08-05T13:44:16 | 2020-08-05T13:44:16 | 215,979,486 | 0 | 0 | NOASSERTION | 2019-10-18T08:39:09 | 2019-10-18T08:39:09 | null | UTF-8 | Python | false | false | 519 | py | from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('numbas_lti.urls')),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if se... | [
"christianperfect@gmail.com"
] | christianperfect@gmail.com |
2f85952fcbe3b65f4c744f4e3bb7f9549a012652 | cb4cfcece4bc14f591b038adbc7fadccaf447a1d | /ELEVSTRS.py | d84b11ce6e30ca754fe1115b5248d18d884db818 | [] | no_license | psycho-pomp/CodeChef | ba88cc8e15b3e87d39ad0c4665c6892620c09d22 | 881edddded0bc8820d22f42b94b9959fd6912c88 | refs/heads/master | 2023-03-21T06:46:14.455055 | 2021-03-11T12:07:48 | 2021-03-11T12:07:48 | 275,214,989 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | # cook your dish here
from math import sqrt
t=int(input())
for _ in range(t):
n,v1,v2=map(int,input().split())
t1=n/v1
t2=(sqrt(2)*n)/v2
if t2>=t1:
print("Stairs")
else:
print("Elevator")
| [
"noreply@github.com"
] | psycho-pomp.noreply@github.com |
8c7ec1217dd7bc22b88439c1f406972e4f2a9006 | 3bae1ed6460064f997264091aca0f37ac31c1a77 | /apps/cloud_api_generator/generatedServer/tasklets/rack/create/rack_create.py | 3e407f24ace515e0974c5621850b08fc380425ff | [] | no_license | racktivity/ext-pylabs-core | 04d96b80ac1942754257d59e91460c3a141f0a32 | 53d349fa6bee0ccead29afd6676979b44c109a61 | refs/heads/master | 2021-01-22T10:33:18.523799 | 2017-06-08T09:09:28 | 2017-06-08T09:09:28 | 54,314,984 | 0 | 0 | null | 2017-06-08T09:09:29 | 2016-03-20T11:55:01 | Python | UTF-8 | Python | false | false | 174 | py | __author__ = 'aserver'
__tags__ = 'rack', 'create'
__priority__= 3
def main(q, i, params, tags):
params['result'] = ''
def match(q, i, params, tags):
return True
| [
"devnull@localhost"
] | devnull@localhost |
7be5aa773f2e343fd4b8b491a4269fdf9fff5719 | ca609a94fd8ab33cc6606b7b93f3b3ef201813fb | /2017-feb/1.python/5.data-frames.py | 959658216b9ad8cb6baf46f1063d69277bcff50f | [] | no_license | rajesh2win/datascience | fbc87def2a031f83ffceb4b8d7bbc31e8b2397b2 | 27aca9a6c6dcae3800fabdca4e3d76bd47d933e6 | refs/heads/master | 2021-01-20T21:06:12.488996 | 2017-08-01T04:39:07 | 2017-08-01T04:39:07 | 101,746,310 | 1 | 0 | null | 2017-08-29T09:53:49 | 2017-08-29T09:53:49 | null | UTF-8 | Python | false | false | 726 | py | import pandas as pd
col1 = [10,20,30,40]
col2 = ['abc','def','xyz','pqr']
col3 = [0,0,0,0]
#creating data frame
df1 = pd.DataFrame({'pid':col1,
'pname':col2,'survived':col3})
df1.shape
df1.info()
df1.describe()
df1.head(2)
df1.tail()
df1['col4'] = 0
#access frame content by column/columns
df1.pid
df1['pid']
df1[['p... | [
"info@algorithmica.co.in"
] | info@algorithmica.co.in |
0a53f26329b7e8f590b399d677a12e83e6704b2e | 28a124b6a2f22a53af3b6bb754e77af88b4138e1 | /DJANGO/companytodo/reports/migrations/0006_auto_20191209_0121.py | a29feb60b3e3cadd0f868274c2f14a8a99ef6f0e | [] | no_license | mebaysan/LearningKitforBeginners-Python | f7c6668a9978b52cad6cc2b969990d7bbfedc376 | 9e1a47fb14b3d81c5b009b74432902090e213085 | refs/heads/master | 2022-12-21T03:12:19.892857 | 2021-06-22T11:58:27 | 2021-06-22T11:58:27 | 173,840,726 | 18 | 4 | null | 2022-12-10T03:00:22 | 2019-03-04T23:56:27 | Python | UTF-8 | Python | false | false | 350 | py | # Generated by Django 2.2.7 on 2019-12-08 22:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('reports', '0005_auto_20191209_0120'),
]
operations = [
migrations.AlterModelOptions(
name='report',
options={'ordering': ('-... | [
"menesbaysan@gmail.com"
] | menesbaysan@gmail.com |
a81f1658dd871e8e403dcf6b4e512ae458767a2f | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /HBKAGJZ62JkCTgYX3_15.py | 5c5665b4393c00c704f2eb04cb3ee08dfe0d3464 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py |
def last(l,n):
if n>len(l):
return 'invalid'
elif n==0:
return []
else:
return l[len(l)-n:]
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
c0300915f88b4cbb234193be8a08ceb789f7fd55 | c24b28c0dc4ad8f83845f4c61882f1e04d49b5cd | /Plotly_Graphs/Plotly_Introduction/plotly_charts.py | d17cd6a9de3a549f8ebb82ff2712db48bbb76398 | [] | no_license | Coding-with-Adam/Dash-by-Plotly | 759e927759513d96060a770b1e0b0a66db13f54f | 9f178f1d52536efd33827758b741acc4039d8d9b | refs/heads/master | 2023-08-31T17:23:02.029281 | 2023-08-08T05:12:50 | 2023-08-08T05:12:50 | 234,687,337 | 1,293 | 1,822 | null | 2023-07-31T15:47:07 | 2020-01-18T05:36:28 | Jupyter Notebook | UTF-8 | Python | false | false | 370 | py | import pandas as pd
import plotly.express as px
dfb = pd.read_csv("bird-window-collision-death.csv")
df = px.data.tips()
fig = px.pie(dfb, values='Deaths', names='Bldg #', color="Side", hole=0.3)
fig.update_traces(textinfo="label+percent", insidetextfont=dict(color="white"))
fig.update_layout(legend={"itemclick":False... | [
"noreply@github.com"
] | Coding-with-Adam.noreply@github.com |
9ff2f22cb931ef1b4b6f3de6cb5ba468dace744c | ae613a880eecf783ba23e7ca871f9e165ec2ce6e | /calculate_root.py | f6e918aef989a07665376a59101b386c993edc8e | [
"MIT"
] | permissive | h-mayorquin/capacity_code | 52d7e81026cd804677d5a5a6312b434bdff6ed32 | f885f0e409d3f9c54b8e20c902f7ef28584ca8a2 | refs/heads/master | 2020-08-28T00:30:14.760936 | 2020-01-31T17:26:29 | 2020-01-31T17:26:29 | 217,534,700 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,388 | py | import warnings
import pickle
import pandas as pd
import numpy as np
import random
from math import ceil, floor
from copy import deepcopy
from functions import *
warnings.filterwarnings('ignore')
minicolumns = 10
hypercolumns = 5
sequence_length = 2
number_of_sequences = 20
pattern_seed = np.random.randint(0, 20)
de... | [
"h.mayorquin@gmail.com"
] | h.mayorquin@gmail.com |
c1337933143e4be73f495569475dbf98d651bfac | f0b52a3ae5115b9a839d6bd3e765de83ecb21a28 | /Payload_Type/Apollo/mythic/agent_functions/net_localgroup_member.py | 6b2fad53fcf068ef12c142ebdcfed4c9d96d878c | [
"BSD-3-Clause",
"MIT"
] | permissive | bopin2020/Apollo | ad98f1cb872bd2134509df55ee67a79c51e6d316 | 7660439cbc8d4f18af2b564a5b7a0ac4f8f3765a | refs/heads/master | 2023-01-12T23:50:01.266984 | 2020-11-12T07:03:13 | 2020-11-12T07:03:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,699 | py | from CommandBase import *
import json
class NetLocalgroupMemberArguments(TaskArguments):
def __init__(self, command_line):
super().__init__(command_line)
self.args = {
"computer": CommandParameter(name="computer", required=False, type=ParameterType.String, description="Computer to enu... | [
"djhohnstein@gmail.com"
] | djhohnstein@gmail.com |
109e032b250691b3bf5f5ea34a9982e509cbd868 | 3d9825900eb1546de8ad5d13cae893eb0d6a9b14 | /AutoWorkup/SEMTools/setup.py | 94c4428d8e6622b3e676c76f782d87775210107d | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | rtkarcher/BRAINSTools | 20d69f96e6d5ca92adaeb06aa4fe6556b5e7b268 | 961135366450400409cece431423ed480855d34c | refs/heads/master | 2021-01-15T08:53:48.961607 | 2013-06-26T19:09:34 | 2013-06-26T19:09:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('SEMTools', parent_package, top_path)
config.add_data_dir('dif... | [
"hans-johnson@uiowa.edu"
] | hans-johnson@uiowa.edu |
4cecb1fdea73ca9f39f2bdf440f6840a5f57c2f2 | 7aebfaec6957ad67523f1d8851856af88fb997a6 | /catkin_ws/build/robotiq/robotiq_3f_gripper_control/catkin_generated/pkg.develspace.context.pc.py | 472d6f1b90073d4764f3841493bb27694a2f8bfa | [] | no_license | k-makihara/ROS | 918e79e521999085ab628b6bf27ec28a51a8ab87 | 45b60e0488a5ff1e3d8f1ca09bfd191dbf8c0508 | refs/heads/master | 2023-01-28T06:00:55.943392 | 2020-11-26T05:27:16 | 2020-11-26T05:27:16 | 316,127,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 684 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/mslab/catkin_ws/devel/include".split(';') if "/home/mslab/catkin_ws/devel/include" != "" else []
PROJECT_CATKIN_DEPENDS = "controller_manager;diagnostic_updater;dynamic_reconfigure;hardware_inter... | [
"makihara@ms.esys.tsukuba.ac.jp"
] | makihara@ms.esys.tsukuba.ac.jp |
b836ab3184c86a5580190a268a1f5b5241677048 | ef54d37f8a3303013ca7469871a320d303957ed7 | /robo4.2/fusion/tests/wpst_crm/feature_tests/TBIRD/F110_Port_Monitoring/port_monitor_support_module.py | a6deffdae867986fcbebc06b5c2da63aca16ddb9 | [] | no_license | richa92/Jenkin_Regression_Testing | d18badfcf16bda682dfe7bcbbd66f54a9a27a58d | 24a74926170cbdfafa47e972644e2fe5b627d8ff | refs/heads/master | 2020-07-12T10:01:59.099137 | 2019-08-27T12:14:53 | 2019-08-27T12:14:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | '''
This module is used to include some helper function for Port Monitoring
'''
def set_networkuri_lig(data_variable, get_output):
'''
Build the network URI's from the network Name and form the
LIG body
'''
temp = data_variable
for i in range(len(temp['uplinkSets'])):
for j in range(len(temp['uplinkSets'][... | [
"akul@SAC0MKUVCQ.asiapacific.hpqcorp.net"
] | akul@SAC0MKUVCQ.asiapacific.hpqcorp.net |
ebe07b6c084e6824573cbad59b09aeeccd77287e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03130/s063741533.py | 8e8ac571e89e7cbb1f076333c2fcb83f461a3bff | [] | 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 | 1,190 | py | def examA():
N, K = LI()
if (N+1)//2>=K:
print("YES")
else:
print("NO")
return
def examB():
d = [0]*4
for _ in range(3):
a, b = LI()
a -=1; b -=1
d[a] +=1
d[b] +=1
for i in d:
if i>=3 or i==0:
print("NO")
return... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
2b2602042f1ed0d95c722a129a06ec21856cab22 | cc90d98a64693ca4542c999b5d2241b60eb33aac | /Problem62-3.py | e12955f5179fe407cd38b8141c64e187aee5cac8 | [] | no_license | Nan-Do/eulerproject | 1f63b23a4d4e344c8525238b2333920e733b03c9 | d33033d6af10d1aca8f7db9bcf187ef8f6005040 | refs/heads/master | 2021-01-10T15:51:39.594159 | 2016-04-14T05:41:16 | 2016-04-14T05:41:16 | 48,170,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | from itertools import count, permutations
from math import ceil
def gen_cubes():
for n in count(start=1):
yield n ** 3
def is_cube(n):
v = ceil(pow(n, (1/3.)))
return (v ** 3) == n
def check_cube(number, limit):
n_str = str(number)
count = 0
repeated = set()
for n in set(permutati... | [
"icemanf@gmail.com"
] | icemanf@gmail.com |
175cd537ba734aea16b54646d227d7f043eae53f | 3027a838581e2b0778bd6ae40f9a6c72017b3b0d | /loss.py | 84c014beac4352f30db99c0f34f0a9b4f0f3262b | [] | no_license | arthur-qiu/robust | 2617adf3be8ea24592990e66b35123d02b0db045 | 3f40b45a740a1d3f2ba81a18e2cb510fe613d616 | refs/heads/master | 2020-12-04T12:08:52.665675 | 2020-02-26T10:37:34 | 2020-02-26T10:37:34 | 231,758,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,164 | py | import numpy as np
import torch
import torch.nn as nn
import math
import torch.nn.functional as F
def Entropy(input_):
bs = input_.size(0)
epsilon = 1e-5
entropy = -input_ * torch.log(input_ + epsilon)
entropy = torch.sum(entropy, dim=1)
return entropy
def grl_hook(coeff):
def fun1(grad):
... | [
"Arthur"
] | Arthur |
d7feedf3e0f9eec8c5f371d5bd23732533460493 | 5babecf71b6b3c3295219b59bd96e348e1cfaf80 | /singleylinkedlist.py | c5bb94f61e1e34fc34faa6ab4bc6d013e5858183 | [] | no_license | jefinagilbert/dataStructures | 46697a8c1ec5cdb943a1e95e887f6343a85f648b | 04773fc0dff7d18078f3960b0993ce8ab7918a19 | refs/heads/main | 2023-06-12T02:06:24.345124 | 2021-07-10T18:05:44 | 2021-07-10T18:05:44 | 384,760,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,771 | py | class node:
def __init__(self,data):
self.data = data
self.next = None
class linkedlist:
def __init__(self):
self.head = None
def printlinkedlist(self):
temp = self.head
print (temp)
while (temp):
print (temp.data,end=" -> ")... | [
"noreply@github.com"
] | jefinagilbert.noreply@github.com |
271813ce9df854023fe3b6d50c40601bd44a2d32 | b80059648afab4474e567ec1035d63d060d9b3a6 | /src/analyze.py | e18911d2f1160107000f7ce93c5532bf18c7c900 | [
"MIT"
] | permissive | SteemData/classify.steemdata.com | 8b34d7ae9e666b9dfe9930c82dc347650356fb94 | 507d2d537a502701dd6e28c9581c132942084b7a | refs/heads/master | 2021-03-19T05:57:34.360839 | 2017-11-09T22:30:59 | 2017-11-09T22:30:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | import boto3
from easydict import EasyDict as ed
config = ed(
region_name = 'us-west-2',
s3_bucket_name = 'steem-hackaton-input'
)
rkg = boto3.client('rekognition', region_name=config.region_name)
def nsfw(img: bytes):
response = rkg.detect_moderation_labels(
Image={'Bytes': img},
)
retu... | [
"_@furion.me"
] | _@furion.me |
bfa64414e10648e405e89258f858138cfe2bcc91 | f4e21b9a042577400689e83a7ae11c0eee13cecf | /gneiss/regression/tests/test_transformer.py | 3f7aa1cd6eebc62d528cecdf3407afee1faff1f6 | [] | no_license | ebolyen/gneiss | 8facaaffe9904c8641f418fdd1461c1ae447e593 | bb47be8805bf887afcc40b72365b062aa74ff823 | refs/heads/master | 2022-12-21T21:08:09.162341 | 2017-04-21T01:30:10 | 2017-04-21T01:30:10 | 88,930,099 | 0 | 0 | null | 2017-04-21T02:20:16 | 2017-04-21T02:20:16 | null | UTF-8 | Python | false | false | 2,346 | py | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, gneiss development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ------------------------------------------------... | [
"jamietmorton@gmail.com"
] | jamietmorton@gmail.com |
0d37df26911f7aa45fd992907792f711b760b1d3 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/built-in/cv/classification/Gluon_ResNet50_v1d_for_PyTorch/timm/models/layers/involution.py | 97e83500b1f997b67fbd369776d069d277ac3bdb | [
"Apache-2.0",
"MIT",
"CC-BY-NC-4.0",
"GPL-1.0-or-later",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 2,501 | py | # Copyright [yyyy] [name of copyright owner]
# Copyright 2021 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.or... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
a5ae575a5d08b866c988d7daff8b8357e695454b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03148/s977826358.py | 4dcf39217ab9acca14bc5415bf0a46880be55e2c | [] | 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 | 3,165 | py | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
import heapq
class PriorityQueue:
class Reverse:
def __init__(self, val):
self.val = val
def __lt__(self, other):
return self.val > other.val
def __repr_... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6849d2ec9790e047a0e8c225fd2ba62a5fdcdd56 | 3dcfa2980db0770af9b4355b0d5a5e5ef2313c50 | /corpus/exceptions.py | 173d06acf3cf5bd7493cf25b0c6f41cbc47cf052 | [
"CC-BY-NC-2.0",
"CC-BY-NC-4.0",
"Apache-2.0"
] | permissive | looselycoupled/partisan-discourse | 5f4638d984fb54a5add870d4cb59445811c412a1 | 8579924094c92e25e21ce59a26232269cf6b34bc | refs/heads/master | 2020-03-27T06:35:49.627350 | 2018-08-25T18:05:44 | 2018-08-25T18:05:44 | 146,118,079 | 0 | 0 | Apache-2.0 | 2018-08-25T18:02:38 | 2018-08-25T18:02:38 | null | UTF-8 | Python | false | false | 977 | py | # corpus.exceptions
# Custom exceptions for corpus handling.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Mon Jul 18 09:57:26 2016 -0400
#
# Copyright (C) 2016 District Data Labs
# For license information, see LICENSE.txt
#
# ID: exceptions.py [63935bc] benjamin@bengfort.com $
"""
Custo... | [
"benjamin@bengfort.com"
] | benjamin@bengfort.com |
e6abd68ee8891fd33558e2c79ba7b61eeb2bd4b5 | b35aea9f4411f5dc7942392d78dc31bb76c7ec73 | /djangoProject/services/migrations/0004_alter_sub_head.py | 142021ffe6400739d7b16a3cef8ad1787f49ebfd | [] | no_license | ashkanusefi/rondshow | 1079b81704fff55a1d54fa8dee2712ab61e92f4a | 7e5a80fcc6e326b8b1737a54fb53becc4195e475 | refs/heads/master | 2023-09-01T18:45:33.170465 | 2021-09-18T11:24:52 | 2021-09-18T11:24:52 | 407,820,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | # Generated by Django 3.2.5 on 2021-07-13 10:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('services', '0003_alter_sub_head'),
]
operations = [
migrations.AlterField(
model_name='sub',
... | [
"yousefi.ashkan96@gmail.com"
] | yousefi.ashkan96@gmail.com |
ad2cf41e2835382146d98e659562119b73b04000 | 10425fd2f058afb9dd823929314bfede0a4eb513 | /flaskaiohttp_websocket/app.py | 67a5c4b45adbbf95106696a4225673ec018d7153 | [] | no_license | gaozhidf/flask_websocket | 60883571a469a7c283e3da9a8fbf81d752f82f71 | 41653f71b7fd6d07d3592a22a11f29e795ba45d8 | refs/heads/master | 2022-11-29T04:31:08.953294 | 2017-08-12T08:53:24 | 2017-08-12T08:53:24 | 49,828,952 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,060 | py | import json
import asyncio
import aiohttp
from flask import Flask, current_app
from flask_aiohttp import AioHTTP
from flask_aiohttp.helper import async, websocket
app = Flask(__name__)
aio = AioHTTP(app)
@app.route('/echo')
@websocket
def echo():
while True:
msg = yield from aio.ws.receive_msg()
... | [
"gaozhidf@gmail.com"
] | gaozhidf@gmail.com |
5e56cc78a121e1d1b486e6bc4a3fc7a7cd46762b | 2b54b1fb1540ab73d6c83cae3acd5fdd58bdead5 | /Platinum_clusters_Project/final_images/Pt13_O2_DFTsorted/Pt7_3O2_TiO2_101surface_zorderimageplotbasedondepth1.py | 4f1b59995eb2ca8b9bc48aa8fecadced15bc2251 | [] | no_license | sivachiriki/GOFEE_Pt_V_supported | 5787d44294262870075f35f2d31c096021b7ce20 | 6bd700dac1f3e7c58394b758d75246ac6e07eade | refs/heads/master | 2022-04-08T11:38:13.038455 | 2020-03-09T10:48:31 | 2020-03-09T10:48:31 | 226,359,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,837 | py | from __future__ import division
import matplotlib
#matplotlib.use('Agg') # Can also use 'tkagg' or 'webagg'
#from plot_neb_tio2 import *
from matplotlib.offsetbox import TextArea, VPacker, AnnotationBbox
import matplotlib.patches as patches
import matplotlib.pyplot as plt
from ase.io import read, write
from ase.visua... | [
"sivachiriki@phys.au.dk"
] | sivachiriki@phys.au.dk |
3dc1ada00afa0327b9f7befb7328a8b103da9b07 | d7719b7b537a1484228d377d265ebeea8f76748a | /Robot Operating System (ROS)/ROS/Starter Code and Resources/ROS_Minimal_Projects/rospy_minimal_packages/modular_pub_sub/setup.py | f8270eaaf22d1aa84841ec98b72a858c7271b601 | [
"BSD-2-Clause"
] | permissive | OpenSUTD/coding-notes | 9724ac9d35f585ff3140a43c8a10fcdcbaedfc79 | f9b8c778f8494d0bf47bd816cfd77b88e78a5a1f | refs/heads/master | 2022-07-16T22:17:21.930385 | 2019-07-03T10:11:30 | 2019-07-03T10:11:30 | 166,292,417 | 7 | 5 | BSD-2-Clause | 2019-07-03T11:20:16 | 2019-01-17T20:30:47 | C++ | UTF-8 | Python | false | false | 275 | py | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
setup_args = generate_distutils_setup(
packages = ['modular_pub_sub'],
package_dir = {'': 'src'},
install_requires = ['']
)
setup(**setup_args)
| [
"methylDragon@gmail.com"
] | methylDragon@gmail.com |
4f86503e9967ceaa9cb417c55dc2f4ceb6706b4e | a8595670862f9475050abf73399afe34faaa083b | /wb_api/urls.py | f2d8bb64d1f13e51f8b884542b8f6d173580934d | [] | no_license | skiboorg/wb_api | 14392df2da8569212c0ba05e527b46fcd9c30338 | c45d8c340a45958bc6d380c2a431d13d0f1ebf37 | refs/heads/master | 2022-12-06T03:52:58.621255 | 2020-08-26T19:25:24 | 2020-08-26T19:25:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | from django.contrib import admin
from django.urls import path,include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('api-auth/', include('rest_framework.urls')),
path('api/v1/', include('api.urls')),
path('ckeditor/', ... | [
"11@11.11"
] | 11@11.11 |
48217e37537211a9bfd2b671886a356efa6a7a8d | b047a32da65cc0fafe249160f57765ddbe80176e | /apps/support/templatetags/forum.py | 20f193d4a3ba8af04bb65ae72f774e72f6431c3b | [
"MIT"
] | permissive | fengjinqi/website | 0568c679e7964bdbb637831a4f1dec7c5e8d767c | 340eecec49ce0d66cd6a491d0ae9ad23ec9f841b | refs/heads/master | 2023-02-18T10:12:52.158471 | 2023-02-16T08:40:13 | 2023-02-16T08:40:13 | 160,755,540 | 367 | 114 | MIT | 2022-12-08T01:42:40 | 2018-12-07T01:44:34 | Python | UTF-8 | Python | false | false | 1,226 | py | from datetime import datetime
from django.contrib.sessions.models import Session
from django.core.cache import cache
#from apps.forum.views import get_online_count
from apps.support.models import QQ
from apps.forum.models import Forum
from django import template
from django.utils.timezone import now, timedelta
from a... | [
"tarena_feng@126.com"
] | tarena_feng@126.com |
4a98ed5c35bc602fa3cf5522d5f85ab078bbcb92 | 009f9761767f93a2986f8b5a2ba61bac6f33dc59 | /examples/intro/8/example.py | 0fc03bff85a41b5054ceffe6fd6a14aa7ee9e136 | [
"MIT"
] | permissive | crasiak/ginkgo | 8798d28d16732cc1c5b18f8e5df0d17f8866f999 | 2592de2c8acfe6e62f33e7ac1f79cc5613567908 | refs/heads/master | 2021-01-16T20:07:45.269511 | 2012-04-06T07:26:46 | 2012-04-06T07:26:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,345 | py | import gevent
from gevent.pywsgi import WSGIServer
from gevent.server import StreamServer
from gevent.socket import create_connection
from ginkgo.core import Service
class TcpClient(Service):
def __init__(self, address, handler):
self.address = address
self.handler = handler
def do_st... | [
"progrium@gmail.com"
] | progrium@gmail.com |
df8f34cabb73d62adf171eeae4b7788cbdfdf467 | 6db8aba817161dc573f16cde185f4a1c02c753e0 | /XOR.py | 0c07e2db55b43284b1baa73054a707acc0f131b8 | [] | no_license | Prakashchater/Leetcode-array-easy-questions | 456153a13397c895acae6550dad8f1b1851ff854 | 7c5d40f9d68dbf61f4a61a33d9b54f769473b057 | refs/heads/main | 2023-06-19T14:01:52.483440 | 2021-07-22T19:44:40 | 2021-07-22T19:44:40 | 354,926,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | xor = 0
out = []
arr = [10,11,1,2,3]
n = arr[len(arr)-1]
for i in range(len(arr)-1):
out.append(arr[i]^arr[i+1])
out.append(arr[len(arr)-1])
print(out) | [
"prakashchater@gmail.com"
] | prakashchater@gmail.com |
ac7f9a29b1083ff198275d312b01fecad5ed4fc3 | 039446516b188899e2fd21a41087ad20f06d666b | /src/server_code/game_logic.py | 9934157d88fc8ff515d2b4ff8f39a8e5a2c028ab | [] | no_license | Tyorat/TicTacToe | 62ebbeee168568a0c590a5923127a3ac529ba134 | 0281f3c7b293256e2c73ac1530786308cea385af | refs/heads/main | 2023-06-24T22:37:18.744669 | 2021-07-12T23:11:30 | 2021-07-12T23:11:30 | 377,521,858 | 0 | 0 | null | 2021-07-12T23:11:31 | 2021-06-16T14:20:21 | Python | UTF-8 | Python | false | false | 2,001 | py | import secrets
WIN_COMBO = ((1, 2, 3),
(4, 5, 6),
(7, 8, 9),
(1, 4, 7),
(2, 5, 8),
(3, 6, 9),
(1, 5, 9),
(7, 5, 3)
)
SWITCH_TURN = {"x": "o", "o": "x"}
class WrongMove(Exception): pass
class Game:
def __ini... | [
"you@example.com"
] | you@example.com |
c8df91551a44a334be5a4cd94d26220e4cc54a07 | 84e661d5d293ec0c544fedab7727767f01e7ddcf | /target/migrations/0011_auto_20201101_1147.py | 9ca50acaa24915c420cbf92d31354e33dd6cdc7f | [
"BSD-3-Clause"
] | permissive | groundupnews/gu | ea6734fcb9509efc407061e35724dfe8ba056044 | 4c036e79fd735dcb1e5a4f15322cdf87dc015a42 | refs/heads/master | 2023-08-31T13:13:47.178119 | 2023-08-18T11:42:58 | 2023-08-18T11:42:58 | 48,944,009 | 21 | 23 | BSD-3-Clause | 2023-09-14T13:06:42 | 2016-01-03T11:56:48 | JavaScript | UTF-8 | Python | false | false | 882 | py | # Generated by Django 3.0.10 on 2020-11-01 09:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('target', '0010_auto_20201101_1127'),
]
operations = [
migrations.AddField(
model_name='target',
name='tweet_notifie... | [
"nathangeffen@gmail.com"
] | nathangeffen@gmail.com |
4f91db0c179ce5761c01cb598130a254ba26e16f | 1e8d9a251b36f2e80a851d541321522ce4e812fa | /igmspec/scripts/plot_igmspec.py | c3e68e4c64d8f0b820e6ba8daf9c1882d20f2c30 | [] | no_license | Waelthus/igmspec | c81f31360e9528bd150a991ad96b8b4ca94962d0 | 8fdbb622360ca5263711f75d0f7571ed955f6e28 | refs/heads/master | 2020-12-25T21:55:50.001007 | 2016-07-17T21:17:08 | 2016-07-17T21:17:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,154 | py | #!/usr/bin/env python
""" Loads and plots a requested spectrum
"""
import pdb
def parser(options=None):
import argparse
parser = argparse.ArgumentParser(description='plot_igmspec script v0.2')
parser.add_argument("coord", type=str, help="Coordinates, e.g. J081240+320808")
parser.add_argument("--tol... | [
"xavier@ucolick.org"
] | xavier@ucolick.org |
c37ee59446bb0ce436a571312628fce8121b88a8 | 1905e5cece92e6cdc68dac3ebb0ee1d05bef35c8 | /fuzzinator/tracker/base.py | 84de8815bb65c1977f3e473d326d6eed14335b6c | [
"BSD-3-Clause"
] | permissive | darrynza/fuzzinator | e876131d18c5f0a17ae8bdc2fb10f18d8b0084fb | e1642f75ba8c1b555f7e2557b52f43df4d17b89f | refs/heads/master | 2020-04-29T04:39:36.453300 | 2018-12-06T17:15:35 | 2019-01-08T23:36:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | # Copyright (c) 2016-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
class BaseTracker(object):
@property
def logged_in(self)... | [
"reni@inf.u-szeged.hu"
] | reni@inf.u-szeged.hu |
007ee5b8228f8de322122564f9f44722684aa6cf | 87a9706379670da62739b3c1fbbdd75edb5107b8 | /Django/django_celery_test/django_celery_test/celeryconfig.py | cda60c880a754a04fa66f089f2be5f3d6b7e1eed | [] | no_license | zxbzxb180/python_work | ba21ab74f842e0d560a8bb192bb8a874d356b9e1 | 6406024e011aa06d1bda78d97cfecc47f7f2058c | refs/heads/master | 2022-12-12T23:53:36.887963 | 2020-03-04T07:20:29 | 2020-03-04T07:20:29 | 194,494,744 | 0 | 0 | null | 2022-11-22T03:54:47 | 2019-06-30T08:48:44 | Python | UTF-8 | Python | false | false | 854 | py | import djcelery
djcelery.setup_loader()
BROKER_BACKEND = 'redis'
BROKER_URL = 'redis://:6222580@localhost:6379/1'
CELERY_RESULT_BACKEND = 'redis://:6222580@localhost:6379/2'
CELERY_QUEUES = {
'beat_tasks': {
'exchange': 'beat_tasks',
'exchange_type': 'direct',
'binding_key': 'beat_tasks'
... | [
"616529325@qq.com"
] | 616529325@qq.com |
f5baeac0738dfa8508464ce5bcfa5f41ca97435b | 4d343b7e92a44b8c8eb3e3afeeeb0e1a7a699869 | /ch4-practice/books/models.py | feed0423f49f8baba32c13a55d88e9fa25a7ef57 | [] | no_license | dev-iwin/book4-Django-redbook | dfca5395ae68df7536a9e7b64b73b582608b6eaa | 64e0b260b50bae8bd35b918eb341725c3c3373b4 | refs/heads/master | 2023-03-07T05:12:26.990807 | 2021-02-20T21:15:12 | 2021-02-20T21:15:12 | 335,654,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | from django.db import models
# 예제 4-26을 위한 모델 (혼자 만들어 봄) ==========================
class Book(models.Model):
book_name = models.CharField(max_length=300)
pub_date = models.DateTimeField('publication_date')
def __str__(self):
return self.book_name
# ===============================================... | [
"iwinoriwin@gmail.com"
] | iwinoriwin@gmail.com |
be1ff21d8d3789702fd02aa6333e49ef6cfe5047 | cddfa750235344aa5e04244ce5c36871d3c6465b | /mayan/apps/document_states/links.py | f2d41f7e5898b86968e418d4195fb20c1560a36b | [
"Apache-2.0"
] | permissive | Lomascolo/mayan-edms | 76e0fdcad98605838df6737d109c95d67d9ebba5 | f7f0d27a059b1e010b9bbcdf371b9867f6fcfa45 | refs/heads/master | 2021-01-24T08:30:07.480929 | 2017-05-30T06:01:31 | 2017-05-30T06:02:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,176 | py | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from navigation import Link
from .permissions import (
permission_workflow_create, permission_workflow_delete,
permission_workflow_edit, permission_workflow_tools,
permission_workflow_view,
)
link_document_wo... | [
"roberto.rosario.gonzalez@gmail.com"
] | roberto.rosario.gonzalez@gmail.com |
a6066f6913650d57e3ddb4301debeef629944d3d | e97fb7903336837edb6bb3db16ea48512128076e | /22. Database/2. Parameterized/24. RetrieveMultipleRowWhereClauseUserInputDict.py | c2ab4af145f726d2a9c6710e5f457dcc12b68740 | [] | no_license | satyambhatt5/Advance_Python_code | 4081bdb1e80f05161c07f416ebade3907e83f0fd | 58746540285f253699b73aeebd3975911a310deb | refs/heads/master | 2023-05-22T20:10:54.271672 | 2021-06-16T08:55:16 | 2021-06-16T08:55:16 | 377,386,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 684 | py | # Retrieve Multiple Rows WHERE clause - User Input - Dict
import mysql.connector
try:
conn= mysql.connector.connect(
user='root',
password='geek',
host='localhost',
database='pdb',
port=3306
)
if (conn.is_connected()):
print('Connected')
except:
print('Unable to Connect')
sql = 'SELECT * FROM stude... | [
"bhattsatyam793@gmail.com"
] | bhattsatyam793@gmail.com |
e98c9e6e4e8e98f0eb86148a6604600fbb0f969e | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part002645.py | 26c00d84fbe342c060edabef02fe3c69582a4427 | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,821 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.... | [
"franz.bonazzi@gmail.com"
] | franz.bonazzi@gmail.com |
4db5502b3cb8b1723df8a7ac89467e02e213fda7 | d83f50302702d6bf46c266b8117514c6d2e5d863 | /counting-bits.py | f875bfed4d8a2d111f435b9c52cfced316a0c179 | [] | no_license | sfdye/leetcode | 19764a6bdb82de114a2c82986864b1b2210c6d90 | afc686acdda4168f4384e13fb730e17f4bdcd553 | refs/heads/master | 2020-03-20T07:58:52.128062 | 2019-05-05T08:10:41 | 2019-05-05T08:10:41 | 137,295,892 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | class Solution:
def countBits(self, num):
"""
:type num: int
:rtype: List[int]
"""
ones = [0] * (num + 1)
for i in range(1, num + 1):
ones[i] = ones[i & (i - 1)] + 1
return ones
| [
"tsfdye@gmail.com"
] | tsfdye@gmail.com |
4f0d5c22413bdaacf869bf9cbd12d47bcc73f375 | 1dc753d68b234b10193962f58d306bd91957eb6d | /college/college/doctype/student_achievements/student_achievements.py | 66884338ed30206d53469c0ed0ba413e759ab9c7 | [
"MIT"
] | permissive | harshith187/college | e8612134e47c48ad721840f684362f7348e9bad4 | d9ae21734dcde70397aead827e57fbbdcdeb98c9 | refs/heads/master | 2020-07-20T12:36:27.601134 | 2020-05-25T13:53:57 | 2020-05-25T13:53:57 | 206,641,495 | 0 | 4 | NOASSERTION | 2020-05-25T15:05:16 | 2019-09-05T19:27:37 | Python | UTF-8 | Python | false | false | 266 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, mvit ise and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class StudentAchievements(Document):
pass
| [
"frappe@ubuntu.vm"
] | frappe@ubuntu.vm |
7948a9e20dfc18adb728f35ea7d8d4a1387faf1a | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2408/60670/279400.py | 462432fde739ac9f0e437d3408deb95a44e663a4 | [] | 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 | 360 | py | def isPrime(x):
for i in range(2,int(x**0.5)+1):
if x%i!=0:
return False
return True
def factorial(n):
t=1
for i in range(1,n):
t*=i
return t%1000000007
n=int(input())
numOfPrime=0
for i in range(1,n+1):
if isPrime(i):
numOfPrime+=1
print((factorial(numOfPri... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
955a3394f44e953f1a4c30c5c454af78e16f84da | a2477654a0fb85f9507389ff7a4b4a8bcc1641fa | /trydjango1-11/src/restaurants/migrations/0003_auto_20170926_1624.py | 5708b2f804f86a92b2d7213e1dbc4f79de3a24b5 | [] | no_license | ervinpepic/Django-11-Restaurant-app | 6ae1e2dec7571b0180ea991ca80b9b83d00cdb1b | a6bd976130c70621e6149ee64c61e1cdcec2acba | refs/heads/master | 2022-10-18T08:34:11.496044 | 2017-11-25T19:57:36 | 2017-11-25T19:57:36 | 111,400,182 | 0 | 1 | null | 2022-10-10T08:12:45 | 2017-11-20T11:13:00 | Python | UTF-8 | Python | false | false | 416 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-09-26 16:24
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('restaurants', '0002_restaurant_location'),
]
operations = [
migrations.RenameModel(... | [
"ervin.hack@gmail.com"
] | ervin.hack@gmail.com |
85dedc26a7d0b18671e3606cefba8011ec6f33a6 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_156/521.py | ca8aafaec283d6e9fa857be6020a6168166a825e | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,635 | py | #!/usr/bin/python3
import sys
import math
ncases = int(sys.stdin.readline().strip())
for t in range(1, ncases+1):
d = int(sys.stdin.readline().strip())
values = sys.stdin.readline().strip().split()
pancakes = [int(x) for x in values]
pancakes.sort(reverse=True)
best = pancakes[0]
# Node for... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
36815ed5dbc21619f0e347fd9614d4889ea71b0d | bfb882c400956861fccd40bf1fb53cd6ddcba41e | /hagelslag/processing/__init__.py | 947f56449e95c6deffd11da0f81a50f94c71a716 | [
"MIT"
] | permissive | stsaten6/hagelslag | 3b1b07cf424997686b3320c538a188c790232bd7 | 6b7d0779a0b0ac4bd26fbe4931b406fad1ef9f9e | refs/heads/master | 2020-03-10T17:38:44.528943 | 2018-04-12T20:50:38 | 2018-04-12T20:50:38 | 129,504,847 | 2 | 0 | MIT | 2018-04-14T09:58:37 | 2018-04-14T09:58:37 | null | UTF-8 | Python | false | false | 524 | py | from .EnhancedWatershedSegmenter import EnhancedWatershed
from .EnsembleProducts import MachineLearningEnsembleProducts, EnsembleProducts, EnsembleConsensus
from .Hysteresis import Hysteresis
from .ObjectMatcher import ObjectMatcher, TrackMatcher
from .ObjectMatcher import mean_minimum_centroid_distance, centroid_dista... | [
"djgagne@ou.edu"
] | djgagne@ou.edu |
feb3861b0c0a06a508fdf4a0748c05fe0b8f72be | 0f00c8a02e8dc1d8136b2afc92338108f92cc6ae | /recipes/mrbayes/run_test.py | 40033ea2ed9721ad50dfc69b067eccb43cef93ff | [] | no_license | faircloth-lab/conda-recipes | 3714f5be83753261bf3abc70454bdf6b7028c8d6 | 75a520a75a357ea47ee80262f3c3a6dfe1b0715f | refs/heads/master | 2021-01-20T07:07:05.705307 | 2015-06-16T13:50:18 | 2015-06-16T13:50:18 | 12,671,015 | 2 | 6 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2013 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.
Created on 30 December 2013 16:33 PST (-0800)
"""
import unittest
import subprocess
class... | [
"brant@faircloth-lab.org"
] | brant@faircloth-lab.org |
8c49afcd2557458371bc37031be00356b871799d | 092e00ae8389811929a381637b73dcb2303fefeb | /blog/domain/user.py | 338592ec2da4b0e0020f532f84602d13ba2ace07 | [] | no_license | uiandwe/rest_framework_ex | 33cfb73e386785009b1d012a3dfa6909bdc74ab3 | 8130bcf9a6ffd67b91906c85d66ed9d8d453bab8 | refs/heads/master | 2022-11-27T20:56:26.911462 | 2021-10-12T07:46:17 | 2021-10-12T07:46:17 | 234,095,110 | 0 | 0 | null | 2022-11-22T05:17:55 | 2020-01-15T14:12:34 | Python | UTF-8 | Python | false | false | 220 | py | # -*- coding: utf-8 -*-
class User:
def __init__(self, email, username):
self.email = email
self.username = username
def __repr__(self):
return "{}, {}".format(self.email, self.username)
| [
"uiandwe@gmail.com"
] | uiandwe@gmail.com |
291145b4c5ed899fc48d811be2dd62caa2b32b4a | 62e58c051128baef9452e7e0eb0b5a83367add26 | /x12/4010/819004010.py | 23f27f88966ad294e1ec85c55e27af7395e422d6 | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 1,730 | py | from bots.botsconfig import *
from records004010 import recorddefs
syntax = {
'version' : '00403', #version of ISA to send
'functionalgroup' : 'JB',
}
structure = [
{ID: 'ST', MIN: 1, MAX: 1, LEVEL: [
{ID: 'BOS', MIN: 1, MAX: 1},
{ID: 'CUR', MIN: 0, MAX: 1},
... | [
"jason.capriotti@gmail.com"
] | jason.capriotti@gmail.com |
51086a37acacb82ec4da2e56fe316b05793a58d1 | 2335e7d1c10d800abb10b4432465f29a4456548d | /setup.py | 721f1b8d75682c30d9183bd741ff5d826e50db7d | [
"LicenseRef-scancode-warranty-disclaimer",
"EFL-2.0"
] | permissive | deathbybandaid/Sopel-StartupMonologue | 48a7e85ca117c630cf8039af76a0bbaea91ff5a1 | f495344cee379e66ec5022e1e7edf15f075c758c | refs/heads/master | 2020-05-09T11:18:01.564022 | 2019-04-27T14:12:38 | 2019-04-27T14:12:38 | 181,074,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,434 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
from setuptools import setup, find_packages
if __name__ == '__main__':
print('Sopel does not correctly load modules installed with setup.py '
'directly. Please use "pip install .", or add {}/sopel_modules to '
'... | [
"sam@deathbybandaid.net"
] | sam@deathbybandaid.net |
55c13d8cf177119f3b0b4ac0b18bc121cc4f8d62 | f64e31cb76909a6f7fb592ad623e0a94deec25ae | /tests/test_p1494_parallel_courses_ii.py | dbf8cbae087e98cebaed176c651d916aaa595833 | [] | no_license | weak-head/leetcode | 365d635cb985e1d154985188f6728c18cab1f877 | 9a20e1835652f5e6c33ef5c238f622e81f84ca26 | refs/heads/main | 2023-05-11T14:19:58.205709 | 2023-05-05T20:57:13 | 2023-05-05T20:57:13 | 172,853,059 | 0 | 1 | null | 2022-12-09T05:22:32 | 2019-02-27T05:58:54 | Python | UTF-8 | Python | false | false | 1,391 | py | # flake8: noqa: F403, F405
import pytest
from leetcode.p1494_parallel_courses_ii import *
solutions = [
minNumberOfSemesters,
]
test_cases = [
(
[
13,
[
[12, 8],
[2, 4],
[3, 7],
[6, 8],
[11, 8],
... | [
"zinchenko@live.com"
] | zinchenko@live.com |
78e368fb716111fadb4e8ba88e1ddd8e34f363a5 | 98b0d740346ad9aecd228b9a8ebb8e818908ce03 | /hr-1.py | 0d51517045973153f9d6f31c16975b8fb25a1e6b | [] | no_license | alexisbellido/python-examples | 8c63156a2800a584a8aff0909325e38acbe49163 | e6a4f61d9cd18588987430007e28ef036971764b | refs/heads/master | 2022-10-16T08:28:15.312916 | 2022-09-30T15:55:31 | 2022-09-30T15:55:31 | 240,379,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 341 | py | def hi(name):
return f'Hi, {name}'
if __name__ == '__main__':
# people = [input().split() for i in range(int(input()))]
# print(*name_format(people), sep='\n')
####################
people = [
'John',
'Mike',
]
# print(hi(people[0]))
# print(hi(people[1]))
# print(*h... | [
"alexis@ventanazul.com"
] | alexis@ventanazul.com |
9e783b4e701f26b5c214da0138af22e4c3c66562 | f2ac9260dfa7483cd54a30700bb952e10acbc1bb | /fit_lr.py | 27c2ea1089ad19bf4212c6e4d9de0bab81cb012f | [] | no_license | kudkudak/compound-activity-prediction | 94dd9efd2ff7ba5c95ebb71ce1766eb6b8882aac | d55e6ecb4e3de74d40b1a37950449f60df1a2ca4 | refs/heads/master | 2016-09-15T21:35:54.930142 | 2015-01-14T13:09:19 | 2015-01-14T13:09:19 | 27,130,096 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,056 | py | from misc.utils import *
from misc.experiment_utils import get_exp_options, print_exp_header, \
save_exp, get_exp_logger, generate_configs, print_exp_name
from data_api import prepare_experiment_data, prepare_experiment_data_embedded, get_raw_training_data
from sklearn.metrics import matthews_corrcoef, accuracy_sc... | [
"staszek.jastrzebski@gmail.com"
] | staszek.jastrzebski@gmail.com |
4fafdb60d2714fc699c55d2ce9bc473bfcffb686 | b3b68efa404a7034f0d5a1c10b281ef721f8321a | /Scripts/simulation/situations/complex/university_mixer_situation.py | bdd94a7c82a8c319385d8ae99bf8517a96e6a57b | [
"Apache-2.0"
] | permissive | velocist/TS4CheatsInfo | 62195f3333076c148b2a59f926c9fb5202f1c6fb | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | refs/heads/main | 2023-03-08T01:57:39.879485 | 2021-02-13T21:27:38 | 2021-02-13T21:27:38 | 337,543,310 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,087 | py | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\situations\complex\university_mixer_situation.py
# Compiled at: 2019-10-19 01:32:53
# Size of source... | [
"cristina.caballero2406@gmail.com"
] | cristina.caballero2406@gmail.com |
2a6ed3ab36186dc4b2907c6eccfff147841622dd | bc28f8fe941caf281261afa1641868e743ecb5ab | /Google_APAC_Round_E/Beautiful_Numbers/Beautiful_Numbers.py | 07ce6d570af05b0e1e80e6cd90d4524fcd142a89 | [] | no_license | anubhavshrimal/CompetitiveProgrammingInPython | 9fc6949fb3cd715cfa8544c17a63ffbe52677b37 | 2692c446d49ec62d4967ed78a7973400db7ce981 | refs/heads/master | 2021-07-05T08:17:15.182154 | 2018-05-29T02:26:25 | 2018-05-29T02:26:25 | 60,554,340 | 7 | 6 | null | 2021-05-24T17:46:16 | 2016-06-06T19:18:27 | Python | UTF-8 | Python | false | false | 465 | py | import numpy as np
test = int(input())
for t in range(1, test+1):
num = int(input())
n1, n2 = abs(np.roots([1, 1, -(num-1)]))
if int(n1) != n1 or int(n2)!= n2:
ans = num-1
else:
if n1 == 1 or n1 == -1:
ans = n2
elif n2 == 1 or n2 == -1:
ans = n1
... | [
"anubhavshrimal@gmail.com"
] | anubhavshrimal@gmail.com |
7054d92c14a1e6c568fc15281f3341cce89ae817 | 4c2136ab05913beba890b4127c2f608be4798ed2 | /(0, '')/py/fc_session.py | 751c6d3892c8e00fd0baf22a85673c65224e1427 | [] | no_license | Dyutee/test | 345adcd1769cba0f468090bcc311f4d379ea5f1e | b8b3718922bafbac1bad3802f6c885d777e1bb08 | refs/heads/master | 2021-01-12T04:19:45.511927 | 2016-12-29T07:25:29 | 2016-12-29T07:25:29 | 77,588,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,517 | py | #!/usr/bin/python
import cgitb, sys, header, common_methods
cgitb.enable()
sys.path.append('/var/nasexe/storage')
import storage_op
import sys,os
from lvm_infos import *
from functions import *
import san_disk_funs
check_fc = san_disk_funs.fc_target_status();
fc_target=san_disk_funs.fc_list_targets()
fc_ip = ''
ses ... | [
"dyuteemoy46@gmail.com"
] | dyuteemoy46@gmail.com |
d3c0c2a4b226f7e7de023845098715c9f079029c | 6484cdf98189f5f5736950c81a9d8d30e0f0c0db | /notifications/serializers.py | 488db18520ad943f4fc0b50ec121588e37fe25bd | [] | no_license | AlexFrundin/great_app_example | e0e9c91f06bfba76058f3af5b113a9399945bf6c | 23225e7e88f2ee51359d23cac2200b32b8bd6e20 | refs/heads/main | 2023-05-30T15:02:22.035811 | 2021-06-17T06:40:06 | 2021-06-17T06:40:06 | 339,434,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | from rest_framework import serializers
from .models import Notification
# This class is use for serialize the data of user profile details
class NoitifcationListSerializer(serializers.ModelSerializer):
created_on = serializers.DateTimeField(format="%d %b %Y")
class Meta:
model = Notification
... | [
"aleksey.frundin@gmail.com"
] | aleksey.frundin@gmail.com |
0a6a1c337560a7be7affe868a65af85fb574f072 | 15581a76b36eab6062e71d4e5641cdfaf768b697 | /LeetCode_30days_challenge/2021/February/Peeking Iterator.py | 1c47322e8ae397e80fa7c43ca73eea44f3a2c292 | [] | no_license | MarianDanaila/Competitive-Programming | dd61298cc02ca3556ebc3394e8d635b57f58b4d2 | 3c5a662e931a5aa1934fba74b249bce65a5d75e2 | refs/heads/master | 2023-05-25T20:03:18.468713 | 2023-05-16T21:45:08 | 2023-05-16T21:45:08 | 254,296,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,642 | py | # Below is the interface for Iterator, which is already defined for you.
#
# class Iterator:
# def __init__(self, nums):
# """
# Initializes an iterator object to the beginning of a list.
# :type nums: List[int]
# """
#
# def hasNext(self):
# """
# Returns true if... | [
"mariandanaila01@gmail.com"
] | mariandanaila01@gmail.com |
050fbf37649611034d2d17fa1d8f6eaaec527045 | 99b784550a6d306147c022c8d829800b0fbb8c68 | /Part_1_Basics/Chapter_9_Classes/number_served.py | c4bf3cff3db3a73bcf0555f68427754403f58a40 | [] | no_license | apuya/python_crash_course | 116d6598f656d8fed0b4184edbce8e996cd0f564 | 0b2e8a6e9849a198cfb251706500a919d6f51fe7 | refs/heads/main | 2023-06-03T22:41:03.203889 | 2021-06-16T04:07:28 | 2021-06-16T04:07:28 | 367,812,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,282 | py | # Python Crash Course: A Hands-On, Project-Based Introduction To Programming
#
# Name: Mark Lester Apuya
# Date: 06/12/2021
#
# Chapter 9: Classes
#
# Exercise 9.4 Number Served:
# Start with your program from Exercise 9-1 (page 162). Add an attribute
# called number_served with a default value of 0. Create an insta... | [
"contact@mapuya.com"
] | contact@mapuya.com |
b91cb3c12a2949a4360518e9abecbc11298c03dd | 230b7714d61bbbc9a75dd9adc487706dffbf301e | /third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/environment.py | 2493f1fa4407a39aad3ac3c2a724322b75b0944a | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-w3c-03-bsd-license"
] | permissive | byte4byte/cloudretro | efe4f8275f267e553ba82068c91ed801d02637a7 | 4d6e047d4726c1d3d1d119dfb55c8b0f29f6b39a | refs/heads/master | 2023-02-22T02:59:29.357795 | 2021-01-25T02:32:24 | 2021-01-25T02:32:24 | 197,294,750 | 1 | 2 | BSD-3-Clause | 2019-09-11T19:35:45 | 2019-07-17T01:48:48 | null | UTF-8 | Python | false | false | 8,027 | py | import json
import os
import multiprocessing
import signal
import socket
import sys
import time
from mozlog import get_default_logger, handlers, proxy
from .wptlogging import LogLevelRewriter
here = os.path.split(__file__)[0]
repo_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir, os.pardir))
sys.path.... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
242f80c5d1c207d66d4fd11b8d495d63cf4a6543 | 4b2c5fe21ffcc35837bba06d2c3b43c5116f74bd | /Bit++.py | b021896ca96ab26196e29a12c95ef313ebda47fc | [] | no_license | joydas65/Codeforces-Problems | 8870cbbf1db9fa12b961cee7aaef60960af714ae | eb0f5877d0fede95af18694278029add7385973d | refs/heads/master | 2023-06-23T07:16:49.151676 | 2023-06-17T07:28:24 | 2023-06-17T07:28:24 | 184,123,514 | 5 | 1 | null | 2020-11-28T07:28:03 | 2019-04-29T18:33:23 | Python | UTF-8 | Python | false | false | 212 | py | ans = 0
for _ in range(int(input())):
s = input()
if s[0] == '+' or '+' in s:
ans += 1
elif s[0] == '-' or '-' in s:
ans -= 1
print(ans)
| [
"noreply@github.com"
] | joydas65.noreply@github.com |
20eb7196fe3b002591b7b276815778936aebeb54 | 4eb76ddbe2bf6d7fb8ee791dcaa1dfaccd4a09b0 | /jitai/events/EventTemplate.py | e85c491ebb1b21082dabbe5b4fef53d7216dc3b1 | [] | no_license | koike-ya/research | 3cae0be17a8871d5782842510676c05a75627c49 | 3ff99c56c8e5d6c57ee65f1bca2431f3dc6f6593 | refs/heads/master | 2021-10-12T03:13:20.645738 | 2019-01-26T07:12:58 | 2019-01-26T07:12:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,138 | py | from abc import ABC
from datetime import datetime, timedelta
import pandas as pd
from jitai.src.utils import set_hour_minute
class EventTemplate(ABC):
def __init__(self, param, user_info, ema, logger):
self.param = param
self.ema = ema
self.name = param["condition_name"]
self.ema_... | [
"makeffort134@gmail.com"
] | makeffort134@gmail.com |
2527f4d9fd54b3e27de63af10a0a6823676bffc5 | 8f63cf27e69bc44dcd11e63a0c396b398443009b | /tests/unit/util/iterables.py | 454eaf3914e1ade640b62d055b97606ada1ab216 | [
"MIT"
] | permissive | ethanjli/phylline | fae756dbbead0351dd11c770158a1aa08fa363d2 | f11307d0f37ca835996250e1e835c44abd282769 | refs/heads/master | 2021-01-01T23:56:41.018911 | 2020-02-25T05:07:34 | 2020-02-25T05:07:34 | 239,400,454 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,382 | py | """Test the util.iterables module."""
# Builtins
# Packages
from phylline.util.iterables import make_collection, remove_none
def test_make_collection_singleton():
"""Test whether the make_collection function makes collections from singletons."""
assert make_collection(42) != 42
assert make_collection(4... | [
"lietk12@gmail.com"
] | lietk12@gmail.com |
b86f37f64be3a4a6a783e0cc8de77ab087a399bf | 4b360696d512a35b2114c482c658d10e3ff91a2c | /project-addons/mail_ph/models/__init__.py | 94a375f2116535169a7287ca79e29be1a3feb530 | [] | no_license | Comunitea/CMNT_010_15_PHA | 24ecf3be6a50441dfa3dd8deca4ee96ac5e61970 | d4a24aafba48fc7dda7ee662e0c7e1112c220162 | refs/heads/master | 2022-08-12T00:39:24.464028 | 2022-07-11T10:30:30 | 2022-07-11T10:31:31 | 37,918,119 | 0 | 1 | null | 2015-12-02T12:39:43 | 2015-06-23T12:37:45 | Python | UTF-8 | Python | false | false | 256 | py | # -*- coding: utf-8 -*-
# © 2020 Pharmadus I.T.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import res_partner, sale_order, purchase_order, hr_holidays, \
account_invoice, res_company, stock, mail_compose_message, mail_mail | [
"oscar.salvador@pharmadus.com"
] | oscar.salvador@pharmadus.com |
68e9badb63dfa7f93aed88ca630799e3a43f8ee8 | bb24d8a7f71206fac23ebef0d53f94918d7aa32d | /mymusic/migrations/0005_album_image_url.py | 2818a2cbf76e1a6e207e5a6e7dae1d783a693bd1 | [] | no_license | momentum-morehouse/django-music-bettinacjohnson | ec3311b41df1c3c09a3993fb476c06d715a87405 | c52f24d2f9faec73b0cad4139ebfe002bd819766 | refs/heads/master | 2022-11-27T02:04:49.847168 | 2020-07-16T23:46:13 | 2020-07-16T23:46:13 | 279,333,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | # Generated by Django 3.0.8 on 2020-07-15 20:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mymusic', '0004_auto_20200714_1510'),
]
operations = [
migrations.AddField(
model_name='album',
name='image_url',
... | [
"replituser@example.com"
] | replituser@example.com |
88e16d0fac13e4e9eee8c7bea8b9fa71c55ddd68 | 9c2edc273db48dcb6d31a937510476b7c0b0cc61 | /cython_sample/setup.py | aee60680780e7c7437d6abd35f1504bd902ef425 | [] | no_license | miyamotok0105/python_sample | 4d397ac8a3a723c0789c4c3e568f3319dd754501 | 77101c981bf4f725acd20c9f4c4891b29fbaea61 | refs/heads/master | 2022-12-19T22:53:44.949782 | 2020-05-05T05:09:22 | 2020-05-05T05:09:22 | 81,720,469 | 1 | 0 | null | 2022-11-22T02:22:55 | 2017-02-12T11:15:08 | Jupyter Notebook | UTF-8 | Python | false | false | 731 | py | #! -*- coding: utf-8 -*-
#python setup.py build_ext --inplace
from Cython.Build import cythonize
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy as np
try:
numpy_include = np.get_include()
except AttributeError:
numpy_include = np.... | [
"miyamotok0105@gmail.com"
] | miyamotok0105@gmail.com |
60d34638bc1a71aec3b30bdb71943672f3a6594b | 88ed6ed99589f7fb8e49aeb6c15bf0d51fe14a01 | /026_removeDuplicates.py | 5e8dbfc5edb96029cb37d413ce206813159f712a | [] | no_license | ryeLearnMore/LeetCode | 3e97becb06ca2cf4ec15c43f77447b6ac2a061c6 | 04ec1eb720474a87a2995938743f05e7ad5e66e3 | refs/heads/master | 2020-04-07T19:02:43.171691 | 2019-06-23T15:09:19 | 2019-06-23T15:09:19 | 158,634,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | #!/usr/bin/env python
#coding:utf-8
#@author: rye
#@time: 2019/2/18 17:15
'''
很快就写完了。。。算是最近写题最快的一个
'''
class Solution:
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
i = 0
j = 0
while j < len(nums):
if... | [
"noreply@github.com"
] | ryeLearnMore.noreply@github.com |
7ac450e80d74815ef7401aa056f3feb1952628a3 | 853d4cec42071b76a80be38c58ffe0fbf9b9dc34 | /venv/Lib/site-packages/pandas/tests/series/test_duplicates.py | 6577b3e54b7b981a4d18a17b1a5eb28849a224fe | [] | no_license | msainTesting/TwitterAnalysis | 5e1646dbf40badf887a86e125ef30a9edaa622a4 | b1204346508ba3e3922a52380ead5a8f7079726b | refs/heads/main | 2023-08-28T08:29:28.924620 | 2021-11-04T12:36:30 | 2021-11-04T12:36:30 | 424,242,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,717 | py | import numpy as np
import pytest
from pandas import Categorical, Series
import pandas.util.testing as tm
def test_value_counts_nunique():
# basics.rst doc example
series = Series(np.random.randn(500))
series[20:500] = np.nan
series[10:20] = 5000
result = series.nunique()
assert r... | [
"msaineti@icloud.com"
] | msaineti@icloud.com |
c019e47f0ff83cf6dcdb0d544128652acf3ae52c | 0cf6728548830b42c60e37ea1c38b54d0e019ddd | /Learning_MachineLearning/DeepLearningWithPython/5.3.py | 0f1e218f44d0b1287be5fb399e830a0c97bf75a1 | [] | no_license | MuSaCN/PythonLearning | 8efe166f66f2bd020d00b479421878d91f580298 | 507f1d82a9228d0209c416626566cf390e1cf758 | refs/heads/master | 2022-11-11T09:13:08.863712 | 2022-11-08T04:20:09 | 2022-11-08T04:20:09 | 299,617,217 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,734 | py | # Author:Zhang Yuan
from MyPackage import *
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import seaborn as sns
import statsmodels.api as sm
from scipy import stats
#------------------------------------------------------------
__mypath__ = MyPath.MyClass_Pa... | [
"39754824+MuSaCN@users.noreply.github.com"
] | 39754824+MuSaCN@users.noreply.github.com |
fd7663c74ab7441e0d5e4e98c3e5a02023c432b6 | 48983b88ebd7a81bfeba7abd6f45d6462adc0385 | /HakerRank/data_structures/trees/tree_top_view.py | 54610fe4a1f57e64ca716708d368bed09f4c0f84 | [] | no_license | lozdan/oj | c6366f450bb6fed5afbaa5573c7091adffb4fa4f | 79007879c5a3976da1e4713947312508adef2e89 | refs/heads/master | 2018-09-24T01:29:49.447076 | 2018-06-19T14:33:37 | 2018-06-19T14:33:37 | 109,335,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | # author: Daniel Lozano
# source: HackerRank ( https://www.hackerrank.com )
# problem name: Data Structures: Trees: Top View
# problem url: https://www.hackerrank.com/challenges/tree-top-view/problem
def topView(root):
instance = root
if not root:
return
answer = [instance.data]
while instance.... | [
"lozanodaniel02@gmail.com"
] | lozanodaniel02@gmail.com |
314ea5491f976610601bc93def87970f19fa13e6 | 33e006f5ae711d44d796a0e3ca384caefe1ec299 | /Wprowadzenie do algorytmow - ksiazka/rozdzial 2/2.1-2.py | 1919575e88d14a8d51ece544f7292e484a60b267 | [] | no_license | Cozoob/Algorithms_and_data_structures | 959b188f8cef3e6b7b1fd2a6c45a5e169d8f41fe | f786a397964f71e2938d9fd6268d3428e3ed7992 | refs/heads/main | 2023-08-05T02:23:43.565651 | 2021-09-17T10:52:14 | 2021-09-17T10:52:14 | 407,532,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | # Zmodyfikuj INSERTION_SORT tak zeby sortowala w porzadku nierosnacym
def insertion_sort(A):
for j in range(1, len(A)):
key = A[j]
# Wstaw A[j] w posortowany ciąg A[1,...,j-1]
i = j - 1
while i >= 0 and A[i] < key:
A[i + 1] = A[i]
i -= 1
A[i +... | [
"kozubmarcin10@gmail.com"
] | kozubmarcin10@gmail.com |
c62c4a9af1d76050479aa8b61113b12aa938d298 | 9187131d6a06e4a2cd56a0eb6d20604b38ea2359 | /apitest/tp/mail/test_case/page_object/mail_page.py | fd5073f7bbd54dfe0c0487251a04d2b334badf62 | [] | no_license | hikaruwin/hikaru | 0dc75843047c01023327854798fbf4999e710f57 | 1675192d4584609bb1f678c2e5a82c06915ab25e | refs/heads/master | 2020-03-27T23:33:14.958007 | 2018-09-04T10:29:40 | 2018-09-04T10:29:40 | 147,327,361 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | # coding: utf-8
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from time import sleep
from .base import Base
class MailPage(Base):
url = '/'
login_success_user_loc = (By.ID, 'spnUid')
def login_success_user(self):
return self.find_elem... | [
"your email"
] | your email |
1c8bcdf2d99bd5630809fedcd85b30f4ca5af1d3 | b61b0a5333814779669320532233ee75327f039f | /xls_proc.py | 2b62ee064f9f7d001f18b164b612cead6498106d | [] | no_license | marine0131/attendance_calc | 75f6d387e336dfd7ff22fcde5bcb13c96a87c810 | e991f30ba7ff88474b2135315b12f360d52ee726 | refs/heads/master | 2020-03-26T07:52:31.226713 | 2018-08-14T08:37:25 | 2018-08-14T08:37:25 | 144,675,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,994 | py | #! /usr/bin/env python
import xlrd
import xlwt
import re
import datetime
import json
with open("config.txt", 'r') as f:
params = json.load(f)
FILE = params["FILE"]
MONTH = params['MONTH']
ON_WORK_TIME = params['ON_WORK_TIME']
LUNCH_TIME = params['LUNCH_TIME']
REST_TIME = params['REST_TIME']
AFTERNOON_WORK_TIME =... | [
"wanghj@woosiyuan.com"
] | wanghj@woosiyuan.com |
580d3bab5161c2089c9b1c92b66b2465fd94ddb9 | 3e24611b7315b5ad588b2128570f1341b9c968e8 | /pacbiolib/thirdparty/pythonpkgs/scipy/scipy_0.9.0+pbi86/lib/python2.7/site-packages/scipy/linalg/interface_gen.py | aed22b2164e1399c612a6bd8fd85ad35866e808f | [
"BSD-2-Clause"
] | permissive | bioCKO/lpp_Script | dc327be88c7d12243e25557f7da68d963917aa90 | 0cb2eedb48d4afa25abc2ed7231eb1fdd9baecc2 | refs/heads/master | 2022-02-27T12:35:05.979231 | 2019-08-27T05:56:33 | 2019-08-27T05:56:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,791 | py | #! python
import os
import re
from distutils.dir_util import mkpath
def all_subroutines(interface_in):
# remove comments
comment_block_exp = re.compile(r'/\*(?:\s|.)*?\*/')
subroutine_exp = re.compile(r'subroutine (?:\s|.)*?end subroutine.*')
function_exp = re.compile(r'function (?:\s|.)*?end function... | [
"409511038@qq.com"
] | 409511038@qq.com |
013c1d369981d94c454a38a281f78ed4f54d4b91 | 5f86944bdf1b810a84c63adc6ed01bbb48d2c59a | /kubernetes/test/test_settings_api.py | e266034720dee9676cdc5fb197e1b837aaa3f470 | [
"Apache-2.0"
] | permissive | m4ttshaw/client-python | 384c721ba57b7ccc824d5eca25834d0288b211e2 | 4eac56a8b65d56eb23d738ceb90d3afb6dbd96c1 | refs/heads/master | 2021-01-13T06:05:51.564765 | 2017-06-21T08:31:03 | 2017-06-21T08:31:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | [
"mehdy@google.com"
] | mehdy@google.com |
6a5f99fc2d8fd1c5ad7da2f097eecb0cf51bf7cf | 0ba2c3776618b5b8b76f4a23f21e9c6ad3f6e2e1 | /afterclass/homework1/007_1.py | 98e2ac33076dbf3ab283e7a973e4e7a0a135d6f8 | [] | no_license | WangDongDong1234/python_code | 6dc5ce8210b1dcad7d57320c9e1946fd4b3fe302 | 6a785306a92d328a0d1427446ca773a9803d4cc0 | refs/heads/master | 2020-04-15T12:35:03.427589 | 2019-09-16T15:38:25 | 2019-09-16T15:38:25 | 164,681,323 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,826 | py | #list记录以i为分段点的最长增长子序列的个数
#返回最大分段点的坐标
def Max(list,n):
max=0
index=0;
for i in range(0,n):
if list[i]>max:
max=list[i]
index=i
return index;
def LIS(array,len,list,list_increase):
# list记录以i为分段点的最长增长子序列的个数
for i in range(0,len):
list.append(1)
list... | [
"827495316@qq.com"
] | 827495316@qq.com |
35b823ee571526aabe931d1cf528fedc446c7de5 | 55e9f3b00fc2e488597bab5225ed321c86efbd4b | /sdk/test/test_frequency_response.py | 8e97d49e14aa132ed3efe4ee80569106b6d29d8d | [
"MIT"
] | permissive | bs-yapily/yapily-sdk-python | ad9d04c28f3d744830734c3444c1cef8215206fd | 0bba45e351b674eb655425a51190f539c4e9896f | refs/heads/master | 2020-08-26T17:18:53.156429 | 2019-10-22T11:01:16 | 2019-10-22T11:01:16 | 217,085,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 965 | py | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
OpenAPI spec version: 0.0.155
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __fu... | [
"systems@yapily.com"
] | systems@yapily.com |
2eb15e7a7809dccc58b91240a1a0bdbde8f2ea7a | 162e0e4791188bd44f6ce5225ff3b1f0b1aa0b0d | /examples/linear_model/plot_logistic_l1_l2_sparsity.py | afccba025af1f2bb50d6e3b57e30535232120bfa | [] | no_license | testsleeekGithub/trex | 2af21fa95f9372f153dbe91941a93937480f4e2f | 9d27a9b44d814ede3996a37365d63814214260ae | refs/heads/master | 2020-08-01T11:47:43.926750 | 2019-11-06T06:47:19 | 2019-11-06T06:47:19 | 210,987,245 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,328 | py | """
==============================================
L1 Penalty and Sparsity in Logistic Regression
==============================================
Comparison of the sparsity (percentage of zero coefficients) of solutions when
L1, L2 and Elastic-Net penalty are used for different values of C. We can see
that large values... | [
"shkolanovaya@gmail.com"
] | shkolanovaya@gmail.com |
71e8829afac3e0a0c65027c407736ec43eeb6262 | 0cba5529e387ba0f077b4e8ddeb96f914004f5df | /malaya/emotion.py | dcd419468d7b3fce6dc88b499f1cc790ea1925c7 | [
"MIT"
] | permissive | AsyrafAzlan/Malaya | dc78398ee6880578f40c5646a48882a5913217ae | 3d5166173cf74881f7a56fffaaf391813c55d4f1 | refs/heads/master | 2021-05-21T22:47:41.863857 | 2020-04-03T15:00:21 | 2020-04-03T15:00:21 | 252,841,526 | 1 | 0 | MIT | 2020-04-03T21:04:44 | 2020-04-03T21:04:44 | null | UTF-8 | Python | false | false | 1,861 | py | from malaya.supervised import softmax
from malaya.path import PATH_EMOTION, S3_PATH_EMOTION
from herpetologist import check_type
_emotion_label = ['anger', 'fear', 'joy', 'love', 'sadness', 'surprise']
_availability = [
'bert',
'tiny-bert',
'albert',
'tiny-albert',
'xlnet',
'alxlnet',
]
def a... | [
"husein.zol05@gmail.com"
] | husein.zol05@gmail.com |
f68c22a3ebcff8045d9ad3131f9b30a050725a36 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_filthiness.py | d1e4e34d83d291300555681e0bf38feb72c2e796 | [
"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 | 319 | py |
#calss header
class _FILTHINESS():
def __init__(self,):
self.name = "FILTHINESS"
self.definitions = [u'the quality of being very dirty']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns'
def run(self, obj1 = [], obj2 = []):
return self.jsondata
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
b033e8f0b13e41e324b11e403739c993c52bbe7e | a4a01e251b194f6d3c6654a2947a33fec2c03e80 | /PythonWeb/Ajax/1809/Day02/1808/AjaxDemo02/run01.py | 35ac2bfbdbdab18d5da55f05332beae995cd1c85 | [] | no_license | demo112/1809 | 033019043e2e95ebc637b40eaf11c76bfd089626 | e22972229e5e7831dce2aae0b53ce19a6e3bb106 | refs/heads/master | 2020-04-09T07:10:49.906231 | 2019-02-27T13:08:45 | 2019-02-27T13:08:45 | 160,143,869 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,861 | py | from flask import Flask, render_template, request
from flask_sqlalchemy import SQLAlchemy
import json
import pymysql
pymysql.install_as_MySQLdb()
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI']="mysql://root:123456@localhost:3306/flask"
db = SQLAlchemy(app)
class Login(db.Model):
__tablename__ = "logi... | [
"huafengdongji@hotmail.com"
] | huafengdongji@hotmail.com |
35e5326d1aad1c103b3e76b9efefdd92864a2926 | 45edff14271724c5bf27e62e96eeb635840eae22 | /ML/ensemble_learning/util.py | d998161fe6c0a48ae7207841cc63d1e0147b0db8 | [] | no_license | DaiJitao/machine_learning | 1e41208dc94836a97e57a4b0f5778f8da2bb81d4 | 49e1db9ecbfbf886a11ce416eea402d214cf2049 | refs/heads/master | 2021-06-25T23:52:06.066315 | 2021-02-07T16:17:50 | 2021-02-07T16:17:50 | 209,712,507 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 347 | py |
"""
决策树常用的工具类:指标的计算、数据的加载
"""
import numpy as np
def load_data():
'''
根据《统计学习方法》第八章8.1.3产生数据.
:return:
'''
dataset_label = np.array([[0, 1], [1, 1], [2, 1], [3, -1], [4, -1], [5, -1], [6, 1], [7, 1], [8, 1], [9, -1]])
return dataset_label
| [
"hejinrong@news.cn"
] | hejinrong@news.cn |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.