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
8f36eab7e9317370fbed4d199e089a935148128b
6fdf0ad8a70cfe666ab1cae331ddf751178b0f34
/Python/Arrays/problem_1051. Height Checker.py
679788265b355852106eb65beff9440a8fd1ef24
[]
no_license
vigneshthiagarajan/Leetcode_prep
3aa46f90af084d6100cd61af28767e811c848d4e
1f087564e9b68f85d9974c3643538b8370ba82e3
refs/heads/main
2023-06-19T06:47:00.388621
2021-07-12T04:54:32
2021-07-12T04:54:32
356,921,259
0
0
null
null
null
null
UTF-8
Python
false
false
314
py
class Solution: def heightChecker(self, heights: List[int]) -> int: num_indices_mismatch = 0 expected_heights = sorted(heights) for i in range(len(heights)): if heights[i] != expected_heights[i]: num_indices_mismatch += 1 return num_indices_mismatch
48ab5771787957eeb1c9c69b7eb86c08eda031ee
9378f00e13fa41b41cad1bb4dc733bcb46f259ef
/python/scripts/classifiers/SVM.py
05f35e4215ce796d9c424c42db6bcd0505515469
[]
no_license
ghpaetzold/iconic-internship
0ac55c6e5289b569af2eb627a9e7025e0b9e9914
463f562dd1f3bdcb85954604ef2364ee5dcbef8e
refs/heads/master
2021-01-10T19:12:19.713265
2015-07-21T15:46:02
2015-07-21T15:46:02
37,980,885
0
0
null
null
null
null
UTF-8
Python
false
false
1,281
py
from sklearn import svm import sys, numpy, pickle from sklearn.preprocessing import normalize from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import f_classif def readXY(xf, yf): X = [] for line in open(xf): values = [float(v) for v in line.strip().split('\t')] X.append(values) ...
8be72ee78cc9d7e1cf6795076617cef99ea05d82
7cebfa2066e679e19993a5507e59d1979df3d4a8
/1_Basics/DataScienceAssignments/basicSearchEngine.py
eb134571d3ebac8f6c093cf7fa05c155bc04fe29
[ "Apache-2.0" ]
permissive
Arunken/PythonScripts
833e9e43ccb29234a206027f1cda1d978718d5eb
702d0a3af7a9be3311f9da0afc5285d453f15484
refs/heads/master
2022-12-24T18:50:43.672779
2021-05-13T11:31:51
2021-05-13T11:31:51
237,631,027
0
0
Apache-2.0
2022-12-08T00:47:45
2020-02-01T15:01:20
Python
UTF-8
Python
false
false
3,737
py
# -*- coding: utf-8 -*- """ Created on Mon May 28 13:17:19 2018 @author: SilverDoe """ import urllib import collections def get_page(url): #return page html from url try: return [url,urllib.urlopen(url).read()] except: return [url,""] def get_next_url(page): #goes through pa...
23d6e34bbac69811382efe75a0eaa6ccf8ac50e0
635c9f0501039f5a099849a3108e19de76092aea
/algorithm/ssafy_190325/부분집합합.py
a2aa237ea48bc4c554fc9fbb279759c67273b26f
[]
no_license
Hansung-Lee/SSAFY
87ebea0808bb40381678d678e1035dc5fa2c2eb0
cdb7ae1bba0e98e733eed703da2c62217c319462
refs/heads/master
2020-04-14T20:03:05.975040
2019-05-16T08:57:21
2019-05-16T08:57:21
164,080,393
1
0
null
null
null
null
UTF-8
Python
false
false
526
py
def subset(li): for i in range(1<<len(li)): temp = [] for j in range(len(li)): if i & (1<<j): temp.append(li[j]) if temp and sum(temp) == 0: print(temp) # def subset2(li,n,r): # global temp # if r == 0: # print(temp) # temp = [...
8489ac70eb0eaae6b07f33f76b0ef93c44e29136
5bb0b1ee382d2ffce5cf59cd9b90e75d66396335
/P12_视频网站视频真实上传日期_日期爬取_requests_re_匹配分组/001_Vixen_网站视频日期爬取_re查找_re分组匹配_日期匹配分组_交换顺序.py
e66d2cbf3eac4ada296d2b8a83f37194de16e510
[]
no_license
FelixZFB/TZKT_Study_Note
d94ae82299fcce060da76cd4339b4182ab44f8c5
65f1089621d5236e3cddf37e6a3040556b4d0851
refs/heads/master
2021-06-26T09:16:17.051870
2020-12-01T02:14:39
2020-12-01T02:14:39
181,028,395
0
1
null
null
null
null
UTF-8
Python
false
false
2,899
py
# -*- coding:utf-8 -*- # project_xxx\venv\Scripts python ''' Author: Felix Email: [email protected] Blog: https://blog.csdn.net/u011318077 Date: 2019/9/16 21:22 Desc: ''' # 视频网址视频下面日期是视频上传日期,真实拍摄日期大多数都早一天 # 视频源码中的日期正好是早一天的真实日期,直接提取对应日期即可 import requests import re import time def get_date(url_list): headers = ...
c39633b0d4ddbeeb4101389894b53606ca92dd4e
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5765824346324992_0/Python/jcb/p2.py
bde3cb4839091e6513ee3b2edad179bc816deaa6
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Python
false
false
1,369
py
#!/usr/bin/python # -*- coding: UTF-8 -*- import sys import fractions def lcm(x, y): return (x * y) / fractions.gcd(x, y) def solve(f): #parse num_barbers, n = tuple([int(x) for x in f.readline().strip().split(" ")]) barbers = [[i + 1, int(x), 0] for i, x in enumerate(f.readline().strip().split(" "))] #pri...
43efe6f40cb20df2c4eb6e4f4c25c9fcfb33a3e6
c4d1e606d2ebbeaaf3a4dee6f851a45dfa68dabe
/docs-crawler/docs/docs/spiders/numpy_spider.py
b4dae3615cf706dc8551bad586a9d824e7f85ac2
[ "Apache-2.0" ]
permissive
niansong1996/threepio
4d4a976da5a199c77fca936861ba78cc3f45fa7c
5a143e045ca56560c29d03251cabc61cc8b982f6
refs/heads/master
2021-05-18T23:11:50.644479
2020-03-30T17:01:59
2020-03-30T17:01:59
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,509
py
import re from docs.items import ApiItem from scrapy.spiders import Rule, CrawlSpider from scrapy.linkextractors import LinkExtractor from w3lib.html import remove_tags class NumpySpider(CrawlSpider): name = "numpy" version = "1.17.0" allowed_domains = ['scipy.org'] start_urls = [f'https://docs.scipy....
8f83835fe45446652f09806816af34d50e785cb3
8f7b7a910520ba49a2e614da72f7b6297f617409
/Problemset/longest-substring-without-repeating-characters/longest-substring-without-repeating-characters.py
dc8487db359cebaaaaf3829e36b44a49590f76ec
[]
no_license
fank-cd/python_leetcode
69c4466e9e202e48502252439b4cc318712043a2
61f07d7c7e76a1eada21eb3e6a1a177af3d56948
refs/heads/master
2021-06-16T23:41:55.591095
2021-03-04T08:31:47
2021-03-04T08:31:47
173,226,640
1
0
null
null
null
null
UTF-8
Python
false
false
773
py
# @Title: 无重复字符的最长子串 (Longest Substring Without Repeating Characters) # @Author: [email protected] # @Date: 2019-07-10 11:51:35 # @Runtime: 68 ms # @Memory: 13.3 MB class Solution: def lengthOfLongestSubstring(self, s: str) -> int: """ 滑窗法 """ if not s: return ...
1277be50c35d5f8141d67a8e05e653e78d81d442
4e29395020ce78f435e75e0b3f1e09b227f6f4d8
/ataraxia/algorithm/Eval/eval.py
5d666f6ab8a46c7ce2cea1d61d56bac77ffe1cdf
[]
no_license
luoyangustc/argus
8b332d94af331a2594f5b1715ef74a4dd98041ad
2ad0df5d7355c3b81484f6625b82530b38b248f3
refs/heads/master
2020-05-25T21:57:37.815370
2019-05-22T09:42:40
2019-05-22T09:42:40
188,005,059
5
3
null
null
null
null
UTF-8
Python
false
false
3,628
py
import pandas as pd from collections import Counter import pickle from sklearn.metrics import accuracy_score from sklearn.metrics import precision_score from sklearn.metrics import recall_score from sklearn.metrics import confusion_matrix from sklearn.metrics import average_precision_score import json import matplotlib...
a08bbad48829c38821e8d071a6a442413f27293f
f09dc121f213f2881df3572288b7ee5b39246d73
/aliyun-python-sdk-opensearch/aliyunsdkopensearch/request/v20171225/DescribeAppGroupDataReportRequest.py
758871adcb9db7d9bd59f3a70169885a82a3c3bd
[ "Apache-2.0" ]
permissive
hetw/aliyun-openapi-python-sdk
2f31378ad6be0896fb8090423f607e9c7d3ae774
7443eacee9fbbaa93c7975c6dbec92d3c364c577
refs/heads/master
2023-01-19T22:42:36.214770
2020-12-04T10:55:14
2020-12-04T10:55:14
318,689,093
1
0
NOASSERTION
2020-12-05T03:03:03
2020-12-05T03:03:03
null
UTF-8
Python
false
false
1,917
py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
c06d9cfdd26f717ccda451b45843ae4a72787c06
741ee09b8b73187fab06ecc1f07f46a6ba77e85c
/AutonomousSourceCode/data/raw/squareroot/367b3079-2a92-41b6-b880-54e3b3730861__squareRoot.py
80bbf1197a618a7a41813e23e44f3e78c6e83bf1
[]
no_license
erickmiller/AutomatousSourceCode
fbe8c8fbf215430a87a8e80d0479eb9c8807accb
44ee2fb9ac970acf7389e5da35b930d076f2c530
refs/heads/master
2021-05-24T01:12:53.154621
2020-11-20T23:50:11
2020-11-20T23:50:11
60,889,742
6
1
null
null
null
null
UTF-8
Python
false
false
363
py
# import math def closeEnough(num1,num2): if (abs(num1-num2) < 0.001): return True else: return False def squareRoot(num,guess): # guess = 1 if(closeEnough((num/guess),guess)): print round(guess,4) else: guess = ((num/guess)+guess)/2 squareRoot(num,guess) if __name__ == '__main__': num = input("Ent...
5ef4daa35ad9543b2fe5089654f203686e072f58
6550cc368f029b3955261085eebbddcfee0547e1
/第9部分-flask+智能玩具(火龙果)/day118/今日代码/day118/goto_tuling.py
1b8d9603d97063fdb0054446d7e0569040b61834
[]
no_license
vividyellow/oldboyeduPython14qi
d00c8f45326e16464c3d4e8df200d93779f68bd3
de1e9f6efafa2846c068b3fe5ad6e1ca19f74a11
refs/heads/master
2022-09-17T21:03:17.898472
2020-01-31T10:55:01
2020-01-31T10:55:01
null
0
0
null
null
null
null
UTF-8
Python
false
false
550
py
import requests url = "http://openapi.tuling123.com/openapi/api/v2" data_dict = { "reqType":0, "perception": { "inputText": { "text": "北京" }, }, "userInfo": { "apiKey": "c3a9ba0d958a43658a5acdcae50c13ae", "userId": "jinwangbas" } } def tl(text,uid): dat...
5f267713a18175d80bf3a5ca7febbc4b744eccfe
a83108c53c454102317d7bb4e769f36b661c75ed
/config/geturlParams.py
b8c892530271f545e9612e647a80ae8f630fed4e
[]
no_license
xuechao1/DX_interfaceTest
aa35a83390113c5be7d6bdf6e6c796b35059f63e
524cce8cc06dc8f045a9b98bfafdbaecd25726df
refs/heads/master
2022-12-05T17:00:45.289070
2020-08-20T10:14:28
2020-08-20T10:14:28
282,176,904
0
0
null
null
null
null
UTF-8
Python
false
false
473
py
from config import readConfig as readConfig readconfig = readConfig.ReadConfig() class geturlParams(): # 定义一个方法,将从配置文件中读取的进行拼接 def get_Url(self): new_url = readconfig.get_http('scheme') + '://' + readconfig.get_http('baseurl') + ':8888' + '/login' + '?' # logger.info('new_url'+new_url) ...
c215661b1e7f55ca27629f44a33101451779afe1
0aa64aa023f80c97c8ded68dee7541ca7d3aa274
/ImageEnhancer/__init__.py
86c7e8ae06480cd84cd538a85a494986eb1b6c22
[]
no_license
YuMurata/gdrive_scripts
fb7751625b0d73d50ee91f9ab74aa9883a317231
ce2cf48b757eca558e8f93892b9b929352431bfd
refs/heads/master
2020-12-20T04:38:00.127118
2020-03-13T05:02:26
2020-03-13T05:02:26
235,964,806
0
0
null
null
null
null
UTF-8
Python
false
false
266
py
from .enhance_definer \ import (enhance_class_list, enhance_dict, enhance_name_list, MAX_PARAM, MIN_PARAM) from .image_enhancer \ import (ImageEnhancer, ImageEnhancerException, ResizableEnhancer) from .generate_param import generate_random_param
a076db6989aa4821c423febbc9cc4b4248a6ecb3
18430833920b3193d2f26ed526ca8f6d7e3df4c8
/src/transmittals/migrations/0051_auto_20160226_1127.py
4cfd707e588c319531e2c6f51be7efc6f132cf50
[ "MIT" ]
permissive
providenz/phase
ed8b48ea51d4b359f8012e603b328adf13d5e535
b0c46a5468eda6d4eae7b2b959c6210c8d1bbc60
refs/heads/master
2021-01-17T06:56:07.842719
2016-06-28T11:17:53
2016-06-28T11:17:53
47,676,508
0
0
null
2015-12-09T07:45:19
2015-12-09T07:45:18
null
UTF-8
Python
false
false
450
py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transmittals', '0050_make_entities'), ] operations = [ migrations.AlterField( model_name='trsrevision', ...
58ef51cbfb19381e058ed5c3e284c3f524d96b96
de468d3ec6b7b69664678789e5fa71b613b29687
/scine_heron/tests/create_molecule_animator_test.py
2b7d9a0197b9dff66dcdc7a40c6f8a4ae1afba00
[ "BSD-3-Clause" ]
permissive
qcscine/heron
dc566bf8bfdd5b5271ed79faed249a6552390d0d
688d2a510fda9f6bfaf5ef3af91fa3b988703a28
refs/heads/master
2023-04-06T23:31:14.931706
2022-08-31T05:40:15
2022-08-31T05:40:15
526,650,129
2
0
null
null
null
null
UTF-8
Python
false
false
2,771
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __copyright__ = """ This code is licensed under the 3-clause BSD license. Copyright ETH Zurich, Laboratory of Physical Chemistry, Reiher Group. See LICENSE.txt for details. """ """ Tests for the create_molecule_animator function. """ from scine_heron.energy_profile.energy...
8ded2230e932e52c5fa2c4c833ee7824fad8c28e
638af6b8c580eeae23fc1034882c4b514195137a
/Packages/vcs/Test/test_mesh_leg.py
5b4d3ee35046a718c7cf7f1b6b698c33d332b6db
[]
no_license
doutriaux1/uvcdat
83684a86b514b8cac4d8900a503fc13d557fc4d2
37e9635f988696c346b4c3cdb49144d1e21dab5d
refs/heads/master
2021-01-17T07:57:22.897539
2015-02-02T22:52:12
2015-02-02T22:52:12
14,878,320
1
0
null
2015-02-19T20:54:25
2013-12-02T23:44:46
C
UTF-8
Python
false
false
793
py
# Adapted for numpy/ma/cdms2 by convertcdms.py import vcs,cdms2 as cdms,sys,support,os bg=support.bg f=cdms.open(os.path.join(cdms.__path__[0],'..','..','..','..','sample_data','sampleCurveGrid4.nc')) s=f('sample') x=vcs.init() t=x.createtemplate('jj') m=x.createmeshfill('hh') m.mesh='y' m=x.createisofill('jj') t.s...
4ae301b5361e0b6d3d2a61c245a7ff6c6621f51a
809a18b3dd7e90393a69d48f20be840041ef396e
/models/pointer.py
fbe08458d00cd150934dca5c3bb574b7b10f5407
[]
no_license
wanwanaa/transformer-pointer
e58d4cb4b4f8a412515316457afac8708cdf1ef5
aac7bff63e19d4845ac23dfcf9131f1a20812efc
refs/heads/master
2020-05-17T17:08:05.747337
2019-09-08T13:02:30
2019-09-08T13:02:30
183,840,459
0
0
null
null
null
null
UTF-8
Python
false
false
5,745
py
import torch import torch.nn as nn from models.encoder import Encoder from models.decoder import Decoder class Pointer(nn.Module): def __init__(self, config): super().__init__() self.linear = nn.Sequential( nn.Linear(config.model_size*3, config.model_size), nn.SELU(), ...
40f8185de6c03d4570b59f34d711c624447175de
093b9569be9d1c4e5daf92efbebc38f680917b2d
/.history/base/views_20210828170402.py
51bdc9919f9fd0fdfec82eaaf4503593d19de3b0
[]
no_license
Justin-Panagos/todoList
95b1e97ff71af1b0be58e7f8937d726a687cea4d
10539219b59fcea00f8b19a406db3d4c3f4d289e
refs/heads/master
2023-08-04T13:27:13.309769
2021-08-29T14:06:43
2021-08-29T14:06:43
400,827,602
0
0
null
null
null
null
UTF-8
Python
false
false
128
py
from django.shortcuts import render from django.http import HttpResponse def taskList(request):{ return HttpResponse('') }
8f2dc8276cd6ae79f6dc311c301f1ec35490ef60
7d3592b74233ee8b1afa2fac00fa5a6f045f5525
/tutorials/inputFromDependent/inputFromDependent.py
a53bf2778a6a20a6298dff152673c8f3bb9fa422
[ "Apache-2.0" ]
permissive
afcarl/PyPPL
eca2a3e32729d7fd65042164b82c84f21877de2d
c6c654f163d1bdd0ae0357025c5782b17c14b93c
refs/heads/master
2020-03-25T18:51:46.872319
2018-08-08T16:10:21
2018-08-08T16:10:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
724
py
from pyppl import PyPPL, Proc, Channel pSort = Proc(desc = 'Sort files.') pSort.input = {"infile:file": Channel.fromPattern("./data/*.txt")} pSort.output = "outfile:file:{{in.infile | fn}}.sorted" pSort.forks = 5 pSort.script = """ sort -k1r {{in.infile}} > {{out.outfile}} """ pAddPrefix = Proc(d...
a468ac84eca5711fba49ccbc853f7c7e6841ca2f
0953f9aa0606c2dfb17cb61b84a4de99b8af6d2c
/python/ray/tests/test_component_failures_2.py
e0bebf7bd94d429633105b75055895a0c3c07d53
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
oscarknagg/ray
da3dc03e24945ff4d5718fd35fc1b3408d8907eb
20d47873c9e8f5bbb80fe36e5d16256c337c4db3
refs/heads/master
2023-09-01T01:45:26.364731
2021-10-21T07:46:52
2021-10-21T07:46:52
382,402,491
2
1
Apache-2.0
2021-09-15T12:34:41
2021-07-02T16:25:05
Python
UTF-8
Python
false
false
5,689
py
import os import signal import sys import time import pytest import ray import ray.ray_constants as ray_constants from ray.cluster_utils import Cluster from ray._private.test_utils import ( RayTestTimeoutException, get_other_nodes, wait_for_condition, ) SIGKILL = signal.SIGKILL if sys.platform != "win32"...
08cdc3d43b17366cc761a55a2a4f143677cdb5ab
bd300a8b8a0cd370e514580992c9480f64d076da
/django_schoolweb/django_schoolweb/urls.py
4ee5649975f5eaf43d0a9d52fd0387b89f82197c
[]
no_license
33Da/schoolweb
546a19046e42da59d082e0f1f492a14a21a17078
9d92bab3b1590180231efb8e74a68c375149599e
refs/heads/main
2023-02-08T12:48:35.250628
2021-01-05T06:58:55
2021-01-05T06:58:55
326,911,447
1
0
null
null
null
null
UTF-8
Python
false
false
335
py
from django.urls import path from django_schoolweb.settings import MEDIA_ROOT from django.conf.urls import url,include from django.views.static import serve urlpatterns = [ path('admin/', include("adminuser.urls")), path('', include("school.urls")), url(r"^media/(?P<path>.*)$", serve, {"document_root": M...
35a43d22bca52737c7a041fd115e08514fb30e46
e953679220ff59b58eb964b97a98ef026283c8e6
/Ch26/2603.py
61dc80014e773ba476aeef0ea4b76edae8f61819
[]
no_license
lhy0807/A2CS
9e440b85b53c79eb0367f3c478f866911422b8d8
6d793c1cc4989b123ba8ff1676e376681531c7d2
refs/heads/master
2021-04-15T06:10:36.178244
2018-03-23T02:54:55
2018-03-23T02:54:55
125,968,982
0
0
null
null
null
null
UTF-8
Python
false
false
2,856
py
# Chapter 26.03 for normal file # Exception Handling # Tianhe Zhang import pickle import random class CarRecord(object): def __init__(self): self.vhicleID = "" self.registration = "" self.dateRegist = None self.engineSize = 0 self.purchasePrice = 0.00 def __repr__(self): return \ "vhicleID: {};\ r...
fd95b47ac6d809723b958ffb0b5efb3258c2147e
d8edd97f8f8dea3f9f02da6c40d331682bb43113
/networks349.py
768b477ea4b88f0a007d8e534888113870d95ca9
[]
no_license
mdubouch/noise-gan
bdd5b2fff3aff70d5f464150443d51c2192eeafd
639859ec4a2aa809d17eb6998a5a7d217559888a
refs/heads/master
2023-07-15T09:37:57.631656
2021-08-27T11:02:45
2021-08-27T11:02:45
284,072,311
0
0
null
null
null
null
UTF-8
Python
false
false
5,512
py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np __version__ = 205 # Number of wires in the CDC n_wires = 3606 # Number of continuous features (E, t, dca) n_features = 3 class Gen(nn.Module): def __init__(self, ngf, latent_dims, seq_len, encoded_dim): super().__init__...
a72324c97d49222640aa847c71384a651ca6219c
d04d73bed28c366712103663d3e3be13622611b9
/pactools/dar_model/stable_dar.py
30eecbf63154b2b87defb16172559556714ed1c8
[]
no_license
EtienneCmb/pactools
fcb13cde6f57a5c6abf4b033c24aec72c1201ca7
6e5a53deefc4dcede6a4a0293958e39a660dba97
refs/heads/master
2021-01-21T23:20:18.491959
2017-06-08T12:49:55
2017-06-08T12:49:55
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,217
py
import numpy as np from .baseLattice import BaseLattice class StableDAR(BaseLattice): """ A stable driven auto-regressive (DAR) model, as described in [1]. This model is designed to have an stable instantaneous AR model at each time. This model uses the parametrization: .. math:: y(t) + \\s...
200563d19042e582fedc874dc3439dc35a2edde5
925f2935b34042abc9161795413031ae68f45b9a
/multimodel_inference/fold_SC3imlsm.py
a33c67d65aca02ed924dbf5fb636eb928ca937a4
[]
no_license
Farhad63/AFS-analysis-with-moments
7e1d17f47c06ed97ebb7c9ec8245fe52a88622c3
7874b1085073e5f62d910ef2d79a22b29ff3be84
refs/heads/master
2022-04-09T22:11:12.341235
2020-03-11T21:15:42
2020-03-11T21:15:42
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,801
py
#!/usr/bin/env python # split, three epochs in each pop, symmetric migration in middle and late epochs # genomic islands # n(para): 13 import matplotlib matplotlib.use('PDF') import moments import pylab import random import matplotlib.pyplot as plt import numpy as np from numpy import array from moments import Misc,...
9d8fad03fbcd9b26dbe40081fb48b3d40e173dda
6f3a7844321241ab2c46215a1ed3d1a246727c18
/MPs/MP1/common_friends.py
8e3b328d057d2b475f67ec5bb733adb500384c0c
[]
no_license
gouthamp900/cs199-fa17
899fa345bf3c1c3d5eb745820a2c884216d7f657
4eb635c6a064dd2c61253654ca729769d995f563
refs/heads/master
2021-06-24T21:44:10.021054
2017-09-11T00:58:30
2017-09-11T00:58:30
103,450,202
4
0
null
2017-09-13T21:03:27
2017-09-13T21:03:27
null
UTF-8
Python
false
false
676
py
from map_reducer import MapReduce def friend_mapper(line): ''' write your code here! ''' pass def friend_reducer(friend_tuples): ''' write your code here! ''' pass def _run_common_friend_finder(filename): with open(filename) as f: lines = f.readlines() mr = MapReduce(friend_mapper,...
8c32175a2770eff6b1c971db34e742e17ff04c5e
5d74051293a4740c597abb016870a56a58cecf5b
/modules/shared/infrastructure/passwords/django/__init__.py
d5c02785b58d9ae5462b7f2646e11fb08dc3e688
[ "BSD-3-Clause" ]
permissive
eduardolujan/hexagonal_architecture_django
98e707148745f5a36f166c0584cfba21cca473f0
8055927cb460bc40f3a2651c01a9d1da696177e8
refs/heads/develop
2023-02-21T22:46:20.614779
2021-01-16T02:48:37
2021-01-16T02:48:37
305,813,872
5
2
BSD-3-Clause
2021-01-16T18:00:26
2020-10-20T19:32:46
Python
UTF-8
Python
false
false
171
py
# -*- coding: utf-8 -*- from .password_creator import PasswordCreator from .password_checker import PasswordChecker __all__ = ('PasswordCreator', 'PasswordChecker', )
bf02de413f3d6e40eb57f713c624fff6d8fbd472
87e60b0504be11c6997f1b20b72e9428cc128342
/python/cowbells/geom/surfaces.py
3e835c423e358ade9f4e13d82437578dd2b758dd
[]
no_license
brettviren/cowbells
70a85856fdfc54526c847f115d5dc01ec85ec215
1ceca86383f4f774d56c3f159658518242875bc6
refs/heads/master
2021-01-10T18:44:41.531525
2014-04-09T15:17:29
2014-04-09T15:17:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,484
py
#!/usr/bin/env python ''' Describe optical surfaces ''' import base, volumes store = [] class OpticalSurface(base.Base): # Known parameters known_parameters = ['type', 'model', 'finish', 'first', 'second', 'polish', 'sigmaalpha'] # Known properties known_properties = ['RINDEX...
8210e6228b034876d6073be5b96b8126496060ab
1af78033850e5bbe7a66ad83a238b96e7e2f2778
/app/models/post.py
fd56443c27624b53a2c22c678039e88e9560e1e4
[ "MIT" ]
permissive
Sean10/flask_demo
e7c0aed4a0633f03ded079cadec322dc4bdc6076
a04b284a1e812f5d291b67fbd04e3073063003f1
refs/heads/master
2020-03-27T22:22:30.677486
2018-09-03T15:55:10
2018-09-03T15:55:10
147,225,409
0
0
null
null
null
null
UTF-8
Python
false
false
6,971
py
import datetime import html from bson.objectid import ObjectId from ..utils import * class Post: def __init__(self, default_config): self.collection = default_config['POSTS_COLLECTION'] self.response = {'error': None, 'data': None} self.debug_mode = default_config['DEBUG'] def get_po...
ee8ca2cdad8861221f07769c684b849247fb52ab
5e20e9281c15587e8de2cce5b8eb342cae6b8645
/astrohut/examples/collision3d.py
3c0b384bc89b24bcdcfb12a8ce04744406d87dc6
[]
no_license
jsbarbosa/astrohut
b6d0a76328d09f205a711b607e7fca4e9a51e178
c2f8b721ec3ea8396ce321d44d881aa92dfa94f3
refs/heads/master
2021-09-18T11:51:10.142641
2018-07-13T18:50:18
2018-07-13T18:50:18
85,311,305
0
0
null
null
null
null
UTF-8
Python
false
false
848
py
import numpy as np import astrohut as ah import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D G = 1.0 m = 1.0 N = 50 pos1 = np.zeros((N, 3)) pos2 = np.zeros_like(pos1) pos1[:, :2] = np.random.normal(size = (N, 2)) pos2[:, :2] = np.random.normal(loc = 3.0, size = (N, 2)) pos2[:, 2] = 5.0 speeds1 ...
71e5f0f9c68ae0973f094f30416e50780b207773
dea85fb5330baf4ed9a185f040b258ef02bfa844
/projecteuler/problem_005.py
813f0d0ce716ad19ed0a0c6c0d538c799d34d4af
[]
no_license
icejoywoo/school
595018d08bb971171106101dcd463bc435f29eff
bfc9ac94d67e02264da28055a932a86602efb2dc
refs/heads/master
2022-07-24T02:43:37.747264
2016-04-29T07:14:42
2016-04-29T07:14:42
null
0
0
null
null
null
null
UTF-8
Python
false
false
988
py
#!/usr/bin/env python2.7 # encoding: utf-8 from __future__ import division import math def prime(end): for i in xrange(2, end+1): flag = True for j in xrange(2, int(math.sqrt(i))+1): if i % j == 0: flag = False if flag: yield i def prime_factor(nu...
b8ae343b776a8e117360d6f81ec56f8bb36bde1c
f0d713996eb095bcdc701f3fab0a8110b8541cbb
/sARz4TDdxCuqK6pja_12.py
60b354a533deca46411ecac892304d607e16cdd0
[]
no_license
daniel-reich/turbo-robot
feda6c0523bb83ab8954b6d06302bfec5b16ebdf
a7a25c63097674c0a81675eed7e6b763785f1c41
refs/heads/main
2023-03-26T01:55:14.210264
2021-03-23T16:08:01
2021-03-23T16:08:01
350,773,815
0
0
null
null
null
null
UTF-8
Python
false
false
1,842
py
""" **Mubashir** needs your help to identify the spread of a deadly virus. He can provide you with the following parameters: * A two-dimensional array `persons`, containing **affected persons 'V'** and **unaffected persons 'P'**. * Number of hours `n`, each infected person is spreading the virus to one person ...
0d32643ef83c8d8d718272d65f217f90ed5bc4bf
9505e191cb287507c7df05212ab562bea1eda553
/python_fishc/14.0.py
a439b8f61d38e52515082a5498ca97088d36971d
[ "MIT" ]
permissive
iisdd/Courses
c7a662305f3efe7d61eb23f766381290b1107bb8
a47d202e0d7e1ba85a38c6fe3dd9619eceb1045c
refs/heads/main
2023-04-15T17:40:36.474322
2021-04-27T14:31:42
2021-04-27T14:31:42
316,904,233
1
0
null
null
null
null
UTF-8
Python
false
false
1,479
py
'''0. 请写一个密码安全性检查的代码代码:check.py''' # 密码安全性检查代码 # # 低级密码要求: # 1. 密码由单纯的数字或字母组成 # 2. 密码长度小于等于8位 # # 中级密码要求: # 1. 密码必须由数字、字母或特殊字符(仅限:~!@#$%^&*()_=-/,.?<>;:[]{}|\)任意两种组合 # 2. 密码长度不能低于8位 # # 高级密码要求: # 1. 密码必须由数字、字母及特殊字符(仅限:~!@#$%^&*()_=-/,.?<>;:[]{}|\)三种组合 # 2. 密码只能由字母开头 # 3. 密码长度不能低于16位 def c...
6b2fb25453491c119aaf9cf115995aecb0ca1840
c077ee590d003ebada9e292bed0de8cc27fc1c7b
/other/sqllite.py
dccef0327b666dbc654e328b29879e2898378103
[]
no_license
pwchen21/pros
bb744bc451a0ede2a31a6a5c74f7cda7f5abf206
9b48e2ec40a3eea12c79b89a00b2be60d65cc8d1
refs/heads/master
2023-07-07T11:50:52.599589
2023-06-24T19:46:02
2023-06-24T19:46:02
140,359,861
0
0
null
2020-10-19T17:53:52
2018-07-10T01:17:30
Python
UTF-8
Python
false
false
786
py
import sqlite3 conn=sqlite3.connect(r'D:\se\py\db\test.db') # Create Table #conn.execute('CREATE TABLE USER ( `ID` INTEGER PRIMARY KEY AUTOINCREMENT, `NAME` TEXT NOT NULL, `NICKNAME` TEXT, `PASSWORD` TEXT, `MAIL` TEXT )') # Insert Data ''' conn.execute('INSERT INTO USER (NAME, NICKNAME) VALUES ("Tester1", "N1");') ...
3321af51db5e0bf76d7c034134aa3971bf647c1d
acd41dc7e684eb2e58b6bef2b3e86950b8064945
/res/packages/scripts/scripts/client/gui/Scaleform/daapi/view/lobby/prb_windows/__init__.py
126fc2da1e4c41925328ad15223c68599c5addbe
[]
no_license
webiumsk/WoT-0.9.18.0
e07acd08b33bfe7c73c910f5cb2a054a58a9beea
89979c1ad547f1a1bbb2189f5ee3b10685e9a216
refs/heads/master
2021-01-20T09:37:10.323406
2017-05-04T13:51:43
2017-05-04T13:51:43
90,268,530
0
0
null
null
null
null
WINDOWS-1250
Python
false
false
6,865
py
# 2017.05.04 15:23:45 Střední Evropa (letní čas) # Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/prb_windows/__init__.py from gui.Scaleform.daapi.settings.views import VIEW_ALIAS from gui.Scaleform.framework import ScopeTemplates from gui.Scaleform.framework import ViewSettings, GroupedViewSettings,...
ab5ccec07088f8d9d3787c3d31cfc69fcc04f54f
bb8838e3eec624fd35a61d6d646f941eac1b266a
/saga/utils/threads.py
69f6f1c07f22481e262743a916595b2708709f1f
[ "MIT" ]
permissive
agrill/saga-python
55087c03e72635ffbb2fe1ca56b5cc02b7ff2094
35101e3a40d3cfcb39cb9f0d0c5f64c6f8de5930
refs/heads/master
2021-01-22T10:14:11.922145
2013-11-19T14:38:50
2013-11-19T14:38:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,604
py
__author__ = "Andre Merzky" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" import sys import threading import saga.exceptions as se import saga.utils.misc as sumisc _out_lock = threading.RLock () # ------------------------------------------------------------------------------ # ...
d2712d6ad0380ba56c92dbda2082dd9c9a137afa
c2f35e5d3cfbbb73188a0cd6c43d161738e63bd1
/07-mini-web框架/06-通过传递字典实现浏览器请求的资源不一样得到响应不一样/web_server.py
d55807d19181b3f74fd963dd53e7597e6e885e4b
[]
no_license
yangh-zzf-itcast/Python_heima_Study
2a7cd0d801d9d6f49548905d373bb409efc4b559
7d753c1cdd5c46a0e78032e12b1d2f5d9be0bf68
refs/heads/master
2020-04-30T06:59:04.000451
2019-04-19T12:15:30
2019-04-19T12:15:30
176,670,172
1
0
null
null
null
null
UTF-8
Python
false
false
4,940
py
import socket import re import multiprocessing import mini_frame # 逻辑处理代码模块 class WSGIServer(object): """WSGI服务器类""" def __init__(self): # 1. 创建套接字 self.tcp_server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # 设定套接字选项, 可以重复使用地址 self.tcp_server_socket.setsockopt...
470f082d4e4f775112b238965cc902c710b8d8b6
521efcd158f4c69a686ed1c63dd8e4b0b68cc011
/airflow/api_connexion/endpoints/version_endpoint.py
077d7f8a1cfe4dcc05b12aafbc14528af5d0c696
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
coutureai/RaWorkflowOrchestrator
33fd8e253bfea2f9a82bb122ca79e8cf9dffb003
cd3ea2579dff7bbab0d6235fcdeba2bb9edfc01f
refs/heads/main
2022-10-01T06:24:18.560652
2021-12-29T04:52:56
2021-12-29T04:52:56
184,547,783
5
12
Apache-2.0
2022-11-04T00:02:55
2019-05-02T08:38:38
Python
UTF-8
Python
false
false
1,430
py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
a5fdff54dca575404713d802a9baf77ff4c1e16c
72579db4299be6d512a766ce38ae50e3c7753368
/.history/Pythonlearning/day9_20200802095738.py
8bf2b42a5e3793092b534eb4601b7c71e24450db
[]
no_license
moteily/Python_Learning
f0d1abf360ad417112051ba52f32a141452adb2d
c294aa1e373254739fb372918507cd7dbe12c999
refs/heads/master
2022-11-26T11:09:48.145308
2020-08-04T08:47:15
2020-08-04T08:47:15
284,379,822
0
0
null
null
null
null
UTF-8
Python
false
false
1,626
py
# 接上一天的第九章 # 静态方法和类方法: # 定义和表示:静态方法和类方法分别包装在staticmethod和classmethod类的对象中。 # 静态方法的定义中没有参数self,可直接通过类调用。类方法的定义中包含类似self的参数, # 通常被命名为cls。对于类方法,也可通过对象直接调用,但参数cls将自动关联到类。如下 class Myclass: def smeth(): print('This is a static method') smeth = staticmethod(smeth) def cmeth(cls):#类方法的特有参数 ...
9838043a9799e8e36f6c7fa133e5dbde8d92d24a
34ef7e2955415e92806dd918df0013e39539b99c
/tests/test_scheduler.py
919cedf0d2555b0e2251e3e1afc728d549fe3981
[]
no_license
MasoniteFramework/scheduler
d2e843ba845e2cfe97197dbc50093f0b1ac9a07f
d783bef47df49893fdfc6dc761197fd5f1bb047c
refs/heads/3.0
2021-06-14T23:21:33.951389
2020-09-18T15:09:34
2020-09-18T15:09:34
135,189,744
1
2
null
2023-08-21T05:57:56
2018-05-28T17:17:51
Python
UTF-8
Python
false
false
5,189
py
import pytest import pendulum from src.masonite.scheduler.Task import Task class MockTask(Task): run_every = "5 minutes" timezone = "America/New_York" class TestScheduler: def setup_method(self): self.task = MockTask() def test_scheduler_should_run(self): assert self.task.run_every ...
052968e050a51a8a22ec5d942182c99cb8f68f01
3d96cee3f0c986c7195e7677d85e91dc837d8dd4
/Web/E/4/4.9/sql.py
709d060270f8e011120ba344fdb61e742a11439c
[]
no_license
dannycrief/full-stack-web-dev-couse
7faffe1c9e6c39baf03d6ee54f716e4f8b4c8733
0b22bc84742d8e78bd6a2e03adfbc44137f3d607
refs/heads/master
2023-01-12T09:25:16.378035
2021-03-21T16:51:18
2021-03-21T16:51:18
220,825,261
0
1
null
2023-01-05T12:57:14
2019-11-10T17:34:02
Python
UTF-8
Python
false
false
181
py
from sqlalchemy import create_engine, MetaData, Table, and_, or_, asc engine = create_engine('postgresql+psycopg2://postgres:211217ns@localhost:5433/movies') conn = engine.connect()
e223be854296cb648b6cd4f1db9b6eb064402213
d780df6e068ab8a0f8007acb68bc88554a9d5b50
/python/foreman/tests/testdata/path1/pkg1/pkg2/build.py
cda68e9a8ee9ba90409e8ffba39667c3487d8d67
[ "MIT" ]
permissive
clchiou/garage
ed3d314ceea487b46568c14b51e96b990a50ed6f
1d72863d3a5f5d620b170f4dd36f605e6b72054f
refs/heads/master
2023-08-27T13:57:14.498182
2023-08-15T07:09:57
2023-08-15T19:53:52
32,647,497
3
0
null
null
null
null
UTF-8
Python
false
false
553
py
from foreman import define_parameter, define_rule, get_relpath if __name__ != 'pkg1.pkg2': raise AssertionError('incorrect __name__: %s' % __name__) if not __file__.endswith('tests/testdata/path1/pkg1/pkg2/build.py'): raise AssertionError('incorrect __file__: %s' % __file__) if str(get_relpath()) != 'pkg1...
1c7e24b97e0bbeab4768fbcfa5cbbc723708b0a6
a8fffbce7bd4d4e7e91f07b7aaaf0801ca64686e
/0x0F-python-object_relational_mapping/11-model_state_insert.py
f8589486bf72442bd5c4c25a9548a01450e5c593
[]
no_license
bmuha1/holbertonschool-higher_level_programming
8f603c07e4b3cb87d89c3a1fff9fd5cdef5bc9f5
79cca6ecb77ed8de65b55bcdd715a3a923c5cb3a
refs/heads/master
2020-07-22T15:52:04.069523
2020-02-13T23:29:50
2020-02-13T23:29:50
207,251,416
2
7
null
null
null
null
UTF-8
Python
false
false
663
py
#!/usr/bin/python3 """ Write a script that adds the State object “Louisiana” to the database hbtn_0e_6_usa """ if __name__ == "__main__": from sys import argv from model_state import Base, State from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine engine = create_engine( ...
aa20facdce0abd3184f7a0b97c113bf2ae0b90f4
11656c882c83bb5ea364b7c92f763788fa4db5ae
/Pokhi/Pokhi/Rest/config.py
3a97163750987d4bda5f85416a3424376b97920f
[]
no_license
abhijeetdtu/pokhiin
e28d22bd38975a1d25c5425c34a1ce6dce79b65e
1eb512924da7c59e18dcf0c95819fd8d9e85c03d
refs/heads/master
2021-05-14T04:03:07.621127
2018-04-28T18:08:51
2018-04-28T18:08:51
116,633,329
0
0
null
null
null
null
UTF-8
Python
false
false
610
py
import os class Config: ENV = {} ENV["DATA_DIR"] = os.path.abspath(os.path.join(os.path.realpath(__file__), "../../static/Data/")) print(ENV["DATA_DIR"]) if('OPENSHIFT_DATA_DIR' in os.environ): ENV["DATA_DIR"] = os.environ['OPENSHIFT_DATA_DIR'] ENV["UPLOAD_FOLDER"] = os.path.abspath(os.p...
d1da6360b081ce9719d4418c3a06f2e027120c06
e44ff4069f5b559954e7a66685c86b054a70de7a
/MockVita 2/digit_pairs.py
72aa08d4b84cb9d5d1e7233c8d5b7013e00f0f86
[]
no_license
SayanDutta001/Competitive-Programming-Codes
2912985e037f83bcde8e7fcb0036f1e31fa626df
6dac061c0a4b1c5e82b99ec134e9e77606508e15
refs/heads/master
2023-03-17T04:25:47.507594
2021-03-05T16:23:09
2021-03-05T16:23:09
null
0
0
null
null
null
null
UTF-8
Python
false
false
704
py
def bitscore(s): l = list(s) score = int(max(s))*11 + int(min(s))*7 if score >= 100: return str(score)[1:] return str(score) def pairs(a): count = 0 t = [] for i in range(len(a)): for j in range(i+1, len(a)): if(((i+1)%2==0) and ((j+1)%2==0) and (t.count(a[i][0])...
e080a1ca9f234923883169d8071f48e08ec53e81
f6078890ba792d5734d289d7a0b1d429d945a03a
/hw4/submissions/duongmatthew/duongmatthew_24972_1303227_HW_4_3-1.py
5dd52c46487e761c59542a30f9077f7a76a40c30
[]
no_license
huazhige/EART119_Lab
1c3d0b986a0f59727ee4ce11ded1bc7a87f5b7c0
47931d6f6a2c7bc053cd15cef662eb2f2027712c
refs/heads/master
2020-05-04T23:40:53.709217
2019-06-11T18:30:45
2019-06-11T18:30:45
179,552,067
0
0
null
null
null
null
UTF-8
Python
false
false
1,462
py
# -*- coding: utf-8 -*- """ Created on Sat May 4 13:35:08 2019 - A new function, "my_Newton", that solves for a root depending on how small the difference between the current and last fct value is, rather than how small the fct value, itself, is. author: maduong """ import numpy as np #=...
d02de539b71e1698a057d12c5f6f979c6ccada0e
98a1c37ccda91f2c4be14683f5899393f6b97d29
/04-Pygame/飞机大战.py
57d629dd0b7fc805a276a487a6064cf6f7a621b2
[]
no_license
yeshixuan/Python
1b564d9e46b469f62f59a3a04b340abd68ea4419
98ba749ca9ea12004cdff1fdb7e002dea2f42096
refs/heads/master
2020-04-29T22:17:01.014401
2019-05-14T05:15:29
2019-05-14T05:15:29
176,442,230
0
0
null
null
null
null
UTF-8
Python
false
false
5,413
py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/4/3 22:00 # @Author : Yebiyun # @Site : # @File : 飞机大战.py # @Software: PyCharm import pygame from pygame.locals import * from sys import exit from random import randint # 定义窗口的分辨率 SCREEN_WIDTH = 480 SCREEN_HEIGHT = 640 hero_is_hit = False tick...
b1322642c22f16e262b114f04965e50a992a34ee
82b946da326148a3c1c1f687f96c0da165bb2c15
/sdk/python/pulumi_azure_native/devices/v20200801/list_iot_hub_resource_keys_for_key_name.py
3135b5f75e15d808bf5dedb68d251d50c673538c
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
morrell/pulumi-azure-native
3916e978382366607f3df0a669f24cb16293ff5e
cd3ba4b9cb08c5e1df7674c1c71695b80e443f08
refs/heads/master
2023-06-20T19:37:05.414924
2021-07-19T20:57:53
2021-07-19T20:57:53
387,815,163
0
0
Apache-2.0
2021-07-20T14:18:29
2021-07-20T14:18:28
null
UTF-8
Python
false
false
4,003
py
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
1da89dbcd832978c8723bebd5c2fe3a26ce58426
61ff94d2987b3bc95f82c5a58897f50d1efa1db8
/hive/db/query_stats.py
68a1b207535d39dcfcfcad00384343b91a5c69cf
[ "MIT" ]
permissive
arpwv/hivemind
ee77c9805731fda2bb95e1127a56152fe53b707a
a87e5578f9020be02c867021a8acdfff41f06777
refs/heads/master
2021-01-24T03:43:46.507207
2018-02-23T22:18:56
2018-02-23T22:18:56
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,811
py
import time import re import atexit class QueryStats: stats = {} ttl_time = 0.0 def __init__(self): atexit.register(QueryStats.print) def __call__(self, fn): def wrap(*args, **kwargs): time_start = time.perf_counter() result = fn(*args, **kwargs) ti...
fa36261172803b39dd43394343057295f6489945
2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8
/pardus/tags/2007-EOL/desktop/kde/transKode/actions.py
19d1559602adac4f930b844d24d29a64980cf019
[]
no_license
aligulle1/kuller
bda0d59ce8400aa3c7ba9c7e19589f27313492f7
7f98de19be27d7a517fe19a37c814748f7e18ba6
refs/heads/master
2021-01-20T02:22:09.451356
2013-07-23T17:57:58
2013-07-23T17:57:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
309
py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 2. # See the file http://www.gnu.org/copyleft/gpl.txt. from pisi.actionsapi import kde WorkDir = 'transkode' def setup(): kde.configure() def build(): kde.make() def install(): kde.install()
3db4dccc53642460bd253d657b3e1e6860dc134f
0fdb402809188c34702bc70e4d106e56ca8e2bd0
/Algorithms/mobile.py
7cc1afd0b2f037442a49adc901644212600de01c
[]
no_license
the07/Python
356f2018a85caeb9dd6ccb251636ff697eb613b6
af34cf3ffe01504632cf3654a0a5f89653e163cb
refs/heads/master
2021-01-06T20:36:33.718087
2017-11-24T06:58:32
2017-11-24T06:58:32
90,789,881
0
0
null
null
null
null
UTF-8
Python
false
false
178
py
phone_numbers = [] for _ in range(int(input())): S = input() phone_numbers.append(S[-10:]) for i in sorted(phone_numbers): print('+91 {} {}'.format(i[:5], i[5:]))
d174932faeffa0b07a3e4466044164eb769e3dc1
609ec378fadcbd81a8307064cd11c0e27b585cca
/setup.py
57138ace5c78f29d4f361b9eb6d70b4b692207ea
[]
no_license
oboberg/QuickReduce
b2184c212774e61f430ba62dda024ce672bd6dca
19f42ed8105a24b4191066915543ee70022b5bfb
refs/heads/master
2021-01-19T07:02:45.877576
2016-08-09T19:15:58
2016-08-09T19:15:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
672
py
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize from Cython.Distutils import build_ext import numpy setup( cmdclass = {'build_ext': build_ext}, ext_modules = [ Extension("podi_cython", sources=['cython_src/podi_cython.pyx...
c7b577d0088d48af19791f2282ca10b34db9bfcc
de24f83a5e3768a2638ebcf13cbe717e75740168
/moodledata/vpl_data/65/usersdata/201/32254/submittedfiles/investimento.py
57cbb58258e023fea00db2eb9598bfa4a3514d35
[]
no_license
rafaelperazzo/programacao-web
95643423a35c44613b0f64bed05bd34780fe2436
170dd5440afb9ee68a973f3de13a99aa4c735d79
refs/heads/master
2021-01-12T14:06:25.773146
2017-12-22T16:05:45
2017-12-22T16:05:45
69,566,344
0
0
null
null
null
null
UTF-8
Python
false
false
212
py
# -*- coding: utf-8 -*- from __future__ import division #COMECE SEU CODIGO AQUI a=float(input('Investimento inicial:')) b=float(input('Taxa de crescimento percentual:')) x=(a*b) Total=(a+x) print('%.2f' %Total)
bbca92b38602a503a8e5e884d77be44b3b03e2c0
dd745566ceee1760c714b17cabd50d2a0a919747
/Stream-Three/django_todo_project/env/lib/python3.5/site-packages/corsheaders/conf.py
e5b964ccffb7dcd50b8ca4ad678d32401bd435c0
[]
no_license
hyohannesgithub/full_stack_solutions
668fc9de020aa8aa18c64d38d13ca6bfcac12278
e572d6154c3d63681c124698d7962905f1384671
refs/heads/master
2021-01-13T02:53:27.623809
2017-01-04T02:49:30
2017-01-04T02:49:30
77,099,093
1
0
null
2016-12-22T01:24:02
2016-12-22T01:24:01
null
UTF-8
Python
false
false
1,515
py
from django.conf import settings from .defaults import default_headers, default_methods # Kept here for backwards compatibility class Settings(object): """ Shadow Django's settings with a little logic """ @property def CORS_ALLOW_HEADERS(self): return getattr(settings, 'CORS_ALLOW_HEADE...
e8fc466e3e5524ecb40f9b242aa5198d18146f25
02ce6d29fec0d68ca2a2a778d37d2f2cff1a590e
/Old/PythonOne/18.2.4-tcp-client.py
786c1fd2479c368035b73888d47e2d549a49b923
[]
no_license
CalvinCheungCoder/Python-100-Days
605045122e40c119abc32466c32479559a4d4b9b
0f9bec8893954d4afbe2037dad92885c7d4d31f8
refs/heads/master
2020-04-17T11:49:42.148478
2019-09-19T10:22:37
2019-09-19T10:22:37
166,556,771
1
0
null
null
null
null
UTF-8
Python
false
false
213
py
import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('127.0.0.1', 8880)) s.send(b'hello') data = s.recv(1024) print('从服务器接收的消息:{0}'.format(data.decode())) s.close()
6bcf2b63c59525f3e7ccc1b4759864d27f05aae2
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5751500831719424_0/Python/Bremsstrahlung/repeater.py
d918e0d1d86b831dda2d3f18915cfd9f173d497b
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Python
false
false
1,858
py
input = open("A-small-attempt1.in") output = open("output.out","w") t = int(input.readline()) for i in range(t): n = int(input.readline()) r = 0 impossible = False lines = [] iter = [] for x in range(n): lines.append(input.readline().strip()) iter.append(0) ...
6569fbcc6eb836ab5ada7f0d7b0beac36b3a8ac8
0f47b8b3775e1730f92141128491b0bbfe3d89e0
/OOP/SOLID/examples/open_closed/after/character.py
d9d293c50eead1ee7650593e0d7a14a6d3fdb875
[]
no_license
hongmin0907/CS
1d75c38da98c6174ea19de163c850d0f3bac22e3
697e8e1a5bde56a7588381a12f74bbb0e3aee3e8
refs/heads/master
2020-06-23T20:10:22.051477
2019-07-15T00:20:09
2019-07-15T00:20:09
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,170
py
# 추상화 타입을 사용해 프로그래밍 # CLOSED FOR MODIFICATION # 공격 종류를 확장해도 캐릭터의 공격 코드는 변하지 않는다. from abc import ABCMeta, abstractmethod from attack_kind import (AttackKindFactory, FireAttackKind, IceAttackKind, StoneAttackKind, KungfuAttackKind) class Character(metaclass=ABCMeta): def __init__(self, name...
3a2d8d4fd3ae54ef5535a568c0501b0c2090940f
e61e664d95af3b93150cda5b92695be6551d2a7c
/vega/quota/latency.py
c637d96fd9df153845b45061d928eece3556b401
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
huawei-noah/vega
44aaf8bb28b45f707ed6cd4e871ba70fc0c04846
12e37a1991eb6771a2999fe0a46ddda920c47948
refs/heads/master
2023-09-01T20:16:28.746745
2023-02-15T09:36:59
2023-02-15T09:36:59
273,667,533
850
184
NOASSERTION
2023-02-15T09:37:01
2020-06-20T08:20:06
Python
UTF-8
Python
false
false
1,693
py
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. 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...
2f30b44e7c114f7510f263f5587bfd1d560d6815
1e5f6ac1590fe64e2d5a2d8b036c0948847f668d
/codes/Module_2/lecture_7/lecture_7_16.py
f535e827c618a0f328550cad12cb40cbcb93bd19
[]
no_license
Gedanke/Reptile_study_notes
54a4f48820586b1784c139716c719cc9d614c91b
a9705ebc3a6f95160ad9571d48675bc59876bd32
refs/heads/master
2022-07-12T23:43:24.452049
2021-08-09T12:54:18
2021-08-09T12:54:18
247,996,275
5
1
null
2022-06-26T00:21:48
2020-03-17T14:50:42
HTML
UTF-8
Python
false
false
535
py
# -*- coding: utf-8 -*- import requests headers = { 'Accept-Encoding': 'gzip, deflate, sdch', 'Accept-Language': 'en-US,en;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,applic...
0121fb0c0c35e0b76606d6c0541c3178447f1eed
d7faf47825b6f8e5abf9a9587f1e7248c0eed1e2
/rllib/tests/test_gpus.py
8a1f24311a4d3ac2d53928ee1f8f93bb19544e3e
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
ggdupont/ray
7d7c7f39a8f99a09199fab60897da9e48b8e2645
15391026c19f1cbbb8d412e46b01f7998e42f2b9
refs/heads/master
2023-03-12T06:30:11.428319
2021-12-07T05:34:27
2021-12-07T05:34:27
165,058,028
0
0
Apache-2.0
2023-03-04T08:56:50
2019-01-10T12:41:09
Python
UTF-8
Python
false
false
4,631
py
import unittest import ray from ray.rllib.agents.pg import PGTrainer, DEFAULT_CONFIG from ray.rllib.utils.framework import try_import_torch from ray.rllib.utils.test_utils import framework_iterator from ray import tune torch, _ = try_import_torch() class TestGPUs(unittest.TestCase): def test_gpus_in_non_local_m...
c15d9a7f00b2603e79791d3b4d43209b20ff32db
cb305a20202cd381af979702950311a1b92319f2
/Flask/Project/setup.py
2bcadb4c2cff7569f2e7e0c66fa9475e9af3c831
[]
no_license
ShanjinurIslam/The-Stack
93a9bafb7355c471e2363bacddc0cfae5c5ae1c1
2d31ae8cf37dd9aceef06e067756e716a225f23b
refs/heads/master
2022-12-08T03:35:01.397484
2020-08-26T20:21:13
2020-08-26T20:21:13
287,058,289
1
0
null
null
null
null
UTF-8
Python
false
false
218
py
from setuptools import find_packages, setup setup( name='flaskr', version='1.0.0', packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=['flask','flask_wtf'], )
cc45d0ee2e3786742bdb6ce3f8e243e4832d6541
2976433a213f354b6d387e1d957192a9871f7e40
/JavaScript/reactjs/basic01/testcode.py
f9087ac3d31b1989bf0f6a5a225583d5f66980a2
[]
no_license
saurabh-kumar88/Coding-Practice-
90a6f6b8feb7a1d2316451b31c646a48dc6f9bf9
48f0bac728745c8978468974d55025da86f29486
refs/heads/master
2023-02-15T00:19:47.411973
2020-10-06T15:48:46
2020-10-06T15:48:46
280,220,900
0
1
null
2021-01-06T09:15:21
2020-07-16T17:51:29
JavaScript
UTF-8
Python
false
false
508
py
class Solution: def fizzBuzz(self, n: int): ans = [] multiple_of_3, multiple_of_5 = False, False for count in range(1, n+1): if count % 3 == 0 and count % 5 == 0: ans.append("FizzBuzz") elif count % 3 == 0: ans.append("Fizz") elif count % 5 == 0: ans.append("...
856571450b135b64c9414883a6320d798601aeae
aac9fd4a281ffac37fe8b2087f720001b5bcad7a
/mnist_sync_sharding_greedy/worker.py
cb909a02fe9d1d064155aaff4dfee04ee14db282
[ "MIT" ]
permissive
epikjjh/Distributed-Deep-Learning
8d77875e9aa74855b29ac5bb8860b987ef798ec1
9762b99306771c0f7dadc58abe6bf7ebe5ed468f
refs/heads/master
2023-08-14T18:27:14.144482
2021-10-19T02:13:17
2021-10-19T02:13:17
266,505,936
1
3
MIT
2020-10-14T22:06:16
2020-05-24T09:09:20
Python
UTF-8
Python
false
false
5,193
py
from model import Model from mpi4py import MPI from typing import List import numpy as np import tensorflow as tf import time,sys from functools import reduce class SyncWorker(Model): def __init__(self, batch_size, rank, num_ps, num_workers): super().__init__() ''' Modify var_bucket & var_shape fo...
e31ffe1f95b4ccb8bfc800dd1d762b33eea9a203
6189f34eff2831e3e727cd7c5e43bc5b591adffc
/WebMirror/management/rss_parser_funcs/feed_parse_extractInacloudspaceWordpressCom.py
d57d99f589b5ed6165f014a0a818e2dcb1ef10e2
[ "BSD-3-Clause" ]
permissive
fake-name/ReadableWebProxy
24603660b204a9e7965cfdd4a942ff62d7711e27
ca2e086818433abc08c014dd06bfd22d4985ea2a
refs/heads/master
2023-09-04T03:54:50.043051
2023-08-26T16:08:46
2023-08-26T16:08:46
39,611,770
207
20
BSD-3-Clause
2023-09-11T15:48:15
2015-07-24T04:30:43
Python
UTF-8
Python
false
false
658
py
def extractInacloudspaceWordpressCom(item): ''' Parser for 'inacloudspace.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Drunken Exquisiteness', 'Drunken Exquisiteness', ...
e6368bdc60f7acd094e96b47d3e1dccfe59f0286
3e0a2a0e489f41a5b6b8afb1c09227ae2b4a5c92
/picarx.py
01beed36417eb096f35725c41f2d1aaa437169f5
[]
no_license
mlowell28/RobotSystems
0d82f2a9509dd0842be4c71a66182c90478092e7
8407c91044c1db002c8ddd097730d07e8892b96e
refs/heads/main
2023-05-26T05:48:53.198947
2021-06-09T21:18:48
2021-06-09T21:18:48
353,469,095
1
0
null
null
null
null
UTF-8
Python
false
false
4,354
py
from ezblock import * from ezblock import __reset_mcu__ import time import atexit __reset_mcu__() time.sleep(0.01) PERIOD = 4095 PRESCALER = 10 TIMEOUT = 0.02 dir_servo_pin = Servo(PWM('P2')) camera_servo_pin1 = Servo(PWM('P0')) camera_servo_pin2 = Servo(PWM('P1')) left_rear_pwm_pin = PWM("P13") right_rear_pwm_pin ...
4516a4a31e687c163b02622a904cae6e349a07f4
bf9ae1e4269952622c7f03dc86c418d21eb20ec7
/PythonCode-FatherandSon/示例代码/TIO_CH22_2.py
1956584d2e89471f7f30eefe14a58c4e5d5668e8
[]
no_license
ChuixinZeng/PythonStudyCode
5692ca7cf5fe9b9ca24e9f54f6594f3a79b0ffb5
2986c83c804da51ef386ca419d0c4ebcf194cf8f
refs/heads/master
2021-01-21T16:09:58.622069
2019-12-01T14:30:36
2019-12-01T14:30:36
91,876,874
4
4
null
null
null
null
UTF-8
Python
false
false
599
py
# TIO_CH22_2.py # Copyright Warren & Carter Sande, 2013 # Released under MIT license http://www.opensource.org/licenses/mit-license.php # Version $version ---------------------------- # Answer to Try It Out, Question 2, Chapter 22 # Save some data to a text file name = raw_input("Enter your name: ") age = raw_inp...
9b8eaf92a3384ae848cae589c602cbf9bb952432
ff93e108a358a40d71b426bb9615587dfcab4d03
/Python_Basic/5_Dictionaries/basics_of_dict.py
4b5cd56fb88e023dbfd19e8c705493c7c71ddf15
[]
no_license
soumya9988/Python_Machine_Learning_Basics
074ff0e8e55fd925ca50e0f9b56dba76fc93d187
3711bc8e618123420985d01304e13051d9fb13e0
refs/heads/master
2020-03-31T14:31:49.217429
2019-11-16T21:55:54
2019-11-16T21:55:54
152,298,905
0
0
null
null
null
null
UTF-8
Python
false
false
436
py
spam = {'Alice' : 30, 'planets' : ['mars', 'venus', 'earth', 'pluto'], 'pi' : 3.14, 1: 13} # Key, values and items in dictionary print(spam.keys()) print(spam.values()) print(spam.items()) # setdefault method in dict spam.setdefault('colour', 'black') print(spam) spam.setdefault('colour', 'pin...
bb36fa74e3222d89bf01c2cafbdbe15c907ad403
30227ff573bcec32644fca1cca42ef4cdd612c3e
/leetcode/linkedList/problems/tests/test_list_deep_copy.py
ebe297cf39216dcc76a910b90e47673193f9a26c
[]
no_license
saurabh-pandey/AlgoAndDS
bc55864422c93e6c93b8432e483394f286ce8ef2
dad11dedea9ceb4904d6c2dea801ce0172abfc81
refs/heads/master
2023-07-01T09:12:57.951949
2023-06-15T12:16:36
2023-06-15T12:16:36
88,239,921
0
0
null
null
null
null
UTF-8
Python
false
false
1,691
py
import pytest import problems.list_deep_copy as prob def toList(head): output = [] currNode = head while currNode is not None: nodeList = [currNode.val] if currNode.random is not None: nodeList.append(currNode.random.val) else: nodeList.append(None) output.append(nodeList) currN...
643dfe06feab3a458e55f0b9b5cf060e9f8d5409
75f5767b35095d0afcc616925bf6768ec32cb79f
/old/src/coc.py
017875a415bb4f9f88eb95fdeb801f756b6fa62e
[]
no_license
ai-se/cocreport
ca1832d013c45fd908d92de650ac7bc3b5a3d47a
102b9240fdd640ee55564a7d44504b0f29f22add
refs/heads/master
2020-04-06T09:47:50.280628
2016-11-26T18:29:59
2016-11-26T18:29:59
30,427,607
0
1
null
null
null
null
UTF-8
Python
false
false
4,322
py
_ = None; Coc2tunings = [[ # vlow low nom high vhigh xhigh # scale factors: 'Flex', 5.07, 4.05, 3.04, 2.03, 1.01, _],[ 'Pmat', 7.80, 6.24, 4.68, 3.12, 1.56, _],[ 'Prec', 6.20, 4.96, 3.72, 2.48, 1.24, _],[ 'Resl', 7.07, 5.65, 4.24, 2.83, 1.41, _],[ 'Team'...
08b9326e06cca6119034079ff245832c668e5a0b
3b84c4b7b16ccfd0154f8dcb75ddbbb6636373be
/google-cloud-sdk/lib/googlecloudsdk/surface/compute/networks/subnets/describe.py
aa960587e544f5f40969d3afadff5c479fd18533
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
twistedpair/google-cloud-sdk
37f04872cf1ab9c9ce5ec692d2201a93679827e3
1f9b424c40a87b46656fc9f5e2e9c81895c7e614
refs/heads/master
2023-08-18T18:42:59.622485
2023-08-15T00:00:00
2023-08-15T12:14:05
116,506,777
58
24
null
2022-02-14T22:01:53
2018-01-06T18:40:35
Python
UTF-8
Python
false
false
639
py
# Copyright 2015 Google Inc. All Rights Reserved. """Command for describing subnetworks.""" from googlecloudsdk.api_lib.compute import base_classes class Describe(base_classes.RegionalDescriber): """Describe a Google Compute Engine subnetwork. *{command}* displays all data associated with a Google Compute Eng...
d45044c57759e27116e80ecbd70cd22d4cb3dac8
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03418/s290294208.py
0dc31ee21ead32a26ad160f8881c6dff33c39726
[]
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
157
py
n, k = map(int, input().split()) ans = n**2 for b in range(1, n+1): if b > k: ans -= (n//b)*k+min([n%b, max([k-1, 0])]) else: ans -= n print(ans)
9b27a14f61da3ca6e8ef0f45c05e2a1affff2547
6ac2c27121d965babbb4bcbc7c479c26bf60bdf5
/pymatex/search/IndexCreatorVisitor.py
4fe3d2d775c13e181728520af7fba07bb55e3a94
[ "MIT" ]
permissive
Gawaboumga/PyMatex
5a2e18c3e17d3b76e814492f7e2ca63a57d720e9
3ccc0aa23211a064aa31a9b509b108cd606a4992
refs/heads/master
2020-03-28T01:40:32.341723
2018-12-20T13:49:12
2018-12-20T13:49:12
147,521,693
1
0
null
null
null
null
UTF-8
Python
false
false
7,268
py
from pymatex.listener import MatexASTVisitor from pymatex.node import * class IndexCreatorVisitor(MatexASTVisitor.MatexASTVisitor): def __init__(self, data: dict, pk: int): self.data = data self.pk = pk self.nodes_seen = {} self.bound_variables = set() def get_number_of_nodes...
276069bda00ba209a3738e7f975ad78e5243e7ac
a6155458f58f2e40e2583557cf807eda52a0013b
/catalog/database_helpers.py
e58588c048dacef8e37b8ccd0c9d2a8d74ce96d9
[]
no_license
georgeplusplus-ZZ/udacity-project-2
ab6c80052cc601508743fd5003ae5d09103d8fbb
5442f1f99808af2f8663d59fdbd02be7dd7e425a
refs/heads/master
2021-10-26T02:47:28.841918
2019-04-10T01:52:40
2019-04-10T01:52:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
803
py
#George Haralampopoulos 2019 from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from catalog import app from catalog.database_setup import Base import requests def connect_to_database(): """Connects to the database and returns an sqlalchemy session object.""" engine = c...
5ad8c85c4220faba9ed2da5a89e7b73fe36a248d
e4ab984c6d27167849f6c6e2d8ced3c0ee167c7c
/Edabit/Combinations.py
3a5bf494a7486fc769a4c9d00ba532a776266274
[]
no_license
ravalrupalj/BrainTeasers
b3bc2a528edf05ef20291367f538cf214c832bf9
c3a48453dda29fe016ff89f21f8ee8d0970a3cf3
refs/heads/master
2023-02-10T02:09:59.443901
2021-01-06T02:03:34
2021-01-06T02:03:34
255,720,400
0
0
null
null
null
null
UTF-8
Python
false
false
599
py
#Combinations #Create a function that takes a variable number of groups of items, and returns the number of ways the items can be arranged, with one item from each group. Order does not matter. def combinations(*items): l=[] for t in items: l.append(str(t)) multi = 1 for i in l: if i=='0...
f0bb0595cc4ae45f13b3ffda4adab054d0aab904
71efd37d485c43f5872bf35a3fde45ba7aa7d91e
/flask_server_side/app.py
ba35e9257a2ee933810273b47cc01df0f388470f
[]
no_license
jreiher2003/push-notifications
e6f90cb056aad726a6f5049139b36a6dd5368aff
d59ae39929ad0d6fce71ae2ca5b255d940530d62
refs/heads/master
2021-01-11T12:03:42.209063
2016-12-15T14:16:00
2016-12-15T14:16:00
76,565,602
1
0
null
null
null
null
UTF-8
Python
false
false
2,085
py
from flask import Flask, render_template, request, redirect, url_for, Response, session from flask_sse import sse import redis import datetime app = Flask(__name__) # app.config["REDIS_URL"] = "redis://localhost" # app.register_blueprint(sse, url_prefix='/stream') app.secret_key = 'asdf' red = redis.StrictRed...
b8f3957b6f14d803419ff4d6519073e3f1c398a8
489da428bc0e1ab8f5117c0f8ba5ddb7aff05360
/scripts/motors1.py
7d42b31c04843bce8fcf8b7e1775bd5f39123592
[ "BSD-3-Clause" ]
permissive
norihisayamada/pimouse_ros
4f77e769b7ac9cbfc4af6e703764af1d2df56b30
3b07880a6ceb584d92cf640c1a38864130d44189
refs/heads/master
2020-04-17T03:03:49.424738
2019-02-23T11:05:38
2019-02-23T11:05:38
166,164,916
1
0
BSD-3-Clause
2019-01-17T05:18:41
2019-01-17T05:18:41
null
UTF-8
Python
false
false
2,166
py
#!/usr/bin/env python #encoding: utf8 import sys, rospy, math from pimouse_ros.msg import MotorFreqs from geometry_msgs.msg import Twist class Motor(): def __init__(self): if not self.set_power(True): sys.exit(1) rospy.on_shutdown(self.set_power) self.sub_raw = rospy.Subscriber('motor_raw'...
de1581f90bcd424674cf7ab97354de05f7ccfff9
b69e78b6757d7e9ca90272391116fa8c197d9d53
/testEfficientDockSize.py
57604164ef8abdcf8b573be965f813d415cdcd17
[]
no_license
wangyingtaodeepin/autotest-dde-dock
d1cd3146c42d026e9a2f70205a72c65fb1927c7d
89e37500f6ba994df482599a0eeb3f1c175d51de
refs/heads/master
2021-01-09T20:39:48.989833
2016-08-10T01:33:48
2016-08-10T01:33:48
64,373,794
1
0
null
null
null
null
UTF-8
Python
false
false
4,697
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from lib import utils from lib import runner result = True class MyTestResult(runner.MyTextTestResult): def addError(self, test, err): super(MyTestResult, self).addError(test, err) global result result = result and False ...
fa065210ccebf15da4cef79217b04ce380761e8e
d9eafd325ab775b7b32af2dd0b63afc7310be53d
/pfwra/home/migrations/0007_auto_20210326_0755.py
3d4f72d76270133753f0df224c1d54935fa4def2
[ "MIT" ]
permissive
johnkellehernz/pfwra
54b0db7debaed629d6003e0826a15bde2fd4a197
5b8c718bb2f1aaa34e9a718e07baf270294f7ba6
refs/heads/main
2023-05-01T14:39:42.419993
2021-05-13T11:00:07
2021-05-13T11:00:07
353,514,688
0
0
MIT
2021-03-31T23:15:32
2021-03-31T23:15:31
null
UTF-8
Python
false
false
2,085
py
# Generated by Django 3.0.11 on 2021-03-26 07:55 from django.db import migrations import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ('home', '0006_auto_20210324_2004'), ] operations = [ migrations.A...
2e052f979575d022eae6b685e56b2e6187c3b127
e11e0d06e6a55c1e84c9d0cb885651cf2035e476
/ddco_code/lear.py
90d635b116057181ccc75c82b42031a380d46d6d
[ "MIT" ]
permissive
DanielTakeshi/debridement-code
ae5a6413e58e9bae352f0adeae1d09185937dbed
a889dcc6e1c96ac0466afa9e4f7e76015dc3c958
refs/heads/master
2023-01-09T09:05:37.165092
2023-01-02T18:58:16
2023-01-02T18:58:16
96,563,293
3
3
null
null
null
null
UTF-8
Python
false
false
802
py
import pickle import numpy as np from sklearn.ensemble import RandomForestRegressor data = [] f = open('data.p','r') while True: try: d = pickle.load(f) data.append(d) except EOFError: break X = np.zeros((len(data),2)) Y = np.zeros((len(data),2)) for i,d in enumerate(data): Y[i,0...
b1b625c333c9755c0f379779cf9d9b2613b21940
f22ca9aecda111a019502b462ce6772cb22d9425
/test/test_model_response_cart_script_list.py
529c99308a7ddcc364fd9e5a1f1cfcabd2bb5062
[]
no_license
sivanv-unbxd/a2c-sdk-pim
cac05bc6335ddc3c4121d43e2dc476a6fec14965
51a07a0b7f90d74569ad14b47b174da7ac1fc374
refs/heads/main
2023-05-29T05:45:32.279821
2021-06-09T03:52:11
2021-06-09T03:52:11
375,218,584
0
0
null
null
null
null
UTF-8
Python
false
false
982
py
# coding: utf-8 """ Swagger API2Cart API2Cart # noqa: E501 OpenAPI spec version: 1.1 Contact: [email protected] Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.mode...
802549a81d933b4c840beebfe9acc73fcbda6d31
6b9084d234c87d7597f97ec95808e13f599bf9a1
/Dataset/Base/Video/Filter/func.py
b127cbe1276665f6b16fba571f79183c2de87d26
[]
no_license
LitingLin/ubiquitous-happiness
4b46234ce0cb29c4d27b00ec5a60d3eeb52c26fc
aae2d764e136ca4a36c054212b361dd7e8b22cba
refs/heads/main
2023-07-13T19:51:32.227633
2021-08-03T16:02:03
2021-08-03T16:02:03
316,664,903
1
0
null
null
null
null
UTF-8
Python
false
false
3,014
py
from Dataset.Filter.DataCleaning.ObjectCategory import DataCleaning_ObjectCategory from Dataset.Filter.Selector import Selector from Dataset.Filter.SortBySequenceFrameSize import SortBySequenceFrameSize from Dataset.Filter.DataCleaning.Integrity import DataCleaning_Integrity from Dataset.Filter.DataCleaning.BoundingBox...
22deb9e6511ee52c9f835d0a9e15c263ceac0035
1a5ea2453c6365e6f06031e66a6ef8f1ed6be4ce
/main/views.py
9a81be0a45bad9a530661eeed1b72febbf39b514
[]
no_license
gusdn3477/ourSeoul
4283f6a8e49033049ca4c8c6e0386fbfc403ac45
378c89118825e391b85eef734bc287aca7b0d05a
refs/heads/main
2023-04-04T20:11:09.730391
2021-04-18T15:24:42
2021-04-18T15:24:42
343,732,766
0
0
null
null
null
null
UTF-8
Python
false
false
2,831
py
from django.shortcuts import render, redirect from .models import Post # Create your views here. def index(request): return render(request, 'main/index.html') def blog(request): postlist = Post.objects.all() return render(request, 'main/blog.html', {'postlist' : postlist}) def posting(request, pk): po...
363a4f1f4d7a00c347f29e9c2e247a5ba694dacf
e8912ed90e97730b465b1e65084c1dbcc741a73e
/기본/알고리즘 D3/연습문제3.py
ac3b9db49165d8f43f49703867b4736e2a845fa9
[]
no_license
yhnb3/Algorithm_lecture
a0dcefc27ed17bec3cadae56d69e3cc64239cbfb
461367e907e2b8a6a0cdc629e6a9029d9b03fba1
refs/heads/master
2020-12-22T05:39:05.412680
2020-04-10T09:16:19
2020-04-10T09:16:19
236,685,987
0
0
null
null
null
null
UTF-8
Python
false
false
1,217
py
dx_j = [1, 0, -1, 0] # ->, v, <-, ^ 방향순 dy_i = [0, 1, 0, -1] Array = [ [9,20,2,18,11], [19,1,25,3,21], [8,24,10,17,7], [15,4,16,5,6], [12,13,22,23,14] ] IdxTbl = [] # (index1,index2) - key포함X N = len(Array) N2 = N*N for w0 in range(N//2+1): i = j = w0 if N-2*w0-1 == 0: IdxTbl.append((i, j)) ...
85924c934ef3229aa88c7b3b2028fdc8176a95b4
2500a2ab1f43c649fb0b4fe3b9e3420efa017efa
/Push/Sysex.py
d43c691dffbd6990a171e056ad2e9f5919ad2ce4
[]
no_license
cappytan3/AbletonLive9_RemoteScripts
0ce3e2d728190ba2ff5d2422cd03ae8a5df9d46f
65d08fd4ccdadd8366eca6f3c0fa7932516147bf
refs/heads/master
2021-01-15T11:50:14.152579
2014-04-11T17:37:22
2014-04-11T17:37:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,802
py
#Embedded file name: /Users/versonator/Hudson/live/Projects/AppLive/Resources/MIDI Remote Scripts/Push/Sysex.py START = (240, 71, 127, 21) CLEAR_LINE1 = START + (28, 0, 0, 247) CLEAR_LINE2 = START + (29, 0, 0, 247) CLEAR_LINE3 = START + (30, 0, 0, 247) CLEAR_LINE4 = START + (31, 0, 0, 247) WRITE_LINE1 = START + (24, 0,...
5e6038c7c43a05a8327b743a7542d215c3b5ade8
67379c2ae929266f303edc783c8c62edb521174b
/rm/ATResourceManager.py
8182dc0f14ad1ddfd23c07e14d3537d3ca95cfe6
[]
no_license
bbb11808/seata-python
d20be83093d6d084ad36d9292a8ee18ad3bfc8c6
c53b605be423c781d38e599e5bade8df8c81c2d9
refs/heads/master
2023-02-11T01:22:18.488881
2021-01-05T10:10:08
2021-01-05T10:10:08
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,417
py
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # @author jsbxyyx # @since 1.0 from core.context.RootContext import RootContext from core.model.BranchStatus import BranchStatus from core.protocol.RegisterRMRequestResponse import RegisterRMRequest from core.protocol.ResultCode import ResultCode from core.protocol.transact...
638adc9899a92436950cf5c686a1ff37d51413a6
565e2df93c18343d43c6dd216d5885155465f281
/test-runner/method_tests.py
bb50afcfcc250789af5aab358c044af0d034b5d2
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
Azure/iot-sdks-e2e-fx
ac394a188dee5660734c5afea70e12d666dbc92b
1d92dd6c4907760f4d04db251e2f53d5dd325b36
refs/heads/master
2023-09-01T08:25:38.190244
2023-06-13T00:04:21
2023-06-13T00:04:21
165,910,472
15
12
MIT
2023-07-21T19:03:42
2019-01-15T19:27:48
Python
UTF-8
Python
false
false
4,435
py
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for # full license information. import pytest import json import asyncio import limitations from utilities import next_integer, next_random_string from horton_logging import logger async def run_met...
7458582adedec7294e8f56451dc4f117eb73def2
603519e0d087967caac72cce854dc7f1dfaa5262
/bioinformatics stronghold/SSET.py
27596c48d68aa9aa5edd2b69acaab2bc90d4456f
[]
no_license
Morpheus2112/Rosalind-exercise
e591570521a12905864cb7e7f72b66816da7ae3a
e1047a5f6725e07c8cbf17594bfe4969cbc5d708
refs/heads/master
2022-07-25T00:07:17.316099
2020-02-16T07:18:21
2020-02-16T07:18:21
240,848,262
1
0
null
null
null
null
UTF-8
Python
false
false
171
py
# -*- coding: utf-8 -*- """ see http://rosalind.info/problems/sset/ """ def sset(): n = int(open("rosalind_sset.txt").read()) return 2**n % 10**6 print sset()
be56131d0af5ece6f138489628e0b374cdafc512
901f9fb4c3fe2e5ac716462795b365e9e68f8808
/eventsourcing/tests/persistence_tests/test_infrastructure_factory.py
353331bd93dea0bc8b6d7e30c774eb22828af802
[ "BSD-3-Clause" ]
permissive
alexyarmoshko/eventsourcing
e64571fd85c8d9ece5114d950cd47d7649420890
59f79eeaf897d349a9fdd3436ce18fcce78a77a3
refs/heads/master
2023-03-06T04:27:15.346517
2023-02-19T04:10:22
2023-02-19T04:10:22
175,817,681
0
0
BSD-3-Clause
2019-03-15T12:38:06
2019-03-15T12:38:04
null
UTF-8
Python
false
false
730
py
from unittest.case import TestCase from eventsourcing.persistence import InfrastructureFactory from eventsourcing.utils import Environment, get_topic class TestInfrastructureFactoryErrors(TestCase): def test_construct_raises_exception(self): with self.assertRaises(EnvironmentError): Infrastru...
dd108645cdb1bf8c3d67e2aa1b361f00d42b223f
dce8531d0e9665a09205f70a909ac1424f7e09eb
/preprocessor/ljspeech.py
f8511d9cee17454f9dd79d14376ddb543f554717
[ "MIT" ]
permissive
keonlee9420/Comprehensive-Tacotron2
40a6e5fcecf55ee02a8523a7e2701b6124748bee
1eff7f08c41a2127bbe300b6d66ce5c966422b25
refs/heads/main
2023-08-07T16:10:15.133301
2022-02-20T14:30:07
2022-02-20T14:44:36
388,990,172
39
17
MIT
2023-07-31T13:08:05
2021-07-24T03:36:08
Python
UTF-8
Python
false
false
6,997
py
import os import random import json import tgt import librosa import numpy as np from tqdm import tqdm import audio as Audio from text import text_to_sequence from utils.tools import save_mel_and_audio random.seed(1234) class Preprocessor: def __init__(self, config): self.dataset = config["dataset"] ...
d750021583b3df8500064a56702ba10b22f9f8f1
de644b254b17a28f82e9212d80872a3d9eca2149
/lib/gii/core/CommonAsset/AssetListAsset.py
11600ec3b960789afc552d4db6bb2d2c116aac2f
[ "MIT" ]
permissive
pixpil/gii
506bee02b11eb412016b583d807dcfcc485e189c
ba6d94ada86d82bacae06f165567a02585264440
refs/heads/master
2021-12-03T06:30:31.503481
2021-11-24T03:02:49
2021-11-24T03:02:49
431,331,021
4
1
null
null
null
null
UTF-8
Python
false
false
609
py
import os.path from gii.core import AssetManager, AssetLibrary, app, JSONHelper from gii.core import AssetManager class AssetListAssetManager( AssetManager ): def getName(self): return 'asset_manager.asest_list' def getMetaType( self ): return 'asest_list' def acceptAssetFile(self, filepath): if not os.pat...
d5f658bfdf1c021dd3a93bb551fd8042b89315a1
e2bd39106992b592de686e5bd79002edc05cc8bc
/1438-绝对差不超过限制的最长连续子数组/LongestSubarray.py
bb8bc7b83512f73a1ecd2d2492cd7e135b6b3f29
[]
no_license
Mumulhy/LeetCode
9b8ad3af9f9a3b838bdd54727cf8f33401292d27
269419ba2a2840fcf100fa217c5275029ffa229e
refs/heads/master
2022-10-28T23:06:54.081073
2022-10-23T07:48:49
2022-10-23T07:48:49
212,135,892
3
1
null
null
null
null
UTF-8
Python
false
false
2,689
py
# -*- coding: utf-8 -*- # LeetCode 1438-绝对差不超过限制的最长连续子数组 """ Created on Mon Feb 22 17:47 2021 @author: _Mumu Environment: py37 """ class Solution: def longestSubarray(self, nums: list, limit: int) -> int: from collections import deque q_max = deque() q_min = deque() n = len(nums) ...
119e73b6e8614a9c1f97011dc6eecc48113f1c39
023763d9f86116381f5765c51fb8b403e8eef527
/BootCamp_easy/agc004_a.py
f9d155c213a8b4709afce8680a27d6e384024c8e
[]
no_license
Hilary02/atcoder
d45589682159c0f838561fc7d0bd25f0828e578b
879c74f3acc7befce75abd10abf1ab43967fc3c7
refs/heads/master
2021-07-18T11:34:22.702502
2021-07-11T09:04:12
2021-07-11T09:04:12
144,648,001
0
0
null
null
null
null
UTF-8
Python
false
false
146
py
n = [int(w) for w in input().split()] ans = 0 if any([w % 2 == 0 for w in n]): ans = 0 else: n.sort() ans = (n[0]*n[1]) print(ans)
aac72438be6b9f63676bc9abcc3191455c5a9e02
ba88b66e61f0fd1ec0719b61568f0c883d02e534
/entities/migrations/0002_auto_20200727_2336.py
98c50866f7b192f751c81265db69327dca9d464d
[]
no_license
bnmng/spltcs
fbc9b5fb5342f5ee0a8bd080f957b4022509b3e9
5f19136d8a266b3d2094397cafe41b3ca1f45e78
refs/heads/master
2020-12-26T18:47:07.348996
2020-08-02T21:57:44
2020-08-02T21:57:44
237,602,374
0
0
null
2020-03-03T15:07:04
2020-02-01T11:07:46
Python
UTF-8
Python
false
false
983
py
# Generated by Django 3.0.5 on 2020-07-27 23:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('enti...
015ae6ca83ec48f43cc9b164e7a7046d5dfa4f90
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02696/s442403250.py
aa7dd421cd2e17f9ea28382dc57fc3251d1099f4
[]
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
240
py
import sys def input(): return sys.stdin.readline()[:-1] def main(): A, B, N = map(int,input().split()) if B - 1 <= N: print(A * (B - 1) // B) else: print(A * N // B) if __name__ == "__main__": main()
6e3ee2cf99d9871b230518dddfa45f5786599471
f3dddaa239bb428312a46307f1fe2321a1c89c68
/electron_project/devices/migrations/0005_devicesparepartrelation_diagram_code.py
148e96d961c9c4682df27cb6115e35d246f69d6e
[]
no_license
TestAccount2077/mas-electronics-maintenance
e99d9e41c5ccbbc12670c269546dd7be6f48af10
a53399cb59f201ce4bd0bca8cb2eb0dbea396915
refs/heads/master
2020-03-31T09:40:42.900983
2019-01-15T09:46:08
2019-01-15T09:46:08
152,105,739
0
0
null
null
null
null
UTF-8
Python
false
false
491
py
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2018-11-24 09:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('devices', '0004_maintenancedevice_synced'), ] operations = [ migrations.Add...
5625f8133d88c28ad6bdcfbcaf069494513639d2
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/verbs/_flunked.py
42c1e36c44049aaf1dfc6cdc5cff24f4a52ff91a
[ "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
233
py
from xai.brain.wordbase.verbs._flunk import _FLUNK #calss header class _FLUNKED(_FLUNK, ): def __init__(self,): _FLUNK.__init__(self) self.name = "FLUNKED" self.specie = 'verbs' self.basic = "flunk" self.jsondata = {}
fd543333d1da171fadb7732b118a35887c5b68f1
41c605bf3a002a757cb2344cff526d7a7ae56ea9
/_plotly_utils/exceptions.py
11a19a5c7c6fe4348451cb4cde8a903141ea1d55
[ "MIT" ]
permissive
Jonathan-MW/plotly.py
9674b90b5de11fd9089e6afefd04b57bc4587829
7528c00772f44dee24c0df7e15d70a4852f171a8
refs/heads/master
2020-05-30T06:04:13.621478
2019-05-31T10:34:15
2019-05-31T10:34:15
189,571,988
2
0
MIT
2019-05-31T09:59:53
2019-05-31T09:59:53
null
UTF-8
Python
false
false
3,239
py
class PlotlyError(Exception): pass class PlotlyEmptyDataError(PlotlyError): pass class PlotlyGraphObjectError(PlotlyError): def __init__(self, message='', path=(), notes=()): """ General graph object error for validation failures. :param (str|unicode) message: The error message....
8917de073014ee1190491690304d2112fceb28ab
28de04457e8ebcd1b34494db07bde8a3f25d8cf1
/easy/middle_of_the_linked_list_876.py
2530238daf61cbeaa48f6bb08b1fd5ae8d58ff33
[]
no_license
YangXinNewlife/LeetCode
1df4218eef6b81db81bf2f0548d0a18bc9a5d672
20d3d0aa325d79c716acfc75daef32f8d4f9f1ad
refs/heads/master
2023-08-16T23:18:29.776539
2023-08-15T15:53:30
2023-08-15T15:53:30
70,552,512
0
0
null
null
null
null
UTF-8
Python
false
false
697
py
# -*- coding:utf-8 -*- __author__ = 'yangxin_ryan' """ Solutions: 题目很好理解,就是给一个单链表。 需要找到中间节点,奇数的话直接返回,偶数的话,返回后一个即可,那么怎么扫描一遍返回中间节点呢? 我们可以用两个快慢指针。快指针每次走两个,慢指针每次走一个。 """ class MiddleOfTheLinkedList(object): def middleNode(self, head: ListNode) -> ListNode: temp = ListNode(0) temp.next = head ...
c8905d198c2817f8c72f763ae583f167c2b5413f
f38ce96def797a2095e153b1bb4badf83b59b61c
/alarm_emaild.py
7ac1f0fc8ad2ee654d9a5805e617737e4db1f2e6
[]
no_license
jy02383505/bermuda3
7883d8e701a9369ad6dd935db96866dd24c079a5
284119226c963d638afe61d1593bc60b7ec85a49
refs/heads/master
2022-02-03T14:40:10.395805
2020-01-03T03:21:41
2020-01-03T03:21:41
231,504,181
1
0
null
2022-01-06T22:41:00
2020-01-03T03:21:19
Python
UTF-8
Python
false
false
249
py
# !/usr/bin/env python # -*- coding: utf-8 -*- # Created by 'vance' on '11/25/14'. __doc__ = '' __ver__ = '1.0' __author__ = 'vance' from util.failed_task_alarm import run def main(): run() if __name__ == "__main__": main() exit()