blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8eb48d9b6970ac7654c600e508e62f7a55ccac7b | d7c3ec781db5a1019c6695b4f7a336e774a87525 | /src/webscrape.py | dc6f2c64afc4af0d080ae7d75259231413a1505e | [] | no_license | awkyu/YahooWebScrapeTest | ae73a254700c2e238c602222e98bf95b3a74eb8b | 0c33cdc5faf21e42633f220c2904145cd10895f3 | refs/heads/main | 2023-02-19T08:21:56.827108 | 2021-01-21T07:14:55 | 2021-01-21T07:14:55 | 331,541,749 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,046 | py | import requests
from bs4 import BeautifulSoup
from collections import deque
import pandas as pd
import numpy as np
class YahooWebScrapeInstance:
"""
An Instance of a webscrape of recent prices of a given stock symbol
Ex: YahooWebScrapeInstance('ISRG')
"""
def __init__(self, stock_symbol):
... | [
"awkyu@ncsu.edu"
] | awkyu@ncsu.edu |
774f3fd0d4383002a851674e0c6523e3f88ca729 | 3dbd97d57f5d73b9665db20a926a67459ad9282a | /penny flip.py | 8650c6fdbc7722179af162f8743a76bd07c1b616 | [] | no_license | hnoskcaj/WOrk | 91b22d08ed8c9948f90bcadefb913af2331c9824 | a68c1e29153adecaa6c982b967dee24010172cec | refs/heads/master | 2021-07-15T14:58:41.602561 | 2019-01-30T15:35:14 | 2019-01-30T15:35:14 | 147,697,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | import random as r
while round < 10:
ticker = 0
while count < 10
x = randint(0,1)
if x == 1:
ticker += 1
count += 1
ticker += 1 | [
"43040830+hnoskcaj@users.noreply.github.com"
] | 43040830+hnoskcaj@users.noreply.github.com |
933a002ab324b2adef7d0dbfa19291d879c51704 | 35788f5ca40e5b9e14d4700084e0f3a7fd7f3033 | /basic/conversion-teacher.py | a8f091bdf171ca3f3c8dc193324984e020ad5ccf | [] | no_license | yunnyisgood/django-monaco | 0c097385c0497b2bcbd66571f16a84d53b4913db | b83e9702a064f81d76be35a2e8f4c02c03b5255e | refs/heads/master | 2023-05-23T03:53:26.934348 | 2021-06-14T14:29:43 | 2021-06-14T14:29:43 | 370,548,818 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,783 | py | import pandas as pd
class Conversion(object):
df = pd.DataFrame()
# dp = ()
@staticmethod
def dp_create() -> ():
# 여기서 프로퍼티(self)를 사용하지 않는다 -> 객체 메소드가 아닌 staticmethod
return (1, 2, 3, 4, 5, 6, 7, 8, 9)
@staticmethod
def dp_to_list(dp) -> []:
return list(dp)
@stat... | [
"cyeon0801@gmail.com"
] | cyeon0801@gmail.com |
6e7970e14a305c5d63ae53fcbed1e414bdc0030c | 9cf34ee45a809c7344d716ce9ecc8cdcb368a373 | /challenges/difficult/Challenge_1/solution.py | 50ba9b505b8e4e40e5fc69535f99f30857f28009 | [] | no_license | Domlenart/DailyProgrammer | e5fed1d05303563b8e920ea33d7bebddfe5ab9b0 | 933abeadd6262a3916414bcb635213054952972b | refs/heads/master | 2021-09-07T05:33:15.856422 | 2018-02-18T04:40:53 | 2018-02-18T04:40:54 | 119,336,495 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | import random
def guess_number(low=0, high=100):
guess = random.randint(low, high)
print('Is your number %s' % guess)
user_input = input('> ')
if user_input == 'correct':
pass
elif user_input == 'higher':
guess_number(low=guess, high=high)
elif user_input == 'lower':
gu... | [
"dl7cz@virginia.edu"
] | dl7cz@virginia.edu |
f323beb0e47d540bf20969a4f448b82fc3bec9a2 | f2385eaf6166509beec9c98963f43af2b029d3cb | /test_cases/documents/hibari1121_sample.py | eb5c5d985df24357d3fc423c68a3ba79ac3b27c6 | [] | no_license | tilmitt11191/tensorFlow_test | 84d169f3023b5a77322746105c58889b2b8a923a | 851f2436486eeb8ef4d7924bd8f8ca94b8d5e6a8 | refs/heads/master | 2021-01-24T18:58:31.033058 | 2017-06-21T08:11:20 | 2017-06-21T08:11:20 | 86,155,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,277 | py |
"""http://hibari1121.blog.fc2.com/blog-entry-57.html ."""
from gensim import corpora, models
import numpy as np
from numpy import random
random.seed(555)
from scipy.cluster.vq import vq, kmeans, whiten
from sklearn.decomposition import TruncatedSVD
from collections import defaultdict
article = open('data.txt')
model... | [
"tilmitt11@yahoo.co.jp"
] | tilmitt11@yahoo.co.jp |
be9830d4aef891a087416064e6c7f656a5bac301 | 78d5c1a653c8c88cd0f5a06d8fcab485607775ef | /submission/mp/states/sequences.py | 8c772d9dd69c192a5b5de75d20c3eb262a204623 | [
"BSD-3-Clause"
] | permissive | ipab-rad/RRC21 | 9eb0e36cabc3372fd15366a76f1484fabb60e11a | 32aa3108eadd2fef527ea4150064a476f0661e73 | refs/heads/master | 2023-09-04T05:57:30.725292 | 2021-07-27T13:29:16 | 2021-07-27T13:29:16 | 380,518,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,316 | py | from mp.align_rotation import roll_and_pitch_aligned, get_yaw_diff
from .base_states import *
from .state_machine import State
import numpy as np
class CenteringPrimitiveState(State):
"""
This class implements a primitive state to center the object in the
robotic arena.
"""
def __init__(self, env)... | [
"adityakamireddypalli@gmail.com"
] | adityakamireddypalli@gmail.com |
cb5972ea2c35dab37bc02e33f2ec04b71cbf05a5 | 0cd020286a25a8570e09ecc972cc485dd9f7fb1d | /SDE_VAE/SDE_VAE_Tools.py | 9e131ec48657a58bda26fc88ee1c5855a70196b4 | [] | no_license | WN1695173791/SML-Projekt | 5873b5ad13868ab6426167fafc4787e84ad56405 | 8a57aab6e04d6c7bd4b9d1b3719ef5cd52555cab | refs/heads/main | 2023-02-28T00:45:51.714951 | 2021-02-06T16:49:31 | 2021-02-06T16:49:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,487 | py | #import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from math import sin, cos, sqrt, pi, floor, ceil, exp, log
from keras import backend as K
########################################################
# Definition der SDE_VAE
class SDE_Variational_Autoencoder(tf.keras.Model):
def __init__(s... | [
"ben.deitmar@gmail.com"
] | ben.deitmar@gmail.com |
808711b65837914e0d6b719cad3c202f61270ca7 | 5bc152ca6df9f7759ae631e24a99581c49e763d9 | /24-reverse-linked-list.py | 89ea767391dd0c927d6d962a8cda4fdbb0a01bf9 | [] | no_license | aowongster/interview-cake | aa909a2f3ec2f74860e11764f9bc0b2141b94978 | 20eb849442f5783abf9102231af34e0ec4524f3f | refs/heads/master | 2021-01-22T20:50:26.845610 | 2017-04-04T04:58:00 | 2017-04-04T04:58:00 | 85,368,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 891 | py | #!/bin/python
"""
Write a function for reversing a linked list ↴ . Do it in-place ↴ .
Your function will have one input: the head of the list.
Your function should return the new head of the list.
"""
class LinkedListNode:
def __init__(self, value):
self.value = value
self.next = None
def __... | [
"awong@webroot.com"
] | awong@webroot.com |
f66055e54866e6ecf77b3f08988306d49b6c3816 | cdd97d82cff251227505da45f1a144fb71ffd190 | /그래프 이론/탑승구.py | 80ac4e5c4beb5b861fb1157c342c8ce0672e9008 | [] | no_license | Silky-ai/codingtest_book_2020 | 92b4977ffa0b70ccc03b1e3d4d2cd2aa6cd39ba1 | 40c3a4f1e520bf8ef6d4f4858895075f85036a47 | refs/heads/master | 2023-02-24T04:56:17.403958 | 2021-02-02T13:09:36 | 2021-02-02T13:09:36 | 333,051,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | def find_root(root,x):
if(root[x]!=x):
root[x]=find_root(root,root[x])
return root[x]
def union(root,a,b):
a=find_root(root,a)
b=find_root(root,b)
if(a<b):
root[b]=a
else:
root[a]=b
g=int(input())
p=int(input())
root=[0]*(g+1)
for i in range(1,g+1):
root[i]=i
cnt=0... | [
"59557453+GRAIM-ai@users.noreply.github.com"
] | 59557453+GRAIM-ai@users.noreply.github.com |
7316502afc84f5131380f552c1cb161afa993ec6 | dae2e18c9076d91680ef5e9ee9ad7aa155d5071d | /dm_control/locomotion/walkers/rodent.py | b9d29b106f66945117f6a5596d42b2300a243d74 | [
"Apache-2.0"
] | permissive | wangsd01/dm_control | 5c233770524ef2fbb4c358d619934e2d76b990bf | d6f9cb4e4a616d1e1d3bd8944bc89541434f1d49 | refs/heads/master | 2023-08-16T16:08:28.134204 | 2023-07-20T11:24:16 | 2023-07-20T11:25:09 | 293,401,717 | 0 | 0 | Apache-2.0 | 2020-09-07T02:23:31 | 2020-09-07T02:23:30 | null | UTF-8 | Python | false | false | 12,164 | py | # Copyright 2020 The dm_control 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 applicable law or agreed to i... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
6094e58198120626f12f5aa95fe32e016cc64ba5 | 20ed6e74d227e097a924e050bc82682381739fc7 | /src/tx/functional/list.py | 45c2627a517eeef89d294e0f38dfc335f6b719e2 | [
"MIT"
] | permissive | RENCI/tx-functional | c341f38293a889e125824822c47b0d1f1f3f87fb | 45427ab06b7d029940e250a5f189997a8111d3f0 | refs/heads/master | 2022-12-11T11:53:34.830442 | 2020-09-05T17:56:40 | 2020-09-05T17:56:40 | 264,998,389 | 1 | 1 | null | 2020-05-18T17:14:53 | 2020-05-18T16:32:09 | Python | UTF-8 | Python | false | false | 717 | py | from .traversable import Traversable
from typing import Generic, TypeVar, Callable, Any, List
from .functor import Functor
from .applicative import Applicative
from .utils import foldl, foldr, Arrow
S = TypeVar("S")
T = TypeVar("T")
def rec(ma: List[S], b: T, f: Callable[[S, T], T]) -> T:
return foldr(f, b, ma... | [
"xuh@cs.unc.edu"
] | xuh@cs.unc.edu |
2a15671d6f800b0ed904eda1e0736d12f02e3e02 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/39/usersdata/120/13433/submittedfiles/dec2bin.py | 9a40134fda961c27492e0c85f0f6f823e4b3bc9e | [] | 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 | 260 | py | # -*- coding: utf-8 -*-
from __future__ import division
d=input('digite um numero na base decimal:')
cont=0
k=d
while k>0:
k=k//2
cont+=1
n=cont
i=0
soma=0
r=d
while i<=(n-1):
r=d%2
d=d//d
b=r*(10**i)
i+=1
soma=soma+b
print soma | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
8c9d4bf9ba9fcab03cab1e236d1a6a8d2b04ecc2 | b4c4bb7ea302084cc0a381595bbc2a3563e48e4d | /reports/graphs/diaperchange_lifetimes.py | d095f1adbae5f044487828099b4c29197e5bd24b | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | niti15/baby | a97f31729bd00e473cf8918d9d59eef2cb720b88 | 74c6dab8243a9b69c41e76d1025b5592969bfc20 | refs/heads/master | 2022-12-15T17:44:59.356097 | 2018-02-05T11:45:27 | 2018-02-05T11:45:27 | 119,700,928 | 0 | 0 | BSD-2-Clause | 2022-12-07T23:48:27 | 2018-01-31T14:53:29 | Python | UTF-8 | Python | false | false | 1,359 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import plotly.offline as plotly
import plotly.graph_objs as go
from reports import utils
def diaperchange_lifetimes(changes):
"""
Create a graph showing how long diapers last (time between changes).
:param changes: a QuerySet of Diaper Chan... | [
"systems@cogzidel.com"
] | systems@cogzidel.com |
4d8240418304f9dfa0c726444e602ff8ba10a354 | 3b5e38435817b253c1e39b1ec9a51b17988d8f06 | /note/models.py | 0408ff9642afebf31f65c03c367a36a7ec067715 | [] | no_license | leanneshen1/misdj001 | aff0d867076c16388e36d01296322799b6139caf | 13f210de4c0da72c485a75cff1911071fa9cbb4c | refs/heads/master | 2020-08-07T17:47:45.624719 | 2019-10-09T02:31:31 | 2019-10-09T02:31:31 | 213,541,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | from django.db import models
class Note(models.Model):
subject = models.CharField(max_length=200)
def __str__(self):
return self.subject
| [
"maganda.shen@163.com"
] | maganda.shen@163.com |
d38a7dcfe11397a978284947158981999ed82f30 | fdac3070794339b9401a2d6217896b4fc713ecb6 | /codeSnippets/settings.py | eafc6f85d2ed7efb777e432ef1aa6031e570bebc | [] | no_license | rixgithub/codeSnippets | d8c41783f7114042d1bdde075e4079e7d4263208 | 86e7c6f3a45e08d409130d6be0ddedb6027bcaa6 | refs/heads/master | 2021-01-11T13:38:14.772393 | 2017-06-22T22:16:06 | 2017-06-22T22:16:06 | 95,042,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,178 | py | """
Django settings for codeSnippets project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import... | [
"rickygrams@me.com"
] | rickygrams@me.com |
b51b8b4d7c792b1c3bb79c05f7d237634d8c856c | 5e71bda80490b3bca95fa421c0f188349746609b | /node_modules/webpack-dev-server/node_modules/fsevents/build/config.gypi | 0a130cca9746272f8852bf9ac39f507a47bfb148 | [
"MIT"
] | permissive | alianneElm/MovieList-Vue | c0adb139377b0f52304b3ff13a39e4a5b4b4466b | f144cd660e3e48205564288c9b04a4c0c3504a38 | refs/heads/main | 2023-04-06T02:57:11.526076 | 2021-04-18T20:40:11 | 2021-04-18T20:40:11 | 359,247,131 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,730 | gypi | # Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"build_v8_with_gn": "false",
"coverage": "false",
"dcheck_al... | [
"alianneelm@yahoo.se"
] | alianneelm@yahoo.se |
0babdd6176150c28235bd4cf2d6996b00ec5a1a7 | d99c38bb459b28ba3b8246b138133f30dc78ba73 | /app/core/wires_plat_api.py | 7bec797ca825cd0e6cd7711e68cb694161278f14 | [] | no_license | NubeIO/rubix-updater-gui | 591dc6bb8071ddb0a79773d212710d9eb720e67b | 45a0f4fe9098b0c0592cd5af9503d023525b1503 | refs/heads/master | 2023-06-14T08:30:41.960793 | 2021-07-09T00:58:31 | 2021-07-09T00:58:31 | 368,785,963 | 0 | 0 | null | 2021-07-09T00:58:32 | 2021-05-19T07:47:46 | Python | UTF-8 | Python | false | false | 1,790 | py | import requests
from config.load_config import get_config_wires_plat_settings
import logging
logging.basicConfig(level=logging.INFO)
_get_config_wires_plat_settings = get_config_wires_plat_settings()
class WiresPlatApi:
@staticmethod
def get_token(host, **kwargs):
port = kwargs.get('port') or 1414
... | [
"aidan@enviroservices.com.au"
] | aidan@enviroservices.com.au |
14a6cd7453423dd03d0693d805d2fc50b2c1606e | 708709f0fffa72a4ceb8cdc7741baf0dcbddb6e3 | /programa5.3.py | e526f4de746ab0ff299b362a01663562eb46e5c9 | [] | no_license | guidiamond/EP_Desoft | aeb575232cfc7cd4569dcc095360282b4c5acb78 | a70af0cc611daaf037d70e98932a92299793ecc6 | refs/heads/master | 2020-03-10T12:57:41.230892 | 2018-04-27T02:56:38 | 2018-04-27T02:56:38 | 129,388,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,955 | py | import json
from pprint import pprint
with open('estoque.json', 'r') as arquivo:
dicionario = json.loads(arquivo.read())
loja = input("Digite o nome da loja ")
print("0 - sair\n1 - adicionar item\n2 - remover item\n3 - alterar item\n4 - imprimir estoque\n5 - listar estoques faltando\n6 - imprimir valor... | [
"noreply@github.com"
] | guidiamond.noreply@github.com |
6ed907d8b507075175b110effbb758d21929ba79 | a4109644a2b9c6b678e124db6a4c9d891fea5258 | /workspace/.c9/metadata/workspace/quiz.py | 1905f75cb8acad56f1ea083066b53be308d651a6 | [] | no_license | Vic18256/file_io | b1adde9e9b9c84146ed8a952a4db0f6f278a4ebd | a943fd1f6f994729e49793223d40c6be8e54546c | refs/heads/master | 2020-04-04T13:49:07.662703 | 2018-11-26T20:40:16 | 2018-11-26T20:40:16 | 155,976,307 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,902 | py | {"filter":false,"title":"quiz.py","tooltip":"/quiz.py","undoManager":{"mark":100,"position":100,"stack":[[{"start":{"row":0,"column":3},"end":{"row":0,"column":4},"action":"insert","lines":[" "],"id":4}],[{"start":{"row":0,"column":4},"end":{"row":0,"column":5},"action":"insert","lines":["o"],"id":5}],[{"start":{"row":... | [
"vherkan@hotmail.co.uk"
] | vherkan@hotmail.co.uk |
78c0fd97049faf0fe92e5e044a45d78deffaa5ee | f3e4a2f95b57cb4bddc5c883aece32702090fd83 | /src/config.py | 7c85f691ccce737ae57b43b5300f9f56e9a48dd9 | [] | no_license | brooklinsantosh/Credit-Card-Lead-Prediction | acf9c056f8946e5090e1706121ca4c3a699c5ef8 | 6f39f43807c3eea435a6bff16147b4d549873d1e | refs/heads/master | 2023-05-08T16:24:03.718330 | 2021-06-02T14:15:13 | 2021-06-02T14:15:13 | 373,078,263 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | TRAINING_DATA = "../input/train_s3TEQDk.csv"
TEST_DATA = "../input/test_mSzZ8RL.csv"
SAMPLE_SUBMISSION = "../input/sample_submission_eyYijxG.csv"
TOTAL = "../input/total.csv"
TRAIN_PRED = "../model_preds/train_pred_df.csv"
TEST_PRED= "../model_preds/test_pred_df.csv"
OUTPUT = "../output/final_sub.csv"
TRAIN_DROP =... | [
"brooklinsantosh@gmail.com"
] | brooklinsantosh@gmail.com |
9a664b18fefd64286b0e208e92d999686b3a752d | f1139cc97ca2a80596c7875209ab48c2e7248901 | /gqt/__init__.py | ec508e47d60e3d159e2a523fbf9cef76da1a53c2 | [] | no_license | kevin-gorman/python-gqt | 62c35337a7c61e7fb69df4392812f0b9210f9224 | 0ed09bb7f7053d66c6665c849df9c6978a69131c | refs/heads/master | 2020-07-09T17:33:40.447510 | 2019-08-23T21:40:27 | 2019-08-23T21:40:27 | 204,035,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36 | py | #
import gqt
__version__ = "1.1.3"
| [
"ec2-user@ip-172-31-77-213.ec2.internal"
] | ec2-user@ip-172-31-77-213.ec2.internal |
038145a20a13ec8648825e53fb8d55bc3e899e5e | 585699fb489bc420fcdc048d2ac15577a695a40d | /mesh-clusterer/clustering/metrics/g_mean.py | a755ab3928eb146484d749979bff9fb171c6864e | [] | no_license | langus0/imgrid | fbcae3368cd3c15eecdb0d95ba8824df7232ceb7 | d12c2a8c34b494ef048528818e324f48997eac7e | refs/heads/master | 2021-01-10T00:04:03.894826 | 2017-09-21T11:35:06 | 2017-09-21T11:35:06 | 91,773,531 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,326 | py | from clustering.metrics.metric import Metric
from clustering.cube_classifiers.probability_cube_classifier import RARE, OUTLIER, BORDERLINE, SAFE
from sklearn import metrics
from numpy import roots
class GMeanMetric(Metric):
def __init__(self, pred, real):
self.predicted_types = pred
self.true_type... | [
"langus0@op.pl"
] | langus0@op.pl |
4ba7eb4c93322b4a6cb0198db2f99d512c637e26 | 62566ada9a992e02aeda4a2e3b550feded07c43b | /day_12/main.py | 96e70c65a0c8913ef440a2f1eb0c3bd5aeab3442 | [] | no_license | JaviCeRodriguez/30DaysOfPython | be3ec4c986e39159766a1bcfa28bb01c751d1771 | 9f5bedfda9e2d921d44f74403997a35eb9f4cb34 | refs/heads/main | 2023-08-22T19:15:01.879909 | 2021-10-09T04:29:02 | 2021-10-09T04:29:02 | 400,647,270 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | from mymodule import generate_full_name as fullname, sum_two_nums as total, person as p, gravity as g
print(fullname('Asabneh','Yetayeh'))
print(total(1, 9))
mass = 100;
weight = mass * g
print(weight)
print(p)
print(p['firstname']) | [
"javicerodriguez@gmail.com"
] | javicerodriguez@gmail.com |
e840f131967a1a2aa72cd017fbbfeaea45a46fbc | 2f212f2f36a644bcf7466997e2e579012fb763e8 | /Diploma/Programm/additional tools/convert_to_yolo.py | 3e6ea97430299496c699bd24ecfef230982f6f05 | [] | no_license | Lolimpo/SibSUTIS | 07cfebf8df8b9ed23f456083ff867b900fb4f00c | b91ec2099ade6cacad7c67f3496ac25312eb196f | refs/heads/master | 2023-06-19T00:30:25.306618 | 2021-07-18T07:17:31 | 2021-07-18T07:17:31 | 252,069,521 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,752 | py | import pandas as pd
import os
import cv2
import numpy as np
os.cur
full_path_to_ts_dataset = 'C:\\Users\\Lolimpo\\Desktop\\dataset'
# Считываем всю информацию о дата-сете
ann1 = pd.read_csv(full_path_to_ts_dataset + '\\' + 'rtsd-d1-gt\\danger\\test_gt.csv')
ann2 = pd.read_csv(full_path_to_ts_dataset + '\\' + 'rtsd-d1... | [
"thelol1mpo@gmail.com"
] | thelol1mpo@gmail.com |
1b8ca6d4285b1bf2ba6e8ef64cd2e7b25a83d932 | 2af6a5c2d33e2046a1d25ae9dd66d349d3833940 | /res_bw/scripts/common/lib/idlelib/idle_test/test_pathbrowser.py | c74b4f69f1a9d7f33751f283cef5ff88fc8318bc | [] | no_license | webiumsk/WOT-0.9.12-CT | e6c8b5bb106fad71b5c3056ada59fb1aebc5f2b2 | 2506e34bd6634ad500b6501f4ed4f04af3f43fa0 | refs/heads/master | 2021-01-10T01:38:38.080814 | 2015-11-11T00:08:04 | 2015-11-11T00:08:04 | 45,803,240 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 652 | py | # 2015.11.10 21:36:26 Střední Evropa (běžný čas)
# Embedded file name: scripts/common/Lib/idlelib/idle_test/test_pathbrowser.py
import unittest
import idlelib.PathBrowser as PathBrowser
class PathBrowserTest(unittest.TestCase):
def test_DirBrowserTreeItem(self):
d = PathBrowser.DirBrowserTreeItem('')
... | [
"info@webium.sk"
] | info@webium.sk |
a1078caacaf90cd14c52f3b2707f82b5a6964bf6 | 1d530e305d94eb98b64dadbfdcc60cbb0f978d76 | /stopWatch.py | 314ddaf863e11773d98a01e3488f2d815e817120 | [] | no_license | RuiQin/small-games | 04601f6ece4f0ac52ce655b1e2b15f622ea6b723 | 94e2cd187f2300bcdac0237d3dac21ba7802aacc | refs/heads/master | 2020-04-12T17:44:14.450082 | 2015-08-04T17:52:43 | 2015-08-04T17:52:43 | 38,903,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,880 | py | # a simple digital stopwatch that keeps track of the time in tenths of a second.
# The stopwatch contains "Start", "Stop" and "Reset" buttons. It has two numerical
# counters that keep track of the number of times that you have stopped the watch
# and how many times you manage to stop the watch on a whole second ... | [
"qinr@Ruis-MacBook-Pro.local"
] | qinr@Ruis-MacBook-Pro.local |
c6fcad8aeaf833189d8109305026c27dfa450421 | 086302376bbc84bdb359a28da78acab01615a328 | /backend/Respond/wsgi.py | 1b33ab8af8436913bcb317a46d085b5d9eb5c671 | [] | no_license | dpakach/Respond | 8210fe884d314c4af3aa722f61c5af9eaf7598c7 | ada3fe3d7051157bd48766815f6a19c91fca2e19 | refs/heads/master | 2020-03-23T03:14:37.248996 | 2018-07-20T04:25:02 | 2018-07-20T04:25:02 | 141,018,879 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | """
WSGI config for Respond project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | [
"suagatchhetri@outlook.com"
] | suagatchhetri@outlook.com |
4002037e6ff65321410d74bb23f3e16449ae369c | 948473303f12b3b20415d7ab6c8279627ce101ae | /loss.py | ea59fffc850917167ba1fa96bec6e83d7d907538 | [] | no_license | zhushaoquan/DeepHash-pytorch | 9869469ae9fc59b26ed9a1a3c383f5d9a2b12b2f | 534f6fe6a647e16eca33c3deb716e435d235c067 | refs/heads/master | 2020-07-31T07:21:54.924924 | 2019-07-09T05:26:48 | 2019-07-09T05:26:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,393 | py | import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from util.distance import distance
def pairwise_loss(output, label, alpha=1.0, class_num=1.0, l_threshold=15.0):
'''https://github.com/thuml/HashNet/issues/27#issuecomment-494265209'''
bits = output.shape[1]
similari... | [
"675121663@qq.com"
] | 675121663@qq.com |
222eea60698393376e39f1fc3b4dc16e8a1c3622 | 3946c00734cd9dde10fdd65e4efffe996b3bf0ab | /assignment1/.env/lib/python3.6/re.py | e0360328bf93f6713edf6e2573877c5869ac9467 | [] | no_license | lngoquy1/cs224n | 4c6b2f42c782fc21c35e22c168ad3df2afe90089 | 3f7d909620d4a5d9d0ff41947c7007cbde8c8023 | refs/heads/master | 2021-05-14T15:10:37.760640 | 2018-01-29T16:39:00 | 2018-01-29T16:39:00 | 115,986,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | /Users/lngoquy/anaconda3/lib/python3.6/re.py | [
"lngoquy@dhcp-130-58-101-187.swarthmore.edu"
] | lngoquy@dhcp-130-58-101-187.swarthmore.edu |
4215782066fdb3a091396c175573f090d54eddd8 | e0eb81aef84ee0929aa3dfc166f29a343251c35b | /seafile-pro-server-7.0.10/seafile/lib64/python2.7/site-packages/seaserv/service.py | 22c3074bbc3cfbf09a97427884dab3e8cbecc014 | [] | no_license | Sandra-Z/filesharing | 414fc56abe2f87b80ea390e0814a0bf86148a2bf | 0e4e637f0c78f96949796b480b51df72d859c4ff | refs/heads/master | 2022-12-11T12:28:07.155281 | 2019-11-19T08:39:51 | 2019-11-19T08:39:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 28,415 | py | from datetime import datetime
import json
import logging
import os
import sys
import ConfigParser
from urlparse import urlparse
import ccnet
import seafile
import re
from pysearpc import SearpcError
_DEBUG = 'SEAFILE_DEBUG' in os.environ
ENVIRONMENT_VARIABLES = ('CCNET_CONF_DIR', 'SEAFILE_CONF_DIR')
# Used to fix b... | [
"deutschland.gray@gmail.com"
] | deutschland.gray@gmail.com |
c1f3622841b368a38cc2ebbc1a891f60adedeaff | c8d0af17dfb5f82359b950b9bf9628cacf248d53 | /models/Self_attention.py | f6249eb1b2ed7d7d1ac6b50439df04c85b2881bb | [] | no_license | impossible-g/UTR_VAE | 80505d88b8c1a0ffa9cccbf307f83fa06eec1f00 | 27a81c3e6db9282b02f50d674c0720bd60afabad | refs/heads/master | 2023-07-15T21:18:04.425891 | 2021-08-30T10:51:43 | 2021-08-30T10:51:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,521 | py | import os
import sys
import torch
from torch import nn
import numpy as np
class self_attention(nn.Module):
def __init__(self,in_channel,n_head,d_k,d_v):
super(self_attention,self).__init__()
self.n_head=n_head
self.d_k = d_k
self.d_v = d_v
self.W_dict = nn.ModuleDict({... | [
"zhengwzh5@hotmail.com"
] | zhengwzh5@hotmail.com |
a2208e819022c58d477bc8b02086551161c2b251 | b3b67cc0e23a100236d122ed189a532970411a56 | /comp_parser.py | dbd0245ff25dea73ddb509925ca959ea3de4c2fc | [] | no_license | Wind-of-fortune/scraper | c11c3d0406b8d8a0d25bb721acf8a8eb68bff84d | 50bba3e81a08531533156c1efb727fab22016740 | refs/heads/master | 2020-04-13T08:33:53.395256 | 2018-12-25T13:24:19 | 2018-12-25T13:24:19 | 163,084,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,671 | py | # -*- coding: utf-8 -*-
import time
import scrapy
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from settings import domain, url
class CompParserSpider(scrapy.Spider):
name = 'comp_parser'
allowed_domains = domain
start_urls = url
price_dict = {}
def parse(self... | [
"Wind-of-fortune2@yandex.ru"
] | Wind-of-fortune2@yandex.ru |
ff60581243148821c05ad3c7d119f8f54162d2c1 | fafb10ff1b5ec8dcd3c131649afa9baa80159770 | /password.py | b873790aaf3464f365923513fb67ba9dd5799129 | [
"MIT"
] | permissive | pombredanne/webkit-vuln-finder | 94f182fb7a40e8f35cce6ed08598a97435d3bad7 | 5da9e457b5bfd3715d1d97811cf21750dc9b1082 | refs/heads/master | 2021-04-28T18:07:43.793971 | 2017-10-21T02:24:35 | 2017-10-21T02:24:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 63 | py | username = "thatOneGuy"
password = "correcthorsebatterystaple"
| [
"noreply@github.com"
] | pombredanne.noreply@github.com |
23eb382c9c0d71b35a734f40f3ad2b00d640b3c2 | 3f689ebd1ac2ce8dda26c9e3759b3875af971094 | /bookmarks_tests.py | 3651d60355fc02ac6536aac90d8ff73f040a6965 | [] | no_license | Kotova25/some | 63d0a3a2b40d49e5ea7f7fe781a04ac8fcd28d3f | 112a9a66c66e124ef66a4e3cf68293559ffd68cb | refs/heads/master | 2021-01-25T09:21:02.774173 | 2017-06-20T16:16:08 | 2017-06-20T16:16:08 | 93,822,721 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,575 | py | import unittest
import my_driver
import locators
import test_data
class BookmarksTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
desired_caps = {'platformName': 'Android', 'platformVersion': '6.0.1', 'deviceName': 'Xiaomi Redmi 4X',
'appActivity': 'by.onliner.ab.act... | [
"kseniakotova@Steves-iMac.onliner"
] | kseniakotova@Steves-iMac.onliner |
5d75963102d3bdef86f0100897fd2f959dd0d477 | 26b55d14788cdb304e5b0a87e0ca42b460bdd7a4 | /bom/helpers.py | a4134fe92c7a9c04c66d5731e5e44d7d4c7266cb | [
"MIT"
] | permissive | JasChimni/django-bom | 6f0c9568d0cee7df51828512d8da1c7d844e9e4e | cbe6c79c931503b6a5d81a53487190430c9a0461 | refs/heads/master | 2020-04-16T21:26:17.894808 | 2019-04-18T01:24:11 | 2019-04-18T01:24:11 | 165,925,761 | 1 | 0 | null | 2019-01-15T21:23:12 | 2019-01-15T21:23:12 | null | UTF-8 | Python | false | false | 5,146 | py | from bom.models import Part, PartClass, Seller, SellerPart, Subpart, \
Manufacturer, Organization, ManufacturerPart, PartChangeHistory, Assembly
def create_a_fake_organization(user, free=False):
org = Organization(
name="Atlas",
subscription='F' if free else 'P',
owner=user)
org.sa... | [
"mpkasp@gmail.com"
] | mpkasp@gmail.com |
44d907b9a568613000577d7c233cfdfa14a4213a | 032117bbf248a76abd25fcc2355bc8ade84fa76a | /django/theproject2/pro3/app3/views.py | be4a8ac1bbf617042c03024c19496ce33a98df2b | [] | no_license | shefaligoel136/python_summer_training | ba8f28f6af008584b4239c73d466e4e9d35b4b01 | 0b97fea050342fe4ed95b18c5f7ed885a6c8ca23 | refs/heads/master | 2022-11-13T07:22:32.855717 | 2020-07-06T08:33:19 | 2020-07-06T08:33:19 | 277,480,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | from django.shortcuts import render
def home(request):
return render(request,'temphtml.html')
def solve1(request):
val1 = float(request.POST['num1'])
val2 = float(request.POST['num2'])
op = request.POST['op']
if(op=='+'):
ans = val1+val2
return render(request,'temphtml.html',{'res':ans})
elif(op=='-'):
a... | [
"goel136shefali@gmail.com"
] | goel136shefali@gmail.com |
17e41741acf2c53e5af3b84136bdd4fb2cea28cd | ed6b358cfaf9bc61dab608b117c2cf0abcf90854 | /xichuangzhu/controllers/user.py | 5cf56bb8f0920a95c7c74bd335ae0e05c71f22c6 | [] | no_license | wallaceyuan/xichuangzhu | faa8fdec2a670661165d351ac3311126c8fc91e3 | ec45aa8b3f4b1e6b9b70537e270be89e97034c99 | refs/heads/master | 2021-01-20T21:34:45.949361 | 2014-05-23T07:29:50 | 2014-05-23T07:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,729 | py | # coding: utf-8
from __future__ import division
from flask import render_template, Blueprint, g
from ..models import User, CollectWork, CollectWorkImage, Work, WorkImage, WorkReview
from ..utils import check_is_me
from ..permissions import user_permission
bp = Blueprint('user', __name__)
@bp.route('/<user_... | [
"hustlzp@qq.com"
] | hustlzp@qq.com |
702a70db4abd20986ee29956d55f77c6c0a6fe65 | aed1aad7de40bbd06bd95533e42bb349795cc9dc | /dpytools/menus.py | 08474ce95fa3dc7cbaa1474eeb861143de971488 | [
"MIT"
] | permissive | BotNC/dpytools | ef1e1efb86fa57748282927008f5bf69c22f3276 | acac1f18aaf734774826895f35943b540d111785 | refs/heads/master | 2023-05-04T15:36:32.062773 | 2021-05-17T04:13:41 | 2021-05-17T04:13:41 | 368,151,209 | 0 | 0 | MIT | 2021-05-17T10:52:07 | 2021-05-17T10:52:07 | null | UTF-8 | Python | false | false | 10,846 | py | # -*- coding: utf-8 -*-
"""
This module holds functions for displaying different kinds of menus.
All menus are reaction based.
"""
import asyncio
from copy import copy
from typing import List, Optional, Union
import discord
from discord import Embed
from discord.ext import commands
from discord.ext.commands import C... | [
"62080903+chrisdewa@users.noreply.github.com"
] | 62080903+chrisdewa@users.noreply.github.com |
e3fb004fa5df040901bc7c513e3f8b7adbd90b15 | 8b31681bd4352ced089ddd3c98ec0af95aa7f9ab | /python/django/bin/pip3.8 | 3aa59365dcfaac43bf799c8298139db0047fdb13 | [] | no_license | gcampa/tutoring | e91e2f34329c99381c3ee9fe0b312b573d0ed5f3 | e80f9d945d87cf8a759c2f1bdf4a9be1c4836141 | refs/heads/main | 2023-07-07T15:20:53.800273 | 2021-08-15T15:22:41 | 2021-08-15T15:22:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | 8 | #!/Users/ericel123/Documents/tutoring/python/django/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"ericel123new@gmail.com"
] | ericel123new@gmail.com |
021d4d6b0648bc241ba3b27dcad750941f8b51b9 | 8e8ccbf973ddc425fcb4470862b75e796a68848e | /BasicPython/list.py | fa0ad80c3e406fa85b1efcfe4aa844238708df4d | [] | no_license | PlabonKumarsaha/Linear-Regression-ML-Project- | 741cc3ed61adbf996b4bb6c19cff1394f1f5b082 | 89726cb8cf31fc480bb51368e464e0341147ec93 | refs/heads/master | 2021-07-20T06:54:22.473262 | 2021-05-12T18:10:02 | 2021-05-12T18:10:02 | 248,820,191 | 0 | 0 | null | 2020-03-20T17:59:40 | 2020-03-20T17:59:40 | null | UTF-8 | Python | false | false | 1,229 | py | class Person:
# __ is for encalpusaltion
def __init__(self, person_name: str, date_of_birth, height : int =120):
self.__name = person_name
self.__date_of_birth = date_of_birth
self.__height = height
def getName(self):
return self.__name
def setName(self, updat... | [
"noreply@github.com"
] | PlabonKumarsaha.noreply@github.com |
d6948cc313fa0512fc82294009144393cea255e2 | e13ee69afaa89364c622a98fd79cc738e4750efd | /jenkins_publisher_bitbucket/bitbucket.py | d0fad6548d2aeab23a0c50c5aca405a3203f8844 | [
"MIT"
] | permissive | bobtfish/jenkins-publisher-bitbucket | d0fdaa1ecbf9075389f83331b1403c8de70f698a | 7da8f5922195b89b5c1cf3e39ae1d1731382447d | refs/heads/master | 2021-01-23T09:45:34.572230 | 2017-09-06T11:32:43 | 2017-09-06T11:32:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,040 | py | import xml.etree.ElementTree as XML
def bitbucket_publisher(parser, xml_parent, data):
"""yaml: bitbucket
Example::
publishers:
- bitbucket:
notify-start: true
notify-finish: true
override-latest-build: false
credentials-id: <optional>
... | [
"tdoran@yelp.com"
] | tdoran@yelp.com |
31a4fa2f4e3d61e550041ea39e8c9d96f5eb0e47 | 860c16b6f4eb612f2f62a4ff073ad4b930eaa38a | /planscore/districts.py | 3968cb6d5de2eba3e2111de19d64cc011017ffb9 | [] | no_license | johndpope/PlanScore | d1f0c93e8e11e8ed7486a0932653c23b17c5eaaa | a0c62a4f75d577ee21c297199ce974cc8ec8167a | refs/heads/master | 2021-01-25T04:15:17.529051 | 2017-06-03T03:06:56 | 2017-06-03T03:06:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,508 | py | import collections, json, io, gzip, statistics, time, base64, posixpath, pickle
from osgeo import ogr
import boto3, botocore.exceptions
from . import prepare_state, score, data
ogr.UseExceptions()
FUNCTION_NAME = 'PlanScore-RunDistrict'
class Partial:
''' Partially-calculated district sums, used by consume_tiles... | [
"mike@teczno.com"
] | mike@teczno.com |
2175a66e56fec5a6b38b8d8c9b58684e11ae83a5 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02721/s005838488.py | 67b4f1efce6fc3f21eede2e8af273a37d4a09818 | [] | 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 | 344 | py | n , k , c = map(int,input().split())
s = input()
L = []
R = []
i = 0
j = n-1
while i<n and len(L)<k :
if s[i] == "o" :
L.append(i)
i += c
i += 1
while j>-1 and len(R)<k :
if s[j] == "o" :
R.append(j)
j -= c
j -= 1
R.reverse()
for x in range(k):
if R[x] == L[x... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
44e1bf520bea5d5ff5d78aace42d1de451a26c11 | bbdda19c16f20bd1682bdc4b3376fba865843b88 | /Trajectory Extraction/2) getDemographics.py | 0218eaa6e4ec634a755ae3e0a2c8ec19f698fae3 | [] | no_license | Aidan-Gilson/Opioid-Trajectories | 2784d124ac05c0e41c48c1d971350ef0f0d8f5f3 | 7a33f7c914faa8f883fc5295dcaf5e13a35c9140 | refs/heads/master | 2022-12-07T00:30:58.078263 | 2020-09-02T15:15:31 | 2020-09-02T15:15:31 | 292,317,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,580 | py | # Step 2
'''Extracts the demographic information from the CSV for all the patients who had at least one encounter in the Yale Healthcare system'''
import csv
import json
import math
patient_to_demographics = {}
demographics_to_patient = {}
races = set()
sexes = set()
ages = set()
# Groups the ages into decades of ... | [
"aidangilson@gmail.com"
] | aidangilson@gmail.com |
99aadc30ade96f7a2b39bb1935c8d592ccd03ed7 | 49a167d942f19fc084da2da68fc3881d44cacdd7 | /kubernetes_asyncio/test/test_policy_v1beta1_id_range.py | 6e5e62b8e765d805b6eb01144abad5213e8a04c2 | [
"Apache-2.0"
] | permissive | olitheolix/kubernetes_asyncio | fdb61323dc7fc1bade5e26e907de0fe6e0e42396 | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | refs/heads/master | 2020-03-19T12:52:27.025399 | 2018-06-24T23:34:03 | 2018-06-24T23:34:03 | 136,546,270 | 1 | 0 | Apache-2.0 | 2018-06-24T23:52:47 | 2018-06-08T00:39:52 | Python | UTF-8 | Python | false | false | 1,030 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import u... | [
"tomasz.prus@gmail.com"
] | tomasz.prus@gmail.com |
6528f2aef6ccb83cf7c93281d60781f7bd740da3 | 4912cbd47c19c58d142e6833911d70f5ea037357 | /question_bank/length-of-last-word/length-of-last-word.py | 802c71d7fdb456bf98226e268e3f524641dbadf5 | [
"Apache-2.0"
] | permissive | yatengLG/leetcode-python | a09a17cd9e60cafd9ff8ca9c068f5b70719c436f | 5d48aecb578c86d69835368fad3d9cc21961c226 | refs/heads/master | 2023-07-13T16:10:01.920716 | 2021-09-06T02:51:46 | 2021-09-06T02:51:46 | 286,969,109 | 13 | 6 | null | 2021-02-16T10:19:44 | 2020-08-12T09:13:02 | Python | UTF-8 | Python | false | false | 470 | py | # -*- coding: utf-8 -*-
# @Author : LG
"""
执行用时:32 ms, 在所有 Python3 提交中击败了96.39% 的用户
内存消耗:13.3 MB, 在所有 Python3 提交中击败了73.72% 的用户
解题思路:
见代码注释
"""
class Solution:
def lengthOfLastWord(self, s: str) -> int:
s = s.rstrip(' ') # 去除右侧空格
words = s.split(' ') # 以空格划开单词
return len(words[-1]... | [
"767624851@qq.com"
] | 767624851@qq.com |
f547fc4a4459306a8df8fb1167c77c44aebd7a83 | 7b84194c9f2cf36d0f287ea1ab261871d23d2b36 | /CININ_cluster/tranceiver.py | 840dfc1f68c87a10af3fd8a6036e24b4fb37a24e | [] | no_license | saizhang0218/CININ | 0c1242771cf14c27561d45eb0d4c91d3f0635147 | 8080e0d9ded4e893ff15439c69359edbf4934aa7 | refs/heads/master | 2020-09-22T14:40:56.195042 | 2019-12-05T07:11:40 | 2019-12-05T07:11:40 | 225,243,390 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,909 | py | import time
import socket
def rec_UDP():
UDP_PORT = 8810
UDP_IP = "0.0.0.0"
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
data = "".encode()
counter = 0
#while (data.decode())!="FINISH!":
while (counter<100):
data, addr = sock.recvfrom(1024... | [
"noreply@github.com"
] | saizhang0218.noreply@github.com |
c7dc9b5a1a8d2b3ad996bdd6dafd48b86bcfc5c6 | dac595b344f486f8eda9d812052a6e414401880f | /first-tensorflow-neuronal-net.py | 17b4c588f503d92085d13f43a5bc68f1e364d1f6 | [
"MIT"
] | permissive | Vergil592/first-tensorflow-neural-net | e9b4bd74d866dd1fbf9cc9bd0d038a58df526bc4 | 4c1013ebc202438da549821dcd1170ccc5489319 | refs/heads/master | 2020-03-14T10:41:46.814380 | 2018-05-22T20:34:18 | 2018-05-22T20:34:18 | 131,573,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,908 | py | import matplotlib.pyplot as plt
import tensorflow as tf
# import numpy as np
from sklearn.model_selection import train_test_split
from generate_data import *
if __name__ == '__main__':
# Number of row per class
row_per_class = 200
# Number of hidden neur
nb_hidden_neur = 3
# Gene... | [
"noreply@github.com"
] | Vergil592.noreply@github.com |
6bcccf0e1056a8d1dbff85a195eca7d20e39a5f7 | a27901490fe12dfe9c09cfab7319fa214ea84944 | /hadoop习题1.py | 634a2f69360d1545af91cac7d8645fca48faf1f9 | [] | no_license | emilyzhang2016/python | ebe0f8aed6d2f84befd36e553d5d5f380001b940 | 06800e787dbc42435e4a27f53c1cbe7015c93e90 | refs/heads/master | 2021-01-18T03:57:43.105728 | 2017-03-22T09:11:02 | 2017-03-22T09:11:02 | 85,774,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | #coding:utf-8
import sys
pre_product_no = ""
pre_lac_id = ""
pre_start_time = ""
pre_staytime = 0
pre_moment = ""
pre_user_id = ""
pre_country_id = ""
pre_city_id = ""
def process(line):
global pre_product_no
global pre_lac_id
global pre_row_list
global pre_staytime
global pre_moment
global pre_user_id... | [
"303191026@qq.com"
] | 303191026@qq.com |
2a70f939bb918247a58b5f730b01e761da755f2d | 0a6f1217573c4f307bd9e7516f1c9c69ca6f55af | /migrations/versions/fc5a80c372d5_.py | 2742c32e2cc1ef9bad0fc8381a4b05a39b18fa28 | [] | no_license | linekermsouza/todoapp | 5c9ec9d0f365b6df54555241c1b8ab9fe5b365fe | 3baf76763f6269371e9144bed1ef200a5524518e | refs/heads/master | 2023-05-31T20:46:30.343353 | 2021-07-05T00:02:30 | 2021-07-05T00:02:30 | 382,725,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 790 | py | """empty message
Revision ID: fc5a80c372d5
Revises: 13a457bafd6b
Create Date: 2021-07-03 21:43:33.603249
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fc5a80c372d5'
down_revision = '13a457bafd6b'
branch_labels = None
depends_on = None
def upgrade():
# ... | [
"linekermsouza@gmail.com"
] | linekermsouza@gmail.com |
6ef1cd3f1417f100c9ab4f5ac11bb974ecbe5dc1 | a29f5c26a248cde56230e6927327374c025fd8e2 | /interviews/tests.py | d10c26b4d103d41a25eb1b6e313ddda14dc5b514 | [
"MIT"
] | permissive | Fabrice-64/advocacy_project | c30d737b25416043ed1b3c2ff19c28a1ccb94602 | 33eb8b71e057ea197be578020436defb015fa000 | refs/heads/master | 2023-06-02T08:38:44.276478 | 2021-06-16T10:29:01 | 2021-06-16T10:29:01 | 347,987,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,881 | py | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.urls import reverse, reverse_lazy
from . import views as views
from .models import AdvocacyTopic, Interview
from accounts.models import CustomUser, Volunteer
from offici... | [
"fab.jaouen@gmail.com"
] | fab.jaouen@gmail.com |
9a6d6d49eb6c478512af36816a3c6cbe130b178f | 35fa487f9dc07edfd6807a539fc10847338c082b | /clients/platform/v0/python/platform_pb2.py | 293d9d62f81906e4eb86ea1b34d9034281dd7701 | [
"MIT"
] | permissive | jantmueller/dapi-grpc | 55c59119879b9f8fbd13efe1f9b98df81cb64893 | 91d890d899a9fff0157b26d5b1df1c0114005244 | refs/heads/master | 2023-08-11T02:14:10.183853 | 2021-07-08T14:58:11 | 2021-07-08T14:58:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 59,765 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: platform.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 google.protobuf import reflection as _refl... | [
"noreply@github.com"
] | jantmueller.noreply@github.com |
9528815931cd48d687323138b85eab5bbf1e62c0 | 53690e2bc3245516cad611a3e7c09f39cc40ef81 | /ry_booking/ry_config.py | f49a612c37161ab9230d7d6390bb8ac359c45408 | [] | no_license | ashokdhudla/openerp | 109d3eefbea2c8dcbe79cdb4041977655ce9f7c7 | dc84b57a02d519b23354c16d437ed3bfb8e417aa | refs/heads/master | 2021-01-01T18:55:50.943047 | 2015-02-06T10:54:48 | 2015-02-06T10:54:48 | 28,812,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,097 | py | from openerp.osv import fields, osv
from openerp.tools.translate import _
import datetime
from openerp import tools
import time
from datetime import date, timedelta
class yacht_config(osv.osv):
def _show_bookings(self, cr, uid, ids, name, args, context=None):
res = {}
c_ids = self.pool.get('booking.yachts').sear... | [
"techanipr@techanipr.(none)"
] | techanipr@techanipr.(none) |
3e99bde13b9275c37392065bcce7d9a4fb67e948 | 3de2a746243ad1cb000994a06a0f9699db9a901f | /agc016a.py | 049fcd1810826d416cc69758d1fa09b721e56213 | [] | no_license | takumi152/atcoder | 71d726ffdf2542d8abac0d9817afaff911db7c6c | ebac94f1227974aa2e6bf372e18605518de46441 | refs/heads/master | 2022-10-30T12:14:41.742596 | 2022-09-29T19:49:32 | 2022-09-29T19:49:32 | 181,502,518 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 937 | py |
def main():
buf = input()
s = buf
characters = []
for i in s:
if not i in characters:
characters.append(i)
min_iter_count = 999
for i in characters:
iter_count = 0
t = s
while True:
flag = False
new_t = ""
... | [
"takumi152@hotmail.com"
] | takumi152@hotmail.com |
ad2446622a7dd1f3f7e6f4ac47d23ce5415341b0 | 5aaa4918e58b6633eef8f8aa4aa77c8aacc27849 | /Project1/python_implementation/stop_and_wait/middleware.py | 24f47e148eb1a8ce84bd8a1f20e7343d67bf3ddd | [] | no_license | mariosangelis/Distributed-Systems-Projects | 1ec24322df1c161b3f29dda435a396167d1d5909 | e905ec0ff6f798c268d60bc14641454cc96180ab | refs/heads/main | 2023-06-08T08:12:07.334348 | 2021-06-26T20:40:53 | 2021-06-26T20:40:53 | 353,731,206 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 17,965 | py | #Asynchronous request-reply model with semantics at most once and load balancing service
#Angelis Marios-2406
import socket
from socket import AF_INET, SOCK_DGRAM
import pickle
import threading
import time
import random
import struct
lock = threading.Lock()
sender_list=[]
receiver_list=[]
reply_list=[]
sequence_number_... | [
"noreply@github.com"
] | mariosangelis.noreply@github.com |
1b3c6d0ec8e357e208aa8edce82ca2abb2d6f309 | f5007de9aa601d2507d60acad21890e929847c06 | /traffic_light_classification/tl_classification.py | 9ef0bc392d3af71e6dee1870efc4a6dd2af34f23 | [] | no_license | sundar3112/Traffic-Light-Classification-using-Neural-Networks | a47e9f763210ce6011686551a07bfcebcce6868c | 957f938264fa23292ff77f61d865738e64047ed9 | refs/heads/master | 2022-11-12T18:46:42.517905 | 2020-07-02T10:24:31 | 2020-07-02T10:24:31 | 276,615,332 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,144 | py | import numpy as np
import matplotlib.pyplot as plt
import os, time
import random
import glob
import cv2
from sklearn.preprocessing import LabelBinarizer
from sklearn.cross_validation import train_test_split
import keras
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from ... | [
"sundar.kannan76@gmail.com"
] | sundar.kannan76@gmail.com |
0b7ee26886f4f9e94c9d8d1ccee28f0e3eeef598 | 286ae27eccd770c7f01abc998293dcba48239582 | /EShop/forms.py | a6e26e7f13db7e41276a000a7562dc4a40bfcad8 | [] | no_license | alexsandrinia/djangoshop | 1b0f468276845901bb6b638a6c984eb0e4b67334 | d598b3704cc57b865fac5a3f8a0b2b3c361d7754 | refs/heads/master | 2020-04-09T19:56:26.195767 | 2018-12-05T18:00:19 | 2018-12-05T18:00:19 | 160,558,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,046 | py | #-*- coding: utf-8 -*-
from django import forms
from django.utils import timezone
from django.contrib.auth.models import User
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget = forms.PasswordInput)
def __init__(self, *args, **kwargs):
super(LoginForm, self).__init__(*arg... | [
"alexsandrinia@gmail.com"
] | alexsandrinia@gmail.com |
d0a9f0186567fd5f7c2ac16546562ad0b95fd604 | fe29f99c072c23d6b2277a18bf946469dfdd44f4 | /models/train_classifier_random_forest.py | e705b5d89b13541dedcbfc428c3be95a4d50790a | [] | no_license | lisfon/Disaster-Response-Pipeline | 037bc7257efc7c965fd983eab95b7c595bf8e305 | 88d47181b856c9fbb2d701f25afa7603376f00cb | refs/heads/main | 2023-03-01T22:10:23.941331 | 2021-02-05T17:14:53 | 2021-02-05T17:14:53 | 334,662,107 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,071 | py | import sys
import pandas as pd
import numpy as np
import nltk
import re
import pickle
from sqlalchemy import create_engine
nltk.download(['wordnet', 'punkt'])
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from sklearn.pipeline import Pipeline, FeatureUnion
from sklearn.feature_extracti... | [
"noreply@github.com"
] | lisfon.noreply@github.com |
fee3cffcb228633e1b9f6ead7560f7d86ce2e990 | c1e5c036c0edb31947bde9785f66f2dc9b302d26 | /OpenCV_Python_Tutorials/04. Image Processing in OpenCV/video.py | 2609c542677acee6e8c6d70553baef56487f8cdd | [] | no_license | bonghanwith/study_python_opencv | 0462d3e73d1d511b38b435d817bf5322dfafd3f1 | 4d717ed575935eb48b9f6a419b518fbb33c3c68b | refs/heads/master | 2020-03-30T07:19:08.818496 | 2018-12-04T12:20:26 | 2018-12-04T12:20:26 | 150,931,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,064 | py | #!/usr/bin/env python
'''
Video capture sample.
Sample shows how VideoCapture class can be used to acquire video
frames from a camera of a movie file. Also the sample provides
an example of procedural video generation by an object, mimicking
the VideoCapture interface (see Chess class).
'create_capture' is a conveni... | [
"bonghanwith@gamil.com"
] | bonghanwith@gamil.com |
df9fa59d0c39ecde8e9b13f6e6f770c8407bcb92 | 24ce5a9988aa0b1b6b57746a93a8fe2b7c7554bc | /scrna_pipeline/nebula/smart-seq2/old_pipeline/scripts/umi_counts.py | f8b3d97be8006d0673e7e1bbb9063878365f959b | [
"MIT"
] | permissive | JarningGau/NGS_pipeline | 7394a3ecc3158fa396c0ff3ed363084e910742d0 | 0e9012f4e68bbc8ce2b1c2f1df5af012e68e0ba2 | refs/heads/master | 2020-07-07T13:35:45.357610 | 2019-09-06T11:35:35 | 2019-09-06T11:35:35 | 203,363,367 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | import sys
counts = {}
if len(sys.argv) > 1:
file_in = sys.argv[1]
with open(file_in) as fi:
for line in fi:
fields = line.strip().split("\t")
key = "\t".join(fields[0:2])
counts[key] = counts.get(key, 0) + int(fields[-1])
else:
for line in sys.stdin:
... | [
"jarninggau@gmail.com"
] | jarninggau@gmail.com |
7c59e31ca0d13b28a24fab145e51eb8cfcda9c53 | 1aa9bf1de3c7ede88a109c603651758cb9e9f987 | /monitor/monitor_test.py | 3e136711058a569ca51a592ed69aa5e3fb5f0636 | [
"Apache-2.0"
] | permissive | nickbattam/picamon | 906990d75e2443cf1635bc2a5baa1503a343a5f4 | 3c554f5dc203e614c72c75086e67ed6fe45d5992 | refs/heads/master | 2020-05-22T02:45:41.161405 | 2018-01-16T11:19:54 | 2018-01-16T11:19:54 | 30,070,108 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,739 | py | #!/usr/bin/python
import unittest
from mock import patch, MagicMock, PropertyMock
from monitor import Monitor
class MonitorUpdateTest(unittest.TestCase):
def setUp(self):
with patch('monitor.pv.PV'):
mock_plotter = MagicMock()
self.monitor = Monitor("MYNAME", mock_plotter)
... | [
"nicholas.battam@diamond.ac.uk"
] | nicholas.battam@diamond.ac.uk |
bc302fa0a64682905a0fdd94ab2a654da7f34c8d | 0653882a76da71bc7068d6f4698d45982f1c19b8 | /client/frame/create_room.py | d406442eb78a4c5ff9ac72906b1704878e4fefc9 | [
"MIT"
] | permissive | firmanmm/tic-tac-royale | b655ecbfffc154f1d20cfa3333c7f3ebf10e8a61 | 83c3bb88cd31a34eeceeac3d42aaa302598f52e9 | refs/heads/master | 2020-09-21T22:57:08.694306 | 2019-12-13T01:37:41 | 2019-12-13T01:37:41 | 224,962,869 | 0 | 0 | MIT | 2019-12-13T01:37:42 | 2019-11-30T05:11:24 | Python | UTF-8 | Python | false | false | 1,692 | py | import tkinter as tki
import tkinter.font as tkf
import tkinter.ttk as ttk
import client.asset.font as fontMod
import client.frame.base as baseMod
import client.frame.stack as stackMod
import client.client as clientMod
class CreateRoom(baseMod.IBase):
def __init__(self, stackFrame: stackMod.FrameStack, client: cli... | [
"maulana.firman56@gmail.com"
] | maulana.firman56@gmail.com |
db98b0a26f25a423e53c03f1992c31d9045d7c35 | e726ab798046af263e4c922c9c7353328b09ca89 | /deep_networks/models/dragan.py | 1cebca01cbcee1074de33ef00cdef7e9aafb799f | [
"Apache-2.0"
] | permissive | se4u/DeepNetworks | 2cfdeb9bdac220b216c104517b9a159a5a1400f6 | 693db0a0148f425b5dbe8d1c69d069dfcf3b6e76 | refs/heads/master | 2020-03-28T09:41:54.490881 | 2018-09-18T20:50:37 | 2018-09-18T20:50:37 | 148,052,896 | 0 | 0 | Apache-2.0 | 2018-09-09T18:15:29 | 2018-09-09T18:15:29 | null | UTF-8 | Python | false | false | 10,937 | py | """
Deep Regret Analytic Generative Adversarial Networks
"""
import datetime
import os
import numpy as np
import tensorflow as tf
from .base import GANModel
from .blocks import BasicGenerator, BasicDiscriminator
from ..ops import dragan_perturb
from ..train import IncrementalAverage
class DRAGAN(GANModel):
def... | [
"shaform@gmail.com"
] | shaform@gmail.com |
5949569198170da10d527c6b7fb581b0101e701b | 443ef092fd2870cca9d87211e53419418be70857 | /tor_async_couchdb/async_model_actions.py | 9c773536348ec152601e8ff42a6f9c963c180331 | [
"MIT"
] | permissive | djoume/tor-async-couchdb | b0479c404a785a1831bf7d02efe3328c132c7beb | 2c9483b20477c592b94e264a81f2f291eaf60c45 | refs/heads/master | 2021-01-21T23:23:22.892658 | 2015-05-04T12:07:27 | 2015-05-04T12:07:27 | 35,057,252 | 0 | 0 | null | 2015-05-04T20:19:46 | 2015-05-04T20:19:46 | null | UTF-8 | Python | false | false | 14,434 | py | """This module contains a collection of classes that implement
Tornado async actions against CouchDB.
"""
import httplib
import json
import logging
import urllib
import tornado.httputil
import tornado.httpclient
import tamper
_logger = logging.getLogger("async_actions.%s" % __name__)
"""```database``` points to a ... | [
"simonsdave@gmail.com"
] | simonsdave@gmail.com |
171430aa6e72848779736e903cf664b836f0d045 | 9ab9d9a3883471763edbceea59a0e83170581b5f | /eggs/Parsley-1.1-py2.7.egg/terml/test/test_terml.py | efb9991a475a1bc684728f0d8bc302bd17366807 | [
"CC-BY-2.5",
"AFL-2.1",
"AFL-3.0",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | asmmhossain/phyG | 24dc211dad5b3e89c87ff384e841f2e98bbd52db | 023f505b705ab953f502cbc55e90612047867583 | refs/heads/master | 2022-11-21T12:43:46.172725 | 2014-02-14T12:33:08 | 2014-02-14T12:33:08 | 13,800,552 | 0 | 1 | NOASSERTION | 2020-07-25T21:05:41 | 2013-10-23T11:04:25 | Python | UTF-8 | Python | false | false | 6,108 | py | from twisted.trial import unittest
from ometa.runtime import ParseError
from terml.nodes import Tag, Term, coerceToTerm, TermMaker
from terml.parser import TermLParser, character, parseTerm
class TermMakerTests(unittest.TestCase):
def test_make(self):
m = TermMaker()
t1 = m.Foo(1, 'a', m.Baz())
... | [
"mukarram819@gmail.com"
] | mukarram819@gmail.com |
3a857eb9827e5248085daa2c2f6dd53371617c84 | 18bcf8301ac258aa1c099576161c6a24417587f2 | /mycode-python/added/Problem24_swapPairs.py | ce31c137e8b11c1f4c7904e47301efbf54ec1184 | [] | no_license | gyx2110/algorithm-book | 5247201100a0dc349331b8eed1c04280ee9fad40 | 08e57726e0c44378be093609a06f9d2b9155d47a | refs/heads/master | 2020-05-09T16:09:58.423406 | 2019-11-12T12:29:33 | 2019-11-12T12:29:33 | 181,260,817 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | class Solution(object):
def swapPairs(self, head):
if head==None or head.next==None:
return head
next = head.next
head.next = self.swapPairs(next.next)
next.next = head
return next | [
"gyx2110@163.com"
] | gyx2110@163.com |
2afec0880233957053d99cc89542fbbcff82e3ec | e870032a1a2ef79765e1c5d420478c15c6162dae | /translation.py | abe7eb061cfd102510ad625eb66f3c4f5c5a9348 | [] | no_license | TianTianForever/python_test | b8050e80f4754bd90661a88c4d235a261c6aa88a | da779ff314c361fc49c08df9b7fc2a36a9e44030 | refs/heads/master | 2020-05-21T20:51:37.856849 | 2017-03-10T13:31:00 | 2017-03-10T13:31:00 | 64,821,934 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | #_*_coding:utf-8_*_
#author:tiantian
import requests
class youdao_date():
def __init__(self,parm):
self.form_data = {}
self.form_data['type'] = 'AUTO'
self.form_data['i'] = parm
self.form_data['doctype'] = 'json'
self.form_data['keyfrom'] = 'fanyi.web'
self.form_data[... | [
"2890339972@qq.com"
] | 2890339972@qq.com |
3e7b548f6b5cdbd48c47d9c85724e93cbb569120 | 2b25aae9266437b657e748f3d6fea4db9e9d7f15 | /graphics/line/4/richard-zhan/main.py | 543aa01f31e1d50c82c08b4e4ca0d48c0b406554 | [] | no_license | Zilby/Stuy-Stuff | b1c3bc23abf40092a8a7a80e406e7c412bd22ae0 | 5c5e375304952f62667d3b34b36f0056c1a8e753 | refs/heads/master | 2020-05-18T03:03:48.210196 | 2018-11-15T04:50:03 | 2018-11-15T04:50:03 | 24,191,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | from display import *
from draw import *
screen = new_screen()
color = [ 0, 255, 0 ]
matrix = []
#octant I
# add_edge(matrix, 0, 0, 0, XRES - 1, YRES - 75, 0 )
# add_edge(matrix, 0, 0, 0, XRES - 75, YRES - 1, 0 )
# add_edge(matrix, 0, YRES - 1, 0, XRES - 1, 75, 0 )
# add_edge(matrix, 0, YRES - 1, 0, XRES - 75, 0, 0 ... | [
"azilby@gmail.com"
] | azilby@gmail.com |
3ced8e8db5b35b2e309d07ef0a3f4466418f47cd | 6b0cc1bef24bd56a907447909d0387f075387a65 | /fold_class_v06/parent_package/package2/format_expression.py | e6e24aa5f834a76369cca61ed695d9239c0b6edf | [] | no_license | vilerts/lu_python | 416112e5be6207450cc2da3c4d6fa177c1b2bbbd | 7be1501b160ffc6ce7e7a1b95c0db8eaca426934 | refs/heads/main | 2023-04-01T08:44:56.852219 | 2021-04-10T11:46:57 | 2021-04-10T11:46:57 | 338,582,304 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 89 | py | def formatResult(var1,var2,operator,result):
return f"{var1}{operator}{var2}={result}"
| [
"noreply@github.com"
] | vilerts.noreply@github.com |
e843c39e8e4989e30428e9ca261411b48af05bc5 | c0450361aa707635f5bf70eff21c1235d7e60cfa | /Lessons by HoudyHo/lesson (32).py | c992dd1dcb5591096afb4678ee5bf2a1ecc56285 | [] | no_license | zarkaltair/Learn-python | f48810b86e9832f4c364c345d1fa8624f9ced683 | dd6114b5bd6cc30eff328002521041dd2be2c3c5 | refs/heads/master | 2020-04-10T05:48:51.052751 | 2019-01-23T18:48:34 | 2019-01-23T18:48:34 | 160,837,639 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 911 | py | # Class
class Cat:
def __init__(self, color, legs):
self.color = color
self.legs = legs
felix = Cat('ginger', 4)
print(felix.color)
rover = Cat('dog-colored', 4)
stumpy = Cat('brown', 3)
class Student:
def __init__(self, name):
self.name = name
test = Student('Bob')
print(test.name)
class Dog:
def __init__(s... | [
"zarkaltair@gmail.com"
] | zarkaltair@gmail.com |
774306cf9ce344f307f4521dcbba6affcc217381 | 1f2b8c070eee289bb62b290148c5e56f9a5a0c0c | /tests/linker_test.py | a7b135a09ad0e62d67111a2a51e5a81b1a883dac | [
"MIT"
] | permissive | albert12132/templar | 15c134d499edaada69404cf742e7a5a4b61831de | 39851c89730ab69e5c73d0a46adca2a44ecc4165 | refs/heads/master | 2021-05-16T02:39:12.561228 | 2016-10-08T03:54:03 | 2016-10-08T03:54:03 | 19,789,382 | 6 | 6 | MIT | 2021-03-19T21:29:09 | 2014-05-14T17:36:49 | Python | UTF-8 | Python | false | false | 14,073 | py | """Tests template/linker/blocks.py"""
from templar.linker import link
from templar.linker import get_block_dict
from templar.linker import Block
from templar.linker import SourceNotFound
from templar.linker import InvalidBlockName
from templar.linker import IncludeNonExistentBlock
from templar.linker import CyclicalIn... | [
"joyyjeng@gmail.com"
] | joyyjeng@gmail.com |
90fb3d0f41e8ef893dcba8eb07565e63eab33256 | 66c3ff83c3e3e63bf8642742356f6c1817a30eca | /.vim/tmp/neocomplete/include_cache/=+home=+abel=+proyectos=+django=+ventas=+ventas=+settings.py | 8daa573333992dd219d46614e2d6841793e10cab | [] | no_license | pacifi/vim | 0a708e8bc741b4510a8da37da0d0e1eabb05ec83 | 22e706704357b961acb584e74689c7080e86a800 | refs/heads/master | 2021-05-20T17:18:10.481921 | 2020-08-06T12:38:58 | 2020-08-06T12:38:58 | 30,074,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,305 | py | [{'word': 'ALLOWED_HOSTS', 'menu': '[I]', 'kind': 'v', 'abbr': 'ALLOWED_HOSTS = []'}, {'word': 'BASE_DIR', 'menu': '[I]', 'kind': 'v', 'abbr': 'BASE_DIR = os.path.dirname(os.path.dirname(__file__))'}, {'word': 'DATABASES', 'menu': '[I]', 'kind': 'v', 'abbr': 'DATABASES = {'}, {'word': 'DEBUG', 'menu': '[I]', 'kind': 'v... | [
"pacifi.bnr@gmail.com"
] | pacifi.bnr@gmail.com |
db45c78033020a746d2e7734111dba877b1ecbdb | f5dd289bb6b333a7df9edfa105f19486a93f5be4 | /460/LFU.py | 1ec3918ad0088f02546f99230cd6fa26fc1009c2 | [
"Apache-2.0"
] | permissive | cccccccccccccc/Myleetcode | 0ab50ba5303ed08fac8402c87efedebc6bf67c16 | fb3fa6df7c77feb2d252feea7f3507569e057c70 | refs/heads/master | 2023-07-03T21:11:54.050252 | 2021-08-11T08:26:01 | 2021-08-11T08:26:01 | 115,370,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 617 | py | from collections import defaultdict
class LFUNode:
def __init__(self,key,value):
self.key = key
self.value = value
self.frequency = 0
class LFUCache:
def __init__(self, capacity: int):
self.capacity = capacity
self. minfrequency = 0
self.keynodedict = defaultdic... | [
"chenzhang.1987@gmail.com"
] | chenzhang.1987@gmail.com |
6a46f8cc6eb16b2ec4bf357f10a6e5aa28cace39 | 9d9e8226a5b040d94abdfc47c12040defd6776d7 | /p6.py | 5d1fe307a478b12eff666a1a460d80282511ef51 | [] | no_license | Maelstroms/euler | 2903e1d2bbf39933e92d36475c2d2df0e24f10a7 | 4bb626853a5a5d349e801900a5054904c2f7eee3 | refs/heads/master | 2021-01-23T01:18:36.714339 | 2017-07-03T19:35:59 | 2017-07-03T19:35:59 | 92,866,279 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 271 | py | """
Problem 6 of project Euler
"""
def diference_squares(num):
ra = range(num + 1)
sum_squares = 0
sum_squared = 0
for i in ra:
sum_squared += i
sum_squares += (i **2)
sum_squared **= 2
dif = sum_squared - sum_squares
return dif
print diference_squares(100) | [
"workpartystudy@yahoo.com"
] | workpartystudy@yahoo.com |
bf6f219b69f2e6d6e24d476efa5c021d9bc1d92f | 7ee943cb36255907ec4e4dfadfee34b8f485473e | /main.py | 92bf6d92b8e9b94210e17a806760547fbfb36b16 | [] | no_license | fatmaerciyas/game-without-interface | 90678a31c0c71592eeda5911bee597d8e76faf7d | 301c4fdd7bd9562b9ef6376a45489bebf1bd1d6a | refs/heads/master | 2022-11-03T12:10:13.025610 | 2020-06-13T17:23:10 | 2020-06-13T17:23:10 | 272,053,781 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,663 | py |
import tkinter as tk
from tkinter import *
import random
# Not: matris yamuk gibi gözükebilir gemileri str tanımladığım için öyle gözüküyor indisleri sayarsanız yamuk değil
oyun = 1
while (oyun == 1):
print("Amiral battı oyununa hoşgeldiniz :)")
secim = int(input("\nGizli modda oyun oynamak için 1'... | [
"noreply@github.com"
] | fatmaerciyas.noreply@github.com |
9928c4cc6efb6b7274a6aa1b238922962ddeedbf | 787db937312b0127988c2f78870827d727201cfc | /linkedlist.py | 8d6343512ee64a6a17a2beb2422d10173e300bd8 | [] | no_license | laurenpritchett/cs-data-struct-1 | a5b8ba8e0ba821fa40ca37274d6b78bb208e38fe | 9acae69b2d481e03b2336f0e37200617f2206e4f | refs/heads/master | 2021-01-21T06:38:15.487331 | 2017-02-27T02:27:07 | 2017-02-27T02:27:07 | 83,259,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,446 | py | # Linked list with Node/LinkedList classes
class Node(object):
"""Node in a linked list."""
def __init__(self, data):
self.data = data
self.next = None
def __repr__(self):
return "<Node %s>" % self.data
class LinkedList(object):
"""Linked List using head and tail."""
d... | [
"laurenpritchett2@gmail.com"
] | laurenpritchett2@gmail.com |
f199844d7cc3107bc0fd2744be8200abdcdecb19 | 583c9e181f78ce10900d6b33b7396504404319d0 | /todos/views.py | 5115b8e8539e6269e7ca14f7064cf9d263c59798 | [] | no_license | personalcomputer/sql_api_framework_poc | 28befa67ff241f019cb3cce45cf5e54876ae6e27 | d2e65a67cbb9fd54715ced0d69c4e28fca8ddbed | refs/heads/master | 2021-07-11T19:08:55.449192 | 2021-07-08T22:37:13 | 2021-07-08T22:37:13 | 170,656,258 | 0 | 0 | null | 2021-07-08T22:37:35 | 2019-02-14T08:35:04 | Python | UTF-8 | Python | false | false | 1,866 | py | from sql_api_framework.exceptions import ValidationError
from sql_api_framework.serializers import Field, PointField, Serializer, StrField
from sql_api_framework.views import ViewSet
from todos.models import Location, TodoItem
class LocationSerializer(Serializer):
fields_spec = [
StrField('id'),
F... | [
"personalcomputer@users.noreply.github.com"
] | personalcomputer@users.noreply.github.com |
8a739db5df617751d89ed141e261859d6d87bd86 | 74156fe6808e7fc15ec7b049a4efd60b4aba5017 | /module2-oop-code-style-and-reviews/class/fauna.py | dafffe093dce8ec8b20c2556f10c47b2fc8ce515 | [
"MIT"
] | permissive | llpk79/DS-Unit-3-Sprint-1-Software-Engineering | 4ab6a1526568070f837b2ee566e2bbb45f381817 | b5401ae6018ad098435ea61d95173eb87bb74b9b | refs/heads/master | 2020-06-17T10:07:07.846384 | 2019-07-16T00:39:08 | 2019-07-16T00:39:08 | 195,891,721 | 1 | 0 | MIT | 2019-07-08T22:00:35 | 2019-07-08T22:00:35 | null | UTF-8 | Python | false | false | 1,020 | py | class Animal:
"""Base class for Animals.
Instance variables:
- name: str
- age: int
- position: 0
"""
hair = None
scales = None
def __init__(self, name, age):
self.name = name
self.age = age
self.position = 0
def move_up(self):
self.position +... | [
"pkutrich@gmail.com"
] | pkutrich@gmail.com |
7c0f5c4952dfdf5372682e284f19b270209d51a5 | 76e7cf74e14c12f5d5ca6c14ae97073dd1e92e64 | /analyze_weber_study.py | 5fe7d938d3e5da27a5db7a01a06aa4f008fd873f | [
"MIT"
] | permissive | musslick/DARTS-Cognitive-Modeling | bac38faa837e7d41598a6c0a98244e32627b26d3 | f38e7e34f6f20c1626458de62503e8670e06be7c | refs/heads/main | 2023-04-13T22:15:53.044314 | 2021-04-23T12:18:01 | 2021-04-23T12:18:01 | 360,868,887 | 0 | 0 | null | 2021-04-23T12:02:05 | 2021-04-23T11:59:09 | null | UTF-8 | Python | false | false | 6,139 | py | from AER_theorist.darts.plot_utils import generate_darts_summary_figures, plot_model_graph, load_model
from AER_experimentalist.experiment_environment.participant_weber import Participant_Weber
from AER_experimentalist.experimentalist_popper import Experimentalist_Popper
from AER_experimentalist.experiment_environment.... | [
"sebastian@musslick.de"
] | sebastian@musslick.de |
feda66fc146af78407172506a125300af20c439c | ef0bca6be87d9d128b917cf04b3276c6cfbc92d4 | /file_conversion/unlinked_snps_to_genepop.py | 0d7c71a17da30bd3f82159307c30d8b9d637f83d | [] | no_license | brunoasm/rad_palm_weevil | 723e8d077705d6cbe05c98d3c53ee3d4672f573d | d991703c73e4c3d121667116278690478d9a0a3d | refs/heads/master | 2023-01-31T20:02:02.324713 | 2020-12-15T07:21:24 | 2020-12-15T07:21:24 | 267,647,755 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,422 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
This script produces a genpop file from a phylip file in which columns are unlinked snps
If desired, a file with population assignments can be provided (following the same format as ipyrad's population assignment file)
written by B. de Medeiros, starting in 2015
parts... | [
"souzademedeiros@fas.harvard.edu"
] | souzademedeiros@fas.harvard.edu |
08388f40f96262e48a825ed8578c70f7e147a701 | 66fe4dbcb81ceb688fa557c9a05a92779bd4e263 | /config/config.py | 97c447221012cfb133c0e71153480f5577f69a13 | [] | no_license | AdamEECS/sc | 5d3e98d697dd891dfdbae910d0167a0ce1082f19 | 387930acb7af4c04b39415e923639cad458fda09 | refs/heads/master | 2021-01-01T06:28:18.465633 | 2018-08-16T07:56:35 | 2018-08-16T07:56:35 | 97,430,842 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,265 | py | from pymongo import *
import os
config_dict = dict(
USER_AVATAR_DIR='static/user_avatar/',
PRODUCT_PIC_DIR='static/product_pic/',
UPLOAD_FILE_DIR='static/files/',
PRODUCT_PIC_EXT='png',
CDN_URL='http://opguqe876.bkt.clouddn.com/',
CDN_USER_AVATAR_DIR='/user_avatar/',
CDN_PRODUCT_PIC_DIR='/p... | [
"jrgwyz@163.com"
] | jrgwyz@163.com |
44ab4f6367ddb06bddd4576c24cc0684c5ba3447 | 5719b38ca26780dcd7c68d77673bfa915e761d1d | /site_scrapers/scraperlib/manager.py | 26257dbcf93d9a086773aa2f07004b4cdd9b0df8 | [] | no_license | jwin4740/evantome | c6a012fcd831fd9b087e913bd6ae2f0180a0a64d | 1197ee949d66651d1d843e5df67a5d8d7527b154 | refs/heads/master | 2021-08-30T08:50:40.859499 | 2017-12-17T03:37:10 | 2017-12-17T03:37:10 | 114,503,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | from scraperlib import scraperutils
from scraperlib import config
import os
class ScraperManger:
def __init__(self):
self.SITE_NAME = os.path.split(os.getcwd())[1]
cm = config.ConfigManager()
self.db = cm.get_mongo()
self.categories = self.db[self.SITE_NAME + '_categories']
... | [
"jwinham4740@gmail.com"
] | jwinham4740@gmail.com |
beb5886b6bb03f8e0149d52f247c773ab8efa39e | 0789766b3f242835f3c4e03e573f4d2fa3ebbc5a | /my_nas/dataset/imagenet_downsample.py | c2d73f91310cc798966575e69aef00dd70867fed | [] | no_license | Anonymous-1112/anonymous | 05900a2a5feba3a48ad76847a22a8c3a3f35b2e1 | d86ec6b35b681c9220150c68bb5eb10af26f5629 | refs/heads/master | 2023-07-01T19:49:57.400134 | 2021-08-08T15:29:12 | 2021-08-08T15:36:56 | 393,964,141 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,872 | py | # -*- coding: utf-8 -*-
import os
import pickle
from PIL import Image
import numpy as np
from torchvision import transforms
from torchvision.datasets import vision
from my_nas.utils.torch_utils import Cutout
from my_nas.dataset.base import BaseDataset
class ImageNetDownsampleDataset(vision.VisionDataset):
train_... | [
"anonymous-email@anony.com"
] | anonymous-email@anony.com |
f59403ff751d921e4459a8430a09f49ae9dffbf1 | b2f059e18c4037db89ec4b4aea52bec7a90acd8a | /岭回归/redige.py | 57a98d5891d18cf423913dcbdc5d9f835b572ec3 | [] | no_license | 1415140539/Machine-Learning | 910469a5147ba6052046533cbfd9f47fffedd8a2 | b1a3e0eddeafc0a0ed09bf64f2ec4f290b17b2c2 | refs/heads/master | 2020-05-07T05:50:26.474560 | 2019-04-14T12:57:30 | 2019-04-14T12:57:30 | 180,288,898 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,276 | py | import os
import sys
import numpy as np
import sklearn.linear_model as sl
import sklearn.metrics as sm
import matplotlib.pyplot as mp
import matplotlib.patches as mc
def read_data(filename):
x, y = [],[]
with open(filename, "r") as f:
for line in f.readlines():
data = [float(substr) for substr in lin... | [
"noreply@github.com"
] | 1415140539.noreply@github.com |
a1b038b6202da2cbd4ecfdbbb67db940c2e070d0 | 338b6e0ab02d7d15c433d5c024b9de8ee2ba90f4 | /docs/table/order2.py | a5b05060ce49077bbdfbade4831c3051c0632abf | [
"MIT"
] | permissive | keaising/dejavu | 4daa08dbcfbbc2d6263f8b03f2e76a2ef40bfc76 | 999fdbf5ff4da0d171700acb43e7a0c2f7082398 | refs/heads/master | 2022-12-16T20:08:11.119091 | 2019-10-08T07:38:19 | 2019-10-08T07:38:19 | 208,834,583 | 3 | 0 | MIT | 2022-12-08T14:21:40 | 2019-09-16T15:30:16 | Python | UTF-8 | Python | false | false | 355 | py | import pytablewriter
writer = pytablewriter.RstGridTableWriter()
# writer.table_name = "params list"
writer.headers = ["name", "type", "e.g.", "is_necessary"]
writer.value_matrix = [
["order_id", "string", "beb5cd6e-aba4-4e78-8a3e-13c40d3ba438", True]
]
with open("./docs/table/order2.rst", "w") as f:
writer.s... | [
"keaising@gmail.com"
] | keaising@gmail.com |
14c415ad35bf45d2f01ec1f376d6a03482a79aa0 | 0af42f9c60ea5bf0b331bde39c9692c1f7020b52 | /trunk/main.py | 0bec779d4d940959e1fefb051d2c012202c53a3c | [] | no_license | zackhaikal/VISUINO | 70cf10d4781e997d57dbda9e897391df1b041dc8 | 49cd6b48bba9037b73ec16950c7dfdad93725627 | refs/heads/master | 2020-06-16T23:22:11.075968 | 2013-07-17T20:24:07 | 2013-07-17T20:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,324 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Purpose: Simply calls the VISUINO application. Also makes available the
# execute() function, from which you can simply do:
# >>> import visuino
# ... | [
"nelsojost@gmail.com"
] | nelsojost@gmail.com |
9bba621654288cc6ef834d5c323dd0e209e686f2 | 93866977712e467df6722a8208cc6241b6f3a6a6 | /mongodb/mongo.py | bafe079d16ec28576330a858b6847a6b6f40aec1 | [] | no_license | rayomeara/data-centric-development | 9c2d843610aba076682f90c04fc5a454afaae4c5 | 3b1b27f053587c761681f51aaceda805a5ef1e91 | refs/heads/master | 2020-08-30T07:37:06.182367 | 2019-11-01T13:17:38 | 2019-11-01T13:17:38 | 218,307,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,360 | py | import pymongo
MONGODB_URI = "mongodb+srv://root:pass@myfirstcluster-2scdt.mongodb.net/myTestDB?retryWrites=true&w=majority"
DBS_NAME = "myTestDB"
COLLECTION_NAME = "myFirstMDB"
def mongo_connect(url):
try:
conn = pymongo.MongoClient(url)
print("Mongo is connected!")
return conn
excep... | [
"rayomeara@gmail.com"
] | rayomeara@gmail.com |
3ac4669044814b4dfb91c375060362d0afb1277c | 2647e67c23a25de0f8000f579cdfcb8b868994ad | /auto_test01/auto_practice06.py | c114141dfdf106b6379e119253e1de31196dd8d5 | [] | no_license | aiyoz/python_test | f5239c136e1f81b27253bcbb1f6a12016caf9e71 | 9788486c016f6d2f972ade24ed120ec2f24038e5 | refs/heads/master | 2022-12-05T23:19:57.766323 | 2020-08-21T00:31:29 | 2020-08-21T00:31:29 | 276,528,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,674 | py |
"""
from https://github.com/playone/forpython/blob/master/Automation/test6.py
利用excel讀入關鍵字做搜尋
百度的網頁程式碼結構比google更容易去閱讀
因此拿它來來做練習的目標
"""
import pandas as pd
import time
from selenium import webdriver
df = pd.read_excel('keywords.xls') #將excel 內容轉存成dataframework
#print df
driver = webdriver.Chrome()
driver.get('http:... | [
"aiyo0204@gmail.com"
] | aiyo0204@gmail.com |
aa001063e9f7479fa662b2f1d3e134a8ae1b8598 | 2c885ae1e82a41366d8834bbf4cd977b3d244116 | /utility.py | eab587e98345bc8fbc97663210217cd9d7660c24 | [] | no_license | njhofmann/RangeParts | eefa45cd922b3447461978abd6cb51628593c9f4 | 33b1625520e297a47f0a84575cbcc0fca6626682 | refs/heads/master | 2021-07-16T18:32:16.723335 | 2020-03-09T04:04:26 | 2020-03-09T04:04:26 | 245,940,599 | 0 | 0 | null | 2021-04-20T19:30:43 | 2020-03-09T04:03:08 | Python | UTF-8 | Python | false | false | 1,414 | py | from src.range_part import RangePart
import sys
import random as r
MIN_RANGE_PART_SPACING = 10
def get_rand_int_below_exclusive(x):
"""
Returns a int in the range of [-sys.maxsize, x - 1]
:param x: upper bound (exclusive) of range from which random int is drawn from
:return: random int in ... | [
"inatejh@gmail.com"
] | inatejh@gmail.com |
031f00f8e9ddf3d9db4d026ec919ba040d16c16b | e42dd7fe942e84599f44c9f60acf99cc0bfbdece | /setup.py | 36e0cefce92501e2703eda48cdbefc7d34179124 | [] | no_license | catketchup/newlens | 7563592f7eec37551d200a5b36cc8232a0bbfa64 | 3f4cd866ad348967fd66942ae1ee9d91af86b6fb | refs/heads/master | 2020-06-04T08:41:49.748853 | 2019-12-06T21:55:06 | 2019-12-06T21:55:06 | 191,948,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 85 | py | from setuptools import setup
setup(
name='newlens',
packages=['newlens'],
)
| [
"hoc34@pitt.edu"
] | hoc34@pitt.edu |
7a2f1e3df73c9296c47b7b67ad98c52ac5498c49 | de7ae339530ea1fdc56880bf58dbb0f185810c30 | /Currency.py | 280f82e7d82482cc50a3e8523a973267382d98f5 | [] | no_license | Vishwash18/vkgithub | 66cacd11b040fbb7046a5865d4edd47e6c37c4da | ee77a65c8ad5ba5740e370be3a763d5f7c08aad3 | refs/heads/master | 2022-12-02T23:00:45.386407 | 2020-08-05T03:30:00 | 2020-08-05T03:30:00 | 275,517,594 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 706 | py | #To find minimum number of currency to buy a product at a range of 5000
a=int(input("Enter no of Test Cases"))
def findMin(V):
#Indian Currency
Currency= [1, 2, 5, 10, 20, 50,
100, 500, 2000]
n = len(Currency)
ans = []
i = n - 1
while (i >= 0):
while (V >= C... | [
"noreply@github.com"
] | Vishwash18.noreply@github.com |
c3ef4ba2e239f46ed154d87880ddfa20c3817bf5 | b743532f897c9aebe99be3bdd210707229782f95 | /stats/box_muller.py | 7f7d8d8806a0db1581e406f910040968ecdb336e | [] | no_license | koichiHik/prob_robotics | 9e72e0508e747c6f78eb71b4ad0d25dca193136a | c100115e8cf29c822c0ee62c1e314d7a85c5742c | refs/heads/master | 2020-04-14T21:31:36.588577 | 2019-01-21T13:29:14 | 2019-01-21T13:29:14 | 164,131,568 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,132 | py |
import matplotlib.pyplot as plt
import numpy as np
import random
import math
class BoxMuller():
@staticmethod
def sample_norm_dist(avg=0.0, sigma=1.0):
x1 = random.random()
x2 = random.random()
y1 = math.sqrt(-2*math.log(x1)) * math.cos(2 * math.pi * x2)
y2 = math.sqrt(-2*math.log(x1)) * math.sin... | [
"rkoichi2001@gmail.com"
] | rkoichi2001@gmail.com |
dea83239281efd33ed2eb6660826802aba65bef8 | 7f8e784ccdbc3930c77ebb7db6677a9e34524581 | /gym_billiard/__init__.py | d96482b45897c2140842908051aa4cb432fe3c07 | [
"MIT"
] | permissive | fanbbbb/Billiard | bb185df42cb041078563fb7ca7b2a48490156e29 | b9b0bb08e5621adf1fe1c0e940e5f2d328126982 | refs/heads/master | 2020-09-25T20:01:23.700554 | 2019-10-02T13:47:33 | 2019-10-02T13:47:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 267 | py | from gym.envs.registration import register
register(
id='Billiard-v0',
entry_point='gym_billiard.envs:BilliardEnv',
timestep_limit=1000,
)
register(
id='BilliardHard-v0',
entry_point='gym_billiard.envs:BilliardHardEnv',
timestep_limit=1000,
) | [
"giuseppe.paolo93@gmail.com"
] | giuseppe.paolo93@gmail.com |
dfe88bbaab9a448bfdfe73fb54e8df35b2577b16 | e1c7508e7db5e192c12b857f66722bdba0996447 | /PELEGRI_CONVEXHULL/exhaustive.py | c31da30bffbfa5ca2f4d7a364038e0a704765bf6 | [] | no_license | glaiveVII/Convex-Hull | d4eed5f61d8e2384c32d6a293af2dcaba445ed3a | b2269e714d3e4b69dbcde40989ed70c0248dcd6b | refs/heads/master | 2020-05-18T11:42:38.422714 | 2019-09-12T07:00:22 | 2019-09-12T07:00:22 | 184,386,626 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,832 | py | from itertools import permutations
from utils import is_convex, scatter_plot, point_in_polygon
# O(n^3)
def exhaustive(points, show=True, save=False, detailed=False):
"""
Returns the vertices comprising the boundaries of convex hull containing all points in the input set.
The input 'points' is a list of [... | [
"noreply@github.com"
] | glaiveVII.noreply@github.com |
2a6a7ae4ad2f46d245751da8d1ef7209bb121e48 | 1c1a8194cabbaf4a1a217bb5b6f46976faaee857 | /SARSA-3.py | 8857e7f5294f58fe43c31817cd006130f0fd28e9 | [] | no_license | rabieifk/multi-step-Q-learning-and-SARSA | 7b10b91eb5508b3ff98ae6fc2b28efad26c82afd | dc2cc8fce4fe3e188d596aa20d6adf11283836ae | refs/heads/master | 2021-06-25T03:47:50.439431 | 2021-01-10T06:20:12 | 2021-01-10T06:20:12 | 190,971,726 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,428 | py | import networkx as nx
import numpy as np
import pandas as pd
import random
from array import *
class MapBuilder:
def __init__(self):
self.data_df = pd.read_csv('data.csv')
number_of_edges = len(self.data_df)
self.G = nx.DiGraph()
for i in range(0, number_of_edges):
st... | [
"noreply@github.com"
] | rabieifk.noreply@github.com |
fc2f37d98cee3d15b61881d708ca537804025901 | 3db67bcb0b1ec133938124afe37fa4e4b11f5955 | /erp-classifier/erp classifier/notepads/q_tools.py | 0fcbda84c3bf3618ecf498c4353cc2c839dd994a | [] | no_license | agustinignaciovazquez/ErrP-Gaming-Agent-Final-Thesis- | 30cce8055d30bd621676c0caf05f9386ca59a7b5 | 84618b8725dc9769c82ed0113aaca39d5bc19c4d | refs/heads/master | 2023-01-10T22:03:48.825067 | 2020-11-09T22:50:16 | 2020-11-09T22:50:16 | 293,665,714 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,453 | py | import random
import math
import numpy as np
def write_q_table_file(q_table, q_file="Q_Table.txt"):
"""
Write the q table in a file that will be used to play game
:param q_table: Q table to be written in file, has to be a matrix
:param q_file: File name to write in
"""
file = open(q_file, "w+"... | [
"agvazquez@itba.edu.ar"
] | agvazquez@itba.edu.ar |
9b69debbf6cbb7ffc8391e4fc0e4810ea5195973 | 2bed8fbcc428a0cde880e38d13503a77a455f36c | /game.py | bd8bdf3eb713e43da0dbe703662bf06d1890793f | [
"MIT"
] | permissive | thilohuellmann/python-hangman | ecfce22a490235241b46aea23b0525df2f631e1e | 8d16e55b7e4372f7ce9169e61b21128687137516 | refs/heads/master | 2021-05-05T13:46:57.577772 | 2018-01-21T21:44:14 | 2018-01-21T21:44:14 | 118,373,769 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,968 | py | import random
def hangman(stage):
if stage == 0:
print(" _________ ")
print("| | ")
print("| ")
print("| ")
print("| ")
print("| ")
elif stage == 1:
print(" _________ ")
print("| ... | [
"noreply@github.com"
] | thilohuellmann.noreply@github.com |
c89d9dd63e8ad40bf9c8ad88e5d1b06d1531375b | 67baab02cfda6c54a287d63d0874824cf15f3ba6 | /leetcode/146.LRU-Cache.py | 77ebbe8a5d8e8feca6017bda675a732c73ad9728 | [
"MIT"
] | permissive | sogapalag/problems | a14eedd8cfcdb52661479c8c90e08737aaeeb32b | 0ea7d65448e1177f8b3f81124a82d187980d659c | refs/heads/master | 2021-01-12T17:49:52.007234 | 2020-08-18T14:51:40 | 2020-08-18T14:51:40 | 71,629,601 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,098 | py | class LRUCache(object):
def __init__(self, capacity):
"""
:type capacity: int
"""
self.c = capacity
self.cache = []
self.d = {}
def get(self, key):
"""
:rtype: int
"""
if key not in self.cache:
return -1... | [
"yan-zp@foxmail.com"
] | yan-zp@foxmail.com |
48a228cc6a7f9225c0f945efa997e472c91eaf3d | 7ca6516deac222fc11179aeb4454c5dbfaf2c87a | /scf_python_package_download/index.py | b18c211378bed874451a5e760e1d54668b2a0c14 | [] | no_license | anycodes/ServerlessPractice | 10fb5f84c39c93aaf7ea6df15342a962d3b645a7 | d2e23b5a8ff58db3ab826c7df723d6d18a444698 | refs/heads/master | 2020-12-03T23:13:02.062927 | 2020-03-02T10:31:17 | 2020-03-02T10:31:17 | 231,517,955 | 9 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,327 | py | # -*- coding: utf8 -*-
import json
import shutil
import zipfile
import os
import sys
import subprocess
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
secret_id = '' # 替换为用户的 secretId
secret_key = '' # 替换为用户的 secretKey
region = 'ap-shanghai' # 替换为用户的 Region
token = None # 使用临时密钥需要传入 Token,默认为空... | [
"dfounderliu@tencent.com"
] | dfounderliu@tencent.com |
54cdd7f5ce0fc2040583d0605b91c1bddb75daee | 68e0a967f52fd86e82f80dc4fd9198449f8f1030 | /doc/.src/book/scripts.py | 09eacba33e843d93599017499cf00bfdf3b8d05a | [] | no_license | htphuc/fdm-book | 4ac32a30506a83fd1ae35c2fe1934d194ea11686 | 07b15f987374b3e91d21ab14c06cfc0a79634936 | refs/heads/master | 2021-01-17T20:59:48.188917 | 2016-04-25T21:06:12 | 2016-04-25T21:06:12 | 57,400,233 | 1 | 0 | null | 2016-04-29T17:01:53 | 2016-04-29T17:01:52 | null | UTF-8 | Python | false | false | 5,340 | py | import sys, re, os, shutil, glob
chapters = "vib wave diffu trunc staggered softeng2 formulas advec".split()
chaptersdir = 'chapters'
ignored_files = '*.o *.so *.a *.pyc *.bak *.swp *~ .*~ *.old tmp* temp* .#* \\#* *.log *.dvi *.aux *.blg *.idx *.nav *.out *.toc *.snm *.vrb *.cproject *.project .DS_Store Trash'.split... | [
"hpl@simula.no"
] | hpl@simula.no |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.