blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fd13191ce9e4c70a1013b35a699ba0e55a3eb3c3 | e02aa226e3e16d2cf5517203d152a886c026680c | /home_application/urls.py | 9e56071f52a5a4f6c92394d9cd3777602daba2b0 | [] | no_license | PeanutSue/hellopeanut | c68d350fe799942aa9746da4025adc04c0f2e257 | ddbafaa3fb1a788611141b0d9fd92d047a5e1691 | refs/heads/master | 2020-03-27T14:50:12.984971 | 2018-08-31T01:55:18 | 2018-08-31T01:55:18 | 146,681,882 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import patterns
urlpatterns = patterns('home_application.views',
(r'^$', 'home'),
(r'^dev-guide/$', 'dev_guide'),
(r'^contactus/$', 'contactus'),
(r'^hellopeanut/$', 'hellopeanut'),
)
|
df7997a2ca0c70eeae54f1dfde8cfeb43bd01839 | 0aa480230e5038fe6d7c18628749529723f93656 | /graph/connected.py | 4d7ff76a8c368733603a7ccef252d9da3c4a8ce6 | [] | no_license | madhavmurthy93/python-practice | daa9c5365e46764dec5673251a5f066c2db304bc | 64a6566ab42f754ac9ea65620c84c39969aecebf | refs/heads/master | 2021-01-01T16:44:51.192099 | 2014-11-21T22:56:49 | 2014-11-21T22:56:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | connected.py | from graph import Graph
def is_complete(g):
keys = g.nodes.keys()
complete = True
for key in keys:
nodes = set(keys)
nodes.remove(key)
if(not(g.nodes[key] == nodes)):
complete = False
return complete
def main():
edges_complete = [(0, 1), (1, 0), (1, 2), (2, 1), ... |
acf5abd43107849ad796c8efcd7eca5483e0216f | 8fa87b2c6272c0883ef5e868e407cb7a7d8c98e6 | /src/views/paypal.py | 7e17066bb46b9d404bc3b5c7e224615fc2fd4921 | [
"MIT"
] | permissive | cirocosta/avisenchente | c6574fd8a0d5e29d480296ce9b1d5ef8ef41d17a | 2b23504b25b2dfeb2dec7e465f5e2fb2f679cae6 | refs/heads/master | 2021-01-20T11:56:56.400070 | 2014-02-07T20:41:37 | 2014-02-07T20:41:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,117 | py | paypal.py | import webapp2
import settings
import json
from utils import ec_paypal
ec = ec_paypal.ExpressCheckout(settings.PP_USER,
settings.PP_PASSWORD, settings.PP_SIGNATURE)
class PayPalSEC(webapp2.RequestHandler):
def post(self):
amount = self.request.get("amount")
currency_id = self.request.ge... |
da344d72d94279ea8120f891fa5e16991287ac5b | 1b47e0fb58651a224ca7269c5365c174f9e6197b | /basico/zumbis/concatenandoStrings.py | b4632885214f89651a09d08fb09393b9b79aba80 | [] | no_license | ggrecco/python | a3f0f6f6f99e6aeb49cacabf11c2e986eada4479 | d5895a1b8067358e4336e6273b1b493010dab2ce | refs/heads/master | 2022-12-13T19:53:51.706179 | 2020-02-20T19:32:21 | 2020-02-20T19:32:21 | 107,701,916 | 0 | 0 | null | 2022-12-08T02:05:15 | 2017-10-20T16:35:16 | Python | UTF-8 | Python | false | false | 43 | py | concatenandoStrings.py | a = "abacate"
b = " e banana"
print(a + b)
|
2bd222d3fe77726ee6fffc84e2df0dc36d9d646c | d46047a18f534c03f0cf6d5465bdc4d1d4822463 | /mygits.py | 454f93c650f0cadd621c09f6f53826c1548c816c | [] | no_license | jnvilo/scripts | a82477424a2492ebf8ad4d4ba246f707ed509219 | 88e8764a54ae315cf54c9fbe6bfff82838537b0c | refs/heads/master | 2021-01-19T10:11:14.977682 | 2013-02-07T15:34:34 | 2013-02-07T15:34:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,709 | py | mygits.py | #!/usr/bin/env python
"""Naval Fate.
Usage:
mygits.py init
mygits.py list
mygits.py list [--repo_list]
mygits.py add <url>
mygits.py clean
mygits.py pull
mygits.py pull <name>
mygits.py (-h | --help)
mygits.py --version
Options:
-h --help Show this screen.
--version Show ver... |
5524be5569df0dc4f147dbbaefd83c00c3cad05e | 69e1490dcf02fb1c8a72e724a07dfb6bc60fbab1 | /ramsey_server/start_server.py | 99803db0a08125d97222ec3c676c771d70d158e7 | [] | no_license | kujbol/ramsey-game | 7b88839c885339f86323ca66766f013de4005be0 | 73b5bad3dce0ea28125e07c25ff695c665401fb2 | refs/heads/master | 2022-12-17T01:19:21.823314 | 2018-06-22T09:10:00 | 2018-06-22T09:27:44 | 126,904,419 | 1 | 0 | null | 2022-12-08T18:26:36 | 2018-03-27T00:04:23 | Python | UTF-8 | Python | false | false | 656 | py | start_server.py | import asyncio
from ramsey_server.app import shutdown, init
from ramsey_server.logger import log
# TODO application is not compatible with wsgi, state saved in memory
# redis required for websocket communication and mongo for saving state
loop = asyncio.get_event_loop()
serv_generator, handler, app = loop.run_until_c... |
bf4cf1cda0d28d26fab11a952a71234075850743 | fd326562890d4f1987c384fc7c60374938231222 | /PythonAdvanced/ErrorHandling/EmailValidator.py | 79702cac1233be6b45f843c39acb263c135208b3 | [] | no_license | miro-lp/SoftUni | cc3b0ff742218c9ceaf93f05c319ccfeed5bc8a4 | 283d9328537919de49f7f6a301e58593bae9ca2a | refs/heads/main | 2023-08-23T21:22:07.856226 | 2021-08-25T15:10:18 | 2021-08-25T15:10:18 | 318,134,101 | 2 | 1 | null | 2021-08-10T12:51:54 | 2020-12-03T09:03:08 | Python | UTF-8 | Python | false | false | 650 | py | EmailValidator.py | class NameTooShortError(Exception):
pass
class MustContainAtSymbolError(Exception):
pass
class InvalidDomainError(Exception):
pass
line = input()
domains = ["com", "bg", "org", "net"]
while line:
if "@" not in line:
raise MustContainAtSymbolError("Email must contain @")
name, domain =... |
b3cf3eb2c21c23588613912df3c9cfd657198aec | df4ff75bd364a702c79d165c7dff905d336c4d64 | /sepo_server/user_manager/views.py | 3e0bef38235b7211f32c776897c3b79a40595436 | [
"Apache-2.0"
] | permissive | jinhoko/SEPO | 6390b35fe7ad4025db4bdd3b3ffea33049102e1c | 046ed687a81d5ef51d529d2e7b5eb09fb5041c73 | refs/heads/master | 2021-09-24T21:20:25.057510 | 2018-10-14T23:58:37 | 2018-10-14T23:58:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,988 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template import Context
from django.template.loader import get_template
from django.shortcuts import render
from django.http.response import HttpResponse
from django.template.context_processors import csrf
from user_manager.forms import LoginF... |
26c80cec9571689e8ab8648b36a07b3ca922cc2d | 48873a7777fd3bd26ac588391d9b3412febe51a5 | /barter/migrations/0005_auto_20150327_1859.py | 0d6cef512d999d88280f424dc44e451a4a96c028 | [] | no_license | WilsonLiCode/Barter | 09f9054e7704ae96b869f1eb1c6d67a2f531a481 | 5638212c72ec29fcff29e610ef85983da643f37e | refs/heads/master | 2021-01-16T22:02:57.466876 | 2015-05-04T22:24:30 | 2015-05-04T22:24:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,713 | py | 0005_auto_20150327_1859.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('barter', '0004_auto_20150327_1824'),
]
operations = [
migrations.AlterField(
model_name='favor',... |
f760a46a6414abcbfcdc03a3cb498e6ff1d03cc8 | d60ce51b94b45d004e395bb0f042c0437fc99de4 | /para_testes.py | 2a9bd307f509d2136a3db89d58df700fa87ff913 | [] | no_license | Ga-Bicudo/matriz5x8 | a81b80a208e4cc8bc5a373051051b9213cc66731 | 79cfb32f18505df213cef72b524d451b67798a8d | refs/heads/master | 2022-11-21T17:33:47.313952 | 2020-07-24T15:59:06 | 2020-07-24T15:59:06 | 279,300,282 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,717 | py | para_testes.py | import random
matriz = [ ]
print("Eu pensava que sim, mas não consegui finalizar a tempo, a lógica esta sendo mais complexa que eu imaginava. \n\nO código ainda esta incompleto, porem o programa roda , mas com alguns bugs, o outro arquivo contem todos os... |
a633a1a0b3a8fb64c07da9a43b1f02e6ef0f2b5c | 48785aa58770773df3c9ebb1f7dbbb5939d890a6 | /djangoApp/WebApp/views.py | 2651be09bd675f8004033c1fe180948e823474cf | [
"MIT"
] | permissive | MLXTREME/ObjectifyManthan | 462db06539b18eacd5ea869d13695c103be4290a | e99a5e69b3bc8d0f8ca66aee61a2185f01bc5bd5 | refs/heads/main | 2023-08-22T07:57:48.380862 | 2021-10-31T17:06:38 | 2021-10-31T17:06:38 | 423,140,490 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,029 | py | views.py | from django.shortcuts import render,redirect
from django.http.response import HttpResponse
from .forms import UploadForm
from .models import FormModel,SaveModel
from django.contrib import messages
from django.http import JsonResponse
from django.core.files import File
import json
import numpy as np
import os
import c... |
3b548903c89cb17e0cf9a6b53cb4d28d70f54352 | 216a3485b60e1770ad164a3f130d5b2c1231ccf5 | /src/grammar/list.py | b1e166d0eb10487ca175bee21db01b7829109a17 | [] | no_license | kangwenjun/Python | a6601af20f12e617276a8525201461c566cc5b25 | deb981b16b8d9d68303530f187668ea5eebde0be | refs/heads/master | 2022-09-12T19:48:01.747866 | 2020-05-27T21:20:20 | 2020-05-27T21:20:20 | 258,901,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,973 | py | list.py | #! /usr/bin/env python
# coding=utf-8
#["kang", "wen", "jun"]
#["kang", "wen", "jun", [23, 1985]]
#取全部元素
print('\n----------------ALL----------------')
print('["kang", "wen", "jun"]:\t', ["kang", "wen", "jun"])
print('["kang", "wen", "jun"][:]:\t', ["kang", "wen", "jun"][:])
print('["kang", "wen", "jun"][0:... |
01bccb2021bd900791b6ebdff71eeff0d682353a | 8408e70151c7ee9f53754fdedb8645f6ecb50d2b | /Discrete_Algo/networks/networks.py | b1c7d1d6e6b88f965a2506085e8b79339b93d2c0 | [
"MIT"
] | permissive | NemoHimma/ZeroRL | b203d7dd6f1cd74b4b26a465b794730163bbb9f8 | c37cb3105981b7d9331749941df3e3f449976fde | refs/heads/master | 2023-03-24T22:34:55.407277 | 2021-03-28T10:17:00 | 2021-03-28T10:17:00 | 319,928,874 | 0 | 0 | null | 2021-03-28T10:17:01 | 2020-12-09T11:02:06 | Python | UTF-8 | Python | false | false | 6,988 | py | networks.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from .bodies import SimpleBody , AtariBody
from .noisy_layer import NoisyLinear
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class DQN(nn.Module):
def __init__(self, input_shape, num_actions, noisy=False, sigma_init=0.5, ... |
22b9c0de753fe7c8ae4c389d797b2b07e56e0471 | 1af3c8521da721a2372f46e8c75382f60f0875c3 | /enumerate-task.py | f4da10dd7076c390ba98cfa41898b286a67e8df1 | [] | no_license | RajitPaul11/PythonBasix | fbefbed740a2eecd6846a80685309e2f7c19105a | 984a82ccc7b50b6cdf563925745e11d4be81c73c | refs/heads/main | 2023-06-12T01:25:40.507999 | 2021-07-08T13:10:38 | 2021-07-08T13:10:38 | 380,175,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 148 | py | enumerate-task.py | l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
i=0
for index, item in enumerate(l):
if i==2 or i==4 or i==6:
print(f"The {i+1}th element is {item}")
i+=1
|
4f5d5a6a0d759007a1781313299b7d3068c9c904 | cebd68ddec9a09d9a088daad1fad52e45d43a74d | /newplotter.py | ce0a03eb65afb04e21eb991e8d7d5513eb4bc68f | [] | no_license | komuvill/LLO-K2018 | 2374d1f139f74d6f44745315b71e3858c45d21ad | 9205d5cc9fc60398579f2f3d2016537d90040229 | refs/heads/master | 2021-04-29T21:29:32.295801 | 2018-02-28T07:01:41 | 2018-02-28T07:01:41 | 121,617,585 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | newplotter.py | import matplotlib.pyplot as plt
from datetime import datetime
import pymysql
db = pymysql.connect(host="xxx", user="xxx", passwd="xxx", db="xxx")
x = []
y = []
query = "SELECT time, date, temp FROM chernobylmeasurements WHERE date LIKE '2018-02-15'"
cur = db.cursor()
cur.execute(query)
taulu = cur.fetchall()
for e ... |
d85933c53121e968bef29d7c13a129dc411c1a15 | b45788cc71344b63c4e4d21fa3bae7ea9f50952e | /test/test_running_robot.py | d494e6376623fbb4c0fc2f74563057664d1bc882 | [
"MIT"
] | permissive | chrismdp/pushy | 929ac943052b233486d59df2980be71dddeed61c | 79a2c8d71022a438e0d5bcf1cc2e7af0e0a334aa | refs/heads/master | 2016-09-06T18:11:21.385678 | 2010-03-23T16:53:30 | 2010-03-23T16:53:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,170 | py | test_running_robot.py | import unittest
import types
from webtest import TestApp
from waveapi import robot
from waveapi import appengine_robot_runner
from pushy import receive
from pushy import test
from google.appengine.ext import webapp
def contains(itemToLookFor, itemToSearch):
def escapeHtml(string):
return string.replace("<", "<... |
dbac14f9f2b55fae20500213670f7b7f61966c9d | f3f7099576adfb683fb74c575b235bdd6c2900c7 | /examples/demos_by_tool/dynamicprogramming/float_mass_dp_optimal_controller.py | bded3985c7bfa173aaaf1673879848557da4dbbb | [
"MIT"
] | permissive | SherbyRobotics/pyro | a1fac4508162aff662c4c6073eb2adf357b1bc8b | baed84610d6090d42b814183931709fcdf61d012 | refs/heads/master | 2023-08-08T16:16:31.510887 | 2023-07-26T17:36:26 | 2023-07-26T17:36:26 | 153,139,985 | 35 | 23 | MIT | 2023-07-26T17:36:27 | 2018-10-15T15:45:09 | Python | UTF-8 | Python | false | false | 1,395 | py | float_mass_dp_optimal_controller.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 16 22:27:47 2022
@author: alex
"""
import numpy as np
from pyro.dynamic import massspringdamper
from pyro.control import controller
from pyro.analysis import costfunction
from pyro.planning import dynamicprogramming
from pyro.planning import dis... |
9b1156ca8bb5398032f91725214df0bed1e28b29 | d66818f4b951943553826a5f64413e90120e1fae | /hackerrank/Data Structures/Contacts/solution.py | 25362a21275d6d28c86d91b52708bab0dcc62b30 | [
"MIT"
] | permissive | HBinhCT/Q-project | 0f80cd15c9945c43e2e17072416ddb6e4745e7fa | 19923cbaa3c83c670527899ece5c3ad31bcebe65 | refs/heads/master | 2023-08-30T08:59:16.006567 | 2023-08-29T15:30:21 | 2023-08-29T15:30:21 | 247,630,603 | 8 | 1 | MIT | 2020-07-22T01:20:23 | 2020-03-16T06:48:02 | Python | UTF-8 | Python | false | false | 863 | py | solution.py | #!/bin/python3
import os
#
# Complete the 'contacts' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts 2D_STRING_ARRAY queries as parameter.
#
def contacts(queries):
# Write your code here
from collections import Counter
counter = Counter()
for operatio... |
a63ff728b8b5caae1c578ef1a62e1b95ded4e6cd | a6e782985aa07dc6d2cd62ff148b9d27a9ac3c78 | /Tensorflow/iris_tf_estimator.py | 7f2c853eef742f13fa16dd7b990220e8957a943c | [
"MIT"
] | permissive | kingmbc/iris-python | a0c6d3de4dbb67222c77ed8b656b79f4b9190999 | 824a3dd9cf9fd9685ece05298423a4b8e78dccb7 | refs/heads/master | 2020-09-22T05:26:40.232855 | 2020-02-27T22:29:29 | 2020-02-27T22:29:29 | 225,066,412 | 0 | 0 | MIT | 2019-11-30T20:31:17 | 2019-11-30T20:31:17 | null | UTF-8 | Python | false | false | 3,592 | py | iris_tf_estimator.py | from __future__ import print_function
from builtins import range
"""
SECTION 1 : Load and setup data for training and testing
the datasets separated in two files from originai datasets:
iris_train.csv = datasets for training purpose, 80% from the original data
iris_test.csv = datasets for testing purpose, 20% from t... |
5d9e27237a1937f2bd85ec3799d2acf7760adc32 | 6c230203030a45dc1f2cc6d82dba15dc7cec5996 | /gimp-plugins/faceparse.py | 210b5ad2e40a747fb87a672817fe01c985d30ade | [] | no_license | pums974/GIMP-ML | d91cd15c2617ea59827318fd1cd76f98e9cc5cd8 | aa27d4e2484a9525a3729b27aa268e8402bf0292 | refs/heads/master | 2022-11-16T18:15:12.874255 | 2020-07-04T13:47:27 | 2020-07-04T13:47:27 | 277,117,127 | 0 | 0 | null | 2020-07-04T13:40:10 | 2020-07-04T13:40:09 | null | UTF-8 | Python | false | false | 4,721 | py | faceparse.py | #!/usr/bin/env python2
import os
baseLoc = os.path.dirname(os.path.realpath(__file__))+'/'
from gimpfu import *
import sys
sys.path.extend([baseLoc+'gimpenv/lib/python2.7',baseLoc+'gimpenv/lib/python2.7/site-packages',baseLoc+'gimpenv/lib/python2.7/site-packages/setuptools',baseLoc+'face-parsing.PyTorch'])
from m... |
df40b0628d6a180a98cd385145ee7c65ecb78256 | 3c3eed4104ca7f3af6b6aad2aa11be12ff85d50d | /tfrecord_producer.py | 275265bc3b681148e5cff3e7dce41cb25b94a6dd | [
"MIT",
"Apache-2.0"
] | permissive | deciding/Voicefilter | ee48be0c2a32c88e1f69d2f8bfcb7a22a6c910dd | dda34da9d1cfca48102b2d1b4274bfd76e5a2e1c | refs/heads/master | 2020-12-04T01:49:45.745482 | 2020-05-17T08:37:08 | 2020-05-17T08:37:08 | 231,559,612 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,737 | py | tfrecord_producer.py | import os
import tensorflow as tf
import torch
from tqdm import tqdm
from glob import glob
import numpy as np
from collections.abc import Iterable
from utils.hparams import HParam
#from utils.audio import Audio
#import librosa
#python encoder_inference.py --in_dir training_libri_mel/train/ --gpu_str 5
#python tfrecord... |
ed7b29a4d7f3a48884434373418c3528f2f397ac | eca2a48a3ce0b2d969701860aad44268ef20bef3 | /2_text/interactive_script_gen.py | 11ccdf5cbaa3d82c5bb8bddf566d367d1e0ebbf5 | [] | no_license | mpwillia/Keras-Talk-Examples | 104f3289e1763ddbc20bc2fd3ebbe0d8b5526f18 | 022f21e9e7c69de52e2a9c9a4195c5b430bd7a09 | refs/heads/master | 2021-07-14T10:19:56.700144 | 2017-10-19T00:28:24 | 2017-10-19T00:28:24 | 107,477,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,024 | py | interactive_script_gen.py | #!/usr/bin/python3
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # or any {'0', '1', '2'
os.environ['KERAS_BACKEND'] = 'tensorflow'
import numpy as np
import sys
from util import load_model
from keras.preprocessing.text import hashing_trick
from keras.preprocessing.sequence import pad_sequences
from southpar... |
b6d8a918659f733919fe3bb4be9037e36ad32386 | 03db3e2d84b64bedecef939a9b8747093d8d0b58 | /superai/astartdemo.py | 6e314d22bedb35081f5c70f6ce61c0d0a18ae4f2 | [] | no_license | liwei1024/superai | c634ab1d087981b250e87bdfd7350fbad948a243 | 8356c1de783f3b45a7c43a9989ce9b68d739fac6 | refs/heads/master | 2020-09-02T07:24:44.055069 | 2019-11-02T10:18:50 | 2019-11-02T10:18:50 | 219,165,827 | 7 | 2 | null | 2019-11-02T14:32:06 | 2019-11-02T14:32:06 | null | UTF-8 | Python | false | false | 6,703 | py | astartdemo.py | import queue
import sys
import logging
from superai.common import InitLog
logger = logging.getLogger(__name__)
# 2维到1维
def hwToidx(x: int, y: int, weight: int):
return y * weight + x
# 1维到2维
def idxTohw(idx, weight: int):
return [idx % weight, idx // weight]
# 10x10 cell idx 到 [x,y]
def idxToXY(idx, cel... |
7930bb813bd546747c7c65b661900939f5ba93f1 | 6c1263b0d0553e6e8ee7ed246d5f3819fd6b21ff | /Python-Fundamentals/Homeworks-and-labs/text-processing/string_explosion.py | f41bfdbd56cc2d6b5b2cb18a40db66ce5686d82f | [] | no_license | krstoilo/SoftUni-Fundamentals | ceee2452aea0b7c86e92e1bfb98ea78054ff5746 | fcd75fc659413aa739580080a5896889ce808b02 | refs/heads/main | 2023-08-15T02:59:53.687970 | 2021-09-19T20:15:01 | 2021-09-19T20:15:01 | 407,669,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 461 | py | string_explosion.py | user_input = input() #abv>1>1>2>2asdasd
exploded_str = user_input
for n in range(len(user_input)):
explosion_strength = 0
if user_input[n] == ">":
explosion_strength += int(user_input[n+1])
if user_input[n+explosion_strength] != ">":
exploded_str = user_input[:n] + user_input[n+ex... |
c6cf085330f47ffb139c5acc91d91e9758f5396a | c7d2ec0882c7b6b59afeb9e6b1db6596046e657e | /cssdiner/pages.py | 1c355cc9f9e85113ff4f2c6e8e36971e16b49d38 | [] | no_license | mbroadhead/cssdiner | a1b77bbb756652f7a3da601f21ec5d68d01f9abc | db2f2aedaa2933813434e7077e78fb4709ad3819 | refs/heads/master | 2021-01-20T01:29:32.444882 | 2017-04-24T21:15:07 | 2017-04-24T21:15:07 | 89,287,561 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,675 | py | pages.py | from page_objects import PageObject, PageElement
class MainPage(PageObject):
level_menu_opened = False
level_menu_created = False
css_input = PageElement(css='input.input-strobe')
level_text_span = PageElement(css='span.level-text')
instruction_h2 = PageElement(css='h2.order')
enter_button = P... |
c2ddf31bce4a5f3ae2b0d5455bbc9942f92bff40 | edb9040f7bcb6229aaa36a5275b0bf8bca6f7775 | /Metoda 1 dataset A/solve_captchas.py | dab0efd52f315e91b1223860fb887ba3534a7cb4 | [] | no_license | Yanch1/Captcha-solver | ffeb6bbe7a7ad5ba7dbee70e851145c42e3b1d5b | f26b16b63ab5e7b8bc021c24f4c3108a897d73ed | refs/heads/main | 2023-07-01T15:17:24.806603 | 2021-08-09T14:57:15 | 2021-08-09T14:57:15 | 376,848,081 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,613 | py | solve_captchas.py | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
from keras.models import load_model
from utils import resize_to_fit, clear_chunks, stack_windows
from imutils import paths
import numpy as np
import imutils
import cv2 as cv2
import pickle
from tqdm import tqdm
c1_correct = 0
c2_correct = 0
c3_correct = 0
c4_correct ... |
75e6554ea3c327c87a2a65710a7f1d55e9933bb0 | d021782c5c16f05ae097b65d321924c7459753d7 | /train_seg.py | 3bb3c87b38f9efa9fba8a7de4cd4163edae6f22d | [] | no_license | beiyuouo/hair-swap-magic-mirror | 069481e101470a97a4de70e7c2646b0d47da44dc | 12acf258df5a4ded56576f7902fe87574f951e3b | refs/heads/main | 2023-04-30T23:44:45.727164 | 2021-03-09T02:34:57 | 2021-03-09T02:34:57 | 364,769,188 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,564 | py | train_seg.py | # Author: BeiYu
# Github: https://github.com/beiyuouo
# Date : 2021/2/21 21:57
# Description:
__author__ = "BeiYu"
from utils.init_env import set_seed
from utils.options import *
import os
import logging
import torch
from torch import nn
from torch import optim
from torch.optim.lr_scheduler import MultiStepLR
from ... |
58f3b8c5470c765c81f27d39d9c28751a8c2b719 | 7cb9e89ea2f80f6578a6978e2935dfa7a5f55794 | /Python/ex026.py | 99f1576e1ea7c9ada800d019667f11bacd3c28db | [
"MIT"
] | permissive | MarcosRibas/Projeto100Exercicios | 3e7e5a82204b28fd3ad6e5ea2f1a7156d9d17f2f | 15c16eb0d9c4182d93e4bb83e11acad0728f5ec9 | refs/heads/main | 2023-06-23T18:34:11.680198 | 2021-07-16T01:05:36 | 2021-07-16T01:05:36 | 323,720,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | ex026.py | """Ex026 Faça um programa que leia uma frase pelo teclado e mostre:
Quantas vezes aparece a letra "A".
Em que posição ela aparece a primeira vez.
Em que posição ela aparece pela última vez."""
frase = str(input('Digite uma frase: ')).strip().lower()
n_a = frase.count('a')
f_a = frase.find('a')+1
l_a= frase.rfind('a')-1... |
d83f2d9bb25a46bc7344b420ce65bf729165e6b9 | 0001f8ce98684c5fe59558ce1c4426b1d601e1be | /fos_app/apps.py | 446c14479adb678a8e35834390476302ae9fd74e | [] | no_license | tiru777/mysof | 8ae9fd28b1ec6fe858cf627dc64c5536f4f1a217 | 4cbe997b805b623bdfd88f682a31931eaec33803 | refs/heads/master | 2020-04-27T08:55:28.200345 | 2019-03-07T02:13:48 | 2019-03-07T02:13:48 | 174,192,048 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | apps.py | from django.apps import AppConfig
class FosAppConfig(AppConfig):
name = 'fos_app'
|
d2b05c5653ca6c6b7219f6c0393e81c9425b5977 | 54e797ded1fea168ddd7864b7b595bb4764562fb | /lambda_functions/twin_granule.py | e05cef8f30aa13ec58a6e5c2fdc354ae36c29b26 | [] | no_license | jsrikish/hls-changes-23dec2020 | 5876af2ea3a7d16d1e069478d2e7200097929265 | e9786ad90ae076aa11037fa4a7f202f28cd262d7 | refs/heads/main | 2023-02-12T18:16:30.405434 | 2021-01-06T21:18:05 | 2021-01-06T21:18:05 | 327,430,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | twin_granule.py | """
HLS: Check if Twin Granule Exists
"""
from typing import Dict
import os
import re
import boto3
from botocore.errorfactory import ClientError
from datetime import date
s3 = boto3.client("s3")
bucket = os.getenv("SENTINEL_INPUT_BUCKET", None)
print(bucket)
if bucket is None:
raise Exception("No Input Bucket set"... |
d73827ce336f7be7fb8fa627ce114ce9f98d7e3a | 4236066bcbd37400172d53382301bf8ac8ee8c40 | /cookbook/gravmag_tensor_centerofmass.py | a9527da60d8116307b636548b43a03cdfd8f32f5 | [
"BSD-3-Clause"
] | permissive | imclab/fatiando | eaf0e01746f198bbe65e140492a0f62abd299802 | edad8d020094d8fcda1e61402fcd46b686d6fd56 | refs/heads/master | 2020-12-26T03:23:37.984484 | 2013-11-27T23:00:22 | 2013-11-27T23:00:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,767 | py | gravmag_tensor_centerofmass.py | """
GravMag: Center of mass estimation using the first eigenvector of the gravity
gradient tensor (simple model)
"""
from fatiando.vis import mpl, myv
from fatiando import mesher, gridder, utils, gravmag
# Generate some synthetic data
prisms = [mesher.Prism(-1000,1000,-1000,1000,1000,3000,{'density':1000})]
shape = (1... |
d07e3da73195b4126e82f01c5ab6a034d29f43ef | 07aa9b5a07df2a80b7d899da1da63c84b1060fec | /src/iegen/codegen/_gen.py | 66028fe00b29c3ca43b335906153254c0cea356b | [] | no_license | lamielle/iegen | f26da812a01557daca086e0a1c76a62af8fe7cd4 | 0f48edad8d14ae18c907d705751552cf6eb53c8e | refs/heads/master | 2016-09-05T12:48:23.698779 | 2010-12-14T19:17:13 | 2010-12-14T19:17:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,640 | py | _gen.py | #---------- Code Generation Phase ----------
def do_gen(mapir):
import iegen
from iegen.codegen import Program,gen_preamble,gen_inspector,gen_executor,gen_main
iegen.print_progress('Starting the code generation phase...')
program=Program()
#Create the program
if iegen.settings.gen_preamble:
iegen.print_progr... |
16d2312024ec24d69ed637ebb16420e59ebe2134 | 5a4bfa68270b218499d64e6cf025b0e96a203c51 | /scripts/download_mps_events.py | 92e1c971047d398a949be7f21e99df1703f8929b | [] | no_license | mneedham/graphing-brexit | 1216ecfd822754b1a5e7c84ecd9d4294178e8443 | 71b2224f034565998cf50e794f37b9ba6a26f83c | refs/heads/master | 2020-05-02T23:38:41.117601 | 2019-10-18T15:33:45 | 2019-10-18T15:33:45 | 178,285,950 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,030 | py | download_mps_events.py | import requests
import json
import os
key = os.environ["KEY"]
with open("mps_formatted.json") as mps_file:
data = json.load(mps_file)
for mp in data:
person_id = mp["person_id"]
if not os.path.exists(f"data/mps/{person_id}.json"):
response = requests.get(f"https://www.theyworkfory... |
52d2b2b8e07cf734bef4dd55747334fc3e5fc7ed | 6b5f492e89c7eea7276270fb86ed6022e05d15dd | /higher_or_lower.py | 7c7f8ce8eb4ff54eb6bd75b5349ebc97e0b91e72 | [] | no_license | bagayokom/Kakegurui_Project | b08ef95e8637f6913046c64ce3c901d5ad3c1754 | 27832ac9ffcfcb281bc8fa8d6db13493df5d0bfe | refs/heads/master | 2020-08-31T05:52:08.901912 | 2019-11-05T13:58:02 | 2019-11-05T13:58:02 | 218,613,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,969 | py | higher_or_lower.py | import random
# Yanira Manzano & Mohamed Bagayoko
# Higher or Lower Game
# November 5 2019
def introduction():
print("Hello user. My name is the dealer. Please enter your username:")
username = input("> ")
print(f"Welcome to Higher or Lower, {username}!")
def rules():
print("""Do you want me to exp... |
e7a55ba90cace5973c560ebd62d92521f6b3b441 | 8b1375fe23bfc7c8ea2829c163dd32202392425b | /elasticsearch-curator/elasticsearchCurator.py | 032774003fb1dcbbbd27a9f13d67ed6586df32a6 | [] | no_license | shree665/PythonExamples | d014771290ebc81ce8fd1d5a4d4c361fae4429f4 | 07a439d287ad5f32e50989eb23c7ab15c3360766 | refs/heads/master | 2021-01-15T20:58:08.941969 | 2018-09-24T19:20:02 | 2018-09-24T19:20:02 | 25,383,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,240 | py | elasticsearchCurator.py | from flask import Flask, request
from flask_restful import Resource, Api
from json import dumps
import elasticsearch
import curator
import sys
import smtplib
import os
import time
import schedule
import threading
import sys
import traceback
app = Flask(__name__)
api = Api(app)
localhost = False
localtime = time.ascti... |
8904b4d84e8c0f1a916c9ec2e71003f8f73eb499 | 5146b5ea908ec2c4f601a231d94ec39331da97b1 | /gather/main.py | baae46f416e36ceb9b590d96371a1a10dfa4eb14 | [] | no_license | rybycy/ProSta | 5161cb7ec993e9b0990bc6b923d4297387e4499e | b2e0b2e7cf226aedc4eb5b79180eb504829e3dd1 | refs/heads/master | 2016-09-05T18:17:25.205014 | 2014-12-13T10:32:05 | 2014-12-13T10:32:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 924 | py | main.py | __author__ = 'Michal Robaszynski'
from android import Android
from time import gmtime, strftime
import sys
import os
MAX_APS_PER_FILE = 150
droid = Android()
results = {}
droid.wifiDisconnect()
print('starting')
directory = '/%s/wireless_auditor' % sys.path[0]
date = strftime("%m_%d_%H_%M_%S", gmtime())
if not os.... |
fec2397fda761c8cb4da823d490d7a97150e23f2 | cba53c1da05434b1c431b9052e9dedf252f23d74 | /Code/nfldatagen.py | cfccdbea9af9213825e3da064f027c4bca3b132a | [] | no_license | andrec279/nfl-data-hackathon | 998ef1a29a68f04cd42159aea7bb4812f1155832 | 0e4555c5134acdfe77405859509fde1fdb52b487 | refs/heads/main | 2023-02-15T12:08:08.898580 | 2021-01-10T21:18:15 | 2021-01-10T21:18:15 | 283,344,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,747 | py | nfldatagen.py | import boto3
from pyspark.sql import SparkSession
from pyspark.sql.functions import explode, array_contains, rand, rank, col
import time as tm
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from datetime import datetime
from datetime import timedelta
from pyspark.sql.window import Window
'''Thi... |
52966be9f5650ca4e17e6d0dcf34306e9edcdd2b | 0ad4645f5cf876275e0a5e6aa2d5f7e7ddae1c3b | /Euler_7.py | 98a9e477f4e3b65b0bfd461d923e48a6cbe509a6 | [] | no_license | addycakes/Project_Euler | 187e3a5773b144888c3a9ef5211f858256a5c748 | 1d85ddd5cbd1c93fcce3f57df6fdd55ed32567df | refs/heads/master | 2021-01-23T02:54:00.681439 | 2016-02-25T13:02:30 | 2016-02-25T13:02:30 | 11,932,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 829 | py | Euler_7.py | def memo(f):
"""Decorator that caches the return value for each call to f(args).
Then when called again with same args, we can just look it up."""
cache = {}
def _f(*args):
try:
return cache[args]
except KeyError:
cache[args] = result = f(*args)
return... |
429d724063897fa41285dd3a75b4715323252d8d | e070f583cf6ec0edf03b9cbb2f7d9e8051831d57 | /transactionspider/middlewares.py | 32c9d8c992e6510a8ebe7fdead99835224599f12 | [] | no_license | CloudDataX/transactionspider | 5fea3443026d8c4bd6302c85344697463cc7d283 | 95d40fc071be6bf7d68e107c03dea253c2281f4a | refs/heads/master | 2021-01-09T20:55:48.068836 | 2016-07-17T15:07:27 | 2016-07-17T15:07:27 | 62,570,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,157 | py | middlewares.py | #! -*- coding:utf-8 -*-
# encoding: utf-8
from scrapy.http import HtmlResponse
import time
import urllib
import urllib2
import httplib
import cookielib
from urllib import urlencode
from urllib import unquote
import json
from transactionspider import StockCode,MaxYear
class TransactionMiddleware(object):
start_url... |
cec4bf1a43f6ae27a2646c8b480e02a20c01003e | f675031cfc7ade7da26a9a296cb25e26b65fab06 | /Lesson 4 hmwrk/Zadanie3-4.py | c8b1051f9d3bb60bce35f40440567bcade7c193c | [] | no_license | geo178/repo-github | f07507c9250a7916879a252fca9dc6e2c3b8b16d | 674b1ab77343105592f7d93b558262cddf6830a0 | refs/heads/master | 2021-04-04T20:02:39.060934 | 2020-10-28T11:44:58 | 2020-10-28T11:44:58 | 248,482,862 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | Zadanie3-4.py | """
Для чисел в пределах от 20 до 240 найти числа, кратные 20 или 21.
Необходимо решить задание в одну строку.
Подсказка: использовать функцию range() и генератор.
"""
print([param for param in range(20,240) if param%20 == 0 or param%21 == 0])
|
896168f165edc83024fb3a3845c718b94af5ca87 | 14f37e84d5cbeebf4eb32e31344575a6cf99b2a6 | /src/my_model.py | be056ac917e38dd270d6e6e012a290b9adffe442 | [] | no_license | ruomengxu/BDH_Heart_Failure_Pred | 3c17458b2b1fb1f8d519bf0817d610a785a33a6e | a24afdfa4a64d292319e62064652c79c7a614674 | refs/heads/master | 2020-05-23T05:00:03.416105 | 2017-03-12T19:22:44 | 2017-03-12T19:22:44 | 84,750,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,472 | py | my_model.py | import utils
import etl
import cross
import pandas as pd
import numpy as np
from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier, ExtraTreesClassifier
from sklearn.feature_selection import SelectFromModel
from sklearn.model_selection import GridSearchCV, cross_val_score
from sklearn.datasets ... |
4770dc7ce996428bda1a3cd417f4675a17caedbb | a212e4ff54c2da04876c7e83fb0be0884ed4e2a9 | /week1/week1.py | ba84a8b68b4776fb4b40f28bb6cba3983e42cc07 | [] | no_license | SUNFLAIR/Machine-Learning | 309f06724ae5bbe2cedd5ab153dead143821ad88 | 1209e80cb7e1f3f092a6c171e09ebf1fe19f17e6 | refs/heads/master | 2020-04-01T17:19:24.556922 | 2018-10-18T03:53:06 | 2018-10-18T03:53:06 | 153,423,277 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,833 | py | week1.py |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats
from scipy.stats import norm
from sklearn.preprocessing import StandardScaler
import warnings
warnings.filterwarnings('ignore')
data_train = pd.read_csv('train.csv')
# print(data_train.head())
# print... |
55416b9d4181f7075902ab668a2ae655003af60c | 6a06a70a62574665e61ef64080668e16ae1ca2c4 | /Classification.py | 03673a3499c256311b0c7462adc7fae9e65d5816 | [] | no_license | ankushgore07/heartdiseaseprediction | 34e5c7fc349808962e54e241f74e30a6966df6d7 | b8689d4a9d1193d00e998bc5f5a7a9d13717c2a1 | refs/heads/main | 2023-08-26T17:48:00.024739 | 2021-10-02T06:48:14 | 2021-10-02T06:48:14 | 412,710,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,697 | py | Classification.py | from pandas import read_csv, DataFrame
import pandas as pd
from pandas.plotting import scatter_matrix
from matplotlib import pyplot
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import StratifiedKFold
... |
6e4812236a1d4ca9bc7416183a46ab0cc7f4ad45 | baefcf2084a6989790f7b3523874ee15b68d4677 | /process_data/detector_transforms.py | ad815f50a47bc6e267c110b7f1a81cac51b36850 | [] | no_license | akinoriosamura/PCN-pytorch | a2771e3b31a4dff2a30d756c51e512cc991e1274 | 812643fd3f975313647e52b1880e754f1041feb4 | refs/heads/master | 2020-06-14T10:15:09.145365 | 2019-08-01T04:39:36 | 2019-08-01T04:39:36 | 194,978,583 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,852 | py | detector_transforms.py | import cv2
import os
import numpy as np
import torch
class Rescale(object):
"""Rescale the image in a sample to a given size.
Args:
output_size (tuple or tuple): Desired output size. If tuple, output is
matched to output_size. If int, smaller of image edges is matched
to output... |
e010924c11409a7cd1a4846ccef4d66cdc495f3a | 5159172983151270dfb9f1a17bb0df199fae3ecc | /toneMap.py | d08603323e62d22e93d37de429acd2f9249caf33 | [] | no_license | 11lookpig23/pencilSketch | 67aa103594a4c160bf2d336bd970c4d076342910 | 0b08bfe365a64189ee2e90319b136139dff0b66c | refs/heads/master | 2020-12-01T00:53:19.846163 | 2019-12-27T22:39:48 | 2019-12-27T22:39:48 | 230,526,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,869 | py | toneMap.py | import numpy as np
import cv2
from skimage import io, color, filters, transform, exposure
import matplotlib
import matplotlib.pyplot as plt
import math as ma
import gf
from skimage.color import rgb2gray
def ToneMap(ori_img,ua=105,ub=225 ,sigb = 9,mud =90,sigd = 11):
## input: origin image
## ua = 105,ub = 22... |
627685ddb64c0c7ef1b298bbcb656b8868e29c72 | 9cec93a18ea94504947820205d0faae4d67ecd8d | /TTHAnalysis/python/tools/btagSFs_POG.py | 93ae6acf7228ab8cd138534648004306652245e5 | [] | no_license | DESY-CMS-SUS/cmgtools-lite | de88b1d5dc20a925ed5b7c7be69fa3ef677955c6 | db52d50047178563a0eb7f5858ae100aa408ec68 | refs/heads/8_0_25 | 2021-05-23T04:36:22.900460 | 2017-11-09T10:32:41 | 2017-11-09T10:32:41 | 60,184,794 | 3 | 9 | null | 2021-02-17T23:22:12 | 2016-06-01T14:37:18 | Python | UTF-8 | Python | false | false | 10,620 | py | btagSFs_POG.py | #!/usr/bin/env python
from CMGTools.TTHAnalysis.treeReAnalyzer import *
import re,os
class BTag_SFb:
def __init__(self,filename):
self._SFb = {}
self._SFbErrs = {}
self._ptbins = []
file = open(filename, "r")
ptminLine = file.readline()
ptmaxLine = file.readline()
... |
2972214cf3d5df4d73cc50bac63afd3bf7286f96 | 83fbeedced1096c65a6732555735f6289fa9f36f | /HW4_6_1.py | 4ca975c7b389032fa107041ce626950e6862dc33 | [] | no_license | vitalyvj/python | 26b7256fea046e57a9b6e3197a021908a1299cc0 | be91819407125754eedb8de2ffde2a80baa9776f | refs/heads/master | 2020-11-27T07:27:51.491444 | 2020-02-03T22:21:26 | 2020-02-03T22:21:26 | 229,354,535 | 0 | 0 | null | 2020-02-03T22:21:27 | 2019-12-21T00:12:36 | Python | UTF-8 | Python | false | false | 157 | py | HW4_6_1.py | # script1
from sys import argv
from itertools import count
filename, x, y = argv
for el in count(int(x)):
if el > int(y):
break
print(el)
|
983e79f0f8fd11e5e74f452c1cdc657c7af7867d | 70f99db474b3fb4390cbf1ed9470794b0ea7a1c4 | /app.py | cfae7cbe43a47df774383a1b2ec51a2a7eee94e5 | [] | no_license | MustafaBozkurt84/streamarabamCOM | 806acf01bc40794ff84f65a47fef37e290c153e6 | afc9921d96d02535c1e50b80977abb13780dbb43 | refs/heads/master | 2023-02-26T10:41:35.968906 | 2021-02-05T23:16:36 | 2021-02-05T23:16:36 | 336,318,783 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,614 | py | app.py | import requests
from bs4 import BeautifulSoup
import pandas as pd
import time
import os
import gc
import time
from contextlib import contextmanager
df1 = pd.DataFrame()
def Convert(a):
it = iter(a)
res_dct = dict(zip(it, it))
return res_dct
while True:
for page in range(1, 2):
print(page, end=' ... |
1728a196fd6bf59ee64b3f9473f81fa15d3b91ee | b75c5eb304338ab6b59099fae26e9a44d3501bd4 | /src/flowchem/devices/knauer/knauer_valve.py | f755b40ad2fb5070e04401b9a2e2b603b337ad5c | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | cambiegroup/flowchem | 2e0ae31bdc93316bbecafd643c130b5458ccac48 | 0fbd0626565f95baa9ef890af7d9f7142cb8904e | refs/heads/main | 2023-08-23T12:38:41.463449 | 2023-05-30T14:49:51 | 2023-05-30T14:49:51 | 300,656,785 | 14 | 3 | MIT | 2023-09-13T12:05:34 | 2020-10-02T15:23:15 | Python | UTF-8 | Python | false | false | 6,884 | py | knauer_valve.py | """Knauer valve control."""
import warnings
from enum import Enum
from loguru import logger
from flowchem.devices.flowchem_device import DeviceInfo
from flowchem.devices.flowchem_device import FlowchemDevice
from flowchem.devices.knauer._common import KnauerEthernetDevice
from flowchem.devices.knauer.knauer_valve_com... |
2dd4820952ea3559d7268f9f5524bf17300c0f2e | e77f25a27096418c635851b5f7bc134614e5ff4a | /nnunetv2/inference/sliding_window_prediction.py | 07316cfa7b0f95997996114656c8f63dcacd5421 | [
"Apache-2.0"
] | permissive | MIC-DKFZ/nnUNet | 5f8a5390b6f3b7eda89654749b7688c8d266c76e | b4e97fe38a9eb6728077678d4850c41570a1cb02 | refs/heads/master | 2023-09-01T17:51:57.348191 | 2023-08-28T15:08:53 | 2023-08-28T15:08:53 | 181,846,371 | 4,219 | 1,472 | Apache-2.0 | 2023-09-04T12:31:34 | 2019-04-17T08:10:56 | Python | UTF-8 | Python | false | false | 2,940 | py | sliding_window_prediction.py | from functools import lru_cache
import numpy as np
import torch
from typing import Union, Tuple, List
from acvl_utils.cropping_and_padding.padding import pad_nd_image
from scipy.ndimage import gaussian_filter
@lru_cache(maxsize=2)
def compute_gaussian(tile_size: Union[Tuple[int, ...], List[int]], sigma_scale: float ... |
3837c9021a6d0ae4679777584e52db375ebb80fc | e8f3b23ce8fe3633a80da4daea2146c27f4c2d60 | /titanium/activation.py | c6ffd7fba07289bb52f9d4f59a68af4d9adbf44e | [
"MIT"
] | permissive | vaclavcadek/titanium | 95a8b031a1fedc179bf7e4932bd88271b7e09430 | ace635604d29a5607b5005653ef486b5f2fb6b9f | refs/heads/master | 2022-07-14T08:32:31.708419 | 2016-09-29T14:27:55 | 2016-09-29T14:27:55 | 64,304,527 | 4 | 1 | MIT | 2022-06-21T21:07:04 | 2016-07-27T11:54:12 | Python | UTF-8 | Python | false | false | 175 | py | activation.py | import numpy as np
logistic = lambda z: 1.0 / (1.0 + np.exp(-z))
tanh = lambda z: (np.exp(z) - np.exp(-z)) / (np.exp(z) + np.exp(-z))
rectifier = lambda z: np.maximum(0.0, z) |
1bf5c9605d1bf3cf98ca094bd4b6d6b72fc2c75d | 4366cd8448b86772b03860cdfa092633687e5171 | /test2/student.py | 166f543e81bf814c1552027bfb2c06beb5362c5b | [] | no_license | dollarkillerx/Python3Study | 1d6b35bba423c99392890c3b5ffb2279159a5bbc | 8de73d5749ce645baaecc24f808b04c717a0b7f7 | refs/heads/master | 2020-05-02T07:09:30.216839 | 2019-03-28T07:43:45 | 2019-03-28T07:43:45 | 177,810,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 271 | py | student.py | from human import Human
class Student(Human) :
def __init__(self,name):
self.name = name
def do_homework(self) :
print(self.name + 'do homework')
student1 = Student('dollarkiller')
student1.get_name()
student1.do_homework()
print(Student.sum) |
d979b87004cfa86bd014a8fd30516c095604f63d | 01b61594995a5454a5515ef570c5937f60515026 | /day15/day15.py | 86a0284546be41220f0d5bd34538500b489fa222 | [] | no_license | raresrosca/advent_of_code_2020 | 77f396efd942a06bbff5e34d8ea7af34bd11ac6d | 11ebf01ace7460e9020d16924af2bb04231f1ea6 | refs/heads/main | 2023-02-03T12:01:04.477305 | 2020-12-18T20:41:02 | 2020-12-18T20:41:02 | 320,232,142 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 654 | py | day15.py | def solution(rounds, starting_numbers):
a = [0] * rounds
for idx, i in enumerate(starting_numbers[:-1]):
a[i] = idx+1
pos = len(starting_numbers)
init = starting_numbers[-1]
while pos <= rounds:
if a[init] == 0:
initnew = 0
else:
initnew = pos - a[in... |
5a14d4e5879607afbb03c58a6d41da89da65f5f0 | 90c11ee58bc1c1e1ab51e98b76797599df7e7315 | /project/settings/development.py | d299feaac722d367ae949cc2d9092e4820be80e6 | [
"BSD-2-Clause"
] | permissive | CalebMuhia/django-barcode-generator | 76cf498c80ac76ec57a54625aabeff3b1e585e39 | 63a822aa626f137baffd37498fdfdc0f01485325 | refs/heads/master | 2020-04-05T22:46:39.337662 | 2012-07-22T16:01:25 | 2012-07-22T16:01:25 | 5,142,552 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 306 | py | development.py | import os
from project.settings import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'development.db'),
}
}
SECRET_KEY = ''
WSGI_APPLICATION = 'project.wsgi.development.application'
|
d9748f2c9b45372b66bb3b4ff6464959f86fb009 | f21838725df40e29057b99bad3803de515eb00b1 | /CodeFight/Intro 10.py | 0aed9851e0fe80c21bb5c1a82df99fe10b98ff83 | [] | no_license | reschaap/python | 0b998c974391133d026a04651f121439d12919ed | f8cadabcdba3a950e3faabec4a0a47e4446b1a13 | refs/heads/master | 2020-05-07T14:30:16.456101 | 2018-08-18T15:44:39 | 2018-08-18T15:44:39 | 20,840,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 441 | py | Intro 10.py | def commonCharacterCount(s1, s2):
character_count = 0
unique_one = set(s1)
unique_two = set(s2)
combination = [letter for letter in unique_one if letter in unique_two]
for letter in combination:
count_s1 = s1.count(letter)
count_s2 = s2.count(letter)
if count_s1 <= count_s2:... |
b82a3f3e336a604a12449665257a97c1fb7755c8 | ba8a0f2a41d1b6cdd70a6fc538e36d9b8848f36f | /Objects.py | c98c55b0bc25d200a60d3e151abefa0a8b2533c2 | [] | no_license | A-And/HashCode2017 | 9f2cee1f2698e5917ea6fedb565ce94801e42020 | ade16e8bae800f48959a0b9957efa111e57c4b0f | refs/heads/master | 2021-01-17T04:26:41.906305 | 2017-02-23T20:41:30 | 2017-02-23T20:41:30 | 82,951,224 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,979 | py | Objects.py | class Video(object):
index = 0
size = 0
def __init__(self,index, size):
self.size = size
self.index = index
class Endpoint(object):
videos = {}
videoRequests = {}
latencyToDataServer = 0
latencyToCacheServers = {}
index = 0
def __init__(self, videos, latencyToCacheS... |
c13b38c66ac7312c05cd5e0e63429a06a3513eb9 | edc09158f502e78495a508edb1b0f2840edb5c64 | /web/src/p2k16/core/label.py | 2046c21e8f4d9fb39b851e03a25b0033fd4ebc2f | [
"MIT"
] | permissive | bitraf/p2k16 | e5ca6daad0835f2ae0ffce4af07fe3b0b60b06f2 | 02e02fe46aab3833f36e5f972305ba0b9ab90c34 | refs/heads/master | 2023-08-16T18:23:09.130112 | 2023-08-03T12:57:55 | 2023-08-03T12:57:55 | 74,043,268 | 7 | 9 | MIT | 2023-08-05T18:40:50 | 2016-11-17T16:01:36 | Python | UTF-8 | Python | false | false | 1,888 | py | label.py | import logging
from datetime import datetime
from typing import Optional, Mapping, List
import json
import paho.mqtt.client as mqtt
from p2k16.core import P2k16UserException, membership_management
from p2k16.core import account_management, event_management, badge_management
from p2k16.core.models import db, Account, C... |
c134fdc43aad5b2b4ac12483c5e1444b13875b92 | b437ab8c19f3e2b3a3b61dd50232d249a4c1a5f1 | /12_MRO_Brief.py | 13cc71b928b2309b38f791d475598a989c6d3d73 | [] | no_license | TauqeerAhmad5201/Python-OOPS | 6a9a8e561b836f1683d6000fa521ca239aa89804 | 08c3ae3d0ca11c6ab6be83f718cc8b7e04d4aba4 | refs/heads/master | 2023-07-19T16:45:13.389911 | 2021-09-11T14:18:53 | 2021-09-11T14:18:53 | 402,847,352 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 859 | py | 12_MRO_Brief.py | #super() works with __init__
class Impose:
def __init__(self):
print('Class Impose init is working')
def featureImpose(self):
print('Feature Impose is working')
class A(Impose):
def __init__(self):
super().__init__()
print('Class A init is working')
def feature1(sel... |
e5d9cfefed09ffe5cee4cd986a9cfc4dc79c90c9 | bde7babd6abf8bd3208146e36c80539b406baafc | /fixture/session.py | 7f98e1845290569300a43c5675c70ba9f6a5b0e4 | [
"Apache-2.0"
] | permissive | bloodmilk44/python_training_mantis | 5451ea1dbf053d9b73b854427f45ae50bf22978c | 878fbbdd5595b3f1224666050b294c6f2b118f7d | refs/heads/master | 2022-07-04T11:49:19.927806 | 2020-05-08T17:56:21 | 2020-05-08T17:56:21 | 262,003,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,181 | py | session.py | from selenium import webdriver
from selenium.webdriver.common.by import By
class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
self.app.open_home_page()
self.app.driver.set_window_size(1108, 822)
self.app.driver.find_element(By.NAM... |
71c14153535f829610f9b6464d3723e2222a94f2 | 829de392942fa6744d0b6211e2fa806a79454111 | /WSGI/wo_framefork/run_wsgiscript.py | 6007732a89c52ffdefaa7ae9de47e608a671421f | [] | no_license | iitwebdev/lectures | f7c3fd673d9c10b39c5210faaa550d9df5b6c405 | 48cf02cb5b628ec883a3bc80268f2ab49bfa8351 | refs/heads/master | 2021-01-01T16:45:20.278573 | 2015-03-20T11:13:46 | 2015-03-20T11:13:46 | 17,314,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,133 | py | run_wsgiscript.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
"""
Example reloaded wsgi server
http://maluke.com/old/webdev#запуск_wsgiскриптов_без_apache
"""
import sys
import os
from time import sleep
from traceback im... |
977ec4a2db25e955706810dc05724c22121f4100 | 7f9d80a1de92694da63776a9503a3bac03e83992 | /Project2/ScratchPads/main-old.py | eb3f4d26581fe35b9cb7552e2dcb718f851e20f3 | [] | no_license | ChiAmyC0987/ETL-TRAFFIC-MONSTER | 5d9797b585dd6fcaa8da5029e6d091ccfe02e339 | 4ca8ca5f96040f4a201883d973cab8944f412306 | refs/heads/master | 2020-06-14T13:08:40.458724 | 2019-09-21T19:04:43 | 2019-09-21T19:04:43 | 195,012,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,508 | py | main-old.py | # Import csv file
import csv
# initialize variables to hold integer, strings, lists
row = 0
City_ID = []
ID_Count = 0
Weather = [[]]
file_name = "Resources/cities.csv"
# Open the cities.csv
with open(file_name, newline='') as csv_file:
csvreader = csv.reader(csv_file) # Read each line of Data as ... |
8d4aad253a2ee9aa5b41b3420034f7a2322d74aa | 9d177d4133f64ef16daab9dd71bffcc8fbb766d9 | /ddht/v5_1/packets.py | fe3d252f0b4d9b904f6843d02c06d45df08b125b | [
"MIT"
] | permissive | pipermerriam/ddht | 8afb799742e1a4467b9622a65758525f7edc9f18 | 7e0b66ac96591a590e40c7e15d880af01e1f1a36 | refs/heads/master | 2023-08-28T08:55:18.366964 | 2020-09-11T15:26:00 | 2020-09-11T15:26:00 | 282,279,617 | 2 | 0 | MIT | 2020-07-24T17:31:02 | 2020-07-24T17:31:02 | null | UTF-8 | Python | false | false | 8,981 | py | packets.py | from dataclasses import dataclass, field
from io import BytesIO
import secrets
import struct
from typing import Generic, NamedTuple, Optional, TypeVar, Union, cast
from eth_enr.abc import ENRAPI
from eth_enr.sedes import ENRSedes
from eth_typing import NodeID
from eth_utils.toolz import take
import rlp
from ddht.base... |
a093cf17852fece98a2186d8d68a91cd7b208641 | 0dcf78e319956f2cb2327c5cb47bd6d65e59a51b | /Python3/BinaryTree/ConvertSortedListToBinarySearchTree/ArrayRecursive109.py | c60dc114cc779d6794d1764ebea50d4fb431a00b | [] | no_license | daviddwlee84/LeetCode | 70edd09a64a6f61492aa06d927e1ec3ab6a8fbc6 | da1774fd07b7326e66d9478b3d2619e0499ac2b7 | refs/heads/master | 2023-05-11T03:16:32.568625 | 2023-05-08T05:11:57 | 2023-05-09T05:11:57 | 134,676,851 | 14 | 4 | null | 2018-05-29T14:50:22 | 2018-05-24T07:18:31 | Python | UTF-8 | Python | false | false | 970 | py | ArrayRecursive109.py | from typing import Optional, List
from ..TreeNodeModule import TreeNode
from ...LinkedList.ListNodeModule import ListNode
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
# Definition for a binary tree node.
# class ... |
3843dd172958aa8826378fc28f12ef2fa911b998 | df7b50693fa251ab6f827b500e9fa6e324554a2c | /Python basic P1/Ex_11.py | 401917a4491f24b36342b842a1fe7bb57b733ace | [] | no_license | ArthurkaX/W3SCHOOL-learning | 686bd98dde46838a59ec0edd7a496289ed5ce6e2 | f8fad8af743ae181d9bbde7bd8b659e45fff2693 | refs/heads/main | 2023-08-25T08:44:42.350633 | 2021-10-21T08:36:36 | 2021-10-21T08:36:36 | 417,807,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | Ex_11.py | # Write a Python program to print the documents (syntax, description etc.) of Python built-in function(s).
import pydoc
func = input('enter name of function >>>')
strhelp = pydoc.render_doc(func, "Help on %s")
print(strhelp)
print(abs.__doc__) |
95944309a9bb71f7516f3ac03758b6a4cf345869 | 3afc3c625e7e25452e09f4e52e5a63ebfd09e49f | /calculator/views.py | b41899d88a90a910eca3601c7a251c0c4cdc8274 | [] | no_license | Narador/StorageRetention | 86759b4f0030b3ed9c7074c79d559564ebb3f448 | fd8271e3117abb4f99e6dc189c5b0762c6497048 | refs/heads/master | 2020-03-19T07:28:44.695264 | 2018-06-18T01:44:16 | 2018-06-18T01:44:16 | 136,117,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,601 | py | views.py | ''' VIEWS CALCULATOR
from django.shortcuts import render, get_object_or_404
from .models import Server
def index(request):
Points to the index of the calculator app
all_servers = Server.objects.all()
return render(request, 'calculator/index.html', {'all_servers': all_servers})
def server(request, serv... |
754f3135990f22491f60b6544f5948701bdc1b87 | 5f344747d59297fe8436ded9cb7d7cd00f946c4c | /mysite/blog/admin.py | 5b5b6e2ceb4d174e523a8050059ffe4eaef59479 | [
"MIT"
] | permissive | HelloTecXin/ZXBlog | 08de16c364d8c5ec2d6f8c85636ec7301c804b80 | 60d1f95f541138aa56acbaf4dcfbfe208491d65b | refs/heads/master | 2021-03-29T01:52:43.743651 | 2020-04-01T05:54:11 | 2020-04-01T05:54:11 | 247,913,419 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | admin.py | from django.contrib import admin
from .models import BlogArticles
# Register your models here.
class BlogAriclesAdmin(admin.ModelAdmin):
list_display = ("title", "author", "publish")
list_filter = ("publish", "author") # 过滤器
search_fields = ("title", "body") # 可以用来搜索的字段
raw_id_fields = ("author",) ... |
7158066e705da78be261e0abf80ebdf5dcc30eeb | 0f3beccc9c1d94fbae3fddae34970d65d75f4ed8 | /src/app.py | 84d6c13fcd96794f7038336e4dd1b5579fa59e89 | [
"MIT"
] | permissive | Archer-Code/redis-view | 42241b91e443b84c3c42f202a245767d74abd63a | 14e6c82f70244ac5496a0d883ec53e4fa99d6623 | refs/heads/master | 2020-04-27T06:05:12.651603 | 2019-03-06T07:58:55 | 2019-03-06T07:58:55 | 174,098,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | app.py | # -*- coding: utf-8 -*-
from PyQt5 import QtWidgets
import sys
from mainwindow import Ui_MainWindow
from singleInstance import singleInstance
if __name__ == '__main__':
s = singleInstance()
if s.aleradyrunning():
exit(0)
app = QtWidgets.QApplication(sys.argv)
mainWindow = QtWidgets.QMainWin... |
a371a99e4be083946fd6363025dd594c739f26ca | efd107da8c6917e5a2c8f236b3a100a7c925380b | /loraine/server/loraine.py | 2043c0d21bc1e1bbd0ed8fe04cbec15c4b89d25e | [] | no_license | adamgreig/drhouse | a081aba0e4b43019d381154af635d1a7c3b5d8f0 | 937b27bce11064e616a4f1e055ef0ca88b3125a9 | refs/heads/master | 2016-09-10T10:36:22.891420 | 2014-12-17T21:46:55 | 2014-12-17T21:46:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,334 | py | loraine.py | import time
import yaml
import struct
import serial
import socket
import argparse
def get_args():
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-d', '--driver', type=str,
help="Serial port for driver",
... |
2f88157eb1b25c90b15986a39b563a70d319884f | ac82f18ea1dcb93db7224a82958012d34ddb5ae5 | /applied_info_theory/IKT_2.py | 4826122b8fe767901225b455a13c2e791b5be089 | [] | no_license | rafasaurus/homework | 02c64d4ad57722307eabd5d3480ce6e552a7a8dd | ce9e6b5e696c7377b360b72b3161f1958dda4cc9 | refs/heads/master | 2021-04-30T15:21:07.422608 | 2019-04-18T19:20:50 | 2019-04-18T19:20:50 | 121,237,284 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,387 | py | IKT_2.py | '''դասակառգման մեթոդը'''
import numpy as np
import copy
N=9
K=8
x = np.array([2,7,5,2,1,3,2,5,5,
6,3,4,5,3,2,3,2,1,
4,6,6,7,7,6,7,6,6,
3,5,3,4,4,5,1,4,3,
1,1,1,1,2,1,5,1,4,
8,8,8,8,8,8,8,8,8,
7,2,2,3,5,4,4,3,2,
5,4,7,6,6,7... |
cd1e43003a171bcde130460557625d909661f738 | 7dcaaa3951edb0d24d76f82c72675f5a76390566 | /Test01/doublep.py | 30fc4d41ee3683635bcb8357a4992465a737bba8 | [] | no_license | sarkwalvein/PyOpenGL | 9713828e343c5f7fef7b42a7f1dd89232a028569 | 140af216d1e5b9879392fea5cd507ec870d22fd6 | refs/heads/master | 2021-05-04T07:12:52.873141 | 2016-12-01T11:16:39 | 2016-12-01T11:16:39 | 70,582,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,990 | py | doublep.py | # From http://www.glprogramming.com/red/chapter01.html
#from OpenGL.GLUT import *
from OpenGL.GLU import *
from OpenGL.GL import *
import pygame
from pygame.locals import *
import time
import sys
spin = 0.0
lastCounter = 0.0
red = 1
green = 1
blue = 1
ired = 1/70
igreen = 1/110
iblue = 1/130
def init():
glClear... |
4fb31250758be51862404835718abcfec4a4a627 | 9317b3c9cf5d1e56ef75abe5cd70fddbc2b2e53c | /includes/func.py | 448f754e9bf6a33cae44825457bb3abdf0895d0f | [
"MIT"
] | permissive | C-H-coder-team/C-tools | ede4a67167b9ed660903ab06afdde5373c8b8b27 | 0868aa60b5747474666fee8c46eb045254da574d | refs/heads/main | 2023-05-31T17:12:28.723467 | 2021-06-14T05:53:49 | 2021-06-14T05:53:49 | 376,716,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 926 | py | func.py | #function_include tool
#MIT Licenses
#By Lijun_Network_Studio
#Made by fanjun
import os
def func(setting=str(),name=str(),ret=str(),num=str()):
file=os.open('include\ func.h',os.O_RDWR|os.O_CREAT)
pra='#pragma once \n'
ifndef='#ifndef FUNC_H \n'
define='#define FUNC_H \n'
endif='... |
79aa0638031cfcc6cddab2c1ef820abe5f781b57 | f10a766cbcde7edb339a64fd9d7675cedb798883 | /mini_project.py | f41a1346310b1347e5725743bc7cfa7d35d18941 | [] | no_license | raghav94603/265151_PythonMiniProject | d13a5295823b6af1b2ad8d84f1d9455e586b5563 | 90c975307d4df86bbb76a7534af91ab3082e268f | refs/heads/main | 2023-04-25T10:35:24.201926 | 2021-04-30T15:33:18 | 2021-04-30T15:33:18 | 359,752,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,062 | py | mini_project.py | """
# This is a small game which is based on very basic python commands known as:
# "Number Guessing Game"
"""
import random
PREV_SCORE = []
def showprev_score():
""" Append the attempts """
if len(PREV_SCORE) <= 0:
print("No Scores Found ! Let's Go You Should set a Target ! ")
... |
6e877e022a229147dde1077f6148f9b4581a5a41 | f5deff98a92c36e91ccad879e1a96b0cacf30433 | /cloudmgrweb/servers_viewer.py | d05f39bcf83f792911dbe161cbc57e259e77aef1 | [] | no_license | lefortig/cloudmgrweb | c7f7ffa62a58807844edd705f853da2d819da7e8 | 54e161f2c64a9a07480723503577dfc1e53d7678 | refs/heads/master | 2020-12-28T23:04:35.288788 | 2012-02-21T13:43:02 | 2012-02-21T13:43:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,587 | py | servers_viewer.py | # -*- coding: UTF-8 -*-
from __future__ import with_statement
from nagare import presentation, component, ajax
from ajax_x_components import KnownDiv
from cloudmgrlib.i_cmgr_resolvers import ICloudMgrResolvers
from cloudmgrlib.m_cmgr_cloudmap_resolver import with_cloudmap_... |
e8c0e274cad4241bd4139159af233ee01cc91c01 | ecfc35839dd80179d2aee0ac01b78306f39a1b74 | /kaggle_self-defined functions.py | 0fb84899b7f9d5bc549290dfb1f6cd6228d2fe4d | [] | no_license | feizhe1996/eBay_vegetable_chickens | e64b0b923f80e04165356fe73790a61aaf48e433 | a8b765a7b44b13e2e36d351506df9734f817353d | refs/heads/master | 2020-03-24T22:58:28.540976 | 2018-08-04T11:43:27 | 2018-08-04T11:43:27 | 143,111,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | kaggle_self-defined functions.py | #Kaggle home credit self-defined function
def quan_coder(x,col=[1,2,3,4]):
x = pd.Series(x)
s = pd.qcut(x,4,labels = False)
d = pd.get_dummies(s)
d.columns = col
return d
def show_mean(x):
train_df1 = train_df.loc[train_df['TARGET']==1]
train_df0 = train_df.loc[train_df['TARGET']=... |
44997fb8d6e782057a22a47cb61878e2a68bd4c0 | 489673856a1103b377d74de272ee56eb45762c31 | /Review2.py | 6d9254b2da3daf267d14bf0aaf72741a37c7d408 | [] | no_license | DemidovArtem/Review | 34e387ee97b3122841d905843aa4d332be099a93 | 7e100a45471dd65c387f1cb708fe0650e2ce93ec | refs/heads/master | 2023-01-09T07:53:03.832785 | 2020-11-17T17:47:10 | 2020-11-17T17:47:10 | 125,917,639 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,083 | py | Review2.py | """
Review2 - это программа, которая прогнозирует цену доллара в евро на дату,
отстоящую от последней из полученных данных на заданное пользователем кол-во дней.
Пользователь воодит даты начала и конца интересующего его диапазона, а так же
шаг, на который даты из диапазона будут отстоят друг от друга. Далее прогр... |
b0041ad2df6347b369e1703873df4ee87ab7e7c5 | 840ebc246f34a1c8c283eba3fe4dc3e1b226c642 | /assets/cgi-bin/test.py | fc3fa12132833d9c15e0da7832e5daa1a65a2cc8 | [
"MIT"
] | permissive | victormanoliu97/BooX- | cb68f1a8abbc2ea98352f22bf2805f85805614f3 | e888f0b777185e8227a7ea3a10641c1ad0d8da2e | refs/heads/master | 2021-01-24T08:46:13.681098 | 2018-06-14T05:02:29 | 2018-06-14T05:02:29 | 122,992,852 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,052 | py | test.py | #!/usr/bin/python
import os
import sys
import cgi
import cgitb; cgitb.enable() # Optional; for debugging only
sys.path.append('../server')
from subprocess import Popen
import GoogleBooksApiHandler as GBooks
from pprint import pprint
print("Content-Type: text/html\n")
print("yeee boiiii\n\n")
# pprint(GBooks.getInfoAb... |
94353ceeacc681fec98ac2b36d753e0c8844072f | 00792a90bfa302af8614f4a5f955c071ed320acf | /apps/plasma_params/migrations/0002_auto_20180718_1706.py | 51f001fe1e3e41bf778034948afab06cd7e3b286 | [] | no_license | elcolie/HT6MInterface | dceb8f5e9b501b8836904559bd40259ccfe49085 | 04abf3cc73618c1cf059fa67da8a043ec9fb43b3 | refs/heads/master | 2022-02-04T08:02:49.023460 | 2021-01-21T06:55:39 | 2021-01-21T06:55:39 | 123,398,906 | 0 | 0 | null | 2022-01-21T20:20:29 | 2018-03-01T07:30:16 | JavaScript | UTF-8 | Python | false | false | 3,699 | py | 0002_auto_20180718_1706.py | # Generated by Django 2.0.7 on 2018-07-18 17:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('plasma_params', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='DensityAndTempe... |
79f2fc934b52fbb987fa7815bb935d2bc289a8af | 69cf4b0606d15f6c0e31cf39a053e914fdb72233 | /get_meraki_admins.py | 9cf848cf920ea0aa40c017ceaa774e8e90f7c91f | [] | no_license | cacerespl/get_meraki_admins | 8e7967a91d4110609ef119bea7d4882b6cd1c8b0 | 9b57853c2498b86dbcb6ff646902be9e707af09e | refs/heads/master | 2021-04-27T02:33:23.374525 | 2018-02-24T03:24:43 | 2018-02-24T03:24:43 | 122,698,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 692 | py | get_meraki_admins.py | import json
import requests
import sys
#api_key and org_id are passed as arguments
api_key = sys.argv[1]
org_id = sys.argv[2]
url = "https://api.meraki.com/api/v0/organizations/"+org_id+"/admins"
def get_admins(api_key, url):
"""
This function will return a list of admins for an Organization
Arguments: ap... |
b3e70d0dd48a2f1a69035bbc9339861ff2a379d1 | 33a4d841353e62b2455d2ad87225684665f26797 | /HELLOPYTHON/day05/mycrawl02naver.py | 79b0354b4e4ceab1903aa140f96341cef7f41b25 | [] | no_license | yezin2/std-dditpython | 17f5b1be8d16f0f28b719a9c0407d05f99c23715 | 032683b64bfc06013ddec7fd3673bca7cc431dc1 | refs/heads/master | 2023-05-02T16:44:00.144343 | 2021-06-01T08:18:06 | 2021-06-01T08:18:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | mycrawl02naver.py | import requests
from bs4 import BeautifulSoup
url = "http://localhost/CRAWL/crawl.html"
response = requests.get(url)
if(response.status_code == 200):
html = response.text
# print(html)
soup = BeautifulSoup(html, "html.parser")
# print(soup)
res = ""
i = 1
for tag in soup.select('td'):
... |
4031acd2e432d29eeec7324caf79f547c4af539b | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/bulb-switcher-iii.py | f9ae75ada823a3568610724a901cd66400be071c | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 331 | py | bulb-switcher-iii.py | # Time: O(n)
# Space: O(1)
class Solution(object):
def numTimesAllBlue(self, light):
"""
:type light: List[int]
:rtype: int
"""
result, right = 0, 0
for i, num in enumerate(light, 1):
right = max(right, num)
result += (right == i)
ret... |
c73a199d1c1c1867f3d53ceebf614bc9b65c0d5e | 2b5086171f22e5b57c47995e0c31654b8e7f6046 | /ticket/admin.py | 12994b12d24ecdcc1ad7242347f76daf9e3506f4 | [
"MIT"
] | permissive | aman-roy/pune.pycon.org | 6c3edab63c0ae2d59e87cd9f4a1ef4d5fb1c1003 | f56cc948bd56767110d337c694ecbf5540bdf4b9 | refs/heads/development | 2022-04-02T00:57:02.492388 | 2017-11-07T02:37:58 | 2017-11-07T05:58:17 | 109,851,827 | 0 | 0 | MIT | 2020-02-05T15:42:28 | 2017-11-07T15:12:24 | HTML | UTF-8 | Python | false | false | 338 | py | admin.py | from django.contrib import admin
from ticket.models import Ticket, UserTicket, AuxiliaryTicket
@admin.register(Ticket)
class TicketAdmin(admin.ModelAdmin):
pass
@admin.register(AuxiliaryTicket)
class AuxiliaryTicketAdmin(admin.ModelAdmin):
pass
@admin.register(UserTicket)
class UserTicketAdmin(admin.Mode... |
e564e0d05c3c0e60f356422722803df510d9dd0b | 176cec8e880eb5fc523f2cf0822264051aa3cf9c | /batch_testing/fast_btk.py | f41f653cb0e9270e95b4c0be47af17fe3e5ec6a9 | [] | no_license | Nyu10/batch-testing | c4b7a05e95a9d0b9be382bd34b69128e412beba4 | a3935dd0084f24e1d09fbc2b322eccfe064b9acc | refs/heads/main | 2023-07-09T08:38:39.189803 | 2021-08-13T12:58:42 | 2021-08-13T12:58:42 | 390,153,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 32,140 | py | fast_btk.py | import numpy as np
import pandas as pd
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
from sklearn.metrics import precision_score, recall_score, f1_score
from scipy.optimize import fsolve
import numba
from numba import njit,jit
#
@jit(parallel = True)
def conventional_tes... |
9bc13c608c079cbf23ed04f29edd1fd836214cde | eece04dc578b94c7eec778cbafad6e2f34a632bd | /api_comment/comment/views.py | 38b6c61f435196990ae45efc19c6cc50dc20c4ba | [] | no_license | Ksendikov/nested_comments | 7243a98f8764b1edfe9c8383f4b7efca1ea08262 | 7aeb25df04ea483536c0dc630de366b6a0ec69bd | refs/heads/master | 2023-07-16T14:12:51.495116 | 2021-08-25T08:20:04 | 2021-08-25T08:20:04 | 397,623,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | views.py | from rest_framework import viewsets, mixins
from .models import Comment, Post
from .serializer import CommentSerializer, PostSerializer, AllCommentSerializer
class PostViewSet(viewsets.ModelViewSet):
serializer_class = PostSerializer
queryset = Post.objects.all()
class CommentViewSet(viewsets.GenericViewSet... |
b11e2837d3ba9c14770b8039186a2175adc41ea1 | 67da0f2c50debc88db45b26512c0460e768c7082 | /algorithmx/main.py | ac0c4d54ba56596f90a58a9b76831be72e2b7a74 | [
"MIT"
] | permissive | BufferNihility/algorithmx-python | 11db7682477e6b360fead7c15d8c97fc3361ca3f | 1028a69d54c0d4776c4ed47d9f5609c863a9102d | refs/heads/master | 2023-03-16T02:43:15.621995 | 2021-03-15T08:53:37 | 2021-03-15T11:08:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,732 | py | main.py | from .server import CanvasServer
try:
from .jupyter import JupyterCanvas, create_jupyter_canvas
HAS_JUPYTER = True
except:
HAS_JUPYTER = False
JupyterCanvas = None # type: ignore
def http_server(
file: str = None, host: str = "localhost", port: int = 5050
) -> CanvasServer:
"""Creates a new... |
2da7892722afde5a6f87e3bd6d5763c895ac96c9 | eedb0ba2a71412e82f06a5ca27a9fc6678e68163 | /data/create_aminer_dataset.py | b07652c62a501fb3b0cc5008e946351b02a2b698 | [] | no_license | recuban16/Meta-Graph | c5f8cb11c166c717001fc6e7e5e3718f83907b9f | e35ef1b6c6969a2bb0b0c6bba0b43a269ede3cac | refs/heads/master | 2022-12-17T19:30:17.922394 | 2020-09-17T14:53:44 | 2020-09-17T14:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,810 | py | create_aminer_dataset.py | import json
import os
import ipdb
from tqdm import tqdm
import argparse
from os import listdir
from os.path import isfile, join
import pickle
import joblib
from collections import Counter
from shutil import copyfile
import networkx as nx
import spacy
import nltk
import numpy as np
nltk.download('stopwords')
nltk_stopw... |
e38ae7f91deed1be00e60b7516210ea1feefe23e | 9682173a3040f72ad03d56dc0eb4c167f91f335f | /generate_destination_filenames.py | 836299bc34284662f9f63af2ac51cd7bd6efb343 | [] | no_license | dactechie/DocumentsMigration | 75abfc3f35ba7bd14786012a6b789c944c56b24e | 7762d350c67b040665bd008b67f0ff0b236a7a1d | refs/heads/master | 2020-05-04T20:04:07.202368 | 2019-04-04T04:26:03 | 2019-04-04T04:26:03 | 179,420,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,258 | py | generate_destination_filenames.py | import sys
import os
from configparser import ConfigParser
import logging
from mod_argparse import setup_cli
from checkers.IndexFile import DocumentIndex, ProgressNoteIndex
from checkers import source_files
from utilities import write_to_file, strip # , write_to_db_isok
# import pandas as pd
logger = logging.getLogger... |
069338b188f3cf16357b2502cbb3130b69918bd9 | 8d207219144b66ba5341244cb09ca5153f85c790 | /htmap/__main__.py | d7b8a34dbd7844d338abad0c18c2dfeba470dc5d | [
"Apache-2.0"
] | permissive | htcondor/htmap | 0a8cd0ec5d102107c8a7b6e125572f665c584112 | ddb0f612f3b68678fd3df907442fdf956a42ae88 | refs/heads/master | 2023-07-09T02:58:42.666588 | 2022-11-04T21:19:27 | 2022-11-04T21:19:27 | 141,358,024 | 26 | 8 | Apache-2.0 | 2023-06-27T13:59:23 | 2018-07-17T23:54:30 | Python | UTF-8 | Python | false | false | 87 | py | __main__.py | from .cli import cli
if __name__ == "__main__":
exit(cli.main(prog_name="htmap"))
|
b52269237d66ea50c453395b9536f25f1310bf2e | 9f3e947a23876acc4444a9a1bad2c3b43d7f0415 | /mail_extractor.py | bbf89e58842d7769fa05587b44ec602503c8105e | [] | no_license | FUNk31r0/Mail | eebb353c186dedfc502a323263c8400643eb2842 | 8a244f1e7fd0d8d86f78bc051db921e4867dfeb5 | refs/heads/master | 2021-01-18T19:30:00.161730 | 2017-07-20T02:48:54 | 2017-07-20T02:48:54 | 86,896,989 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 696 | py | mail_extractor.py | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import re
from blessings import Terminal
from validate_email import validate_email
import requests
import sys
_site_ = sys.argv[1]
_saida_ = sys.argv[2]
_file_ = open(_saida_, "w")
t = Terminal()
r = requests.get(_site_, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.... |
8c539dbbb762717393b9a71ddca8eb3872890854 | 1bfbc756774c3ac0800fccb1944655456b2b9c0e | /src/processData.py | c9cc2c5e344a2bfe1ce97469b354685ce26ee3ad | [] | no_license | anamika-und/musical_web_app | e5f089a104858b25a9f0642030dd6ea2defa2bde | 95c5016cc249d09c0a3d612313f94f0678dac334 | refs/heads/master | 2023-05-12T03:51:17.998751 | 2019-09-17T03:07:04 | 2019-09-17T03:07:04 | 207,927,419 | 0 | 0 | null | 2023-05-01T21:14:50 | 2019-09-11T23:57:22 | Python | UTF-8 | Python | false | false | 1,746 | py | processData.py | import re
import os
import pandas as pd
instruments_file = os.path.abspath("instruments.csv")
input_names_file = os.path.abspath("names.txt")
output_names_file = os.path.abspath("names.csv")
inst_name_file = os.path.abspath("name_instrument.csv")
reg_ex = '; |, |\\*|\n'
name_header = ["first_name", "last_name"]
def ... |
0db0daf9bea254cffaec1280cd13b2d70368cd94 | 6136cc9a79c244c2cb7356940554719d11ad11c4 | /HW9/bootstrapconfidence.py | 879cacc60ed98cb68d14bece86faeffd121d1d6a | [] | no_license | deepakdilipkumar/allofstatistics | 30895483ee60ccaae528240413ae65a69ec79261 | 37bf935e472082a9536802da3eb4e73835ef7bff | refs/heads/master | 2020-09-22T04:21:45.533430 | 2016-12-01T02:20:42 | 2016-12-01T02:20:42 | 66,225,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | bootstrapconfidence.py | import numpy.random as rnd
import numpy as np
B=100000
N1=50
N2=50
p1mle=0.3
p2mle=0.4
taumle=p2mle-p1mle
estimate=[]
for i in range(B):
p1=0.0
for j in range(N1):
if(rnd.uniform(0,1)<p1mle):
p1+=1
p1/=N1
p2=0.0
for j in range(N2):
if(rnd.uniform(0,1)<p2mle):
p2+=1
p2/=N2
estimate.append(p2-p... |
3cdecf49b8f3f1afd5728798886dfdfb606f1e4c | 0136829214e816bd8eb86736824152c44e81fc23 | /parse_from_to_utf8.py | 13ec4a15ef0215f11961d16c2ccc8060b9f87a26 | [] | no_license | andyreagan/oldtweets-scrape | cf9d19c5f9074276186b4d7a1ab9a21d315a6175 | b1f0048c926d2e3207ff36174f660b4bfc4fa9eb | refs/heads/master | 2021-01-19T14:07:23.002925 | 2017-03-20T18:41:55 | 2017-03-20T18:41:55 | 26,062,137 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,309 | py | parse_from_to_utf8.py | # going to parse an hour of the twitter stream, from two hours ago
def parser(infile,outfile):
from json import loads
import codecs
f = codecs.open(infile,'r','utf8')
g = codecs.open(outfile,'w','utf8')
# go line by line in the minute-ly json
for line in f:
try: # try to load it
tweet = loads... |
547cecd07b9d60c0045959c06ae32937bdd359cb | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-eps/huaweicloudsdkeps/v1/__init__.py | 6f562bbeceb9db942461bb879d9c013522a94ae3 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 3,571 | py | __init__.py | # coding: utf-8
from __future__ import absolute_import
from huaweicloudsdkeps.v1.eps_client import EpsClient
from huaweicloudsdkeps.v1.eps_async_client import EpsAsyncClient
from huaweicloudsdkeps.v1.model.create_enterprise_project_request import CreateEnterpriseProjectRequest
from huaweicloudsdkeps.v1.model.create_... |
be0594953529411ae34be06bf7053da304383d99 | d68c9105c03bef9dce2e438b5b91c2bdd0d856e2 | /[1904] 01타일.py | c0fed80399041a0c2af5ac93fc677edb0f048e2d | [] | no_license | newfull5/Baekjoon-Online-Judge | 2a2dd1080af234551ecab6277968fedeb170a1f4 | 00d04f6c21080e3ad7c0fb06ca311f2324a591c0 | refs/heads/master | 2023-06-29T21:05:07.539911 | 2021-07-16T09:23:46 | 2021-07-16T09:23:46 | 267,557,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | [1904] 01타일.py | n = int(input())
if n == 1:
print(1)
elif n == 2:
print(2)
else:
a,b=1,2
for i in range(3,n+1):
a,b=b%15746, (a+b)%15746
print(b%15746)
|
b697cface79643249ffce208a116dd12eb6e9f84 | 4c5c31ac70a2636e360f46c545138f84b9ca128a | /preprocess/preprocess_data.py | ed92309d91ad8ecc10bb225d2969998ca9baa239 | [] | no_license | puzzlecollector/DATACON-Satellite-GPM-Data | 8941cac921a2183322b45deecbc38b6faf8bfa4e | f8e02c58046decebe9b1d66674ab51d91750dfb1 | refs/heads/master | 2022-12-02T13:01:07.223309 | 2020-08-19T07:23:01 | 2020-08-19T07:23:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,114 | py | preprocess_data.py | import numpy as np
import PIL
from PIL import Image
import cv2
import os
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
def chk(x):
cnt = 0
for i in range(40):
for j in range(40):
if int(x[i][j]) == -9999:
cnt += 1
return cnt==1600
def imp... |
4466c63c11d35fef135a68fea7cbfc2bfe510993 | 7eb478e0286c07b27848abeeeec06a1ffcc6a0e9 | /elevator/src/dispatch.py | b1319f80abc2af3d4e35392492880a68d75a0096 | [] | no_license | AnJT/Operating-system | 47f62f1bcfee62ae2e5f57182cb0b8e20710d930 | 79e475146f183692d8419d5ddb8a7b5895068755 | refs/heads/main | 2023-05-31T01:53:22.987316 | 2021-06-22T08:29:37 | 2021-06-22T08:29:37 | 362,998,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,293 | py | dispatch.py | import time
import numpy as np
from PyQt5.QtCore import QAbstractAnimation, QTimer
from PyQt5.QtWidgets import QMessageBox, QPushButton
import rescources
OPEN = 0 # 开门状态
CLOSE = 1 # 关门状态
STILL = 0 # 静止状态
RUNNING_UP = 1 # 上行状态
RUNNING_DOWN = 2 # 下行状态
PE = 0 # 有动画
NOPE = 1 # 无动画
GO_UP = 0 # 用户要上行
GO_DOWN = 1 ... |
6a02bd0346027030442255c925845e87d14d5848 | e5f35c2fb8062f429ef75ebe7c2c0a20ca25979a | /Gibbs_Method.py | de3958bae061cb3b592052843e3d0187d6284d03 | [] | no_license | bmwisser/Astrodynamics | 204ca04922f8a04f702dcc1fe5d343fbaeddb2a2 | 77506f95d9339cd86f5bfc201b5444971e6fa005 | refs/heads/master | 2020-04-23T08:27:03.409689 | 2019-02-16T18:32:20 | 2019-02-16T18:32:20 | 171,037,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,906 | py | Gibbs_Method.py | def Gibbs(r_1,r_2,r_3):
import numpy as np
import math
from numpy.linalg import norm
# r_1 = [1.41422511, 0, 1.414202]
# r_2 = [1.81065659, 1.06066883, 0.3106515]
# r_3 = [1.35353995, 1.41422511, -0.6464495]
if norm(r_1) <= 500 and norm(r_2) <= 500:
mu = 1
else:
... |
550e45b503952dd5572660a83d7d59b6c2eb0232 | 1b49a60d578b6ae4bfc2d1421143f676c9d3128d | /src/installer/src/tortuga/cloudserveraction/store.py | afccdb37a8e4fe429c3f9f42e7404080f26a35ee | [
"Apache-2.0"
] | permissive | UnivaCorporation/tortuga | aad2c00a1b09fba67298b1dd7543125a26b64c51 | 56d808d7836cd15d6c6748cbf704cdea4407fef6 | refs/heads/master | 2021-03-24T13:31:33.060593 | 2020-11-23T19:57:59 | 2020-11-23T19:57:59 | 123,297,582 | 33 | 25 | NOASSERTION | 2020-11-23T19:58:27 | 2018-02-28T14:38:56 | Python | UTF-8 | Python | false | false | 4,373 | py | store.py | # Copyright 2008-2018 Univa Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
48164aa522579aec5eaeb441e3caa5fe75d36bcc | 777438ea2dbc11a6049f956eb13728dbc124963a | /Sivakumar_HW1_Ques_1D.py | 10da60a5f1392731cefac294580d02d7bcb569a5 | [] | no_license | namratasiv/Python-Assignments | 7025cd52be48c9f6e27ae73df25577507bcaeda5 | e059d5e61a6c0a3be9002850f95f9661990dcc91 | refs/heads/master | 2020-05-25T18:37:53.196395 | 2019-05-22T00:46:08 | 2019-05-22T00:46:08 | 187,933,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | Sivakumar_HW1_Ques_1D.py |
# Namrata Sivakumar
#Rings
import turtle
wn=turtle.Screen()
a = turtle.Turtle()
a.circle(50)
x = turtle.Turtle()
x.penup()
x.forward(128)
x.pendown()
x.circle(50)
b = turtle.Turtle()
b.penup()
b.backward(128)
b.pendown()
b.circle(50)
b.down()
g = turtle.Turtle()
g.penup()
g.forward(14)
g.right(90)
g.pendown()
g.cir... |
2ebbf829f728258b66f6762de33c1f47024a7856 | 37b1c816c3712cf8b2c770cc11bc0b241c2d46bf | /Lcd/temp_test.py | 24b97dad76d8e548f9227b27aa4f9bc3c749b0a4 | [] | no_license | Octane70/Code | 67d1e2858371c2672238c278c21c4d0e691c7ecd | 5228bc9c6bb2e3eb43f633924b739d6b366fe7e3 | refs/heads/master | 2020-05-21T23:37:19.099000 | 2019-10-07T03:15:37 | 2019-10-07T03:15:37 | 32,683,250 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 828 | py | temp_test.py | #!/usr/bin/python
from Adafruit_CharLCD import Adafruit_CharLCD
from subprocess import *
from time import sleep, strftime
from datetime import datetime
import sys
import Adafruit_DHT
import os
import spidev
# Open SPI bus
spi = spidev.SpiDev()
spi.open(0,0)
# Function to read SPI data from MCP3008 chip
def ReadChann... |
49859a53889ba1a49b220c3003c601464249bd9c | a7a54a6333ff6516aa8403e56ec32ff8203160b4 | /kubemq/commandquery/lowlevel/initiator.py | 9c7f96607ac4fe0eee3adc4419bb0e66c1776661 | [
"MIT"
] | permissive | kubemq-io/kubemq-Python | d64932c692e1b03b9b0814f2157ae8b698be7ffb | aedd8a25e2f78f2cf145c88fc922a05363aa01b5 | refs/heads/master | 2023-06-02T21:57:13.222409 | 2023-01-16T16:00:47 | 2023-01-16T16:00:47 | 164,291,547 | 26 | 9 | MIT | 2023-05-15T03:58:03 | 2019-01-06T09:07:33 | Python | UTF-8 | Python | false | false | 3,013 | py | initiator.py | # MIT License
#
# Copyright (c) 2018 KubeMQ
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... |