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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
843a9896e1ada59e40bd827a2af39e3d13effdba | 9c7581c3b862174878a5e71609f94b3e5a2de5c9 | /CursoEmVideo/Aula22/ex109/titulo.py | 3136d4230f599c8c02894ae254a298636a7cf2f6 | [
"MIT"
] | permissive | lucashsouza/Desafios-Python | 6d9fdc3500e0d01ce9a75201fc4fe88469928170 | abb5b11ebdfd4c232b4f0427ef41fd96013f2802 | refs/heads/master | 2020-06-21T16:49:32.884025 | 2019-07-23T01:23:07 | 2019-07-23T01:23:07 | 143,765,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | def titulo(mensagem):
print()
print('~' * (len(mensagem)+1))
print(mensagem)
print('~' * (len(mensagem)+1))
print()
| [
"noreply@github.com"
] | lucashsouza.noreply@github.com |
7f0113de4aed2785b90b4ba6789bc0a244c1ed09 | 2daa3894e6d6929fd04145100d8a3be5eedbe21c | /tests/artificial/transf_sqrt/trend_constant/cycle_5/ar_12/test_artificial_1024_sqrt_constant_5_12_0.py | 9a4bfcc628edeec08dcd54acf3df24173d35377f | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Henri-Lo/pyaf | a1f73a0cc807873bd7b79648fe51de9cfd6c126a | 08c968425d85dcace974d90db7f07c845a0fe914 | refs/heads/master | 2021-07-01T12:27:31.600232 | 2017-09-21T11:19:04 | 2017-09-21T11:19:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
dataset = tsds.generate_random_TS(N = 1024 , FREQ = 'D', seed = 0, trendtype = "constant", cycle_length = 5, transform = "sqrt", sigma = 0.0, exog_count = 0, ar_order = 12);
art.process_dataset(dataset); | [
"antoine.carme@laposte.net"
] | antoine.carme@laposte.net |
8d529d30512884f3d3f678345f7f2c07b0ef5615 | 650076fb94a086e15bdaa5bd2f51ce72df42dce4 | /test/functional/rpc_signrawtransaction.py | 3395fe5a26b85a2f2336d0ede4d5f0e73aa5c243 | [
"MIT"
] | permissive | c0de0x/ErosCore | 548075fe85c46e2bb3946f94361689dbad692da8 | a71767f7ee7105dc83973aac8ac60903b69459c9 | refs/heads/master | 2022-11-25T14:35:59.091923 | 2020-07-30T14:38:39 | 2020-07-30T14:38:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,422 | py | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test transaction signing using the signrawtransaction RPC."""
from test_framework.test_framework impor... | [
"60665036+ErosCore@users.noreply.github.com"
] | 60665036+ErosCore@users.noreply.github.com |
14bcbf43eb9678724906eec240db3f26cfa53cd3 | 2a68b03c923119cc747c4ffcc244477be35134bb | /Algorithm/DFS/dice.py | b52118987a96576b1be898e542042e09aed51736 | [] | no_license | QitaoXu/Lintcode | 0bce9ae15fdd4af1cac376c0bea4465ae5ea6747 | fe411a0590ada6a1a6ae1166c86c585416ac8cda | refs/heads/master | 2020-04-24T20:53:27.258876 | 2019-09-24T23:54:59 | 2019-09-24T23:54:59 | 172,259,064 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | class Solution:
def findTarget(self, dices, sides, target):
print("\nnum of dices = %d, num of sides = %d, target = %d" %(dices, sides, target))
results = []
combination = []
found = set()
self.dfs(dices, 0, sides, combination, target, results, found)
... | [
"jeremyxuqitao@outlook.com"
] | jeremyxuqitao@outlook.com |
b41ea6ae823b3495b06bde530884580ce3d476c5 | f4e69d05d4bea5198f5bd15c968562fac654c88e | /test/test_certificates_api.py | 593599eedf46635c5eac7c1269f77d51ecbbe987 | [] | no_license | krezreb/openapi-client-otoroshi | 2877ae9230b1ca29024880994420101a232cb906 | 0dafc780777857b9a0d0d8264e215bd6e0557224 | refs/heads/master | 2023-05-06T07:23:45.988523 | 2021-05-27T13:00:18 | 2021-05-27T13:00:18 | 371,374,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,969 | py | """
Otoroshi Admin API
Admin API of the Otoroshi reverse proxy # noqa: E501
The version of the OpenAPI document: 1.5.0-alpha.14
Contact: oss@maif.fr
Generated by: https://openapi-generator.tech
"""
import unittest
import openapi_client
from openapi_client.api.certificates_api import Certificat... | [
"josephbeeson@gmail.com"
] | josephbeeson@gmail.com |
f2898fb3b0248f525810044f3f4e5a5ce1ec680b | 79acd6922037d309857d95fb4a633788525a0535 | /infrastructure/ansible/roles/dataset_loader/files/selection.set.py | aacaf48079e3a85eeea16a62f5685d58c4c8b3ab | [
"Apache-2.0",
"MPL-2.0",
"BSD-3-Clause",
"CC0-1.0",
"Artistic-2.0",
"CC-BY-SA-4.0",
"MIT",
"ISC",
"BSD-2-Clause",
"OFL-1.1",
"JSON",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"WTFPL",
"LGPL-2.0-or-later",
"X11"
] | permissive | apache/trafficcontrol | 86da3a526e5e0d533547969274cd30d74636d922 | e835435e47175f84a04234d15183ab7b61cc2825 | refs/heads/master | 2023-08-31T08:02:25.363164 | 2023-08-30T23:00:43 | 2023-08-30T23:00:43 | 67,198,520 | 811 | 438 | Apache-2.0 | 2023-09-14T18:12:55 | 2016-09-02T07:00:06 | Go | UTF-8 | Python | false | false | 1,333 | py | #!/usr/bin/python
#
# 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 writing, software
#... | [
"noreply@github.com"
] | apache.noreply@github.com |
2414522bbf49b310f6773608c43006d53b555cb4 | 47eaf898a430209658df7973ea6b9b266014aa86 | /cont-attn/train.py | 36e92112ec1187dc91c2b61f7e629f47c2c0f336 | [] | no_license | dhruvramani/language-robotics | 89d4ffc376757207f85c73e5d6a06bd8301507e0 | 54e1db11cb5bbcfa3a3ea60ad42d5a572f1b5fb7 | refs/heads/master | 2023-05-11T21:33:04.894238 | 2020-11-17T04:59:44 | 2020-11-17T04:59:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,749 | py | import os
import sys
import torch
import numpy as np
import torch.nn.functional as F
#from tqdm import tqdm # TODO : Remove TQDM
from tensorboardX import SummaryWriter
from torch.utils.data import DataLoader
from torch.autograd import Variable
from models import *
from models import get_similar_traj
# NOTE : If in fu... | [
"dhruvramani98@gmail.com"
] | dhruvramani98@gmail.com |
dfae5c44fb06d9b66de15c95505e1082411d9afd | 8a84375dac5e6b33215d20e12e0c197aeaa6e83d | /pymoji/__init__.py | c0ca5b641eab739a4af72ee91afc1f188a417cb5 | [
"Apache-2.0"
] | permissive | michaeljoseph/pymoji | 5579af089cabf1784c656e7fddf9d20f9e6f5d6a | 4bf26babc7b968d9a753907d4db5402cfd5c6d63 | refs/heads/master | 2021-01-01T18:12:37.805141 | 2013-12-09T10:42:24 | 2013-12-09T10:42:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | """Emits HTML from emoji"""
__author__ = 'Michael Joseph'
__email__ = 'michaeljoseph@gmail.com'
__url__ = 'https://github.com/michaeljoseph/pymoji'
__version__ = '0.0.1'
from .emoji import emoji
def pymoji(text):
single_word = len(text.split(' ')) < 2
first_and_last_dont_match = text[0] != text[-1:]
fir... | [
"michaeljoseph+github@gmail.com"
] | michaeljoseph+github@gmail.com |
bb1867412159c6486be01f2224049f1100599ae6 | 2fdea85db7be2d39e52191b5aa444150d5a8e995 | /apps/hbase/src/hbase/hbase_site.py | d4abf7edb18cea66212055a2ad05a2290bf0f813 | [
"Apache-2.0"
] | permissive | bazaarvoice/hue | a464cd28bb181a9977095b05cff31a6c50859bde | 9aa150b0b48e90f236335d49904fef5e49b0d41d | refs/heads/master | 2023-03-18T15:11:29.540137 | 2020-06-16T17:13:37 | 2020-06-17T03:22:15 | 108,895,807 | 3 | 0 | Apache-2.0 | 2020-06-17T03:23:02 | 2017-10-30T19:03:18 | Python | UTF-8 | Python | false | false | 2,525 | py | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | [
"romain@cloudera.com"
] | romain@cloudera.com |
5033de95c14e1bda42f174d71402c54e3ecbfec5 | b3b68efa404a7034f0d5a1c10b281ef721f8321a | /Scripts/simulation/restaurants/restaurant_utils.py | 227f85a7e1f4623d9c874840e4e304d6fdefbce7 | [
"Apache-2.0"
] | permissive | velocist/TS4CheatsInfo | 62195f3333076c148b2a59f926c9fb5202f1c6fb | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | refs/heads/main | 2023-03-08T01:57:39.879485 | 2021-02-13T21:27:38 | 2021-02-13T21:27:38 | 337,543,310 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,195 | py | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\restaurants\restaurant_utils.py
# Compiled at: 2018-10-01 20:40:25
# Size of source mod 2**32: 5998 ... | [
"cristina.caballero2406@gmail.com"
] | cristina.caballero2406@gmail.com |
6b30db7207514a2684ce861ee9668aafabb830eb | 77941c4e6d28e45039f880cfd55e0a7c9b25e1be | /jax_dft/jax_dft/losses_test.py | a425dcc3b79d334a6609c0f0d9e729c3be18aafa | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | ritesh861/google-research | e29c7ba836a91454eec9a1d39e1af62dc6e4860e | 5d901d6895cc254a911a3cdc97487f04487f44ed | refs/heads/master | 2022-12-31T17:54:24.150450 | 2020-10-23T02:12:53 | 2020-10-23T02:18:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,743 | py | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
a6cf2f9283eb95bbbcd982e940d290cc39549bec | 475e2fe71fecddfdc9e4610603b2d94005038e94 | /Amazon/RepeatedSubstringPattern.py | 493dc5e2605eec318b294b395ed8cf35491aa97f | [] | no_license | sidhumeher/PyPractice | 770473c699aab9e25ad1f8b7b7cd8ad05991d254 | 2938c14c2e285af8f02e2cfc7b400ee4f8d4bfe0 | refs/heads/master | 2021-06-28T20:44:50.328453 | 2020-12-15T00:51:39 | 2020-12-15T00:51:39 | 204,987,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 765 | py | '''
Created on Dec 10, 2020
@author: sidteegela
'''
def repeatedSubstringPattern(s) -> bool:
tracker = {}
for item in s:
if item not in tracker:
tracker[item] = 1
else:
tracker[item] += 1
index = 0
... | [
"sidhumeher@yahoo.co.in"
] | sidhumeher@yahoo.co.in |
8b534fd770aad5f4bd416754cc830b08843ce337 | 1f76f04e44f9e65a96e02ef1314cdd60f4b5e934 | /blog/migrations/0001_initial.py | b8513a6184d7a181cedd022179d80c5d2e6d592a | [] | no_license | eclipsical/blog | a37f0d0248a41c6cf0612c28685e24658aa41ccf | 7d45242d58ac84393d29e862b5b5d7482003ae92 | refs/heads/master | 2020-03-30T19:05:45.994484 | 2018-10-05T02:21:07 | 2018-10-05T02:21:07 | 151,527,864 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | py | # Generated by Django 2.1.2 on 2018-10-04 05:04
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | [
"me@me.com"
] | me@me.com |
3d2364b9ada6318447f8017a3da3808db99cbf44 | 93fce31a2308e23bf36926a0d2967369bd20fefa | /1.10_select_column.py | 3cb9ce96553dfc49597b9c8fe2f91d4a2072040b | [] | no_license | mucollabo/pandasForML | 6e2cc98bc33c346a0f20ba9ec326af503d4d0076 | 24303f0da1271c98717be52a21ba32e435d3851e | refs/heads/master | 2023-08-20T08:27:53.078243 | 2021-10-27T12:22:15 | 2021-10-27T12:22:15 | 291,989,754 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 891 | py | import pandas as pd
# DataFrame() 함수로 데이터프레임 변환, 변수 df에 저장
exam_data = {'이름':['서준', '우현', '인아'],
'수학':[90, 80, 70],
'영어':[98, 89, 95],
'음악':[85, 95, 100],
'체육':[100, 90, 90]}
df = pd.DataFrame(exam_data)
print(df)
print(type(df))
print('\n')
# '수학' 점수 데이터만 선택, 변수 ma... | [
"mucollabo@gmail.com"
] | mucollabo@gmail.com |
28e42ccfbb3a1ccbfdf2ba32bab2ab46def4b7a0 | c109de66500f74d2527c83feb0343179c1af3568 | /mar19/pm3.py | 47f1073a4281f31c9f7d8fde22e1f71186636857 | [] | no_license | DUanalytics/python20 | aadf3ce6bb149ce8fde146972222875911fa8bda | 4b4e2e29851c550533033a039ae8175da65728cd | refs/heads/master | 2021-04-08T09:56:09.798921 | 2020-04-21T12:04:59 | 2020-04-21T12:04:59 | 248,764,764 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | #Topic:
#-----------------------------
#libraries
from pm4py.algo.discovery.alpha import factory as alpha_miner
from pm4py.objects.log.importer.xes import factory as importer
from pm4py.visualization.petrinet import factory as visualizer
from pm4py.objects.log.importer.csv import factory as csv_importer
event_stream =... | [
"dup1966@gmail.com"
] | dup1966@gmail.com |
3cc507441b6d0ecb6bc00051f647692ccfb593ae | 3b9bf497cd29cea9c24462e0411fa8adbfa6ba60 | /leetcode/Problems/915--Partition-Array-into-Disjoint-Intervals-Medium.py | ad0e3e8fc948c8a58b3d68af1c55d3bf29f8cc00 | [] | no_license | niteesh2268/coding-prepation | 918823cb7f4965bec096ec476c639a06a9dd9692 | 19be0766f6b9c298fb32754f66416f79567843c1 | refs/heads/master | 2023-01-02T05:30:59.662890 | 2020-10-17T13:12:34 | 2020-10-17T13:12:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | class Solution:
def partitionDisjoint(self, A: List[int]) -> int:
maxVals = [A[0]]
minVals = [0 for _ in range(len(A))]
for i in range(1, len(A)):
val = max(maxVals[-1], A[i])
maxVals.append(val)
minVals[-1] = A[-1]
for i in range(len(A)-2, -1... | [
"akulajayaprakash@gmail.com"
] | akulajayaprakash@gmail.com |
25706eb5c23ab48d24561809b3144d55ad0064c2 | 4094eff8c1777e5bc1c412f18cb1e905ab1de302 | /tests/layout_tests/__init__.py | 31a9cfa80e04414bca678a8b62f75042178aba99 | [
"BSD-3-Clause"
] | permissive | Lunderberg/python-prompt-toolkit | fcbfed4cb0e94c1032916b2766bb635079db54d6 | 7456156e4bdbd3c5ec9e95c78546e6323b77e74f | refs/heads/master | 2020-12-28T22:22:32.082247 | 2015-10-08T14:32:38 | 2015-10-08T14:32:38 | 43,893,510 | 1 | 0 | null | 2015-10-08T14:20:04 | 2015-10-08T14:20:02 | Python | UTF-8 | Python | false | false | 2,074 | py | from __future__ import unicode_literals
#from prompt_toolkit.layout.utils import fit_tokens_in_size
from pygments.token import Token
import unittest
#class FitTokensInSizeTest(unittest.TestCase):
# def setUp(self):
# self.tokens = [(Token, 'Hello world'), (Token, '\n'), (Token, 'line2')]
#
# def test_1... | [
"jonathan@slenders.be"
] | jonathan@slenders.be |
76bf8415808dbc0b27091908445074c49baab840 | c6f97d8a8c9f50d494f6e4dbcdd824cd63133a95 | /main/forms.py | 2d2769f579e28302a75be19c653b1de44d40e8fd | [] | no_license | Pavlenkovv/taxi | baa1d9add4fc167191f3fa68e218d0992263c2f0 | 9e645fc0a2fa75f4aa1f604b355919f23047baae | refs/heads/main | 2023-04-10T20:43:41.373294 | 2021-04-21T19:52:49 | 2021-04-21T19:52:49 | 359,902,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | from django import forms
import re
class OrderForm(forms.Form):
customer_name = forms.CharField(max_length=70, required=True, label="Ім'я")
customer_phone = forms.CharField(max_length=30, required=True, label='Телефон')
address_from = forms.CharField(max_length=200, required=True, label='Звідки їхати')
... | [
"pavlenko.vyacheslav@gmail.com"
] | pavlenko.vyacheslav@gmail.com |
39494e67be7df7d189cb475268b7807d2c2b24e0 | b2f84608cc28c492430e972028fa0e178865c78c | /source_py2/test_combi/__init__.py | 93535bef676360daad2ef5825782c0dab25df153 | [
"Python-2.0",
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | cool-RR/combi | 54efa752403a4acb6933475102702e43de93c81d | 9c5c143a792ffd8fb38b6470f926268c8bacbc31 | refs/heads/master | 2021-09-23T10:02:52.984204 | 2021-09-18T08:45:57 | 2021-09-18T08:45:57 | 25,787,956 | 24 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,095 | py | # Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
import sys
try:
import pathlib
except:
from combi._python_toolbox.third_party import pathlib
def __bootstrap():
'''
Add needed packages in repo to path if we can't find them.
This adds `combi`'s root folder to... | [
"ram@rachum.com"
] | ram@rachum.com |
fc2e24a083446166a3a346474bce6f3981dec982 | 4a72b43463a9dbc661583d5d0ee264430909dc08 | /dinesh/urls.py | f71d675a3394f2777cd4886963a853f350ae62be | [] | no_license | parvatiandsons2/dinesh | 50da144428572668409a74eac99eac63518d9876 | efab648bdd6af896e6e45a28946754486f6c59e5 | refs/heads/master | 2023-03-30T20:16:42.423599 | 2021-04-08T05:01:46 | 2021-04-08T05:01:46 | 350,943,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py |
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('website.urls'))
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
| [
"parvatiandsons2@gmail.com"
] | parvatiandsons2@gmail.com |
c51d78ade22a78303932a2159fdb50ace55e9012 | 06bb8e09d8b078707aba33d727876c9f3f24b882 | /class/object_init.py | 167747ecc7c19645d1948140af11607f859d741e | [] | no_license | 82seongkyum/python_lecture | 8a698fdee42d9e110d61a5623afc8ca6dca52411 | f24f684eb440400243b57ea432495493e53f6879 | refs/heads/main | 2023-08-25T20:15:20.653686 | 2021-11-12T09:04:50 | 2021-11-12T09:04:50 | 426,548,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | class Car:
name = ""
speed = 0
def __init__(self, name, speed):
self.name = name
self.speed = speed
def getName(self):
print()
return self.name
def getSpeed(self):
print()
return self.speed | [
"you@example.com"
] | you@example.com |
363dbc525fdce119551e489406287b849a979d1f | cdc0e3f0725519f526e61fe00e42393c59c0b05c | /src/nsf/transforms/base_test.py | 496ccc5760a2da07ba8b90ee34f1532fea69030c | [] | no_license | conormdurkan/lfi | e525dddd2d4c43065e9586f4a61d55c77591399e | c3919c251084763e305f99df3923497a130371a2 | refs/heads/master | 2021-01-01T21:47:52.650312 | 2020-02-11T12:13:29 | 2020-02-11T12:13:29 | 239,355,208 | 41 | 14 | null | 2020-02-11T13:04:24 | 2020-02-09T18:44:18 | Python | UTF-8 | Python | false | false | 5,176 | py | """Tests for the basic transform definitions."""
import unittest
import numpy as np
import torch
from nsf.transforms import base
from nsf.transforms import standard
from nsf.transforms.transform_test import TransformTest
class CompositeTransformTest(TransformTest):
def test_forward(self):
batch_size = 1... | [
"conormdurkan@gmail.com"
] | conormdurkan@gmail.com |
0d86ce0ae62e08aae4be88b40a18e089e43ca219 | a262edcef5d1def670103b849eef9cf203510a40 | /tp_analysis/preprocessing/matrix_operation.py | 1c25ff7fcc74e75b2d0c362819425f7c774816e6 | [] | no_license | clarkwkw/GEStatProj | 19439fc50e673cf77444b1513bb5ac9c71fd0022 | 45f9ca393ae179827906c21c1cd758621cfbf4ce | refs/heads/master | 2020-04-03T22:38:38.823677 | 2018-05-22T07:50:53 | 2018-05-22T07:50:53 | 59,290,283 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,574 | py | import json
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.decomposition import PCA, TruncatedSVD, IncrementalPCA, SparsePCA
import textbook
import nltk.stem
stemmer = nltk.stem.SnowballStemmer('english')
class StemmedTfidfVectorizer(TfidfVectorizer):
def ... | [
"clarkwkw@yahoo.com.hk"
] | clarkwkw@yahoo.com.hk |
5d0899b6f77856ea65209c4696f20e4176cf521f | 855ff14a494aa47e2ab4c09a58468d99c1eb92f5 | /tests/test_download.py | a663ff12d797820386a8173687d6de5fd601d990 | [
"MIT"
] | permissive | nnnyt/EduData | 9ece284f5143d84ec9eb483fcac3747e2a1fcfba | 1827f12167a68f15776cd303ce550814633f1256 | refs/heads/master | 2020-07-06T00:56:32.627104 | 2019-08-17T05:14:12 | 2019-08-17T05:14:12 | 202,838,340 | 0 | 0 | MIT | 2019-08-17T05:11:15 | 2019-08-17T05:11:15 | null | UTF-8 | Python | false | false | 516 | py | # coding: utf-8
# create by tongshiwei on 2019/7/2
import time
import pytest
from EduData import get_data
from EduData.download_data import url_dict
def test_download(tmp_path):
for url in url_dict:
get_data(url, tmp_path, override=True)
time.sleep(1)
for url in url_dict:
with pyte... | [
"tongsw@mail.ustc.edu.cn"
] | tongsw@mail.ustc.edu.cn |
20f76be639652910aa375130dcb4ae19041a2617 | 23b0203547fdcba7065afba855abb0a3d6d79bc4 | /util/perp.py | 80e33b350269aa15a7fc1a9bb6554e39530a279c | [] | no_license | jielaizhang/archangel | 4336c13fbb67452e5eef868cd7debcb2e5e86a7c | a28cfb509f9ae5e0b0cbd8b25285772da2658c44 | refs/heads/master | 2021-01-17T18:10:53.541526 | 2016-10-28T23:03:22 | 2016-10-28T23:03:22 | 71,165,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | #!/usr/bin/env python
def perp(m,b,x,y):
# find perpenticular distance from line to x,y
if m != 0.:
c=y+x/m
r=(c-b)/(m+1./m)
else:
r=x
s=m*r+b
d=((r-x)**2+(s-y)**2)**0.5
if r <= x:
return d
else:
return -d
| [
"zhang.jielai@gmail.com"
] | zhang.jielai@gmail.com |
2133a820156c371ee986d90af631a6a95f55dabd | 4cdc9ba739f90f6ac4bcd6f916ba194ada77d68c | /剑指offer/第五遍/17.打印从1到最大的n位数.py | bfaf04ffc577d04086babfe256bb04a2bb399b4e | [] | no_license | leilalu/algorithm | bee68690daf836cc5807c3112c2c9e6f63bc0a76 | 746d77e9bfbcb3877fefae9a915004b3bfbcc612 | refs/heads/master | 2020-09-30T15:56:28.224945 | 2020-05-30T03:28:39 | 2020-05-30T03:28:39 | 227,313,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,595 | py | """
输入数字 n,按顺序打印出从 1 到最大的 n 位十进制数。比如输入 3,则打印出 1、2、3 一直到最大的 3 位数 999。
示例 1:
输入: n = 1
输出: [1,2,3,4,5,6,7,8,9]
说明:
用返回一个整数列表来代替打印
n 为正整数
"""
"""
最大的n位数可能会超出存储范围,因此需要用字符串来保存这些数字,并且模拟加法运算
打印数字时要从第一个非0数字开始
当第一位数字发生进位时,模拟加法结束
"""
class Solution1:
def printNumbers(self, n):
# 首先判断输入是否合法
if n < 1... | [
"244492644@qq.com"
] | 244492644@qq.com |
cc4581dcb239c15cbc2e561069528a340c92b34d | f48f9798819b12669a8428f1dc0639e589fb1113 | /programming/misc/googlemock/actions.py | 0e8cff036c9e369f402327537b8b77901e62731c | [] | no_license | vdemir/PiSiPackages-pardus-2011-devel | 781aac6caea2af4f9255770e5d9301e499299e28 | 7e1867a7f00ee9033c70cc92dc6700a50025430f | refs/heads/master | 2020-12-30T18:58:18.590419 | 2012-03-12T03:16:34 | 2012-03-12T03:16:34 | 51,609,831 | 1 | 0 | null | 2016-02-12T19:05:41 | 2016-02-12T19:05:40 | null | UTF-8 | Python | false | false | 1,082 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2011 TUBITAK/BILGEM
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
... | [
"kaptan@pisipackages.org"
] | kaptan@pisipackages.org |
3e2ffe9fb08e3de17a22adf567ea3bae5d89cad3 | a814debee728e59a7a10d8c12b92c1f3ee97e19d | /Atividade/cadastro_alunos.py | 3549954447d09ca6bc18697b41ec82898a0ea902 | [] | no_license | PedroVitor1995/Algoritmo-ADS-2016.1 | 0ee034d2f03b29d3c8177fb3402f7aeae08d07cf | 8e3b6dfb0db188b9f5d68dcb8619f6636883ab89 | refs/heads/master | 2021-01-01T15:51:56.636502 | 2017-07-19T13:47:36 | 2017-07-19T13:47:36 | 81,328,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,784 | py | def main():
menu = (' 1 - Cadastrar \n 2 - Listar \n 3 - Remover \n 0 - Sair \n Opcao: ')
alunos = []
while True:
opcao = input(menu)
if opcao == 1:
cadastrar(alunos)
print ('Aluno cadastrado com sucesso!')
elif opcao == 2:
listar(alunos)
elif opcao == 3:
remover(alunos)
elif opcao ... | [
"noreply@github.com"
] | PedroVitor1995.noreply@github.com |
c0fdef125f38ff9c8ea632183c45e314e09b6c90 | 874cb9539283a5dc2616f3c5ae6ca852a63291ed | /classLaneLineHistory.py | ab77f1ddc45c7d4dfef990769231a7b827d77de0 | [] | no_license | redherring2141/ac_lane_detection | 494ddd89ab41a6e63032325127d63f6aee6f4478 | 132da04ac7becd4d8f7750936272bcbaea56d975 | refs/heads/master | 2022-11-05T00:42:32.124816 | 2020-06-22T02:50:57 | 2020-06-22T02:50:57 | 250,525,327 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,906 | py | import math
import numpy as np
from classLaneLine import LaneLine, create_queue
class LaneLineHistory:
def __init__(self, queue_depth=2, test_points=[50, 300, 500, 700], poly_max_deviation_distance=150):
self.lane_lines = create_queue(queue_depth)
self.smoothed_poly = None
self.test_points... | [
"redherring2141@kaist.ac.kr"
] | redherring2141@kaist.ac.kr |
8702836fc9279ef168fe2ff273935ae450062b85 | c1e8ddcfda2586ddc6be93ff60a77428150d6921 | /DiegoRocha/NCtBkjKq.py | c0769eb652b1b3dae72bae2d8f527197b1334206 | [] | no_license | weltonvaz/PythonBR | 740fde6aa0040d13100005669f1a011f52573580 | f2bf033d692aee3f79ff1ec2644799cb7f3f5585 | refs/heads/master | 2020-05-09T20:53:06.416836 | 2017-06-15T21:05:38 | 2017-06-15T21:05:38 | 27,550,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,615 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def toByteArray(s, withLen):
if (len(s) > 255):
raise Exception('String precisa ter menos que 255 caracteres')
buffer = bytearray()
if withLen:
buffer.append(len(s))
buffer.extend(s)
return buffer
BIN_TO_ASC = [
'... | [
"weltonvaz@gmail.com"
] | weltonvaz@gmail.com |
6a8a20770c65bc69e42feab1370ccc2a82883911 | 5ef6b1140f4fe7467595f6f49eeb3ec211424317 | /test/busbooking.py | 676654475e7bdc1d4e4d41316a176d8b48cbf0d2 | [] | no_license | publiccoding/prog_ln | d0ddc5ea69be6de6d2c3da0535f924985fcd2585 | 9c3210d177000d0a05cc9a0f1f281cebb8785adb | refs/heads/master | 2021-09-25T04:15:31.109539 | 2018-10-18T01:04:41 | 2018-10-18T01:04:41 | 117,082,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,071 | py |
import sys
#arg1=sys.argv[1]
# Register user for bus booking and stor the data in userdata.txt file
reg = input("Enter your options :\nUser Registartion -> 1 \nUser Login -> 2\n" )
if reg == "1":
uname = input("Enter your username")
pwd = input("Enter your password ")
userloginData = f' ... | [
"thimmarayan.krishnappa@gmail.com"
] | thimmarayan.krishnappa@gmail.com |
70ef33ff15c709e33a7c4f4f2936bf571dc0ec70 | a8062308fb3bf6c8952257504a50c3e97d801294 | /problems/N391_Perfect_Rectangle.py | 044dd2bf7f6161f54a015998313d9f3a11947085 | [] | no_license | wan-catherine/Leetcode | 650d697a873ad23c0b64d08ad525bf9fcdb62b1b | 238995bd23c8a6c40c6035890e94baa2473d4bbc | refs/heads/master | 2023-09-01T00:56:27.677230 | 2023-08-31T00:49:31 | 2023-08-31T00:49:31 | 143,770,000 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,443 | py | import collections
"""
1. sum of the area of all small rectangles equals to the final large rectangle's area
2. all lbnodes and runodes should not be duplicated
3. the four nodes for the final rectangle should only show one time
"""
class Solution(object):
def isRectangleCover(self, rectangles):
"""
... | [
"rarry2012@gmail.com"
] | rarry2012@gmail.com |
dead213f276db1180f44d4940987bca1e0b1b23b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/390/usersdata/317/78498/submittedfiles/ex1.py | 3bd112ad4b74a11944a5f2b00b8a9a4df4aca8e1 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | # -*- coding: utf-8 -*-
from __future__ import division
a = input('Digite a: ')
b = input('Digite b: ')
c = input('Digite c: ')
#COMECE A PARTIR DAQUI!
import math
a = int(input('Digite a: '))
b = int(input('Digite b: '))
c = int(input('Digite c: '))
d = (-b**2) - (4*a*c)
print('o delta é {}'.format(d)) | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
6c3535ee17c4fa616fa64f8e4dae8094aeda358f | 092dd56a1bf9357466c05d0f5aedf240cec1a27b | /tests/pytests/problems/TestProblemDefaults.py | 1744a84c983e9cb7877f2d329d7c84617e83f61c | [
"MIT"
] | permissive | rwalkerlewis/pylith | cef02d5543e99a3e778a1c530967e6b5f1d5dcba | c5f872c6afff004a06311d36ac078133a30abd99 | refs/heads/main | 2023-08-24T18:27:30.877550 | 2023-06-21T22:03:01 | 2023-06-21T22:03:01 | 154,047,591 | 0 | 0 | MIT | 2018-10-21T20:05:59 | 2018-10-21T20:05:59 | null | UTF-8 | Python | false | false | 1,130 | py | #!/usr/bin/env nemesis
#
# ======================================================================
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://g... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
e1386f9f07d356dd3aa5604b39f780c4f5fd5eb2 | d1b9c5bb6992e1eabe2b5e4eea01f99384d901bb | /aiida_tbextraction/fp_run/wannier_input/_vasp.py | 94e746cd2789d976497857667c684a4aa521e5a4 | [
"Apache-2.0"
] | permissive | zx-sdu/aiida-tbextraction | c01148541aded7324fe8cf8ad01f1a54d9e1bf43 | 0bf6d19cbc643e0bdbbe30fe1dd0c6179eb6a647 | refs/heads/master | 2020-09-27T19:53:05.896439 | 2019-01-24T11:40:40 | 2019-01-24T11:40:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,882 | py | # -*- coding: utf-8 -*-
# © 2017-2019, ETH Zurich, Institut für Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
"""
Defines a workflow that calculates the Wannier90 input files using VASP.
"""
from fsc.export import export
import numpy as np
from aiida.orm import Code, DataFactory, CalculationFactory
f... | [
"greschd@gmx.ch"
] | greschd@gmx.ch |
f0821f868eb86caed7a71549fa9b479021aa452e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03563/s841164729.py | 7bbf69bc6f80a866d0951cf151ac7ae99dd8cfb0 | [] | 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 | 261 | py | import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))
def main():
r = II()
g = II()
print(2*g-r)
if __name__ == '__main__':
main() | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
a5cbb7d24f452dbe657a97d15550742eaef4cf13 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03409/s468789013.py | b57e5c6785ee11c84c33be14a422e38f546a4aa9 | [] | 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 | 419 | py | N = int(input())
R = [tuple(map(int, input().split())) for _ in range(N)]
B = [tuple(map(int, input().split())) for _ in range(N)]
R = sorted(R)
B = sorted(B)
res = 0
for bx, by in B:
idx = -1
tmp = -1
for i, (rx, ry) in enumerate(R):
if rx < bx and ry < by:
if ry >= tmp:
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d41e112d9da13c81b9d2b69b9e6a2da687d3b496 | 53db924607abc85139dafc8c490218721c7cf9c3 | /redturtle/smartlink/config.py | e9813a95e40c4e35ca7ecf6dbf28d38387c4216c | [] | no_license | RedTurtle/redturtle.smartlink | 4f6fbf45551b91d9725efd42758a310bd3508fa6 | f06b6dd45361af170127fade78fe5c936426b0cf | refs/heads/master | 2021-01-17T14:00:39.273854 | 2017-04-24T07:50:29 | 2017-04-24T07:50:29 | 4,359,396 | 1 | 1 | null | 2021-07-26T14:56:03 | 2012-05-17T14:38:30 | Python | UTF-8 | Python | false | false | 156 | py | from Products.ATContentTypes.permission import permissions
PROJECTNAME = 'redturtle.smartlink'
ADD_PERMISSIONS = {
'SmartLink': permissions['Link']
}
| [
"luca@keul.it"
] | luca@keul.it |
66542ffb5ad08a5084f91e3a68b4479c2696fe83 | a2098c9c8d39cc9e392f21de64c7ced0549d6f1f | /custom/signup/backends.py | a7f6895e690b4c25fe22dab4e2fadd9368bc9ae8 | [] | no_license | dmitryro/divorcesus | 23fe394b0d065f635ecb11eed945cc4fcb9bb829 | 8ecedb2b8a019e63f37702888dd12e994a75105e | refs/heads/master | 2022-12-11T17:20:13.348413 | 2020-10-01T17:27:57 | 2020-10-01T17:27:57 | 56,432,086 | 0 | 1 | null | 2022-12-08T02:22:29 | 2016-04-17T11:05:27 | JavaScript | UTF-8 | Python | false | false | 128 | py | from social_core.backends.facebook import FacebookOAuth2
class CustomFacebookOauth(FacebookOAuth2):
REDIRECT_STATE = False
| [
"dmitryro@gmail.com"
] | dmitryro@gmail.com |
36a512ba1550fa45e98d9afb5b913aa7b5c5b0b3 | f8ffac4fa0dbe27316fa443a16df8a3f1f5cff05 | /Python/Merge_the_Tools.py | 1b827ae71a08079bff6e8e27327e91e02862fc3c | [] | no_license | ankitniranjan/HackerrankSolutions | e27073f9837787a8af7a0157d95612028c07c974 | e110c72d3b137cf4c5cef6e91f58a17452c54c08 | refs/heads/master | 2023-03-16T19:06:17.805307 | 2021-03-09T16:28:39 | 2021-03-09T16:28:39 | 292,994,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | def merge_the_tools(string, k):
# your code goes here
for i in range(0, len(string), k):
str = string[i:i+k]
sub = ''
for s in str:
if s not in sub: #filtering data
sub += s #merging characters
print(sub)
if __name__ == '__main__':
... | [
"noreply@github.com"
] | ankitniranjan.noreply@github.com |
afbf98877c1eb4bfdf843e70f406f5061bfa7b3d | 3293dc42e15e956be202e39db196eed9912dcc01 | /estimation/prediction/machine learning/regression/lightgbm_example.py | 1b35f40b8f5ecf19138ca2343133d7ea57f275fc | [] | no_license | bthowe/data_science | c372e5364f24dc29e3de1fca3504211cb93b62fb | 63291df8084e5f62f9ba226e87db2242bb31ac94 | refs/heads/master | 2021-11-24T10:49:00.800890 | 2021-11-02T16:10:16 | 2021-11-02T16:10:16 | 106,839,857 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | import sys
import joblib
import numpy as np
import pandas as pd
import lightgbm as lgb
from scipy.stats import uniform
from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
def model_train_random():
X = joblib.load('../data_files/X_train.pkl')
y = joblib.load('../data_files/y_train_reg.pkl')
... | [
"b.travis.howe@gmail.com"
] | b.travis.howe@gmail.com |
ac2168c980477f2df2b02e347d61bec3f35f7e39 | fe035be449d42bf5d56a67c21eeb13e25db0aea6 | /backend/location/migrations/0001_initial.py | a71f5e5f305cd2b3b28fa5007d0eeaa36e1a325f | [] | no_license | crowdbotics-apps/koxlab2-23672 | 0e5fd0406bb83d449f46cd69bd4d9daf0fda763b | 889c6731266e56624ae84ac33507b01f1f0f5fc0 | refs/heads/master | 2023-02-08T20:18:56.880235 | 2021-01-04T23:16:49 | 2021-01-04T23:16:49 | 326,830,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,700 | py | # Generated by Django 2.2.17 on 2021-01-04 23:15
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 |
5d1ad3f78ce3801ebda2fa11170ef8e2a873fa60 | be9a1995c4a3a5eefcfe665801705e5eefa4f4d6 | /backlog.py | f41edd25708886a8185e80b2f8388e3e9cd07bbe | [] | no_license | intelliflovrk/SpareTime | c377bc867fe45a7fd4150095506d3af5e532960f | 975d2150e09e13ec5f3b5bec0016555f5f6ba0b0 | refs/heads/master | 2022-07-28T01:01:12.472879 | 2020-05-24T18:23:51 | 2020-05-24T18:23:51 | 260,218,638 | 0 | 2 | null | 2020-05-24T18:23:53 | 2020-04-30T13:26:55 | Python | UTF-8 | Python | false | false | 1,047 | py | fruit = ["apple", "banana", "mango"]
veg = ['carrot', 'beans', 'potato']
drink = ['milk', 'water', 'juice']
#T1
""" Create a function here that print what kind of item is given from the above lists.
Example: if 'apple' given then it should print 'apple is a fruit.' """
#T2
"""Create a function that accepts unlimited... | [
"raj.veeramani@intelliflo.com"
] | raj.veeramani@intelliflo.com |
1f3d959606679dc7ba5947b12daca67bc6146d51 | 13b558c3541ff00402f206c8c82a8ced18f3a76c | /test/kernel/test_kernel_relu.py | 2cb10b308b11f1588ed60af35c03ceb345034eda | [
"MIT"
] | permissive | lvdongxu/UnarySim | aeafa4fff35319a1ccdaca6bd4f227d5f16ccf57 | e32531e452e7831d5e03f9f84b5f35d7e9bceaa9 | refs/heads/master | 2023-06-18T19:56:50.434117 | 2021-07-19T20:27:21 | 2021-07-19T20:27:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,374 | py | # %%
import torch
from UnarySim.kernel.relu import FSUReLU
from UnarySim.stream.gen import RNG, SourceGen, BSGen
from UnarySim.metric.metric import ProgError
import matplotlib.pyplot as plt
import time
import math
import numpy as np
# %%
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# %%
def... | [
"diwu0111@hotmail.com"
] | diwu0111@hotmail.com |
d79fda38aff980036caca4a217945a5d4e535590 | 6bb45c5892b4c9692dcc44116fb73dc9e7ab90ff | /sagemaker-inference-recommender/tensorflow-cloudwatch/code/inference.py | 6c01046988f46bc972a2ad0fae4f1977a5ae7f98 | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | aws/amazon-sagemaker-examples | 8359afe544e873662bda5b8d2b07399c437213c9 | 43dae4b28531cde167598f104f582168b0a4141f | refs/heads/main | 2023-08-26T04:42:52.342776 | 2023-08-25T14:37:19 | 2023-08-25T14:37:19 | 107,937,815 | 4,797 | 3,519 | Apache-2.0 | 2023-09-14T19:47:03 | 2017-10-23T05:55:22 | Jupyter Notebook | UTF-8 | Python | false | false | 1,746 | py | import io
import json
import numpy as np
from PIL import Image
def input_handler(data, context):
""" Pre-process request input before it is sent to TensorFlow Serving REST API
https://github.com/aws/amazon-sagemaker-examples/blob/0e57a288f54910a50dcbe3dfe2acb8d62e3b3409/sagemaker-python-sdk/tensorflow_serving... | [
"noreply@github.com"
] | aws.noreply@github.com |
b4842432df98cdecfd9ed798a4883fad4fd5ec9b | 6bce144a2dc9293f290207d1c6c2d08a63763cd2 | /napari/_vispy/_tests/test_vispy_vectors_layer.py | cee34be9af2a9da5fa15e8c2b4f47f1a69d8ab2a | [
"BSD-3-Clause"
] | permissive | tlambert03/napari | 0f7b90de5333b520567a7eb9f00dea5c15fa448c | 19867df427b1eb1e503618a1ab109e7210ae8a83 | refs/heads/main | 2023-08-30T21:32:29.433620 | 2023-05-08T13:58:18 | 2023-05-08T13:58:18 | 216,388,440 | 5 | 0 | BSD-3-Clause | 2023-05-01T07:58:42 | 2019-10-20T16:02:35 | Python | UTF-8 | Python | false | false | 1,382 | py | import numpy as np
import pytest
from napari._vispy.layers.vectors import (
generate_vector_meshes,
generate_vector_meshes_2D,
)
@pytest.mark.parametrize(
"edge_width, length, dims", [[0, 0, 2], [0.3, 0.3, 2], [1, 1, 3]]
)
def test_generate_vector_meshes(edge_width, length, dims):
n = 10
data = ... | [
"noreply@github.com"
] | tlambert03.noreply@github.com |
1e5273c1dacc874b90160d3690e51cca256c9cef | 3b7ea74de26931e95eb76d1d27621e5d744f81f4 | /hashtat/hashing/migrations/0001_initial.py | 3e4bbb2dc78a2ba9357a4a0f5dad48615c707d00 | [] | no_license | RoodrigoRoot/TDD-django | abf7c70bde2c6095a27ad6415330476449f71f4a | 6ad752cb75dbef3c6f720b071f3db61c2409bd23 | refs/heads/main | 2023-03-24T11:47:43.683202 | 2021-03-23T17:02:34 | 2021-03-23T17:02:34 | 350,515,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | # Generated by Django 3.1.7 on 2021-03-22 18:31
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Hash',
fields=[
('id', models.AutoField(aut... | [
"roodrigoroot@gmail.com"
] | roodrigoroot@gmail.com |
7b897209074e91145f84ce321c1f8c1d4c601389 | 63ec00220da0cbaf125bf2e879ff63ce432f7227 | /tests/multiloop/test_alternative_loops.py | 000aed652ca7d15d93e11eaa8c07acccd54c801e | [
"Apache-2.0"
] | permissive | munderseth/pytest-asyncio | 3cbfc49a82f5f8d503f5429d43bc3720993ecee4 | 2f37e873e0977861d24a018e06fa9f469470eaf0 | refs/heads/master | 2021-07-24T22:10:19.852111 | 2017-11-03T22:41:09 | 2017-11-03T22:41:09 | 109,448,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | """Unit tests for overriding the event loop."""
import asyncio
import pytest
@pytest.mark.asyncio
def test_for_custom_loop():
"""This test should be executed using the custom loop."""
yield from asyncio.sleep(0.01)
assert type(asyncio.get_event_loop()).__name__ == "CustomSelectorLoop"
@pytest.mark.asyn... | [
"tinchester@gmail.com"
] | tinchester@gmail.com |
cf34dafd04f5380b38b80c00bd543830273f58c1 | 96f79e659344edb2c6e50d1dd9660b6858054fdc | /lesson_04/server.py | cae3d711a46d4efab2511d01722bf145f97c0015 | [] | no_license | mr-Robot-777/client-server_python | af5b2d7b0bdbec9666e1771afd260b0afd39372a | 977c5cb8bfc57d6dc477eaf9083f154f848d637f | refs/heads/master | 2023-03-20T21:57:44.605765 | 2021-03-19T09:27:30 | 2021-03-19T09:27:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py |
"""Программа-сервер"""
import json
from socket import AF_INET, SOCK_STREAM, socket
from utils import create_parser
from variables import ENCODING, MAX_CONNECTIONS, MAX_PACKAGE_LENGTH
RESPONSE_ERROR = 400
RESPONSE_OK = 200
class Server:
def __init__(self):
self.transport = socket(AF_INET, SOCK_STREAM)
... | [
"ershgun@mail.ru"
] | ershgun@mail.ru |
514cdf3548a97713adfb8111d14217eea97c17cf | 19ed724002351006b25175ad584c89f774bd9527 | /cvmodels/models/layers/se_module.py | 7283ff8a838fbc5a58077543bf837198de517ec7 | [
"MIT"
] | permissive | welkin-feng/ComputerVision | 60df6aa36c26c630bcb3676c4ef0df6762d5329f | 667488e41878d7f0376142a7ae9e1b43c0edd68a | refs/heads/master | 2021-06-25T07:56:07.238130 | 2021-02-02T05:37:23 | 2021-02-02T05:37:23 | 193,149,801 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | from torch import nn
__all__ = ['SEModule']
class SEModule(nn.Module):
def __init__(self, channels, reduction=16, act_layer=nn.ReLU):
super(SEModule, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
reduction_channels = max(channels // reduction, 8)
self.fc1 = nn.Conv2d(
... | [
"382523558@qq.com"
] | 382523558@qq.com |
08b693a29c92e026ff58954982400db441b2cfbc | 010215c1421f5275a846e7154189b22cdd3c89bc | /Data Structures/Tree/identical_trees.py | dc9daa8e21e85efd3307005747d65175e3db3330 | [] | no_license | bsextion/CodingPractice_Py | ab54d5715298645a8fd7ab6945bf3b22d4e6a874 | da2847a04705394c32a6fe1b5f6c6b64c24647a3 | refs/heads/master | 2023-08-16T17:14:47.643989 | 2021-09-28T19:23:40 | 2021-09-28T19:23:40 | 383,658,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 878 | py | class BinaryTreeNode:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
# below data members used only for some of the problems
self.next = None
self.parent = None
self.count = None
def are_identical(root1:BinaryTreeNode, root2:B... | [
"bsextion@gmail.com"
] | bsextion@gmail.com |
3c07919c47445d995fbca14d989d44437fbce99f | e1efc8e0b0e4629dea61504fbc816c0527691bd9 | /6.redis/redis11_持久化.py | 419d53bb9708d30f4e0f3001c584df957d59fc05 | [] | no_license | xiongmengmeng/xmind-technology | 2bb67a0bf92cfd660cac01f8ab3a2454423ccba5 | e2fdb6987ef805a65f0a4feb52d84383853f4b77 | refs/heads/main | 2023-07-31T07:10:29.868120 | 2021-09-11T08:18:17 | 2021-09-11T08:18:17 | 307,636,242 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,779 | py | import os,sys
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0,parentdir)
import xmind
from xmind.core.markerref import MarkerId
xmind_name="redis"
w = xmind.load(os.path.dirname(os.path.abspath(__file__))+"\\"+xmind_name+".xmind")
s2=w.createSheet()
s2.setTitle("持久化")
r2=s... | [
"xiongmengmeng@qipeipu.com"
] | xiongmengmeng@qipeipu.com |
af8b8ae708671da42ab4c86b784d196be55e8ce3 | 4b55e257e0af5181c75a3b840a2c206cc6caec92 | /lightreid/optim/__init__.py | 05dac52793b24aa106f2ff3dcec83b52c1b6d1b8 | [] | no_license | Leopold0801/light-reid | 1799374b6e6552edeade737b137364de34d5b810 | aeb9fb8494611512dc9e3f3e3e7c9f7513c27a99 | refs/heads/master | 2022-11-26T21:19:39.005565 | 2020-08-10T16:56:05 | 2020-08-10T16:56:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 563 | py | """
@author: Guan'an Wang
@contact: guan.wang0706@gmail.com
"""
from .lr_scheduler import WarmupMultiStepLR, DelayedCosineAnnealingLR
class Optimizer(object):
KWARGS = ['fix_cnn_epochs']
def __init__(self, optimizer, lr_scheduler, max_epochs, **kwargs):
self.optimizer = optimizer
self.l... | [
"guan.wang0706@gmail.com"
] | guan.wang0706@gmail.com |
43714fe8477ba7894bde249b6e9a5d3cb9754e61 | c887e00981e6368e94916ca9b93c4de79a5c1a22 | /lawncare/blog/views.py | e3b3935c8c13e11b84ee6b90db6746f75b732bc7 | [] | no_license | devArist/school_project | 18dc0427e2d6a45abfff8a72dbe2c52a7afd8778 | 4d1c1ba5e2a9b4253e950e2c95e0ce6ef22efe3f | refs/heads/main | 2023-05-07T09:51:50.664546 | 2021-05-28T12:44:11 | 2021-05-28T12:44:11 | 368,508,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | from django.shortcuts import render
from . import models
# Create your views here.
def blog(request):
blogs = models.Blog.objects.filter(status=True).order_by('-date_update')
return render(request, 'blog/blog.html', locals())
def detail(request, pk):
blog = models.Blog.objects.get(pk=pk)
return render... | [
"aridev97@gmail.com"
] | aridev97@gmail.com |
6af0eef7eaecf4e08598669f69be9120a2059704 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03722/s165384014.py | 281a6c4886b4c12376aea57bca9bad100458536f | [] | 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 | 461 | py | N, M = map(int, input().split())
road = []
for i in range(M):
a, b, c = map(int, input().split())
road.append((a-1, b-1, -c))
INF = 10**15
d = [INF] * N
d[0] = 0
def bellman_ford():
global d
for i in range(N):
for a, b, c in road:
d[b] = min(d[b], d[a] + c)
bellman_ford()
for a, b, c in road:
new_... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
9ca967cb2d1a93ca45878ccdbaa7a626b963fab4 | ef1d38cfef63f22e149d6c9dd14e98955693c50d | /webhook/protos/pogoprotos/data/ditto/rpc_response_event_params_pb2.py | e4f473d06c0e00583908cdcab8447be689edd11e | [] | no_license | Kneckter/WebhookListener | 4c186d9012fd6af69453d9d51ae33a38aa19b5fd | ea4ff29b66d6abf21cc1424ed976af76c3da5511 | refs/heads/master | 2022-10-09T04:26:33.466789 | 2019-11-24T17:30:59 | 2019-11-24T17:30:59 | 193,372,117 | 2 | 0 | null | 2022-09-23T22:26:10 | 2019-06-23T16:39:34 | Python | UTF-8 | Python | false | true | 3,011 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/data/ditto/rpc_response_event_params.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from goo... | [
"kasmar@gitlab.com"
] | kasmar@gitlab.com |
f9ce9ebbf41ca7bdf7c0ae9d1b3acfbe30350953 | 525c6a69bcf924f0309b69f1d3aff341b06feb8e | /sunyata/layer/recurrent/lstm.py | ab6c9420189140a770d997facf97b92ca2501266 | [] | no_license | knighton/sunyata_2017 | ba3af4f17184d92f6277d428a81802ac12ef50a4 | 4e9d8e7d5666d02f9bb0aa9dfbd16b7a8e97c1c8 | refs/heads/master | 2021-09-06T13:19:06.341771 | 2018-02-07T00:28:07 | 2018-02-07T00:28:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,097 | py | from ... import backend as Z
from ... import init
from ..base import LinkBuilder
from .base import RecurrentLayer, RecurrentSpec
class LSTMLayer(RecurrentLayer):
def __init__(self, forward, last, input_kernel, recurrent_kernel, bias):
dim = input_kernel.shape[1] // 4
dtype = input_kernel.dtype.nam... | [
"iamknighton@gmail.com"
] | iamknighton@gmail.com |
2bc6ce1e38b0ff11a43a0471d5895cf0445c4e75 | 6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386 | /google/ads/admob/v1/ads-admob-v1-py/google/ads/admob/__init__.py | 99b0f676816b735ae222673d657ca23ba987d36e | [
"Apache-2.0"
] | permissive | oltoco/googleapis-gen | bf40cfad61b4217aca07068bd4922a86e3bbd2d5 | 00ca50bdde80906d6f62314ef4f7630b8cdb6e15 | refs/heads/master | 2023-07-17T22:11:47.848185 | 2021-08-29T20:39:47 | 2021-08-29T20:39:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,606 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"bazel-bot-development[bot]@users.noreply.github.com"
] | bazel-bot-development[bot]@users.noreply.github.com |
774941c1e4550ae6504fd4d14f90db5cb0b4ea86 | a71fbf421c43fcb34fe7c8000eb807677821683c | /python_import/p42_from_module.py | 6adea0acaab4069110e5384b1022f70212ec8b84 | [] | no_license | leekyunghun/bit_seoul | ccd96dca3774f259e04b8388e134d6183b974268 | b76a3d5f83b77f5345d61cf3baa68aaefc25cd2a | refs/heads/master | 2023-02-06T08:12:17.768076 | 2020-12-22T13:35:19 | 2020-12-22T13:35:19 | 311,286,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | from machine.car import drive
from machine.tv import watch
drive()
watch()
from machine import car
from machine import tv
car.drive()
tv.watch()
| [
"oh_pizza@naver.com"
] | oh_pizza@naver.com |
c98dfb752acee87d50afcc78ce6a2ff51cfc674f | 89f3169a2393bff8880f657d9bb4c12b40729e9a | /2020-06/abc051_b.py | dbd393e5b7ceda1a54913e15b23019463161141a | [] | no_license | YutaGoto/daily_atcoder | c087adbb7fa03f0cdc4291c806f21b1b93130d86 | 113d4e25f1d3bb0e665f9154bc0afaecae5ea7bf | refs/heads/main | 2023-06-19T00:56:12.359473 | 2021-07-16T12:33:06 | 2021-07-16T12:33:06 | 273,282,766 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | k, s = map(int, input().split())
a = 0
for x in range(0, k+1):
for y in range(0, k+1):
z = s - x - y
if z >= 0 and z <= k:
a += 1
print(a)
| [
"you.goto.510@gmail.com"
] | you.goto.510@gmail.com |
90168e13f27d0f16c51ca125a2be4b1e7e075cfc | 4fc21c3f8dca563ce8fe0975b5d60f68d882768d | /Darlington/phase1/python Basic 1/day 13 solution/qtn2.py | d0cbe7f2d2874086c5319bbe0c7055094a0354db | [
"MIT"
] | permissive | Uche-Clare/python-challenge-solutions | 17e53dbedbff2f33e242cf8011696b3059cd96e9 | 49ede6204ee0a82d5507a19fbc7590a1ae10f058 | refs/heads/master | 2022-11-13T15:06:52.846937 | 2020-07-10T20:59:37 | 2020-07-10T20:59:37 | 266,404,840 | 1 | 0 | MIT | 2020-05-23T19:24:56 | 2020-05-23T19:24:55 | null | UTF-8 | Python | false | false | 208 | py | #program to remove the first item from a specified list.
names = ["peter", "winner", "Austin", "ND", "Darlington"]
print("\nFirst Name: ",names)
del names[0]
print("After removing the first : ",names)
print() | [
"darlingtonchibuzor64@gmail.com"
] | darlingtonchibuzor64@gmail.com |
ed12611516370eb81804ac8f6bdfcdcbd60a9752 | 4c984a318ccf26e765f902669399da66497e194d | /pollexe/settings/summernote/conf.py | 392425c7e9f0d2983aec17391359a06fce26c55d | [] | no_license | sajalmia381/pollexe | 914af663bad6becb4308c738a16240028f37f99b | 3ead47fee43855aba1ee0f4c2b3f222cac6a9a68 | refs/heads/master | 2020-04-21T12:42:49.283843 | 2019-02-07T13:43:40 | 2019-02-07T13:43:40 | 169,572,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,637 | py | # SUMMERNOTE_THEME = 'bs4'
SUMMERNOTE_CONFIG = {
# Using SummernoteWidget - iframe mode, default
'iframe': True,
# Or, you can set it as False to use SummernoteInplaceWidget by default - no iframe mode
# In this case, you have to load Bootstrap/jQuery stuff by manually.
# Use this when you're alrea... | [
"sajal_mia@ymail.com"
] | sajal_mia@ymail.com |
bb6034702ab10541abffa775201702a7d77dc308 | 41249d7d4ca9950b9c6fee89bf7e2c1929629767 | /results/rabi_and_lmg_optimizations_different_constraints_20190228/script_rabi_bangramp_neldermead_bounds12.py | a389f358b918172fdab3458cc34595ac1a335274 | [
"MIT"
] | permissive | lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381 | f739b3baad1d2aadda576303bb0bbe9d48ec204a | 29f80dcf914096555cee9bc2e18249a2c95d6a50 | refs/heads/master | 2022-11-22T00:44:09.998199 | 2020-07-21T08:35:28 | 2020-07-21T08:35:28 | 281,237,037 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,020 | py | import os
import sys
import numpy as np
import pandas as pd
import logging
if '../../' not in sys.path:
sys.path.append('../../')
import src.optimization as optimization
model = 'rabi'
model_parameters = dict(N=100, Omega=100, omega_0=1.)
protocol = 'bangramp'
optimization_method = 'Nelder-Mead'
parameters_cons... | [
"lukeinnocenti@gmail.com"
] | lukeinnocenti@gmail.com |
941761be2cc2b83e4fb14b8e9bd41be81dd7e935 | 3330090c2b3608eedbce99e55a2a8a5d87cc163f | /lib/actions/drivers_test.py | f78eb2b1553a49633af7f65761e717c7c87f933c | [
"Apache-2.0"
] | permissive | Venseer/glazier | ea935af0afff001a26538972d24622c69598628f | db24121e5b79bd377c721ca8d9c391db56841a4f | refs/heads/master | 2021-01-11T05:22:52.400113 | 2018-06-25T10:52:19 | 2018-06-25T10:52:19 | 79,860,410 | 0 | 0 | Apache-2.0 | 2018-06-25T10:52:20 | 2017-01-23T23:42:37 | Python | UTF-8 | Python | false | false | 3,986 | py | # Copyright 2016 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 by applicable law or ag... | [
"mattl@google.com"
] | mattl@google.com |
b4d48deeab90710e4f81fb5ff97b545bb3a77179 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/incremental-memory-leak.py | 1705ea35d0108812a35a7859a8fdf28edbb2a50f | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 1,064 | py | # Time: O(1)
# Space: O(1)
# Same problem from https://codingcompetitions.withgoogle.com/codejam/round/000000000019ffb9/00000000003384ea
class Solution(object):
def memLeak(self, memory1, memory2):
"""
:type memory1: int
:type memory2: int
:rtype: List[int]
"""
def ... | [
"noreply@github.com"
] | kamyu104.noreply@github.com |
1204ca4653c8968bf60985caa1ab1428e568e339 | d9cb81209d452b7c3180cd2e2b3e1b00279b469c | /proc_TED_2_NOV20161_adjusted.py | 623ca2a355b2c5efeb7490545a9385aca30410f3 | [
"CC0-1.0"
] | permissive | riceissa/total-economy-database | 3857a0b9bc1de393fc681b43914b26c0adf2c8bc | 0052bb2202458a7e908203b222d404b266ee1c0d | refs/heads/master | 2022-08-12T16:10:30.891745 | 2022-07-23T05:48:34 | 2022-07-23T05:48:34 | 107,448,534 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | #!/usr/bin/env python3
import csv
import sys
import re
from devec_sql_common import *
insert_line = "insert into data(region, odate, database_url, data_retrieval_method, metric, units, value, notes) values"
count = 0
first = True
with open("../total-economy-database-data/TED_2_NOV20161_adjusted.csv", newline='') a... | [
"riceissa@gmail.com"
] | riceissa@gmail.com |
17a0ccae6225c5831dfd34cfb3a9e83af48d05fc | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/networks/models/bert/src/__init__.py | 4f4584a4b483b32d6ddacc12923d127d5a549061 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 1,653 | py | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"leon.wanghui@huawei.com"
] | leon.wanghui@huawei.com |
3dfe5bdfaef0f2bb0484a3cedcb49aace1286dab | 496a63f41fa32e2bb3ecce0d35ff4374f1c02ad5 | /src/data/handlers/options.py | 1e2f69ca64a2a2b696cedf6bff9de1e3eb46b311 | [
"BSD-3-Clause"
] | permissive | vincent-lg/avenew.one | bbfa8d44e68db943b8825e9d4a32a43e985778fe | fb7f98d331e47e2032ee1e51bf3e4b2592807fdf | refs/heads/main | 2023-02-14T00:28:53.511552 | 2021-01-13T11:13:07 | 2021-01-13T11:13:07 | 330,207,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,209 | py | # Copyright (c) 2020-20201, LE GOFF Vincent
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions... | [
"vincent.legoff.srs@gmail.com"
] | vincent.legoff.srs@gmail.com |
7fb0fcce7a07d40707030a7b6d5b1f5de8882482 | 1a1c372244ef0e64da4629496bb3eb1b00cb47fc | /configs/guided_anchoring/ga_faster_x101_32x4d_fpn_1x.py | dabdf6c9864e1a9dad1e759165d76472618e78b0 | [
"Apache-2.0"
] | permissive | speedinghzl/mmdetection | 2ab7926251ed3ee8f86dcba6f0b85081eac0ef53 | 339f37a21b6e4001e90734f6fce1559843e83487 | refs/heads/master | 2020-05-30T09:54:02.302563 | 2019-06-02T03:41:45 | 2019-06-02T03:41:45 | 189,658,179 | 4 | 0 | Apache-2.0 | 2019-05-31T21:03:41 | 2019-05-31T21:03:40 | null | UTF-8 | Python | false | false | 5,721 | py | # model settings
model = dict(
type='FasterRCNN',
pretrained='open-mmlab://resnext101_32x4d',
backbone=dict(
type='ResNeXt',
depth=101,
groups=32,
base_width=4,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck... | [
"chenkaidev@gmail.com"
] | chenkaidev@gmail.com |
c018206b30963896b42d4d8f91602b19fbb8578c | 36afa271f080459adf1014cd23f4be9f954dfee6 | /Crawler/Requests/douban.py | 5160d23321fc240a3aeba30552e69eecea7db83c | [] | no_license | King-Of-Game/Python | b69186a7574ce1c0b7097207cfe9a2eb38a90bc0 | 643b9fd22efd78f6679735f23432943a57b5f5bb | refs/heads/master | 2023-05-25T05:35:14.473114 | 2021-10-24T12:52:21 | 2021-10-24T12:52:21 | 151,251,434 | 3 | 0 | null | 2023-05-01T20:51:50 | 2018-10-02T12:34:04 | HTML | UTF-8 | Python | false | false | 2,155 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib.request
import lxml.html
import csv
url = 'https://movie.douban.com/top250?start={}&filter='
# 得到当前Url的数据,返回类型为string
def getSource(url):
header = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
}
re... | [
"871437338@qq.com"
] | 871437338@qq.com |
6314341c47af973fbafa71b98b6a1e0add874c4e | 1625edfe28b4b0979fd32b4a3c5e55249a993fd5 | /baekjoon9996.py | b916bd74061aa9b0b4371a44afce755157f406d1 | [] | no_license | beOk91/baekjoon2 | b8bf504c506c6278899d4107ecfe51974ef13f5e | 39569f8effb8e32405a7d74d98bdabcab783ec56 | refs/heads/master | 2023-05-11T20:11:19.015113 | 2020-09-14T23:58:49 | 2020-09-14T23:58:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | n=int(input())
pattern=input().strip().split("*")
for _ in range(n):
text=input().strip()
print("DA" if text.index(pattern[0])<text.index(pattern[1]) else "NE") | [
"be_ok91@naver.com"
] | be_ok91@naver.com |
662b4cbedb8253d593dc611960818f152b7a1d55 | d78dfc5089717fc242bbd7097f507d811abb4260 | /USA/script.icechannel.extn.common/plugins/liveresolvers/kingofplayerscom_lrv.py | 4de6efd8dce31783d522389a9397402c3a1d5726 | [] | no_license | tustxk/AddOnRepo | 995b980a9ec737e2c25bed423fc83f710c697e40 | 6b86a06cb37e6e10b4119584dd7311ebc2318e54 | refs/heads/master | 2022-10-08T21:34:34.632346 | 2016-10-28T09:48:01 | 2016-10-28T09:48:01 | 70,684,775 | 1 | 1 | null | 2022-10-01T16:27:13 | 2016-10-12T09:31:16 | Python | UTF-8 | Python | false | false | 1,760 | py | '''
Ice Channel
'''
from entertainment.plugnplay.interfaces import LiveResolver
from entertainment.plugnplay import Plugin
from entertainment import common
class kingofplayercom(LiveResolver):
implements = [LiveResolver]
name = 'kingofplayer.com'
def ResolveLive(self, content, url):
... | [
"ke.xiao@netxeon.com"
] | ke.xiao@netxeon.com |
9e68fb8d64881f8571975e3a2f5f99c37158d357 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_53/247.py | 266388f5f966aaf62ae3d3e229214be70a147baa | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | def snapper(n, k):
return (k+1) & ((1<<n) - 1) == 0
def main():
labels = ["OFF", "ON"]
try:
cases = xrange(1, int(raw_input())+1)
for case in cases:
n, k = map(int, raw_input().split())
print "Case #%d: %s" % (case, labels[snapper(n, k)])
except ValueError:
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
9218a02e256da0f5f46dbfa773a0d6eccd56e154 | 0521afa39b2c9b64977da622779c906970af865b | /script/latent_factor_model.py | 7c5b4ec47ab25332ccedb53548d30c37e12042cc | [] | no_license | DamonHao/rec_sys | f48234f1689fb8f353a80a301647fa40bda9086d | e9272676d3794136f908eb9521a2944eefd9b38c | refs/heads/master | 2021-01-13T10:56:38.309864 | 2016-10-30T03:16:56 | 2016-10-30T03:16:56 | 72,264,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,438 | py | # -*- coding: utf-8 -*-
import random
import heapq
import math
class LatentFactorModel(object):
def __init__(self, filePath):
self._filePath = filePath
self._splitData(5, 1, 0)
def precisionAndRecall(self, N):
hit = 0
precision_all = 0
recall_all = 0
train = self._train
test = self._test
for us... | [
"haolinknight@gmail.com"
] | haolinknight@gmail.com |
faa20f2c671bf2819106d451219245da38e4ce8b | fe33bdb20436a379a17d56b83816d7064cb75d90 | /src/rocon_concert/concert_conductor/src/concert_conductor/transitions.py | f32eb0dbebdae0d4994c354a4df9ab4426789719 | [] | no_license | uml-robotics/catkin_tester | 764744614782acaff46f66f25dbd1650d0fcd5e8 | dfc8bb2026c06d0f97696a726a6773ff8b99496e | refs/heads/master | 2022-10-31T11:48:27.207535 | 2017-11-27T18:09:38 | 2017-11-27T18:09:38 | 111,495,779 | 0 | 1 | null | 2022-10-19T14:49:44 | 2017-11-21T03:45:59 | C | UTF-8 | Python | false | false | 4,511 | py | #!/usr/bin/env python
#
# License: BSD
# https://raw.github.com/robotics-in-concert/rocon_concert/license/LICENSE
#
"""
.. module:: transitions
This module does transition handling for the concert client state machine.
"""
##############################################################################
# Imports
####... | [
"james.perl12@gmail.com"
] | james.perl12@gmail.com |
90a4237ca61b7f9c9261dcd9d368c2d88f4d51a1 | 2ab1aea0a5c9556b3ebc4aab3d436779e153ec03 | /repro_lap_reg/covar_results.py | a7653e5b937e9839d43d12252725bbcad6c52f82 | [
"MIT"
] | permissive | idc9/repro_lap_reg | 8454b85df5d931dd3654dc4bdf50b3aacdaa185c | 1d3e846f8f2c3d04b4153d9ac56e0e9bd37198ca | refs/heads/main | 2023-05-31T21:57:35.379643 | 2021-07-06T19:14:46 | 2021-07-06T19:14:46 | 383,571,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | from fclsp.reshaping_utils import vec_hollow_sym
from repro_lap_reg.utils import merge_dicts
from repro_lap_reg.results_utils import compare_vecs, compare_adj_mats
def get_covar_results(est, true, zero_tol=0):
"""
Parameters
----------
est: an Estimator
A covariance estimator.
true: arr... | [
"idc9@cornell.edu"
] | idc9@cornell.edu |
eb7d4abc7fd412fb1fe580ea71764e891c5d8a3e | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/R2/benchmark/startQiskit81.py | f56bf0234644cb7f5c31a5b7d04b23a9581890e7 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,988 | py | # qubit number=2
# total number=9
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
29bbb97b476679fe6e940996af412393027ec248 | 36bdbbf1be53ba5f09b9a2b1dd15e91f8f6b0da1 | /restaurants/migrations/0026_auto_20181123_2205.py | 9c1f8e9c7b83d80b4adf2a46dac2d6330574bfcf | [] | no_license | phufoxy/fotourNew | 801ab2518424118020dc6e5f31a7ba90a654e56a | 6048c24f5256c8c5a0d18dc7b38c106a7c92a29c | refs/heads/master | 2023-04-13T01:34:22.510717 | 2018-12-26T03:46:09 | 2018-12-26T03:46:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | # Generated by Django 2.1 on 2018-11-23 15:05
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('restaurants', '0025_auto_20181123_2155'),
]
operations = [
migrations.AlterField(
model_name='comment_restaurant',... | [
"vanphudhsp2015@gmail.com"
] | vanphudhsp2015@gmail.com |
6efa9c6232634b06fe3bf53c306b0b495efe8926 | 93c30152f4afa5c8feefa401e796529545e52ed2 | /Device/urls.py | c4af24562b1f856fcd9a76d87dfe4cc60ee38eac | [] | no_license | FellowCode/SmartHome | a32fa813a14b5b88d3f100736d062f0424208e1a | 58055d23c566f4f0030189c8157a7de1660cd991 | refs/heads/master | 2020-05-04T07:12:35.831914 | 2019-06-12T15:53:29 | 2019-06-12T15:53:29 | 179,022,683 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | from django.contrib import admin
from django.urls import path, include
from .views import *
urlpatterns = [
path('change/', change_termo),
path('settings/<id>/', settings),
path('stat/<id>/', statistic),
] | [
"31797522+FellowCode@users.noreply.github.com"
] | 31797522+FellowCode@users.noreply.github.com |
bd7736ed9e1654b7791ad680e574daee736bddc6 | 7c63130ae44e773a51fcd38c5dc3116f46daecd7 | /error/Predicted_Results/test_sample7_7recom_model1.py | 8a8c36851f91301d7ddcb8594c7239eacbeb0a5d | [] | no_license | GitHubdeWill/code_recom | a4e8e393592d210b0481f61a3cc89ea475c95153 | 954c334e4abb25aa96786c9efa8f8ca22bc286aa | refs/heads/master | 2020-04-12T15:14:02.395548 | 2018-12-20T12:07:31 | 2018-12-20T12:07:31 | 162,574,531 | 0 | 1 | null | 2019-12-02T14:28:38 | 2018-12-20T12:07:00 | Python | UTF-8 | Python | false | false | 1,179 | py | class Canvas:
def __init__(self, width, height):
self.width = width
self.height = height
self.data = [[' '] * width for i in range(height)]
def setpixel(self, row, col):
self.data[row][col] = '*'
def getpixel(self, row, col):
return self.data[row][col]
def disp... | [
"wtemp@cs.umass.edu"
] | wtemp@cs.umass.edu |
74ee475e802a1523ea256fe0e91b157437daa072 | 10d98fecb882d4c84595364f715f4e8b8309a66f | /pruning_identified_exemplars/save_checkpoint/imagenet_train_eval.py | 6e55cfcb1026e17d743d3876706537783e2cf68a | [
"LicenseRef-scancode-proprietary-license",
"CC-BY-4.0",
"Apache-2.0"
] | permissive | afcarl/google-research | 51c7b70d176c0d70a5ee31ea1d87590f3d6c6f42 | 320a49f768cea27200044c0d12f394aa6c795feb | refs/heads/master | 2021-12-02T18:36:03.760434 | 2021-09-30T20:59:01 | 2021-09-30T21:07:02 | 156,725,548 | 1 | 0 | Apache-2.0 | 2018-11-08T15:13:53 | 2018-11-08T15:13:52 | null | UTF-8 | Python | false | false | 7,235 | py | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
9d191ebc88daf5624bd0ef8db05ca5582c623a17 | 3cdd7019f3acbf7b7a7e879444454703fcc73d62 | /solutions/57.insert-interval.py | 5d2417be706aee6d99ed4e78e3e33eba5144c8ed | [] | no_license | quixoteji/Leetcode | 1dc2e52e53a7b58d9bae15ce2d5c4142cbd365af | 00bf9a8164008aa17507b1c87ce72a3374bcb7b9 | refs/heads/master | 2021-07-15T07:59:21.294297 | 2020-05-13T03:08:47 | 2020-05-13T03:08:47 | 138,812,553 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | #
# @lc app=leetcode id=57 lang=python3
#
# [57] Insert Interval
#
# @lc code=start
class Solution:
def insert(self, intervals: List[List[int]], newInterval: List[int]) -> List[List[int]]:
return self.sol1(intervals, newInterval)
# Solution 1
def sol1(self, intervals, newInterval) :
ans = ... | [
"jxj405@case.edu"
] | jxj405@case.edu |
638c780ac1d2224bab250dbad8d30263e3c8425f | 159c3669bfe0525b0608bb658971cf4a7d82c7c5 | /query_learn/models.py | ab0f74ef981aa922e6f460db759d0b96ddd4ec01 | [] | no_license | jatinkatyal13/Django_Boiler_Plate | eb163486dc0307c8c0a5e4cbcdfee53826a3640c | 550f50f33be396e3c82082cc722ec897dadf04a8 | refs/heads/master | 2020-03-11T03:49:39.089700 | 2018-04-28T10:50:31 | 2018-04-28T10:50:31 | 129,759,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | from django.db import models
# Create your models here.
class Blog(models.Model):
name = models.CharField(max_length = 100)
website = models.URLField()
def __str__ (self):
return self.name
class Author(models.Model):
name = models.CharField(max_length = 200)
score = models.IntegerField(d... | [
"jatin.katyal13@gmail.com"
] | jatin.katyal13@gmail.com |
f566ce02ce3a9f62a9487b3ae38419afe38437c6 | 40699a136c4f4500833e21e0d7863a1ba624a5cd | /pde/tools/tests/test_parameters.py | 761a0ce0f072ff26b20329f71a0ec5e47ec257c4 | [
"MIT"
] | permissive | binder-oilgains/py-pde | 0e0226678b2598b50aa72762d9a70bb8e9536e43 | d76977095f1e915c63230e6895391f063d0778d8 | refs/heads/main | 2023-02-23T09:09:05.543386 | 2021-02-02T00:55:40 | 2021-02-02T00:55:40 | 334,454,351 | 0 | 0 | MIT | 2021-01-30T16:09:14 | 2021-01-30T16:09:13 | null | UTF-8 | Python | false | false | 5,307 | py | """
.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>
"""
import itertools
import logging
import pickle
import numpy as np
import pytest
from pde.tools.parameters import (
DeprecatedParameter,
HideParameter,
Parameter,
Parameterized,
get_all_parameters,
sphinx_display_parameters,
)
def... | [
"david.zwicker@ds.mpg.de"
] | david.zwicker@ds.mpg.de |
4f0e1f57ce50c3a051c432c5570ea57775a38300 | 4589a9ea76e458793ad78059839b81d365f433de | /athena_automation/athenataf/tests/group_management/group_management/non_default_value_check/NonDefaultValueCheck.py | b7af3ed0749dbbab1b9fdca59e171016b0940a66 | [] | no_license | cash2one/reautomation_handoff | 5e2c4c432d8f658d1b57211782744bd0b56c52f6 | 7ef83572d659db35036189eb394f99de1369db5a | refs/heads/master | 2020-05-22T17:56:33.214080 | 2015-07-13T07:51:18 | 2015-07-13T07:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,970 | py | import logging
logger = logging.getLogger('athenataf')
import time
from athenataf.lib.functionality.test.AthenaGUITestCase import AthenaGUITestCase
class NonDefaultValueCheck(AthenaGUITestCase):
'''
Test class for NonDefaultValueCheck.
'''
def _create_network(self , network_page):
time.sleep(10)
network_page.d... | [
"raju_set@testmile.com"
] | raju_set@testmile.com |
c05a4d2c8f71e43c742416226d3a37a8bec52e4e | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /HvkPdhijquecKASdF_4.py | 28fe72dc5e2ebc80b433f466d3102b76d2b8443e | [] | 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 | 589 | py | """
Create a function that takes a dictionary of student names and returns a list
of student names in **alphabetical order**.
### Examples
get_student_names({
"Student 1" : "Steve",
"Student 2" : "Becky",
"Student 3" : "John"
}) ➞ ["Becky", "John", "Steve"]
### Notes
* Don't forget to... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
698c729f923f3786348bd575ba07df82bc2097ed | cd57ad36685cc188ea42219bd220905e23e61f4c | /tests/logic/test_time.py | b2789a57f2b7b17fc9152dbc40382c556402ac8a | [
"BSD-3-Clause"
] | permissive | gitCommitWiL/ChatterBot | fa404848c7eb8f8ffb07c80c7d3ec47aeb2fe177 | 4f2275ec8a6e3546c4251db9e9938f7b3fd29e68 | refs/heads/master | 2021-04-22T14:52:18.175648 | 2020-03-26T11:22:16 | 2020-03-26T11:22:16 | 249,854,439 | 2 | 0 | BSD-3-Clause | 2020-03-25T01:02:46 | 2020-03-25T01:02:46 | null | UTF-8 | Python | false | false | 815 | py | from tests.base_case import ChatBotTestCase
from chatterbot.logic import TimeLogicAdapter
from chatterbot.conversation import Statement
class TimeAdapterTests(ChatBotTestCase):
def setUp(self):
super().setUp()
self.adapter = TimeLogicAdapter(self.chatbot)
def test_positive_input(self):
... | [
"gunthercx@gmail.com"
] | gunthercx@gmail.com |
20ef6a2b50cafbfbe8d5fc7d867265690b62d4c0 | 535503dc18c38b92f8520289da5b4fa42b0a722a | /code/exp_control/sequencer/sequences/Ramsey2_D52_D32.py | f1fc50821392952cb3b5aa8a7897c1b7850731bf | [] | no_license | jamesbate/phd_code | fbbbf7657c428a0a1f18768edca1dfce56801cc1 | 7e71d7f041835497fb421dd741c644ab5c8e3805 | refs/heads/master | 2023-05-07T10:31:22.168217 | 2021-05-26T15:00:40 | 2021-05-26T15:00:40 | 371,073,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,555 | py | # General S/D experiment
<VARIABLES>
# initializing the ion to the s state with 854 laser
MeasPoints=self.set_variable("float","MeasPoints",50,1,2e5)
n_loops=self.set_variable("float","n_loops",1,1,500000)
p729_pulse=self.set_variable("bool","p729_pulse",0)
pulse729_length=self.set_variable("float","pulse729_length",... | [
"james.bate@oriel.ox.ac.uk"
] | james.bate@oriel.ox.ac.uk |
e37e107190dff0ae34e8723deb1d746d87aba1fb | 2181795d5c380fef6d929f28fb4c90c0b1ffdc50 | /PythonScript/twitter_streaming.py | c6658c25cdde056fd59a770e2c3519d64af1bda2 | [] | no_license | pvhuu/Social-Network-Analysis | fa2c69460b7f811b16d4edfcdd99359825ca046e | c54d25eaa5838ea1e118cf8000a3a0bedf3b1ccd | refs/heads/master | 2020-04-24T04:55:24.381193 | 2019-02-25T12:31:57 | 2019-02-25T12:31:57 | 171,719,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,614 | py | import sys
import string
import time
from tweepy import Stream
from tweepy.streaming import StreamListener
from twitter_client import get_twitter_auth
class CustomListener(StreamListener):
""" Custom StreamListener from streaming Twitter data """
def __init__(self,fname):
safe_fname = format_filename(... | [
"="
] | = |
e6ea1c5b7867d5bcc40adbeab05230c3eb764d24 | b9963ffb80aad7e057bc375edb85ac7ed5a837d0 | /knowit2016/knowit19.py | 24d450541ccf6ab2c23a57b0b5a410272753a1e4 | [
"MIT"
] | permissive | matslindh/codingchallenges | a2db9f4579e9f35189f5cdf74590863cf84bdf95 | a846e522f7a31e988c470cda87955ee3ef20a274 | refs/heads/main | 2022-12-23T15:56:19.776354 | 2022-12-15T21:03:37 | 2022-12-15T21:03:37 | 76,491,177 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,065 | py | import string
out = open("input/knowit19_output.pgm", "w")
#out_bin = open("input/knowit19_output.bin", "wb")
s = ''.join(open("input/knowit19").readlines()).replace("\n", '')
for i in range(0, len(s), 2):
pass
#out_bin.write(chr(int(s[i:i + 2])).encode("ascii"))
height = 21
width = int(len(s) / (height * 2)... | [
"mats@lindh.no"
] | mats@lindh.no |
51d60aa46fddbf0f3fe82bc84c9e6e73eba242fd | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_1/_pkg0_0_0_1_1/_mod0_0_0_1_1_4.py | 837b2352d702ad8b1907a0715fb60cbf0eaa700d | [
"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 | 128 | py | name0_0_0_1_1_4_0 = None
name0_0_0_1_1_4_1 = None
name0_0_0_1_1_4_2 = None
name0_0_0_1_1_4_3 = None
name0_0_0_1_1_4_4 = None | [
"mikhail.golubev@jetbrains.com"
] | mikhail.golubev@jetbrains.com |
4bffa371b0f85e0309c820ac059e41d57de17199 | d094ba0c8a9b1217fbf014aa79a283a49aabe88c | /env/lib/python3.6/site-packages/celery/tests/backends/test_couchbase.py | 3dc6aadd0b7a2f0ce6914768e70f511615cc8346 | [
"Apache-2.0"
] | permissive | Raniac/NEURO-LEARN | d9274e0baadd97bb02da54bdfcf6ca091fc1c703 | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | refs/heads/master | 2022-12-25T23:46:54.922237 | 2020-09-06T03:15:14 | 2020-09-06T03:15:14 | 182,013,100 | 9 | 2 | Apache-2.0 | 2022-12-09T21:01:00 | 2019-04-18T03:57:00 | CSS | UTF-8 | Python | false | false | 4,782 | py | from __future__ import absolute_import
from celery.backends import couchbase as module
from celery.backends.couchbase import CouchBaseBackend
from celery.exceptions import ImproperlyConfigured
from celery import backends
from celery.tests.case import (
AppCase, MagicMock, Mock, SkipTest, patch, sentinel,
)
try:
... | [
"leibingye@outlook.com"
] | leibingye@outlook.com |
3264b1c0d30de6484403a37d07b39896f9a20180 | ee4768fe781f5099e4fee5a5d6d1b53146d21f80 | /src/pyutil/zeroconf.py | 8cd6428b09322cc329a3a760cb0492c81d261946 | [
"LicenseRef-scancode-public-domain",
"Unlicense",
"CC0-1.0",
"BSD-3-Clause"
] | permissive | nuin/ampify | e55eff2953ae25907df52a909ecb7be7e468c9ae | dd3ed2eece37652e604f223658c028e01e6bdfa3 | refs/heads/master | 2021-01-15T23:50:50.748938 | 2011-01-29T04:36:41 | 2011-01-29T04:36:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,373 | py | # Public Domain (-) 2010-2011 The Ampify Authors.
# See the Ampify UNLICENSE file for details.
"""
================
ZeroConf Support
================
This module provides support functions to register and query ZeroConf records.
The ``register`` function returns either a ``1`` or a ``0`` to indicate a
successful or ... | [
"tav@espians.com"
] | tav@espians.com |
4e3bed99e1ea699ca9f133ea0ba788cc2e25882b | 2451ca9bc9ae43bd3b070fa362aa13646ff06f13 | /03_Standard_Library/unittest[Unit_testing_framework]/_note_unittest.py | 6c98c6865211e88f416708deb5099c1269bdaaf9 | [] | no_license | MacHu-GWU/six-demon-bag | 5cd1cf5d56d4c42cff013ab80dd4fc838add7195 | 10d772d6b876086f64db39f6ddbc07e08e35a122 | refs/heads/master | 2020-05-17T17:26:15.961833 | 2015-09-15T21:50:20 | 2015-09-15T21:50:20 | 26,669,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,495 | py | ##################################
#encoding=utf8 #
#version =py27, py33 #
#author =sanhe #
#date =2014-11-15 #
# #
# (\ (\ #
# ( -.-)o I am a Rabbit! #
# o_(")(") #
# ... | [
"husanhe@gmail.com"
] | husanhe@gmail.com |
5d72e5ef4d774b54baceacc28da305d03a59b235 | c499492bec3337319e9b186645d19edd019ca221 | /raSAT-0.2/starexec_run_default_0.2.py | b0f9baa22c4b3e4c3d145af736cd0a106ef30f92 | [] | no_license | tungvx/smt_test_tools | 6f60e186f86120d35c9d1479333de179a9296d96 | f466b0faa4a90363c905f9acba3f7f5fbf11427e | refs/heads/master | 2020-12-06T13:12:29.198696 | 2017-12-25T06:03:57 | 2017-12-25T06:03:57 | 67,702,683 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,022 | py | #!/usr/bin/env python
# Run: python smt.py filename.smt2 timeout
# timeout is in seconds
import os
import subprocess
import sys
import stat
import time
current_path = os.path.dirname(os.path.realpath(__file__))
def remove_tmp (filename, version):
try:
os.remove(filename + '.' + version + '.tmp')
except OSEr... | [
"toilatung90@gmail.com"
] | toilatung90@gmail.com |
69be6a4feb0fe66a029a87ff314c6f77dd9fb8ff | 39de3097fb024c67a00c8d0e57c937d91f8b2cc9 | /Graphs/Good_graphs.py | b9f3b6c78d943e723f30cb7b4fcce9287c4d89f0 | [] | no_license | srajsonu/InterviewBit-Solution-Python | 4f41da54c18b47db19c3c0ad0e5efa165bfd0cd0 | 6099a7b02ad0d71e08f936b7ac35fe035738c26f | refs/heads/master | 2023-03-07T05:49:15.597928 | 2021-02-24T18:20:07 | 2021-02-24T18:20:07 | 249,359,666 | 0 | 2 | null | 2020-10-06T10:54:07 | 2020-03-23T07:09:53 | Python | UTF-8 | Python | false | false | 849 | py | class DSU:
def __init__(self,m):
self.parent=[i for i in range(m+1)]
self.height=[0 for _ in range(m+1)]
self.ans=m
def find_root(self,A):
if self.parent[A]==A:
return A
return self.find_root(self.parent[A])
def Union(self,A,B):
C=self.find_root(... | [
"srajsonu02@gmail.com"
] | srajsonu02@gmail.com |
8befe5a68bd5acbf2c15b8f57452161d188e1aa6 | b8bd4fa3b9d7a39c13f4d897e71f933ceb542cbd | /examples/beta_bernoulli_tf.py | ddf9eaef35b18932c469810138e071ac69c30a41 | [
"Apache-2.0"
] | permissive | chagge/edward | 0b481b8de08ddc1e4be6ea1d868e5c8c0da0bb06 | 1e5563eba7bad5d6338615dff9dfcceef2cd436f | refs/heads/master | 2021-01-17T02:15:00.119122 | 2016-05-12T01:27:47 | 2016-05-12T07:04:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 975 | py | #!/usr/bin/env python
"""
A simple example from Stan. The model is written in TensorFlow.
Probability model
Prior: Beta
Likelihood: Bernoulli
Variational model
Likelihood: Mean-field Beta
"""
import edward as ed
import tensorflow as tf
from edward.stats import bernoulli, beta
from edward.variationals impo... | [
"dustinviettran@gmail.com"
] | dustinviettran@gmail.com |
ca2d3bcceb6ab5411980dd400babb51d77d2eb51 | 6249a81e81c3b3b37e6d03cd7112e9a981cec8e2 | /python/jobovy/apogee/setup.py | ee1fa5ae558eecf49e17c2bed29820ca33297774 | [
"BSD-3-Clause"
] | permissive | dnidever/apogee | e883c7d352abb1b99c938f7de38313b5cd4d2164 | 83ad7496a0b4193df9e2c01b06dc36cb879ea6c1 | refs/heads/master | 2021-07-06T22:23:13.839478 | 2020-08-08T22:42:42 | 2020-08-08T22:42:42 | 149,676,202 | 0 | 0 | BSD-3-Clause | 2018-09-20T22:07:43 | 2018-09-20T22:07:43 | null | UTF-8 | Python | false | false | 5,445 | py | import os
from setuptools import setup #, Extension
import sys
import shutil
import subprocess
import tempfile
long_description = "Tools for APOGEE data analysis; see `here <https://github.com/jobovy/apogee>`__ for further documentation"
# Install FERRE when specifying --install-ferre; needs a FORTRAN compiler, e.g.,... | [
"holtz@nmsu.edu"
] | holtz@nmsu.edu |
6af1cb0e42170d903f01a9c7990a8f4ff4dc38c0 | 4e503761d091f3f284763d63c89861f6c26c1015 | /语法基础/jinzhi_base.py | ec273df6619f3f2be6874ed53805093eb88e0fd0 | [] | no_license | L-ingqin12/Algorithm_LanQiaobei | b2e08d755cacaaa0ff96108ca3f13d648b3b6fd7 | 9dd7b05eaf1cfc02eca52ee4f97466de961e592c | refs/heads/main | 2023-04-03T14:08:04.389344 | 2021-04-19T03:14:29 | 2021-04-19T03:14:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 940 | py | import math
import cmath
import sys
import string
import heapq
import bisect
from queue import Queue,PriorityQueue,LifoQueue
from collections import Counter,deque
from itertools import permutations,combinations
from functools import cmp_to_key
# str=input()
# print(int(str,16))
# a=int(str,16)
# print("{:0b}-666".form... | [
"54010254+lixiang007666@users.noreply.github.com"
] | 54010254+lixiang007666@users.noreply.github.com |
c1b1dc0c1b17afb0bda43f4b02f94622623041a8 | 9398d8433fdb29ee630a6ee43a07bc36a2adbd88 | /ryu/__init__.py | e7cc55df725de6f5401b96f6663236b53a10e5d9 | [] | no_license | bopopescu/OpenStack_Liberty_Control | ca5a21d0c32c55dc8c517f5c7c9938ce575a4888 | 0f6ec1b4d38c47776fdf8935266bcaef2464af4c | refs/heads/master | 2022-12-03T10:41:53.210667 | 2016-03-29T06:25:58 | 2016-03-29T06:25:58 | 282,089,815 | 0 | 0 | null | 2020-07-24T01:04:15 | 2020-07-24T01:04:14 | null | UTF-8 | Python | false | false | 683 | py | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# 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... | [
"tony.pig@gmail.com"
] | tony.pig@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.