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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b061c3368030ac7ae92697ca5da5682ac255946 | 8966d83bf85d4738d644624bd7b7063e8534a515 | /data.d/code/python/scrap/optimize_LOAD_ATTR.scrap.py | 411cd720348a27ff7ce4fb3f27bdfc04aa0f4e41 | [] | no_license | taka16a23/.emacs.d | 84a77c04c4d5e00c089cb01cc42a94b884f729ae | ac5794e2594037e316d5fe9cf6bf1fd20b44a726 | refs/heads/master | 2023-05-29T06:25:38.449977 | 2023-05-16T22:08:04 | 2023-05-16T22:08:04 | 82,106,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,274 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""JUNK"""
import os
import sys
import re
def tes():
join = os.path.join
return join('/tmp', 'tes')
def tes2():
return os.path.join(os.path.join('/tmp', 'tes'), 'world')
# In [210]: /dis.dis tes2
# 2 0 LOAD_GLOBAL 0 (os)
# 3 LOAD_ATTR ... | [
"root@qu"
] | root@qu |
f1ec438958dfb2aa20ebfa4f8db8a8a237b85e2b | 7839d009f3ae0a0c1bc360b86756eba80fce284d | /devel/lib/python2.7/site-packages/diagnostic_updater/__init__.py | aa94981d4a2326352df5cf363effb5dc06091e97 | [] | no_license | abhat91/ros_osx | b5022daea0b6fdaae3489a97fdb1793b669e64f5 | 39cd8a79788d437927a24fab05a0e8ac64b3fb33 | refs/heads/master | 2021-01-10T14:43:41.047439 | 2016-03-13T23:18:59 | 2016-03-13T23:18:59 | 53,812,264 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,048 | py | # -*- coding: utf-8 -*-
# generated from catkin/cmake/template/__init__.py.in
# keep symbol table as clean as possible by deleting all unnecessary symbols
from os import path as os_path
from sys import path as sys_path
from pkgutil import extend_path
__extended_path = "/Users/adityabhat/Downloads/src/diagnostics/dia... | [
"abhat@wpi.edu"
] | abhat@wpi.edu |
df50a888254f27e6707d22969064b1543e54f4c6 | 1c91439673c898c2219ee63750ea05ff847faee1 | /configs/_base_/models/mvit/mvitv2-small.py | bb9329df0b376ef67914d4952ca5e3a01b1c3bcf | [
"Apache-2.0"
] | permissive | ChenhongyiYang/GPViT | d7ba7f00d5139a989a999664ab0874c5c9d53d4d | 2b8882b2da41d4e175fe49a33fcefad1423216f4 | refs/heads/main | 2023-06-08T00:10:07.319078 | 2023-05-26T15:52:54 | 2023-05-26T15:52:54 | 577,075,781 | 78 | 2 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | model = dict(
type='ImageClassifier',
backbone=dict(type='MViT', arch='small', drop_path_rate=0.1),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
in_channels=768,
num_classes=1000,
loss=dict(
type='LabelSmoothLoss', label_smooth_val=... | [
"chenhongyiyang@Chenhongyis-MacBook-Pro.local"
] | chenhongyiyang@Chenhongyis-MacBook-Pro.local |
cfc365eb5d4e511baae045e2480385710cf5af57 | 89b46551ac0c0f45e07724aee144813022aa784c | /micropython/codigo/image_anim.py | fa69fd14afa58bba662549a5474da9bdaa4c290d | [] | no_license | javacasm/BBC-microbit | 6fcb701f48c3636945fb1cd2c925cbb810116cfa | 1b20669598adb652ce4a62db5e42870eddec27ea | refs/heads/master | 2021-08-19T20:33:01.953276 | 2021-01-21T18:51:50 | 2021-01-21T18:51:50 | 88,613,144 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | from microbit import *
boat1 = Image("05050:"
"05050:"
"05050:"
"99999:"
"09990")
boat2 = Image("00000:"
"05050:"
"05050:"
"05050:"
"99999")
boat3 = Image("00000:"
"00000:"
"050... | [
"javacasm@gmail.com"
] | javacasm@gmail.com |
61619dcee7aa5dc90ecbd596bb775fbebbc20ad7 | dc39ccc50b7d34e5de84f3cc132c5cc096a32656 | /BASIC/format_string/2-new_f_string.py | 819179aa3751e7b5a40b88efcb38f2fbfd600406 | [] | no_license | Shukladas1115/Python | 0947aefd62a9ce4c3140360cb7259b031368709c | feb32bc2e2e7df377fc2d92330bfdacb83f31a55 | refs/heads/master | 2022-02-20T04:15:56.036495 | 2019-08-26T16:36:52 | 2019-08-26T16:36:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | name = "Eric"
age = 74
# Dùng f string trực quan, ít lỗi hơn
print(f"Hello, {name}. You are {age}.")
# Evaluate hàm tính toán
print(f"{2 * 37}")
def to_lowercase(text):
# Định nghĩa hàm lower case mới
return text.lower()
name = "Eric Idle"
# gọi hàm bên trong f string
print(f"{to_lowercase(name)} is funny... | [
"minhhien90@gmail.com"
] | minhhien90@gmail.com |
fd1de3f86ea0b663563d1ff210db05922b40b4db | 786de89be635eb21295070a6a3452f3a7fe6712c | /ipython/tags/V00-00-02/SConscript | 1fdb0bf7229b6bb11ea276b50e665e801cf88e30 | [] | no_license | connectthefuture/psdmrepo | 85267cfe8d54564f99e17035efe931077c8f7a37 | f32870a987a7493e7bf0f0a5c1712a5a030ef199 | refs/heads/master | 2021-01-13T03:26:35.494026 | 2015-09-03T22:22:11 | 2015-09-03T22:22:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 664 | #------------------------------------------------------------------------
# File and Version Information:
# $Id$
#
# Description:
# SConscript file for package ipython
#------------------------------------------------------------------------
# Do not delete following line, it must be present in
# SConscript file fo... | [
"salnikov@SLAC.STANFORD.EDU@b967ad99-d558-0410-b138-e0f6c56caec7"
] | salnikov@SLAC.STANFORD.EDU@b967ad99-d558-0410-b138-e0f6c56caec7 | |
8711c2762291240f70b2d3a63f3512cd2b0e26b8 | 1a6cbe035adb81fea66615323a836327d06f9e72 | /year2020/d10.py | bf66f7da8b23a1feefc1fc5fb581e15bc73a3325 | [] | no_license | ecurtin2/advent-of-code | a2607d857408d722b07d4cfc66855edcd019cda7 | 216db926c5bab9bf1ec3cac2aa912c1a2ff70d6c | refs/heads/main | 2022-12-15T10:06:51.202608 | 2022-12-14T17:28:15 | 2022-12-14T17:28:15 | 160,612,467 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,034 | py | from collections import Counter
from functools import lru_cache
from typing import List, Tuple
from utils import diff
def part1(inp: List[int]) -> int:
c = Counter(diff([0] + sorted(inp) + [max(inp) + 3]))
return c[1] * c[3]
@lru_cache
def solve_part2(choices: Tuple[int], curr_idx: int = 0) -> int:
if ... | [
"ecurtin2@illinois.edu"
] | ecurtin2@illinois.edu |
36712b5c7b61f5c7fa17c305487e5a7835a48b54 | bfc25f1ad7bfe061b57cfab82aba9d0af1453491 | /data/external/repositories/141822/AXA_Telematics-master/Features/modules_janto/csvToNpy.py | 07f632a65572805c4523c5d83f45c1df7061fd33 | [
"MIT"
] | permissive | Keesiu/meta-kaggle | 77d134620ebce530d183467202cf45639d9c6ff2 | 87de739aba2399fd31072ee81b391f9b7a63f540 | refs/heads/master | 2020-03-28T00:23:10.584151 | 2018-12-20T19:09:50 | 2018-12-20T19:09:50 | 147,406,338 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | """
(c) 2015
@author: Janto Oellrich
email: joellrich@uos.de
CONTENT:
Converts GPS data files to .npy files and stores them in same driverfolders.
"""
from modules import *
from paths import *
driverFolder = DATA
print '\nConverting raw .csv files to numpy files...\n'
drivers = sorted([int(folderNam... | [
"keesiu.wong@gmail.com"
] | keesiu.wong@gmail.com |
0de15246bdef34325d871366771eacec64554834 | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /tools/perf/page_sets/system_health/platforms.py | 6c6f2a5728e95286fb0b7d800d3594871dc45185 | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"APSL-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown",
"MIT",
"Zlib"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | Python | false | false | 527 | py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DESKTOP = 'desktop'
MOBILE = 'mobile'
ALL_PLATFORMS = frozenset({DESKTOP, MOBILE})
# Use the constants below to mark on which platforms the story has WPR
#... | [
"sunny.nam@samsung.com"
] | sunny.nam@samsung.com |
cdd03d22aea4b1d5b008fc2cb9fe450219a35f18 | f3b233e5053e28fa95c549017bd75a30456eb50c | /mcl1_input/L33/33-35_MD_NVT_rerun/set_1ns_equi_2.py | c1f02cbe3c6d2cea942ae9f80c068d62fb4e3cf7 | [] | no_license | AnguseZhang/Input_TI | ddf2ed40ff1c0aa24eea3275b83d4d405b50b820 | 50ada0833890be9e261c967d00948f998313cb60 | refs/heads/master | 2021-05-25T15:02:38.858785 | 2020-02-18T16:57:04 | 2020-02-18T16:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | import os
dir = '/mnt/scratch/songlin3/run/mcl1/L33/MD_NVT_rerun/ti_one-step/33_35/'
filesdir = dir + 'files/'
temp_equiin = filesdir + 'temp_equi_2.in'
temp_pbs = filesdir + 'temp_1ns_equi_2.pbs'
lambd = [ 0.00922, 0.04794, 0.11505, 0.20634, 0.31608, 0.43738, 0.56262, 0.68392, 0.79366, 0.88495, 0.95206, 0.99078]
for... | [
"songlin3@msu.edu"
] | songlin3@msu.edu |
5c05249d5dbcf1881be3e6a4d131d59f02f0b5a3 | d87483a2c0b50ed97c1515d49d62c6e9feaddbe0 | /.history/get_positions_20210205012258.py | e1d35a3da1efac765ccd23b1ed8b848ca77b680a | [
"MIT"
] | permissive | HopperKremer/hoptrader | 0d36b6e33922414003cf689fb81f924da076a54b | 406793c10bc888648290fd15c7c2af62cf8c6c67 | refs/heads/main | 2023-06-12T15:51:00.910310 | 2021-07-06T16:15:41 | 2021-07-06T16:15:41 | 334,754,936 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,135 | py | # Buy top tickers from Financhill
import requests
from tda import auth, client
from tda.orders.equities import equity_buy_market, equity_buy_limit
from tda.orders.common import Duration, Session
import os, sys
import time
from selenium import webdriver
import json
currentdir = os.path.dirname(os.path.realpath(__file__... | [
"hopperkremer@gmail.com"
] | hopperkremer@gmail.com |
909dad098632578f78f6ba8b2ec3cf22ce719682 | f063793a713b049a42d92b741d169d22dfb5543e | /onmt/encoders/transformer_cat.py | e34bd50dd2337fe60c611af4e2d55a4f738ccb35 | [
"MIT"
] | permissive | marcwww/OpenNMT-py | 4d77de177f6d630fe3f8bdfed911e9c5ac689406 | 7f83ca3c680b1ae282b879b3a28bb156466e6a2e | refs/heads/master | 2020-03-19T19:37:09.986531 | 2018-07-13T17:50:30 | 2018-07-13T17:50:30 | 136,866,153 | 0 | 0 | null | 2018-06-11T02:45:25 | 2018-06-11T02:45:25 | null | UTF-8 | Python | false | false | 3,890 | py | """
Implementation of "Attention is All You Need"
"""
import torch.nn as nn
from torch.autograd import Variable
import torch
import onmt
from onmt.encoders.encoder import EncoderBase
from onmt.utils.misc import aeq
from onmt.utils.transformer_util import PositionwiseFeedForward
MAX_SIZE = 5000
class TransformerEnco... | [
"474733787@qq.com"
] | 474733787@qq.com |
527fde37fbee89720bdbf5351e510c414e12a578 | 09120532659f7eb134163f92ac2f65423a04dc03 | /zproject/django/survey/webapi/views.py | 6ecdec610b8e9fba6131b300479d375c7577bd05 | [] | no_license | hoboland21/survey | 7b2dafd76db0e9317037a0cec163a97c0ec9a8ec | 93e71f3304b381a6be03c8f813d2ba3a0b6eb218 | refs/heads/master | 2023-01-28T07:38:38.934710 | 2019-05-13T08:55:41 | 2019-05-13T08:55:41 | 182,874,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,937 | py | from rest_framework import status,viewsets
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import generics
from django.http import Http404
from django.contrib.auth.models import User
from django.db.models import Q
from .serializers import *
#=================... | [
"jc@saipantech.com"
] | jc@saipantech.com |
c29452a46cca862caf362a8cad6406a1575a2ada | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_trapezes.py | 92d3dc49f27650672ebbd15705593b4202abb5da | [
"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 | 226 | py |
#calss header
class _TRAPEZES():
def __init__(self,):
self.name = "TRAPEZES"
self.definitions = trapeze
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['trapeze']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
46496584ed7fb4f9b7ceab8cc8ea71298773897a | b67797b54b1486c4450bcbd0f9a5494c4fad3203 | /galaxy/code/feat_extract/method_gray.py | acc6ed5dc60aedf7ec644e39d5db4ea3ff52b3ee | [] | no_license | clement91190/ml | d0dd2d297148a03bab84849bf8bd8915da7deb04 | da4186835d700c84ebe1bce217386dc8ee768c2c | refs/heads/master | 2021-01-20T05:54:50.145100 | 2014-03-22T19:34:28 | 2014-03-22T19:34:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,219 | py | """ simple feature extraction using black and white features"""
from PIL import Image
import numpy as np
from code.feat_extract.utils import save_testing, save_training, load_data, prepare_train_valid_test
class GrayExtractor():
def __init__(self):
self.pixelSize = 4
self.img_size = 36
sel... | [
"clem.jambou@gmail.com"
] | clem.jambou@gmail.com |
a0ac129467b6767a5719ceb9650a3770cab335c5 | 56e4c0ec8366585bffe6c61fcd8f167dec83c68a | /product_template_links/__openerp__.py | ba7fd7972017f239539504473bceb14e49ae2e25 | [] | no_license | davidts-leathergoods/odoo7 | 837d2e4b493f75c3d65359a6c6ef994f0d2cb0bc | bb925edf7eaee44a96da12cbb86263ece0ae052c | refs/heads/master | 2020-03-16T02:25:39.403718 | 2018-04-17T13:32:11 | 2018-04-17T13:32:11 | 132,464,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2011-2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | [
"lebrun.nya@bpso.biz"
] | lebrun.nya@bpso.biz |
b528e96e7bdef6096926c67f11b9f893b0c38f4c | e02dbefe9f362c3e9b2849c1e22c0ab27e010164 | /이것이 코딩 테스트다 - 기출문제/16. 연구소.py | 3ca85f47daf2688d9bafe81b4fccee169557e536 | [] | no_license | hoyeoon/CodingTest | ac77574539a7a96cbdb64eb1768ba20ab6ad3b4f | 4d34b422f0dc85f3d506a6c997f3fa883b7162ab | refs/heads/master | 2023-06-05T17:43:38.348537 | 2021-06-28T10:05:22 | 2021-06-28T10:05:22 | 378,081,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,535 | py | from itertools import combinations
from collections import deque
import copy
moves = [(-1, 0), (0, -1), (1, 0), (0, 1)]
def bfs(x, y):
queue = deque()
queue.append((x, y))
while queue:
x, y = queue.popleft()
for i in range(4):
nx = x + moves[i][0]
ny = y + moves[i... | [
"chy1995@ajou.ac.kr"
] | chy1995@ajou.ac.kr |
2d62d2c1c44e8fc0146503906c5c64cd36f3d4e5 | 9b92ae3e12ac1212939abc3136c9acd9a1b2ad64 | /tests/collectd.py | c5409cc3e343cdfbac831b83396d274e6328408e | [
"MIT"
] | permissive | popravich/zorro | 18fb42bc00005498766641a98200a424e55120c3 | 2543f6085326d37bc1f517943663eb36fbbfec8d | refs/heads/master | 2021-01-24T01:59:38.653253 | 2013-03-10T17:49:35 | 2013-03-10T17:49:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,831 | py | from .base import Test, interactive, passive
import os
import zmq
import time
import socket
TEST_SOCKET = '/tmp/zorro-collectd-test'
class TestCollectd(Test):
def setUp(self):
super().setUp()
import zorro.collectd
def collectd_putval(self):
self.z.sleep(0.1)
sock = self.z.... | [
"paul@colomiets.name"
] | paul@colomiets.name |
d867986abc52fb778772a2e3f5153029d90c845c | a25aa2c5b075c10f4e6752361833ffb518a31272 | /misoclib/com/liteethmini/mac/core/padding.py | fbd878335e9a45402fe7ec7206af222c0610c69c | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | timvideos/misoc | 373a0da9d2ade7ebdefe3c171a13d025f0ab15ef | 4711f7cfb0c102e177856f5e2ca4208a57de736d | refs/heads/legacy | 2021-01-18T17:19:34.755632 | 2016-07-19T08:51:42 | 2016-07-19T08:52:37 | 50,424,198 | 0 | 0 | null | 2016-04-17T02:09:11 | 2016-01-26T11:23:51 | Python | UTF-8 | Python | false | false | 1,691 | py | from misoclib.com.liteethmini.common import *
class LiteEthMACPaddingInserter(Module):
def __init__(self, dw, padding):
self.sink = sink = Sink(eth_phy_description(dw))
self.source = source = Source(eth_phy_description(dw))
# # #
padding_limit = math.ceil(padding/(dw/8))-1
... | [
"florent@enjoy-digital.fr"
] | florent@enjoy-digital.fr |
15486477d74937600ec49b78d5b925f6ca820f4c | 0ddcfcbfc3faa81c79e320c34c35a972dab86498 | /tests/test_number_of_1_bits.py | 724a8d3f3c3a9c5afad14909f6bd6471e95756d3 | [] | no_license | IvanWoo/coding-interview-questions | 3311da45895ac4f3c394b22530079c79a9215a1c | 1312305b199b65a11804a000432ebe28d1fba87e | refs/heads/master | 2023-08-09T19:46:28.278111 | 2023-06-21T01:47:07 | 2023-06-21T01:47:07 | 135,307,912 | 0 | 0 | null | 2023-07-20T12:14:38 | 2018-05-29T14:24:43 | Python | UTF-8 | Python | false | false | 335 | py | from pickletools import pyset
import pytest
from puzzles.number_of_1_bits import hamming_weight
@pytest.mark.parametrize(
"n, expected",
[
(0, 0),
(1, 1),
(2, 1),
(3, 2),
(4, 1),
(5, 2),
],
)
def test_hamming_weight(n, expected):
assert hamming_weight(... | [
"tyivanwu@gmail.com"
] | tyivanwu@gmail.com |
b9a751c27f23e384b2032bb765ed94cd48592009 | 600df3590cce1fe49b9a96e9ca5b5242884a2a70 | /tools/swarming_client/third_party/infra_libs/event_mon/checkouts.py | 92532b8cb66b77b3e01e8c43e8353c2301a3cf7c | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-unknown",
"MIT"
] | permissive | metux/chromium-suckless | efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a | 72a05af97787001756bae2511b7985e61498c965 | refs/heads/orig | 2022-12-04T23:53:58.681218 | 2017-04-30T10:59:06 | 2017-04-30T23:35:58 | 89,884,931 | 5 | 3 | BSD-3-Clause | 2022-11-23T20:52:53 | 2017-05-01T00:09:08 | null | UTF-8 | Python | false | false | 2,083 | py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Functions in this file relies on depot_tools been checked-out as a sibling
# of infra.git.
import logging
import os
import re
import subprocess
BASE_DIR... | [
"enrico.weigelt@gr13.net"
] | enrico.weigelt@gr13.net |
92a9672695a80e138b58352e5fdf60632fcf45af | f428e913527744e8386f4b804be5e9d4183bba81 | /Agreement/CS/skio/cs.py | 0f703f09cec249638879da0b6b44dc9601a88ac3 | [] | no_license | a452669850/DCSBJ | b6940b13bab583811322393c720863cb64ab9cd4 | b03b1c98982f94847d97abca3051f1ef1c5cc178 | refs/heads/master | 2023-01-02T00:47:36.457822 | 2020-10-20T13:03:50 | 2020-10-20T13:03:50 | 305,708,873 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,079 | py | import socket
import struct
import time
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('127.0.0.1', 19114))
sock.listen(10)
while True:
c, addr = sock.accept()
while True:
time.sleep(.1)
data = c.recv(4)
if not data:
break
a = struct.unpack('>HH... | [
"a452669850@outlook.com"
] | a452669850@outlook.com |
5586211e54a9a237322b12530ac1232be60f7c22 | 938eb0ff05166f97fa4fac8743f3dc50482873a9 | /src/simulate/assets/gltflib/utils/file_utils.py | bf1591fb5fb75088d4a6fc5f5ed72d28a5bf9a83 | [
"Apache-2.0"
] | permissive | huggingface/simulate | e267b12972975f58c9e97979ad40e9c0197c4b4c | 515361cea59f90d528f39c74178453e75d01dcea | refs/heads/main | 2023-06-01T10:38:02.322864 | 2023-03-22T16:24:01 | 2023-03-22T16:24:01 | 483,995,540 | 143 | 10 | Apache-2.0 | 2023-04-11T21:55:59 | 2022-04-21T09:52:02 | Python | UTF-8 | Python | false | false | 1,603 | py | # Copyright 2022 The HuggingFace Authors.
# Copyright (c) 2019 Sergey Krilov
# Copyright (c) 2018 Luke Miller
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including ... | [
"noreply@github.com"
] | huggingface.noreply@github.com |
aaf631a1ad0d3a935e7da47c2fc0f0ed2be45f55 | 5f62568ee3731797a34a6e86077973b563679c85 | /Day1/Examples/ex_avi/example_audio.py | 8dc4c1d8d8fbfbfec9284a47844d146c27ede547 | [] | no_license | nadia-el/Projects-and-Related-Technologies | 16a7b0d232bfb3f5bfec5dc1614dbacf3786795d | 2d80f45d9e6dde5c3ad325da87e1160f3621cfc1 | refs/heads/master | 2021-09-18T05:29:15.263268 | 2018-07-10T06:30:02 | 2018-07-10T06:30:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 826 | py | import wave
def read_audio():
file_pointer = wave.open('Sample_WAV.wav')
# Get number of frames from the stream
print(file_pointer.getnframes())
# Get number of channels from the stream
print(file_pointer.getnchannels())
# Read n frames
print(file_pointer.readframes(10))
# Rewing file_... | [
"ash2shukla@gmail.com"
] | ash2shukla@gmail.com |
8a6ca9a9d8ec9ce144690451ccec188b14dfbd19 | 2bcc421ee345b00cf805c543b37d18b5d019dc04 | /adafruit-circuitpython-bundle-6.x-mpy-20201126/examples/us100_simpletest.py | d9b6d2314779eaa75ba1259d06dbdebf4362e632 | [] | no_license | saewoonam/sc-current-source-titano | 5a1ad46889c1b09c168424901fd71cb4eab5c61b | 1c136aa8b61268d9ac0b5a682b30ece70ab87663 | refs/heads/main | 2023-03-02T22:12:26.685537 | 2021-02-09T03:28:01 | 2021-02-09T03:28:01 | 317,299,900 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 651 | py | import time
# For use with a microcontroller:
import board
import busio
import adafruit_us100
uart = busio.UART(board.TX, board.RX, baudrate=9600)
# For use with USB-to-serial cable:
# import serial
# import adafruit_us100
# uart = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=1)
# For use with... | [
"nams@nist.gov"
] | nams@nist.gov |
c40b09291489c3e19b37c9ad9705bf6e5b457234 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /hBFo8jAu5E7824esW_2.py | 573368e0959900851371910bcb0afb3f3e050bd1 | [] | 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 | 493 | py | """
Create a function that takes a string and returns the word count. The string
will be a sentence.
### Examples
count_words("Just an example here move along") ➞ 6
count_words("This is a test") ➞ 4
count_words("What an easy task, right") ➞ 5
### Notes
* If you get stuck on a challenge, f... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
90b1644f10d549145410cf51d55f780f25235651 | 15651d6c142a572c7d0900922b49d66b19c7dcf5 | /personal_mycroft_backend/stt/__init__.py | 8194d0c82c1e2b9db95b4f298a7e652568eb2e51 | [] | no_license | hckr/personal-backend | 7c6660903d219e34039d2dcbd551ab525a84ba0f | 074cbebd382129569c7dfa782358d8887f341db8 | refs/heads/master | 2023-04-07T03:46:03.056365 | 2019-01-07T07:48:39 | 2019-01-07T07:48:39 | 166,071,210 | 1 | 0 | null | 2023-04-04T01:27:56 | 2019-01-16T16:18:24 | Python | UTF-8 | Python | false | false | 7,237 | py | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | [
"jarbasai@mailfence.com"
] | jarbasai@mailfence.com |
223045b58af129031ac8344052a1591a327c507d | 39012496de39814fa6ceb6a7defbe1046be6e712 | /backend/task_profile/models.py | 391ebe5957bb5c992de850b1f177c0628cd0cbc9 | [] | no_license | crowdbotics-apps/tcg-project-28650 | ee8561b7fb1d9a53a6ed81a326503abcc8e8e337 | 2dbf710b78b9eae45f8ea44e25b13d5465835336 | refs/heads/master | 2023-06-13T02:25:07.906417 | 2021-07-09T03:56:54 | 2021-07-09T03:56:54 | 384,314,758 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,257 | py | from django.conf import settings
from django.db import models
class Notification(models.Model):
"Generated Model"
type = models.CharField(
max_length=20,
)
message = models.TextField()
user = models.ManyToManyField(
"users.User",
related_name="notification_user",
)
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
cc4feaab7c61092855dc0d591f18a6fda6882f5d | ea0c0b8d67a42086f840149b3dbe1c0e4f58e56f | /members_area/migrations/0009_auto_20200129_2320.py | 53813b431c5305c0ea164b0e663a8ec1b1c1223f | [
"MIT"
] | permissive | AzeezBello/raodoh | 78b27e0886f8882144a4def160d9c3f53bcc6af9 | 296bd44069bd750557bf49995374601f5052d695 | refs/heads/master | 2022-05-03T05:07:21.632642 | 2020-02-26T10:16:08 | 2020-02-26T10:16:08 | 235,878,080 | 0 | 0 | MIT | 2022-04-22T23:01:27 | 2020-01-23T20:15:39 | JavaScript | UTF-8 | Python | false | false | 593 | py | # Generated by Django 2.2.9 on 2020-01-29 22:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('members_area', '0008_auto_20200129_2308'),
]
operations = [
migrations.RemoveField(
model_name=... | [
"azeez@scholarx.co"
] | azeez@scholarx.co |
4045a6cb7be93790c0868f554e6bebaffc88955d | 7e145d1fff87cdabf7c9ae9c08637f299fbd3849 | /223. Rectangle Area.py | 1689da3e3d801f1f876f0bd52acecbe7c99dba3c | [] | no_license | dundunmao/LeetCode2019 | 2b39ef181a7f66efc9de7d459b11eb1a4a7f60a8 | 9b38a7742a819ac3795ea295e371e26bb5bfc28c | refs/heads/master | 2020-09-16T16:46:50.482697 | 2020-06-07T08:01:16 | 2020-06-07T08:01:16 | 223,833,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | class Solution:
def computeArea(self, A: int, B: int, C: int, D: int, E: int, F: int, G: int, H: int) -> int:
areaA = (C - A) * (D - B)
areaB = (G - E) * (H - F)
left = max(A, E)
right = min(C, G)
top = min(D, H)
bottom = max(B, F)
overlap = 0
if ri... | [
"dundunmao@gmail.com"
] | dundunmao@gmail.com |
8ebf8743f22c97f86a93c623e3cc602bb86da349 | 65cbdee636243578898e2b3fc9a72bd504b3f756 | /bbopt/backends/random.py | 3244d8a30b0aa0a8d9931b44af82313cd3093fb3 | [
"Apache-2.0"
] | permissive | DEATH-FROM-AI/bbopt | c2ca02dd531524aa7cbf0c389a306e1a9e586d3c | c20b5173039821d38baf13eccf55242cb0364e4d | refs/heads/master | 2022-12-02T12:20:24.545790 | 2020-08-23T07:30:11 | 2020-08-23T07:30:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,848 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __coconut_hash__ = 0x64a736e4
# Compiled with Coconut version 1.4.3-post_dev46 [Ernest Scribbler]
"""
The random backend. Does not use existing data, simply spits out random valid values.
"""
# Coconut Header: -----------------------------------------------------------... | [
"evanjhub@gmail.com"
] | evanjhub@gmail.com |
2627c10cbe57556be230d9b4da0fba414ead31dc | af7ba9f8814217fe94e0ed5ebec8fc5865095288 | /tests/test_convert.py | 37919ff98820d161126e3fcc032e2326ba186877 | [
"MIT"
] | permissive | LightTerminal/pyatv | 47462862f77a43acab9a5fc76f71800e4ae9b3e2 | cf3acaa2a152309f0df9d2f6d4bd9d50ec84a66f | refs/heads/master | 2021-06-24T18:36:40.379282 | 2017-09-08T17:30:00 | 2017-09-08T19:50:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,549 | py | """Unit tests for pyatv.convert."""
import unittest
from pyatv import (const, convert, exceptions)
# These are extracted from iTunes, see for instance:
# http://www.blooming.no/wp-content/uploads/2013/03/ITLibMediaItem.h
# and also this:
# https://github.com/melloware/dacp-net/blob/master/Melloware.DACP/DACPResponse... | [
"pierre.staahl@gmail.com"
] | pierre.staahl@gmail.com |
37d743d317f80041a4d0876462b5b8fcd175ce00 | 81f999d6f8e622542212e6fc2b5e328b06ced75d | /public/log.py | 26e09611d6f5c3711775c66458c1dc22996f3029 | [] | no_license | lujinda/zjypan | 37beab246b1ceb84ae24330b742d3a9bf7a635a5 | fcc2a8ff221eeaebaced84735b3e12b3584efc8c | refs/heads/master | 2021-01-01T20:49:04.984315 | 2015-07-12T08:25:33 | 2015-07-12T08:25:33 | 29,416,929 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,441 | py | #!/usr/bin/env python
#coding:utf8
# Author : tuxpy
# Email : q8886888@qq.com
# Last modified : 2015-02-16 20:28:58
# Filename : public/log.py
# Description :
from public.data import log_db_sync
import time
def get_start_stop_time(start, stop=None):
stop = stop or start
assert... | [
"q8886888@gmail.com"
] | q8886888@gmail.com |
9ba3257e222154805ee7d9ce4f06ac74e3e69809 | 2b0a8a94692e93a6fc6b24374487fbde82a8d6ee | /SciKit/Regression/Algorithms/RandomForestRegressor/randomForestRegressorHousing.py | c0e953b08718400d3a17bb3b45b3c1aa4ed072a1 | [] | no_license | marcduby/MachineLearningPython | 5b59293489f7a7c2002815f8a3f44ce17a051c0c | 8cc37fea87723acbe011e32b7a6c6f9f37379e10 | refs/heads/master | 2023-08-31T20:26:36.581931 | 2023-08-30T17:56:13 | 2023-08-30T17:56:13 | 163,126,454 | 0 | 2 | null | 2023-02-16T00:52:04 | 2018-12-26T02:19:11 | Jupyter Notebook | UTF-8 | Python | false | false | 1,834 | py | # reference page 117 of the scikit book
# imports
from sklearn.datasets import load_boston
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_squared_error, mean_absolute_error
def score_model(model, X_train, y_train, ... | [
"mduby@broadinstitute.org"
] | mduby@broadinstitute.org |
880bbe97ebaec3a8ca4b1f502bfee99a5cf3d9ce | 392e0215bd45d7494ef8e8c0fcec1914616f94c9 | /divik/_matlab_legacy.py | b08f1c7260fad455c99526d9c2ff8cdcb4534e1d | [
"Apache-2.0"
] | permissive | gmrukwa/divik | 7e32ed48198234668543a8ae730e73d61f630ab8 | e781b4bc94e200fa64507eb9f31cd18ea24a23b3 | refs/heads/master | 2023-08-31T00:49:20.250687 | 2023-08-23T09:33:03 | 2023-08-23T09:33:03 | 215,654,972 | 14 | 5 | Apache-2.0 | 2023-08-22T09:54:47 | 2019-10-16T22:22:37 | Python | UTF-8 | Python | false | false | 1,279 | py | """Access to MATLAB legacy functionalities."""
import faulthandler
from contextlib import contextmanager
import numpy as np
import gamred_native as gn
@contextmanager
def sigsegv_handler():
was_enabled = faulthandler.is_enabled()
faulthandler.enable()
yield
if not was_enabled:
faulthandler.d... | [
"g.mrukwa@gmail.com"
] | g.mrukwa@gmail.com |
b26a250b550b7f08ba5b780913fc720c2020970a | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r9/Gen/DecFiles/options/11104162.py | 8c154403ccaf1cd94a2c8809b31d2ec3473350e8 | [] | no_license | Sally27/backup_cmtuser_full | 34782102ed23c6335c48650a6eaa901137355d00 | 8924bebb935b96d438ce85b384cfc132d9af90f6 | refs/heads/master | 2020-05-21T09:27:04.370765 | 2018-12-12T14:41:07 | 2018-12-12T14:41:07 | 185,989,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 849 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r9/Gen/DecFiles/options/11104162.py generated: Fri, 27 Mar 2015 16:10:14
#
# Event Type: 11104162
#
# ASCII decay Descriptor: [B0 -> (KS0 -> pi+ pi-) p+ p~-]cc
#
from Configurables import Generation
Generation().EventType = 11104162
Generation().SampleGenerationTool = "SignalRep... | [
"slavomirastefkova@b2pcx39016.desy.de"
] | slavomirastefkova@b2pcx39016.desy.de |
8a1ddc4507846d9a723cfccd566061ba572ec910 | 0d2011dd3f0372167c9d6ed0b0e297d0b5802f87 | /Stack/Backtracking/G5_9663.py | 5f04807c8c39432eb2403244da981c58dc42f378 | [] | no_license | jonghoonok/Algorithm_Study | 4c049f5b7c733933d8d56a3f2eac5e74db21d27a | 48bce15553034a3d2cf92f4c8f3312e41e08a2bd | refs/heads/master | 2023-07-02T13:45:55.572922 | 2021-07-31T14:56:15 | 2021-07-31T14:56:15 | 283,682,316 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | # 백준 9663번
# N-Queen
import sys
sys.stdin = open("G5_9663_input.txt", "r")
def N_Queen():
result = 0
return result
for i in range(3):
N = int(input())
print(N_ | [
"jonghoone94@gmail.com"
] | jonghoone94@gmail.com |
aa7dd3a10d4d938124539ffa8f853884974cae01 | 7469f4b8c52831fe3d63a555d440b6bb7dc8c247 | /blog/models.py | 2b0d3acf957604b40646689a5337609f8a925156 | [] | no_license | Amarachy/my-first-blog | 89b76327ac62a2ca8317f3558d4a7ed99b31059e | d63445f45e4af3c7789f2755e7d6a515bb2ea365 | refs/heads/master | 2020-09-26T22:52:57.144663 | 2016-09-10T13:30:08 | 2016-09-10T13:30:08 | 67,872,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | from django.db import models
from django.utils import timezone
class Post(models.Model):
author= models.ForeignKey('auth.User')
title= models.CharField(max_length=200)
text= models.TextField()
created_date=models.DateTimeField(
default=timezone.now)
published_date=models.DateTimeField(
blank=True, null=True)
... | [
"you@example.com"
] | you@example.com |
24e80863210956e3d89f369860e4805a7666d4af | b22588340d7925b614a735bbbde1b351ad657ffc | /athena/DataQuality/GoodRunsListsUser/share/GoodRunsListsUser_jobOptions.py | 4d69b57d2648750fc9654a1008b3f01262d949b3 | [] | no_license | rushioda/PIXELVALID_athena | 90befe12042c1249cbb3655dde1428bb9b9a42ce | 22df23187ef85e9c3120122c8375ea0e7d8ea440 | refs/heads/master | 2020-12-14T22:01:15.365949 | 2020-01-19T03:59:35 | 2020-01-19T03:59:35 | 234,836,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,201 | py | DetDescrVersion="ATLAS-GEO-02-01-00" ## Set your geometry here
#ConditionsTag="COMCOND-REPC-003-00" ## Set the conditions tag here;not needed for AOD
##------------------------------------------------------------
## These 4 lines are needed for actual data
##------------------------------------------------------------... | [
"rushioda@lxplus754.cern.ch"
] | rushioda@lxplus754.cern.ch |
f88270fd17301f502ebc462e8a9a72c3a1bef9da | c3cfc0a5bbfa6b8eefbad5e3ae940799cfd46d8a | /applications/websites/utils.py | 2aabf89aa2fac4545950ecaa12ecff8037ac8140 | [] | no_license | guinslym/ohmy404 | f793627a5585a07ec34b22cc89a095ccdcea2603 | 0192f2bdbb173c01f1dfb39e85ecfdf3d080b0f9 | refs/heads/master | 2021-01-17T17:24:38.058987 | 2016-07-22T09:18:24 | 2016-07-22T09:18:24 | 60,483,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | import json
from .models import website404
def increment_the_total_views():
websites = website404.objects.all()
for sites in websites:
pass
def write_to_a_file():
pass
| [
"guinslym@users.noreply.github.com"
] | guinslym@users.noreply.github.com |
95c997044088d86b4d80d66a477e95d05cc7dd08 | 2d23c271ec1a226bb345c23d7b2671ec021e9502 | /Jump Game.py | 91429c31109f7a70ba365e17136f2c63e5b4f3d4 | [] | no_license | chenlanlan/leetcode | 2e6aec0846ed951466bcd2c2e4596c998faca8e4 | d02478853c32c29477f53852286c429c20f1424e | refs/heads/master | 2016-09-08T05:07:46.904441 | 2015-07-12T05:41:15 | 2015-07-12T05:41:15 | 32,845,795 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,097 | py | #!/usr/bin/python
class Solution:
# @param {integer[]} nums
# @return {boolean}
def canJump(self, nums):
i = 0
n = len(nums)
if nums[0] == 0:
if n == 1:
return True
else:
return False
if not 0 in nums:
retur... | [
"silan0318@163.com"
] | silan0318@163.com |
22f7589035d45f52dec82b387ba188687de53a9f | 77db7aa2b94cac35e62ea325144e8f40d7412f58 | /standard_library/threads/thread_pool_test2.py | a6902a83769b3318af76a38c7b1885195b9ffcca | [
"MIT"
] | permissive | eledata/PythonStudy | a9081988133b375fd484ec9f6d79078de62e12ed | 75e51d6c08e8c5464d421408cfc830fcb6720a0a | refs/heads/master | 2021-07-06T03:26:13.266239 | 2020-09-28T03:02:01 | 2020-09-28T03:02:01 | 187,608,616 | 0 | 0 | null | 2019-05-20T09:21:43 | 2019-05-20T09:21:42 | null | UTF-8 | Python | false | false | 2,019 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/4/29 16:50
# @Author : Aries
# @Site :
# @File : thread_pool_test2.py
# @Software: PyCharm
import Queue
import threading
import urllib2
import time
class ThreadUrl(threading.Thread):
"""Threaded Url Grab"""
def __init__(self, queue):
... | [
"1123431949@qq.com"
] | 1123431949@qq.com |
740cf96fbcfff43287948ddb7ef3ec612c8f95a7 | 168ff01513ea134c7952db45259d24d5b8b78df6 | /virtual/lib/python3.6/site-packages/unidecode/x000.py | 6821df47db0020bccd86045d6cbad398d0a31d05 | [
"MIT"
] | permissive | OKC254/flask-blog | e06fc6b75182a766ef9895a77426dbd229cb6756 | 78dc43f6ba981822f17026b071db6aaf4680daad | refs/heads/master | 2022-10-08T13:30:39.448278 | 2019-06-03T07:15:47 | 2019-06-03T07:15:47 | 189,934,226 | 0 | 0 | MIT | 2022-09-16T18:02:05 | 2019-06-03T04:28:18 | Python | UTF-8 | Python | false | false | 3,942 | py | data = (
'\x00', # 0x00
'\x01', # 0x01
'\x02', # 0x02
'\x03', # 0x03
'\x04', # 0x04
'\x05', # 0x05
'\x06', # 0x06
'\x07', # 0x07
'\x08', # 0x08
'\x09', # 0x09
'\x0a', # 0x0a
'\x0b', # 0x0b
'\x0c', # 0x0c
'\x0d', # 0x0d
'\x0e', # 0x0e
'\x0f', # 0x0f
'\x10', # 0x10
'\x11... | [
"oscarkiplimo@gmail.com"
] | oscarkiplimo@gmail.com |
a1024ad357fd7a78d6fdecf9bc7ce62af1ec4d19 | a8c95f5152c08b487c3f85246150f9f7cdd557e0 | /torabot/mods/bilibili/query.py | 674e3c62134972e0420c4c4ead2fb36a38b21ef2 | [
"MIT"
] | permissive | sorunis/torabot | b58113adab85e78551095e8f4551b0bbaf48e8f1 | 6d1a0a524f184cc33c5dfb3d7fc5e95af791a018 | refs/heads/master | 2020-12-11T07:19:54.269478 | 2014-05-04T18:15:54 | 2014-05-04T18:15:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 667 | py | import json
from nose.tools import assert_in
from ...core.connection import autoccontext
from ...core.local import get_current_conf
from ...core.query import query
from . import name
def get_bangumi():
with autoccontext(commit=True) as conn:
q = query(
conn=conn,
kind=name,
... | [
"answeror@gmail.com"
] | answeror@gmail.com |
08a7c7f206da104b7857ab2bec9aa359fdbe2f1a | 9aad24aca014265f66ddf9eff54cdbe09e27b14b | /quantic/migrations/0003_auto_20170420_1418.py | bbe4bc229de49f86238058f6086ff31a5fd9392b | [
"MIT"
] | permissive | suelliton/Leitura_quantica | 9bb1b7f524723d19b32fa749b0c5ae68eb4f3b63 | 12039d20c303bb02c473cab072ad7e69a7251ffb | refs/heads/master | 2021-01-20T05:36:53.513912 | 2017-05-07T20:51:39 | 2017-05-07T20:51:39 | 89,796,805 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-20 14:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('quantic', '0002_user_image'),
]
operations = [
migrations.AlterField(
... | [
"tonmelodicmetal@gmail.com"
] | tonmelodicmetal@gmail.com |
e5e12975cfbc7138580f4966d5a47e400eac74b2 | c93b0f008d0977e0b9327ad8b930489f5cccae97 | /platfrom/datacollect/Action/ODPScommand.py | 9bea25522930ed81a745c7b4c7eac86ca185a201 | [] | no_license | ParkPan/ATCasePackage | 15caa664bd94c014ccbd1780353bfc5fcc0caa87 | edad6c1d5a343c740e251821fee0c29336f3d435 | refs/heads/master | 2020-06-16T02:44:06.323352 | 2016-12-01T03:46:44 | 2016-12-01T03:46:44 | 75,251,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | import os
import lib.platfrom.datacollect.GlobalVars.SERVER
def dropodpsdata(tablename):
droppartition = 'alter table %s drop if exists partition(recorddate=%s)' % (
tablename, lib.platfrom.datacollect.GlobalVars.SERVER.server_recorddate)
commandlines = droppartition
exec_odps_commands('\"' + comma... | [
"panpan@cloutropy.com"
] | panpan@cloutropy.com |
d79478af5849f5eb583367ea5094c1d7e4965f78 | afedbd0af6dff5a4fca8bab92e2a5574d9e541ca | /venv/bin/jp.py | 9c30641ca91befc709f5db28753b6ec1b71555bc | [] | no_license | wagolemusa/web_scrapping | d847b71ded82f471f28daed6083667eef450b21d | 794d24d1492d8ebeb9ffab16d1b185c6cab33c74 | refs/heads/master | 2022-12-31T22:31:02.407179 | 2020-10-21T09:27:39 | 2020-10-21T09:27:39 | 305,924,696 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,724 | py | #!/home/refuge/code/scraping/venv/bin/python3.5
import sys
import json
import argparse
from pprint import pformat
import jmespath
from jmespath import exceptions
def main():
parser = argparse.ArgumentParser()
parser.add_argument('expression')
parser.add_argument('-f', '--filename',
... | [
"homiemusa@gmail.com"
] | homiemusa@gmail.com |
69a863edf1e227da5b7b6bfc3605c0b8b03620b4 | d21e100b46ee51d70d701dbc34c45d23aa174d00 | /95_ImplementStrStr.py | 803adcf702fe221d1cbe1b009a8576e3e5547bc2 | [] | no_license | PrathushaKoouri/Strings-2 | 992bbefecad54ec62b7c97f6c6c3a26fcd6b2451 | 0becc4b2bebd210a6bfae6c977c345eee3dac814 | refs/heads/master | 2020-09-20T09:50:19.183130 | 2019-11-27T13:54:36 | 2019-11-27T13:54:36 | 224,442,020 | 0 | 0 | null | 2019-11-27T13:53:35 | 2019-11-27T13:53:35 | null | UTF-8 | Python | false | false | 1,286 | py | '''
Accepted on leetcode(28)
Using KMP Algorithm.(which is used to find the substring in main string)
First we design the KMP Algorithm for needle and apply the same technique to haystack and needke as well.
'''
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
S = haystack
... | [
"noreply@github.com"
] | PrathushaKoouri.noreply@github.com |
270a78e1b1fe043827fbf5360916587107c28650 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/scatterternary/_text.py | 7ea8cb61a3056cd5b65478400398c79cf68a3b40 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 445 | py | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="text", parent_name="scatterternary", **kwargs):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
1870e260930b7904853159edafbfea3e7f418db4 | ebcc57cbd7bc4c951fe3cf9826efc2d03d1e47e8 | /educative/14 knapsack/06 Target Sum.py | 5900cac48345089c847f0ced5b27bf6fc6dccbc9 | [] | no_license | Vahid-Esmaeelzadeh/CTCI-Python | 17a672e95f1d886f4fb66239a4aa22a87f38382a | 867360ab13dd63d24d6f3e45b5ac223755942b54 | refs/heads/master | 2022-10-26T16:43:54.939188 | 2020-06-11T21:42:15 | 2020-06-11T21:42:15 | 190,065,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,842 | py | '''
Target Sum
You are given a set of positive numbers and a target sum ‘S’. Each number should be assigned either a ‘+’ or ‘-’ sign.
We need to find the total ways to assign symbols to make the sum of the numbers equal to the target ‘S’.
Example 1:
Input: {1, 1, 2, 3}, S=1
Output: 3
Explanation: The given set has '... | [
"v.esmaeelzadeh@gmail.com"
] | v.esmaeelzadeh@gmail.com |
31d8690f606378d782b34aed4d9bdf035cffc169 | b23d294fdffabe72c336644f119860f5ce704eef | /python_1000phone/语言基础/day20-多线程基础/code/02-多线程2.py | 9fb0b029f09cdddfcb44299d49acedf6e88f17c0 | [] | no_license | ikaros274556330/my_code | 65232758fd20820e9f4fa8cb5a6c91a1969862a2 | 92db21c4abcbd88b7bd77e78d9f660b4534b5071 | refs/heads/master | 2020-11-26T09:43:58.200990 | 2019-12-23T02:08:39 | 2019-12-23T02:08:39 | 229,032,315 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | """__author__=吴佩隆"""
from threading import *
from datetime import datetime
import time
class DownloadThread(Thread):
def __init__(self, film_name):
super().__init__()
self.film_name = film_name
# 这个run方法是会在子线程中自动调用的方法,要求除了self以外不能有其他参数
def run(self) -> None:
print('%s开始下载%s' % (s... | [
"274556330@qq.com"
] | 274556330@qq.com |
bf427f0dbea8db7313812ccdb5cc0adb9c8a6dbe | d2144b0a45b4ff3e7c78356dcbe5c187b3eddf1f | /98-tf.nn.dropout防止过拟合-and-激活函数.py | 61878e8632623d124354a595eb4008bda46b54c0 | [] | no_license | CWSchen/tensorflow | 45d5996370b9584fa02bdd9a0705b6c6579b324a | 301e169b007ccac265a99b37f5fd097c5db1d423 | refs/heads/master | 2020-03-21T12:29:42.157422 | 2018-08-15T01:21:29 | 2018-08-15T01:21:29 | 138,555,214 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,337 | py | import tensorflow as tf
'''
https://blog.csdn.net/huahuazhu/article/details/73649389
一、 Dropout原理简述:
tf.nn.dropout是TensorFlow里面为了防止或减轻过拟合而使用的函数,它一般用在全连接层。
Dropout就是在不同的训练过程中随机扔掉一部分神经元。也就是让某个神经元的激活值以一定的概率p,
让其停止工作,这次训练过程中不更新权值,也不参加神经网络的计算。
但是它的权重得保留下来(只是暂时不更新而已),因为下次样本输入时它可能又得工作了。示意图如下:
但在测试及验证中:每个神经元都要参加运算,但其输出要乘以概率p。
... | [
"1044502604@qq.com"
] | 1044502604@qq.com |
e47a9e8ee099c78e14cfcb418a8adfcc8cfab0ca | 92be2d8c4a64d5f8c43341be7f1e36b81fce56ab | /src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_reapply.py | b994885b016a2cd66cc11c7d63b92957681889ba | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | allanpedroni/azure-cli | b31d3347f377208b502231266d4839196e574c4b | 4e21baa4ff126ada2bc232dff74d6027fd1323be | refs/heads/dev | 2023-08-31T18:27:03.240944 | 2023-08-31T08:49:58 | 2023-08-31T08:49:58 | 204,767,533 | 0 | 0 | MIT | 2023-09-14T13:32:41 | 2019-08-27T18:41:15 | Python | UTF-8 | Python | false | false | 4,834 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------... | [
"noreply@github.com"
] | allanpedroni.noreply@github.com |
a04e72323cc47024cc5bcc6bd856eb66dbe37765 | a01568afaa345bebb0e43eda50dcb058ed510a71 | /src/migratore/__init__.py | e23c24cb630b2a5be3d1c6d52bca5eae1240e103 | [
"Apache-2.0"
] | permissive | hivesolutions/migratore | db45e4e24c2e0a02c36e94b126ad2e5b810274ef | 8705b71f42744a71c63dfa68d447a4529415c8a4 | refs/heads/master | 2023-06-23T07:17:37.879976 | 2023-06-18T11:33:34 | 2023-06-18T11:33:34 | 16,619,837 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from . import base
from . import cli
from . import info
from . import loader
from . import migration
from . import mysql
from .base import Migratore, Console, Database, Table, Result
from .cli import run_help, run_version, run_environ, run_list, run_errors, run_tra... | [
"joamag@gmail.com"
] | joamag@gmail.com |
52bda9d362f9aa722f106fecf77232317c83dd42 | aedb254a3a342f2a02577a2cae02ce40c50e010d | /users/middleware.py | 65b8f98410fc05e1164cbbd04d44eceb9c2b9a90 | [] | no_license | kshutashvili/faircart | 5bde2981a0aee8b6d5b5988047116efc3dc00ee5 | 118ed273db58029c629e075246e2c9902ed42149 | refs/heads/master | 2020-07-09T04:05:47.331149 | 2016-08-30T13:46:44 | 2016-08-30T13:46:44 | 203,870,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | from django.http import HttpResponseRedirect
try:
from faircart.settings import LOGIN_REDIRECT_URL
except:
LOGIN_REDIRECT_URL = '/'
try:
from faircart.settings import URL_LOGIN_REDIRECT
except:
URL_LOGIN_REDIRECT = ()
class UserRedirectMiddleware():
def process_response(self,request,response):
... | [
"developinc@yandex.ru"
] | developinc@yandex.ru |
7dc7c697060df8f81061136efa3aa9a404bdce30 | e5b754bc0d9447548d6f32720d20c963f8b8efd9 | /agents/RegretMinimizationAgent.py | f6d9eba3a5b631c6b82982a93ffcfd03981efcce | [] | no_license | prateekstark/matrix-game | 9e1ffc34103462380053ecc5437522066c804f8b | ae8a693369d169edc058b02c936910cfda101aa8 | refs/heads/master | 2022-12-17T09:46:08.857714 | 2020-09-24T20:45:27 | 2020-09-24T20:45:27 | 291,292,030 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,112 | py | import random
import torch
from utils import to_one_hot, to_one_hot_multiple
import torch.nn as nn
import torch.nn.functional as F
class Memory(object):
def __init__(self):
self.buffer = []
class PolicyNetwork(nn.Module):
def __init__(self, input_dim, output_dim):
super().__init__()
... | [
"gargprateek35@gmail.com"
] | gargprateek35@gmail.com |
48f81597e191ca1805f94c403bc3c8cc37bf8070 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/01_netCDF_extraction/merra902Combine/314-tideGauge.py | 75c1945f1b3cc9d31f781721cd8af5ff1d958efd | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,376 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 17 11:28:00 2020
--------------------------------------------
Load predictors for each TG and combine them
--------------------------------------------
@author: Michael Tadesse
"""
import os
import pandas as pd
#define directories
# dir_name = 'F:\\01_erainterim\\01_er... | [
"michaelg.tadesse@gmail.com"
] | michaelg.tadesse@gmail.com |
cb57ae2345f8e4736dcd264f2eaa1538831e38c3 | 236c6d7f53d61dfbddefa3b6574f181ccef72e60 | /lessons/lesson14/lesson14/asgi.py | f76a0fbce1f0ff8164d79fe905d515c932b1963f | [] | no_license | maxchv/LearnPython | 94193c9770dc7b788099076316a1dbd6a5112cf4 | 561f74f39644cd6694ef36869beb7ddb6ff006dc | refs/heads/master | 2022-07-07T18:31:02.274159 | 2022-06-15T15:10:40 | 2022-06-15T15:10:40 | 65,457,162 | 1 | 7 | null | 2019-10-23T05:42:30 | 2016-08-11T09:30:53 | Python | UTF-8 | Python | false | false | 393 | py | """
ASGI config for lesson14 project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | [
"maxshaptala@gmail.com"
] | maxshaptala@gmail.com |
304c892e1cfd39f04b6cff44d622ad50ceb0efdb | d0593e340845b46cb882ede636c111243289c3a0 | /src/delete_playlist.py | 8588f86224440384f72062de164f92e7baa16ddc | [] | no_license | joobn72/hacker-scripts | 9f468117122580a352ccef3cde6103e90141ac1d | 3877c931625441ed8fff91e9716887eac6687223 | refs/heads/master | 2021-01-18T06:13:39.924066 | 2016-06-24T16:48:49 | 2016-06-24T16:48:49 | 61,990,116 | 0 | 0 | null | 2016-06-26T13:28:09 | 2016-06-26T13:28:09 | null | UTF-8 | Python | false | false | 841 | py | '''
This script is used by hs-music to delete the temporary playlist it creates.
Since it may take some time for the music player to launch we cannot immediately
delete the playlist.m3u file after calling os.system() on it, hence, we wait for
20 seconds and then delete the playlist.
This script is seperate because ... | [
"areebbeigh@gmail.com"
] | areebbeigh@gmail.com |
5042bd5a4fb9e35635e21327524c98beab9eb261 | 04a0614b8c2a893dab29bc4ffb0aaf82364fdf3f | /1021. Remove Outermost Parentheses.py | 7a02a43faea36eb8061c73d67cd97208830c4884 | [] | no_license | sharmaji27/Leetcode-Problems | 716bcb4a36b9e4f45274c4d551967e15c40ddbd2 | 0f878933b17df170c18f0b67b7200cec76c276e0 | refs/heads/master | 2021-10-20T17:35:35.175757 | 2021-10-20T05:33:17 | 2021-10-20T05:33:17 | 218,299,755 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,779 | py | '''
A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, and + represents string concatenation. For example, "", "()", "(())()", and "(()(()))" are all valid parentheses strings.
A valid parentheses string S is primitive if it is nonempty, and there... | [
"asharma70420@gmail.com"
] | asharma70420@gmail.com |
6c1d68417d870a7d7997b2c074e26b487765d954 | cdf23a2b22b0d0643f9bf48fd8c7d0a8ef83945d | /qstrader/execution/execution_handler.py | f437e72767cbf6b2d31a574a5d72b33b9bfe8f4b | [
"MIT"
] | permissive | PabloHebe/qstrader | 2e23d267e0e2cf6632011eaea486891c8eed4c17 | 81c9473fbb782220c5cced2e331fb7a7b0b0082d | refs/heads/master | 2022-08-27T10:28:27.411188 | 2019-12-16T14:17:40 | 2019-12-16T14:17:40 | 111,547,620 | 0 | 1 | MIT | 2020-01-05T12:54:16 | 2017-11-21T12:42:55 | Python | UTF-8 | Python | false | false | 2,878 | py | class ExecutionHandler(object):
"""
Handles the execution of a list of Orders output by the
PortfolioConstructionModel via the Broker.
Parameters
----------
broker : `Broker`
The derived Broker instance to execute orders against.
broker_portfolio_id : `str`
The specific port... | [
"mike@quarkgluon.com"
] | mike@quarkgluon.com |
875ae866862fd13189b608c2b8afd06e57adca67 | 0987f31e64bcacb41ba3a1e20054d7b8ac0d7346 | /contests/ABC064/D_Insertion.py | f95ff94a92b3a5277f6f10a62dd26a10318c2475 | [] | no_license | masakiaota/kyoupuro | 81ae52ab3014fb2b1e10472994afa4caa9ea463b | 74915a40ac157f89fe400e3f98e9bf3c10012cd7 | refs/heads/master | 2021-06-27T04:13:52.152582 | 2020-09-20T03:21:17 | 2020-09-20T03:21:17 | 147,049,195 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 267 | py | #import numpy as np
N = int(input())
S = input()
left, right = ([0] * 2)
for kakko in S:
if kakko is "(":
left += 1
elif kakko is ")":
if left is not 0:
left -= 1
else:
right += 1
print("("*right+S+")"*left)
| [
"aotamasakimail@gmail.com"
] | aotamasakimail@gmail.com |
460f314568f9e43c0f7af7e2f465e49064685b1a | 9bcba8f3162eacea872dbadc9990a164f945f70a | /Packages/snippets/snippets.py | ff34f3a2778e3cbf9ce735ee08c4c3c7da5ea6f9 | [] | no_license | programadorsito/Packages | a4cb568219dbc10a69e15a2832ef52d19eb83061 | af748327f128ed90bb146dc12bb53b76ccb609fd | refs/heads/master | 2021-01-10T04:41:38.676159 | 2016-04-06T07:52:45 | 2016-04-06T07:52:45 | 55,560,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,516 | py | import utils
import re
import sublime
import os
import os.path
import sublime_plugin
def get_path_snippets():
return os.path.join(sublime.packages_path(), "snippets")
class SnippetsListener(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
#if view.substr(view.lin... | [
"Mac@MacBook-de-Mac.local"
] | Mac@MacBook-de-Mac.local |
a293eba3972a68bce224681ff1df619bd60c11f4 | 233ace0166c0aaa010742dafe34c71e97169c422 | /src/dating/views.py | 80dd5950105d4103d2df97ca60ed6eef9697f9e3 | [] | no_license | NikolayBorovenskiy/flirt | 3ec23a99b84af9df84d8522d2429a5bf9d565c67 | f34e33cff1b3387d447ac3fdf36fb097fee19e41 | refs/heads/master | 2020-03-18T05:01:13.382456 | 2018-05-28T15:04:35 | 2018-05-28T15:04:35 | 134,319,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,128 | py | # coding: utf-8
import datetime
import operator
from functools import reduce
from dateutil.relativedelta import relativedelta
from django.db.models import Q
from django.shortcuts import render
from accounts.models import DatingUser
from core import context
def home(request):
context_dict = {
'title': u'... | [
"nikolay.borovenskiy@gmail.com"
] | nikolay.borovenskiy@gmail.com |
a104cd8cf58e49c8fc6853b9973dfba382b29740 | 224ca57f7f0ceeaf93b2ae93bcaedee5e1e8589d | /leetcode/find_k_pairs_with_smallest_sum.py | f84fe676d54e21ece23976bdfb843244c13e7823 | [] | no_license | myliu/python-algorithm | 71fa69502596634464007f64d3ac02826d3b07df | 036a29d681cc91f2317d454e04530d7375d55478 | refs/heads/master | 2021-01-23T11:34:07.732641 | 2017-02-27T00:27:58 | 2017-02-27T00:27:58 | 13,375,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 708 | py | import heapq
class Solution(object):
def kSmallestPairs(self, nums1, nums2, k):
"""
:type nums1: List[int]
:type nums2: List[int]
:type k: int
:rtype: List[List[int]]
"""
# Create a list of n generators, where n is len(nums1)
# (x*x for x in range(10))... | [
"mliu@quantcast.com"
] | mliu@quantcast.com |
8bb21c3c037e58c9db6fd721196db222f571092f | 99f6c5b7a6b6840163b32d633e658678d5829b46 | /practice/algorithm/2_1_InsertionSort.py | 5297e81b8073e7e49da9300cc25f123f412575f4 | [] | no_license | aliceayres/leetcode-practice | 32f2695a567317013b567a68863f2c95c75b438b | 0743cbeb0e9aa4a8a25f4520a1e3f92793fae1ee | refs/heads/master | 2021-06-02T15:11:29.946006 | 2020-02-06T04:06:55 | 2020-02-06T04:06:55 | 131,126,554 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | '''
2.1 插入排序
Insertion Sort
T = o(n2)
'''
class Solution:
def insertionSort(self, numbers):
"""
:type numbers: List[int] 直接处理原数组
"""
for i in range(len(numbers)):
current = numbers[i]
j = i - 1
while j >= 0 and current < numbers[j]:
... | [
"yeziqian@ctsig.com"
] | yeziqian@ctsig.com |
429b19127f4b638a177b3c8f7cd9f30b4530ac69 | 734458ec2b0f573cdd6a5e388f870e036af01c3a | /python/ThirteenTeV/DisappTrksAMSBCascade/AMSB_gluinoToChargino_M-XXXGeV_M-YYYGeV_CTau-ZZZcm_TuneCP5_13TeV_pythia8_cff.py | 9b09de56dd3d18afdbdd09a339a1f33aafb18900 | [] | no_license | knash/genproductions | 987ec8d549aba879d0cb8b3f32206d19f139d3ef | 328e10ae97248ece03e548c7b73453e0ff136e92 | refs/heads/master | 2021-01-18T03:12:09.682945 | 2019-07-03T11:11:57 | 2019-07-03T11:11:57 | 85,840,586 | 0 | 1 | null | 2019-06-06T09:14:09 | 2017-03-22T14:53:04 | Python | UTF-8 | Python | false | false | 1,949 | py | COM_ENERGY = 13000.
MGLU = XXX # GeV
MCHI = YYY # GeV
CTAU = ZZZ # mm
CROSS_SECTION = WWW # pb
SLHA_TABLE="""
""" % (MGLU, (1.97326979e-13 / CTAU))
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi... | [
"ahart@cern.ch"
] | ahart@cern.ch |
6ec200d9958a9bd9887c532f6dabc8ae122b3b0d | ed9459984298c6533deb3f0496de4eee17dfb6dc | /4. passcracker.py | 6684142a4d8266bf200e312a6477ab525358149a | [] | no_license | sky7th/White-Hat-Python | bcfbd66e6d7c1c4371160813b46f3e9aca8663d5 | dba5e25c7ccbeb44bd6523bcce647b5b8b2fe207 | refs/heads/master | 2020-05-03T15:43:54.685920 | 2019-04-05T17:10:13 | 2019-04-05T17:10:13 | 178,709,227 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,524 | py | import ccrypt
def findPass(passhash, dictfile):
salt = passhash[3:5] # passhash의 3,4 번째 문자가 salt 이다.
with open(dictfile, 'r') as dfile: # dictionary.txt 파일을 연다. 이것을 dfile에 저장
for word in dfile.readlines(): # dfile 의 내용을 한 줄씩(한 단어) 읽는다.
word = word.strip('\n') ... | [
"xoghk0321@gmail.com"
] | xoghk0321@gmail.com |
f88f55f88fdfb6b850af5b3a5be3a3c545b49bdd | 3c89c9749e910f73de3c28176add0cd694459fcf | /Libraries/Settings.py | b6a0791addf45119728b3293256c67e2436b2d27 | [] | no_license | hejunru/PyQtClient | 7f6a06c87d8b555dd3e2210289b8d1193ac6eccb | 9edb459238463777a15f80d5e02c80950ae9a284 | refs/heads/master | 2020-03-21T17:06:31.128917 | 2018-02-21T14:11:10 | 2018-02-21T14:11:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,926 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2018年2月7日
@author: Irony."[讽刺]
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447
@email: 892768447@qq.com
@file: Libraries.Settings
@description:
'''
import os
from PyQt5.QtCore import QSet... | [
"892768447@qq.com"
] | 892768447@qq.com |
ed7d673fc930eee16d852ccdc403cc42d84fcbbb | 68a52ad1df836c9f6d922515b2f896b6928ce6a0 | /SafetyProductionSystem/weekworktask/views.py | 51679e0d167830e074bf1edd1cdd575c146c3cb1 | [] | no_license | Chuazhen0/SafetyProductionSystem | 1141f845e04b032ff2a230c8def26066f061600c | 442d5df3818d43aebb9830f2456c73018aae2acf | refs/heads/master | 2020-05-20T12:47:46.365020 | 2019-05-08T09:56:01 | 2019-05-08T09:56:01 | 185,579,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,440 | py | from lbworkflow.views.generics import CreateView
from lbworkflow.views.generics import UpdateView
from lbworkflow.views.generics import WFListView
from .forms import WeekWorkTaskForm
from .models import WeekWorkTask
class WeekWorkTaskCreateView(BSFormSetMixin, CreateView):
form_classes = {
'form': WeekW... | [
"Caohuazhenrn@163.com"
] | Caohuazhenrn@163.com |
d6b073dc5be38ae0737586cdc593169c04e88c43 | c2289635f088e8b0613900bfb85985fc9af8d20f | /baekjoon/boj_18222_thuemorse.py | 5be19e8d4ed2304c37366a3a5fc26973b1226ec1 | [] | no_license | gyoforit/study-algorithm | e91da5491c935731e754ac9f85074a97f8e48066 | af0c10e417f5d205048db268f7cc60b60b2c49cb | refs/heads/master | 2023-08-21T14:04:00.891937 | 2021-10-29T11:54:31 | 2021-10-29T11:54:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | def thuemorse(x):
if x == 0:
return 0
elif x == 1:
return 1
elif x%2:
return 1-thuemorse(x//2)
else:
return thuemorse(x//2)
print(thuemorse(int(input())-1)) | [
"gyoforit@gmail.com"
] | gyoforit@gmail.com |
f7edf00805bfdf0d03d42187b2dfca84e13ebfaa | 23d25497d30accc7125f6068ad7c55ebcbea0160 | /Python/9020.py | f4c41cc9d00f0728dea3cb55bfde7964d7d0f6bd | [] | no_license | ParkJeongseop/Algorithm | 460689e064529d65e8612493a5d338305ec6311e | 388d092ee8b07b7ea76e720053c782790563515b | refs/heads/master | 2023-08-30T23:19:46.029510 | 2023-08-09T11:08:56 | 2023-08-09T11:08:56 | 149,557,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | global m
m = dict({1: False})
def sosu(n):
if n in m:
return m[n]
answer = True
for i in range(2, int(n**0.5)+1):
if n%i == 0:
answer = False
break
m[n] = answer
return answer
t = int(input())
for i in range(t):
n = int(input())
for j in range(n/... | [
"parkjeongseop@parkjeongseop.com"
] | parkjeongseop@parkjeongseop.com |
c508a34db6c1ba4abd9902bdfd3d044be3f7ca89 | 1c5bfeff112892944ca84db526dc05d1814cb456 | /models/find_trajectory.py | 8feb5e33f666566b41591704849dec5ecb237c31 | [] | no_license | pinakm9/genetic-pf | 0eab7f881ec359e40f3ad080e0abb1465b986e31 | be145f56b43315cbdbb013ae786d1f907275d532 | refs/heads/master | 2023-08-17T17:14:58.178658 | 2021-09-20T08:32:16 | 2021-09-20T08:32:16 | 398,465,905 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 932 | py | """
Finds a trajectory on the attractor of L96_10
"""
# add modules folder to Python's search path
import sys
from pathlib import Path
from os.path import dirname, realpath
script_dir = Path(dirname(realpath(__file__)))
module_dir = str(script_dir.parent)
sys.path.insert(0, module_dir + '/modules')
# import remaining ... | [
"pinakm9@gmail.com"
] | pinakm9@gmail.com |
e59074fde60bbe74e69d2bdf96f85dbfb83ba6d3 | b7567adff9c492be364dee051433d18da23f27f1 | /kaijaing/tests.py | 941878a857f9d875ba1bf0dd78c81fe7e28581bb | [] | no_license | zhangmy-hz/kaijaing_django | bc294daa3328932b84c83029fca156a9b02729ad | c258c4f053f40203daba02e363d454c988fde875 | refs/heads/master | 2023-01-04T01:26:36.489884 | 2020-11-03T04:45:49 | 2020-11-03T04:45:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,068 | py | def order_track(request): #查找状态是画图完成或者是拉图完成的明细
post_data = request.body
post_data = json.loads(post_data)
user_json = []
user_data = {}
selectForm = post_data.get('serch')
if selectForm.get('id') or selectForm.get('draw_time') or selectForm.get('print_time') or selectForm.get('order_code') or ... | [
"972995724@qq.com"
] | 972995724@qq.com |
ec0c024ca861415c7176254358e21cbba4f212be | 9618f7cc3b3dcf5f179c73e3eadec41974e9813a | /flaskDemo.py | dbea6c6f3749cd62cfdd99164716549f638bd11d | [] | no_license | QGB/BiliDanmu | d5e83894d063759ec2e223fce4dd1a60bc56b7f7 | 957bcb7bc72d6504c0e116ea97406118e7ed81e1 | refs/heads/master | 2020-04-16T13:10:37.838380 | 2019-01-17T03:58:25 | 2019-01-17T04:16:03 | 165,614,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,670 | py | #coding=utf8
import sys;'qgb.U' in sys.modules or sys.path.append('G:/QGB/babun/cygwin/lib/python2.7/');from qgb import *;py=U.py
sys.path.pop()
from flask import Flask,request,make_response,json
app = Flask(__name__)
app.static_folder='..'
from bilibili_comment import spider
giav=0
@app.route('/<f>', methods=['GET... | [
"qgbcs1@gmail.com"
] | qgbcs1@gmail.com |
856fa44ba054c2783b4a5f857f22e387aca52008 | 02a81cc9e8906433f1f8514014b6c8cc0286b2af | /backend/location/migrations/0001_initial.py | 0feeb45b5ba1ea88ee7b5dd3071834fe4d486d1a | [] | no_license | crowdbotics-apps/recepcion-de-produc-19233 | 0fb2fe8bc470ea2814549276c9ad29f1715b6efa | d5e19601ac32999fc35e82973d0180a0f28c0c0b | refs/heads/master | 2022-11-23T08:16:59.726985 | 2020-08-02T13:57:51 | 2020-08-02T13:57:51 | 283,396,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,028 | py | # Generated by Django 2.2.14 on 2020-07-29 04:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
("task_profile", "0001_initial"),
]
operations = [
migrations.CreateModel(
n... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
2039149bf20e3ce146664883be033ec3ce032c1a | 49f61714a6f78d984fd2194d6064d84e891bc5b7 | /2019-1/221/users/4101/codes/1847_1275.py | 97360480f8e6a63799fd89c24ebcd2bbc8aa596d | [] | no_license | psbarros/Variaveis3 | b5c4e1517e7d94a846ee03791d25d5821a1c651c | 3dcf6f810709ce03c78335acf9533e008a2ae125 | refs/heads/master | 2023-06-13T07:05:00.878430 | 2021-07-06T17:51:37 | 2021-07-06T17:51:37 | 383,549,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | from numpy import*
from numpy.linalg import*
m = array(eval(input()))
n = shape(m)[0]
v = zeros(n, dtype=int)
for i in range(n):
v[i] = sum(m[i,:])
print(v) | [
"psb@icomp.ufam.edu.br"
] | psb@icomp.ufam.edu.br |
46254d9acfa03651d27b87dcad343b1d9986cbbc | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_attended.py | 8d298b830bef2026f01717b979319146c479753d | [
"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 | 224 | py |
#calss header
class _ATTENDED():
def __init__(self,):
self.name = "ATTENDED"
self.definitions = attend
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['attend']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
c2785550320f21c44aab879b4f0219939d2301d2 | 8e9d415fef524378eef6be6d5f186515dc050ae8 | /tests/test_grid1d.py | 2413b23dade7fb07859c1291de82f1ec08bbcd51 | [
"BSD-3-Clause"
] | permissive | solvcon/modmesh | 5fd508fb3f331076ff5bfc674a6213151ee36ec3 | ecbffccb903b65eda2943f74a4d0e5dd77abe3fc | refs/heads/master | 2023-08-30T16:26:14.934023 | 2023-07-30T05:47:03 | 2023-07-30T05:47:03 | 229,268,595 | 14 | 26 | BSD-3-Clause | 2023-09-09T04:26:15 | 2019-12-20T13:19:29 | C++ | UTF-8 | Python | false | false | 3,392 | py | # Copyright (c) 2019, Yung-Yu Chen <yyc@solvcon.net>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice, this
# list of conditions and the follo... | [
"yyc@solvcon.net"
] | yyc@solvcon.net |
6ff3ea891b99152541d8751ae9580a8996bb04ce | 41c605bf3a002a757cb2344cff526d7a7ae56ea9 | /plotly/validators/ohlc/increasing/__init__.py | 0464b08c7a0f6e8bf3bf1352b8454ae9c10cf9b3 | [
"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 | 884 | py |
import _plotly_utils.basevalidators
class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name='line', parent_name='ohlc.increasing', **kwargs
):
super(LineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | [
"noreply@github.com"
] | Jonathan-MW.noreply@github.com |
c4d012ad34cae4b06ed8cedd10ceea7fe43d5b3a | ef22b294e4d4162979d6c86bb45e84fb1996548d | /dynamic_firewall.py | 013f5b2a0257a151f4841cb4e3d855753b19ecab | [] | no_license | Jluxcs/pyFirewall | 753582c12400f93ae8cf856538e298bac3963698 | 1cd4a19f862a0aa0478f60cf2dd29f4bdb8638bc | refs/heads/master | 2020-05-04T15:42:03.001603 | 2016-12-17T05:38:30 | 2016-12-17T05:38:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,984 | py | import os
import time
from datetime import datetime
from scrawl_detector import ScrawlDetector
from port_scan_detector import PortScanDetector
from setting_handler import SettingHandler
class DynamicFirewall:
def __init__(self):
self.white_list = ['100.64.132.72']
os.system('echo "" > /var/log/me... | [
"870644199@qq.com"
] | 870644199@qq.com |
6997bdf58fb09f49a8486cfba2b1dce64421afe9 | c340835e4444c664fc2b261238e3738cf5bf7196 | /single_number_II.py | 6dadc3f3623ebf11678554a238b835adb5651d5b | [] | no_license | z-o-e/LeetCode_OJ_Python | 49f2a7378eb98f707c97d7757cc19ef19622db42 | ad7f5152fe404bdd4e91710d9a719f392bec7a96 | refs/heads/master | 2021-03-12T22:39:44.898502 | 2014-10-16T05:30:25 | 2014-10-16T05:30:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | class Solution:
# @param A, a list of integer
# @return an integer
def singleNumber(self, A):
n,flag = len(A),0
if not n:
return n
count = [0]*32
res = 0
for i in range(32):
for j in range(n):
if (abs(A[j])... | [
"hyzhang22@gmail.com"
] | hyzhang22@gmail.com |
ec62752a2fc4bceb7bfe50edef3928b82668a442 | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/Quote16/HQ_16_114.py | b379c559d43c5fb972556219dce3d83b7ceee0aa | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,456 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import time
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from log import *
class HQ_16_114(xtp_test_case):
def subTickByTick(self, Api, stk_info, case_name, rs_ex... | [
"418033945@qq.com"
] | 418033945@qq.com |
4a436b9367cf2adbbc1b6aac06fee5f6173bfe27 | 747afe9a5915c28831b86b0a5e2c044212664da5 | /20170907/fx2003_20170907_02.py | b0df1d1b6c439b5d7ae97b5d57a76b6d8c13d49b | [] | no_license | nitinreddy3/Python-Machine-Learning-Homework | 61c7b882b49e868ca37443feaa89494d5b6eba4a | b088bdcdb24892260e1db416d50f0750872e80bc | refs/heads/master | 2021-07-17T04:42:12.233768 | 2017-10-23T15:29:24 | 2017-10-23T15:29:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | def output(m, j, x, nums, hashnum):
for i in range(j, m):
if(i in hashnum):
continue
else:
hashnum.append(i)
if(x > 1):
output(m, i + 1, x - 1, nums, hashnum)
else:
print(" ".join(str(nums[x]) for x in hashnum))
... | [
"919987476@qq.com"
] | 919987476@qq.com |
8e139d86a3f4a6eeb7d310d5f0f4cc1943594f5f | ff182eeaf59b16f79b7d306eef72ddaadf0f4e71 | /Vaffle_interface/testcase/ContentModule/Content_test74_arbitrate_notice_detail.py | 0cf3c0236ea5c6687018afc3bd2c66e64c9bcb37 | [] | no_license | heyu1229/vaffle | 04d6f8b0d3bd0882ff1cdea54d18d5fdde7933b9 | 2c1c040f78094cf3cfc68f08627a958c4aa5e1d5 | refs/heads/master | 2023-06-05T09:55:21.894344 | 2021-03-12T07:26:45 | 2021-03-12T07:26:45 | 381,248,658 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | # -*- coding:UTF-8 -*-
import unittest,time,json
from Vaffle_interface.public_1.func_requests import FuncRequests
#---------------众裁公告详情【POST】---------------------
class arbitrate_home(unittest.TestCase):
def setUp(self):
self.r = FuncRequests()
def testcase_001(self):
sheet_index = 1
... | [
"1004856404@qq.com"
] | 1004856404@qq.com |
fec968b393460739b918f15f21592959629e8a9c | 98979d32b105b41e369bb93985fb1c82d5916290 | /code/default/x_tunnel/local/client.py | 249a4249799d0097d7d4b81efdf242a4a79eb7dd | [
"BSD-2-Clause"
] | permissive | wlds/XX-Net | 54678f73d1f2b3897ef95f4bf176553bd5640ab0 | 1d6674b55b229c291879c40afc4e4696749b61b0 | refs/heads/master | 2021-08-30T20:23:08.096836 | 2017-12-19T09:29:37 | 2017-12-19T09:29:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,743 | py | import os
import sys
current_path = os.path.dirname(os.path.abspath(__file__))
python_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, 'python27', '1.0'))
noarch_lib = os.path.abspath(os.path.join(python_path, 'lib', 'noarch'))
sys.path.append(noarch_lib)
root_path = os.path.abspath(os.path.jo... | [
"xxnet.dev@gmail.com"
] | xxnet.dev@gmail.com |
4759887ba6b4426d526fa421b4b323b16f001d74 | 20c184adcc5eed194449b77883c80698c2c6cf32 | /claf/data/reader/wikisql.py | 322ee0fcc4175d84be14729d275d7eb2ac711c0a | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Sejik/claf | ff863447171e547e4e968cd5c514a0b511fc1cf3 | 6eadc89a02ec5c4703f2fb36eebc64009ac25704 | refs/heads/master | 2020-06-21T05:21:21.990922 | 2019-08-27T09:19:00 | 2019-08-27T09:19:00 | 197,354,343 | 0 | 0 | null | 2019-07-17T09:04:40 | 2019-07-17T09:04:39 | null | UTF-8 | Python | false | false | 5,772 | py |
import json
import logging
from pathlib import Path
import uuid
from overrides import overrides
from tqdm import tqdm
from claf.data.dataset import WikiSQLDataset
from claf.data.batch import make_batch
from claf.data.reader.base import DataReader
from claf.decorator import register
from claf.metric.wikisql_lib.dbeng... | [
"humanbrain.djlee@gmail.com"
] | humanbrain.djlee@gmail.com |
9927d90534340521378b05a135ce3e825c874360 | 32bca2cecba81942da62b4240b619ca635f76603 | /kge/core/system.py | 2c0ffe8aea0edfac1da3fba745728400bd80756f | [
"CC0-1.0"
] | permissive | Fredkiss3/kge | ae01309974808c759a5c5f3a68d2eb48649222c7 | 389d5ab21ecb6dc1a25dd9f98245ba5938a5d253 | refs/heads/master | 2023-06-27T05:52:46.834383 | 2020-05-28T13:48:42 | 2020-05-28T13:48:42 | 238,869,356 | 5 | 0 | CC0-1.0 | 2022-11-22T05:19:42 | 2020-02-07T07:47:19 | Python | UTF-8 | Python | false | false | 985 | py | import asyncio
from concurrent import futures
from typing import Union, Optional, Callable, Any
import kge
from kge.core.eventlib import EventMixin
from kge.core.events import Event
from kge.core.logger import LoggerMixin
class System(EventMixin, LoggerMixin):
"""
a system is an object that handl... | [
"fredkiss3@gmail.com"
] | fredkiss3@gmail.com |
523d0a17dcbdb4a245052d78b59be5a97efbff61 | 8ba6707a2370bf3de46483c4c06b28ce5ad77049 | /python_land/asgi.py | f2a8540c561caf43e5f89f32ab9a5b1d691b48a3 | [] | no_license | ayanchyaziz123/programming-world-my-prsonal-programming-bloging-website | 53d0a601a774fa5e7485052f05b7811686194763 | 756defb56469f1a3514842413c28b366b4a8c59e | refs/heads/master | 2023-05-09T06:15:35.227946 | 2021-05-19T09:22:00 | 2021-05-19T09:22:00 | 353,992,394 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | """
ASGI config for python_land project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_S... | [
"aaziz9642@gmail.com"
] | aaziz9642@gmail.com |
fd834938a2dbbdf86ecebfd79d42fb2ca0ae7221 | 015eb3f0b9a2da9f29c0d352515269bcce2fe6c1 | /browser/memberinfo.py | 5c2233b0fb77ffd93442e117d599530e298cde06 | [] | no_license | aclark4life/worldcookery | 4dcfe85263aa5072c280291a56c9256eda9af311 | 783fa5c87b3134cffb598cf001f878198d7a02e8 | refs/heads/master | 2021-01-21T11:39:53.507380 | 2015-07-14T00:55:50 | 2015-07-14T00:55:50 | 39,041,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,090 | py | from zope.formlib.form import FormBase, Fields, haveInputWidgets
from zope.formlib.form import action, applyChanges, setUpEditWidgets
from zope.formlib.namedtemplate import NamedTemplate
from zope.i18nmessageid import MessageFactory
_ = MessageFactory('worldcookery')
from worldcookery.interfaces import IMemberInfo
cla... | [
"aclark@aclark.net"
] | aclark@aclark.net |
d11d1def40792225c275df60afa0bf8002299b01 | 5eff3aa4a0f548e2ffb9ccbdd01f2490bbb31bc3 | /sandbox/sandbox/order/utils.py | 15761a5ed9f1b66c4f597dbe1007464659af7bf0 | [
"ISC"
] | permissive | jan0991/django-oscar-api-checkout | 1bb0aec040f8b8bdf4285255b680d80a573bbb22 | 30507f4edbcf627e4fa0fe9f31ca5ff0cda54d22 | refs/heads/master | 2021-01-01T17:20:27.019235 | 2017-07-05T21:49:01 | 2017-07-05T21:49:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | import math
import time
import random
class OrderNumberGenerator(object):
def order_number(self, basket):
base_num = int(math.floor(time.time() / (3600 * 24)))
basket_id = str(basket.id).zfill(3)[::-1]
suffix = random.randrange(100, 999)
number = 'O' + str(base_num) + basket_id + s... | [
"crgwbr@gmail.com"
] | crgwbr@gmail.com |
6efdd332f45f0d0cf6d78cf2611a969a6a97b746 | 96b34bbeee04885e6090252d2c8f55310bacfcf6 | /tests/test_storage.py | 4602a7b7a486d7e9617ad2eb40748ea627a3b7d8 | [
"MIT"
] | permissive | samgardner/pyaaf | 2f9de02a1a190b8545752f71000e0f19634361f8 | 0fc0fde7b3cfeffe03a974ab811079629e53c163 | refs/heads/master | 2021-01-17T07:30:32.427877 | 2014-05-05T03:02:11 | 2014-05-05T03:02:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,337 | py | from __future__ import print_function
import aaf
import aaf.util
import aaf.mob
import aaf.define
import aaf.iterator
import aaf.dictionary
import aaf.storage
import aaf.base
import unittest
import traceback
import os
import uuid
cur_dir = os.path.dirname(os.path.abspath(__file__))
sandbox = os.path.join(cur_dir,... | [
"mindmark@gmail.com"
] | mindmark@gmail.com |
ab1579e3e4fc8436af5aae9f6513125a7a5f6021 | 10915e2f20f22069f59db3b5594e244033a54871 | /test/e2e/test_201_header_conditional.py | 725310db17946ad4ea26aca1c1cc1938d3f534b3 | [
"FSFAP",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | elukey/mod_h2 | 47e2074adbd38f48859bf5fe1fc17bc27f6e2e44 | 3418fc31b8ffe9fe477899d60ccfdecdfac1df34 | refs/heads/master | 2020-07-25T13:41:54.173018 | 2019-10-06T06:15:15 | 2019-10-06T15:43:08 | 208,310,398 | 0 | 0 | NOASSERTION | 2019-09-13T17:09:06 | 2019-09-13T17:09:06 | null | UTF-8 | Python | false | false | 3,445 | py | #
# mod-h2 test suite
# check handling of conditional headers
#
import copy
import os
import re
import sys
import time
import pytest
from datetime import datetime
from TestEnv import TestEnv
from TestHttpdConf import HttpdConf
def setup_module(module):
print("setup_module: %s" % module.__name__)
TestEnv.init... | [
"stefan.eissing@greenbytes.de"
] | stefan.eissing@greenbytes.de |
80f2b6b6b19a86a41e1052fe20dd15dbf2ce467d | 498e792e16ab1a74ac034c53177c4cccbeef2749 | /objectDetection/yolo3-pytorch/VOCdevkit/VOC2007/voc2yolo3.py | add5f3d76c4fe7b05e3f118f333ed5a85fc2c8f4 | [
"MIT"
] | permissive | ydwisroad/imageprocessingpytorch | f97bec4469c087f6bbbca5d42da180c95be8b13f | bd8d1af228619c9c6c9c1a2b880422f7d5048dd5 | refs/heads/master | 2023-07-29T05:05:11.145832 | 2022-02-21T23:32:03 | 2022-02-21T23:32:03 | 284,976,501 | 7 | 3 | null | 2023-07-24T01:08:22 | 2020-08-04T12:43:24 | Jupyter Notebook | UTF-8 | Python | false | false | 1,101 | py | import os
import random
random.seed(0)
xmlfilepath=r'./VOCdevkit/VOC2007/Annotations'
saveBasePath=r"./VOCdevkit/VOC2007/ImageSets/Main/"
trainval_percent=1
train_percent=1
temp_xml = os.listdir(xmlfilepath)
total_xml = []
for xml in temp_xml:
if xml.endswith(".xml"):
total_xml.append(xml)
num=len(tot... | [
"wandf12345@163.com"
] | wandf12345@163.com |
7dd6b132cf9d633ada329ca7752a7285f02274fc | 94bc59ae86b700b6d836f685aae20ffd34eee1ff | /iprPy/Settings.py | 94486fcf5cb7d78660cb062e200ec66481983929 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | michaelxu01/iprPy | 5cddaeb13bc5897fd6365ce1df3d0d8ea339e962 | e8c3eded5f24fa9e2ea209abb6a48137420e28cb | refs/heads/master | 2023-08-19T04:42:10.300328 | 2021-09-14T19:13:17 | 2021-09-14T19:13:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,876 | py | # Standard Python libraries
from copy import deepcopy
from pathlib import Path
import json
import potentials
# iprPy imports
from .tools import screen_input
class Settings(potentials.Settings.Settings):
"""
Class for handling saved settings.
"""
@property
def runner_log_directory(self):
... | [
"lucas.hale@nist.gov"
] | lucas.hale@nist.gov |
e0bc7b4bcc719ba56f673cad52f6389ae997b5aa | 8ed16d629c03306a5166f2409a9defea98b6a1bd | /env/bin/pyreverse | 0ce343be818ae1008bd9fa627d4af6a370fbb844 | [] | no_license | donaldvallejo/cs-intro-to-data-structures-2.0 | 07138a5d12a221839f7de7c0ca7febd4a0c0f666 | 925b6bf16c9a5541460b96cfa2e14136a54ae83e | refs/heads/master | 2020-12-19T21:19:15.976223 | 2020-03-05T03:36:05 | 2020-03-05T03:36:05 | 235,854,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 320 | #!/Users/donaldvallejo/Documents/Documents/dev/makeSchool/CS/1.2/cs-intro-to-data-structures-2.0/env/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from pylint import run_pyreverse
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(run_pyreverse())
| [
"donny.vallejo@gmail.com"
] | donny.vallejo@gmail.com | |
ed0e9badba97f7b55651d63644c986c0b97ecd30 | ac4b9385b7ad2063ea51237fbd8d1b74baffd016 | /.history/google/docs_quickstart_20210212165743.py | dda0f43aacaa77ab050faf9280dab96eb94aa2a7 | [] | no_license | preethanpa/ssoemprep | 76297ef21b1d4893f1ac2f307f60ec72fc3e7c6f | ce37127845253c768d01aeae85e5d0d1ade64516 | refs/heads/main | 2023-03-09T00:15:55.130818 | 2021-02-20T06:54:58 | 2021-02-20T06:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,607 | py | from __future__ import print_function
import pickle
import os.path
import io
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from googleapiclient.http import MediaIoBaseDownload
from oauth2client.service_account import... | [
"{abhi@third-ray.com}"
] | {abhi@third-ray.com} |
5550cad5c53f5d9b9059b64b8327774be9f7a787 | b35f80114ad96928ccce44d40840177e0b5158aa | /dfvfs/compression/decompressor.py | aebeb16a696379ab37da02e828f8eb9980e7d553 | [
"Apache-2.0"
] | permissive | ryanmjones/dfvfs | 7b62bab127cb201e679331fa808ec79e8ef03bd9 | 29ae5baddbf285260a596a67a199d0f5077214c1 | refs/heads/master | 2020-03-29T23:47:49.363000 | 2018-09-03T11:43:03 | 2018-09-03T11:43:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | # -*- coding: utf-8 -*-
"""The decompressor interface."""
from __future__ import unicode_literals
import abc
class Decompressor(object):
"""Decompressor interface."""
@abc.abstractmethod
def Decompress(self, compressed_data):
"""Decompresses the compressed data.
Args:
compressed_data (bytes): ... | [
"joachim.metz@gmail.com"
] | joachim.metz@gmail.com |
ebca116a0ac32a739ea58c230bf19aeeac1dca00 | b403c7fe56209472855dff451f0b6283d5471008 | /Supplemental_Material/Python_PartB_PROJECTS/PythonObjects/AnimalGroupsinheritance.py | f2c457369fcf974d579fc1f9d2055a0859de92ac | [] | no_license | Sandbox4KidsTM/Python_Basics | 842bde52796896e913fdb5cc349034c52092555f | 68c95547ec1567958fc8069e6a4bb119e436211a | refs/heads/master | 2020-03-23T01:06:29.363196 | 2018-08-10T04:32:58 | 2018-08-10T04:32:58 | 140,901,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,171 | py | # this explores the OOP concept of inheritance
# https://www.youtube.com/watch?v=d8kCdLCi6Lk
class Animal:
def __init__(self, birthType="Unknown", appearance="Unknown", blooded="Unknown"):
self.birthType = birthType #live or egg
self.appearance = appearance #fur, feathers, etc.
... | [
"mitchslabrenz@gmail.com"
] | mitchslabrenz@gmail.com |
655a3bd63ddfcd9ecd0da97b0fd2f4c3cb34fb9f | 767c07db1fb131047af3d9b0a065b8fdc8aac9ab | /84-Clustering/84H_hclust_customers.py | b320bbf6acf46bd019d769c0d42008be37d8a339 | [] | no_license | DUanalytics/pyAnalytics | e52c5469da30a5f436ec0f3120d9f15fb82fd9b3 | 107a08bebe46ea51afccfeae4a666213bb405d41 | refs/heads/master | 2023-07-08T04:32:54.758902 | 2023-07-03T14:37:04 | 2023-07-03T14:37:04 | 202,094,535 | 394 | 31 | null | null | null | null | UTF-8 | Python | false | false | 7,003 | py | #Topic: Hierarchical Clustering
#-----------------------------
#libraries
import numpy as np
X = np.array([[5,3], [10,15], [15,12], [24,10], [30,30], [85,70], [71,80], [60,78], [70,55], [80,91],])
X
#%%%
import matplotlib.pyplot as plt
labels = range(1, 11)
plt.figure(figsize=(8,6))
plt.s... | [
"dup1966@gmail.com"
] | dup1966@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.