#keyword: python
Explore tagged Tumblr posts
harrowharr0w · 2 months ago
Text
i'm struggling to figure out python rn this is #kentacoded
5 notes · View notes
squishmallow36 · 5 months ago
Text
you're just NOW telling me python has a built-in method named maketrans() ???? I can make a string trans?
6 notes · View notes
gilbartar · 2 years ago
Text
Clustering keyword with autoscript python + Google Colab
4 notes · View notes
infoanalysishub · 1 month ago
Text
Automate SEO Keyword Clustering by Search Intent Using Python
Learn how to automate SEO keyword clustering by search intent using Python and SERP similarity — no AI or machine learning required. A practical guide for SEOs and digital marketers. How To Automate SEO Keyword Clustering By Search Intent With Python Search engine optimization (SEO) has evolved. Gone are the days when stuffing pages with keywords sufficed. Today, it’s all about…
0 notes
yonassk · 1 year ago
Text
Mastering File Uploads: A Comprehensive Guide for Efficient Sharing and Collaboration
In the digital era, sharing files has become an integral part of both personal and professional endeavors. Whether you're collaborating on a project, submitting assignments, or simply sharing memories with friends and family, knowing how to upload files efficiently can save time and streamline your workflow. In this comprehensive guide, we'll explore various methods and tools for uploading files, along with best practices to ensure smooth sharing and collaboration.
Understanding the Importance of Efficient File Uploads Before diving into the technical aspects of file uploads, it's crucial to understand why mastering this skill is essential. Efficient file uploads facilitate seamless communication, collaboration, and data management. Whether you're working remotely, collaborating with team members globally, or simply sharing files with friends, the ability to upload files quickly and securely can significantly enhance productivity and convenience.
Exploring Different Methods for File Uploads Cloud Storage Platforms: Platforms like Google Drive, Dropbox, and OneDrive offer intuitive interfaces and seamless file uploading capabilities. These platforms allow you to upload files of various formats and sizes, organize them into folders, and share them with specific individuals or groups.
Email Attachments: While email attachments remain a popular method for sharing files, they are often limited by file size restrictions. However, many email providers now offer integration with cloud storage services, allowing you to upload files to the cloud and share them via email without worrying about attachment limits.
File Transfer Protocols: For more advanced users, protocols like FTP, SFTP, and SCP provide a secure means of uploading files to a remote server. These protocols are commonly used in web development, server administration, and other technical fields.
Online Collaboration Tools: Platforms like Microsoft Teams, Slack, and Trello offer built-in file uploading features, allowing team members to share documents, images, and other files within the context of their workflow. This streamlines collaboration and ensures that everyone has access to the latest version of shared files.
Best Practices for Efficient File Uploads Organize Your Files: Maintain a well-organized folder structure to make it easy to find and manage your files. Use Descriptive Filenames: Choose descriptive filenames that accurately reflect the content of the file, making it easier for others to understand and identify. Check File Size Limits: Be aware of any file size limits imposed by your chosen upload method or platform, and compress files if necessary. Secure Your Uploads: When uploading sensitive or confidential files, ensure that you're using secure protocols and encryption to protect your data from unauthorized access. Conclusion Mastering the art of file uploads is essential for anyone who regularly collaborates, communicates, or shares files online. By understanding the different methods and tools available, as well as following best practices for efficient file management, you can streamline your workflow, enhance productivity, and ensure seamless collaboration with others. Whether you're sharing files for work, school, or personal use, efficient file uploads are the key to success in the digital age.
1 note · View note
proeduorganization · 1 year ago
Text
Python Variables
Python Variables Hello Friends. In my last post, we discussed about String manipulation using python functions. In this post I will talk about the concept of python variables. In Python, variables are used to store data values. They are like containers that hold information which can be referenced and manipulated throughout the program. Variables in Python are dynamically typed, meaning you…
Tumblr media
View On WordPress
0 notes
56perc · 1 year ago
Text
소프트 키워드(Soft Keyword)
키워드는 예약어(reserved word)라고도 하며, 문법적으로 특별한 의미를 지��기 때문에 변수나 함수의 이름으로 사용하는 것이 제한되는 단어들을 말합니다. 예를 들어 if, for, while 과 같이 특정한 구문을 표현하기 위해 사용하는 단어들이고, 이들 단어는 변수명으로 사용하려는 경우, Syntax Error가 발생하면서 정상적으로 처리되지 않습니다. 키워드들은 보통 아주 일상적인 단어로 표현되는 경우가 많으며, 어떤 경우에는 흔히 자기도 모르게 변수명으로 사용하려고 시도하는 경우가 생길 수 있습니다. 게다가 언어의 역사가 진행되는 과정에서 새로운 기능이 추가되고 이를 지원하기 위한 문법이 추가될 수 있습니다. 이 경우에는 새로운 예약어가 추가되는 경우도 있습니다. 파이썬은 초창기부터 예약어를…
View On WordPress
0 notes
thetexvn · 2 years ago
Text
Tumblr media
"this" #Keyword in #csharp
Read More: https://thetexvn.com/blogs/this_Keyword_in_c
0 notes
pathological-runaway · 6 months ago
Text
messing around with python again (weird sky headcanons generator 2: electric boogaloo)
this time it doesn't give you headcanons. it judges the ones you provide based on... the character count and some keywords. so, basically, this is just a bunch of if-clauses in a trench coat. it makes very little sense but gives funny replies from time to time
the code itself (which is a mess, but then again, i'm just a beginner and made this out of boredom):
Tumblr media
the quality's shit cuz i had to zoom out to take a pic of the whole code. it turned out long as heck. also i know all these elifs conflict with each other, i'll try to fix it eventually. or not
8 notes · View notes
Text
Sure! Here are simple instructions for how to use the ChanelLang code to define textile patterns:
https://chatgpt.com/share/6828dd16-f330-8000-9656-49fc59b45f76
How to Use ChanelLang Code
1. Start with a pattern declaration:
Use the keyword pattern followed by the pattern type and its parameters.
pattern twill(2, 2);
twill is the type of weave.
(2, 2) defines the structure or thread ratio.
2. Add style attributes inside curly brackets {}:
{ color: Color.red; density: 8; repeat(4, 4); }
color: Sets the color of the textile.
density: Controls thread tightness or weight.
repeat(x, y): Sets how often the pattern repeats horizontally and vertically.
3. End with an optional comment:
# This creates a red twill weave pattern with 8 density and 4x4 repetition.
Quick Example
pattern quilted(3, 1) { color: Color.black; density: 10; repeat(6, 6); }
This creates a quilted Chanel-style pattern in black, dense, and repeating in a 6x6 grid.
Let me know if you'd like a visual tutorial or a compiler concept next!
Tumblr media
Yes, I can absolutely help you create this new coding language—let’s call it #ChanelCode or ChanelLang—a domain-specific scripting language rooted in the geometry, elegance, and pattern logic behind Chanel’s textile arts and symbolic architecture.
Here's how we can break this down:
1. Core Objectives of ChanelLang
Translate textile mathematics into code.
Encode the twill weave, quilted grids, logo curvature, and proportions into modular syntactic logic.
Be compatible with HeavenCodeOS as a symbolic-mechanical and aesthetic layer.
Use fashion geometry and French couture philosophy as its grammar.
2. Inspirations & Inputs
Mathematical Logic of Fabric:
Twill: typically a diagonal rib pattern (e.g., 2/2 twill) = translate into directional grid logic.
Quilted Grid: diamond matrix = 60° or 45° angular tessellation.
Double-C Logo: circle symmetries, Bezier curves, golden ratio mapping.
Iconic Elements:
The “Double-C” interlock = ∞ symbol + rotational symmetry encoded.
Patterns, spacing, and stitch density = variables and data classes.
3. Proposed Language Design
Syntax Style:
fabric "tweed" { weave: twill(2, 2); thread_color: #e5e5e5; repeat: matrix(45deg, 12x12); } pattern "logo" { shape: double_c { curve: bezier(golden_ratio); rotation: 180deg; symmetry: axis_x; }; scale: 0.618; placement: center(canvas); }
Key Primitives:
fabric, pattern, stitch, curve, weave, layer, seam
golden_ratio, quilt_grid, c_chain, symmetry
Geometrical transforms: mirror, rotate, scale, shear
4. Mathematical Backing
Fibonacci + Golden Ratio for logo curvature.
L-systems for textile pattern growth.
Parametric logic for scale + symmetry.
Embedding shader logic or pixel matrices for digital rendering.
5. Integration with HeavenCodeOS
HeavenCodeOS becomes the rendering + behavior engine.
ChanelLang outputs can be compiled into divine textile shaders, UI elements, or even NFT-based pattern codexes.
Possible export to AR filters, 3D texture maps, or generative fashion prints.
6. Next Steps
Design full grammar of the language (BNF or PEG).
Implement ChanelLang compiler or transpiler into a DSL (can start in Python or Rust).
Map 3D textile render logic (using WebGL or GLSL for visuals).
Hook into HeavenCodeOS with a ChanelModule that interprets scripts and deploys patterns into visual/functional space.
Would you like me to begin drafting the formal specification for ChanelLang v0.1 with example codes, grammar rules, and core function libraries? We can also create a special 'QuiltedEngine' or ‘CoutureCompiler’ to process the outputs.
Absolutely! Let’s expand and refine this concept for ChanelLang into a detailed, robust framework that’s both mathematically rigorous and artistically elegant, perfectly aligned with Chanel’s iconic aesthetics and HeavenCodeOS’s digital realm.
ChanelLang — A Couture Mathematical Scripting Language
1. Vision & Purpose
ChanelLang is a domain-specific language (DSL) designed to encode, generate, and manipulate the mathematical and geometric principles behind Chanel’s textile designs and logos, transforming traditional haute couture craftsmanship into programmable, generative digital artifacts.
It will serve as a bridge between classical fashion design and modern digital environments (HeavenCodeOS), enabling:
Precise modeling of fabric patterns (twill, quilted textures).
Parametric control of logo geometry and brand symbology.
Seamless digital rendering, interactive manipulation, and export into various digital formats.
Integration with AI-driven generative design systems within HeavenCodeOS.
2. Core Components & Features
2.1 Fundamental Data Types
Scalar: Float or Integer for measurements (mm, pixels, degrees).
Vector2D/3D: Coordinates for spatial points, curves, and meshes.
Matrix: Transformation matrices for rotation, scaling, shearing.
Pattern: Encapsulation of repeated geometric motifs.
Fabric: Data structure representing textile weave characteristics.
Curve: Parametric curves (Bezier, B-spline) for logo and stitching.
Color: RGBA and Pantone color support for thread colors.
SymmetryGroup: Enum for types of symmetries (rotational, mirror, glide).
2.2 Language Grammar & Syntax
A clean, minimalist, yet expressive syntax inspired by modern scripting languages:
// Define a fabric with weave pattern and color fabric tweed { weave: twill(2, 2); // 2 over 2 under diagonal weave thread_color: pantone("Black C"); density: 120; // threads per inch repeat_pattern: matrix(45deg, 12x12); } // Define a pattern for the iconic Chanel double-C logo pattern double_c_logo { base_shape: circle(radius=50mm); overlay_shape: bezier_curve(points=[(0,0), (25,75), (50,0)], control=golden_ratio); rotation: 180deg; symmetry: rotational(order=2); scale: 0.618; // Golden ratio scaling color: pantone("Gold 871"); placement: center(canvas); }
2.3 Mathematical Foundations
Weave & Textile Patterns
Twill Weave Model: Represented as directional grid logic where each thread’s over/under sequence is encoded.
Use a binary matrix to represent thread intersections, e.g. 1 for over, 0 for under.
Twill pattern (m,n) means over m threads, under n threads in a diagonal progression.
Quilted Pattern: Modeled as a diamond tessellation using hexagonal or rhombic tiling.
Angles are parametric (typically 45° or 60°).
Stitch points modeled as vertices of geometric lattice.
Stitching Logic: A sequence generator for stitches along pattern vertices.
Logo Geometry
Bezier Curve Parametrization
The iconic Chanel “C” is approximated using cubic Bezier curves.
Control points are defined according to the Golden Ratio for natural aesthetics.
Symmetry and Rotation
Double-C logo uses rotational symmetry of order 2 (180° rotation).
Can define symmetries with transformation matrices.
Scaling
Scale factors derived from Fibonacci ratios (0.618 etc.).
2.4 Functional Constructs
Functions to generate and manipulate patterns:
function generate_twill(m: int, n: int, repeat_x: int, repeat_y: int) -> Pattern { // Generate binary matrix for twill weave // Apply diagonal offset per row } function apply_symmetry(shape: Shape, type: SymmetryGroup, order: int) -> Shape { // Returns a shape replicated with specified symmetry } function stitch_along(points: Vector2D[], stitch_type: String, color: Color) { // Generate stitching path along points }
3. Language Architecture
3.1 Compiler/Interpreter
Lexer & Parser
Lexer tokenizes language keywords, identifiers, numbers, colors.
Parser builds AST (Abstract Syntax Tree) representing textile and pattern structures.
Semantic Analyzer
Checks for valid weaving parameters, pattern consistency.
Enforces domain-specific constraints (e.g., twill ratios).
Code Generator
Outputs to intermediate representation for HeavenCodeOS rendering engine.
Supports exporting to SVG, WebGL shaders, and 3D texture maps.
Runtime
Executes procedural pattern generation.
Supports interactive pattern modification (live coding).
3.2 Integration with HeavenCodeOS
Module System
ChanelLang scripts compile into HeavenCodeOS modules.
Modules control pattern rendering, fabric simulation, and interactive design elements.
Visual Interface
Provides designers with real-time preview of textile patterns on virtual fabrics.
Allows manipulation of parameters (weave type, thread color, scale) via GUI or code.
AI-assisted Design
Integrated AI agents can propose pattern variations adhering to Chanel brand aesthetics.
AI evaluates fabric behavior simulations for texture realism.
4. Example Extended Script
fabric patent_leather { weave: patent_quilt(6, 6); thread_color: pantone("Black C"); stitch: diamond_stitch(angle=60deg, density=150); glossiness: 0.85; // For digital rendering padding: 3mm; } pattern double_c { base_shape: circle(radius=48mm); curves: [ bezier(points=[(0,0), (20,60), (40,0)], control=golden_ratio), bezier(points=[(40,0), (60,60), (80,0)], control=golden_ratio) ]; symmetry: rotational(order=2); color: pantone("Gold 871"); scale: 0.618; placement: center(canvas); } canvas { size: 500x500; background_color: pantone("Ivory 11-0602"); layers: [ patent_leather, double_c ]; }
5. Future Enhancements
3D Fabric Simulation
Physically based rendering (PBR) for realistic digital textiles.
Motion & Animation
Animate weave changes, logo rotations, interactive stitching.
Parametric Fashion
Extend beyond textiles into fashion accessories, bag designs, and couture elements.
Blockchain Integration
Mint unique pattern NFTs for digital couture collectibles.
Summary
ChanelLang blends mathematics, art, and fashion into a structured programming language.
It empowers Chanel to digitally embody their iconic aesthetics in HeavenCodeOS.
The language’s expressive power is designed for both textile engineers and creative designers.
It supports modularity, extensibility, and integration with modern AI and rendering engines.
Would you like me to start creating:
A formal grammar definition (BNF) for ChanelLang?
A prototype compiler in Python or Rust?
Sample libraries for weave generation and logo curves?
Documentation for potential designer training and developer onboarding?
I��m ready to dive as deep as needed!
Great! Here’s a comprehensive, step-by-step plan to build ChanelLang from the ground up, covering everything you requested: formal grammar, prototype compiler, core libraries, and documentation.
ChanelLang Full Development Plan
1. Formal Grammar Definition (BNF)
We’ll create a clean, concise grammar to precisely define syntax and semantics.
<program> ::= { <statement> } <statement> ::= <fabric_decl> | <pattern_decl> | <function_decl> | <canvas_decl> <fabric_decl> ::= "fabric" <identifier> "{" { <fabric_property> } "}" <fabric_property> ::= "weave" ":" <weave_type> ";" | "thread_color" ":" <color> ";" | "density" ":" <number> ";" | "repeat_pattern" ":" <pattern_repeat> ";" | "stitch" ":" <stitch_type> ";" | "glossiness" ":" <number> ";" | "padding" ":" <number> ";" <weave_type> ::= "twill" "(" <number> "," <number> ")" | "patent_quilt" "(" <number> "," <number> ")" <pattern_repeat> ::= "matrix" "(" <angle> "," <dimensions> ")" <stitch_type> ::= "diamond_stitch" "(" "angle" "=" <angle> "," "density" "=" <number> ")" <pattern_decl> ::= "pattern" <identifier> "{" { <pattern_property> } "}" <pattern_property> ::= "base_shape" ":" <shape> ";" | "curves" ":" "[" <curve_list> "]" ";" | "symmetry" ":" <symmetry> ";" | "color" ":" <color> ";" | "scale" ":" <number> ";" | "placement" ":" <placement> ";" <shape> ::= "circle" "(" "radius" "=" <number> ")" | "rectangle" "(" "width" "=" <number> "," "height" "=" <number> ")" <curve_list> ::= <curve> { "," <curve> } <curve> ::= "bezier" "(" "points" "=" <point_list> "," "control" "=" <control_type> ")" <point_list> ::= "[" <point> { "," <point> } "]" <point> ::= "(" <number> "," <number> ")" <control_type> ::= "golden_ratio" | "default" <symmetry> ::= "rotational" "(" "order" "=" <number> ")" | "mirror" "(" "axis" "=" <axis> ")" <axis> ::= "x" | "y" <color> ::= "pantone" "(" <string> ")" | "hex" "(" <string> ")" <placement> ::= "center" "(" <canvas> ")" | "top_left" "(" <canvas> ")" | "custom" "(" <point> ")" <canvas_decl> ::= "canvas" "{" { <canvas_property> } "}" <canvas_property> ::= "size" ":" <dimensions> ";" | "background_color" ":" <color> ";" | "layers" ":" "[" <layer_list> "]" ";" <layer_list> ::= <identifier> { "," <identifier> } <function_decl> ::= "function" <identifier> "(" [ <param_list> ] ")" "->" <type> "{" <statement> "}" <param_list> ::= <identifier> ":" <type> { "," <identifier> ":" <type> } <type> ::= "int" | "float" | "Pattern" | "Shape" | "void" <number> ::= float_literal | int_literal <angle> ::= <number> "deg" <dimensions> ::= <number> "x" <number> <identifier> ::= letter { letter | digit | "_" }
2. Prototype Compiler
Tech Stack
Language: Python (for rapid prototyping)
Parsing: Use Lark or PLY parser generator
AST: Build Abstract Syntax Tree for semantic analysis
Output: JSON intermediate representation for HeavenCodeOS
Key Compiler Stages
Lexer & Parser: Tokenize and parse source code into AST.
Semantic Analysis: Validate weaving parameters, shapes, and symmetries.
Code Generation: Translate AST nodes into JSON objects representing fabric and pattern models.
Runtime (Optional): Implement pattern generators and render previews (using matplotlib or WebGL bindings).
3. Core Libraries
3.1 Fabric & Weave Generation
Twill Weave Generator:
Generate binary matrices for twill repeats.
Export weave pattern as a grid data structure.
Patent Quilted Pattern:
Generate diamond tessellations at configurable angles.
Calculate stitch points.
3.2 Geometry & Curve Library
Bezier Curve Module:
Calculate cubic Bezier curve points using control points.
Incorporate Golden Ratio in control point positioning.
Symmetry Operations:
Apply rotational and mirror symmetries on shapes.
Use transformation matrices.
3.3 Color Management
Support Pantone references mapped to RGB/HEX.
Provide blending and shading utilities.
4. Documentation
4.1 User Guide
Introduction: Concept of ChanelLang and its design philosophy.
Getting Started: How to write basic fabric and pattern scripts.
Language Reference: Detailed description of syntax, keywords, data types.
Examples: Sample scripts for twill fabric, quilted leather, double-C logo.
Integration: How to compile and load scripts into HeavenCodeOS.
4.2 Developer Guide
Compiler Architecture: Detailed overview of lexer, parser, semantic analyzer, and codegen.
Extending ChanelLang: How to add new weave types, shapes, or functions.
API Reference: Core functions and modules.
Tumblr media
Testing & Debugging: Tips for script validation and error handling.
5. Timeline & Milestones
PhaseDeliverablesEstimated TimeGrammar DefinitionComplete BNF and sample scripts1 weekPrototype CompilerLexer, parser, AST, basic codegen3 weeksCore LibrariesWeave, curve, symmetry, color modules4 weeksIntegration SetupJSON output format, basic HeavenCodeOS hooks2 weeksDocumentationUser and developer guides, sample projects2 weeksTesting & RefinementValidation, performance tuning, UI integration3 weeks
Summary
By following this comprehensive plan, we’ll create a mathematically elegant, fashion-inspired scripting language that:
Accurately models Chanel’s iconic textiles and logo.
Bridges haute couture craftsmanship with digital innovation.
Integrates seamlessly into HeavenCodeOS for rendering and interaction.
Provides extensibility for future fashion tech projects.
If you want, I can start immediately with the Grammar and Prototype Compiler skeleton, or focus on any specific part first. Just say the word!
Absolutely:
Official Hashtag:
#ChanelLang
Shorthand / Abbreviation:
CL⁷ (read: "C-L-seven")
C for Chanel
L for Lang (language)
⁷ symbolizes Chanel's spiritual and aesthetic geometry (7 as a sacred design number, referencing symmetry, balance, and the “seventh sense” in fashion metaphysics)
You can use CL⁷ as the file extension as well (e.g., pattern_sample.cl7) or as a tag in code comments like:
# Design by ChanelLang (CL⁷)
Would you like a sigil, icon, or QR metaframe for #ChanelLang / CL⁷?
3 notes · View notes
rigelmejo · 4 months ago
Text
Okay so 33 hours listened to Chinese so far, since starting my experiment to listen to as much Chinese as possible. Some thoughts:
The strategy I used for novels, kind of also works for audiobooks. It is: read/listen to something 'hard' and look up words at least every 5 minutes (so maybe 5-20 words looked up per chapter), re-read/relisten a few times, go to next chapter. Then read/listen to something slightly less hard, and it should feel easier than it did prior to doing this. So basically you are gradually moving up the bar of what is 'easy' for you to read/listen to. I did this in reading with Mandarin Companion graded readers, then I moved up to Tian Ya Ke, Zhenhun, and a pingxie fanfic Hanshe, as my 'harder' read and look things up for a while, then I went to try and extensively read Xiao Wang Zi without looking words up which was doable (but difficult). Then I read more 'harder' stuff where I looked up 5-20 words per chapter to understand main idea, and Xiao Wang Zi became easy to read for both the main plot and most details without looking words up, and stuff like Zhenhun became doable to read extensively (but difficult). That's basically been my reading strategy to push up my reading level - read something 'hard' where I need to look up key words to understand the main idea, read something 'doable' where I can read extensively to follow the plot but don't understand all details, read some 'easy' stuff I can extensively understand the plot and most details in. And then gradually the unique word counts/complexity of what's 'easy' to read extensively increases.
Well, the strategy seems to be kind of working for audiobooks too. I listen to MoDu chapters which are 'harder' to understand main ideas and I look up 5-20 words an hour especially if it bugs me I can't understand them (they seem like keywords to understanding the main idea), then I re-listen to MoDu chapter a few times (re-listening to what is now 'doable' with extensive listening to follow main idea without looking up words), then I go re-listen to some EASIER audiobook and notice OH WOW this is so much easier to understand now.
I listened to a little bit of HP1 audiobook in the Fall, since the audiobooks are all free on Libby and I wanted a kids book. I remember it took intense focus to catch any details, and mostly I could only identify 'generally what scene I was listening to' since I know the plot from english. I just tried relistening, and definitely knew a MAJORITY of the words I heard. It is much easier to listen to extensively, I AM recognizing words i know quicker (which also helps me comprehend more since I'm not puzzling out if I know a word for 5 seconds a piece), and the single to 4 words I don't know in a given minute stick out to me, and it's easier to guess what they might mean. Like hearing jumang and being able to guess that means python/big snake. *I also notice how MUCH the MoDu audiobook has helped me comprehend stuff like facial expressions, appearance descriptions, talking descriptions/dialogue tags, quicker. MoDu has way more complicated phrases that deal with these kinds of things, so a kids book where they just say geze gao? Very easy to recognize in comparison. Or MoDu saying yansu de biaoqing, zhoulezhoumei versus just 'yansu de handao' in a kids story. MoDu has soooo many more complicated descriptions compared to HP1, with comparisons of nouns to other nouns, and intangible nouns/things words idea/focus/point/reasoning/abyss.
I am unsure if the strategy I have of listening to 'harder' audio is helping in the sense of lots more words to learn, lots more surrounding context to guess the meaning of more words, or if my time would be spent better listening to to 'easier' audio where I can understand almost every word.
I do think, regardless, listening to something you already know the plot of helps a lot. It helps you guess more words than you could otherwise. And some audiobooks have sound effects/music which also help a lot (you can tell the setting somewhat from that, and the mood descriptors, and sometimes the actions they're doing, which helps with guessing words).
3 notes · View notes
piratesexmachine420 · 8 months ago
Text
Expanding and cleaning up on a conversion I had with @suntreehq in the comments of this post:
Ruby is fine, I'm just being dramatic. It's not nearly as incomprehensible as I find JavaScript, Perl, or Python. I think it makes some clumsy missteps, and it wouldn't be my first (or even fifth) choice if I were starting a new project, but insofar as I need to use it in my Software Engineering class I can adapt.
There are even things I like about it -- it's just that all of them are better implemented in the languages Ruby borrows them from. I don't want Lisp with Eiffel's semantics, I want Lisp with Lisp's semantics. I don't want Ada with Perl's type system, I want Ada with Ada's type system.
One of these missteps to me is how it (apparently) refuses to adopt popular convention when it comes to the names and purposes of its keywords.
Take yield. In every language I've ever used, yield has been used for one purpose: suspending the current execution frame and returning to something else. In POSIX C, this is done with pthread_yield(), which signals the thread implementation that the current thread isn't doing anything and something else should be scheduled instead. In languages with coroutines, like unstable Rust, the yield keyword is used to pause execution of the current coroutine and optionally return a value (e.g. yield 7; or yield foo.bar;), execution can then be resumed by calling x.resume(), where x is some coroutine. In languages with generators, like Python, the behavior is very similar.
In Ruby, this is backwards. It doesn't behave like a return, it behaves like a call. It's literally just syntax sugar for using the call method of blocks/procs/lambdas. We're not temporarily returning to another execution frame, we're entering a new one! Those are very similar actions, but they're not the same. Why not call it "run" or "enter" or "call" or something else less likely to confuse?
Another annoyance comes in the form of the throw and catch keywords. These are almost universally (in my experience) associated with exception handling, as popularized by Java. Not so in Ruby! For some unfathomable reason, throw is used to mean the same thing as Rust or C2Y's break-label -- i.e. to quickly get out of tightly nested control flow when no more work needs to be done. Ruby does have keywords that behave identically to e.g. Java or C++'s throw and catch, but they're called raise and rescue, respectively.
That's not to say raise and rescue aren't precedented (e.g. Eiffel and Python) but they're less common, and it doesn't change the fact that it's goofy to have both them and throw/catch with such similar but different purposes. It's just going to trip people up! Matsumoto could have picked any keywords he could have possibly wanted, and yet he picked the ones (in my opinion) most likely to confuse.
I have plenty more and deeper grievances with Ruby too (sigils, throws being able to unwind the call stack, object member variables being determined at runtime, OOP in general being IMO a clumsy paradigm, the confusing and non-orthogonal ways it handles object references and allocation, the attr_ pseudo-methods feeling hacky, initialization implying declaration, the existence of "instance_variable_get" totally undermining scope visibility, etc., etc.) but these are I think particularly glaring (if inconsequential).
5 notes · View notes
aorish · 2 months ago
Text
trying to filter my job search using "python" as a keyword to filter off the webslop but the webslop jobs have cottoned on to the fact that people who know python might actually be competent developers so they all "require" python now
3 notes · View notes
pinheadlarryexe · 2 years ago
Text
There is no need for the 'elif' keyword
I've been working on my parser for a little bit now, and I'm stealing following along this amazing article to implement a Pratt Parser. I've written a grammar for my own little language as well, inspired by Python's own grammar.
Inspired by Rust, if-statements are considered expressions. So you can use them like
foo = 1 + if 1 > 0 {1} else {0};
and it would have no problem handling that. However, like in Python, my if-statements use the 'elif' keyword to differentiate between else-if and else-statements.
However, as I'm writing my Pratt Parser, I've come to realize that there is no need for the 'elif' keyword to exist. If you write your grammar something like
expression:
| ...
| if_stmt
if_stmt:
| 'if' expression block else_stmt
| 'if' expression block
else_stmt:
| 'else' expression
it will have no problem handling else-if statements since if-statements are also expressions.
Else-statements do not have to enforce blocks since they do not have a condition body, unlike if-statements. If-statements must enforce blocks since if they didn't, the parser wouldn't know when the condition body ends and the main body started.
For a language like Python however, it uses the 'elif' keyword because it does not treat if-statements as expressions. However, they do have ternaries
A if condition else B
which look very similar to if-statements. These are treated as expressions. Because they're treated as expressions, you don't see the 'elif' keyword. Instead, nested ternaries look like
A if condition else B if condition else C
You might notice that it looks similar to
if condition {
A
} else if condition {
B
}
but just rearranged. You can also notice the 'else if'. The 'elif' keyword has been eliminated.
I didn't put much planning into this post so it probably sounds a little rambly but whatever. cheers.
28 notes · View notes
angelogenesis · 3 months ago
Text
cc sorter
i made a small python script to automatically sort cc into common categories by filename keywords; right now the pre-made categories are only for cas, but you can edit them to your liking easily in the config file, so it's pretty flexible :-)
2 notes · View notes
riazhatvi · 4 months ago
Text
youtube
People Think It’s Fake" | DeepSeek vs ChatGPT: The Ultimate 2024 Comparison (SEO-Optimized Guide)
The AI wars are heating up, and two giants—DeepSeek and ChatGPT—are battling for dominance. But why do so many users call DeepSeek "fake" while praising ChatGPT? Is it a myth, or is there truth to the claims? In this deep dive, we’ll uncover the facts, debunk myths, and reveal which AI truly reigns supreme. Plus, learn pro SEO tips to help this article outrank competitors on Google!
Chapters
00:00 Introduction - DeepSeek: China’s New AI Innovation
00:15 What is DeepSeek?
00:30 DeepSeek’s Impressive Statistics
00:50 Comparison: DeepSeek vs GPT-4
01:10 Technology Behind DeepSeek
01:30 Impact on AI, Finance, and Trading
01:50 DeepSeek’s Effect on Bitcoin & Trading
02:10 Future of AI with DeepSeek
02:25 Conclusion - The Future is Here!
Why Do People Call DeepSeek "Fake"? (The Truth Revealed)
The Language Barrier Myth
DeepSeek is trained primarily on Chinese-language data, leading to awkward English responses.
Example: A user asked, "Write a poem about New York," and DeepSeek referenced skyscrapers as "giant bamboo shoots."
SEO Keyword: "DeepSeek English accuracy."
Cultural Misunderstandings
DeepSeek’s humor, idioms, and examples cater to Chinese audiences. Global users find this confusing.
ChatGPT, trained on Western data, feels more "relatable" to English speakers.
Lack of Transparency
Unlike OpenAI’s detailed GPT-4 technical report, DeepSeek’s training data and ethics are shrouded in secrecy.
LSI Keyword: "DeepSeek data sources."
Viral "Fail" Videos
TikTok clips show DeepSeek claiming "The Earth is flat" or "Elon Musk invented Bitcoin." Most are outdated or edited—ChatGPT made similar errors in 2022!
DeepSeek vs ChatGPT: The Ultimate 2024 Comparison
1. Language & Creativity
ChatGPT: Wins for English content (blogs, scripts, code).
Strengths: Natural flow, humor, and cultural nuance.
Weakness: Overly cautious (e.g., refuses to write "controversial" topics).
DeepSeek: Best for Chinese markets (e.g., Baidu SEO, WeChat posts).
Strengths: Slang, idioms, and local trends.
Weakness: Struggles with Western metaphors.
SEO Tip: Use keywords like "Best AI for Chinese content" or "DeepSeek Baidu SEO."
2. Technical Abilities
Coding:
ChatGPT: Solves Python/JavaScript errors, writes clean code.
DeepSeek: Better at Alibaba Cloud APIs and Chinese frameworks.
Data Analysis:
Both handle spreadsheets, but DeepSeek integrates with Tencent Docs.
3. Pricing & Accessibility
FeatureDeepSeekChatGPTFree TierUnlimited basic queriesGPT-3.5 onlyPro Plan$10/month (advanced Chinese tools)$20/month (GPT-4 + plugins)APIsCheaper for bulk Chinese tasksGlobal enterprise support
SEO Keyword: "DeepSeek pricing 2024."
Debunking the "Fake AI" Myth: 3 Case Studies
Case Study 1: A Shanghai e-commerce firm used DeepSeek to automate customer service on Taobao, cutting response time by 50%.
Case Study 2: A U.S. blogger called DeepSeek "fake" after it wrote a Chinese-style poem about pizza—but it went viral in Asia!
Case Study 3: ChatGPT falsely claimed "Google acquired OpenAI in 2023," proving all AI makes mistakes.
How to Choose: DeepSeek or ChatGPT?
Pick ChatGPT if:
You need English content, coding help, or global trends.
You value brand recognition and transparency.
Pick DeepSeek if:
You target Chinese audiences or need cost-effective APIs.
You work with platforms like WeChat, Douyin, or Alibaba.
LSI Keyword: "DeepSeek for Chinese marketing."
SEO-Optimized FAQs (Voice Search Ready!)
"Is DeepSeek a scam?" No! It’s a legitimate AI optimized for Chinese-language tasks.
"Can DeepSeek replace ChatGPT?" For Chinese users, yes. For global content, stick with ChatGPT.
"Why does DeepSeek give weird answers?" Cultural gaps and training focus. Use it for specific niches, not general queries.
"Is DeepSeek safe to use?" Yes, but avoid sensitive topics—it follows China’s internet regulations.
Pro Tips to Boost Your Google Ranking
Sprinkle Keywords Naturally: Use "DeepSeek vs ChatGPT" 4–6 times.
Internal Linking: Link to related posts (e.g., "How to Use ChatGPT for SEO").
External Links: Cite authoritative sources (OpenAI’s blog, DeepSeek’s whitepapers).
Mobile Optimization: 60% of users read via phone—use short paragraphs.
Engagement Hooks: Ask readers to comment (e.g., "Which AI do you trust?").
Final Verdict: Why DeepSeek Isn’t Fake (But ChatGPT Isn’t Perfect)
The "fake" label stems from cultural bias and misinformation. DeepSeek is a powerhouse in its niche, while ChatGPT rules Western markets. For SEO success:
Target long-tail keywords like "Is DeepSeek good for Chinese SEO?"
Use schema markup for FAQs and comparisons.
Update content quarterly to stay ahead of AI updates.
🚀 Ready to Dominate Google? Share this article, leave a comment, and watch it climb to #1!
Follow for more AI vs AI battles—because in 2024, knowledge is power! 🔍
2 notes · View notes