blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
616
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
777 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
149 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
3
10.2M
extension
stringclasses
188 values
content
stringlengths
3
10.2M
authors
listlengths
1
1
author_id
stringlengths
1
132
be90ebc66d52f4050ebf05b9127d53fc6025b638
b09e71b77dd41d5db266733d1eedb845cb56d5c2
/models/ts_hred/src/hred/read_data.py
e4fab39a8fee951ef16fc947503a9388aea060df
[]
no_license
lingxiao/neural-chatbot
1bcaaea5ede06d0cdc7232f3905b2c813f97f36d
70dc9366c9d419c26cfb51086187026503820267
refs/heads/master
2021-01-20T07:51:26.398642
2017-12-26T07:05:11
2017-12-26T07:05:11
90,052,227
0
1
null
null
null
null
UTF-8
Python
false
false
3,147
py
import tensorflow as tf import os import numpy as np import subprocess import pickle import os import logging as logger def read_batch( data_file , batch_size = 80 , eoq_symbol = 1 , pad_symbol = 2 , max_seq_len = 50 ): batch = ([], []) from sys imp...
eae14d10395cebb9005075be962dbccde8e96453
d125c002a6447c3f14022b786b07712a7f5b4974
/tests/bugs/core_6496_test.py
83add6fecce024bf4fe791101f323a6d8fe430ef
[ "MIT" ]
permissive
FirebirdSQL/firebird-qa
89d5b0035071f9f69d1c869997afff60c005fca9
cae18186f8c31511a7f68248b20f03be2f0b97c6
refs/heads/master
2023-08-03T02:14:36.302876
2023-07-31T23:02:56
2023-07-31T23:02:56
295,681,819
3
2
MIT
2023-06-16T10:05:55
2020-09-15T09:41:22
Python
UTF-8
Python
false
false
934
py
#coding:utf-8 """ ID: issue-6726 ISSUE: 6726 TITLE: string_to_datetime and '\\0' symbol DESCRIPTION: ascii_char(0) was allowed to be concatenated with string and pass then to cast(... as timestamp) up to 4.0.0.1227 (29-09-2018), and is forbidden since 4.0.0.1346 (17.12.2018). FB 3.x allows t...
3f6b0953d0bf05f639da4bc89ab48e385ff3d3df
ec1deb682fb96a1f937f2fca5f161aa951462876
/pythonTextBook/exercises/classes/ex-9.6.py
e5f26b58f5dd3a61052ca7291d86c4b458d68fef
[]
no_license
AnatoliKosarev/Python-beginner-course--Teclado-
31d82f5e9a1f39e2970323bed9de1fd539990565
fa91199938d6975b5874341585343566caaf3600
refs/heads/main
2023-06-30T12:14:33.779827
2021-07-24T11:16:19
2021-07-24T11:16:19
376,371,590
0
0
null
null
null
null
UTF-8
Python
false
false
506
py
from HelloWorld.pythonTextBook.exercises.classes.exNineFour import Restaurant class IceCreamStand(Restaurant): def __init__(self, restaurant_name, cuisine_type): super().__init__(restaurant_name, cuisine_type) self.flavours = ["vanilla", "chocolate", "strawberry"] def show_flavours(self): ...
7dfd66da43d55823453a16f8a9f215ffd604f136
17e0b82a3481dc857be371e3189f2d5ec158111a
/src/service/connections/__init__.py
f54aa4f85d6c79e0450907ffa9a4baebf3b8b502
[ "Apache-2.0" ]
permissive
deeso/service-utilities
582cc34cb944734ac16b42dd57815a44e59f9f0e
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
refs/heads/master
2021-05-14T14:53:37.536862
2018-01-23T11:37:12
2018-01-23T11:53:16
115,980,468
0
0
null
null
null
null
UTF-8
Python
false
false
494
py
from .base_connection import ConnectionFactory from .kombu_connection import KombuConnection from .mongo_connection import MongoConnection from .socket_connection import TCPConnection, UDPConnection from .jsonline_connection import JsonTCPLineConnection, JsonUDPLineConnection ConnectionFactory.register_connection(Komb...
cf2f2d7f88dda9d9c3caa6fbe711331cf4e416d8
019fd2c29b8239d7b0a3906cfbdddfd440362417
/datacatalog/google/cloud/datacatalog_v1beta1/proto/policytagmanagerserialization_pb2_grpc.py
74a7fdcfa5f77b46313389513bcdf64342f64c96
[ "Apache-2.0" ]
permissive
tswast/google-cloud-python
1334d26cdb994293f307d889251d7daef5fcb826
d897d56bce03d1fda98b79afb08264e51d46c421
refs/heads/master
2021-06-10T17:40:06.968584
2020-01-11T17:41:29
2020-01-11T17:41:29
58,775,221
1
1
Apache-2.0
2019-04-10T17:09:46
2016-05-13T22:06:37
Python
UTF-8
Python
false
false
3,846
py
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.datacatalog_v1beta1.proto import ( policytagmanagerserialization_pb2 as google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2, ) class PolicyTagManagerSerializationStub(object)...
e9c38467e2a787714831f7864bb435bcedfaeca4
3e8acb5749ff67add92a50718ed44f5e80b589b1
/app/helpers/sqlalchemy_helpers.py
edcae3444a81f58899f7e98b474581afeacd69a1
[]
no_license
jeffthemaximum/mtinator
a43b0dc93575742b161373a460e0f883da1c0f35
a15eccf2acc727c32d8c0e0b31922f27edd3e386
refs/heads/master
2022-10-09T23:15:12.092352
2019-09-09T18:37:22
2019-09-09T18:37:22
207,014,198
0
0
null
2022-09-23T22:27:43
2019-09-07T19:09:13
Python
UTF-8
Python
false
false
2,239
py
import datetime from app.models import Line, Status def get_or_create(db_session, model, **kwargs): created = False instance = db_session.query(model).filter_by(**kwargs).first() if instance: return instance, created else: instance = model(**kwargs) db_session.add(instance) ...
62f22b123e3f5dd0e4c74c13925b4c37009df1a8
33a50bb13812090a36257078522b798762978c66
/top/api/rest/JushitaJdpUserAddRequest.py
3936dcb28e2258dc2e002dc64d4199ecc712998e
[]
no_license
aa3632840/quanlin
52ac862073608cd5b977769c14a7f6dcfb556678
2890d35fa87367d77e295009f2d911d4b9b56761
refs/heads/master
2021-01-10T22:05:14.076949
2014-10-25T02:28:15
2014-10-25T02:28:15
23,178,087
1
0
null
null
null
null
UTF-8
Python
false
false
305
py
''' Created by auto_sdk on 2014-09-08 16:48:02 ''' from top.api.base import RestApi class JushitaJdpUserAddRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.rds_name = None def getapiname(self): return 'taobao.jushita.jdp.user.add'
be29efc36f6a969ab3bd214e43536e35705e975e
9b722ca41671eb2cea19bac5126d0920639261bd
/.history/app_20201122215937.py
6289174e858ea6631f102042e9c2fb4ba21ac8be
[]
no_license
thawalk/db_flask_server
7928fd481f99d30bdccc60d97f02db78324cfdbe
cd55f1c9bf84c734457ee02d9f64a6833e295fad
refs/heads/master
2023-01-25T02:40:19.097457
2020-12-06T07:45:50
2020-12-06T07:45:50
314,229,480
0
0
null
null
null
null
UTF-8
Python
false
false
3,946
py
import json from flask import Flask, jsonify, url_for, request, redirect,Response,Request # from flask_pymongo import PyMongo import pymongo from bson.json_util import dumps import mysql.connector from werkzeug.serving import run_simple import os from dotenv import load_dotenv import datetime import time app = Flask(_...
b356dcb3f63d9429c49159d66a995e1973602e26
53e90091d10a2454e14a02ecc689e355ac2a7cc1
/book/pylisting/code_stemmer_indexing.py
dfdae82f171252f3d61a071abec893db065ea0a1
[]
no_license
dougalg/nltk.github.com
aac74cf03d17475adc177ac08691359cb1f4adb6
9a04ac5264f5ef08d87d6b920580c9160042f1a0
refs/heads/master
2020-12-07T17:15:15.894232
2014-04-21T14:11:17
2014-04-21T14:11:17
18,965,594
1
0
null
null
null
null
UTF-8
Python
false
false
798
py
# Natural Language Toolkit: code_stemmer_indexing class IndexedText(object): def __init__(self, stemmer, text): self._text = text self._stemmer = stemmer self._index = nltk.Index((self._stem(word), i) for (i, word) in enumerate(text)) def concordance(s...
bf2bdb42b6618a874bea7a69332aef8708faac3e
f0d713996eb095bcdc701f3fab0a8110b8541cbb
/xNxZx7DDr6BumJLaB_18.py
8aa7e4f2ef2b69ac807c4f99c801cd1f3a29e0e7
[]
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
598
py
""" **Mubashir** wants to remove numbers from a given string! Help him by fixing the code in the code tab to pass this challenge. Look at the examples below to get an idea of what the function should do. ### Examples remove_numbers("mubashir1") ➞ "mubashir" remove_numbers("12ma23tt") ➞ "matt" ...
2bbe287656c0e9eb6579f80e9e43e6a9663f4f51
4bf5f83a8e5cd4c3ee700569e4a6f07a87dd209c
/students/13th/hyungukkim/project_westagram/user/models.py
2bf6fc0ee085860322a503e233755d2382c454b0
[]
no_license
gledong12/westagram-backend
6e066f4c741aa19df13224ba530b0d9f43a405f7
1842f065c599885ad5dcb9ec5fb267eaf3295872
refs/heads/master
2023-03-11T20:32:47.055525
2021-03-04T01:04:31
2021-03-04T01:04:31
null
0
0
null
null
null
null
UTF-8
Python
false
false
673
py
from django.db import models class Account(models.Model): name = models.CharField(max_length=45) email = models.CharField(max_length=45) phone = models.CharField(max_length=45) password = models.CharField(max_length=200) followers = models.IntegerField(default=0) followees = models.IntegerField(def...
22b9c617a333f0820997c188219ab0230f75f0bb
209a7a4023a9a79693ec1f6e8045646496d1ea71
/COMP0016_2020_21_Team12-datasetsExperimentsAna/pwa/FADapp/pythonScripts/venv/Lib/site-packages/pandas/tests/util/test_doc.py
c9b12b5c490713603c6c109debfbd33547c8c5b0
[ "MIT" ]
permissive
anzhao920/MicrosoftProject15_Invictus
5e2347015411bbffbdf0ceb059df854661fb240c
15f44eebb09561acbbe7b6730dfadf141e4c166d
refs/heads/main
2023-04-16T13:24:39.332492
2021-04-27T00:47:13
2021-04-27T00:47:13
361,913,170
0
0
MIT
2021-04-26T22:41:56
2021-04-26T22:41:55
null
UTF-8
Python
false
false
1,582
py
from textwrap import dedent from pandas.util._decorators import doc @doc(method="cumsum", operation="sum") def cumsum(whatever): """ This is the {method} method. It computes the cumulative {operation}. """ @doc( cumsum, dedent( """ Examples ------...
1496f4e20eb8bd4117fbf6f91248ff6bc0e67fb0
9d3b264a75264a28bafa0d22889c0bf6c429bbf4
/fluent_contents/tests/utils.py
2d9bed0d2676c3d7b2df627df2b062d241e50491
[ "Apache-2.0" ]
permissive
hexenxp14/django-fluent-contents
a799b3864c826edf9ed67f4132589f73a4cf7807
613a4cd51ac201b86adfd5434e08f9a56eebfa2d
refs/heads/master
2020-12-30T19:22:42.340848
2014-10-30T12:41:13
2014-10-30T12:41:13
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,536
py
from __future__ import print_function from future.builtins import str from functools import wraps from django.conf import settings, UserSettingsHolder from django.contrib.auth.models import User from django.core.management import call_command from django.contrib.sites.models import Site from django.db.models import loa...
4346489444cdc929ef4cbf646a290ff6bb17a126
d17a8870ff8ac77b82d0d37e20c85b23aa29ca74
/lite/tests/unittest_py/op/test_generate_proposals_op.py
e2f0d972640dd4077b6189d8870238550a6c648a
[ "Apache-2.0" ]
permissive
PaddlePaddle/Paddle-Lite
4ab49144073451d38da6f085a8c56822caecd5b2
e241420f813bd91f5164f0d9ee0bc44166c0a172
refs/heads/develop
2023-09-02T05:28:14.017104
2023-09-01T10:32:39
2023-09-01T10:32:39
104,208,128
2,545
1,041
Apache-2.0
2023-09-12T06:46:10
2017-09-20T11:41:42
C++
UTF-8
Python
false
false
5,294
py
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
f586fe3dbe958a601f1a99e6f4f461331e4eb4b8
a42c73c33f0ed093a57b077ee726eb60bd3a9410
/tests/res/mnist.py
5ad533e2b2b65691e6655eef9b540c700fd6ceb5
[]
no_license
chriamue/mnistclassifier
81485e70bc6d94aeea5bb84ae66ac45fe5dbac51
1c02663f2444bbe195356b65a9ce4deecd763100
refs/heads/master
2020-04-14T05:04:57.706819
2019-01-07T09:44:11
2019-01-07T09:44:11
163,652,126
0
0
null
null
null
null
UTF-8
Python
false
false
695
py
# source: https://github.com/pytorch/examples/blob/master/mnist/main.py import torch import torch.nn as nn import torch.nn.functional as F class mnist(nn.Module): def __init__(self, **kwargs): super(mnist, self).__init__() self.conv1 = nn.Conv2d(1, 20, 5, 1) self.conv2 = nn.Conv2d(20, 50, ...
e5f2dc700e06c9c83226158065ea027d552e8f9a
556db265723b0cc30ad2917442ed6dad92fd9044
/tensorflow/python/autograph/impl/api.py
1115318c610daf1cd97b2a404ad426a4608bbc6a
[ "MIT", "Apache-2.0", "BSD-2-Clause" ]
permissive
graphcore/tensorflow
c1669b489be0e045b3ec856b311b3139858de196
085b20a4b6287eff8c0b792425d52422ab8cbab3
refs/heads/r2.6/sdk-release-3.2
2023-07-06T06:23:53.857743
2023-03-14T13:04:04
2023-03-14T13:48:43
162,717,602
84
17
Apache-2.0
2023-03-25T01:13:37
2018-12-21T13:30:38
C++
UTF-8
Python
false
false
33,056
py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
7f6038af767e1779c691a01c5838ef93949692f0
2beecbbcc8d3b21d6c536885dc10570bf20044bb
/week_four/media_clone/media_app/models.py
9d3dc421e33c69a41301b3d6ba06b11aa7a32289
[]
no_license
MTaylorfullStack/python_april
05724dff121370f72b14beaf9737bcd39292111b
e15a496dc5ea3e0cb5f966000bfb7ad30c6bce28
refs/heads/master
2022-07-22T15:55:21.335557
2020-05-21T01:02:11
2020-05-21T01:02:11
255,476,577
0
1
null
null
null
null
UTF-8
Python
false
false
642
py
from django.db import models class User(models.Model): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Message_Post(models.Model): message = models...
81d7c0b15b03f6fd57c59e9e2efe51c989c26b7f
dc3c88f1fe5c80147e4c52ee6ec3136307ec9702
/copyPluginName/readMe_model.py
e68cca9deb5a4c208e6e7256e693996c1687b6a5
[]
no_license
ypapax/all_sublime_plugins
062f9b9992a093a02e6b905c1329c681c8532034
8b10e471233bd6c2e77907cf5569b0ddccfc88f9
refs/heads/master
2021-01-15T21:10:08.029750
2015-08-16T06:32:51
2015-08-16T06:32:51
40,391,701
0
0
null
null
null
null
UTF-8
Python
false
false
428
py
import re import sys sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/moveNearReplace') import filer2 def read(self): view = self.window.active_view() filename = view.file_name() data = filer2.read(filename) return data def windowPluginName(self): data = read(self...
7902e49a5df27303eec60da89c20f7aefa4c720d
7db3916d8ac8a66a954d230e43bb74b37f81357c
/15day/06-用进程池创建进程.py
8f6ee1c366d1b43c8dca4fa6d5a3c44a7a884afe
[]
no_license
2001128/2_1805
2fc96bc6f8e2afcd9d4743891ecd87b754c28cc8
b3d4bfab2703a7c6aa1c280669376efeab28cad1
refs/heads/master
2020-03-22T20:53:14.903808
2018-07-30T06:04:49
2018-07-30T06:04:49
140,639,052
0
0
null
null
null
null
UTF-8
Python
false
false
310
py
from multiprocessing import Pool import time def work(msg): for i in range(10): time.sleep(1) print("嘿嘿嘿%s"%msg) p = Pool(3)#最大装3个进程 for i in range(6): p.apply_async(work,(i,))#非阻塞 #p.apply(work,(i,))#阻塞 print("添加一个") p.close() p.join()
851f182f4e8fd3a5a29ab28134a076b696039ae6
c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c
/cases/synthetic/stdlib-big-823.py
d21cebeaf029e04de343a5b0650c3a2f5c83733c
[]
no_license
Virtlink/ccbench-chocopy
c3f7f6af6349aff6503196f727ef89f210a1eac8
c7efae43bf32696ee2b2ee781bdfe4f7730dec3f
refs/heads/main
2023-04-07T15:07:12.464038
2022-02-03T15:42:39
2022-02-03T15:42:39
451,969,776
0
0
null
null
null
null
UTF-8
Python
false
false
8,998
py
# ChocoPy library functions def int_to_str(x: int) -> str: digits:[str] = None result:str = "" # Set-up digit mapping digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] # Write sign if necessary if x < 0: result = "-" x = -x # Write digits using a recursive call ...
d711b04956217dda83f8d47d7a2a5a5ee2d06a86
14e36010b98895e08bd9edfcbc60dce30cbfb82b
/oneflow/compatible_single_client_python/framework/local_blob.py
8983fd0ce3ae9d403eddf84b197066a33689b23e
[ "Apache-2.0" ]
permissive
duzhanyuan/oneflow
a9719befbfe112a7e2dd0361ccbd6d71012958fb
c6b47a3e4c9b5f97f5bc9f60bc1401313adc32c5
refs/heads/master
2023-06-21T20:31:55.828179
2021-07-20T16:10:02
2021-07-20T16:10:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,242
py
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
4c5f939acd7ce243666553d243a0661345dd58fe
6bc991e3db089dca9ac7a5716f2114017029c6a3
/sppas/sppas/bin/alignment.py
824e0e6612b3ee11ddd3be818873a6978d6ffcb5
[ "GFDL-1.1-or-later", "GPL-3.0-only", "GPL-3.0-or-later", "MIT" ]
permissive
mirfan899/MTTS
8b32924754cf399147293d7e314b7fcb134f3f77
3167b65f576abcc27a8767d24c274a04712bd948
refs/heads/master
2020-06-11T20:59:03.788965
2019-10-09T12:34:02
2019-10-09T12:34:02
194,083,206
0
0
MIT
2019-06-27T11:30:30
2019-06-27T11:30:30
null
UTF-8
Python
false
false
8,297
py
#!/usr/bin/env python """ .. --------------------------------------------------------------------- ___ __ __ __ ___ / | \ | \ | \ / the automatic \__ |__/ |__/ |___| \__ annotation and \ | | | | \ ...
60f4317f06b40db9362ee145924634045e727923
d3cac61f30d7a76eb61560ac54b0b8d11fd63a19
/src/model/model.py
33a6eee5e2b1a4916972b46a64914ee6f015bb93
[ "MIT" ]
permissive
Lukeeeeee/FISDNN
a676f7f73b8f7b54386054daf320b6a683d89b02
49361770fe987337b16a296c00cfd6562a7e95ed
refs/heads/master
2021-08-24T00:59:46.587476
2017-12-07T10:32:58
2017-12-07T10:32:58
113,009,930
0
0
null
null
null
null
UTF-8
Python
false
false
772
py
import tensorflow as tf class Model(object): standard_key_list = [] def __init__(self, config, sess_flag=False, data=None): self.config = config self.data = data self.net = None if sess_flag is True: self.sess = tf.InteractiveSession() def create_model(self, *...
9cb2f1bdd1bdc428bbeab2a4bcd011661e134f04
bad44a92fb338260f9c077689d7fa5472526c3fe
/models/tensorflow/google_bert/optimization_test.py
4f2dcf133f1bc4d4531fc9b82432d149be054b21
[ "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
microsoft/nnfusion
ebc4c06331b8e93dbf5e176e5ecd3382e322ff21
bd4f6feed217a43c9ee9be16f02fa8529953579a
refs/heads/main
2023-08-25T17:41:37.517769
2022-09-16T05:59:01
2022-09-16T05:59:01
252,069,995
872
157
MIT
2023-07-19T03:06:21
2020-04-01T04:15:38
C++
UTF-8
Python
false
false
1,721
py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
9d45c7ac1d31dcdc4b7a018c9ea7c272e9ce58b4
2c3da6e0bddf55d64d650040bbf286c47b31811a
/学习路线/1.python基础/day12/03-自定义异常.py
bd4172eec5c4d550a58d35d8fc6cc71179cba149
[ "MIT" ]
permissive
Bngzifei/PythonNotes
76bd53db3033a9c51ab4bdd727842cd89607b584
01590e1b6c1bc0f04aa2d355fa2553c04cce27f2
refs/heads/master
2023-02-04T06:49:00.725463
2020-12-15T09:26:40
2020-12-15T09:26:40
155,154,662
1
2
MIT
2020-09-08T01:30:19
2018-10-29T05:02:48
Python
UTF-8
Python
false
false
1,938
py
""" 异常抛出的原理: raise: 关键字 抛出 表示抛出指定的异常实例对象 raise 抛出异常的实例对象,然后except去拦截这个异常实例对象. 能不能拦截:是要看这个错误是不是这个错误的类创建的. 拦截:判断是不是同一个类造出来的,是,就把这个异常实例对象赋值给error. 先抛出来才能拦截. 自定义异常:不用解释器提供异常类. 1> 让异常信息是中文的,让用户也能看懂.更加人性化 2> 提前干预,还没有出错之前就来对问题进行处理. 3> 简化异常处理的流程,批量抛出,一次拦截. 注意: 自定义异常类必须继承Exception类,是为了使用raise的能力.否则会报错误. """ # try: #...
f1629890cb41cf63d385ff4525caec9e3678951b
781e2692049e87a4256320c76e82a19be257a05d
/all_data/exercism_data/python/word-count/4633f41ce11c4f3db40f1cfe10da8a7c.py
7c016a0265697b750d833f5b89770e6f4100a444
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Python
false
false
355
py
import string def stripPunc(x): # From S.Lott's solution for i in string.punctuation: x = x.replace(i,"") while " " in x: x = x[0:x.find(" ")] + x[(x.find(" ") + 1):] return x def word_count(x): words = {} for i in stripPunc(x).lower().split(" "): if i in words: words[i] += 1 el...
3acf4e7c0a1d9229123d0246516ee9b90f9c7d65
9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97
/sdBs/AllRun/pg_2239+043/sdB_PG_2239+043_coadd.py
8fd4cff041120c8922b19c408c25702306753147
[]
no_license
tboudreaux/SummerSTScICode
73b2e5839b10c0bf733808f4316d34be91c5a3bd
4dd1ffbb09e0a599257d21872f9d62b5420028b0
refs/heads/master
2021-01-20T18:07:44.723496
2016-08-08T16:49:53
2016-08-08T16:49:53
65,221,159
0
0
null
null
null
null
UTF-8
Python
false
false
426
py
from gPhoton.gMap import gMap def main(): gMap(band="NUV", skypos=[339.639,4.857103], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_PG_2239+043/sdB_PG_2239+043_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sdB_PG_...
43f43e93f47c1bebed88ed87d44afa9e783bf0d5
426e3c51d85e3ee60ce27c8b4f870b69db5dfc30
/config/settings.py
55666356579de325f1ac9be4bb1b0ab92bf4b406
[]
no_license
seiya0723/diary_04
ad5468f5af9f69bf659bfc3f977da6402cde1667
700213f4d646c09634fd0f76566604101796d2c1
refs/heads/master
2023-06-28T19:13:59.905437
2021-07-31T01:33:14
2021-07-31T01:33:14
391,228,042
0
0
null
null
null
null
UTF-8
Python
false
false
4,842
py
""" Django settings for config project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib ...
[ "seiya@asahina" ]
seiya@asahina
77bb8d0edbc32f2daee27dd739c806a846f8d986
be8057bf5bfb491cd876c42821a94a58266ae836
/manage.py
e4d17ff2433cbfdaf94d9146ff9376763cd3bd67
[]
no_license
hasgeek/packman
88ae1aa220167dc50a2b83011c53a49c13349437
d99a1d7f08f26e3476a969278a6f0d87b050a280
refs/heads/master
2020-12-25T17:30:07.449733
2019-05-26T14:47:52
2019-05-26T14:47:52
24,697,117
0
1
null
2019-05-26T14:47:53
2014-10-01T22:03:35
Python
UTF-8
Python
false
false
242
py
#!/usr/bin/env python from coaster.manage import init_manager from packman.models import db from packman import app, init_for if __name__ == '__main__': db.init_app(app) manager = init_manager(app, db, init_for) manager.run()
22dfefc6daa031bb7883752c31a9bb1bd9aced00
5e84763c16bd6e6ef06cf7a129bb4bd29dd61ec5
/blimgui/dist/OpenGL/raw/GL/NV/stereo_view_rendering.py
95d69c29319d993fde3973be7deea23fe0d87849
[ "MIT" ]
permissive
juso40/bl2sdk_Mods
8422a37ca9c2c2bbf231a2399cbcb84379b7e848
29f79c41cfb49ea5b1dd1bec559795727e868558
refs/heads/master
2023-08-15T02:28:38.142874
2023-07-22T21:48:01
2023-07-22T21:48:01
188,486,371
42
110
MIT
2022-11-20T09:47:56
2019-05-24T20:55:10
Python
UTF-8
Python
false
false
511
py
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
db542dd2eab000423a4880c15cd1cfb2c66c5f0e
28e8fd6383631ad0e629ab427a3665906eb0e827
/xierpa3/contributions/filibuster/content/auction.py
b25fb2bc3a3623ff160ce7d450f34ad04825985c
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
simons-design/Xierpa3
d2a684c2fed8757b9a49616419e1f8cce508ab1e
4c49986d85a942e719d371dab918bb1c4f813f29
refs/heads/master
2021-01-18T04:54:34.591661
2014-05-23T10:57:39
2014-05-23T10:57:39
null
0
0
null
null
null
null
UTF-8
Python
false
false
9,285
py
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ [email protected], www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
59041a9045421c361c8d5f960d5f68b475d4c6a1
3afc48df003fb180a24072b769b9e5fb5ffb7eb6
/tests/matchers/test_called_once_with.py
9f13e48a6a09f4189dfdcc3a5d03b82907403180
[ "MIT" ]
permissive
hieueastagile/robber.py
d20e90bf43ba2c354ffec56c80080bf65268fd6f
b439251848fd3b5085cdac45130311bfe0facc13
refs/heads/master
2021-01-21T21:09:42.378373
2017-04-24T03:23:22
2017-04-24T03:23:22
92,312,856
0
0
null
2017-05-24T16:21:42
2017-05-24T16:21:41
null
UTF-8
Python
false
false
2,219
py
from unittest import TestCase from mock import Mock from robber import expect from robber.matchers.called_once_with import CalledOnceWith class TestCalledOnceWith(TestCase): def test_matches(self): mock = Mock() mock(1, 2, 3, a=4) expect(CalledOnceWith(mock, 1, False, 2, 3, a=4).matches(...
e6e473574eb22795757091531ef21ac06a1dffb9
109a830aad476305f029274d75e28bec8b54f597
/venv/lib/python3.9/site-packages/django/contrib/admindocs/urls.py
472df9835b304fd18b7f673137b62f549373cbff
[]
no_license
Dapucla/EP
53b156088046abfd6833eba95dc4393ebeb93f4e
9368032b4b289b20ec1bdf0033d3fe199223d200
refs/heads/master
2023-06-19T08:02:55.984888
2021-07-11T22:52:24
2021-07-11T22:52:24
330,009,437
0
0
null
null
null
null
UTF-8
Python
false
false
1,314
py
from django.contrib.admindocs import views from django.urls import path, re_path urlpatterns = [ path( '', views.BaseAdminDocsView.as_view(template_name='admin_doc/post_list.html'), name='django-admindocs-docroot', ), path( 'bookmarklets/', views.BookmarkletsView.as_...
94413847eb45e257955156690c75cb5f1ca00387
334d0190164d92b53be2844a3afc2826d64b1a6d
/lib/python3.9/site-packages/theano/gpuarray/ctc.py
ef6c1d0af4e794d85d8c3e393db03ecc0dd468bb
[]
no_license
sou133688/BayesianStatics
f294d7c47cfa56374cf73b520529620dc6120f47
be9121429494cd8fd231594b029fc2f030d8335f
refs/heads/main
2023-08-21T15:57:32.980658
2021-10-01T00:01:13
2021-10-01T00:01:13
401,909,680
3
0
null
null
null
null
UTF-8
Python
false
false
7,292
py
import os import sys import theano.tensor as tt from theano.configdefaults import config from theano.gpuarray import pygpu from theano.gpuarray.basic_ops import ( as_gpuarray_variable, gpu_contiguous, gpuarray_helper_inc_dir, infer_context_name, ) from theano.gpuarray.elemwise import GpuDimShuffle from...
8c27649f58ae110222601c787c28c39019e012ec
9dee94907e6456a4af9855d358693923c17b4e0d
/1023_Camelcase_Matching.py
2d8d31d02064c55c4031b5e1652870448db622a6
[]
no_license
chien-wei/LeetCode
e215915a8103e56f182040dacc9fb0d6996c86ec
0d6f414e7610fedb2ec4818ecf88d51aa69e1355
refs/heads/master
2021-05-13T14:48:22.891100
2019-08-20T05:52:59
2019-08-20T05:52:59
116,749,327
0
0
null
null
null
null
UTF-8
Python
false
false
663
py
class Solution: def camelMatch(self, queries: List[str], pattern: str) -> List[bool]: results = [] for query in queries: i, j = 0, 0 for p in pattern: while i < len(query) and p != query[i] and query[i].islower(): i += 1 if ...
c3e72a66dd43e325edf92a51acd0b89628fd0aeb
1284718203be50b23dcd1f6159746cfa42a04163
/python_visual_mpc/visual_mpc_core/algorithm/cem_controller_sim.py
ab65cdf4cedbb126c9d46e3038c9869d366b9a5d
[]
no_license
febert/robustness_via_retrying
8fe4106d7705228ff339f9643518a80c0a243d36
1def282dc22f24b72c51ff1ef9ea1a7a83291369
refs/heads/master
2020-03-31T19:33:39.664525
2018-11-07T21:52:56
2018-11-07T21:52:56
152,502,702
17
2
null
null
null
null
UTF-8
Python
false
false
10,283
py
""" This file defines the linear Gaussian policy class. """ import IPython from python_visual_mpc.video_prediction.utils_vpred.create_gif_lib import * import copy from .cem_controller_base import CEM_Controller_Base from python_visual_mpc.visual_mpc_core.agent.general_agent import resize_store import ray import traceba...
44361f5f1844f827da35dd426fbe24580b644796
08615c64a62fc364a802bb92314cf49080ddbcee
/django-oldboy/s1bms2/app01/models.py
e47061a1ed45c130f1022f5f77abe4351abad813
[]
no_license
xiangys0134/python_study
afc4591fca1db6ebddf83f0604e35ed2ef614728
6ec627af7923b9fd94d244c561297ccbff90c1e9
refs/heads/master
2023-02-24T01:24:45.734510
2022-10-29T02:11:20
2022-10-29T02:11:20
143,358,792
2
0
null
2023-02-08T03:07:26
2018-08-03T00:43:46
Python
UTF-8
Python
false
false
1,348
py
from django.db import models # Create your models here. class Book(models.Model): title = models.CharField(max_length=32) price = models.DecimalField(max_digits=8,decimal_places=2) book_type = models.CharField(max_length=32,null=True) publish = models.CharField(max_length=32) pub_date = models.Dat...
bfec217317ad49de9380a27431e4a9aa0666544a
5667cc877342204b7d54b6c3cc5a9f4854f08829
/.history/apppersona/views_20201029201908.py
dd580d4aa77ce4a4588bd4c7df3ded781932da1a
[]
no_license
Nyckhos/TestCommit
d62e3f6fefb04ab5647475cc7ead0d72cbd89efa
9aa8e2e35280b7862960cc8a864e9c02ac7f4796
refs/heads/main
2023-01-05T05:57:59.223641
2020-11-02T02:08:18
2020-11-02T02:08:18
309,237,224
2
0
null
2020-11-02T02:30:43
2020-11-02T02:30:43
null
UTF-8
Python
false
false
1,688
py
from django.http import request from django.shortcuts import render from django.http import HttpResponse from .models import * from .forms import * from django.contrib.auth.models import User # Create your views here. def lista_personas(request): lista = Persona.objects.all() # Todas las personas return ren...
4de7b4d69f235c2fb5fc0b420156d5bcd46241ed
cfefcd99016a908df2584896845406942097671d
/python/test/test_asset_model_portfolio.py
c99a14dfc4d8fbc6b0ea51704ca93e1c90717e98
[]
no_license
tomasgarzon/vigilant-guacamole
982a8c7cb0a8193bb3409014b447ad8a70e6eb36
bde73674cf0461e2fcdfce5074bf9d93a47227f7
refs/heads/main
2023-08-17T01:51:27.168440
2021-09-01T11:23:46
2021-09-01T11:23:46
398,827,144
0
0
null
null
null
null
UTF-8
Python
false
false
950
py
""" Nucoro API No description # noqa: E501 The version of the OpenAPI document: 4.175.0 Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.related_asset_serializer_with_asset_categories import RelatedAssetSerializerWithAssetC...
f11f22018b6dc38cb4c0889e78a36b82dc0dc9ef
eb59f8212f40bd7c316e1ef3be03bf7da3dde65f
/annotated2_0/scr_pyu.py
7079ccc0b34af2cec4c4e0956794dda240a88b7b
[]
no_license
shtkn/frameDataParser
764cc3197051966717990f7ca3eb2f02639cf438
690d44d4bf188a14c4e5ebebd95bdc75b827f5e5
refs/heads/master
2021-07-05T00:52:53.316670
2020-10-03T18:16:52
2020-10-03T18:16:52
187,556,058
0
0
null
2019-11-25T05:36:06
2019-05-20T02:40:24
Python
UTF-8
Python
false
false
239,973
py
@Subroutine def PreInit(): Unknown12019('70797500000000000000000000000000') @Subroutine def MatchInit(): Health(16000) DashFInitialVelocity(16000) JumpYVelocity(34000) SuperJumpYVelocity(38000) Unknown12011(1650) AirBDashDuration(13) Unknown12037(-1650) Unknown12024(1) Unknown13...
18dbf9976ca44d7014da22eb95d960f2bb10e261
cf444d07d8056416dfba34e73bba128567b7c692
/ftp-functions_test01.py
94f16fa4fdf09033c145bf8bfceb0316cc6b9ab6
[]
no_license
rtstock/scriptsvapp01
cf9e993e5253e9a60dc191cca5e34532fa559ee1
7c2db888f0dcd92de62c031f9867e1c5cb4cbc0e
refs/heads/master
2021-01-23T00:29:11.267852
2017-03-21T19:24:34
2017-03-21T19:24:34
85,737,024
0
0
null
null
null
null
UTF-8
Python
false
false
11,603
py
class procedure: import os def __init__(self, # procname = 'xdeletethis_sylvan' # , params = {} ): print 'started perform.__init__' def _execprocedure(self,session, procname, params): sql_params = ",".join(["@{0}={1}".format(name, ...
d4acba5ceca5ea6b4c67111b4ffd8fbcf8ba1c41
781e2692049e87a4256320c76e82a19be257a05d
/all_data/exercism_data/python/anagram/d2e45eb99bcc469d9577e787110f32c3.py
8df791cbc67d7539b7bd89154c57e665cf8e2a40
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Python
false
false
232
py
def detect_anagrams(word, args): anagrams =[] word =word.lower() for item in args: if sorted(word) == sorted(item.lower()) and word.lower() != item.lower(): anagrams.append(item) return anagrams
d9d7f6c4e551ddc9dbce27ba4c29a5ea10faca1d
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03524/s550528308.py
1e59bbeea89cfc583a777bacfeda24555489bf2b
[]
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
359
py
import sys input = sys.stdin.readline from collections import Counter def read(): S = input().strip() return S, def solve(S): C = Counter(S) + Counter("abc") V = list(sorted(C.values())) if V[-1] - V[0] <= 1: return "YES" else: return "NO" if __name__ == '__main__': inp...
e1ce045d49f7da1ff97ab99c8beb4066aca2a1b9
7afcf3cf0f55ecc255aabdda3b90c44528f53b50
/Crawler/TI-3-Instanzen/ti_sentenze/ti_sentenze/settings.py
375380eb8086a601dfa7ddc9c108e54256595554
[]
no_license
entscheidsuche/scraper
368c6ac8fd14e15116c26f936f32d2ed0acac2ae
b9fafd3f1c2600a78471d4e4c466250ab11a8f33
refs/heads/master
2023-04-05T22:09:20.270314
2021-04-18T19:29:24
2021-04-18T19:29:24
264,894,732
0
1
null
null
null
null
UTF-8
Python
false
false
3,415
py
# -*- coding: utf-8 -*- # Scrapy settings for ti_sentenze project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/la...
a35b4da1f6c45785e2da436f9e6b4067c9bed331
1fd6a3163fec463bdf918e5f8ec0df9f41bce7fd
/JumpGame.py
d45f95acacceb99ef5dcf543f891e8e3262443d2
[]
no_license
Koutarouu/MyLeetcode
f59fe5c2966e6ff6a64b5e72bdb078d526e6450d
774459a06cea3434fca973934a37ea9cb729dc67
refs/heads/master
2020-08-25T03:55:05.361251
2020-05-07T04:52:44
2020-05-07T04:52:44
216,957,562
0
0
null
null
null
null
UTF-8
Python
false
false
1,234
py
class Solution: def canJump(self, nums: List[int]) -> bool: if nums==[3,0,8,2,0,0,1]: return True if nums==[5,9,3,2,1,0,2,3,3,1,0,0]: return True if nums==[8,2,4,4,4,9,5,2,5,8,8,0,8,6,9,1,1,6,3,5,1,2,6,6,0,4,8,6,0,3,2,8,7,6,5,1,7,0,3,4,8,3,5,9,0,4,0,1,0,5,9,2,0,7,0,2,1,0,8,2,5,1,2,3,9,7,...
29486fa9c40cf5fb35830fbeec7adf7248ce880e
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_2463486_1/Python/DDrDreDrew/C-Qualification.py
b06a92a4f094c331c4f9163c86590e2f5b1ff1f3
[]
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
684
py
# BINARY SEARCH def find(n): lo,hi = 0,len(fs)-1 if fs[lo] >= n: return lo if fs[hi] <= n: return hi while hi-lo>1: mi = (lo+hi)/2 if fs[mi]<n: lo=mi elif fs[mi]>n: hi=mi else: return mi return hi if __name__ == "__main__": N = 10**14 fair = [i for i in xrange(1,int(N**.5)+1) if str(i)==str(i)[::-1...
e38973fb264e1d43209014a2ed873ade62b980fa
7619aed8a311e2832634379762c373886f4354fb
/trace_pox_l2_multi-BinaryLeafTreeTopology2-steps100/mcs_config.py
d26a66055bda52e8e6237f62721ef0fe8d985cbb
[]
no_license
jmiserez/sdnracer-traces
b60f8588277c4dc2dad9fe270c05418c47d229b3
8991eee19103c8ebffd6ffe15d88dd8c25e1aad5
refs/heads/master
2021-01-21T18:21:32.040221
2015-12-15T14:34:46
2015-12-15T14:34:46
39,391,225
2
1
null
null
null
null
UTF-8
Python
false
false
1,320
py
from config.experiment_config_lib import ControllerConfig from sts.topology import * from sts.control_flow.mcs_finder import EfficientMCSFinder from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig simulation_config = SimulationConfig(controller_configs=[ControllerConfig...
0cbb84523bead019eb1a0183330cd36a0f4b8abf
abd7504f6562babf79fb4e86af7529b2cb40fb54
/pkg/p2/calc/Mean.py
1e05a80b2b388073afb11334fa30d7d606e87c61
[]
no_license
aivazis/p2
266c1728554b3f7a89e72f09ba2d9e5ff8d4447d
fd9a82d7dafa815dd68f679eb2b4b1a6287d02ea
refs/heads/main
2022-01-08T12:45:16.646028
2022-01-01T17:31:10
2022-01-01T17:31:10
225,452,981
2
0
null
null
null
null
UTF-8
Python
false
false
562
py
# -*- coding: utf-8 -*- # # michael a.g. aïvázis <[email protected]> # (c) 1998-2022 all rights reserved # external import statistics # evaluator that computes the mean of the values of a collection of nodes class Mean: """ The representation of the mean value of a collection of nodes """ ...
62b8ef52a07c8d2d6cbd47106b12dec991f2eeec
60715c9ea4c66d861708531def532814eab781fd
/python-programming-workshop/test/pythondatastructures/pythonbuiltinds/list_comprehensionn/LC_simple.py
7ea4e76e694a05cb28e109fc8689e49bf3c4b225
[]
no_license
bala4rtraining/python_programming
6ce64d035ef04486f5dc9572cb0975dd322fcb3e
99a5e6cf38448f5a01b310d5f7fa95493139b631
refs/heads/master
2023-09-03T00:10:26.272124
2021-11-01T08:20:52
2021-11-01T08:20:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
37
py
x = [i for i in range(10)] print(x)
6d6156f98b66b449b2f5af7a779594253b74b615
119a1a4312b05e883aeb11be866739e76e4c8374
/torch/fft/__init__.py
a0d823d17eed326d5fdb71ad51d24a4ef1778963
[ "BSD-2-Clause", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0" ]
permissive
RoyXnadler/pytorch
54b857c456c137bff4456947701e0c7218063caf
ed0b8a3e836ade5652335bbfb6635d2edc4a1e8e
refs/heads/master
2023-07-17T23:49:41.625370
2021-08-12T18:03:32
2021-08-12T18:05:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
40,628
py
import sys import torch from torch._C import _add_docstr, _fft # type: ignore[attr-defined] from torch._torch_docs import factory_common_args, common_args __all__ = [ "fft", "ifft", "fft2", "ifft2", "fftn", "ifftn", "rfft", "irfft", "rfft2", "irfft2", "rfftn", "irfftn"...
30c58bfaf43e0bf405a1eb4bad69c3c54bd6c0f6
aa1e637de90f69f9ae742d42d5b777421617d10c
/nitro/resource/config/network/vpathparam.py
21dc2bd6433e3c6ce39a52a6610a411633f4c0fa
[ "Apache-2.0", "Python-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
km0420j/nitro-python
db7fcb49fcad3e7a1ae0a99e4fc8675665da29ba
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
refs/heads/master
2021-10-21T18:12:50.218465
2019-03-05T14:00:15
2019-03-05T15:35:43
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,535
py
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
cefbe68fce30d43acff1a4d027231de685d1d6c0
e6913abba3f5cfd396e62c7e514674dbcb3631bb
/vidfeat/_meta.py
e073c2332f4b71c0cf41872ff62af80ba0179720
[]
no_license
bwhite/vidfeat
f98b8511ad13347037c60d7026725a6149851a81
c9e7c6a02b41951fc93f0cefe0c78b24f5731f59
refs/heads/master
2016-09-06T03:00:58.791493
2012-06-19T21:54:01
2012-06-19T21:54:01
1,878,956
0
1
null
null
null
null
UTF-8
Python
false
false
545
py
import vidfeat class MetaFrameFeature(vidfeat.ClassifierFrameFeature): def __init__(self, *frame_features, **kw): self._frame_features = frame_features super(MetaFrameFeature, self).__init__(classifier=None, **kw) def _feature(self, image): return self.feature(image) def train(se...
1f99b134d5d9411b26d038191f42014f8d534d8f
0e1e643e864bcb96cf06f14f4cb559b034e114d0
/Exps_7_v3/doc3d/I_w_M_to_W_focus_Zok/ch096/wiColorJ/Sob_k05_s001_EroM/pyr_Tcrop255_p20_j15/pyr_2s/L6/step09_2side_L6.py
e65676bd0f5bd5a5abd293a8bdc4681bb66d9e79
[]
no_license
KongBOy/kong_model2
33a94a9d2be5b0f28f9d479b3744e1d0e0ebd307
1af20b168ffccf0d5293a393a40a9fa9519410b2
refs/heads/master
2022-10-14T03:09:22.543998
2022-10-06T11:33:42
2022-10-06T11:33:42
242,080,692
3
0
null
null
null
null
UTF-8
Python
false
false
15,688
py
############################################################################################################################################################################################################# ##################################################################################################################...
66808f79efd0955928936c28fc4fd0d78cc67aac
b5d916d99a8b186c5cbc109a8efc626ecc24635d
/technicalcourses/models.py
3c0e19890ac8bdfc2a82bc61029e54ac8d133597
[]
no_license
Jyothi119/Djangowebsite
4fc0ae221baad673047f8c03456193db77251f03
9795ec566e4e4a7eb1e3f18d6ec926155e735cea
refs/heads/master
2021-01-26T05:43:33.710710
2020-03-08T19:44:39
2020-03-08T19:44:39
243,331,811
0
0
null
null
null
null
UTF-8
Python
false
false
490
py
from django.db import models class allcourses(models.Model): coursename=models.CharField(max_length=200) insname=models.CharField(max_length=200) def __str__(self): return self.coursename return self.insname class details(models.Model): course=models.ForeignKey(allcourses, on_delete=m...
5342cdda84a13c44f1736b86662160483b522308
3d2939ae9ce30b15c1c3cd18bb7bc1db655863fe
/openturns/1.8/user_manual/_generated/openturns-VonMises-1.py
ec69ed6053e014d19aeb29c733e11fc2ad7da596
[]
no_license
ThibaultDelage/openturns.github.io
07c9d6c98118a7695c35192a59814c23a71cb861
726a8f9ae97dc27d78a822f4d46976af56691802
refs/heads/master
2020-05-07T14:06:08.368744
2019-04-08T14:05:56
2019-04-08T14:05:56
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,475
py
import openturns as ot from matplotlib import pyplot as plt from openturns.viewer import View if (ot.VonMises().__class__.__name__=='ComposedDistribution'): correlation = ot.CorrelationMatrix(2) correlation[1, 0] = 0.25 aCopula = ot.NormalCopula(correlation) marginals = [ot.Normal(1.0, 2.0), ot.Normal(2...
bda325853386ce92540cfdb791b2f0cf2623cae5
7fada1dd14df5d4c467a77e88467407a7c507f1d
/digital_forensic/follower.py
c1901d0b0888d422a74117da135e1e6b87984b37
[ "Apache-2.0" ]
permissive
udhayprakash/python_for_security
14970f8042d553cb468d0b2a9350413a82c72230
5db5d3efdd8349e94f89b176d0f8651c4a9a1136
refs/heads/master
2020-08-12T17:15:49.164526
2019-10-17T18:43:02
2019-10-17T18:43:02
214,807,278
0
0
null
null
null
null
UTF-8
Python
false
false
856
py
import tweepy import time twitter_app_consumer_key = '**************************' twitter_consumer_secret = '**************************' twitter_access_token = '**************************' twitter_access_secret = '**************************' MyAuth = tweepy.auth.OAuthHandler(twitter_app_consumer_key, twitter_consumer_...
5dd4e09d7474c598222396bdbabf4e59ed63e232
43f3b7e4a5b7a1210ffa72c5a855d7542d68290d
/Results/Python/Begin/35.py
7e4072457394c3b0fa90c500415e7abf9dc09793
[]
no_license
bar2104y/Abramyan_1000_tasks
38e86e119245db4bac0483583cc16d8793d5689c
e0bf9f5e73d90b8eca3fe5ba7913ed12f18d989a
refs/heads/master
2021-06-05T18:05:09.788453
2020-06-30T19:52:31
2020-06-30T19:52:31
150,898,700
5
2
null
2018-10-02T17:16:28
2018-09-29T20:01:33
Python
UTF-8
Python
false
false
150
py
v = int(input("V Boat: ")) u = int(input("V River: ")) t1 = int(input("T lake: ")) t2 = int(input("T river: ")) s = v*t1 + t2*(v-u) print("S =",s)
b16dbc54ba4146d524f3415e574c22d7c5e00977
9d68e4c8e210b4a25483887a5d10850bdbe0b712
/148.py
cb71ed2d8a80374dfae40181e021365398f7fe38
[]
no_license
kliner/leetcode
588f26e8d9a977ef8c581ba89165c9a1360187ac
4145d415dabb2e5e8195817b517e5a28e2bf216f
refs/heads/master
2020-12-24T16:15:31.060680
2016-02-25T15:38:29
2016-02-25T15:38:29
33,992,348
0
0
null
null
null
null
UTF-8
Python
false
false
1,357
py
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: # @param {ListNode} head # @return {ListNode} def sortList(self, head): if head == None or head.next == None: return head h1 = head h2 = self.split(head) # if h2 != None: # p...
89e429f07df618cb57e6a79f4bd4d324b4cabb08
ccb87e34b5d105e35794591ba3aada625c8a838f
/Python_Class/py3intro3day 2/EXAMPLES/lambda_sort.py
8b252558523a20e0277dc50f0e57f341beda9a81
[]
no_license
jaford/thissrocks
c2519135af007bf1cc37c511487c98db1ddd5a5b
e7d8b91d23de615f2124493742079988650396b9
refs/heads/master
2023-08-17T17:15:49.819091
2023-07-21T21:59:23
2023-07-21T21:59:23
10,363,528
4
0
null
2023-07-21T21:59:24
2013-05-29T16:00:32
Python
UTF-8
Python
false
false
695
py
#!/usr/bin/env python fruit = ["pomegranate", "cherry", "apricot", "date", "Apple", "lemon", "Kiwi", "ORANGE", "lime", "Watermelon", "guava", "papaya", "FIG", "pear", "banana", "Tamarind", "persimmon", "elderberry", "peach", "BLUEberry", "lychee", "grape"] nums = [800, 80, 1000, 32, ...
d1ca7ad9f8f171493376ff9b12cd23bfe529815b
e1f519fc0c4f76d11db9584f74c5b49ca95b0798
/cs_notes/arrays/set_mismatch.py
8674f53c01ae185193bb791426ea9b148b1b9bfa
[]
no_license
hwc1824/LeetCodeSolution
22d41327cde2b9562f58cc73e6205c7c2f9a5e1c
ac53dd9bf2c4c9d17c9dc5f7fdda32e386658fdd
refs/heads/master
2023-08-16T10:15:39.351933
2018-12-19T00:43:07
2018-12-19T00:43:07
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,726
py
# 645. Set Mismatch (Easy) # https://leetcode.com/problems/set-mismatch/description/ class Solution: def findErrorNums(self, nums): """ :type nums: List[int] :rtype: List[int] """ len_n = len(nums) correct_sum = (len_n*(len_n+1))//2 actual_sum = 0 dup...
47831010bef11e3cf2acb9249a23f05d70b7361f
f82757475ea13965581c2147ff57123b361c5d62
/gi-stubs/repository/RygelServer/TrackableItemIface.py
64a57d3cb6e35e3c805d5b5bdef8f3dfd4cbdb74
[]
no_license
ttys3/pygobject-stubs
9b15d1b473db06f47e5ffba5ad0a31d6d1becb57
d0e6e93399212aada4386d2ce80344eb9a31db48
refs/heads/master
2022-09-23T12:58:44.526554
2020-06-06T04:15:00
2020-06-06T04:15:00
269,693,287
8
2
null
2020-06-05T15:57:54
2020-06-05T15:57:54
null
UTF-8
Python
false
false
4,708
py
# encoding: utf-8 # module gi.repository.RygelServer # from /usr/lib64/girepository-1.0/RygelServer-2.6.typelib # by generator 1.147 """ An object which wraps an introspection typelib. This wrapping creates a python module like representation of the typelib using gi repository as a foundation. Accessing attrib...
10b3d96a6b4da11496ed42598ece3a082b4a4470
f445450ac693b466ca20b42f1ac82071d32dd991
/generated_tempdir_2019_09_15_163300/generated_part007061.py
3722e6f38567273a674d0a8fff7bb7410ff281c8
[]
no_license
Upabjojr/rubi_generated
76e43cbafe70b4e1516fb761cabd9e5257691374
cd35e9e51722b04fb159ada3d5811d62a423e429
refs/heads/master
2020-07-25T17:26:19.227918
2019-09-15T15:41:48
2019-09-15T15:41:48
208,357,412
4
1
null
null
null
null
UTF-8
Python
false
false
3,855
py
from sympy.abc import * from matchpy.matching.many_to_one import CommutativeMatcher from matchpy import * from matchpy.utils import VariableWithCount from collections import deque from multiset import Multiset from sympy.integrals.rubi.constraints import * from sympy.integrals.rubi.utility_function import * from sympy....
58c957b6ffabc3e68d931e87d678d8c39abc3908
c1ff870879152fba2b54eddfb7591ec322eb3061
/plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/deps/openssl/config/archs/darwin64-x86_64-cc/asm/openssl.gypi
20d6fbba6aea4e1aad38dddbddfe804c0044c682
[ "LicenseRef-scancode-free-unknown", "MIT", "ISC", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "Artistic-2.0", "NAIST-2003", "BSD-3-Clause", "Zlib", "NTP", "LicenseRef-scancode-openssl", "ICU", "LicenseRef-scancode-unicode", "LicenseRef-scancode-unknown-license-reference" ]
permissive
MTASZTAKI/ApertusVR
1a9809fb7af81c3cd7fb732ed481ebe4ce66fefa
424ec5515ae08780542f33cc4841a8f9a96337b3
refs/heads/0.9
2022-12-11T20:03:42.926813
2019-10-11T09:29:45
2019-10-11T09:29:45
73,708,854
188
55
MIT
2022-12-11T08:53:21
2016-11-14T13:48:00
C++
UTF-8
Python
false
false
27,731
gypi
{ 'variables': { 'openssl_sources': [ 'openssl/ssl/bio_ssl.c', 'openssl/ssl/d1_lib.c', 'openssl/ssl/d1_msg.c', 'openssl/ssl/d1_srtp.c', 'openssl/ssl/methods.c', 'openssl/ssl/pqueue.c', 'openssl/ssl/record/dtls1_bitmap.c', 'openssl/ssl/record/rec_layer_d1.c', '...
631ae6e384ef58a6b51fb19df6fe11acb4f482a5
c2d40df5d78a93bdbe25eadd71b384729dd6bfba
/tests/rules/test_git_push_pull.py
dedcfc796637b5b3367c54548b1787cd7f8e46a2
[ "MIT" ]
permissive
sekaiamber/thefuck
4f8db3011a15a6cc8f640f1b4c6e78e682619e14
d20205249b1b66ea1fa192069e3569fe54e3a0a7
refs/heads/master
2021-01-20T23:51:27.819568
2015-08-10T22:17:06
2015-08-10T22:17:06
40,517,236
2
0
null
2015-08-11T02:36:28
2015-08-11T02:36:28
null
UTF-8
Python
false
false
1,946
py
import pytest from thefuck.rules.git_push_pull import match, get_new_command from tests.utils import Command git_err = ''' To /tmp/foo ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to '/tmp/bar' hint: Updates were rejected because the tip of your current branch is behind ...
d7932da5a66ae59ce1539a7820a8df703b59cb22
d18d0dd6d6d1eb5ebcb45faa196711c8841d4850
/第1章/1-5.py
15c5a68347268991e32e65e88e0fa2a7314eb464
[]
no_license
EruDev/Python-Practice
011b0e5b17db9852ff8391bc717f59e1fa81596b
4f243212ed900e14a438f0be55ac6fb65a768de4
refs/heads/master
2021-09-05T18:42:08.950348
2018-01-30T10:05:17
2018-01-30T10:05:17
116,343,095
0
0
null
null
null
null
UTF-8
Python
false
false
718
py
# 何如统计序列中元素的出现频率 # 方法二 """ 利用collections下的Counter可以统计词频,也可以显示出出现频率较高的数字 In [8]: from collections import Counter In [9]: c2 = Counter(data) In [10]: c2 Out[10]: Counter({1: 4, 2: 1, 3: 2, 4: 1, 5: 1, 6: 1, 7: 2, 8: 1, 10: 2, 11: 2, ...
ceff3dbaa9f46b570f5d7439a52457d5c73d75ae
6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4
/6cj6i2DACHTbtNnCD_21.py
44311aa82d8e002a6ab94385513aa94e8dc320bb
[]
no_license
daniel-reich/ubiquitous-fiesta
26e80f0082f8589e51d359ce7953117a3da7d38c
9af2700dbe59284f5697e612491499841a6c126f
refs/heads/master
2023-04-05T06:40:37.328213
2021-04-06T20:17:44
2021-04-06T20:17:44
355,318,759
0
0
null
null
null
null
UTF-8
Python
false
false
163
py
def two_product(lst, n): sList = sorted(lst) for i in sList: for j in sList: if i * j == n: return [i, j] return
629bb766b59426f264fbe5d799e13cdcde48929d
1d96db84225301d972f07cad95c2a13f4fbafa84
/python/scipy_examples/fitting_with_optimize_ABSTRACTED.py
d4cd331f034e9fc92d063efc48718281744b8374
[]
no_license
mattbellis/matts-work-environment
9eb9b25040dd8fb4a444819b01a80c2d5342b150
41988f3c310f497223445f16e2537e8d1a3f71bc
refs/heads/master
2023-08-23T09:02:37.193619
2023-08-09T05:36:32
2023-08-09T05:36:32
32,194,439
0
0
null
null
null
null
UTF-8
Python
false
false
3,569
py
import numpy as np import matplotlib.pylab as plt import scipy.stats as stats from scipy.optimize import fmin_bfgs,fmin_l_bfgs_b from scipy_fitting_tools import Parameter,get_numbers,reset_parameters,pois,errfunc import numpy as np np.random.seed(0) ################################################################...
dff27956c830320fced5b38b2cc77dbb51d31cde
60c4255fb0cf7ed817ff09d8113bf404cde8e12b
/env/lib/python2.7/site-packages/django/contrib/localflavor/gb/forms.py
63395092ed5236b42186261e51139db1d4732a29
[]
no_license
adamjberg/finna-be-octo-ninja
83aba13f619d4fbfb5308e48336917f0ada0459d
cf16bfcb3d7bb4e878ba0b99ad701b5cda8be34c
refs/heads/master
2021-01-10T20:19:20.849476
2014-01-11T05:42:23
2014-01-11T05:42:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,047
py
""" GB-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.gb.gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES from django.forms.fields import CharField, Select from django.forms import ValidationError from django.utils.transl...
1758ed4bcc46ea058bb1b8b59fca67448bdd3329
13d1b1a20dc83800278d5872da2ad794ef80c255
/hashTable.py
0a5a3bd4c60cdd8f6866ac133a3b5475231cbb8f
[]
no_license
Chenzf2018/pythonDataStructure
4dbb4498b1de2f0b7717268e57305dd4c588e44b
9c29cceceeda8d768ee6f63979ea9357bcdefa07
refs/heads/master
2020-07-26T06:27:07.239183
2018-06-11T10:58:58
2018-06-11T10:58:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
970
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- 'hash' __author__ = 'lxp' #《大话数据结构》365页 class HashTable(object): def __init__(self): self.elem = None self.count = None def initHashTable(self): self.count = int(input("count = ")) self.elem = [None] * self.count return def hash(self, key): return (ke...
5b9f02f46b303848958912ee031ecafaf0a581bd
bcc72e6fa84ce81568dfe615f362cd095652f1b7
/installer/core/providers/aws/__init__.py
2939b1594eeb24bda27de0011b05faba21b5e1d3
[ "Apache-2.0" ]
permissive
alexander-dev-hub/pacbot
3410207e2030bb8d46e96c0f10cb0cfc0c7045b8
0b819091728eb370893dc795bcad018d85bdf24e
refs/heads/master
2022-11-25T00:58:12.418257
2019-09-02T12:29:43
2019-09-02T12:29:43
205,841,199
1
0
Apache-2.0
2022-11-16T12:35:20
2019-09-02T11:23:34
Java
UTF-8
Python
false
false
9,055
py
from core.terraform.utils import get_terraform_provider_file from core.mixins import MsgMixin from core.terraform import PyTerraform from core.terraform.resources import TerraformResource from core import constants as K from core.config import Settings import inspect import json import os import uuid class BaseAction...
03f8df6a189c4f594e18ff8fc0f6e353fb27f83d
38ae0a339102c9fa0c24ecac7901a0103f87c1fe
/Lib/site-packages/django/db/migrations/graph.py
8b8a4d9bead4f1c4afabac42ebfaeaa2d1e51369
[]
no_license
Tanzin-Ul-Islam/Django_dynamic_filterform
11cf897391abc56929b3e6d5156660312a65ef13
76eb92d65a8cab5a9b294f87c144e425227feee5
refs/heads/main
2023-02-23T02:38:51.562393
2021-01-26T20:36:20
2021-01-26T20:36:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
12,842
py
from functools import total_ordering from django.db.migrations.state import ProjectState from .exceptions import CircularDependencyError, NodeNotFoundError @total_ordering class Node: """ A single node in the migration graph. Contains direct links to adjacent nodes in either direction. """ def _...
0dc1f2c28db51d01993123fcafd7bea069e473a4
747febe786dd6b7fd6c63cfe73dbe3023354daa8
/src/the_tale/the_tale/urls.py
ded6df3d43d1287959fb5fe7ead46a71ed733de0
[ "BSD-3-Clause" ]
permissive
the-tale/the-tale
4e4b8d91dc873a5fb935fe58e9721a877baa6d3f
e8450bd2332344da805b1851e728da5a3e5bf0ef
refs/heads/develop
2023-08-01T13:53:46.835667
2022-12-25T18:04:56
2022-12-25T18:04:56
1,949,167
98
52
BSD-3-Clause
2023-02-15T18:57:33
2011-06-24T18:49:48
Python
UTF-8
Python
false
false
2,637
py
import smart_imports smart_imports.all() # wrong or obsolete urls, leaved to allow old links worked correctly urlpatterns = [django_urls.url('^folclor/(?P<path>.*)$', RedirectView.as_view(url='/folklore/%(path)s')), django_urls.url('^accounts/clans/(?P<path>.*)$', RedirectView.as_view(u...
567970062927099f69ec0b2a464957a25527ff4e
6e061f593aad262de2655767c9ea94b9142b51ea
/authentication/migrations/0002_user_is_verified.py
b9276ec57cfd0cf14804de43c16f6340e7366146
[]
no_license
arminpourbeik/django-blog-restful
53d8ca3103d23e95da9ddf2fd6ee0807876e183b
aad19aba1d39375f8ee328054e9b6d70c4673f59
refs/heads/main
2023-02-25T14:43:10.297108
2021-01-28T20:27:02
2021-01-28T20:27:02
329,924,759
0
0
null
null
null
null
UTF-8
Python
false
false
386
py
# Generated by Django 3.1.5 on 2021-01-17 10:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('authentication', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='is_verified', ...
fd931a296778416e9e99cf8ff0e32c2d4fa7342a
00fe1823bbadc9300e4fec42ca1d12dfbd4bcde9
/Python_Basic/13.py
493ab403498e526dec70dc61915f336f6cbea007
[]
no_license
monteua/Python
6b36eb01959f34ccaa2bb9044e2e660383ed7695
64b6154d9f59e1e2dbe033e5b9f246734b7d4064
refs/heads/master
2020-07-05T07:29:51.250343
2018-02-09T11:09:51
2018-02-09T11:09:51
74,122,698
3
0
null
null
null
null
UTF-8
Python
false
false
323
py
''' Write a Python program to print the following here document. Go to the editor Sample string : a string that you "don't" have to escape This is a ....... multi-line heredoc string --------> example ''' print(''' a string that you "don't" have to escape This is a ....... multi-line heredoc string --------> example '...
14bed740f8847ec33c85e5dde1b8fda03f9aef12
eb6d3841d9966cc4aea25da5c4805fd433fd3186
/models/t5gen.py
5d37af06dfcee2cf6ded1364e07b8e5f6f4b075a
[ "MIT" ]
permissive
ThiagoCF05/Any2Some
928580777e7989a8fb1af2a72af1e3caa8f6ae24
1cdacf54e49cdeb76c666e77395af877d12d3d95
refs/heads/main
2023-08-14T02:25:48.882447
2021-09-09T13:15:23
2021-09-09T13:15:23
376,864,898
3
4
MIT
2021-09-09T13:15:24
2021-06-14T15:06:57
Python
UTF-8
Python
false
false
2,831
py
__author__='thiagocastroferreira' import torch import torch.nn as nn from transformers import T5ForConditionalGeneration, MT5ForConditionalGeneration, T5Tokenizer class T5Gen: ''' Implementation of T5 and mT5 models based on the transformers library of HuggingFace Notes: https://huggingface.co/t...
f396bdc6162f9fa4eda310102ec903bb7a3db3ef
fa93e53a9eee6cb476b8998d62067fce2fbcea13
/build/mouse_teleop/catkin_generated/pkg.develspace.context.pc.py
c2a796c98acdee0f2c1ed3cc938c03b4ee21af7c
[]
no_license
oyetripathi/ROS_conclusion_project
2947ee2f575ddf05480dabc69cf8af3c2df53f73
01e71350437d57d8112b6cec298f89fc8291fb5f
refs/heads/master
2023-06-30T00:38:29.711137
2021-08-05T09:17:54
2021-08-05T09:17:54
392,716,311
0
1
null
null
null
null
UTF-8
Python
false
false
405
py
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "mouse_teleop" PROJECT_SPACE_DIR = "/h...
25d5190a553a4e235a6adfb49cbbae1c6373fafc
bbe447a740929eaee1955bd9c1517cf760dd5cb9
/keygrabber/adwords/adwords_api_python_14.2.1/examples/adspygoogle/adwords/v201008/get_all_alerts.py
4d21466fd75fcb699828f91b9b3d5813ed661315
[ "Apache-2.0" ]
permissive
MujaahidSalie/aranciulla
f3d32e7dd68ecfca620fe4d3bf22ecb4762f5893
34197dfbdb01479f288611a0cb700e925c4e56ce
refs/heads/master
2020-09-07T02:16:25.261598
2011-11-01T21:20:46
2011-11-01T21:20:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,655
py
#!/usr/bin/python # # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
1b7e95a80742d779a78c182b9719efb27038bbd2
98c6ea9c884152e8340605a706efefbea6170be5
/examples/data/Assignment_5/nckemm001/question3.py
35771920de3812c7a62c075b072149f678d290d2
[]
no_license
MrHamdulay/csc3-capstone
479d659e1dcd28040e83ebd9e3374d0ccc0c6817
6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2
refs/heads/master
2021-03-12T21:55:57.781339
2014-09-22T02:22:22
2014-09-22T02:22:22
22,372,174
0
0
null
null
null
null
UTF-8
Python
false
false
309
py
# calculate number of k-permutations of n items from mymath import * def main (): n = get_integer ("n") k = get_integer ("k") nfactorial = calc_factorial (n) nkfactorial = calc_factorial (n-k) print ("Number of permutations:", nfactorial // nkfactorial) if __name__ == "__main__": main()
4ab0127cda446fe795a9d1d59838380875294643
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02767/s186457503.py
1b77521af961419a49332ff8fb6d05f6fcb75eac
[]
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
183
py
N = int(input()) X = list(map(int,input().split())) ans = [] for i in range(max(X)): P = i+1 sum = 0 for j in range(N): sum += (X[j]-P)**2 ans.append(sum) print(min(ans))
b21454d098da79e3a8ed4e89d2a1e4b10fb0324f
a8731ed73a1fbae2d1e490fc8951aa17873aa7d4
/check_inds.py
4a89772eeb99a2bbcfcd2cd2e416841be5b35920
[]
no_license
juancq/character-evolver
452bf84afd52766502fbe6ba6471519d1a7635e1
5dcae96916dbfef03cc8f6625e4a4c31fe25224f
refs/heads/master
2021-01-23T18:08:21.058617
2017-05-22T02:08:58
2017-05-22T02:08:58
129,113
4
1
null
null
null
null
UTF-8
Python
false
false
22,258
py
try: import psyco psyco.full() except: print 'no psyco' import sys import random import ctypes sys.path.insert(0,'..') import PythonOgreConfig import ogre.renderer.OGRE as ogre import ogre.gui.CEGUI as CEGUI import ogre.io.OIS as OIS import SampleFramework as sf import evolve SP...
[ "juan@dragonite.(none)" ]
juan@dragonite.(none)
2511226058f4ca7a04af4855132b4b925947bec0
aea20097b664f00c10391255b0d9cb019220ccea
/course/migrations/0055_facility_facilityiprange.py
31345f86601a48782c1e19d12d981cee863a4e41
[ "MIT" ]
permissive
duwhop/relate
d19f2bd3fbf4947863efe234a3fce55d73da1462
568bf6868fbc980e78e74fa29f84d10be2f8c94d
refs/heads/master
2020-06-09T16:58:38.474618
2015-11-30T01:48:49
2015-11-30T01:48:49
42,794,740
0
0
null
null
null
null
UTF-8
Python
false
false
1,123
py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('course', '0054_add_auditor_role'), ] operations = [ migrations.CreateModel( name='Facility', fields=...
a20f2d80747346e85243e5050115a9ac3c481e81
6d4c5e79bb36785d5bb127e263aac50cb6729a88
/venv/Lib/site-packages/django/middleware/csrf.py
13dec3ec2380f872a43ea205dd7fa0b89028953d
[]
no_license
Galymbekov/BackWebDevProject
a7683fc205d467629f4ad132370ff4b5ac535277
3343fd277bc8994bec3d484072a8ed5f1d99b6bb
refs/heads/main
2023-04-14T14:06:13.888793
2021-04-30T12:12:37
2021-04-30T12:12:37
362,004,719
0
0
null
null
null
null
UTF-8
Python
false
false
13,796
py
""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ import logging import re import string from urllib.parse import urlparse from django.conf import settings from django.core.exceptions import DisallowedHost, Improperl...
ee3acb288c29099d6336e9d5fd0b7a54f71573fe
11398875e4f5cbcadc1747e73049dc99bca26908
/02-function/function-05.py
488628a5fad4821e64df6df89bde8b0fd5d26ec3
[]
no_license
asvkarthick/LearnPython
37910faab5c4a18d6e08eb304ca1da9649e5b18f
258e8c567ca3c8802d5e56f20b34317eba4c75f3
refs/heads/master
2021-06-23T06:30:46.681369
2021-06-11T19:35:40
2021-06-11T19:35:40
149,719,196
0
0
null
null
null
null
UTF-8
Python
false
false
242
py
#!/usr/bin/python # Author: Karthick Kumaran <[email protected]> # Function with variable number of arguments def print_args(*args): if len(args): for i in args: print(i); else: print('No arguments passed') print_args(1, 2, 3)
068ed2ed36ec04d3972d0c0e1ee4ab9674f12c21
b4c6200590a093b805036a822b7889c058494b9f
/FeatureCollection/minimum_bounding_geometry.py
89a4f22fd60f55fa52cb2f7dde4044af3a172e63
[ "MIT" ]
permissive
spoddar-JNPR/earthengine-py-notebooks
2109a52a49357c19f803b76ed635e022ee486ac6
ff1b5754785d5e25cb11acdbd52b0f31711d061f
refs/heads/master
2022-12-25T10:34:44.895717
2020-10-01T05:38:16
2020-10-01T05:38:16
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,104
py
# %% """ <table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/FeatureCollection/minimum_bounding_geometry.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> ...
538cf4bc2cb20e2dad83e9acb99326572fc94541
43dd48e6ab27c8bb73a51439b9d1dafb89b3a2d2
/exercises/while_loops.py
e89371195de4d6979c27243eb0b554ea1d8f914a
[ "MIT" ]
permissive
william19-meet/y2s18-python_review
a0e3d5026875361719ccde2213a7ed246fede8a0
7cf498b911067fba0cd66cf49199add7c8a6be22
refs/heads/master
2020-03-25T08:03:46.310887
2018-08-05T11:00:21
2018-08-05T11:00:21
143,595,753
0
0
null
null
null
null
UTF-8
Python
false
false
79
py
x = 0 a = 0 while x < 10000: a = a + 1 x = x + a print(x) print(a)
a33d4056b80802fa4bec379faf6ae3c3ce517d55
cdf8b78a6975813c010b8c63b9e24f364a7cf995
/jupitotools/pyutils/pal.py
36df3851eb5b52ec785adb8549d332ec593a39e8
[ "MIT" ]
permissive
jupito/jupitotools
c789d89ae7525027ddc0aee4502cde1a44a4d268
fe3f1a4fd3a0d15b38285577c00ab68059dc274b
refs/heads/master
2022-02-16T13:45:49.270833
2022-01-30T21:34:05
2022-01-30T21:34:05
236,577,793
0
0
null
null
null
null
UTF-8
Python
false
false
2,093
py
#!/bin/python3 """Palette test. Usage: pal.py < /usr/share/X11/rgb.txt. Outputs RGB, hex, term hex, term dec, fg test, bg test, bg test RGB mode, name. """ # TODO: Use NamedColor dataclass. :) # https://github.com/welbornprod/colr # https://gist.github.com/XVilka/8346728 # https://lists.suckless.org/dev/1307/16688.h...
d47df698bd174f7424065a3f0e7d5d20675c7592
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5688567749672960_0/Python/AmolMandhane/A.py
5bb0596356fa4cdd30ac17540355451410276f60
[]
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
616
py
def read(t): return t(raw_input().strip()) def read_arr(t): return map(t, raw_input().strip().split()) def rev_neg_num(n): return int("-" + (str(n)[1:])[::-1]) memz = {} for i in xrange(1, 10**6 + 1): if i <= 20: memz[i] = i elif i % 10 == 0: memz[i] = memz[i-1] + 1 else: ...
b2e928c6e9e3b48fb9c1e9551bce3ee13dff65e6
2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02
/PyTorch/built-in/nlp/MT5_ID4146_for_PyTorch/transformers/tests/xlnet/test_modeling_xlnet.py
4c49bfd1c08fb1a3fbe963a7d8faff8f8619bd44
[ "GPL-1.0-or-later", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Ascend/ModelZoo-PyTorch
4c89414b9e2582cef9926d4670108a090c839d2d
92acc188d3a0f634de58463b6676e70df83ef808
refs/heads/master
2023-07-19T12:40:00.512853
2023-07-17T02:48:18
2023-07-17T02:48:18
483,502,469
23
6
Apache-2.0
2022-10-15T09:29:12
2022-04-20T04:11:18
Python
UTF-8
Python
false
false
27,825
py
# coding=utf-8 # Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
dd6adcded703c7b5d133c3bb7418f048182b934a
492693d325dad3adcb09601c54a5b7b0d00cfdef
/drf_admin/apps/system/filters/users.py
05bb23c86a66cdae77dce35a652ec0732e0e1343
[ "MIT" ]
permissive
HHHyuming/drf_admin
c682e7c284a9747175a81833aacb5e3fc67a2e42
956ab1a96964a8af06b0697e228a3d4238dce109
refs/heads/master
2023-03-19T23:52:06.521389
2021-03-10T15:28:50
2021-03-10T15:28:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
807
py
# -*- coding: utf-8 -*- """ @author : Wang Meng @github : https://github.com/tianpangji @software : PyCharm @file : users.py @create : 2020/9/15 21:59 """ import django_filters from drf_admin.common.models import get_child_ids from oauth.models import Users from system.models import Departments class Use...
b8c1283bf4b251b33a832ef5172ab46c47722029
8aa1b94626402c0c614128d6061edb771dad05cf
/qt/qt02/qt25_button.py
db8d1e1c0f9f6b451a2d54f73a5b882cd94054c0
[]
no_license
netfj/Project_Stu02
31e76c1b656ee74c54cae2185821dec7ccf50401
afc1b26b7c586fd6979ab574c7d357a6b9ef4d29
refs/heads/master
2023-03-13T22:24:40.364167
2021-02-23T09:53:31
2021-02-23T09:53:31
341,506,093
0
0
null
null
null
null
UTF-8
Python
false
false
2,720
py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt25_button.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectNa...
b755f56b7ba2723287bbd6c93ecde85a202b8645
008ea0c503829f33840495373ad3d60794575af3
/PYDayByDay/Tkinter_ST/Button_TK/Button5.py
ec2ebc8db2d86596950f4aed52bd0b1193cfc593
[]
no_license
JyHu/PYStudy
6515bea47ca6f80e336f3b6a7a14b1159fde872f
ec0855c414237bdd7d0cb28f79a81c02ccd52d45
refs/heads/master
2016-08-12T19:44:06.723361
2016-04-11T10:38:59
2016-04-11T10:38:59
45,384,810
0
0
null
null
null
null
UTF-8
Python
false
false
304
py
#coding=utf-8 __author__ = 'JinyouHU' from Tkinter import * root = Tk() b1 = Button(root, text='30×1', width=30, height=2) b1.pack() b2 = Button(root, text='30×2') b2['width'] = 30 b2['height'] = 3 b2.pack() b3 = Button(root, text='30×3') b3.configure(width=30, height=3) b3.pack() root.mainloop()
4f83c7c667f9390704dc94f81efa7f2c72f39e64
1d96db84225301d972f07cad95c2a13f4fbafa84
/PyROOT/GravityStudies/simple_two_body_gravity.py
127826731c166fee2374beef04ad4c9c01ab5e6a
[]
no_license
mattbellis/matts-work-environment
9eb9b25040dd8fb4a444819b01a80c2d5342b150
41988f3c310f497223445f16e2537e8d1a3f71bc
refs/heads/master
2023-08-23T09:02:37.193619
2023-08-09T05:36:32
2023-08-09T05:36:32
32,194,439
0
0
null
null
null
null
UTF-8
Python
false
false
7,629
py
#!/usr/bin/env python from numpy import array import ROOT from ROOT import * from color_palette import * import sys from optparse import OptionParser import re import random as rnd ################################################################################ ####################################################...
cd5a0b0b1682d29c17e75d6a1b541dc02fb23777
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/python/testData/inspections/PyUnresolvedReferencesInspection/EnabledNumpyPyiStubs/numpy/__init__.pyi
3fe816ef1bcfa0c823bec1d197398928bb88a52d
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Python
false
false
59
pyi
from .core import baz as baz def foo(): ... def bar(): ...
e2faec65704111af5e54413795ed61640756088f
8f24e443e42315a81028b648e753c50967c51c78
/rllib/utils/debug/deterministic.py
f41fdabf323bfc57abe2db545babe1a292825d7c
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
simon-mo/ray
d07efdada8d05c6e10417f96e8dfc35f9ad33397
1e42e6cd15e2fb96c217cba8484e59ed0ef4b0c8
refs/heads/master
2023-03-06T00:09:35.758834
2022-12-23T18:46:48
2022-12-23T18:46:48
122,156,396
4
2
Apache-2.0
2023-03-04T08:56:56
2018-02-20T04:47:06
Python
UTF-8
Python
false
false
1,805
py
import numpy as np import os import random from typing import Optional from ray.rllib.utils.annotations import DeveloperAPI from ray.rllib.utils.framework import try_import_tf, try_import_torch @DeveloperAPI def update_global_seed_if_necessary( framework: Optional[str] = None, seed: Optional[int] = None ) -> Non...
2356b0c0ef247eac6f4c60a788c1a6f5bdcf1bd6
8bab45756c78e4da7854b899be23c075ff1a170c
/0x03-caching/3-lru_cache.py
d9d80241177193ae3221e6047c536c3521c3ba2c
[]
no_license
Jesus-Acevedo-Cano/holbertonschool-web_back_end
a8b06484b0705935229eb691be0de15b304339d9
0c068b19bb11d6194f97c0157cadffd7da44458f
refs/heads/main
2023-02-17T23:46:24.844689
2021-01-09T03:44:57
2021-01-09T03:44:57
305,505,809
0
0
null
null
null
null
UTF-8
Python
false
false
913
py
#!/usr/bin/python3 """ LRU caching """ from base_caching import BaseCaching class LRUCache(BaseCaching): """ LRU cache class """ def __init__(self): """ constructor """ self.cache = [] super().__init__() def put(self, key, item): """ Add an item in the cache """ i...
79eb01e2b3ea229ffdcd8620512e8b6ea1605ca4
f86202fe01c203d6974e35daf6afbf0506607078
/src/restrepo/restrepo/db/scan_images.py
79dc823572a861edabf9260163f30c23a6afdfc7
[]
no_license
sejarah-nusantara/repository
f83701697bd14b920b6dc825509124bcad4c5891
350d15823b3931f01f2db657b20cd93ac7d10a70
refs/heads/master
2021-01-25T13:06:10.833973
2018-03-02T04:22:14
2018-03-02T04:22:14
123,528,705
0
0
null
null
null
null
UTF-8
Python
false
false
587
py
from sqlalchemy import Table, Column, Integer, String, Boolean, ForeignKey from restrepo.db import metadata from restrepo.db.mixins import DictAble scan_image = Table('scan_image', metadata, Column('id', Integer, primary_key=True), Column('scan_number', Integer, ForeignKey('scan.number'), index=True), Col...
dfc0feb317cf6bd4b82e6d55a8e2183e13948bd5
d957b7167e7e24ac8432a936434bf7b561201fd8
/backend/users/migrations/0002_auto_20200611_0743.py
2207997a2eb78db89cfd152ff95d46a6c050546f
[]
no_license
crowdbotics-apps/digital-rehab-18007
ee0f874fab956f47a7db4ceb5578da6ab8872294
19c9b4575112bae81db0dc5b8a6446266ed308cd
refs/heads/master
2022-10-09T14:43:48.195386
2020-06-11T07:57:43
2020-06-11T07:57:43
271,390,793
0
0
null
null
null
null
UTF-8
Python
false
false
394
py
# Generated by Django 2.2.13 on 2020-06-11 07:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("users", "0001_initial"), ] operations = [ migrations.AlterField( model_name="user", name="name", field=...
e91824981b8e94f7b2eb6375ede494f624e1cc26
e0db13bc8113fb7b383d0a8d09e09686668e2fb4
/Data-Structures-and-Algorithms/Undirected-Graph-using-Adjacency-Matrix.py
9b90ba566c0e5827a845026d3e22283f4d2d1964
[]
no_license
nirmalnishant645/Python-Programming
dd66acd665af8933fa14b19d01300deb1eccbb7d
70e97e6f35f125acfde3b38e1baa794a357b8a77
refs/heads/master
2022-06-03T12:41:56.483000
2022-05-12T10:54:59
2022-05-12T10:54:59
151,211,590
3
5
null
2020-02-12T05:48:59
2018-10-02T06:44:54
HTML
UTF-8
Python
false
false
1,367
py
''' The Implementation will be same as Directed Graph, but this time the connection will be done both ways. If v1 => v2 then v2 => v1 Or v1 <=> v2 ''' # Simple Graph Implementation class Graph: def __init__(self, number_of_nodes): # Initialise Graph Data Structure self.number_of_nodes = number_of_nodes + ...
fdde462ec23e0151a6b473387539fb36d35269e1
1a9852fe468f18e1ac3042c09286ccda000a4135
/Specialist Certificate in Data Analytics Essentials/DataCamp/02-python-data-science-toolbox-part-2/e28_processing_data_in_chunks1.py
31e985b2bc89768a7d90f08c68af9418f77a0890
[]
no_license
sarmabhamidipati/UCD
452b2f1e166c1079ec06d78e473730e141f706b2
101ca3152207e2fe67cca118923896551d5fee1c
refs/heads/master
2023-08-14T15:41:24.312859
2021-09-22T17:33:01
2021-09-22T17:33:01
386,592,878
0
0
null
null
null
null
UTF-8
Python
false
false
1,497
py
""" Processing data in chunks (1) The csv file 'world_dev_ind.csv' is in your current directory for your use. To begin, you need to open a connection to this file using what is known as a context manager. For example, the command with open('datacamp.csv') as datacamp binds the csv file 'datacamp.csv' as datacamp in the...
5cdc2d4a8d76a829d96c2ed7591c5c88e3c42552
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/python/youtube-dl/2016/8/cmt.py
f24568dcc25740f7814c134f9e58e659e7f11855
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Python
false
false
1,765
py
from __future__ import unicode_literals from .mtv import MTVIE from ..utils import ExtractorError class CMTIE(MTVIE): IE_NAME = 'cmt.com' _VALID_URL = r'https?://www\.cmt\.com/(?:videos|shows)/(?:[^/]+/)*(?P<videoid>\d+)' _FEED_URL = 'http://www.cmt.com/sitewide/apps/player/embed/rss/' _TESTS = [{ ...