blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
261571f9662a3bd63dca5c378535276152e2ac4d | 89f45ed1a59972d5bf85d25e95392fad6d11aff7 | /pytorch-section-5/tensor-operation-23.py | a22c6d157ca3e6b78d57c02f4ad13081eadf4982 | [] | no_license | TranVanKung/pytorch-tutorial | 37c0744b551ee779790d3b77370ccbda908bdc4f | 1164039f721e3a9e8a18d198034b096eed5c0674 | refs/heads/master | 2022-10-11T07:40:12.685110 | 2020-06-08T14:04:59 | 2020-06-08T14:04:59 | 270,690,347 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | import torch
import numpy as np
a = torch.tensor([1, 2, 3])
b = torch.tensor([4, 5, 6])
print(a.dot(b))
x = torch.tensor([[0, 2, 4], [1, 3, 5]])
y = torch.tensor([[6, 7], [8, 9], [10, 11]])
# torch.mm() is equal to @
print(torch.mm(x, y))
print(x @ y)
z = torch.tensor([3.0, 4.0])
print(z.norm())
print(z.numel())
z... | [
"trancongtr1071997@gmail.com"
] | trancongtr1071997@gmail.com |
48bcd1eda9bf5d5c7cffb68b6c5ce2ff420166b9 | a958b5eca7ef63695e317fe87144b85b475306cf | /hypha/apply/funds/migrations/0001_initial.py | b148de45cbacf495758597f423ab37507c2cd2be | [
"BSD-3-Clause"
] | permissive | ResetNetwork/apply-app | 2fe0a4aed05e7609cca9cd8e0202d13bbc0b272f | a5f998b8a6c3059f31373f5c4aa700d1a563d844 | refs/heads/main | 2022-02-16T22:39:13.099637 | 2021-02-16T07:49:31 | 2022-02-01T13:26:32 | 201,969,914 | 1 | 4 | BSD-3-Clause | 2021-02-16T08:03:32 | 2019-08-12T16:38:58 | Python | UTF-8 | Python | false | false | 802 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-22 09:28
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('images', '0001_initial'),
('wag... | [
"todd.dembrey@torchbox.com"
] | todd.dembrey@torchbox.com |
5a49a7807db037576e29c13022642d628554451c | 9e7dd27d9ac0d64875308944cc9bf75bdd9e2124 | /wechat/wechat_robot.py | 5839900b3a3bbca411a0e36703ae577bf62fd5bb | [] | no_license | ZzqZhao/python_wechat | 47525793f0e8e033f664b028935d322fd13e78ae | d232466610bde689fa60e2f2d5ce3601064ca3e8 | refs/heads/master | 2020-08-01T04:25:05.453038 | 2018-05-28T09:53:40 | 2018-05-28T09:53:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,650 | py | import itchat
import requests
#向图灵机器人申请,然后会获得一个 API KEY
key ="f4f4cafaac86464082acebd30b153b94"
def get_response(msg):
# 构造了要发送给服务器的接口
#使用图灵机器人提供的接口
apiUrl = 'http://www.tuling123.com/openapi/api'
# 一个发动的api的数据
data={
'key' :key,
'info':msg,
'userid':'wechat-robot'
}
... | [
"guoyiguang@edspay.com"
] | guoyiguang@edspay.com |
5b2a7af74dfaf167d4914c6819e2a33558744ccc | d21ae657a31f4e3624d50a1b9e6b61539adb1691 | /Trees/LowestCommonAncestor.py | 9debf7c55d7210baedb0f020a9b62df5319cad33 | [] | no_license | gayathri1997/Python-Programming | 995e67ac9815847836bef849b1115a6914d04fbd | 47f15a84546f570641a1e1883885b43c6e4b5e0e | refs/heads/master | 2021-06-28T04:03:14.497556 | 2021-05-25T06:15:24 | 2021-05-25T06:15:24 | 230,625,257 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 857 | py | class Node:
def __init__(self,key):
self.key = key
self.left = None
self.right = None
def lowestCommonAncestor(root, n1, n2):
if root is None:
return None
if root.key == n1 or root.key == n2:
return root
left = lowestC... | [
"noreply@github.com"
] | noreply@github.com |
765445292ddfe159d0244642a1d27df1c7a50b15 | 611af7819917370a92aa0f47442a6ee2c43ed6bc | /tasks/train.py | b85e41c5357b093a889f82634e4e389106340723 | [] | no_license | youth95/graduate | 1bf1dcb4411254b30bef836bb4f1e420fee1b5ec | 145eda5151403ae2e297ddc400b2a19a0f68be3d | refs/heads/master | 2023-02-02T18:59:49.059959 | 2020-12-25T02:43:03 | 2020-12-25T02:43:03 | 320,174,646 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,133 | py | import warnings
import os, sys
os.chdir(os.path.dirname(__file__))
sys.path.append("..")
warnings.filterwarnings('ignore')
from models.Seq2Seq_att import DataSet_seq, Seq2Seq
from tqdm import tqdm
import pandas as pd
import torch.nn as nn
from sklearn.model_selection import train_test_split
from torch.utils.data impor... | [
"zhaoqian.ipp@bytedance.com"
] | zhaoqian.ipp@bytedance.com |
efa5434aa981e6fb2daf537de67d716bc25096d5 | dd279c66abade0faa192e2917358576d6b757d5e | /jobborse/models.py | edfab5b8a63e159fc28637d0f6eaefe80234be5c | [] | no_license | havanhuy1997/jobborse | 7f058142940fc01c524a320e6d0ed039ad25d995 | bd832adc00313b50e4302156de8090d6f2378006 | refs/heads/master | 2022-10-14T11:43:18.427109 | 2020-06-06T11:21:05 | 2020-06-06T11:21:05 | 269,958,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | from django.db import models
class Task(models.Model):
input_file = models.FileField()
progress = models.FloatField(default=0, blank=True)
def progress_percent(self):
return str(round(self.progress * 100)) + '%' | [
"havanhuy1997@gmail.com"
] | havanhuy1997@gmail.com |
8ddf4392d11c57dd223b27ee91a3bed6a6cb8c9d | 9b9a02657812ea0cb47db0ae411196f0e81c5152 | /repoData/martomo-SublimeTextXdebug/allPythonContent.py | a04f1db77c7881088fcabb0a1dd1689cd6185c72 | [] | no_license | aCoffeeYin/pyreco | cb42db94a3a5fc134356c9a2a738a063d0898572 | 0ac6653219c2701c13c508c5c4fc9bc3437eea06 | refs/heads/master | 2020-12-14T14:10:05.763693 | 2016-06-27T05:15:15 | 2016-06-27T05:15:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208,867 | py | __FILENAME__ = main
import sublime
import sublime_plugin
import os
import sys
import threading
# Load modules
try:
from .xdebug import *
except:
from xdebug import *
# Set Python libraries from system installation
python_path = config.get_value(S.KEY_PYTHON_PATH)
if python_path:
python_p... | [
"dyangUCI@github.com"
] | dyangUCI@github.com |
e4084a95f186aabaf61a3b4f1269fc67660244b7 | 93a3eb87ab5f56c9409faa24018bc911542f93a7 | /main.py | 30956f4e300bbe0a811ecc52a040e798efc1a963 | [] | no_license | benderzt/tictactoe | bf71b5f5944747db8e7550047a5c1f5709820835 | 4fc595fb8512f617dec340b063ed616835ed4128 | refs/heads/master | 2021-01-20T12:33:53.033075 | 2017-05-05T13:29:46 | 2017-05-05T13:29:46 | 90,376,175 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 34 | py | adadasd
asdas
asdasd
asdasd
asdsd
| [
"roma.tevs@gmail.com"
] | roma.tevs@gmail.com |
a97081bc012b0407fdb102a6b88996a3c0194b11 | 1c7b9b79dd3dc7fec25e75ef70a3c6513eabd74d | /morph/controls/amazon/ctrl.py | 78e4462aa4bc4cc98ade3f130d4cf4f141b6594c | [] | no_license | xuhe1992/morph | bdfb25530399b0c273b988a7453281c915b3dcb6 | d8a82f90daaae46ef882a190c29ecbe2a7aa6494 | refs/heads/master | 2021-01-18T15:39:51.919838 | 2017-10-10T10:12:40 | 2017-10-10T10:12:40 | 86,669,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 77 | py | # -*- coding: utf-8 -*-
"""
@author: xuhe
@date: 17/5/16
@description:
"""
| [
"xuhe789@163.com"
] | xuhe789@163.com |
860d5f34980bfa79ef2fbd3ba56b0d23ef8ee41e | 48e54beaa6a3d4dca88f3391cf1b7ed44cfb355a | /src/python/tests/test_crf_theano.py | 0d910735ee89477e625b7fc0301d7a82a3408a39 | [
"MIT"
] | permissive | dptam/neural_wfst | c5bd565a9fbde576afd4f244a691a6db5a4501ca | c0cd3e340a45c13fbe47310753432d496c20eb83 | refs/heads/master | 2020-03-28T21:32:10.924493 | 2018-10-01T17:46:45 | 2018-10-01T17:46:45 | 149,163,877 | 0 | 0 | MIT | 2018-09-17T17:39:25 | 2018-09-17T17:39:24 | null | UTF-8 | Python | false | false | 3,397 | py | """
Tests for the Theano CRF classifier implementation.
"""
__authors__ = "David Warde-Farley"
__copyright__ = "Copyright 2013, Universite de Montreal"
__credits__ = ["David Warde-Farley"]
__license__ = "3-clause BSD"
__email__ = "wardefar@iro"
__maintainer__ = "David Warde-Farley"
import numpy as np
import theano
fr... | [
"pushpendre@gmail.com"
] | pushpendre@gmail.com |
80ce61a7d4adb75a865075dabf522a08ff7a377b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03786/s371328153.py | c0a9c347530052541335ff74e3633b64f918869c | [] | 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 | 174 | py | n=int(input())
a=list(map(int,input().split()))
a.sort()
count1=0
count2=0
for i in range(n-1):
count1+=a[i]
if 2*count1<a[i+1]:
count2=i+1
print(n-count2)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6c6a48f3986047a387a97d668a570c3d1a412af3 | 9523ce426577bb38dc1260e4095e735fb817e1fd | /utils/misc/logging.py | 46115961bf5f48aca4f03f1f25534ec7dbc9b002 | [] | no_license | Amantais/Kyrgyz-Stand-Up-Bot | 58147557aaf2e7ea714489d3614b0fa09eb943f8 | 028d36493b79f6b02e12d672688ef94e526946dc | refs/heads/master | 2023-03-28T03:28:42.001424 | 2021-03-25T17:27:49 | 2021-03-25T17:27:49 | 349,154,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | import logging
logging.basicConfig(format=u'%(filename)s [LINE:%(lineno)d] #%(levelname)-8s [%(asctime)s] %(message)s',
level=logging.INFO,
) | [
"your@example.com"
] | your@example.com |
8fa035886e53971b7f61c708155f49291eb894b0 | 2b653aefbaa3accdaa31e0cdb3f12eca3b05b4b2 | /users_service/index.py | 1f56399681557fa34a27db35925f0e691a5d31fa | [] | no_license | dgaponcic/distributed_app | 9030743276e5f8d74e30d230dac49e3a947275af | e41d4c229fab1ccc395372387fbaa6c2724c6a52 | refs/heads/master | 2022-12-11T15:47:20.261035 | 2020-09-01T12:18:56 | 2020-09-01T12:18:56 | 288,687,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | from flask import Flask, request
import requests
import json
from os import environ
from dotenv import load_dotenv
load_dotenv()
app = Flask(__name__)
@app.route("/")
def home():
print('hello', flush=True)
data = json.loads(requests.get(environ.get('DATABASE')).content)["data"]
print(request.headers['X-Forward... | [
"gaponcic.d@gmail.com"
] | gaponcic.d@gmail.com |
028e6f36ccdeb42f06ed300fabcaabb359de1580 | 394574e488475bcc70ac68c16a760876b1f3e378 | /script/able_to_run_mult_sessions_organizing_data.py | d113458b6cba8e91ea9fadb26d262355b272923c | [] | no_license | DANSERLab/OpenButterfly | 4766037fc043af86056636e178b54f966accb8f5 | 9e65eb881c9ccb3c82e6110047b54be1b747444d | refs/heads/master | 2020-05-24T18:39:55.681158 | 2019-06-06T20:26:56 | 2019-06-06T20:26:56 | 187,410,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,800 | py | # Script to search differnt data files, grab relevant time frames, then consolidate them into one excel work book where each sheet is a differnt trial.
# requires this file to be at the top of the directory with all the other data folders
# the directory path should be of "DATA/Session#'s/Userfiles"
import os
import... | [
"macbook@MacBooks-MacBook-Pro-2.local"
] | macbook@MacBooks-MacBook-Pro-2.local |
d9e4848a0179fdd7bc93c029226ed24b09f7e898 | c6d22cf128819af1d48d02972bb9296a1687b9bb | /venv/Lib/site-packages/traitsui/editors/time_editor.py | 95807375757c299d670c057392cc5ed9fd49bfc8 | [] | no_license | GenomePhD/Bio1-HIV | 92808a1e7e6339da6d07190ba3e1a2071f3e8428 | b5059e7f121e4abb6888893f91f95dd79aed9ca4 | refs/heads/master | 2022-10-28T21:55:42.998205 | 2018-04-16T18:52:32 | 2018-04-16T18:52:32 | 129,792,081 | 0 | 1 | null | 2022-10-05T18:36:22 | 2018-04-16T19:03:26 | Python | UTF-8 | Python | false | false | 1,448 | py | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions d... | [
"stevetmat@users.noreply.github.com"
] | stevetmat@users.noreply.github.com |
c02db02524446e2a95ed0cd9397cad4639e1d4d0 | f6c7084f91434566a9aa1b821d2739edede036f8 | /AddFileInZipFile/venv/Scripts/easy_install-script.py | e91f9b665295271ec880111d88a24f435583b524 | [] | no_license | GANESH0080/Python-WorkPlace | 87fc3776e693d254661c476bfe977c696d087276 | 43196086bee26cbeae25fb7bbacb8dbbde85d648 | refs/heads/master | 2020-09-20T03:45:13.824696 | 2019-11-27T07:27:17 | 2019-11-27T07:27:17 | 224,369,263 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | #!D:\PythonWorkPlace\AddFileInZipFile\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe... | [
"ganusalunkhe@gmail.com"
] | ganusalunkhe@gmail.com |
ef18919f52ae1e6c63947ca228d50230069745a8 | 7d3ad4b6619513a3c7916e383c0ebeadf9964379 | /Week2/binomial.py | 03bd000542c4d8ca54664d42481ec1a99304242c | [] | no_license | missaut1309/INT3305_1 | a2eee1a2632f66c9714eec8b7ad48d3d0c9eb7b5 | 8fa29f442ef2d6b9835d2edcc0e705a30efdcc67 | refs/heads/master | 2022-12-27T07:03:19.935724 | 2020-10-07T03:49:40 | 2020-10-07T03:49:40 | 296,996,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,098 | py | import math
def factorial(n):
if n == 0:
return 1
return n * factorial(n - 1)
def prob(n,p,N):
result = (factorial(N)/(factorial(n) * factorial(N - n)))* (p ** n) * ((1 - p) ** (N - n))
return float(result)
def inforMeasure(n,p,N):
result = -math.log2(prob(n,p,N))
return float(result)
def sumProb(N,p):
"""... | [
"57839645+missaut1309@users.noreply.github.com"
] | 57839645+missaut1309@users.noreply.github.com |
109f0944c927bdcaccf00f744ed963d4cadf786c | 48e207e43cec2c7f55359006b60eba2e143b32f4 | /gridWebsite/shop/urls.py | 5e60488fbcc1005f26f14fefb0e53959f2dac06d | [] | no_license | romodulo/grid_project | c2085f749b0835a3403dc48ebf3172067d72dd2b | 86b571d235e8be4d00fb93e84f96b2eed88d209d | refs/heads/master | 2023-07-30T06:42:50.029876 | 2020-08-02T15:04:20 | 2020-08-02T15:04:20 | 279,479,862 | 0 | 0 | null | 2021-09-22T19:26:27 | 2020-07-14T04:18:51 | HTML | UTF-8 | Python | false | false | 193 | py | from django.urls import path
from . import views
urlpatterns = [
path('shop/', views.shop_home ),
path('shop/home', views.shop_home ),
path('shop/home/v1', views.shop_home_v1 ),
] | [
"omelzg@gmail.com"
] | omelzg@gmail.com |
cee84dca4eda877f6bc4a196cab54a28c54d5754 | da9514a4669a764781b6440e6731a6d842033c15 | /project/Algorithm/t1/18+19+20+21图/21.7.py | 170bb599ba39ffa912eaaffb6a71d41142df4093 | [] | no_license | HanYouyang/GameSoftware | b05a4ec3f14ee1cccf9ab8ddf4f724be95a1d6f5 | 467526ead27d1314786abfd71275803a473cb37a | refs/heads/master | 2022-12-24T00:44:36.592070 | 2020-10-02T03:35:37 | 2020-10-02T03:35:37 | 214,787,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | def updateMatrix2(matrix):
def DP(i, j, m, n, dp):
if i > 0: dp[i][j] = min(dp[i][j], dp[i - 1][j] + 1)
if j > 0: dp[i][j] = min(dp[i][j], dp[i][j - 1] + 1)
if i < m - 1: dp[i][j] = min(dp[i][j], dp[i + 1][j] + 1)
if j < n - 1: dp[i][j] = min(dp[i][j], dp[i][j + 1] + 1)
if n... | [
"hanyouyang93@gmail.com"
] | hanyouyang93@gmail.com |
edbab399786c050d2859b7c408a0fef8155dbd69 | cd8f642dd814ddc750080476f8cb20c6a03d0068 | /calculo_salario.py | f81a631930cd099df0c1f6bedcee3d909a871edf | [] | no_license | ValenTorresFR/ValenTorresFR | 72c2c712d4f585077a24ca6580195078ce2874cb | df0dc5522df6d941b12cac5ec3ee53ca7d842a52 | refs/heads/main | 2023-07-14T15:36:26.512559 | 2021-08-28T15:20:25 | 2021-08-28T15:20:25 | 389,159,054 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,970 | py | horas = input('Cuantas horas trabaja su empleado: ') # Este codigo fue realizado por Valentín Torres Porcel el día 28/8/2021 (Ventiocho de Agosto de 2021)
tarifa = input('Cuál es la tarifa por hora?: ')
calificacion = float(input('Introduzca calificación: '))... | [
"noreply@github.com"
] | noreply@github.com |
8cff9b1d4c1909959d729269cf817583caf4643b | 964f2882117ff656d7a2757c233c6dd88226d975 | /services/web/server/setup.py | 7a71b500f01dcf016b26ad41ba3046e07d2ab0fb | [
"MIT"
] | permissive | ignapas/osparc-simcore | a002dd47d7689af9c1c650eea33e31add2b182c1 | cb62e56b194265a907f260f3071c55a65f569823 | refs/heads/master | 2023-01-22T08:55:32.580775 | 2022-12-09T15:57:36 | 2022-12-09T15:57:36 | 170,852,656 | 0 | 0 | MIT | 2023-01-09T05:03:04 | 2019-02-15T11:12:34 | Python | UTF-8 | Python | false | false | 1,852 | py | import re
import sys
from pathlib import Path
from setuptools import find_packages, setup
def read_reqs(reqs_path: Path) -> set[str]:
return {
r
for r in re.findall(
r"(^[^#\n-][\w\[,\]]+[-~>=<.\w]*)",
reqs_path.read_text(),
re.MULTILINE,
)
if i... | [
"noreply@github.com"
] | noreply@github.com |
8cf10414e53c673c33df956e52a774aee093cfe1 | 1ff2bc8b798fe2cfb2efcd6b580781b06820a4b7 | /recognite_system/new_data.py | 366989cfe841a26d212a0cb050a9c2bafdb4f3f9 | [] | no_license | ArChanDDD/MathDetector | 2f62e21f68071c75ba9e99f8b631cde9d5e52a13 | 5af1100fe8660a07ebecc2260ca7a476f741bdf3 | refs/heads/main | 2023-03-02T18:25:29.454677 | 2021-02-14T22:13:35 | 2021-02-14T22:13:35 | 306,097,770 | 0 | 1 | null | 2020-11-19T16:53:14 | 2020-10-21T17:22:40 | Python | UTF-8 | Python | false | false | 917 | py | import simple_partirnation as sip
import cv2
import os
import sys
import numpy as np
dataset_way = 'dataset2/dataset/'
way_to_save = 'dataset2/dataset3/'
def print_percentage(p):
perc = round(p*100, 4)
sys.stdout.write("\r" + str(perc) + "% done ")
sys.stdout.flush()
def get_names():
n... | [
"noreply@github.com"
] | noreply@github.com |
73162be55740c4287965c2972710cc97fbb83338 | c5850de71af7bdf4039b9dd365a61c2281738784 | /main.py | ada4ee6615308fa433a400773f448d94ae470a1e | [] | no_license | lukasvlc3k/comics-text-recognition | 2288f36169ca7d1d94c05d7c6e448f17302b4fc3 | 877d418e2b7b5a23c37b3fd62288dd586d3990a8 | refs/heads/main | 2023-04-22T01:14:43.342580 | 2021-05-09T21:27:07 | 2021-05-09T21:27:07 | 365,849,450 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,562 | py | import os.path
import time
import config
from Exceptions import FileReadException
from comics_processing import process_comic_page
from Output.ConsoleLogger import ConsoleLogger, Verbosity
import argparse
if __name__ == "__main__":
# ===== arguments parsing =====
# usage: main.py source_img mask_img text_resul... | [
"vlcek@net-inout.cz"
] | vlcek@net-inout.cz |
1402c081f00172e80f2353111a759de4dac49b5b | 836ac3cb6624db2cf6119397cb710c1ade60eb67 | /LoL/competition/migrations/0050_auto_20150518_1641.py | 5eaf3f0716134b86c9d09f392e8ad9daaa80fbae | [] | no_license | Muahahas/DjangoLoL | db29a89bbc5131c432553473ef8ff6ce715d99d1 | 28d3d93037d1f43749dbddb82540a377d1607cbe | refs/heads/master | 2016-09-05T20:55:41.247099 | 2015-06-08T16:14:42 | 2015-06-08T16:14:42 | 35,156,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('competition', '0049_auto_20150518_1636'),
]
operations = [
migrations.AddField(
model_name='equi... | [
"eloibuisan@gmail.com"
] | eloibuisan@gmail.com |
43d89efaa0f00214356ab39141561ac8ca759ff8 | 669a33ff0fb9403d04b4b11abaf1b45f02da9a6c | /build/turtlebot_apps/turtlebot_actions/cmake/turtlebot_actions-genmsg-context.py | 86aeb6bce73037703d100650b6403d9b8e7566d1 | [] | no_license | haitm11/turtlebot | c7614c916585c30ddf86a568025c8b8badb8ecea | cfdaf47da039032c34d92a5e231cf57dbde8c27c | refs/heads/master | 2021-01-19T16:04:10.784095 | 2017-04-14T07:41:52 | 2017-04-14T07:41:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,779 | py | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/hl/turtlebot/devel/share/turtlebot_actions/msg/FindFiducialAction.msg;/home/hl/turtlebot/devel/share/turtlebot_actions/msg/FindFiducialActionGoal.msg;/home/hl/turtlebot/devel/share/turtlebot_actions/msg/FindFiducialActionResult.msg;/home/hl/turt... | [
"tiennh1995@gmail.com"
] | tiennh1995@gmail.com |
7b2aa5263093ac5804b940b1cf647561c249ba97 | b5a9d42f7ea5e26cd82b3be2b26c324d5da79ba1 | /tensorflow/contrib/gan/python/features/python/virtual_batchnorm_test.py | bcc40e44e7b42a786f3841f48321f3e9d044918d | [
"Apache-2.0"
] | permissive | uve/tensorflow | e48cb29f39ed24ee27e81afd1687960682e1fbef | e08079463bf43e5963acc41da1f57e95603f8080 | refs/heads/master | 2020-11-29T11:30:40.391232 | 2020-01-11T13:43:10 | 2020-01-11T13:43:10 | 230,088,347 | 0 | 0 | Apache-2.0 | 2019-12-25T10:49:15 | 2019-12-25T10:49:14 | null | UTF-8 | Python | false | false | 11,346 | py | # Copyright 2017 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... | [
"v-grniki@microsoft.com"
] | v-grniki@microsoft.com |
68357d1fed30e9fd6465e7187291dea3730cc99a | 1d0224686c45691997619c3d4a235b0aa3f34748 | /setup.py | 19d06ea259f4bb19001af30d45d3a7e655ea3dcf | [
"MIT"
] | permissive | fpatz/mando | cc805c726914b413eeb4a47fd333765f2d1a45ce | f17c90201d52a20777809a4a22d6300c8453e5e8 | refs/heads/master | 2020-12-25T16:02:51.398120 | 2015-01-31T21:41:29 | 2015-01-31T21:41:29 | 30,113,138 | 0 | 0 | null | 2015-01-31T13:38:14 | 2015-01-31T13:38:13 | Python | UTF-8 | Python | false | false | 1,787 | py | import os
from setuptools import setup
try:
import mando
except ImportError as e:
version = e.version
deps = ['argparse']
else:
version = mando.__version__
deps = []
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
versio... | [
"michelelacchia@gmail.com"
] | michelelacchia@gmail.com |
fc2f7119c6783b45dc967ccef3b6f33a65d2703c | 2e1fc4ac9a96e846031c91595f62a74fa2f3da6a | /lab2/generateusers.py | dc45a1f52b769d948a9b16c0ccffcf5d582135f5 | [] | no_license | EmoLing/Highload_Python | 4cc18a413a3e940f10cf1101a9fa0184c5cdf328 | c1b471df578d09f3458bb6236fa4d89e9957131f | refs/heads/master | 2023-06-10T03:36:35.826905 | 2021-06-25T12:37:44 | 2021-06-25T12:37:44 | 340,280,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | import random
from faker import Faker
worker = ("Проектировщик", "Архитектор", "Инженер")
division = ("Цифровое моделировние недвижимости",
"Расчетный отдел", "Отдел экспертизы")
random.seed(version = 2)
_file = "work.csv"
if __name__ == '__main__':
f = open(_file, 'w')
fake = Faker('ru_RU')
f... | [
"64325964+EmoLing@users.noreply.github.com"
] | 64325964+EmoLing@users.noreply.github.com |
5304e10f37ba2ce8b19aba3947560874a9d1e44d | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/303/usersdata/294/83407/submittedfiles/testes.py | 3af7ad75e3ebbf1db0fb72a2d6435d6b0eab5d25 | [] | 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 | 151 | py | # -*- coding: utf-8 -*-
#COMECE AQUI ABAIXO
n= int(input('Digite o número: '))
i= 1
while n>0:
f= n*i
print(f)
i += 1
continue | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
09ba9416cc4e1b849edb5f002159bdb6df5d8f73 | 3251bb9fd5f6da4e821fe75aa3323f52a2416667 | /mentalfloss/pipelines.py | 7366311abaad8b5bcdbde69c25b3041a85ff22af | [] | no_license | repodevs/simple-scrapy | 75fbebdb97d1820df2c9cd7652716978514ba665 | 6cde52bb2e00257bc98817f8dc90b243cbad6b30 | refs/heads/master | 2021-01-10T05:09:20.985122 | 2015-12-27T20:59:30 | 2015-12-27T20:59:30 | 48,659,856 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import pymongo
from scrapy.conf import settings
from scrapy.exceptions import DropItem
import logging
logger = logging.getLog... | [
"repopamor@gmail.com"
] | repopamor@gmail.com |
0d669d2399fcf8e70e16dd7f0b8d162ac849a762 | e85990ea3d9b61a54d28bde2a138623bbb09125d | /venv/lib/python3.9/site-packages/xdoctest/doctest_example.py | 0703636d92a19f673405452424c89cd0da7dce97 | [
"MIT"
] | permissive | mgomez-olmedo/KL-pgmpy | 99fc8a365710ac7555fd8ef8fd06c5394c816e2d | 5c3b34fd7a42524f4105a149f3720040b21ef9c3 | refs/heads/main | 2023-06-21T12:41:15.132223 | 2021-07-25T11:57:19 | 2021-07-25T11:57:19 | 389,312,688 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 45,616 | py | # -*- coding: utf-8 -*-
"""
This module defines the main class that holds a DocTest example
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import __future__
from collections import OrderedDict
import traceback
import six
import warnings
import math
import sys
import re
from xdoct... | [
"mgomez@MacBook-Air-de-Manuel.local"
] | mgomez@MacBook-Air-de-Manuel.local |
8a9d6581192a3cbf432d2c392fffe36378c450a7 | 2a5bd1af57a918fcf9115e7d205a7ea71876391b | /tictactoe/ttt3.py | 95e26811a5f586e2006ffdb9eb300d304e77d4e0 | [
"MIT"
] | permissive | scienceacademy/python_examples | 9d5feb92a77d19e35d49ef8a013310cf9128b821 | 84b384ca6fbe6b4c5f65e75ae8f2019a725af658 | refs/heads/main | 2023-08-20T11:43:49.295743 | 2021-10-27T15:59:12 | 2021-10-27T15:59:12 | 411,524,021 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,718 | py | import math
board = [[0, 0, 0],
[0, 0, 0],
[0, 0, 0]]
players = [" ", "X", "O"]
def print_board():
print(" 0 1 2")
for n, row in enumerate(board):
print(f"{n} ", end="")
for col in row:
print(f"{players[col]} ", end="")
print()
def is_winner(line):
if... | [
"chris@scribe.net"
] | chris@scribe.net |
abe2ca09c5b1f39f0947e58efe9f753b2fde5300 | 1e1822ad1d0b53b187c4f5beca8a7ff0b01ce3b1 | /Connections/Shear/Endplate/model.py | 5a81f1aa1acb2e191e4ff8b48487b10e638029b4 | [] | no_license | Riyaz619/Osdag | f7099d40f4f3daf1db6963ad09237e95b8cfdd45 | 0e55425a99d219e8f93ab795547fdf99730f8e0f | refs/heads/master | 2020-12-30T20:04:43.712762 | 2016-08-22T08:19:26 | 2016-08-22T08:19:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,670 | py | '''
Created on 09-Sep-2014
@author: deepa
'''
import sys
from PyQt4 import QtGui,QtCore
from PyQt4.QtSql import *
import logging
import os
# logging.basicConfig(filename = 'finlog.html',filemode = 'w',level = logging.DEBUG)
logger = None
def set_databaseconnection():
'''
Setting connection with SQLite
''... | [
"jayantpatil289@gmail.com"
] | jayantpatil289@gmail.com |
a009c62508151f9227379ef43eb0a68b3ba1e50e | 687275835aaac2ef4ffb5d214ba9a47077f5e4f4 | /astro_organizer/tour.py | 70ca2ce5859163e4b68b61233a3bb57d35d17890 | [] | no_license | lorenzoriano/astro-organizer | f58eb42ee9e8bee56d8f94fa710441bd281db6b7 | fb7edd55ef58a856fc9ea24dffb0a1e9a41656dd | refs/heads/master | 2020-05-31T05:52:52.779662 | 2012-10-22T05:15:53 | 2012-10-22T05:15:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,098 | py | import catalogs
import body
import tables
import logging
import itertools
class _TourTable(tables.IsDescription):
name = tables.StringCol(20)
note = tables.StringCol(512)
class Tour(object):
"""Defines a tour as a list of objects to view and notes. It automatically
manages the entries in the database... | [
"lorenzo.riano@berkeley.edu"
] | lorenzo.riano@berkeley.edu |
b73d923d54ad59c55f5141e446128a54d2c2c6c9 | 949e7a997d604446353fa40da6b277232c005025 | /app/tools/ranking.py | c07103cd5a10375e983d96d0d8f124324358a472 | [] | no_license | 24-solar-terms/AnonComment | 42ecc655df2e4e9ba3f0e91c430ded18449a1688 | 14d8c39f0d6de426fb20bb32388b85df9b232710 | refs/heads/master | 2022-12-09T14:12:35.979273 | 2020-04-24T09:47:13 | 2020-04-24T09:47:13 | 249,400,789 | 3 | 1 | null | 2022-12-08T04:02:30 | 2020-03-23T10:31:53 | Python | UTF-8 | Python | false | false | 1,778 | py | from functools import reduce
import numpy as np
# 预设定的top30参评最少人数
m = 30
# 全局平均分
c = 0
def f(t):
"""
计算每位老师的加权平均分
:param t: 列表类型,每位老师的信息列表
:return: 列表类型,计算完加权平均分后的老师信息列表
"""
# 该老师评分人数
v = float(t[4])
# 该老师的算术平均分
r = float(t[5])
wr = v / (v + m) * r + m / (v + m) * c
# 加权平均... | [
"980327727@qq.com"
] | 980327727@qq.com |
69d82c44cf8ce92a7f58b53a3132944a218369c8 | 83f7f438b233103d5eea8c83ef7b2f0ed7f3bfba | /walkscript.py~ | 5dad732b7bc2e107c637f3b3591c2ca15bed6435 | [] | no_license | danielasun/lip-sim | 1eea05d5d794af661603676b383c5f629371480d | cf8857afe98da1d0fcb753107b9794727fb01f2d | refs/heads/master | 2021-01-02T22:39:26.085718 | 2015-09-23T18:43:08 | 2015-09-23T18:43:08 | 42,345,026 | 0 | 0 | null | 2015-09-12T05:03:56 | 2015-09-12T04:48:51 | null | UTF-8 | Python | false | false | 933 | #!/usr/bin/env python
# Test to see how well the walk algorithm for this robot works.
import engine
kineState = (0, 0, 0, 0) # x, vx, y, vy
footPlacement = (0, 0)
# choose style of walking.
walkstyle = "sw"
s_x = []
s_y = []
if walkstyle == "b": # basic walking
s_x = [0, 0, .3, .3, .3, .3, .3, 0]
s_y = ... | [
"sundaniel3@gmail.com"
] | sundaniel3@gmail.com | |
d8f5af45e61b458f61c23915ac604e58ae74ec01 | 1a57fb76de18f03049ba49399d4429fae6f2b280 | /센서총괄/rasp_sensor-master/game/newsprite.py | c482b1cd9d8e4c9c2cbd0cb87195ceace90868b6 | [] | no_license | Jung-Eric/rasmon3 | bc11677adafb9ab108f80fb5f632fded73facdba | 9fc52a2cba852cfb86e0f0402964b088ddf6f255 | refs/heads/master | 2020-11-26T02:30:30.399886 | 2019-12-18T23:23:17 | 2019-12-18T23:23:17 | 228,937,722 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | import pygame
class newsprite(object):
def __init__(self, filename):
self.img = pygame.image.load(filename).convert_alpha()
def seperate(self, rectangle):
new_img = img.subsurface((0,0,50,50))
return new_img
| [
"chungyong77@naver.com"
] | chungyong77@naver.com |
464a494490527941f138aa873ecc74048dc16d64 | 98e2962ce05d247849030633e6bb25aa097ab490 | /books/models.py | dc7298bad7d8fefc53b37ad6d2f14c31ecc0e4c2 | [] | no_license | kakyoin/robot | fd9f29f788d778c49e075e8a56dbb9ad32adc3cf | 99a5852209680970ad47bc09dac697bb1c9b122b | refs/heads/master | 2021-01-21T19:28:11.690276 | 2015-02-10T09:26:16 | 2015-02-10T09:26:16 | 29,329,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | from django.db import models
class Publisher(models.Model):
name = models.CharField(max_length=30)
address = models.CharField(max_length=50)
city = models.CharField(max_length=60)
state_province = models.CharField(max_length=30)
country = models.CharField(max_length=50)
website = models.URLFie... | [
"jo999dio@sina.com"
] | jo999dio@sina.com |
49c3fde5a27824044cffd531b985ad679fce2340 | 993ee26d7ebb1db6591ab26b614939d8bba5abac | /client.py | a27d02ea569f4dd04ae6ad481815c2e1b2debb92 | [] | no_license | danielulloa/u_py4pentesters | b182e7e21aa72ad7b17292581a3bd1ea9511ed56 | 802472a834497392f9f37de1fbf64312d20801d6 | refs/heads/master | 2023-02-12T20:27:36.889010 | 2021-01-07T14:26:45 | 2021-01-07T14:26:45 | 327,635,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | import socket
host = socket.gethostname()
port = 6789
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock_.connect((host,port))
msg = sock_.recv(1024)
sock_.close()
print(msg.decode("ascii")) | [
"danielulloa1994@gmail.com"
] | danielulloa1994@gmail.com |
b9f07dccd6e3fb6e5a6a7332aa88808ea237dad9 | c792b076cdf8c943c344d90b21817dd501c165ab | /boj/그래프/2252_줄세우기.py | cacd0a05917fbe5ef91f3edac525e6ba96dd809d | [] | no_license | Jdoublee/CodingTestPractice | d68afa38e64de67aa53ab8c6569e07e7b310a83d | 83eb2b84f63d55808a5e9b014e023b72bf4a4e9e | refs/heads/master | 2023-06-02T16:48:52.913402 | 2021-06-16T13:34:40 | 2021-06-16T13:34:40 | 290,072,409 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | from collections import deque
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
graph = [[] for _ in range(n+1)]
indegree = [0] * (n+1)
for _ in range(m):
a, b = map(int, input().split())
graph[a].append(b)
indegree[b] += 1
q = deque()
for i in range(1,n+1):
if indegree[i] == 0:
q.append(... | [
"hyewon3429@gmail.com"
] | hyewon3429@gmail.com |
3492118728fbc025eeeac90626281925568df458 | f0f289ed2d7376e4531ff2faa9e23beedc2fbb8c | /arsenal/nlp/wordnet/synset.py | a0a53caae30615e1e61af34ca64166d605e94e4c | [] | no_license | twocngdagz/arsenal | 5aa9908043972307e3d1c2fbeaf50242242f87f0 | 7a96a6937b94a33b8a14a71d5b0936e16e3d9f64 | refs/heads/master | 2021-01-19T03:51:37.110291 | 2013-10-15T03:55:12 | 2013-10-15T03:55:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,358 | py | # Natural Language Toolkit: Wordnet Interface: Wordnet Module
#
# Copyright (C) 2001-2008 University of Pennsylvania
# Author: Oliver Steele <steele@osteele.com>
# David Ormiston Smith <daosmith@csse.unimelb.edu.au>>
# Steven Bird <sb@csse.unimelb.edu.au>
# URL: <http://nltk.sf.net>
# For license inform... | [
"none@none"
] | none@none |
674d81f2daefa528467e546fa5335ec020bb5122 | 45df3588d0ec1a2bd7dbe4af104a49aa5775d034 | /group1/views.py | d7b5a1ba099f4990b20b952e33d7b7b171e8734b | [] | no_license | wittawin/DB_Project | 043db7eb3d70ef32c9c97d51a242775b3e115f73 | 1cc1fe84c75906d670f7bb4dd130093bc15035b8 | refs/heads/master | 2020-04-06T03:43:21.516583 | 2015-07-13T05:47:09 | 2015-07-13T05:47:09 | 37,700,817 | 0 | 1 | null | 2015-06-19T04:06:07 | 2015-06-19T04:06:06 | JavaScript | UTF-8 | Python | false | false | 11,091 | py | from django.shortcuts import render, render_to_response, RequestContext
from django.http import HttpResponse
from django.core.mail import send_mail
from django.core.mail.message import EmailMessage
# Create your views here.
def index(request):
template = 'group1/index.html'
context = RequestContext(request)
... | [
"o_k_t@hotmail.com"
] | o_k_t@hotmail.com |
7dfd11bf959589906ee92c570cbe0eb6868b116a | e0967732d4d6b96cbd0fd418c0980124691d0912 | /account/migrations/0007_auto_20200419_1855.py | d15dfc4bcdc6a515936255a7bff42b997c89b422 | [] | no_license | H3N9/Project-Webpro | dd9ec93fa7d7dc80749fd37384eddb41ad813869 | 60c21536aad399f442255a43a7aac56531cc3286 | refs/heads/master | 2021-08-07T01:19:47.086079 | 2021-05-05T11:24:42 | 2021-05-05T11:24:42 | 249,631,160 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 561 | py | # Generated by Django 3.0.5 on 2020-04-19 18:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cloth', '0003_auto_20200419_1849'),
('account', '0006_auto_20200417_1551'),
]
operations = [
migrat... | [
"42642459+H3N9@users.noreply.github.com"
] | 42642459+H3N9@users.noreply.github.com |
910288eeb6880457b4a0f6b9f81ba7c4775ce359 | ffc1cc3bb7b68335b115122fdc7924fc4e31d528 | /ss.py | af41d32a4c76e4a825cdfa5fd5b810976d27b19d | [] | no_license | Rihanashariff/swathi24 | dba1dd3c3d2ff583ae431b432e0ef262bfeb3ac3 | 2b0d21f2febdd2a563e8f0affeebd5ca7a5821b8 | refs/heads/master | 2020-07-02T05:28:32.199982 | 2019-06-29T08:22:10 | 2019-06-29T08:22:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 97 | py | #swa1
s=int(input())
if s>0:
print("Postive")
elif s<0:
print("Negative")
else:
print("Zero")
| [
"noreply@github.com"
] | noreply@github.com |
73de3fc18f75f59d751c38177a9f36b800e737bc | f301d50384715214fad16e383753b984ae4dbe7c | /5_Async/3_Coroutines.py | 082efaeb6ef3d2da7598277b310357466917c95a | [] | no_license | TanvirDuggal/Parallel-Programming | 33b3c6090fd281468092ff56efade6790466c82f | 411ecf9bfbaa051b6d702e090266cb28934c33a1 | refs/heads/master | 2020-07-01T20:36:49.120431 | 2019-08-08T16:08:18 | 2019-08-08T16:08:18 | 201,293,342 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,747 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 16 15:19:18 2019
@author: Tanvir.Duggal
"""
import asyncio
import time
from random import randint
import nest_asyncio
nest_asyncio.apply()
@asyncio.coroutine
def Start_State():
print("Start state called")
input_value = randint(0,1)
time.sl... | [
"duggaltanvir@gmail.com"
] | duggaltanvir@gmail.com |
58ab2927e7ba7632a04ec86cface9171654e1d35 | 930eb322eb7c533c457b4aac26185e24cffd5e64 | /4-Redis-Streams/producer1.py | ed2cf604e69f777060b87eeee2f1b3949d97c18c | [] | no_license | Werokajo/redis-python | 58e0c8f675b217855c477eafe9b7bcbceb4cfecd | d6dee2a796fa7adb0778e6b9568c7d07e8e081ac | refs/heads/master | 2023-06-01T04:54:48.477833 | 2022-05-18T17:38:10 | 2022-05-18T17:38:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | import redis
r = redis.Redis('192.168.99.100')
r.flushdb()
key = 'numbers'
n = 1
while n <= 100:
data = {'n': n}
msg_id = r.xadd(key, data)
print('length: ', r.xlen(key))
print('Memory Usage: ', r.memory_usage(key))
print(f'Produced the number {n} as message id {msg_id}')
n += 1
| [
"diwakarsingh052@gmail.com"
] | diwakarsingh052@gmail.com |
d77dd85520bcf6ef572b758c19ad1af28236d733 | accc31861a6fdfd60227ccdfdb554be512758aee | /dataset.py | 9a14f994b48333bbc434ced43f21d3dda9d711f8 | [] | no_license | phww/PointNet2 | 8b75f4c9dfbb34337a3ea16a9c33b35a3c1b0178 | 38d121a989b143768044b0d6362a8aa8f5f8e32d | refs/heads/master | 2023-06-15T19:40:57.994605 | 2021-07-18T11:47:30 | 2021-07-18T11:47:30 | 387,162,620 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,283 | py | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2021/7/16 下午7:00
# @Author : PH
# @Version:V 0.1
# @File : dataset.py
# @desc :
import os
import json
import numpy as np
import torch
from torch.utils.data import random_split
from torch.utils.data import DataLoader, Dataset
# label2idx = {'bathtub': 0,
# ... | [
"929575296@qq.com"
] | 929575296@qq.com |
4d47083b977a820c4110b195ea7ae60155c86727 | c26d27a54c88f19be6aacb3874d5c3831daf4ed2 | /src/two/3.py | 5f7879651639efb90090feecd2f0dea8cb8e9478 | [] | no_license | hejiawang/PythonCookbook | 78dda6b45231ff255d0619d20bf2498d736159d1 | e7e66222d6a058f187c5610239e2febed76c3eca | refs/heads/master | 2020-04-06T07:10:51.244889 | 2016-09-11T08:45:41 | 2016-09-11T08:45:41 | 63,997,222 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
2.3 利用Shell通配符做字符串匹配
Created on 2016年7月24日
@author: wang
'''
from fnmatch import fnmatch, fnmatchcase
print fnmatch('foo.txt', '*.txt')#fnmatch大小写区分规则同操作系统
print fnmatch('foo.txt', '?**.txt')
print fnmatch('Dat45.csv', 'Dat[0-9]*')
names = ['Dat1.csv', 'Da... | [
"952327407@qq.com"
] | 952327407@qq.com |
f9680c5bfc379f1f536dacce11a5b5ac8a8afc1b | 755639da12cfafcabe0ce6564cd9445c96f0fd25 | /main.py | c3a9d94ff84aa7aea45802a3bc4ca9740c3162bc | [] | no_license | AaronBlvde/Steganography | 6f5a3ecb7ccb4e777f33b8819e01e58370fb612c | 7e1fc056a35695ccc9821aea4559ef3a5877d2c7 | refs/heads/master | 2023-07-04T09:49:44.006926 | 2021-08-04T18:46:03 | 2021-08-04T18:46:03 | 392,790,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,924 | py | from stegano import exifHeader
import os.path
import time
def encrypting(input_img, output_img, crypto):
secret = exifHeader.hide(input_img, output_img, crypto)
print('Image encrypted')
def decoding(input_img):
result = exifHeader.reveal(input_img)
result = result.decode()
print('Decoding. Please... | [
"devilish.cartel@gmail.com"
] | devilish.cartel@gmail.com |
285641c5cddd7d44b0a75c91a8594d3662983800 | ea7ec072877392af5404627b45c034f4ca2d867c | /stories/models.py | 664fc33a1262f4791b37870a7687d067516f3f9b | [] | no_license | joesimoes/django_news | 77d36a8c36e693008c83d1157e6b9a8648876b2a | 25578e4815ff63342909fbb0c4f0e501c754db6f | refs/heads/master | 2021-01-20T04:32:24.796149 | 2013-07-23T15:14:07 | 2013-07-23T15:14:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | from urlparse import urlparse
from django.db import models
from django.contrib.auth.models import User
class Story(models.Model):
title = models.CharField(max_length=200)
url = models.URLField()
points = models.IntegerField(default=1)
moderator = models.ForeignKey(User, related_name='moderated_stories')
voters =... | [
"josephsimoes@new-host-2.home"
] | josephsimoes@new-host-2.home |
d25632912251f2ba76809c013cba68857ea833a2 | 4382c60f18aba351a2e7cdab7ce2793c2d27717c | /Algorithm 190902/addnumber.py | b32d1dbc234824bd231157352bf2adefaa53d744 | [] | no_license | vxda7/pycharm | e550b1db4cabe1a0fa03e140f33b028ef08bd4cb | ce29f682a923875b62a8c7c0102790eef11ab156 | refs/heads/master | 2020-07-03T11:27:27.807096 | 2019-11-15T08:50:32 | 2019-11-15T08:50:32 | 201,891,357 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 318 | py | t = int(input())
for tc in range(1, t+1):
N, M, L = map(int, input().split()) # N 수열길이 M 필요한 숫자 L 출력인덱스
res = list(map(int, input().split()))
for i in range(M):
idx, num = map(int, input().split())
res.insert(idx, num)
print("#{} {}".format(tc, res[L]))
| [
"vxda77@gmail.com"
] | vxda77@gmail.com |
b0835943da4eba46f3cdcf7532385ba1e46db41e | 2cf82ee6f2a32977a18e6a79f00af9262e5800cf | /data/users.py | 622add15549de0085832f9e6dc454b3f80398731 | [] | no_license | Anzhelika19262/job | 36ebfbe784103f327df0460908db721894b66265 | 05559190cb6d4643b3a9f9df8259dd82e03c9814 | refs/heads/master | 2022-07-13T22:20:50.079680 | 2020-05-12T10:15:27 | 2020-05-12T10:15:27 | 263,301,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,101 | py | import datetime
import sqlalchemy
from flask_login import UserMixin
from .db_session import SqlAlchemyBase
from sqlalchemy import orm
from werkzeug.security import generate_password_hash, check_password_hash
class User(SqlAlchemyBase, UserMixin):
__tablename__ = 'users'
id = sqlalchemy.Column(sqlalchemy.Inte... | [
"ZAnzelika@ya.ru"
] | ZAnzelika@ya.ru |
4e4e156a6bda06a1a3108d98a7b93b8156993ff9 | 728023e0d573575b5182729be5f6e78de58c404c | /Snake/GameTest.py | 327c96b552bab54cf05207250aae84ee9f8d94fd | [] | no_license | BrennanOrmes/Projects-Python | 05fc5192b4505d7e3a7ec65a006c568fa253df18 | e685aa28e0a222bd6f08ed49e9dcebf77cceb6db | refs/heads/master | 2020-06-28T06:11:25.588057 | 2016-11-22T18:57:05 | 2016-11-22T18:57:05 | 74,503,978 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | #-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Brennan
#
# Created: 22/09/2015
# Copyright: (c) Brennan 2015
# Licence: <your licence>
#-------------------------------------------------------------------------------
from Die ... | [
"brennan.ormes.16@aberdeen.ac.uk"
] | brennan.ormes.16@aberdeen.ac.uk |
2ad5e84e34150ef6166f742512c311ded9a15945 | 20522082eba5c3b5c86f8bf3e6ae91baa71719f6 | /corona_model_LSTM_v1.py | 61d2aaa00b00722223b2d94c604ddf898f5a58a8 | [] | no_license | ieeeWang/corona_model_R0_LSTM | 2ea50b6c31e9faf02e899f8c3025be815c6f88d0 | 0ecfcd55c7e0b1c550eb96aec38785b73d684841 | refs/heads/master | 2022-08-25T03:45:48.256084 | 2020-05-25T20:01:00 | 2020-05-25T20:01:00 | 266,865,965 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,490 | py | # -*- coding: utf-8 -*-
"""
Created on Thu May 21 11:22:24 2020
@author: lwang
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.keras import models,layers,losses,metrics,callbacks
print ('tf:', tf.__version__)
#%% plot cumulated data
d... | [
"noreply@github.com"
] | noreply@github.com |
6c7f104a0ec65e437b23452f07ef1b83d4dc5822 | c4e6cd12c305325a19faf808c8a0f83a3d8a5a4f | /part3_tests.py | 042ef6aa0b32e1cf12316af6ad3f8a2a663076ee | [] | no_license | zipper555/DiscreteEventSimulator | 85fab583325fd6582d20dad90abaf80272580865 | 6cff0229fe916e21129dd237b6c74f7521b1bba9 | refs/heads/master | 2022-10-31T05:21:23.592407 | 2020-06-15T12:57:28 | 2020-06-15T12:57:28 | 271,660,808 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | import unittest
from simulation import Simulation
class DESTestRNG(unittest.TestCase):
"""
This python unittest class checks the third part of the programming assignment for basic functionality.
"""
# create default simulation setting for testing the methods
sim = Simulation()
def test_syste... | [
"noreply@github.com"
] | noreply@github.com |
aaa0e81a25d692b980bb08fa97783afa78e3f43a | a5a7ca233f3ab09c67add5d697d25dea612a380b | /lab2.3.py | 93a64d197fedf469d8f7ac9740d6936cecb199dd | [] | no_license | AugustBrenner/Python-CGI-Scripts | b296e86acbc9ec95692edbb2ae311b99c3b846db | 3ab4bd999cc6d2d08680b5c2875c6db47904f943 | refs/heads/master | 2020-05-20T10:02:55.503173 | 2013-08-06T22:00:09 | 2013-08-06T22:00:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | #!/usr/local/bin/python3
# Name: August Brenner
# File name: lab2.3.py
# Date: July 3rd, 2013
# Modules for CGI handling
import lab2modules
print("Content-type: text/html\n")
lab2modules.HTML_START("Lab 2 Exercise 2.3")
print("<h2> Methods in Classes </h2>")
python_classes = [list, dict, tuple, str, int, float]
for ... | [
"AugustBrenner@server.fake"
] | AugustBrenner@server.fake |
61b17fa520ffda3fd48c609ace4d08134384cbca | 4f7d7640634e4a51a9dd121daad2af657d7d250a | /hivapp/hiv/tools/decorator.py | 99905ecc44f852bea0544309eb92fe306c2cb612 | [] | no_license | marksgy/centos | d06016bd6c3105a7de433c683a285e6142b32297 | 98cf6704599348986d6567cfb6b4845fd08b24e1 | refs/heads/master | 2021-08-09T15:52:49.981459 | 2017-11-12T09:17:15 | 2017-11-12T09:17:15 | 110,070,717 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 533 | py | from hiv.tools.exception import Unauthorized
from hiv.tools.verification import Verify_Rd3
from oflMsgForm.views import getFormId
def check_rd3_decorator(func):
def wapper(*args, **kwargs):
request = args[0]
rd3 = request.POST.get('access_token')
# 先检测jwt是否是有效请求
effection = Verify_... | [
"woshishegu6275"
] | woshishegu6275 |
744d9d1e4d6ea3d0eacfc2acbca5743b1b6df196 | 5a7abc4537039860c49e9a80219efa759aad1b6f | /tests/providers/aws/services/route53/route53domains_service_test.py | 75d5616d62658b4778bd6f36245dd74ea10459d7 | [
"Apache-2.0"
] | permissive | sec-js/prowler | d5a06c72f5d7e490bade1167966f83f7a5d7ed15 | f72be9a1e492ad593c9ac267d3ca07f626263ccd | refs/heads/master | 2023-08-31T22:48:33.983360 | 2022-12-22T16:02:28 | 2022-12-22T16:02:28 | 243,866,744 | 0 | 0 | Apache-2.0 | 2022-12-23T12:23:20 | 2020-02-28T22:37:02 | Python | UTF-8 | Python | false | false | 4,172 | py | from datetime import datetime
from unittest.mock import patch
import botocore
from boto3 import session
from prowler.providers.aws.lib.audit_info.audit_info import AWS_Audit_Info
from prowler.providers.aws.services.route53.route53_service import Route53Domains
# Mock Test Region
AWS_REGION = "us-east-1"
# Mocking A... | [
"noreply@github.com"
] | noreply@github.com |
75b89fdd96fa2eb6208750c4e7ab2b8b8bbd262c | edfdc0d3a2fdeed95ba7aa3d0e198eb9dafe4064 | /operator_api/auditor/serializers/wallet.py | eaf23012b2e241068d6fe15719acea220a4c5144 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | xiaobai900/nocust-hub | 880e72ba4e1d324ae36adea6c03c9761a7d91621 | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | refs/heads/master | 2023-05-28T08:18:17.402228 | 2020-11-01T19:48:17 | 2020-11-01T19:48:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,337 | py | from eth_utils import remove_0x_prefix, add_0x_prefix
from rest_framework import serializers
from ledger.models import Wallet, Token
from operator_api.models import ErrorCode
class WalletSerializer(serializers.Serializer):
address = serializers.CharField(max_length=42)
token = serializers.CharField(max_lengt... | [
"guillaume@felley.io"
] | guillaume@felley.io |
cbe3c67789ff2d693215526797f279e6a4bd675f | 17a89e1409d1aa826236c1b91ffabbeca1077354 | /2017/1_2.py | 4982445b7eca406759e4a17eb8c14a86ae73cd0b | [] | no_license | omegaphoenix/AoC | 5dfb090f736188c67901a80ed0530a5721b0badf | 74301b7bbc577594594356ea6e8e08a7a4c838f9 | refs/heads/master | 2021-03-27T12:41:14.048591 | 2020-12-08T07:48:39 | 2020-12-08T07:48:39 | 112,813,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,237 | py | INPUT="3674367652242621474168763928218321697812856559411236481728359862138483975662842414677931192831838359723596864468766515959157341323361671711215775246919184575771292834762472643851621115394689224144952314841942625929178893862188633473449782316328138938985367593224673415356386123389495265762586841543231615548724281... | [
"justinleong16@gmail.com"
] | justinleong16@gmail.com |
7243f7dbfb45cb7c1825bd8e61374484a0a5317f | 42b3be00779c417665b923f977ba01f94d78210e | /ad/env/bin/pilconvert.py | 48fa400fa30a939fa3f6fb098f300268ec3eb3c7 | [] | no_license | okwow123/ad | 19cb2b7afe2cfd1d986cab0ed26b13d224ef708f | 157cc50cfa2b09d8300cbadae519c64f66b1e285 | refs/heads/master | 2021-01-19T10:02:54.983187 | 2017-04-27T12:27:57 | 2017-04-27T12:27:57 | 87,819,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | #!/home/ilovejsp/project/ad/env/bin/python
#
# The Python Imaging Library.
# $Id$
#
# convert image files
#
# History:
# 0.1 96-04-20 fl Created
# 0.2 96-10-04 fl Use draft mode when converting images
# 0.3 96-12-30 fl Optimize output (PNG, JPEG)
# 0.4 97-01-18 fl Made optimize an option (PNG, J... | [
"okwow123@naver.com"
] | okwow123@naver.com |
2a6a633465a7ae5f580839238f09d0ba827ceb7c | f4aa554cb461f93ee76a431ce0898d93d72b40fd | /Semana 4/maximal_manhattan_distance/test_pytest_point.py | b4790ee656a0c8cf4a7342143cf76dcf58809582 | [
"MIT"
] | permissive | juandausa/CompetitiveProgrammingCoreSkills | 7235e98a05497b8ee511de50fac4f385d3f9fa04 | 1ef0d902b6c05afba4b44c34ade87c376187fd1d | refs/heads/master | 2021-03-27T22:17:09.875259 | 2020-03-27T13:55:39 | 2020-03-27T13:55:39 | 247,812,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | from point import Point
def test_create():
assert Point((0, 0)) is not None
def test_create_point_get_distance():
point = Point((10, 10))
assert point.maximal_manhattan_distance == 0
assert point.maximal_manhattan_distance_coordinate == (10, 10)
def test_create_point_update_distance()... | [
"juandausa@gmail.com"
] | juandausa@gmail.com |
2fe0a1fed20f354e70753cd1c332921ed03096ee | a2e838c3a88cda993f9759cb8f2ecd8121594eea | /Life.py | 6736dde0bff3148364a7c99cac12596302778f93 | [] | no_license | JiannanZhang/Life-Automata | a87fa3442f51ed32f756d537fbfab516baeea8fc | 3bf1c449d64542a776c290ad1044076657256ff7 | refs/heads/master | 2020-12-30T11:15:25.880961 | 2015-01-20T01:08:14 | 2015-01-20T01:08:14 | 27,062,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,677 | py | # game controller Life
class Life:
'''
creates the environment for cells
analyzes neighboorhoods for cells
'''
def __init__(self, rows, cols, type_cell):
'''
intializes the Life environment
'''
assert rows >= 0
assert cols >= 0
self.rows = rows
... | [
"jiannanzhang1992@gmail.com"
] | jiannanzhang1992@gmail.com |
4cbbdd29fce7808644cba278f87b92dcc23abb59 | 83e6d9a4a7aa5ced682c6d44e0853264cd7bab58 | /dixon_TIY6.1/dixon_TIY6.11.py | 61d1f358e5de460ff4b75d8a52cf95c9e3ea6d19 | [] | no_license | JaxonDimes/Python | ad3aa8e8f01fe71d9bfc47e4cc6774a9238143c3 | 0fa5dea05e726a3af4374b907178b44db98499ff | refs/heads/master | 2020-12-12T10:10:34.660981 | 2020-01-15T14:48:23 | 2020-01-15T14:48:23 | 234,101,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 919 | py | cities = {
'indianapolis' : {
'country': 'United States',
'population': ' 2,028,614',
'fact': 'The Children’s Museum of Indianapolis is the largest children’s museum in the world.'},
'Fort Wayne': {
'country': 'United States',
'population': '419,453',
'fact': 'For... | [
"dillonduff1@frontier.com"
] | dillonduff1@frontier.com |
1b2e69f14a7cde97097d7f53efae9c7858df6f68 | d060db4eed9de0e87b462b1694d30e1c0810394d | /CompScience/1a2011/ICS/SIR_graphics.py | 13cb8b010fd20df84a834a8d22d1cdcf91f779cd | [] | no_license | jrnhofman/MSc-Computational-Science | d6d5e9bc434c19d977544b0ef860057a95186db7 | 7f2ee6eccf91e0704d14265f47715a6ca2be392f | refs/heads/master | 2022-11-29T16:02:21.742533 | 2020-08-03T09:09:35 | 2020-08-03T09:09:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,873 | py | from igraph import *
import random
#Video options (standard disabled)
from video import MEncoderVideoEncoder
encoder = MEncoderVideoEncoder()
encoder.add("Sample epidemic spreading")
encoder.fps = 2
#Function for setting state and counting states
def count():
susc,inf,rec = 0,0,0
for k in range(0,length):
... | [
"jrn.hofman@gmail.com"
] | jrn.hofman@gmail.com |
c1625257b3cf057017fefe14849f8623fce47c71 | d79f15bd27ef293708ed3d9f26bdc22ef0776b43 | /q_learning/old/main.py | b69194f54e96a69f71927f7edf20af559b5cd0f8 | [] | no_license | sjyun15/fastyolo-q-table | 4641598d611edaa2cc1e555e4fc292049bc5012e | 94b52eb59d2be0e2792d2445b5b27cd8b0811dd4 | refs/heads/master | 2020-03-12T13:20:33.525778 | 2018-04-23T04:27:56 | 2018-04-23T04:27:56 | 130,637,873 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,916 | py | import numpy as np
import sys
import random
import time
from environment import Environment
from agent import Agent
if sys.argv[1] == 'train':
env = Environment()
agent = Agent()
start = time.time()
for e in range(100):
state_list = env.reset()
if e % 10 == 0 and e >= 50:
a... | [
"ysjtweety@gmail.com"
] | ysjtweety@gmail.com |
5d16aba73f3db549de99b273aa341d6a695cb19b | d4fdbd68c42d6b9babe347cb3b65535e4d782172 | /tensorflow_datasets/image/horses_or_humans.py | a1ece687669b324b1db5a9a5d708b25eb5052d0a | [
"Apache-2.0"
] | permissive | thanhkaist/datasets | 2809260c5e95e96d136059bea042d1ed969a6fcf | 02da35c558ec8ea704e744a2008c5cecb2e7a0a1 | refs/heads/master | 2020-06-04T16:13:14.603449 | 2019-06-14T22:01:33 | 2019-06-14T22:02:54 | 192,097,735 | 2 | 0 | Apache-2.0 | 2019-06-15T16:02:18 | 2019-06-15T16:02:18 | null | UTF-8 | Python | false | false | 3,016 | py | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
e00019a74bd3688664d6e13f72dd4fcf038515a5 | c7770d7631f2930cce80462f9c3ee7e2abe118bb | /src/muses/collection/migrations/0006_auto_20180207_0616.py | 3443f887f88a09654de195714d5967556d14639e | [
"Apache-2.0"
] | permissive | Aincient/cleo | 4f277520a22792aa5b505601849a7ff3a4bd4196 | 933ef372fa7847d943206d72bfb03c201dbafbd6 | refs/heads/master | 2021-06-18T11:01:49.137359 | 2021-01-12T16:34:44 | 2021-01-12T16:34:44 | 150,566,366 | 0 | 3 | NOASSERTION | 2021-01-12T16:34:46 | 2018-09-27T10:00:20 | Python | UTF-8 | Python | false | false | 1,246 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-07 12:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('muses_collection', '0005_auto_20180207_0516'),
]
operations = [
migrations... | [
"artur.barseghyan@gmail.com"
] | artur.barseghyan@gmail.com |
35d3745ca316f553f61cf6ca2148126797845094 | af8db05349a65ce13b6b6cebef1a7729819c0491 | /tests/index_test.py | 64d633f9ec97f95579ce7770202e432cefad1de2 | [
"MIT"
] | permissive | amancevice/terraform-aws-slackbot-slash-command | 9f7cd51390672d339a3c974f2fafdae918d59e52 | a11f8e9d21e3aa1a92928eba459780dd246d7a91 | refs/heads/main | 2022-02-08T10:54:47.472990 | 2022-01-21T23:08:15 | 2022-01-21T23:17:01 | 138,094,724 | 6 | 3 | MIT | 2022-01-21T23:17:49 | 2018-06-20T23:03:34 | Python | UTF-8 | Python | false | false | 889 | py | import json
from unittest import mock
with mock.patch('urllib.request.urlopen') as mock_open:
mock_open.headers = {'content-type': 'application/json'}
mock_open.return_value\
.read.return_value\
.decode.return_value = json.dumps({'ok': True})
from src import index
class TestIndex:
def... | [
"alexander.mancevice@hey.com"
] | alexander.mancevice@hey.com |
d329c8d88e97ccc81900aa74b639d1a74c72c794 | 18f987476a26ce6677f9a893d7499619d91281af | /lab10_listObjects/listmeth01.py | 435566da93083f868e3f90e66935774e060809e3 | [] | no_license | wang-xiaotian/myCode | 54b4995df7f33bec33cfe99d14f6e76c1a13f904 | 3145b0c8f66df92b2949b131e2b78a54e1f10948 | refs/heads/main | 2023-05-04T10:42:31.141046 | 2021-05-21T15:41:23 | 2021-05-21T15:41:23 | 366,092,522 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | #!/usr/bin/env python3
proto = ["ssh", "http", "https"]
print(proto)
print(proto[1])
proto.extend("dns")
print(proto)
| [
"wang.xander@gmail.com"
] | wang.xander@gmail.com |
cc34ebc9271d0aa574a1b9c2ff673131ac5a2223 | 85a5178676e16fea72da07d1c95b2e4c47808e63 | /merge_data.py | 9cc25097d543bd12a964fdafa2528c1700b13dac | [] | no_license | just-nilux/coingecko-glassnode-jsonAPI | cc29774c128a15c081eb1663a5a7ceee86d07941 | aa916cf6100b0583dc87c42f5307d6ed14133323 | refs/heads/master | 2023-05-01T06:33:36.303369 | 2020-03-05T17:26:03 | 2020-03-05T17:26:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,235 | py | import requests
import json
from datetime import datetime, timedelta
from coingecko import get_coingeko_stats
from glassnode import get_glassnode_stats
def get_stats(date:str, display_currency='usd') -> dict:
coingecko_ping = requests.get('https://api.coingecko.com/api/v3/ping')
if coingecko_ping.ok:
... | [
"dominik.clemente@gmail.com"
] | dominik.clemente@gmail.com |
cee8909ec6e3cd34f3e68456ae1c5fb5b6e6b11d | ac83d1ddb84ecc904c73bdf779f458bd77efc98c | /test/programytest/test_bot.py | ff08464805034473900f9a5d83fe0d858c3f2b52 | [
"MIT"
] | permissive | secrecy27/chatbot | 77829f32a15e17563f038663aebebdb71e52c5a7 | e65a753cf665a4d6d97b57703431cba5331e4f0b | refs/heads/master | 2022-07-24T08:39:57.788009 | 2020-07-16T03:55:21 | 2020-07-16T03:55:21 | 130,678,143 | 4 | 4 | NOASSERTION | 2022-07-06T19:49:14 | 2018-04-23T10:12:01 | Python | UTF-8 | Python | false | false | 15,079 | py | import unittest
import unittest.mock
import os
from programy.brain import Brain
from programy.bot import DefaultBrainSelector
from programy.bot import BrainFactory
from programy.bot import Bot
from programy.config.bot.bot import BotConfiguration
from programy.config.brain.brain import BrainConfiguration
from programy.... | [
"secrecy418@naver.com"
] | secrecy418@naver.com |
867988c0ac12d389371464d44465c2a553cb5023 | 5299bac9bcca1de5b455a7ebcc3d212ad9130c48 | /Computer-Security/Network_Security/detector.py | 282f2e3a296bee4e9064f08bcfcb094c4fe60b99 | [] | no_license | belgiumkansas/graduate | 2ac16e6c466681c48741c87092e3e4c6dcb93ef0 | febfb0a956b4708bde4473d0b8d1e58bedb12d76 | refs/heads/master | 2020-03-18T13:02:48.174280 | 2018-08-20T22:47:32 | 2018-08-20T22:47:32 | 134,757,853 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,385 | py | import dpkt
import sys
import struct
import socket
#ip_list[ipaddress][num_SYN, num_SYNACK]
def getip(s):
i = struct.unpack(">L", bytearray(s))[0]
return socket.inet_ntoa(struct.pack(">L", i))
def main():
filename = sys.argv[-1]
f = open(filename)
pcap = dpkt.pcap.Reader(f);
ip_list = {}
... | [
"jeve0658@colorado.edu"
] | jeve0658@colorado.edu |
b09119848ea08b6af6908ee19f1785d44c218525 | 1723dd4c31a0583e8a59a0c8194a9374d2916a1b | /addons/om_account_accountant/__manifest__.py | 040d3998dce6dedc4471bfa4350ed238a4927066 | [] | no_license | akhdaniel/odoo-14-derma | 40c6cf6ad6432728644c06704c8cbe5388b71454 | 6cf161270c3e826094780dc0206484d32748c774 | refs/heads/master | 2023-06-15T08:09:34.449937 | 2021-07-16T04:23:34 | 2021-07-16T04:23:34 | 386,500,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Odoo 14 Accounting',
'version': '14.0.3.8.0',
'category': 'Accounting',
'summary': 'Accounting Reports, Asset Management and Account Budget For Odoo14 Community Edition',
'live_test_url': '... | [
"akhmad.daniel@gmail.com"
] | akhmad.daniel@gmail.com |
271651c70de710a6ce4ac610faf4d42006a1eef8 | 936c87df850cc2d0c7e6047672b2d159406e5379 | /www/函数或功能测试.py | d9890eb40bf32e607174814fb729456fbad43249 | [] | no_license | AkiraShin/KAF | 004dead553e46c97349b8b6598597047885c9525 | 6f54628d729a483420e394beb8e6b3dce575c777 | refs/heads/master | 2021-03-03T08:29:06.333183 | 2020-05-25T13:47:15 | 2020-05-25T13:47:15 | 245,946,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38 | py | import config
print(config.configs.db) | [
"brave-walking@qq.com"
] | brave-walking@qq.com |
104632c0dd360dc8cf9f333419b44f42d8fab4ac | 70d7f59a104db29ebd3248adf3214492be0866ab | /python/Plotgraph/createModelGraph,py.py | 0c5ce7dc9d36ca4376c22c4c6fe96b917597d59a | [] | no_license | hessenh/dataAndKnowledgeBases | 86731523b9558f2c8cbd63fab370876c7314bde6 | 28bd17b39d11374d8e34b4ce62f770f81b91036b | refs/heads/master | 2021-01-18T09:54:15.167008 | 2014-12-16T17:45:19 | 2014-12-16T17:45:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | import matplotlib.pyplot as pp
xCor = [1,5,10,15,20,25,30,50,100,200,400,600]
yCor = [0.0136,0.480,2.4758,4.623,9.952,17.572,27.081,79.78,330.98,1556,5843,10331.5914]
pp.ylim(min(yCor)-1,max(yCor)+1)
pp.xlim(min(xCor)-1,max(xCor)+1)
pp.plot(xCor,yCor);
pp.ylabel('Time in seconds')
pp.xlabel('Number of documents')
... | [
"hansolav_91@hotmail.com"
] | hansolav_91@hotmail.com |
bf14ccd8c8be7d9c8499c927482512df16ec0245 | d23dab09b21553353ad85246ebafaea790f2afbd | /src/python/pants/core/util_rules/asdf_test.py | f11f4a993b66fcffcb5fa2d7fbd49e8695986cb4 | [
"Apache-2.0"
] | permissive | asherf/pants | 00e8c64b7831f814bac3c4fa8c342d2237fef17d | c94d9e08f65e9baf3793dff0ec2c571d682f6b90 | refs/heads/master | 2023-05-28T14:45:35.325999 | 2023-01-18T15:16:07 | 2023-01-18T15:16:07 | 185,082,662 | 0 | 0 | Apache-2.0 | 2023-01-18T15:15:46 | 2019-05-05T21:09:43 | Python | UTF-8 | Python | false | false | 6,611 | py | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from contextlib import contextmanager
from pathlib import Path, PurePath
from typing import Iterable, Mapping, Sequence, TypeVar
import pytest
from pan... | [
"noreply@github.com"
] | noreply@github.com |
252d08db541ea7b978cda04b6a453f3f175f932e | fb5c5d50d87a6861393d31911b9fae39bdc3cc62 | /Scripts/sims4communitylib/enums/relationship_bit_collections_enum.py | d8546691caa00683e94d009a6b38e0155c43d651 | [
"CC-BY-4.0"
] | permissive | ColonolNutty/Sims4CommunityLibrary | ee26126375f2f59e5567b72f6eb4fe9737a61df3 | 58e7beb30b9c818b294d35abd2436a0192cd3e82 | refs/heads/master | 2023-08-31T06:04:09.223005 | 2023-08-22T19:57:42 | 2023-08-22T19:57:42 | 205,197,959 | 183 | 38 | null | 2023-05-28T16:17:53 | 2019-08-29T15:48:35 | Python | UTF-8 | Python | false | false | 1,917 | py | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
from sims4communitylib.enums.enumtypes.common_int import Co... | [
"ColonolNutty@hotmail.com"
] | ColonolNutty@hotmail.com |
919fde82d4dcf7c1a61bf4f6ad4f57fb5bb7903b | 500e5426adf70162cc75ae99be0743129639e4c7 | /gathering_server/gathering/views/__init__.py | 550bfae1c49af62140f1aedd6ddb5c66a4b16816 | [] | no_license | L3oNav/gathering_server | 8b06ff4f176c6dfe3bc7f5c27bce0c9b4dfae8cb | b708fa831b6b5b227bafebd3ea302bcfa35adc46 | refs/heads/main | 2023-04-01T02:09:11.083248 | 2021-02-18T01:54:23 | 2021-02-18T01:54:23 | 339,837,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40 | py | from .crud import *
from .spec import *
| [
"L3oNav@outlook.com"
] | L3oNav@outlook.com |
d1ae0a3f79b70129e6cde7e41c83050c1cf9839d | 7cc3b79875d28e282e0e780958134d72d1a51264 | /app.py | 89df901e0102993b02de871b39c5617f1407ac9d | [] | no_license | parekhjigar/Flask-SQLAlchemy-RESTful-API | 3d7851446847bfc2b37db8346386f9ea93d4a7b0 | f2ec6e8ffa325ebbed4635e8de86ed66fc10c1b0 | refs/heads/master | 2022-06-23T22:27:22.763721 | 2020-03-05T04:00:50 | 2020-03-05T04:00:50 | 241,232,550 | 0 | 0 | null | 2022-05-25T02:36:06 | 2020-02-17T23:51:20 | Python | UTF-8 | Python | false | false | 8,121 | py | from flask import Flask, jsonify, request
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import Column, Integer, String, Float
import os
from flask_marshmallow import Marshmallow
from flask_jwt_extended import JWTManager, jwt_required, create_access_token
from flask_mail import Mail, Message
app = Flask(__na... | [
"hello@parekhjigar.com"
] | hello@parekhjigar.com |
189e0aa02a4b8cac41df292c8f8e16538dcbd4ca | db4aea847df1198030c51096af1de53238b75de1 | /temp_worker.py | 64ecb59bb37c76b1473a6ccd68a7c93eb0eccaef | [] | no_license | Vrangr/Distributed-Image-Processing | d12530bcf14f81d8ea2a5f89937d27eb9a6517e3 | 3bc4ab44ad8772cdfc79e4c96ec5e4b3ec05f9dd | refs/heads/master | 2020-12-01T00:57:11.647888 | 2020-11-24T19:45:33 | 2020-11-24T19:45:33 | 230,526,905 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,022 | py | import os
import multiprocessing as mp, threading as th
import time
import zmq, zmq.ssh
import sys
import socket
import heartbeat_worker as hw
import imageprocessing as ip
import time
port_task = "5566"
port_hb = "7000"
worker_task_soc = None
task_poller = None
pool = None
liveness ... | [
"vigneshzambre@gmail.com"
] | vigneshzambre@gmail.com |
a6ac0a2fe99c8acdfcf15eac8c4e2a77faeaaf99 | 55ba6bc13184378e8cfbd8c8f42ac4b350fd9cc6 | /unet/.ipynb_checkpoints/traindice-checkpoint.py | 381e94811da63893164fc54919fa26fd72e7d30c | [
"MIT"
] | permissive | jason2249/cs230 | 0898e984862686ca425eb23005513b9d4543f8e3 | 41ef05c501ef3696971a20cefb0b017030667071 | refs/heads/master | 2020-09-28T15:40:12.420419 | 2019-12-09T07:10:57 | 2019-12-09T07:10:57 | 220,601,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,036 | py | import keras.backend as K
from model import *
from data import *
def dice_coef(y_true, y_pred, smooth=1):
intersection = K.sum(y_true * y_pred, axis=[1,2,3])
union = K.sum(y_true, axis=[1,2,3]) + K.sum(y_pred, axis=[1,2,3])
return K.mean( (2. * intersection + smooth) / (union + smooth), axis=0)
def dice_c... | [
"jason0@stanford.edu"
] | jason0@stanford.edu |
66f16a25dd68fac1681406d10091ddce2f9f8d6c | 215a154da09e22b5a95e06cd99cbb16625adbd8d | /leetcode/medium/98_validate_binary_search_tree_iteration.py | c2fbe38f1b9defdc4100bfce1d7fe25218595196 | [] | no_license | nishaagrawal16/Datastructure | c4dff644e77b142b53d4ef45890476ef111b4e83 | 7b1327197616c40cccc5eddde8dcc7bf6f538b2c | refs/heads/master | 2023-07-05T12:57:04.181155 | 2023-06-27T06:43:46 | 2023-06-27T06:43:46 | 192,563,061 | 0 | 1 | null | 2022-10-26T19:56:14 | 2019-06-18T15:04:10 | Python | UTF-8 | Python | false | false | 1,609 | py | """
https://leetcode.com/problems/validate-binary-search-tree/
10
/ \
20 30
/ \
40 50
Complexity
----------
O(n)
"""
import math
from collections import deque
class Node:
def __init__(self, value):
self.val = value
self.left = None
self.right = None
class Tree:
def __ini... | [
"nishaa@google.com"
] | nishaa@google.com |
cf00b901cfcc6263302b63bbf0a1b40fff817938 | 74066546c06a85b22714692f45132dd25f6903f4 | /gui/examples/hello_0.py | 9f6fd9b78959476700ebfd2a923895af3dc7f59d | [
"CC-BY-4.0"
] | permissive | silx-kit/silx-training | 19d9ba3675d9932360a8fa5ec4218c9302386ea8 | f6eec40d95fe7b4925fcfe09ed48b8bfd64574c9 | refs/heads/main | 2023-07-06T05:34:57.628289 | 2023-06-29T14:58:49 | 2023-06-29T14:58:49 | 73,692,733 | 7 | 16 | NOASSERTION | 2023-06-29T14:58:50 | 2016-11-14T10:17:46 | Jupyter Notebook | UTF-8 | Python | false | false | 250 | py | from PyQt5.QtWidgets import QApplication, QLabel, QMainWindow
app = QApplication([])
main_window = QMainWindow()
first_widget = QLabel('hello world !!!', parent=main_window)
main_window.setCentralWidget(first_widget)
main_window.show()
app.exec_() | [
"henri.payno@esrf.fr"
] | henri.payno@esrf.fr |
3e400f3faeff221117e6f8aaee890c4c99ae9bbc | 19c30b1f6e2e2cd5da2d9199c8028e3d672e8247 | /csvToGraph.py | ce89d93eefd6e5c885a80487726c08d7c87c8701 | [
"MIT"
] | permissive | jhhfrjou/OBDABenchmarkingTools | cc24274f5c540b6830be83cf5e94663c70fda26a | a186d76271360e55059d715014a8b111c40a526f | refs/heads/master | 2022-02-22T08:20:39.193064 | 2019-09-27T13:37:44 | 2019-09-27T13:37:44 | 210,316,729 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,593 | py | import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import sys
def drawGraph(folder,query,subplots):
plt.subplot(subplots)
plt.minorticks_on()
plt.grid(axis='x')
plt.grid(which='minor',axis='x',linestyle=':',linewidth=0.4)
files = os.listdir(folder+'/'+query)
load=... | [
"jhhfrjou1@gmail.com"
] | jhhfrjou1@gmail.com |
0402094ad57ff3fcc66639a7456efb2596c8476a | fc8d0769ab52cd464453575fbe000b7ddddd7c95 | /Python/Python.py | 6b4932e8d80e0c548b47cbcf1fca26c6ad5e2d68 | [] | no_license | tbeckley/TEBsCode | e17bb556d96f288ea8a596d4443dc36c2500f66a | e8b1d88b797e427293671d702cfbd43b112a64cc | refs/heads/master | 2021-09-24T13:52:46.995797 | 2018-10-09T18:12:29 | 2018-10-09T18:12:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15 | py | x = 4
print(x)
| [
"tbeckley99@gmail.com"
] | tbeckley99@gmail.com |
0b0317711dd16e61d890565b3b0f6a0b27362d68 | 6b29677627dd2e070adb401fe17b4747f8638b4d | /Algorithms/Data_Analysis/k_visualizer.py | 97e39377bb73ccac2467470fbf0ba6a102dab501 | [] | no_license | Tamrell/De-Heuristische-Helden | 2c7e1138b7522d7da832ee74ca65e86edec5475e | d719fa9218092440aabbfe103bedccf69d0c3a51 | refs/heads/master | 2021-09-15T10:41:01.059845 | 2018-05-30T21:56:48 | 2018-05-30T21:56:48 | 120,455,909 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,379 | py | from bokeh.plotting import figure, show
from bokeh.layouts import gridplot
from bokeh.plotting import figure, show, output_file
from Algorithms.k_means import k_means
from Algorithms.random_connect import random_sampler
from Algorithms.random_battery_cycler import battery_cycler
from Algorithms.Helpers.bounds import lo... | [
"angelogroot@hotmail.com"
] | angelogroot@hotmail.com |
5a6ddff3eee9280be1503efd6eb8d8ab87c8cb8c | bb8f4d5769aaed8e0c21c877b7871b14981134a4 | /PosTagger.py | 464cf89091c4e3518076286a71f6f26764eab9f8 | [] | no_license | cohimame/pykenizer2 | 40bf5f6abc8ed93677699e93c47b3454fc28bc48 | 9ede7ffc08dbba16c5ed182e6d9d46ed1a9f3551 | refs/heads/master | 2021-01-18T22:49:46.649358 | 2016-04-18T09:23:59 | 2016-04-18T09:23:59 | 31,714,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,977 | py | # -*- coding: utf-8 -*-
import subprocess
import re
import Io
from pprint import pprint as pp
"""
Части речи
A прилагательное
ADV наречие
ADVPRO местоименное наречие
ANUM числительное-прилагательное
APRO местоимение-прилагательное
COM часть композита - сложного слова
CONJ союз
INTJ междометие
... | [
"cohimame@gmail.com"
] | cohimame@gmail.com |
58aff874b978861fbe259b9a7aee176c06f761d9 | 0a90c25f0ca3eaff430172547fcffc6a37657924 | /app/models/language.py | 00f2b357c7d8f872043b47ec0dc70e4b70a75e90 | [] | no_license | vilelf/live-coding | 1d1f2c1bec210410709e6e7d8d284e785f3967b6 | fbf099f221f27b3ec776d598aca811ed1d21cc9a | refs/heads/main | 2023-02-04T17:57:19.473000 | 2020-12-23T13:39:07 | 2020-12-23T13:39:07 | 311,070,257 | 0 | 0 | null | 2020-12-23T13:39:08 | 2020-11-08T13:35:11 | Python | UTF-8 | Python | false | false | 173 | py | from sqlalchemy import Column, String
from app.models.base import BaseModel
class Language(BaseModel):
name = Column(String, nullable=False)
icon = Column(String)
| [
"vilelf.dev@gmail.com"
] | vilelf.dev@gmail.com |
7f8c55e29a4b21bb6fb54db8234bae403eca7c52 | d8852a3ed05332a44b2de33f7af65c10cfc168c8 | /loans/tests/bdd/test_loans.py | f291cfb970f57b7f42e7d22223366b65bc7e3c1c | [] | no_license | khazidhea/loans | 285d791cc91d27211c78b6eb64300df11f2574b9 | 40038ec926422ada0aae3d6c56bbd9246b2c70b9 | refs/heads/master | 2022-09-28T12:06:27.794725 | 2020-04-28T12:04:29 | 2020-04-28T12:04:29 | 217,677,258 | 1 | 1 | null | 2022-09-16T18:13:12 | 2019-10-26T08:13:20 | Python | UTF-8 | Python | false | false | 1,138 | py | from pytest_bdd import scenario, given, when, then
from loans.factories import LoanFactory
LOANS_SIZE = 3
@scenario('features/loans.feature', 'Loans list')
def test_loans_list(browser):
pass
@scenario('features/loans.feature', 'Add loan')
def test_loans_add(browser):
pass
@given('I visit loans list')
d... | [
"azamat@galimzhanov.com"
] | azamat@galimzhanov.com |
776e4298189f071d9fe200e832fe0b55049f6fa0 | a37e1ea7d086dca1e703ed0cea0f3248f96d6a40 | /D3220_lista_chart_spch.py | 474ca7c847307b2c8c7627eb8ebc94efac9fe55f | [] | no_license | gcbockelmann/09_MAR_2020_CASA | 38567b00c074f0d2a670c953f5f5b2d10eb357b9 | 49ef911b45eba39fb47c075a1f14d648910ba244 | refs/heads/master | 2021-03-03T05:40:11.320539 | 2020-03-09T03:34:13 | 2020-03-09T03:34:13 | 245,935,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 809 | py |
#CHARTEA LA SERIES SPCHA PARA TODAS LAS ACCIONES
#PRUEBA
chart("AGRO")
chart("ALUA")
#MISSING chart("APBR")
chart("AUSO")
chart("BBAR")
chart("BHIP")
chart("BMA")
chart("BOLT")
chart("BPAT")
chart("BRIO")
chart("BYMA")
chart("CADO")
chart("CAPX")
chart("CEPU")
chart("CGPA2")
chart("COME")
char... | [
"noreply@github.com"
] | noreply@github.com |
4234dc2895d7126760d5a72ef991a59628694535 | 463c053bcf3f4a7337b634890720ea9467f14c87 | /release/ray_release/command_runner/_wait_cluster.py | f7008828947614612adcc8a46a632853493925e1 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | pdames/ray | e8faddc4440976211a6bcead8f8b6e62c1dcda01 | 918d3601c6519d333f10910dc75eb549cbb82afa | refs/heads/master | 2023-01-23T06:11:11.723212 | 2022-05-06T22:55:59 | 2022-05-06T22:55:59 | 245,515,407 | 1 | 1 | Apache-2.0 | 2023-01-14T08:02:21 | 2020-03-06T20:59:04 | Python | UTF-8 | Python | false | false | 1,259 | py | import argparse
import time
import ray
ray.init(address="auto")
parser = argparse.ArgumentParser()
parser.add_argument(
"num_nodes", type=int, help="Wait for this number of nodes (includes head)"
)
parser.add_argument("max_time_s", type=int, help="Wait for this number of seconds")
parser.add_argument(
"--f... | [
"noreply@github.com"
] | noreply@github.com |
090b50e024175fb9679261888519aebc74429f0e | f194023d8c25a628daa0d3ad0a1b8fcdba9bf75d | /route.py | 6ca38851f2f434f96cefbe3c4307d7785cf0d04b | [] | no_license | wzh99/MCM-Project | 284ab1fd6442b17b0f477a5a81f5934103f298b6 | 9c1d0c85f3fe30b6ed5fd82e6682f3074db124b1 | refs/heads/master | 2020-04-17T07:09:45.055286 | 2019-01-31T08:16:35 | 2019-01-31T08:16:35 | 166,356,759 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,620 | py | # route.py
import cv2
import numpy as np
import info
BOUND = info.BOUND
def distSq(pt1, pt2):
return (pt1[0] - pt2[0]) ** 2 + (pt1[1] - pt2[1]) ** 2
class Bezier:
def __init__(self, pts):
self.pt = pts
# Perform integration
nInteg = 50
dt = 1 / nInteg
prevP = self.pt... | [
"wzh1999_frog@126.com"
] | wzh1999_frog@126.com |
869dcff017fa2a44d1aecccde2ac567af4cf6ac9 | 3d9063912b3b7760005ccaf27524b1dfe998e311 | /ltp/utils/convertor.py | 7587edf06c4f929b313d022519862b887859e101 | [] | no_license | little-bigtiger/ltp | 9ca7046771752a40a57e8f49ed78074d83dd7479 | 058c374fc31a63724320f6a13d26dd897b28b220 | refs/heads/master | 2023-05-30T07:03:51.472276 | 2021-06-21T02:13:20 | 2021-06-21T02:13:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,287 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*_
# Author: Yunlong Feng <ylfeng@ir.hit.edu.cn>
import torch
from torch._six import container_abcs
def map2device(batch, device=torch.device('cpu')):
batch_type = type(batch)
if isinstance(batch, torch.Tensor):
return batch.to(device)
elif isinstance(b... | [
"ylfeng@ir.hit.edu.cn"
] | ylfeng@ir.hit.edu.cn |
0d093c3ca016d6d2803a429a4bd995ada08b48ac | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py | bf24b786c68ed2d5f9cba471c8f73ce85a80e483 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 6,384 | py | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | [
"noreply@github.com"
] | noreply@github.com |
37208933717b62c7705b4012b3a8524a6d5b68ec | 91b76a1f0bb5ff9623b789fe47cf58dc35aacf85 | /app.py | 94624ca271ab69d4ad3c79aaaffcbfaedc76f32e | [] | no_license | UniversidadeDeVassouras/labproghiper-2021.1-todoweb | 174d3cc108e8ca190bcb813cd885ec54266dce99 | 38ac1a4e9a5f2db32d9a68c2b78decbaee108877 | refs/heads/main | 2023-05-14T23:48:41.283036 | 2021-06-08T00:57:52 | 2021-06-08T00:57:52 | 368,366,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,722 | py | import time
from flask import Flask, render_template, request
from datetime import datetime
from todo import ToDo
app = Flask(__name__)
todo_list = [
ToDo(1, "Implementar Formulário Lab Programação Hipermídia",
"O professor pediu para implementar o formulário no projeto que dei andamento até aqui",
... | [
"auadtassio@gmail.com"
] | auadtassio@gmail.com |
bc59a241a6f9f3e47b20ae3d6c753fcd69a5ef65 | 1fe074628f18a23cd579a5f5acf0c446760a5529 | /quantum_gradients_200/quantum_gradients_200_template.py | c88a32f8387aaad4ca03fc6fde3513f9d6cebfba | [] | no_license | pdebus/qhack2021 | c9bcd281cd3a67bfd48492cb516ee9debfb6e3b1 | 2b7ad3d1532a3b5aac27e00ac728d1df2424cefb | refs/heads/main | 2023-03-21T11:40:54.419892 | 2021-03-11T15:12:42 | 2021-03-11T15:12:42 | 343,344,647 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,527 | py | #! /usr/bin/python3
import sys
import pennylane as qml
import numpy as np
def gradient_200(weights, dev):
r"""This function must compute the gradient *and* the Hessian of the variational
circuit using the parameter-shift rule, using exactly 51 device executions.
The code you write for this challenge shou... | [
"pascal.debus@aisec.fraunhofer.de"
] | pascal.debus@aisec.fraunhofer.de |
1cec56a3d6a3801f111950aca9312146e3e92fab | a66cc9f9863457d437fc11d018d6810618afd6f7 | /Compare various algorithms/RandomForest.py | 1155072d6248211cc894acd307fd4f1a7f5a7715 | [] | no_license | singh-shakti94/Machine-learning-BigData | afd32594630ca0a73c8fbeae104aec1f467685a9 | 284bf7cee7889602178ad360a3aea38556a6c7d3 | refs/heads/master | 2020-03-20T10:42:08.855328 | 2018-06-14T17:52:28 | 2018-06-14T17:52:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,605 | py | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
import matplotlib.pyplot as p... | [
"noreply@github.com"
] | noreply@github.com |
8742ce4e139cd311b5769202f77bcda4de18b0d0 | 02765c40bfc9a889229303cceb6f3fcce53f3247 | /highest and lowest.py | 0db5e1650b0848ccb023362f333fb58a410b10c1 | [
"MIT"
] | permissive | Aranjyothi/warcode | 6aa1b4823be19ffdf3ab89bf57333b7b204218a2 | b810ab6722c9d6a9aa3dc443dece682479ca9ed4 | refs/heads/master | 2023-03-15T13:29:53.377060 | 2018-08-01T07:29:58 | 2018-08-01T07:29:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | """In this little assignment you are given a string of space separated numbers,
and have to return the highest and lowest number."""
def high_and_low(numbers):
number_list = [int(i) for i in numbers.split(" ")]
return "{} {}".format(max(number_list), min(number_list))
| [
"royalkingpin@gmail.com"
] | royalkingpin@gmail.com |
26df3b5bafd8cb276454deb6c8b30b5808829fe0 | 82c66fc8f9698cfadd0c0c3643d680faa01012cd | /1.py | c60f905be287549fad88f9fbd6621b5d17e806bf | [] | no_license | mikuh/analysis_exercise | 5e71e4c47aea47ccfc91b8db10815ac26738a81e | 66ddc08de330db7ab114039f727a847b30a93017 | refs/heads/master | 2021-06-23T23:37:58.766495 | 2017-08-18T15:45:40 | 2017-08-18T15:45:40 | 100,503,854 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | import json
from pandas import DataFrame, Series
import pandas as pd
import numpy as np
with open('gov.txt', 'r') as f:
records = [json.loads(line) for line in f]
frame = DataFrame(records)
print(frame['tz'][:10])
# 将缺失字段填充为Unknown
clean_tz = frame['tz'].fillna('Missing')
clean_tz[clean_tz == '']='Unknow'
# ... | [
"853934146@qq.com"
] | 853934146@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.